Enable software single stepping for while-stepping actions in GDBServer
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2
3         * linux-low.c (single_step): New function.
4         (linux_resume_one_lwp_throw): Call single_step.
5         (start_step_over): Likewise.
6
7 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
8
9         * Makefile.in (SFILES): Append arch/arm-linux.c,
10         arch/arm-get-next-pcs.c.
11         (arm-linux.o): New rule.
12         (arm-get-next-pcs.o): New rule.
13         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
14         arm-linux.o.
15         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
16         to linux-aarch32-low.c.
17         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
18         (arm_breakpoint_len, thumb_breakpoint): Likewise.
19         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
20         (thumb2_breakpoint_len): Likewise.
21         (arm_is_thumb_mode): Make non-static.
22         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
23         from linux-aarch32-low.c.
24         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
25         (arm_breakpoint_len, thumb_breakpoint): Likewise.
26         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
27         (thumb2_breakpoint_len): Likewise.
28         (arm_is_thumb_mode): New declaration.
29         * linux-arm-low.c: Include arch/arm-linux.h
30         aarch/arm-get-next-pcs.h, sys/syscall.h.
31         (get_next_pcs_ops): New struct.
32         (get_next_pcs_addr_bits_remove): New function.
33         (get_next_pcs_is_thumb): New function.
34         (get_next_pcs_read_memory_unsigned_integer): Likewise.
35         (arm_sigreturn_next_pc): Likewise.
36         (get_next_pcs_syscall_next_pc): Likewise.
37         (arm_gdbserver_get_next_pcs): Likewise.
38         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
39         Initialize.
40         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
41         * server.h: Include gdb_vecs.h.
42
43 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
44
45         * Makefile.in (SFILES): Append common/common-regcache.c.
46         (OBS): Append common-regcache.o.
47         (common-regcache.o): New rule.
48         * regcache.c (init_register_cache): Initialize cache to
49         REG_UNAVAILABLE.
50         (regcache_raw_read_unsigned): New function.
51         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
52         register_status enum.
53
54 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
55
56         * linux-aarch64-low.c (the_low_targets): Rename
57         breakpoint_reinsert_addr to get_next_pcs.
58         * linux-arm-low.c (the_low_targets): Likewise.
59         * linux-bfin-low.c (the_low_targets): Likewise.
60         * linux-cris-low.c (the_low_targets): Likewise.
61         * linux-crisv32-low.c (the_low_targets): Likewise.
62         * linux-low.c (can_software_single_step): Likewise.
63         (install_software_single_step_breakpoints): New function.
64         (start_step_over): Use install_software_single_step_breakpoints.
65         * linux-low.h: New CORE_ADDR vector.
66         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
67         get_next_pcs.
68         * linux-mips-low.c (the_low_targets): Likewise.
69         * linux-nios2-low.c (the_low_targets): Likewise.
70         * linux-sparc-low.c (the_low_targets): Likewise.
71
72 2015-12-17  Pedro Alves  <palves@redhat.com>
73
74         * linux-low.c (linux_kill_one_lwp): Remove references to
75         LinuxThreads.
76         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
77         to 'kill'.
78         (linux_init_signals): Delete.
79         (initialize_low): Adjust.
80         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
81
82 2015-12-16  Pedro Alves  <palves@redhat.com>
83
84         * configure.ac (compiler warning flags): When testing a
85         -Wno-foo option, check whether -Wfoo works instead.
86         * configure: Regenerate.
87
88 2015-12-11  Don Breazeal  <donb@codesourcery.com>
89
90         * server.c (process_serial_event): Don't exit from gdbserver
91         in remote mode if there are still active inferiors.
92
93 2015-12-11  Yao Qi  <yao.qi@linaro.org>
94
95         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
96         arm_breakpoint_at if the process is 32-bit.
97
98 2015-12-11  Yao Qi  <yao.qi@linaro.org>
99
100         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
101         arm breakpoint.
102
103 2015-12-07  Yao Qi  <yao.qi@linaro.org>
104
105         * configure.srv: Append arm.o to srv_tgtobj for
106         aarch64*-*-linux* target.
107         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
108         from linux-arm-low.c.
109         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
110         (arm_breakpoint_len, thumb_breakpoint): Likewise.
111         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
112         (thumb2_breakpoint_len): Likewise.
113         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
114         (arm_breakpoint_kinds): Likewise.
115         (arm_breakpoint_kind_from_pc): Likewise.
116         (arm_sw_breakpoint_from_kind): Likewise.
117         (arm_breakpoint_kind_from_current_state): Likewise.
118         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
119         (arm_sw_breakpoint_from_kind): Declare.
120         (arm_breakpoint_kind_from_current_state): Declare.
121         (arm_breakpoint_at): Declare.
122         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
123         arm_sw_breakpoint_from_kind if process is 32-bit.
124         (aarch64_breakpoint_kind_from_pc): New function.
125         (aarch64_breakpoint_kind_from_current_state): New function.
126         (the_low_target): Initialize fields breakpoint_kind_from_pc
127         and breakpoint_kind_from_current_state.
128         * linux-arm-low.c (arm_breakpoint_kinds): Move to
129         linux-aarch32-low.c.
130         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
131         (arm_breakpoint, arm_breakpoint_len): Likewise.
132         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
133         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
134         (arm_is_thumb_mode): Likewise.
135         (arm_breakpoint_at): Likewise.
136         (arm_breakpoint_kind_from_pc): Likewise.
137         (arm_sw_breakpoint_from_kind): Likewise.
138         (arm_breakpoint_kind_from_current_state): Likewise.
139
140         Revert:
141         2015-08-04  Yao Qi  <yao.qi@linaro.org>
142
143         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
144         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
145         * server.c (extended_protocol): Remove "static".
146         * server.h (extended_protocol): Declare it.
147
148 2015-12-04  Josh Stone  <jistone@redhat.com>
149
150         * target.h (struct target_ops) <arch_setup>: Rename to ...
151         (struct target_ops) <post_create_inferior>: ... this.
152         (target_arch_setup): Rename to ...
153         (target_post_create_inferior): ... this, calling post_create_inferior.
154         * server.c (start_inferior): Update target_arch_setup calls to
155         target_post_create_inferior.
156         * linux-low.c (linux_low_ptrace_options): Forward declare.
157         (linux_arch_setup): Update its comment for general use.
158         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
159         (struct linux_target_ops): Use linux_post_create_inferior.
160         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
161         to post_create_inferior.
162         * nto-low.c (struct nto_target_ops): Likewise.
163         * spu-low.c (struct spu_target_ops): Likewise.
164         * win32-low.c (struct win32_target_ops): Likewise.
165
166 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
167
168         * linux-arm-low.c: Remove duplicate arch/arm.h include.
169
170 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
171
172         * linux-arm-low.c (arm_reinsert_addr): Remove function.
173         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
174         * linux-cris-low.c (cris_reinsert_addr> Remove function.
175         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
176         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
177         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
178         * linux-mips-low.c (mips_reinsert_addr): Remove function.
179         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
180         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
181         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
182         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
183         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
184
185 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
186
187         * linux-low.c (linux_look_up_symbols): Don't call
188         linux_supports_traceclone.
189         * linux-low.h (thread_db_init): Remove use_events argument.
190         * thread-db.c (thread_db_use_event): Remove global variable.
191         (struct thread_db) <td_thr_event_enable_p>: Remove field.
192         (struct thread_db) <td_create_bp>: Remove field.
193         (thread_db_create_event): Remove function.
194         (thread_db_enable_reporting): Likewise.
195         (find_one_thread): Don't check for thread_db_use_events.
196         (attach_thread): Likewise.
197         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
198         (try_thread_db_load_1): Don't check for thread_db_use_events.
199         (thread_db_init): Remove use_events argument and thread events
200         handling.
201         (remove_thread_event_breakpoints): Remove function.
202         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
203
204 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
205
206         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
207         New function.
208         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
209         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
210         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
211         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
212         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
213         Initialize.
214         * linux-crisv32-low.c (cris_supports_hardware_single_step):
215         New function.
216         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
217         * linux-low.c (can_hardware_single_step): Use
218         supports_hardware_single_step.
219         (can_software_single_step): New function.
220         (start_step_over): Call can_software_single_step.
221         (linux_supports_hardware_single_step): New function.
222         (struct target_ops) <supports_software_single_step>: Initialize.
223         * linux-low.h (struct linux_target_ops)
224         <supports_hardware_single_step>: Initialize.
225         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
226         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
227         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
228         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
229         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
230         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
231         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
232         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
233         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
234         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
235         Initialize.
236         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
237         (struct linux_target_ops) <tile_supports_hardware_single_step>:
238         Initialize.
239         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
240         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
241         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
242         New function.
243         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
244         * target.h (struct target_ops): <supports_software_single_step>:
245         New field.
246         (target_supports_software_single_step): New macro.
247
248 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
249
250         * linux-low.c (linux_wait_1): Fix pc advance condition.
251         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
252         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
253
254 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
255
256         * linux-arm-low.c (arm_is_thumb_mode): New function.
257         (arm_breakpoint_at): Use arm_is_thumb_mode.
258         (arm_breakpoint_kind_from_current_state): New function.
259         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
260         Initialize.
261         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
262         (linux_breakpoint_kind_from_current_state): New function.
263         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
264         * linux-low.h (struct linux_target_ops)
265         <breakpoint_kind_from_current_state>: New field.
266         * target.h (struct target_ops): Likewise.
267         (target_breakpoint_kind_from_current_state): New macro.
268
269 2015-11-30  Pedro Alves  <palves@redhat.com>
270
271         * linux-low.c (linux_resume): Wake up the event loop before
272         returning.
273
274 2015-11-30  Pedro Alves  <palves@redhat.com>
275
276         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
277         check.
278         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
279         to -1.
280         * target.c (struct thread_search): New structure.
281         (thread_search_callback): New function.
282         (prev_general_thread): New global.
283         (prepare_to_access_memory, done_accessing_memory): New functions.
284         * target.h (prepare_to_access_memory, done_accessing_memory):
285         Replace macros with function declarations.
286
287 2015-11-30  Pedro Alves  <palves@redhat.com>
288
289         PR 14618
290         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
291         report TARGET_WAITKIND_NO_RESUMED.
292         * remote-utils.c (prepare_resume_reply): Handle
293         TARGET_WAITKIND_NO_RESUMED.
294         * server.c (report_no_resumed): New global.
295         (handle_query) <qSupported>: Handle "no-resumed+".  Report
296         "no-resumed+" support.
297         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
298         return error if the client doesn't support no-resumed events.
299         (push_stop_notification): New function.
300         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
301         events if the client supports them.
302
303 2015-11-30  Pedro Alves  <palves@redhat.com>
304
305         * linux-low.c (thread_still_has_status_pending_p): Don't check
306         vCont;t here.
307         (lwp_resumed): New function.
308         (status_pending_p_callback): Return early if the LWP is not
309         supposed to be resumed.
310
311 2015-11-30  Pedro Alves  <palves@redhat.com>
312
313         * linux-low.c (handle_extended_wait): Assert that the LWP's
314         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
315         thread create events, leave the new child's status pending.
316         (linux_low_filter_event): If GDB wants to hear about thread exit
317         events, leave the LWP marked dead and don't delete it.
318         (linux_wait_for_event_filtered): Don't check for thread exit.
319         (filter_exit_event): New function.
320         (linux_wait_1): Use it, when returning an exit event.
321         (linux_resume_one_lwp_throw): Assert that the LWP's
322         waitstatus is TARGET_WAITKIND_IGNORE.
323         * remote-utils.c (prepare_resume_reply): Handle
324         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
325         * server.c (report_thread_events): New global.
326         (handle_general_set): Handle QThreadEvents.
327         (handle_query) <qSupported>: Handle and report QThreadEvents+;
328         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
329         TARGET_WAITKIND_THREAD_EXITED.
330         * server.h (report_thread_events): Declare.
331
332 2015-11-30  Pedro Alves  <palves@redhat.com>
333
334         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
335         the thread's last_resume_kind was resume_stop.
336
337 2015-11-30  Pedro Alves  <palves@redhat.com>
338
339         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
340         before returning.
341
342 2015-11-30  Pedro Alves  <palves@redhat.com>
343
344         * server.c (handle_v_requests): Handle vCtrlC.
345
346 2015-11-30  Pedro Alves  <palves@redhat.com>
347
348         * gdbthread.h (find_any_thread_of_pid): Declare.
349         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
350         functions.
351         * server.c (handle_query): If current_thread is NULL, look for
352         another thread of the selected process.
353
354 2015-11-26  Daniel Colascione  <dancol@dancol.org>
355             Simon Marchi  <simon.marchi@ericsson.com>
356
357         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
358         * server.c (handle_qxfer_threads_worker): Refactor to include thread
359         name in reply.
360         * target.h (struct target_ops) <thread_name>: New field.
361         (target_thread_name): New macro.
362
363 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
364
365         * regcache.h (regcache_invalidate_pid): Add declaration.
366         * regcache.c (regcache_invalidate_pid): New function, extracted
367         from regcache_invalidate.
368         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
369         Add trivial documentation comment.
370         * lynx-low.c: Use regcache_invalidate_pid instead of
371         regcache_invalidate.
372
373 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
374
375         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
376         and Elf64_auxv_t if the target is Android.
377
378 2015-11-22  Doug Evans  <xdje42@gmail.com>
379
380         * target.h: #include <sys/types.h>.
381
382 2015-11-19  Pedro Alves  <palves@redhat.com>
383
384         * linux-low.c (linux_process_qsupported): Change prototype.
385         Adjust.
386         * linux-low.h (struct linux_target_ops) <process_qsupported>:
387         Change prototype.
388         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
389         and adjust to loop over all features.
390         * server.c (handle_query) <qSupported>: Adjust to call
391         target_process_qsupported once, passing it a vector of unprocessed
392         features.
393         * target.h (struct target_ops) <process_qsupported>: Change
394         prototype.
395         (target_process_qsupported): Adjust.
396
397 2015-11-19  Pedro Alves  <palves@redhat.com>
398
399         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
400         mode.
401         * configure: Regenerate.
402
403 2015-11-19  Pedro Alves  <palves@redhat.com>
404
405         * configure: Regenerate.
406
407 2015-11-19  Yao Qi  <yao.qi@linaro.org>
408
409         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
410         type to uint32_t.
411
412 2015-11-19  Yao Qi  <yao.qi@linaro.org>
413
414         * linux-aarch64-low.c (enum aarch64_operand_type): New.
415         (struct aarch64_operand): Move enum out.
416
417 2015-11-19  Yao Qi  <yao.qi@linaro.org>
418
419         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
420         struct user_fpsimd_state *.
421         (aarch64_store_fpregset): Likewise.
422
423 2015-11-19  Yao Qi  <yao.qi@linaro.org>
424
425         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
426         struct user_pt_regs *.
427         (aarch64_store_gregset): Likewise.
428
429 2015-11-18  Pedro Alves  <palves@redhat.com>
430
431         * Makefile.in (all_object_files): Add $IPA_OBJS.
432
433 2015-11-17  Pedro Alves  <palves@redhat.com>
434
435         * win32-low.c (win32_resume): Use gdb_signal_from_host,
436         GDB_SIGNAL_0 and gdb_signal_to_string.
437
438 2015-11-17  Pedro Alves  <palves@redhat.com>
439
440         * win32-low.c (handle_output_debug_string): Remove parameter.
441         (win32_kill): Remove our_status local and adjust call to
442         handle_output_debug_string.
443         (get_child_debug_event): Adjust call to
444         handle_output_debug_string.
445
446 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
447
448         * linux-mips-low.c (mips_fill_gregset): Add cast.
449         (mips_store_gregset): Likewise.
450         (mips_fill_fpregset): Likewise.
451         (mips_store_fpregset): Likewise.
452
453 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
454
455         * linux-mips-low.c (mips_add_watchpoint): Rename private to
456         priv.
457
458 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
459
460         * linux-mips-low.c (mips_linux_new_thread): Change type of
461         watch_type to enum target_hw_bp_type.
462
463 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
464
465                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
466                 Change return type to arm_hwbp_type.
467
468 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
469
470         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
471         (arm_store_gregset): Likewise.
472         * linux-arm-low.c (arm_get_hwcap): Likewise.
473         (arm_read_description): Likewise.
474
475 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
476
477         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
478
479 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
480
481         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
482         (ppc_fill_vsxregset): Likewise.
483         (ppc_store_vsxregset): Likewise.
484         (ppc_fill_vrregset): Likewise.
485         (ppc_store_vrregset): Likewise.
486         (ppc_fill_evrregset): Likewise.
487         (ppc_store_evrregset): Likewise.
488
489 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
490
491         * linux-ppc-low.c (ppc_usrregs_info): Remove
492         forward-declaration.
493         (ppc_arch_setup): Move lower in file.
494
495 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
496
497         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
498         (ps_pdwrite): Likewise.
499
500 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
501
502         * linux-arm-low.c (arm_new_thread): Move pointer dereference
503         to after assert checks.
504
505 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
506
507         * proc-service.c (ps_pdread): Add/adjust casts.
508         (ps_pdwrite): Add/adjust casts.
509
510 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
511
512         * server.c (handle_search_memory_1): Cast return value of
513         memmem.
514
515 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
516
517         * server.c (write_qxfer_response): Change type of data to
518         gdb_byte *.
519
520 2015-10-29  Pedro Alves  <palves@redhat.com>
521
522         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
523
524 2015-10-29  Pedro Alves  <palves@redhat.com>
525
526         * tracepoint.c (clear_installed_tracepoints): Add casts.
527
528 2015-10-29  Pedro Alves  <palves@redhat.com>
529
530         * server.c (handle_v_cont, process_serial_event): Add enum
531         gdb_signal casts to signal parsing code.
532
533 2015-10-29  Pedro Alves  <palves@redhat.com>
534
535         * linux-low.h (NULL_REGSET): Define.
536         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
537         * linux-arm-low.c (arm_regsets): Likewise.
538         * linux-crisv32-low.c (cris_regsets): Likewise.
539         * linux-m68k-low.c (m68k_regsets): Likewise.
540         * linux-mips-low.c (mips_regsets): Likewise.
541         * linux-nios2-low.c (nios2_regsets): Likewise.
542         * linux-ppc-low.c (ppc_regsets): Likewise.
543         * linux-s390-low.c (s390_regsets): Likewise.
544         * linux-sh-low.c (sh_regsets): Likewise.
545         * linux-sparc-low.c (sparc_regsets): Likewise.
546         * linux-tic6x-low.c (tic6x_regsets): Likewise.
547         * linux-tile-low.c (tile_regsets): Likewise.
548         * linux-x86-low.c (x86_regsets): Likewise.
549         * linux-xtensa-low.c (xtensa_regsets): Likewise.
550
551 2015-10-29  Pedro Alves  <palves@redhat.com>
552
553         * linux-low.h (NULL_REGSET): Define.
554         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
555         * linux-arm-low.c (arm_regsets): Likewise.
556         * linux-crisv32-low.c (cris_regsets): Likewise.
557         * linux-m68k-low.c (m68k_regsets): Likewise.
558         * linux-mips-low.c (mips_regsets): Likewise.
559         * linux-nios2-low.c (nios2_regsets): Likewise.
560         * linux-ppc-low.c (ppc_regsets): Likewise.
561         * linux-s390-low.c (s390_regsets): Likewise.
562         * linux-sh-low.c (sh_regsets): Likewise.
563         * linux-sparc-low.c (sparc_regsets): Likewise.
564         * linux-tic6x-low.c (tic6x_regsets): Likewise.
565         * linux-tile-low.c (tile_regsets): Likewise.
566         * linux-x86-low.c (x86_regsets): Likewise.
567         * linux-xtensa-low.c (xtensa_regsets): Likewise.
568
569 2015-10-26  Doug Evans  <dje@google.com>
570
571         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
572
573 2015-10-26  Doug Evans  <dje@google.com>
574
575         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
576
577 2015-10-26  Doug Evans  <dje@google.com>
578
579         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
580         for debug_printf.
581         (attach_thread, find_new_threads_callback): Ditto.
582
583 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
584
585         * mem-break.h (set_breakpoint_data): Remove.
586
587 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
588
589         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
590         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
591         (initialize_low): Remove set_breakpoint_data call.
592         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
593         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
594         (initialize_low): Remove set_breakpoint_data call.
595         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
596         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
597         (initialize_low): Remove set_breakpoint_data call.
598
599 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
600
601         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
602         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
603         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
604         * target.h (target_breakpoint_kind_from_pc): New macro.
605
606 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
607
608         * linux-low.c (default_breakpoint_kind_from_pc): New function.
609         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
610         the default breakpoint kind.
611
612 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
613
614         * linux-arm-low.c (arm_supports_z_point_type): Add software
615         breakpoint support.
616
617 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
618
619         * linux-arm-low.c: Refactor breakpoint definitions.
620         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
621         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
622
623 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
624
625         * Makefile.in: Add arm.c/o.
626         * configure.srv: Likewise.
627         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
628         (arm_breakpoint_kind_from_pc): New function.
629         (arm_sw_breakpoint_from_kind): Return proper kind.
630         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
631
632 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
633
634         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
635         removal.
636         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
637         (struct raw_breakpoint) <size>: Remove.
638         (struct raw_breakpoint) <kind>: Add.
639         (bp_size): New function.
640         (bp_opcode): Likewise.
641         (find_raw_breakpoint_at): Adjust for kind.
642         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
643         (remove_memory_breakpoint): Adjust for kind call bp_size.
644         (set_raw_breakpoint_at): Adjust for kind.
645         (set_breakpoint): Likewise.
646         (set_breakpoint_at): Call breakpoint_kind_from_pc.
647         (delete_raw_breakpoint): Adjust for kind.
648         (delete_breakpoint): Likewise.
649         (find_gdb_breakpoint): Likewise.
650         (set_gdb_breakpoint_1): Likewise.
651         (set_gdb_breakpoint): Likewise.
652         (delete_gdb_breakpoint_1): Likewise.
653         (delete_gdb_breakpoint): Likewise.
654         (uninsert_raw_breakpoint): Likewise.
655         (reinsert_raw_breakpoint): Likewise.
656         (set_breakpoint_data): Remove.
657         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
658         (check_mem_read): Adjust for kind call bp_size.
659         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
660         (clone_one_breakpoint): Adjust for kind.
661         * mem-break.h (set_gdb_breakpoint): Likewise.
662         (delete_gdb_breakpoint): Likewise.
663         * server.c (process_serial_event): Likewise.
664
665 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
666
667         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
668         (struct linux_target_ops) <breakpoint>: Remove.
669         (struct linux_target_ops) <breakpoint_len>: Remove.
670         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
671         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
672         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
673         (arm_sw_breakpoint_from_kind): New function.
674         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
675         (struct linux_target_ops) <breakpoint>: Remove.
676         (struct linux_target_ops) <breakpoint_len>: Remove.
677         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
678         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
679         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
680         (struct linux_target_ops) <breakpoint>: Remove.
681         (struct linux_target_ops) <breakpoint_len>: Remove.
682         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
683         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
684         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
685         (struct linux_target_ops) <breakpoint>: Remove.
686         (struct linux_target_ops) <breakpoint_len>: Remove.
687         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
688         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
689         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
690         and sw_breakpoint_from_kind to increment the pc.
691         (linux_breakpoint_kind_from_pc): New function.
692         (linux_sw_breakpoint_from_kind): New function.
693         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
694         (initialize_low): Call breakpoint_kind_from_pc and
695         sw_breakpoint_from_kind to replace breakpoint_data/len.
696         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
697         New field.
698         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
699         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
700         (struct linux_target_ops) <breakpoint>: Remove.
701         (struct linux_target_ops) <breakpoint_len>: Remove.
702         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
703         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
704         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
705         (struct linux_target_ops) <breakpoint>: Remove.
706         (struct linux_target_ops) <breakpoint_len>: Remove.
707         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
708         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
709         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
710         (struct linux_target_ops) <breakpoint>: Remove.
711         (struct linux_target_ops) <breakpoint_len>: Remove.
712         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
713         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
714         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
715         (struct linux_target_ops) <breakpoint>: Remove.
716         (struct linux_target_ops) <breakpoint_len>: Remove.
717         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
718         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
719         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
720         (struct linux_target_ops) <breakpoint>: Remove.
721         (struct linux_target_ops) <breakpoint_len>: Remove.
722         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
723         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
724         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
725         (struct linux_target_ops) <breakpoint>: Remove.
726         (struct linux_target_ops) <breakpoint_len>: Remove.
727         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
728         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
729         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
730         (struct linux_target_ops) <breakpoint>: Remove.
731         (struct linux_target_ops) <breakpoint_len>: Remove.
732         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
733         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
734         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
735         (struct linux_target_ops) <breakpoint>: Remove.
736         (struct linux_target_ops) <breakpoint_len>: Remove.
737         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
738         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
739         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
740         (struct linux_target_ops) <breakpoint>: Remove.
741         (struct linux_target_ops) <breakpoint_len>: Remove.
742         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
743         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
744         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
745         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
746         (struct linux_target_ops) <breakpoint>: Remove.
747         (struct linux_target_ops) <breakpoint_len>: Remove.
748         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
749         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
750         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
751         (struct linux_target_ops) <breakpoint>: Remove.
752         (struct linux_target_ops) <breakpoint_len>: Remove.
753         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
754         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
755
756 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
757
758         * linux-cris-low.c (cris_get_pc): Remove void arg.
759
760 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
761
762         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
763         variable name.
764
765 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
766
767         * inferiors.c (thread_pid_matches_callback): New function.
768         (find_thread_process): New function.
769         (remove_thread): Reset current_thread.
770         (remove_process): Assert threads have been removed first.
771
772 2015-10-15  Yao Qi  <yao.qi@linaro.org>
773
774         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
775         if it is 3.
776         (aarch64_remove_point): Likewise.
777         * regcache.c (regcache_register_size): New function.
778
779 2015-10-12  Yao Qi  <yao.qi@linaro.org>
780
781         * linux-aarch64-low.c: Update all callers as emit_load_store
782         is renamed to aarch64_emit_load_store.
783
784 2015-10-12  Yao Qi  <yao.qi@linaro.org>
785
786         * linux-aarch64-low.c: Update all callers of function renaming
787         from emit_insn to aarch64_emit_insn.
788
789 2015-10-12  Yao Qi  <yao.qi@linaro.org>
790
791         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
792         arch/aarch64-insn.h.
793         (struct aarch64_memory_operand): Likewise.
794         (ENCODE): Likewise.
795         (emit_insn): Move to arch/aarch64-insn.c.
796         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
797         (emit_load_store): Move to arch/aarch64-insn.c.
798         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
799         (can_encode_int32): Remove.
800
801 2015-10-12  Yao Qi  <yao.qi@linaro.org>
802
803         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
804         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
805         (aarch64_relocate_instruction): Likewise.
806         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
807         (struct aarch64_insn_visitor): Likewise.
808
809 2015-10-12  Yao Qi  <yao.qi@linaro.org>
810
811         * linux-aarch64-low.c (struct aarch64_insn_data): New.
812         (struct aarch64_insn_visitor): New.
813         (struct aarch64_insn_relocation_data): New.
814         (aarch64_ftrace_insn_reloc_b): New function.
815         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
816         (aarch64_ftrace_insn_reloc_cb): Likewise.
817         (aarch64_ftrace_insn_reloc_tb): Likewise.
818         (aarch64_ftrace_insn_reloc_adr): Likewise.
819         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
820         (aarch64_ftrace_insn_reloc_others): Likewise.
821         (visitor): New.
822         (aarch64_relocate_instruction): Use visitor.
823
824 2015-10-12  Yao Qi  <yao.qi@linaro.org>
825
826         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
827         int.  Add argument buf.
828         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
829         aarch64_relocate_instruction.
830
831 2015-10-12  Yao Qi  <yao.qi@linaro.org>
832
833         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
834         argument insn.  Remove local variable insn.  Don't call
835         target_read_uint32.
836         (aarch64_install_fast_tracepoint_jump_pad): Call
837         target_read_uint32.
838
839 2015-09-30  Yao Qi  <yao.qi@linaro.org>
840
841         * linux-aarch64-low.c (emit_movk): Shorten a long line.
842         (emit_load_store_pair): Likewise.
843
844 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
845
846         * dll.c (match_dll): Add cast(s).
847         (unloaded_dll): Likewise.
848         * linux-low.c (second_thread_of_pid_p): Likewise.
849         (delete_lwp_callback): Likewise.
850         (count_events_callback): Likewise.
851         (select_event_lwp_callback): Likewise.
852         (linux_set_resume_request): Likewise.
853         * server.c (accumulate_file_name_length): Likewise.
854         (emit_dll_description): Likewise.
855         (handle_qxfer_threads_worker): Likewise.
856         (visit_actioned_threads): Likewise.
857         * thread-db.c (any_thread_of): Likewise.
858         * tracepoint.c (same_process_p): Likewise.
859         (match_blocktype): Likewise.
860         (build_traceframe_info_xml): Likewise.
861
862 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
863
864         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
865         assignment.
866         (gdb_unparse_agent_expr): Likewise.
867         * hostio.c (require_data): Likewise.
868         (handle_pread): Likewise.
869         * linux-low.c (disable_regset): Likewise.
870         (fetch_register): Likewise.
871         (store_register): Likewise.
872         (get_dynamic): Likewise.
873         (linux_qxfer_libraries_svr4): Likewise.
874         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
875         (set_fast_tracepoint_jump): Likewise.
876         (uninsert_fast_tracepoint_jumps_at): Likewise.
877         (reinsert_fast_tracepoint_jumps_at): Likewise.
878         (validate_inserted_breakpoint): Likewise.
879         (clone_agent_expr): Likewise.
880         * regcache.c (init_register_cache): Likewise.
881         * remote-utils.c (putpkt_binary_1): Likewise.
882         (decode_M_packet): Likewise.
883         (decode_X_packet): Likewise.
884         (look_up_one_symbol): Likewise.
885         (relocate_instruction): Likewise.
886         (monitor_output): Likewise.
887         * server.c (handle_search_memory): Likewise.
888         (handle_qxfer_exec_file): Likewise.
889         (handle_qxfer_libraries): Likewise.
890         (handle_qxfer): Likewise.
891         (handle_query): Likewise.
892         (handle_v_cont): Likewise.
893         (handle_v_run): Likewise.
894         (captured_main): Likewise.
895         * target.c (write_inferior_memory): Likewise.
896         * thread-db.c (try_thread_db_load_from_dir): Likewise.
897         * tracepoint.c (init_trace_buffer): Likewise.
898         (add_tracepoint_action): Likewise.
899         (add_traceframe): Likewise.
900         (add_traceframe_block): Likewise.
901         (cmd_qtdpsrc): Likewise.
902         (cmd_qtdv): Likewise.
903         (cmd_qtstatus): Likewise.
904         (response_source): Likewise.
905         (response_tsv): Likewise.
906         (cmd_qtnotes): Likewise.
907         (gdb_collect): Likewise.
908         (initialize_tracepoint): Likewise.
909
910 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
911
912         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
913         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
914         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
915         <NOP>: New.
916         (enum aarch64_condition_codes): New enum.
917         (w0): New static global.
918         (fp): Likewise.
919         (lr): Likewise.
920         (struct aarch64_memory_operand) <type>: New
921         MEMORY_OPERAND_POSTINDEX type.
922         (postindex_memory_operand): New helper function.
923         (emit_ret): New function.
924         (emit_load_store_pair): New function, factored out of emit_stp
925         with support for MEMORY_OPERAND_POSTINDEX.
926         (emit_stp): Rewrite using emit_load_store_pair.
927         (emit_ldp): New function.
928         (emit_load_store): Likewise.
929         (emit_ldr): Mention post-index instruction in comment.
930         (emit_ldrh): New function.
931         (emit_ldrb): New function.
932         (emit_ldrsw): Mention post-index instruction in comment.
933         (emit_str): Likewise.
934         (emit_subs): New function.
935         (emit_cmp): Likewise.
936         (emit_and): Likewise.
937         (emit_orr): Likewise.
938         (emit_orn): Likewise.
939         (emit_eor): Likewise.
940         (emit_mvn): Likewise.
941         (emit_lslv): Likewise.
942         (emit_lsrv): Likewise.
943         (emit_asrv): Likewise.
944         (emit_mul): Likewise.
945         (emit_sbfm): Likewise.
946         (emit_sbfx): Likewise.
947         (emit_ubfm): Likewise.
948         (emit_ubfx): Likewise.
949         (emit_csinc): Likewise.
950         (emit_cset): Likewise.
951         (emit_nop): Likewise.
952         (emit_ops_insns): New helper function.
953         (emit_pop): Likewise.
954         (emit_push): Likewise.
955         (aarch64_emit_prologue): New function.
956         (aarch64_emit_epilogue): Likewise.
957         (aarch64_emit_add): Likewise.
958         (aarch64_emit_sub): Likewise.
959         (aarch64_emit_mul): Likewise.
960         (aarch64_emit_lsh): Likewise.
961         (aarch64_emit_rsh_signed): Likewise.
962         (aarch64_emit_rsh_unsigned): Likewise.
963         (aarch64_emit_ext): Likewise.
964         (aarch64_emit_log_not): Likewise.
965         (aarch64_emit_bit_and): Likewise.
966         (aarch64_emit_bit_or): Likewise.
967         (aarch64_emit_bit_xor): Likewise.
968         (aarch64_emit_bit_not): Likewise.
969         (aarch64_emit_equal): Likewise.
970         (aarch64_emit_less_signed): Likewise.
971         (aarch64_emit_less_unsigned): Likewise.
972         (aarch64_emit_ref): Likewise.
973         (aarch64_emit_if_goto): Likewise.
974         (aarch64_emit_goto): Likewise.
975         (aarch64_write_goto_address): Likewise.
976         (aarch64_emit_const): Likewise.
977         (aarch64_emit_call): Likewise.
978         (aarch64_emit_reg): Likewise.
979         (aarch64_emit_pop): Likewise.
980         (aarch64_emit_stack_flush): Likewise.
981         (aarch64_emit_zero_ext): Likewise.
982         (aarch64_emit_swap): Likewise.
983         (aarch64_emit_stack_adjust): Likewise.
984         (aarch64_emit_int_call_1): Likewise.
985         (aarch64_emit_void_call_2): Likewise.
986         (aarch64_emit_eq_goto): Likewise.
987         (aarch64_emit_ne_goto): Likewise.
988         (aarch64_emit_lt_goto): Likewise.
989         (aarch64_emit_le_goto): Likewise.
990         (aarch64_emit_gt_goto): Likewise.
991         (aarch64_emit_ge_got): Likewise.
992         (aarch64_emit_ops_impl): New static global variable.
993         (aarch64_emit_ops): New target function, return
994         &aarch64_emit_ops_impl.
995         (struct linux_target_ops): Install it.
996
997 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
998
999         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1000         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1001         aarch64-ipa.o.
1002         * linux-aarch64-ipa.c: New file.
1003         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1004         and endian.h.
1005         (aarch64_get_thread_area): New target method.
1006         (extract_signed_bitfield): New helper function.
1007         (aarch64_decode_ldr_literal): New function.
1008         (enum aarch64_opcodes): New enum.
1009         (struct aarch64_register): New struct.
1010         (struct aarch64_operand): New struct.
1011         (x0): New static global.
1012         (x1): Likewise.
1013         (x2): Likewise.
1014         (x3): Likewise.
1015         (x4): Likewise.
1016         (w2): Likewise.
1017         (ip0): Likewise.
1018         (sp): Likewise.
1019         (xzr): Likewise.
1020         (aarch64_register): New helper function.
1021         (register_operand): Likewise.
1022         (immediate_operand): Likewise.
1023         (struct aarch64_memory_operand): New struct.
1024         (offset_memory_operand): New helper function.
1025         (preindex_memory_operand): Likewise.
1026         (enum aarch64_system_control_registers): New enum.
1027         (ENCODE): New macro.
1028         (emit_insn): New helper function.
1029         (emit_b): New function.
1030         (emit_bcond): Likewise.
1031         (emit_cb): Likewise.
1032         (emit_tb): Likewise.
1033         (emit_blr): Likewise.
1034         (emit_stp): Likewise.
1035         (emit_ldp_q_offset): Likewise.
1036         (emit_stp_q_offset): Likewise.
1037         (emit_load_store): Likewise.
1038         (emit_ldr): Likewise.
1039         (emit_ldrsw): Likewise.
1040         (emit_str): Likewise.
1041         (emit_ldaxr): Likewise.
1042         (emit_stxr): Likewise.
1043         (emit_stlr): Likewise.
1044         (emit_data_processing_reg): Likewise.
1045         (emit_data_processing): Likewise.
1046         (emit_add): Likewise.
1047         (emit_sub): Likewise.
1048         (emit_mov): Likewise.
1049         (emit_movk): Likewise.
1050         (emit_mov_addr): Likewise.
1051         (emit_mrs): Likewise.
1052         (emit_msr): Likewise.
1053         (emit_sevl): Likewise.
1054         (emit_wfe): Likewise.
1055         (append_insns): Likewise.
1056         (can_encode_int32_in): New helper function.
1057         (aarch64_relocate_instruction): New function.
1058         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1059         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1060         (struct linux_target_ops): Install aarch64_get_thread_area,
1061         aarch64_install_fast_tracepoint_jump_pad and
1062         aarch64_get_min_fast_tracepoint_insn_len.
1063
1064 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1065
1066         * Makefile.in (aarch64-insn.o): New rule.
1067         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1068
1069 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1070
1071         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1072
1073 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1074
1075         * tracepoint.c (max_jump_pad_size): Remove.
1076
1077 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1078
1079         * linux-aarch64-low.c: Don't include sys/uio.h.
1080         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1081
1082 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1083
1084         * tracepoint.c (eval_result_type): Change prototype.
1085         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1086
1087 2015-09-15  Pedro Alves  <palves@redhat.com>
1088
1089         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1090         Check whether to report exec events instead of checking whether
1091         multiprocess is enabled.
1092
1093 2015-09-15  Pedro Alves  <palves@redhat.com>
1094
1095         PR remote/18965
1096         * remote-utils.c (prepare_resume_reply): Merge
1097         TARGET_WAITKIND_VFORK_DONE switch case with the
1098         TARGET_WAITKIND_FORKED case.
1099
1100 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1101
1102         * server.c (handle_query): Check string comparison using
1103         "else if" instead of "if".
1104
1105 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1106
1107         * server.c (vCont_supported): New global variable.
1108         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1109         matches.  Append ";vContSupported+" to own_buf.
1110         (handle_v_requests): Append ";s;S" to own_buf if target supports
1111         hardware single step or vCont_supported is false.
1112         (capture_main): Set vCont_supported to zero.
1113
1114 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1115
1116         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1117         it to ...
1118         (linux_supports_hardware_single_step): ... New function.
1119         (linux_target_ops): Update.
1120         * lynx-low.c (lynx_target_ops): Set field
1121         supports_hardware_single_step to target_can_do_hardware_single_step.
1122         * nto-low.c (nto_target_ops): Likewise.
1123         * spu-low.c (spu_target_ops): Likewise.
1124         * win32-low.c (win32_target_ops): Likewise.
1125         * target.c (target_can_do_hardware_single_step): New function.
1126         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1127         Remove.  <supports_hardware_single_step>: New field.
1128         (target_supports_conditional_breakpoints): Remove.
1129         (target_supports_hardware_single_step): New macro.
1130         (target_can_do_hardware_single_step): Declare.
1131         * server.c (handle_query): Use target_supports_hardware_single_step
1132         instead of target_supports_conditional_breakpoints.
1133
1134 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1135
1136         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1137         function.
1138         (struct linux_target_ops the_low_target): Install
1139         aarch64_linux_siginfo_fixup.
1140
1141 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1142             Luis Machado  <lgustavo@codesourcery.com>
1143
1144         * linux-low.c (linux_mourn): Static declaration.
1145         (linux_arch_setup): Move in front of
1146         handle_extended_wait.
1147         (linux_arch_setup_thread): New function.
1148         (handle_extended_wait): Handle exec events.  Call
1149         linux_arch_setup_thread.  Make event_lwp argument a
1150         pointer-to-a-pointer.
1151         (check_zombie_leaders): Do not check stopped threads.
1152         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1153         (linux_low_filter_event): Add lwp and thread for exec'ing
1154         non-leader thread if leader thread has been deleted.
1155         Refactor code into linux_arch_setup_thread and call it.
1156         Pass child lwp pointer by reference to handle_extended_wait.
1157         (linux_wait_for_event_filtered): Update comment.
1158         (linux_wait_1): Prevent clobbering exec event status.
1159         (linux_supports_exec_events): New function.
1160         (linux_target_ops) <supports_exec_events>: Initialize new member.
1161         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1162         new member.
1163         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1164         * server.c (report_exec_events): New global variable.
1165         (handle_query): Handle qSupported query for exec-events feature.
1166         (captured_main): Initialize report_exec_events.
1167         * server.h (report_exec_events): Declare new global variable.
1168         * target.h (struct target_ops) <supports_exec_events>: New
1169         member.
1170         (target_supports_exec_events): New macro.
1171         * win32-low.c (win32_target_ops) <supports_exec_events>:
1172         Initialize new member.
1173
1174 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1175
1176         * linux-low.c (linux_low_enable_btrace): Remove.
1177         (linux_target_ops): Replace linux_low_enable_btrace with
1178         linux_enable_btrace.
1179
1180 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1181
1182         * linux-aarch64-low.c (aarch64_insert_point): Call
1183         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1184         returns true.
1185
1186 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1187
1188         * linux-low.c (check_stopped_by_breakpoint): Use
1189         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1190
1191 2015-08-27  Pedro Alves  <palves@redhat.com>
1192
1193         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1194
1195 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1196
1197         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1198         the XNEW-family equivalent.
1199         (compile_bytecodes): Likewise.
1200         * dll.c (loaded_dll): Likewise.
1201         * event-loop.c (append_callback_event): Likewise.
1202         (create_file_handler): Likewise.
1203         (create_file_event): Likewise.
1204         * hostio.c (handle_open): Likewise.
1205         * inferiors.c (add_thread): Likewise.
1206         (add_process): Likewise.
1207         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1208         * linux-arm-low.c (arm_new_process): Likewise.
1209         (arm_new_thread): Likewise.
1210         * linux-low.c (add_to_pid_list): Likewise.
1211         (linux_add_process): Likewise.
1212         (handle_extended_wait): Likewise.
1213         (add_lwp): Likewise.
1214         (enqueue_one_deferred_signal): Likewise.
1215         (enqueue_pending_signal): Likewise.
1216         (linux_resume_one_lwp_throw): Likewise.
1217         (linux_resume_one_thread): Likewise.
1218         (linux_read_memory): Likewise.
1219         (linux_write_memory): Likewise.
1220         * linux-mips-low.c (mips_linux_new_process): Likewise.
1221         (mips_linux_new_thread): Likewise.
1222         (mips_add_watchpoint): Likewise.
1223         * linux-x86-low.c (initialize_low_arch): Likewise.
1224         * lynx-low.c (lynx_add_process): Likewise.
1225         * mem-break.c (set_raw_breakpoint_at): Likewise.
1226         (set_breakpoint): Likewise.
1227         (add_condition_to_breakpoint): Likewise.
1228         (add_commands_to_breakpoint): Likewise.
1229         (clone_agent_expr): Likewise.
1230         (clone_one_breakpoint): Likewise.
1231         * regcache.c (new_register_cache): Likewise.
1232         * remote-utils.c (look_up_one_symbol): Likewise.
1233         * server.c (queue_stop_reply): Likewise.
1234         (start_inferior): Likewise.
1235         (queue_stop_reply_callback): Likewise.
1236         (handle_target_event): Likewise.
1237         * spu-low.c (fetch_ppc_memory): Likewise.
1238         (store_ppc_memory): Likewise.
1239         * target.c (set_target_ops): Likewise.
1240         * thread-db.c (thread_db_load_search): Likewise.
1241         (try_thread_db_load_1): Likewise.
1242         * tracepoint.c (add_tracepoint): Likewise.
1243         (add_tracepoint_action): Likewise.
1244         (create_trace_state_variable): Likewise.
1245         (cmd_qtdpsrc): Likewise.
1246         (cmd_qtro): Likewise.
1247         (add_while_stepping_state): Likewise.
1248         * win32-low.c (child_add_thread): Likewise.
1249         (get_image_name): Likewise.
1250
1251 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1252
1253         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1254
1255 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1256
1257         * Makefile.in (aarch64-linux.o): New rule.
1258         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1259         srv_tgtobj.
1260         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1261         (aarch64_init_debug_reg_state): Make it extern.
1262         (aarch64_linux_prepare_to_resume): Remove.
1263
1264 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1265
1266         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1267         lwp_arch_private_info and ptid_of_lwp.
1268
1269 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1270
1271         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1272         Find proc_info by find_process_pid.  All callers updated.
1273
1274 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1275
1276         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1277         Remove.
1278         (debug_reg_change_callback): Remove.
1279         (aarch64_notify_debug_reg_change): Remove.
1280
1281 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1282
1283         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1284         Call current_lwp_ptid.
1285
1286 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1287
1288         * linux-aarch64-low.c (debug_reg_change_callback): Use
1289         debug_printf.
1290
1291 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1292
1293         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1294
1295 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1296
1297         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1298
1299 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1300
1301         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1302         the code.
1303
1304 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1305
1306         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1307         Remove.
1308         (debug_reg_change_callback): Remove argument entry and add argument
1309         lwp.  Remove local variable thread.  Don't print thread id in the
1310         debugging output.  Don't check whether pid of thread equals to pid.
1311         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1312         iterate_over_lwps instead find_inferior.
1313
1314 2015-08-24  Pedro Alves  <palves@redhat.com>
1315
1316         * inferiors.c (get_first_process): New function.
1317         * inferiors.h (get_first_process): New declaration.
1318         * remote-utils.c (read_ptid): Default to the first process in the
1319         list, instead of to the current thread's process.
1320
1321 2015-08-24  Pedro Alves  <palves@redhat.com>
1322
1323         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1324         * event-loop.c: Likewise.
1325         * remote-utils.c: Likewise.
1326         * tracepoint.c: Likewise.
1327
1328 2015-08-24  Pedro Alves  <palves@redhat.com>
1329
1330         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1331         ptid_get_lwp.
1332
1333 2015-08-21  Pedro Alves  <palves@redhat.com>
1334
1335         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1336         instead of literal 1.
1337
1338 2015-08-21  Pedro Alves  <palves@redhat.com>
1339
1340         * tdesc.c (default_description): Explicitly zero-initialize.
1341
1342 2015-08-21  Pedro Alves  <palves@redhat.com>
1343
1344         PR gdb/18749
1345         * inferiors.c (remove_thread): Discard any pending stop reply for
1346         this thread.
1347         * server.c (remove_all_on_match_pid): Rename to ...
1348         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1349         instead of a pid.
1350         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1351         extern.
1352         (handle_v_kill, kill_inferior_callback, captured_main)
1353         (process_serial_event): Adjust.
1354         * server.h (discard_queued_stop_replies): Declare.
1355
1356 2015-08-21  Pedro Alves  <palves@redhat.com>
1357
1358         * linux-low.c (wait_for_sigstop): Always switch to no thread
1359         selected if the previously current thread dies.
1360         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1361         process instead of the current thread's.
1362         * remote-utils.c (input_interrupt): Don't check if there's no
1363         current thread.
1364         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1365         current thread to the general thread fails, error out.
1366         (handle_qxfer_auxv, handle_qxfer_libraries)
1367         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1368         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1369         (handle_query): Check if there's a thread selected instead of
1370         checking whether there's any thread in the thread list.
1371         (handle_qxfer_threads, handle_qxfer_btrace)
1372         (handle_qxfer_btrace_conf): Don't error out early if there's no
1373         thread in the thread list.
1374         (handle_v_cont, myresume): Don't set the current thread to the
1375         continue thread.
1376         (process_serial_event) <Hg handling>: Also set thread_id if the
1377         previous general thread is still alive.
1378         (process_serial_event) <g/G handling>: If setting the current
1379         thread to the general thread fails, error out.
1380         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1381         thread's lwp instead of the current thread's.
1382         * target.c (set_desired_thread): If the desired thread was not
1383         found, leave the current thread pointing to NULL.  Return an int
1384         (boolean) indicating success.
1385         * target.h (set_desired_thread): Change return type to int.
1386
1387 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1388
1389         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1390         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1391         #includes.
1392         (ps_get_thread_area): New function.
1393
1394 2015-08-19  Gary Benson  <gbenson@redhat.com>
1395
1396         * hostio.c (handle_pread): Do not attempt to read more data
1397         than hostio_reply_with_data can fit in a packet.
1398
1399 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1400
1401         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1402
1403 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1404
1405         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1406
1407 2015-08-06  Pedro Alves  <palves@redhat.com>
1408
1409         * tracepoint.c (expr_eval_result): Now an int.
1410
1411 2015-08-06  Pedro Alves  <palves@redhat.com>
1412
1413         * gdbthread.h (struct regcache): Forward declare.
1414         (struct thread_info) <regcache_data>: Now a struct regcache
1415         pointer.
1416         * inferiors.c (inferior_regcache_data)
1417         (set_inferior_regcache_data): Now work with struct regcache
1418         pointers.
1419         * inferiors.h (struct regcache): Forward declare.
1420         (inferior_regcache_data, set_inferior_regcache_data): Now work
1421         with struct regcache pointers.
1422         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1423         (free_register_cache_thread): Remove struct regcache pointer
1424         casts.
1425
1426 2015-08-06  Pedro Alves  <palves@redhat.com>
1427
1428         * server.c (captured_main): On error, print the exception message
1429         to stderr, and if run_once is set, throw a quit.
1430
1431 2015-08-06  Pedro Alves  <palves@redhat.com>
1432
1433         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1434         the current thread.
1435
1436 2015-08-06  Pedro Alves  <palves@redhat.com>
1437
1438         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1439         reading beyond the passed in buffer length.
1440
1441 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1442
1443         * tracepoint.c (symbol_list) <required>: Remove.
1444
1445 2015-08-06  Pedro Alves  <palves@redhat.com>
1446
1447         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1448         count if stopping and suspending threads.
1449         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1450         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1451         (linux_detach): Complete an ongoing step-over.
1452         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1453         throughout.
1454         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1455         (linux_wait_1): If passing a signal to the inferior after
1456         finishing a step-over, unsuspend and re-resume all lwps.  If we
1457         see a single-step event but the thread should be continuing, don't
1458         pass the trap to gdb.
1459         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1460         internal_error instead of gdb_assert.
1461         (enqueue_pending_signal): New function.
1462         (check_ptrace_stopped_lwp_gone): Add debug output.
1463         (start_step_over): Use internal_error instead of gdb_assert.
1464         (complete_ongoing_step_over): New function.
1465         (linux_resume_one_thread): Don't resume a suspended thread.
1466         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1467         it stepping.
1468
1469 2015-08-06  Pedro Alves  <palves@redhat.com>
1470
1471         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1472         (linux_thread_alive): Use lwp_is_marked_dead.
1473         (extended_event_reported): Delete.
1474         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1475         instead of extended_event_reported.
1476         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1477         as well.
1478         (lwp_is_marked_dead): New function.
1479         (lwp_running): Use lwp_is_marked_dead.
1480         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1481         comment.
1482
1483 2015-08-06  Pedro Alves  <palves@redhat.com>
1484
1485         * linux-low.c (linux_wait_1): Move fork event output out of the
1486         !report_to_gdb check.  Pass event_child->waitstatus to
1487         target_waitstatus_to_string instead of ourstatus.
1488
1489 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1490
1491         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1492         if current_thread is 32 bit.
1493
1494 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1495
1496         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1497         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1498         * server.c (extended_protocol): Remove "static".
1499         * server.h (extended_protocol): Declare it.
1500
1501 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1502
1503         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1504         both aarch64 and aarch32.
1505         (aarch64_set_pc): Likewise.
1506
1507 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1508
1509         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1510         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1511         arm-with-neon.xml to srv_xmlfiles.
1512         * linux-aarch64-low.c: Include linux-aarch32-low.h.
1513         (is_64bit_tdesc): New function.
1514         (aarch64_linux_read_description): New function.
1515         (aarch64_arch_setup): Call aarch64_linux_read_description.
1516         (regs_info): Rename to regs_info_aarch64.
1517         (aarch64_regs_info): Return right regs_info.
1518         (initialize_low_arch): Call initialize_low_arch_aarch32.
1519
1520 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1521
1522         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1523         * linux-aarch32-low.c: New file.
1524         * linux-aarch32-low.h: New file.
1525         * linux-arm-low.c (arm_fill_gregset): Move it to
1526         linux-aarch32-low.c.
1527         (arm_store_gregset): Likewise.
1528         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1529         (arm_store_vfpregset): Call arm_store_vfpregset_num.
1530         (arm_arch_setup): Check if PTRACE_GETREGSET works.
1531         (regs_info): Rename to regs_info_arm.
1532         (arm_regs_info): Return regs_info_aarch32 if
1533         have_ptrace_getregset is 1 and target description is
1534         arm_with_neon or arm_with_vfpv3.
1535         (initialize_low_arch): Don't call init_registers_arm_with_neon.
1536         Call initialize_low_arch_aarch32 instead.
1537
1538 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1539
1540         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1541         * linux-low.c: ... here.
1542         * linux-low.h (have_ptrace_getregset): Declare it.
1543
1544 2015-08-04  Pedro Alves  <palves@redhat.com>
1545
1546         * thread-db.c (struct thread_db): Use new typedefs.
1547         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1548         CHK calls.
1549         (disable_thread_event_reporting): Cast result of dlsym to
1550         destination function pointer type.
1551         (thread_db_mourn): Use td_ta_delete_ftype.
1552
1553 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1554
1555         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1556         arch variant.
1557         (CDX_BREAKPOINT): Define for R2.
1558         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1559         (the_low_target): Add comments.
1560
1561 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1562
1563         * linux-arm-low.c (arm_hwcap): Remove it.
1564         (arm_read_description): New local variable arm_hwcap.  Don't
1565         set arm_hwcap to zero.
1566
1567 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1568
1569         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1570         Use regcache->tdesc instead.
1571         (arm_store_wmmxregset): Likewise.
1572         (arm_fill_vfpregset): Likewise.
1573         (arm_store_vfpregset): Likewise.
1574
1575 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1576
1577         * linux-arm-low.c: Include arch/arm.h.
1578         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1579         (arm_store_gregset): Likewise.
1580
1581 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
1582
1583         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1584         ptrace's 4th parameter.
1585
1586 2015-07-27  Yao Qi  <yao.qi@linaro.org>
1587
1588         * configure.srv (case aarch64*-*-linux*): Don't set
1589         srv_linux_usrregs.
1590
1591 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
1592
1593         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1594         sys/ptrace.h.
1595         * linux-arm-low.c: Likewise.
1596         * linux-cris-low.c: Likewise.
1597         * linux-crisv32-low.c: Likewise.
1598         * linux-low.c: Likewise.
1599         * linux-m68k-low.c: Likewise.
1600         * linux-mips-low.c: Likewise.
1601         * linux-nios2-low.c: Likewise.
1602         * linux-s390-low.c: Likewise.
1603         * linux-sparc-low.c: Likewise.
1604         * linux-tic6x-low.c: Likewise.
1605         * linux-tile-low.c: Likewise.
1606         * linux-x86-low.c: Likewise.
1607
1608 2015-07-24  Pedro Alves  <palves@redhat.com>
1609
1610         * config.in: Regenerate.
1611         * configure: Regenerate.
1612
1613 2015-07-24  Pedro Alves  <palves@redhat.com>
1614
1615         * acinclude.m4: Include ../ptrace.m4.
1616         * configure.ac: Call GDB_AC_PTRACE.
1617         * config.in, configure: Regenerate.
1618
1619 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1620
1621         * linux-low.c (linux_create_inferior): Remove setting to
1622         proc->priv->new_inferior.
1623         (linux_attach): Likewise.
1624         (linux_low_filter_event): Likewise.
1625         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1626
1627 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1628
1629         * linux-low.c (linux_arch_setup): New function.
1630         (linux_low_filter_event): If proc->tdesc is NULL and
1631         proc->attached is true, call the_low_target.arch_setup.
1632         Otherwise, keep status pending, and return.
1633         (linux_resume_one_lwp_throw): Don't call get_pc if
1634         thread->while_stepping isn't NULL.  Don't call
1635         get_thread_regcache if proc->tdesc is NULL.
1636         (need_step_over_p): Return 0 if proc->tdesc is NULL.
1637         (linux_target_ops): Install arch_setup.
1638         * server.c (start_inferior): Call the_target->arch_setup.
1639         * target.h (struct target_ops) <arch_setup>: New field.
1640         (target_arch_setup): New marco.
1641         * lynx-low.c (lynx_target_ops): Update.
1642         * nto-low.c (nto_target_ops): Update.
1643         * spu-low.c (spu_target_ops): Update.
1644         * win32-low.c (win32_target_ops): Update.
1645
1646 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1647
1648         * linux-low.c (linux_add_process): Don't set
1649         proc->priv->new_inferior.
1650         (linux_create_inferior): Set proc->priv->new_inferior to 1.
1651         (linux_attach): Likewise.
1652
1653 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1654
1655         * server.c (start_inferior): Code refactor.
1656
1657 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1658
1659         * server.c (process_serial_event): Set general_thread.
1660
1661 2015-07-21  Yao Qi  <yao.qi@linaro.org>
1662
1663         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1664         aarch64_linux_get_debug_reg_capacity.
1665
1666 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1667
1668         * Makefile.in (aarch64-linux-hw-point.o): New rule.
1669         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1670         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1671         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1672         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1673         (AARCH64_HWP_ALIGNMENT): Likewise.
1674         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1675         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1676         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1677         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1678         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1679         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1680         (struct aarch64_debug_reg_state): Likewise.
1681         (struct arch_lwp_info): Likewise.
1682         (aarch64_align_watchpoint): Likewise.
1683         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1684         (aarch64_watchpoint_length): Likewise.
1685         (aarch64_point_encode_ctrl_reg): Likewise
1686         (aarch64_point_is_aligned): Likewise.
1687         (aarch64_align_watchpoint): Likewise.
1688         (aarch64_linux_set_debug_regs):
1689         (aarch64_dr_state_insert_one_point): Likewise.
1690         (aarch64_dr_state_remove_one_point): Likewise.
1691         (aarch64_handle_breakpoint): Likewise.
1692         (aarch64_handle_aligned_watchpoint): Likewise.
1693         (aarch64_handle_unaligned_watchpoint): Likewise.
1694         (aarch64_handle_watchpoint): Likewise.
1695
1696 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1697
1698         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1699         and don't aarch64_get_debug_reg_state.  All callers update.
1700         (aarch64_handle_aligned_watchpoint): Likewise.
1701         (aarch64_handle_unaligned_watchpoint): Likewise.
1702         (aarch64_handle_watchpoint): Likewise.
1703         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1704         (aarch64_remove_point): Likewise.
1705
1706 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1707
1708         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1709         debug_printf.
1710         (aarch64_handle_unaligned_watchpoint): Likewise.
1711
1712 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1713
1714         Revert the previous 3 commits:
1715         Move gdb_regex* to common/
1716         Move linux_find_memory_regions_full & co.
1717         gdbserver build-id attribute generator
1718
1719 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1720             Jan Kratochvil  <jan.kratochvil@redhat.com>
1721
1722         gdbserver build-id attribute generator.
1723         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1724         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1725         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1726         (find_phdr): New.
1727         (get_dynamic): Use find_pdhr to traverse program headers.
1728         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1729         (compare_mapping_entry_range, struct find_memory_region_callback_data)
1730         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1731         (get_hex_build_id): New.
1732         (linux_qxfer_libraries_svr4): Add optional build-id attribute
1733         to reply XML document.
1734
1735 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1736             Jan Kratochvil  <jan.kratochvil@redhat.com>
1737
1738         * target.c: Include target/target-utils.h and fcntl.h.
1739         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1740         (target_fileio_read_stralloc): New functions.
1741
1742 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1743
1744         * Makefile.in (OBS): Add gdb_regex.o.
1745         (gdb_regex.o): New.
1746         * config.in: Rebuilt.
1747         * configure: Rebuilt.
1748
1749 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1750             Jan Kratochvil  <jan.kratochvil@redhat.com>
1751
1752         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1753         * Makefile.in (OBS): Add target-utils.o.
1754         (linux-maps.o, target-utils.o): New.
1755         * configure.srv (srv_linux_obj): Add linux-maps.o.
1756
1757 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
1758
1759         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1760         function, return 1.
1761         (the_low_target): Install it.
1762
1763 2015-07-14  Pedro Alves  <palves@redhat.com>
1764
1765         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1766         Instead, ignore ECHILD, and throw an error for other errnos.
1767
1768 2015-07-10  Pedro Alves  <palves@redhat.com>
1769
1770         * event-loop.c (struct callback_event) <data>: Change type to
1771         gdb_client_data instance instead of gdb_client_data pointer.
1772         (append_callback_event): Adjust.
1773
1774 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
1775
1776         * linux-aarch64-low.c: Add comments for each linux_target_ops
1777         method.  Remove comments already covered in target_ops and
1778         linux_target_ops definitions.
1779         (the_low_target): Add comments for each unimplemented method.
1780
1781 2015-07-09  Yao Qi  <yao.qi@linaro.org>
1782
1783         * linux-aarch64-low.c (aarch64_regmap): Remove.
1784         (aarch64_usrregs_info): Remove.
1785         (regs_info): Set field usrregs to NULL.
1786
1787 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
1788
1789         * linux-low.c: Include "rsp-low.h"
1790         (linux_low_encode_pt_config, linux_low_encode_raw): New.
1791         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1792         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1793         (handle_btrace_enable_pt): New.
1794         (handle_btrace_general_set): Support "pt".
1795         (handle_btrace_conf_general_set): Support "pt:size".
1796
1797 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1798
1799         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1800         Z_PACKET_SW_BP.
1801
1802 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1803
1804         * linux-aarch64-low.c: Remove comment about endianness.
1805         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
1806         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
1807         memcmp.
1808
1809 2015-06-24  Gary Benson  <gbenson@redhat.com>
1810
1811         * linux-i386-ipa.c (stdint.h): Do not include.
1812         * lynx-i386-low.c (stdint.h): Likewise.
1813         * lynx-ppc-low.c (stdint.h): Likewise.
1814         * mem-break.c (stdint.h): Likewise.
1815         * thread-db.c (stdint.h): Likewise.
1816         * tracepoint.c (stdint.h): Likewise.
1817         * win32-low.c (stdint.h): Likewise.
1818
1819 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
1820
1821         * server.c (write_qxfer_response): Update call to
1822         remote_escape_output.
1823
1824 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
1825             Jan Kratochvil  <jan.kratochvil@redhat.com>
1826
1827         Merge multiple hex conversions.
1828         * gdbreplay.c (tohex): Rename to 'fromhex'.
1829         (logchar): Use fromhex.
1830
1831 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1832
1833         * server.c (handle_qxfer_libraries): Set `version' attribute for
1834         <library-list>.
1835
1836 2015-06-10  Gary Benson  <gbenson@redhat.com>
1837
1838         * target.h (struct target_ops) <multifs_open>: New field.
1839         <multifs_unlink>: Likewise.
1840         <multifs_readlink>: Likewise.
1841         * linux-low.c (nat/linux-namespaces.h): New include.
1842         (linux_target_ops): Initialize the_target->multifs_open,
1843         the_target->multifs_unlink and the_target->multifs_readlink.
1844         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1845         * hostio.c (hostio_fs_pid): New static variable.
1846         (hostio_handle_new_gdb_connection): New function.
1847         (handle_setfs): Likewise.
1848         (handle_open): Use the_target->multifs_open as appropriate.
1849         (handle_unlink): Use the_target->multifs_unlink as appropriate.
1850         (handle_readlink): Use the_target->multifs_readlink as
1851         appropriate.
1852         (handle_vFile): Handle vFile:setfs packets.
1853         * server.c (handle_query): Call hostio_handle_new_gdb_connection
1854         after target_handle_new_gdb_connection.
1855
1856 2015-06-10  Gary Benson  <gbenson@redhat.com>
1857
1858         * configure.ac (AC_CHECK_FUNCS): Add setns.
1859         * config.in: Regenerate.
1860         * configure: Likewise.
1861         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1862         (linux-namespaces.o): New rule.
1863         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1864
1865 2015-06-09  Gary Benson <gbenson@redhat.com>
1866
1867         * hostio.c (handle_open): Process mode argument with
1868         fileio_to_host_mode.
1869
1870 2015-06-01  Yao Qi  <yao.qi@linaro.org>
1871
1872         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1873         * linux-x86-low.c: Likewise.
1874
1875 2015-05-28  Don Breazeal  <donb@codesourcery.com>
1876
1877         * linux-low.c (handle_extended_wait): Initialize
1878         thread_info.last_resume_kind for new fork children.
1879
1880 2015-05-15  Pedro Alves  <palves@redhat.com>
1881
1882         * target.h (target_handle_new_gdb_connection): Rewrite using if
1883         wrapped in do/while.
1884
1885 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
1886
1887         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1888         * configure, config.in: Regenerate.
1889         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1890         Declare typedef.
1891
1892 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1893
1894         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1895         PTRACE_EVENT_VFORK_DONE.
1896         (linux_low_ptrace_options, extended_event_reported): Add vfork
1897         events.
1898         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1899         and "vforkdone" for RSP 'T' Stop Reply Packet.
1900         * server.h (report_vfork_events): Declare
1901         global variable.
1902
1903 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1904
1905         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1906         (the_low_target) <new_fork>: Initialize new member.
1907         * linux-arm-low.c (arm_new_fork): New function.
1908         (the_low_target) <new_fork>: Initialize new member.
1909         * linux-low.c (handle_extended_wait): Call new target function
1910         new_fork.
1911         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1912         * linux-mips-low.c (mips_add_watchpoint): New function
1913         extracted from mips_insert_point.
1914         (the_low_target) <new_fork>: Initialize new member.
1915         (mips_linux_new_fork): New function.
1916         (mips_insert_point): Call mips_add_watchpoint.
1917         * linux-x86-low.c (x86_linux_new_fork): New function.
1918         (the_low_target) <new_fork>: Initialize new member.
1919
1920 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1921
1922         * linux-low.c (handle_extended_wait): Implement return value,
1923         rename argument 'event_child' to 'event_lwp', handle
1924         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1925         (linux_low_ptrace_options): New function.
1926         (linux_low_filter_event): Call linux_low_ptrace_options,
1927         use different argument fo linux_enable_event_reporting,
1928         use return value from handle_extended_wait.
1929         (extended_event_reported): New function.
1930         (linux_wait_1): Call extended_event_reported and set
1931         status to report fork events.
1932         (linux_write_memory): Add pid to debug message.
1933         (reset_lwp_ptrace_options_callback): New function.
1934         (linux_handle_new_gdb_connection): New function.
1935         (linux_target_ops): Initialize new structure member.
1936         * linux-low.h (struct lwp_info) <waitstatus>: New member.
1937         * lynx-low.c: Initialize new structure member.
1938         * remote-utils.c (prepare_resume_reply): Implement stop reason
1939         "fork" for "T" stop message.
1940         * server.c (handle_query): Call handle_new_gdb_connection.
1941         * server.h (report_fork_events): Declare global flag.
1942         * target.h (struct target_ops) <handle_new_gdb_connection>:
1943         New member.
1944         (target_handle_new_gdb_connection): New macro.
1945         * win32-low.c: Initialize new structure member.
1946
1947 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1948
1949         * mem-break.c (APPEND_TO_LIST): Define macro.
1950         (clone_agent_expr): New function.
1951         (clone_one_breakpoint): New function.
1952         (clone_all_breakpoints): New function.
1953         * mem-break.h: Declare new functions.
1954
1955 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1956
1957         * linux-low.c (linux_supports_fork_events): New function.
1958         (linux_supports_vfork_events): New function.
1959         (linux_target_ops): Initialize new structure members.
1960         (initialize_low): Call linux_check_ptrace_features.
1961         * lynx-low.c (lynx_target_ops): Initialize new structure
1962         members.
1963         * server.c (report_fork_events, report_vfork_events):
1964         New global flags.
1965         (handle_query): Add new features to qSupported packet and
1966         response.
1967         (captured_main): Initialize new global variables.
1968         * target.h (struct target_ops) <supports_fork_events>:
1969         New member.
1970         <supports_vfork_events>: New member.
1971         (target_supports_fork_events): New macro.
1972         (target_supports_vfork_events): New macro.
1973         * win32-low.c (win32_target_ops): Initialize new structure
1974         members.
1975
1976 2015-05-12  Gary Benson <gbenson@redhat.com>
1977
1978         * server.c (handle_qxfer_exec_file): Use current process
1979         if annex is empty.
1980
1981 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
1982
1983         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
1984         Remove HAVE_PTRACE_GETREGS conditionals.
1985         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1986         instead of PTRACE_GETREGS and PTRACE_SETREGS.
1987
1988 2015-05-08  Yao Qi  <yao.qi@linaro.org>
1989
1990         * linux-low.c (linux_supports_conditional_breakpoints): New
1991         function.
1992         (linux_target_ops): Install new target method.
1993         * lynx-low.c (lynx_target_ops): Install NULL hook for
1994         supports_conditional_breakpoints.
1995         * nto-low.c (nto_target_ops): Likewise.
1996         * spu-low.c (spu_target_ops): Likewise.
1997         * win32-low.c (win32_target_ops): Likewise.
1998         * server.c (handle_query): Check
1999         target_supports_conditional_breakpoints.
2000         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2001         New field.
2002         (target_supports_conditional_breakpoints): New macro.
2003
2004 2015-05-06  Pedro Alves  <palves@redhat.com>
2005
2006         PR server/18081
2007         * server.c (start_inferior): If the process exits, mourn it.
2008
2009 2015-04-21  Gary Benson <gbenson@redhat.com>
2010
2011         * hostio.c (fileio_open_flags_to_host): Factored out to
2012         fileio_to_host_openflags in common/fileio.c.  Single use
2013         updated.
2014
2015 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2016
2017         * linux-xtensa-low.c (xtensa_fill_gregset)
2018         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2019         XCHAL_HAVE_LOOP.
2020
2021 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2022
2023         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2024         (regs_info): Replace usrregs pointer with NULL.
2025
2026 2015-04-17  Gary Benson  <gbenson@redhat.com>
2027
2028         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2029         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2030         * server.c (handle_qxfer_exec_file): New function.
2031         (qxfer_packets): Add exec-file entry.
2032         (handle_query): Report qXfer:exec-file:read as supported packet.
2033
2034 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2035
2036         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2037
2038 2015-04-09  Gary Benson <gbenson@redhat.com>
2039
2040         * hostio-errno.c (errno_to_fileio_error): Remove function.
2041         Update caller to use remote_fileio_to_fio_error.
2042
2043 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2044
2045         * linux-low.c (linux_insert_point): Call
2046         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2047         (linux_remove_point): Call remove_memory_breakpoint if type is
2048         raw_bkpt_type_sw.
2049         * linux-x86-low.c (x86_insert_point): Don't call
2050         insert_memory_breakpoint.
2051         (x86_remove_point): Don't call remove_memory_breakpoint.
2052
2053 2015-04-01  Pedro Alves  <palves@redhat.com>
2054             Cleber Rosa  <crosa@redhat.com>
2055
2056         * server.c (gdbserver_usage): Reorganize and extend the usage
2057         message.
2058
2059 2015-03-24  Pedro Alves  <palves@redhat.com>
2060
2061         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2062         output.  Also dump TRAP_TRACE.
2063         (linux_low_filter_event): In debug output, distinguish a
2064         resume_stop SIGSTOP from a delayed SIGSTOP.
2065
2066 2015-03-24  Gary Benson  <gbenson@redhat.com>
2067
2068         * linux-x86-low.c (x86_linux_new_thread): Moved to
2069         nat/x86-linux.c.
2070         (x86_linux_prepare_to_resume): Likewise.
2071
2072 2015-03-24  Gary Benson  <gbenson@redhat.com>
2073
2074         * Makefile.in (x86-linux-dregs.o): New rule.
2075         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2076         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2077         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2078         (x86_linux_dr_get): Likewise.
2079         (x86_linux_dr_set): Likewise.
2080         (update_debug_registers_callback): Likewise.
2081         (x86_linux_dr_set_addr): Likewise.
2082         (x86_linux_dr_get_addr): Likewise.
2083         (x86_linux_dr_set_control): Likewise.
2084         (x86_linux_dr_get_control): Likewise.
2085         (x86_linux_dr_get_status): Likewise.
2086         (x86_linux_update_debug_registers): Likewise.
2087
2088 2015-03-24  Gary Benson  <gbenson@redhat.com>
2089
2090         * linux-x86-low.c (x86_linux_update_debug_registers):
2091         New function, factored out from...
2092         (x86_linux_prepare_to_resume): ...this.
2093
2094 2015-03-24  Gary Benson  <gbenson@redhat.com>
2095
2096         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2097         (x86_linux_dr_set): Likewise.
2098         (update_debug_registers_callback): Likewise.
2099         (x86_linux_dr_set_addr): Likewise.
2100         (x86_linux_dr_get_addr): Likewise.
2101         (x86_linux_dr_set_control): Likewise.
2102         (x86_linux_dr_get_control): Likewise.
2103         (x86_linux_dr_get_status): Likewise.
2104         (x86_linux_prepare_to_resume): Likewise.
2105
2106 2015-03-24  Gary Benson  <gbenson@redhat.com>
2107
2108         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2109         Use perror_with_name.  Pass string through gettext.
2110         (x86_linux_dr_set): Likewise.
2111
2112 2015-03-24  Gary Benson  <gbenson@redhat.com>
2113
2114         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2115         (x86_linux_dr_set_addr): ...this.
2116         (x86_dr_low_get_addr): Rename to...
2117         (x86_linux_dr_get_addr): ...this.
2118         (x86_dr_low_set_control): Rename to...
2119         (x86_linux_dr_set_control): ...this.
2120         (x86_dr_low_get_control): Rename to...
2121         (x86_linux_dr_get_control): ...this.
2122         (x86_dr_low_get_status): Rename to...
2123         (x86_linux_dr_get_status): ...this.
2124         (x86_dr_low): Update with new function names.
2125
2126 2015-03-24  Gary Benson  <gbenson@redhat.com>
2127
2128         * Makefile.in (x86-linux.o): New rule.
2129         * configure.srv: Add x86-linux.o to relevant targets.
2130         * linux-low.c (lwp_set_arch_private_info): New function.
2131         (lwp_arch_private_info): Likewise.
2132         * linux-x86-low.c: Include nat/x86-linux.h.
2133         (arch_lwp_info): Removed structure.
2134         (update_debug_registers_callback):
2135         Use lwp_set_debug_registers_changed.
2136         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2137         and lwp_set_debug_registers_changed.
2138         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2139
2140 2015-03-24  Gary Benson  <gbenson@redhat.com>
2141
2142         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2143         * linux-arm-low.c (arm_new_thread): Likewise.
2144         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2145         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2146         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2147         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2148
2149 2015-03-24  Gary Benson  <gbenson@redhat.com>
2150
2151         * linux-low.c (ptid_of_lwp): New function.
2152         (lwp_is_stopped): Likewise.
2153         (lwp_stop_reason): Likewise.
2154         * linux-x86-low.c (update_debug_registers_callback):
2155         Use lwp_is_stopped.
2156         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2157         lwp_stop_reason.
2158
2159 2015-03-24  Gary Benson  <gbenson@redhat.com>
2160
2161         * linux-low.h (linux_stop_lwp): Remove declaration.
2162
2163 2015-03-24  Gary Benson  <gbenson@redhat.com>
2164
2165         * linux-low.h: Include nat/linux-nat.h.
2166         * linux-low.c (iterate_over_lwps_args): New structure.
2167         (iterate_over_lwps_filter): New function.
2168         (iterate_over_lwps): Likewise.
2169         * linux-x86-low.c (update_debug_registers_callback):
2170         Update signature to what iterate_over_lwps expects.
2171         Remove PID check that iterate_over_lwps now performs.
2172         (x86_dr_low_set_addr): Use iterate_over_lwps.
2173         (x86_dr_low_set_control): Likewise.
2174
2175 2015-03-24  Gary Benson  <gbenson@redhat.com>
2176
2177         * linux-x86-low.c (x86_debug_reg_state): New function.
2178         (x86_linux_prepare_to_resume): Use the above.
2179
2180 2015-03-24  Gary Benson  <gbenson@redhat.com>
2181
2182         * linux-low.c (current_lwp_ptid): New function.
2183         * linux-x86-low.c: Include nat/linux-nat.h.
2184         (x86_dr_low_get_addr): Use current_lwp_ptid.
2185         (x86_dr_low_get_control): Likewise.
2186         (x86_dr_low_get_status): Likewise.
2187
2188 2015-03-20  Pedro Alves  <palves@redhat.com>
2189
2190         * tracepoint.c (cmd_qtstatus): Make "str" const.
2191
2192 2015-03-20  Pedro Alves  <palves@redhat.com>
2193
2194         * server.c (handle_general_set): Make "req_str" const.
2195
2196 2015-03-19  Pedro Alves  <palves@redhat.com>
2197
2198         * linux-low.c (linux_resume_one_lwp): Rename to ...
2199         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2200         instead call perror_with_name.
2201         (check_ptrace_stopped_lwp_gone): New function.
2202         (linux_resume_one_lwp): Reimplement as wrapper around
2203         linux_resume_one_lwp_throw that swallows errors if the LWP is
2204         gone.
2205
2206 2015-03-19  Pedro Alves  <palves@redhat.com>
2207
2208         * linux-low.c (count_events_callback, select_event_lwp_callback):
2209         No longer check whether the thread has resume_stop as last resume
2210         kind.
2211
2212 2015-03-19 Pedro Alves  <palves@redhat.com>
2213
2214         * linux-low.c (count_events_callback, select_event_lwp_callback):
2215         Use the lwp's status_pending_p field, not the thread's.
2216
2217 2015-03-19  Pedro Alves  <palves@redhat.com>
2218
2219         * linux-low.c (select_event_lwp_callback): Update comments to
2220         no longer mention SIGTRAP.
2221
2222 2015-03-18  Gary Benson  <gbenson@redhat.com>
2223
2224         * server.c (handle_query): Do not report vFile:fstat as supported.
2225
2226 2015-03-11  Gary Benson  <gbenson@redhat.com>
2227
2228         * hostio.c (sys/types.h): New include.
2229         (sys/stat.h): Likewise.
2230         (common-remote-fileio.h): Likewise.
2231         (handle_fstat): New function.
2232         (handle_vFile): Handle vFile:fstat packets.
2233
2234 2015-03-11  Gary Benson  <gbenson@redhat.com>
2235
2236         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2237         struct stat.st_blocks and struct stat.st_blksize.
2238         * configure: Regenerate.
2239         * config.in: Likewise.
2240         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2241         (OBS): Add common-remote-fileio.o.
2242         (common-remote-fileio.o): New rule.
2243
2244 2015-03-09  Pedro Alves  <palves@redhat.com>
2245
2246         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2247         'struct sockaddr' pointer in 'accept' call.
2248
2249 2015-03-09  Pedro Alves  <palves@redhat.com>
2250
2251         Revert:
2252         2015-03-07  Pedro Alves  <palves@redhat.com>
2253         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2254         or <winsock2.h> here.  Instead include "gdb_socket.h".
2255         (remote_open): Use union gdb_sockaddr_u.
2256         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2257         or <winsock2.h> here.  Instead include "gdb_socket.h".
2258         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2259         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2260         or <sys/un.h>.
2261         (init_named_socket, gdb_agent_helper_thread): Use union
2262         gdb_sockaddr_u.
2263
2264 2015-03-07  Pedro Alves  <palves@redhat.com>
2265
2266         * configure.ac (build_warnings): Move
2267         -Wdeclaration-after-statement to the C-specific set.
2268         * configure: Regenerate.
2269
2270 2015-03-07  Pedro Alves  <palves@redhat.com>
2271
2272         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2273         or <winsock2.h> here.  Instead include "gdb_socket.h".
2274         (remote_open): Use union gdb_sockaddr_u.
2275         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2276         or <winsock2.h> here.  Instead include "gdb_socket.h".
2277         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2278         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2279         or <sys/un.h>.
2280         (init_named_socket, gdb_agent_helper_thread): Use union
2281         gdb_sockaddr_u.
2282
2283 2015-03-07  Pedro Alves  <palves@redhat.com>
2284
2285         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2286         instead.
2287
2288 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2289
2290         * linux-aarch64-low.c (aarch64_insert_point): Use
2291         show_debug_regs as a boolean.
2292         (aarch64_remove_point): Likewise.
2293
2294 2015-03-05  Pedro Alves  <palves@redhat.com>
2295
2296         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2297         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2298         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2299         * nto-low.c (nto_target_ops): Likewise.
2300         * spu-low.c (spu_target_ops): Likewise.
2301         * win32-low.c (win32_target_ops): Likewise.
2302
2303 2015-03-04  Pedro Alves  <palves@redhat.com>
2304
2305         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2306         Decide whether a breakpoint triggered based on the SIGTRAP's
2307         siginfo.si_code.
2308         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2309         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2310         (linux_low_filter_event): Check for breakpoints before checking
2311         watchpoints.
2312         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2313         siginfo.si_code.
2314         (linux_stopped_by_sw_breakpoint)
2315         (linux_supports_stopped_by_sw_breakpoint)
2316         (linux_stopped_by_hw_breakpoint)
2317         (linux_supports_stopped_by_hw_breakpoint): New functions.
2318         (linux_target_ops): Install new target methods.
2319
2320 2015-03-04  Pedro Alves  <palves@redhat.com>
2321
2322         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2323         * server.c (swbreak_feature, hwbreak_feature): New globals.
2324         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2325         (captured_main): Clear swbreak_feature and hwbreak_feature.
2326         * server.h (swbreak_feature, hwbreak_feature): Declare.
2327         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2328         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2329         supports_stopped_by_hw_breakpoint>: New fields.
2330         (target_supports_stopped_by_sw_breakpoint)
2331         (target_stopped_by_sw_breakpoint)
2332         (target_supports_stopped_by_hw_breakpoint)
2333         (target_stopped_by_hw_breakpoint): Declare.
2334
2335 2015-03-04  Pedro Alves  <palves@redhat.com>
2336
2337         enum lwp_stop_reason -> enum target_stop_reason
2338         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2339         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2340         (linux_wait_1, stuck_in_jump_pad_callback)
2341         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2342         (linux_stopped_by_watchpoint):
2343         * linux-low.h (enum lwp_stop_reason): Delete.
2344         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2345         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2346
2347 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2348
2349         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2350
2351 2015-03-03  Gary Benson  <gbenson@redhat.com>
2352
2353         * hostio.c (handle_vFile): Fix prefix lengths.
2354
2355 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2356
2357         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2358         ptr_bits.
2359
2360 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2361
2362         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2363         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2364         (clean): Add "rm -f" for above C files.
2365         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2366         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2367         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2368         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2369         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2370         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2371         (init_registers_s390x_vx_linux64)
2372         (init_registers_s390x_tevx_linux64)
2373         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2374         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2375         declarations.
2376         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2377         (s390_store_vxrs_high): New functions.
2378         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2379         NT_S390_VXRS_HIGH.
2380         (s390_arch_setup): Add logic for selecting one of the new target
2381         descriptions.  Activate the new vector regsets if applicable.
2382         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2383         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2384         and init_registers_s390x_tevx_linux64.
2385
2386 2015-03-01  Pedro Alves  <palves@redhat.com>
2387
2388         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2389         parameter.
2390
2391 2015-02-27  Pedro Alves  <palves@redhat.com>
2392
2393         * linux-x86-low.c (u_debugreg_offset): New function.
2394         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2395
2396 2015-02-27  Pedro Alves  <palves@redhat.com>
2397
2398         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2399         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2400         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2401         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2402         (ps_lsetfpregs, ps_getpid)
2403         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2404         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2405         (ps_lsetxregs, ps_plog): Declare.
2406
2407 2015-02-27  Pedro Alves  <palves@redhat.com>
2408
2409         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2410         IP_AGENT_EXPORT_FUNC.
2411         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2412         IP_AGENT_EXPORT_FUNC.
2413         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2414         (IP_AGENT_EXPORT): Delete.
2415         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2416         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2417         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2418         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2419         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2420         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2421         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2422         (traceframe_read_count, traceframe_write_count)
2423         (traceframes_created, trace_state_variables, get_raw_reg)
2424         (get_trace_state_variable_value, set_trace_state_variable_value)
2425         (ust_loaded, helper_thread_id, cmd_buf): Use
2426         IPA_SYM_EXPORTED_NAME.
2427         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2428         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2429         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2430         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2431         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2432         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2433         EXTERN_C_PUSH/EXTERN_C_POP.
2434         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2435         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2436         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2437         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2438         (traceframe_write_count, traceframe_read_count)
2439         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2440         (about_to_request_buffer_space, get_trace_state_variable_value)
2441         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2442         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2443         EXTERN_C_PUSH/EXTERN_C_POP.
2444         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2445         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2446         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2447         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2448         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2449         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2450         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2451         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2452         Define.
2453         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2454         (IP_AGENT_EXPORT_VAR_DECL): Define.
2455         (tracing): Declare.
2456         (gdb_agent_get_raw_reg): Declare.
2457
2458 2015-02-27  Tom Tromey  <tromey@redhat.com>
2459             Pedro Alves  <palves@redhat.com>
2460
2461         Rename symbols whose names are reserved C++ keywords throughout.
2462
2463 2015-02-27  Pedro Alves  <palves@redhat.com>
2464
2465         * Makefile.in (COMPILER): New, get it from autoconf.
2466         (CXX): Get from autoconf instead.
2467         (COMPILE.pre): Use COMPILER.
2468         (CC-LD): Rename to ...
2469         (CC_LD): ... this.  Use COMPILER.
2470         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2471         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2472         * acinclude.m4: Include build-with-cxx.m4.
2473         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2474         Disable -Werror by default if building in C++ mode.
2475         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2476         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2477         the C++ compiler.  Save/restore CXXFLAGS too.
2478         * configure: Regenerate.
2479
2480 2015-02-27  Pedro Alves  <palves@redhat.com>
2481
2482         * acinclude.m4: Include libiberty.m4.
2483         * configure.ac: Call libiberty_INIT.
2484         * config.in, configure: Regenerate.
2485
2486 2015-02-26  Pedro Alves  <palves@redhat.com>
2487
2488         * linux-low.c (linux_wait_1): When incrementing the PC past a
2489         program breakpoint always use the_low_target.breakpoint_len as
2490         increment, rather than the maximum between that and
2491         the_low_target.decr_pc_after_break.
2492
2493 2015-02-23  Pedro Alves  <palves@redhat.com>
2494
2495         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2496         thread was doing a step-over; always adjust the PC if
2497         we stepped over a permanent breakpoint.
2498         (linux_wait_1): If we stepped over breakpoint that was on top of a
2499         permanent breakpoint, manually advance the PC past it.
2500
2501 2015-02-23  Pedro Alves  <palves@redhat.com>
2502
2503         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2504         modes.
2505         (x86_fill_gregset, x86_store_gregset): Use it when handling
2506         $orig_eax.
2507
2508 2015-02-20  Pedro Alves  <palves@redhat.com>
2509
2510         * thread-db.c: Include "nat/linux-procfs.h".
2511         (thread_db_init): Skip listing new threads if the kernel supports
2512         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2513
2514 2015-02-20  Pedro Alves  <palves@redhat.com>
2515
2516         * linux-low.c (status_pending_p_callback): Use ptid_match.
2517
2518 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2519
2520         PR breakpoints/16812
2521         * linux-low.c (wstatus_maybe_breakpoint): Remove.
2522         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2523         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2524
2525 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
2526
2527         PR breakpoints/15956
2528         * tracepoint.c (cmd_qtinit): Add check for current_thread.
2529
2530 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2531
2532         * linux-low.c (linux_low_btrace_conf): Print size.
2533         * server.c (handle_btrace_conf_general_set): New.
2534         (hanle_general_set): Call handle_btrace_conf_general_set.
2535         (handle_query): Report Qbtrace-conf:bts:size as supported.
2536
2537 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2538
2539         * linux-low.c (linux_low_enable_btrace): Update parameters.
2540         (linux_low_btrace_conf): New.
2541         (linux_target_ops)<to_btrace_conf>: Initialize.
2542         * server.c (current_btrace_conf): New.
2543         (handle_btrace_enable): Rename to ...
2544         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
2545         to target_enable_btrace.  Update comment.  Update users.
2546         (handle_qxfer_btrace_conf): New.
2547         (qxfer_packets): Add btrace-conf entry.
2548         (handle_query): Report qXfer:btrace-conf:read as supported packet.
2549         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2550         (target_ops)<read_btrace_conf>: New.
2551         (target_enable_btrace): Update parameters.
2552         (target_read_btrace_conf): New.
2553
2554 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2555
2556         * server.c (handle_btrace_general_set): Remove call to
2557         target_supports_btrace.
2558         (supported_btrace_packets): New.
2559         (handle_query): Call supported_btrace_packets.
2560         * target.h: include btrace-common.h.
2561         (btrace_target_info): Removed.
2562         (supports_btrace, target_supports_btrace): Update parameters.
2563
2564 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2565
2566         * Makefile.in (SFILES): Add common/btrace-common.c.
2567         (OBS): Add common/btrace-common.o.
2568         (btrace-common.o): Add build rules.
2569         * linux-low: Include btrace-common.h.
2570         (linux_low_read_btrace): Use struct btrace_data.  Call
2571         btrace_data_init and btrace_data_fini.
2572
2573 2015-02-06  Pedro Alves  <palves@redhat.com>
2574
2575         * thread-db.c (find_new_threads_callback): Add debug output.
2576
2577 2015-02-04  Pedro Alves  <palves@redhat.com>
2578
2579         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2580         (resume_stopped_resumed_lwps): New function.
2581         (linux_wait_for_event_filtered): Use it.
2582
2583 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2584
2585         * Makefile.in (SFILES): Add linux-personality.c.
2586         (linux-personality.o): New rule.
2587         * configure.srv (srv_linux_obj): Add linux-personality.o to the
2588         list of objects to be built.
2589         * linux-low.c: Include nat/linux-personality.h.
2590         (linux_create_inferior): Remove code to disable address space
2591         randomization (moved to ../nat/linux-personality.c).  Create
2592         cleanup to disable address space randomization.
2593
2594 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2595
2596         * Makefile.in (posix-strerror.o): New rule.
2597         (mingw-strerror.o): Likewise.
2598         * configure: Regenerated.
2599         * configure.ac: Source file ../common/common.host.  Initialize new
2600         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
2601
2602 2015-01-14  Yao Qi  <yao@codesourcery.com>
2603
2604         * Makefile.in (SFILES): Add nat/ppc-linux.c.
2605         (ppc-linux.o): New rule.
2606         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2607         * configure.ac: AC_CHECK_FUNCS(getauxval).
2608         * config.in: Re-generated.
2609         * configure: Re-generated.
2610         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2611         ppc64_64bit_inferior_p
2612
2613 2015-01-14  Yao Qi  <yao@codesourcery.com>
2614
2615         * linux-ppc-low.c: Include "nat/ppc-linux.h".
2616          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2617         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
2618         (PT_ORIG_R3, PT_TRAP): Likewise.
2619         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2620         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2621         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2622
2623 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
2624
2625         * i387-fp.c (i387_cache_to_xsave): In look over
2626         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2627         zmmh_low_space field by use of zmmh_high_space.
2628
2629 2015-01-09  Pedro Alves  <palves@redhat.com>
2630
2631         * linux-low.c (step_over_bkpt): Move higher up in the file.
2632         (handle_extended_wait): Don't store the stop_pc here.
2633         (get_stop_pc): Adjust comments and rename to ...
2634         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
2635         stopped for a software breakpoint or hardware breakpoint.
2636         (thread_still_has_status_pending_p): New function.
2637         (status_pending_p_callback): Use
2638         thread_still_has_status_pending_p.  If the event is no longer
2639         interesting, resume the LWP.
2640         (handle_tracepoints): Add assert.
2641         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2642         (wstatus_maybe_breakpoint): New function.
2643         (cancel_breakpoint): Delete function.
2644         (check_stopped_by_watchpoint): New function, factored out from
2645         linux_low_filter_event.
2646         (lp_status_maybe_breakpoint): Delete function.
2647         (linux_low_filter_event): Remove filter_ptid argument.
2648         Leave thread group exits pending here.  Store the LWP's stop PC.
2649         Always leave events pending.
2650         (linux_wait_for_event_filtered): Pull all events out of the
2651         kernel, and leave them all pending.
2652         (count_events_callback, select_event_lwp_callback): Consider all
2653         events.
2654         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2655         (select_event_lwp): Only give preference to the stepping LWP in
2656         all-stop mode.  Adjust comments.
2657         (ignore_event): New function.
2658         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
2659         references to cancel_breakpoints.  Adjust to renames.  Also give
2660         equal priority to all LWPs that have had events in non-stop mode.
2661         If reporting a software breakpoint event, unadjust the LWP's PC.
2662         (linux_wait): If linux_wait_1 returned an ignored event, retry.
2663         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2664         Adjust.
2665         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
2666         (resume_status_pending_p): Use thread_still_has_status_pending_p.
2667         (linux_stopped_by_watchpoint): Adjust.
2668         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2669         * linux-low.h (enum lwp_stop_reason): New.
2670         (struct lwp_info) <stop_pc>: Adjust comment.
2671         <stopped_by_watchpoint>: Delete field.
2672         <stop_reason>: New field.
2673         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2674         * mem-break.c (software_breakpoint_inserted_here)
2675         (hardware_breakpoint_inserted_here): New function.
2676         * mem-break.h (software_breakpoint_inserted_here)
2677         (hardware_breakpoint_inserted_here): Declare.
2678         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2679         (cancel_breakpoints): Delete.
2680         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2681         (upload_fast_traceframes): Remove references to
2682         cancel_breakpoints.
2683
2684 2015-01-09  Pedro Alves  <palves@redhat.com>
2685
2686         * thread-db.c (find_new_threads_callback): Ignore thread if the
2687         kernel thread ID is -1.
2688
2689 2015-01-09  Pedro Alves  <palves@redhat.com>
2690
2691         * linux-low.c (linux_attach_fail_reason_string): Move to
2692         nat/linux-ptrace.c, and rename.
2693         (linux_attach_lwp): Update comment.
2694         (attach_proc_task_lwp_callback): New function.
2695         (linux_attach): Adjust to rename and use
2696         linux_proc_attach_tgid_threads.
2697         (linux_attach_fail_reason_string): Delete declaration.
2698
2699 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
2700
2701         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2702         * server.c (gdbserver_version): Likewise.
2703
2704 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2705
2706         * remote-utils.c: Include ctype.h.
2707         (input_interrupt): Explicitly handle the case when the char
2708         received is the NUL byte.  Improve the printing of non-ASCII
2709         characters.
2710
2711 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
2712
2713         * linux-low.c (linux_low_filter_event): Update call to
2714         linux_enable_event_reporting following the addition of
2715         a new parameter to that function.
2716
2717 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
2718
2719         PR server/17457
2720         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2721         (AARCH64_FPCR_REGNO): Likewise.
2722         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2723         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2724         (aarch64_store_fpregset): Likewise.
2725
2726 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
2727
2728         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2729         Remove FIXME comment about assumption about N.
2730
2731 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
2732
2733         * configure.ac: If large-file support is disabled in GDBserver,
2734         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2735         * configure: Regenerate.
2736
2737 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2738
2739         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2740         warning upon ENODATA from ptrace.
2741         * linux-s390-low.c (s390_store_tdb): New.
2742         (s390_regsets): Add regset for NT_S390_TDB.
2743
2744 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2745
2746         * linux-low.c (regsets_store_inferior_registers): Skip regsets
2747         without a fill_function.
2748         * linux-s390-low.c (s390_fill_last_break): Remove.
2749         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2750         (s390_arch_setup): Use regset's size instead of fill_function for
2751         loop end condition.
2752
2753 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2754
2755         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2756         the regset's store function when ptrace returned an error.
2757         * regcache.c (get_thread_regcache): Invalidate register cache
2758         before fetching inferior's registers.
2759
2760 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2761
2762         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2763         while-loop as for-loop.
2764         (regsets_store_inferior_registers): Likewise.
2765
2766 2014-11-28  Yao Qi  <yao@codesourcery.com>
2767
2768         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2769         * config.in, configure: Re-generate.
2770         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2771         is defined.
2772
2773 2014-11-21  Yao Qi  <yao@codesourcery.com>
2774
2775         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2776         (AC_CHECK_HEADERS): Remove malloc.h.
2777         * configure: Re-generated.
2778         * config.in: Re-generated.
2779         * server.h: Don't include alloca.h and malloc.h.
2780         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2781         Don't include malloc.h.
2782
2783 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
2784
2785         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2786         corresponding ERRNO check in same block.
2787
2788 2014-11-12  Pedro Alves  <palves@redhat.com>
2789
2790         * server.c (cont_thread): Update comment.
2791         (start_inferior, attach_inferior): No longer clear cont_thread.
2792         (handle_v_cont): No longer set cont_thread.
2793         (captured_main): Clear cont_thread each time a GDB connects.
2794
2795 2014-11-12  Pedro Alves  <palves@redhat.com>
2796
2797         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2798         thread, and don't resume all threads if the Hc thread has exited.
2799
2800 2014-11-12  Pedro Alves  <palves@redhat.com>
2801
2802         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2803         the process group instead of to a specific LWP.
2804
2805 2014-10-15  Pedro Alves  <palves@redhat.com>
2806
2807         PR server/17487
2808         * win32-arm-low.c (arm_set_thread_context): Remove current_event
2809         parameter.
2810         (arm_set_thread_context): Delete.
2811         (the_low_target): Adjust.
2812         * win32-i386-low.c (debug_registers_changed)
2813         (debug_registers_used): Delete.
2814         (update_debug_registers_callback): New function.
2815         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2816         needing to update their debug registers.
2817         (win32_get_current_dr): New function.
2818         (x86_dr_low_get_addr, x86_dr_low_get_control)
2819         (x86_dr_low_get_status): Fetch the debug register from the thread
2820         record's context.
2821         (i386_initial_stuff): Adjust.
2822         (i386_get_thread_context): Remove current_event parameter.  Don't
2823         clear debug_registers_changed nor copy DR values to
2824         debug_reg_state.
2825         (i386_set_thread_context): Delete.
2826         (i386_prepare_to_resume): New function.
2827         (i386_thread_added): Mark the thread as needing to update irs
2828         debug registers.
2829         (the_low_target): Remove i386_set_thread_context and install
2830         i386_prepare_to_resume.
2831         * win32-low.c (win32_get_thread_context): Adjust.
2832         (win32_set_thread_context): Use SetThreadContext
2833         directly.
2834         (win32_prepare_to_resume): New function.
2835         (win32_require_context): New function, factored out from ...
2836         (thread_rec): ... this.
2837         (continue_one_thread): Call win32_prepare_to_resume on each thread
2838         we're about to continue.
2839         (win32_resume): Call win32_prepare_to_resume on the event thread.
2840         * win32-low.h (struct win32_thread_info)
2841         <debug_registers_changed>: New field.
2842         (struct win32_target_ops): Change prototype of set_thread_context,
2843         delete set_thread_context and add prepare_to_resume.
2844         (win32_require_context): New declaration.
2845
2846 2014-10-08  Gary Benson  <gbenson@redhat.com>
2847
2848         * server.h: Do not include common-exceptions.h.
2849
2850 2014-10-08  Gary Benson  <gbenson@redhat.com>
2851
2852         * server.h: Do not include cleanups.h.
2853
2854 2014-09-30  James Hogan  <james.hogan@imgtec.com>
2855
2856         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2857         mips64-dsp-linux.c.
2858
2859 2014-09-23  Yao Qi  <yao@codesourcery.com>
2860
2861         * linux-low.c (lp_status_maybe_breakpoint): New function.
2862         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2863         (count_events_callback): Likewise.
2864         (select_event_lwp_callback): Likewise.
2865         (cancel_breakpoints_callback): Likewise.
2866
2867 2014-09-19  Don Breazeal  <donb@codesourcery.com>
2868
2869         * linux-low.c (handle_extended_wait): Call
2870         linux_ptrace_get_extended_event.
2871         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2872         linux_is_extended_waitstatus.
2873
2874 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
2875
2876         * Makefile.in (CPPFLAGS): Define.
2877         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2878         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2879
2880 2014-09-16  Gary Benson  <gbenson@redhat.com>
2881
2882         * inferiors.h (current_inferior): Renamed as...
2883         (current_thread): New variable.  All uses updated.
2884         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2885         (maybe_move_out_of_jump_pad): Likewise.
2886         (cancel_breakpoint): Likewise.
2887         (linux_low_filter_event): Likewise.
2888         (wait_for_sigstop): Likewise.
2889         (linux_resume_one_lwp): Likewise.
2890         (need_step_over_p): Likewise.
2891         (start_step_over): Likewise.
2892         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2893         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2894         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2895         and save_inferior as saved_thread.
2896         * regcache.c (get_thread_regcache): Renamed saved_inferior as
2897         saved_thread.
2898         (regcache_invalidate_thread): Likewise.
2899         * remote-utils.c (prepare_resume_reply): Likewise.
2900         * thread-db.c (thread_db_get_tls_address): Likewise.
2901         (disable_thread_event_reporting): Likewise.
2902         (remove_thread_event_breakpoints): Likewise.
2903         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2904         as saved_thread.
2905         * target.h (set_desired_inferior): Renamed as...
2906         (set_desired_thread): New declaration.  All uses updated.
2907         * server.c (myresume): Updated comment to reference thread instead
2908         of inferior.
2909         (handle_serial_event): Likewise.
2910         (handle_target_event): Likewise.
2911
2912 2014-09-12  Tom Tromey  <tromey@redhat.com>
2913             Gary Benson  <gbenson@redhat.com>
2914
2915         * regcache.h: Include common-regcache.h.
2916         (regcache_read_pc): Don't declare.
2917         * regcache.c (get_thread_regcache_for_ptid): New function.
2918
2919 2014-09-11  Tom Tromey  <tromey@redhat.com>
2920             Gary Benson  <gbenson@redhat.com>
2921
2922         * symbol.c: New file.
2923         * Makefile.in (SFILES): Add symbol.c.
2924         (OBS): Add symbol.o.
2925
2926 2014-09-11  Gary Benson  <gbenson@redhat.com>
2927
2928         * target.c (target_stop_ptid, target_continue_ptid): New
2929         functions.
2930
2931 2014-09-11  Tom Tromey  <tromey@redhat.com>
2932             Gary Benson  <gbenson@redhat.com>
2933
2934         * target.h: Include target/target.h.
2935         * target.c (target_read_memory, target_read_uint32)
2936         (target_write_memory): New functions.
2937
2938 2014-09-11  Gary Benson  <gbenson@redhat.com>
2939
2940         * server.h (debug_hw_points): Don't declare.
2941         * server.c (debug_hw_points): Don't define.  Replace all uses
2942         with show_debug_regs.
2943         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
2944         all uses with show_debug_regs.
2945
2946 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2947
2948         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2949         endianness into account.
2950         (ppc_supply_ptrace_register): Likewise.
2951
2952 2014-09-03  James Hogan  <james.hogan@imgtec.com>
2953
2954         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2955         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2956
2957 2014-09-03  Gary Benson  <gbenson@redhat.com>
2958
2959         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2960         ALL_DEBUG_ADDRESS_REGISTERS.
2961
2962 2014-09-02  Gary Benson  <gbenson@redhat.com>
2963
2964         * i386-low.h: Renamed as...
2965         * x86-low.h: New file.  All type, function and variable name
2966         prefixes changed from "i386_" to "x86_".  All references updated.
2967         * i386-low.c: Renamed as...
2968         * x86-low.c: New file.  All type, function and variable name
2969         prefixes changed from "i386_" to "x86_".  All references updated.
2970
2971 2014-09-02  Gary Benson  <gbenson@redhat.com>
2972
2973         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2974         (x86_linux_new_thread): Likewise.
2975
2976 2014-08-29  Gary Benson  <gbenson@redhat.com>
2977
2978         * server.h (setjmp.h): Do not include.
2979         (toplevel): Do not declare.
2980         (common-exceptions.h): Include.
2981         (cleanups.h): Likewise.
2982         * server.c (toplevel): Do not define.
2983         (exit_code): New static global.
2984         (detach_or_kill_for_exit_cleanup): New function.
2985         (main): New function.  Original main renamed to...
2986         (captured_main): New function.
2987         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2988
2989 2014-08-29  Gary Benson  <gbenson@redhat.com>
2990
2991         * Makefile.in (SFILES): Add common/common-exceptions.c.
2992         (OBS): Add common-exceptions.o.
2993         (common-exceptions.o): New rule.
2994         * utils.c (prepare_to_throw_exception): New function.
2995
2996 2014-08-29  Gary Benson  <gbenson@redhat.com>
2997
2998         * config.in: Regenerate.
2999         * configure: Likewise.
3000
3001 2014-08-29  Gary Benson  <gbenson@redhat.com>
3002
3003         * Makefile.in (SFILES): Add common/cleanups.c.
3004         (OBS): cleanups.o.
3005         (cleanups.o): New rule.
3006
3007 2014-08-29  Gary Benson  <gbenson@redhat.com>
3008
3009         * utils.c (internal_vwarning): New function.
3010
3011 2014-08-28  Gary Benson  <gbenson@redhat.com>
3012
3013         * utils.h (fatal): Remove declaration.
3014         * utils.c (fatal): Remove function.
3015
3016 2014-08-28  Gary Benson  <gbenson@redhat.com>
3017
3018         * tracepoint.c (gdb_agent_init): Replace fatal with
3019         perror_with_name.
3020         (initialize_tracepoint): Likewise.
3021
3022 2014-08-28  Gary Benson  <gbenson@redhat.com>
3023
3024         * remote-utils.c (remote_prepare): Replace fatal with error.
3025
3026 2014-08-28  Gary Benson  <gbenson@redhat.com>
3027
3028         * linux-low.c (linux_async): Replace fatal with warning.
3029         Tidy up and return.
3030         (linux_start_non_stop): Return -1 if linux_async failed.
3031
3032 2014-08-28  Gary Benson  <gbenson@redhat.com>
3033
3034         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3035         gdb_assert.
3036         (i386_dr_low_get_addr): Remove vague comment.
3037         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3038         gdb_assert.
3039
3040 2014-08-28  Gary Benson  <gbenson@redhat.com>
3041
3042         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3043         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3044         internal_error.
3045         (linux_resume_one_lwp): Likewise.
3046         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3047         gdb_assert.
3048         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3049         with internal_error.
3050         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3051         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3052         (find_register_by_name): Replace fatal with internal_error.
3053         (find_regno): Likewise.
3054         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3055         * thread-db.c (thread_db_create_event): Likewise.
3056         (thread_db_load_search): Likewise.
3057         (try_thread_db_load_1): Likewise.
3058         * tracepoint.c (get_jump_space_head): Replace fatal with
3059         internal_error.
3060         (claim_trampoline_space): Likewise.
3061         (have_fast_tracepoint_trampoline_buffer): Likewise.
3062         (cmd_qtstart): Likewise.
3063         (stop_tracing): Likewise.
3064         (fast_tracepoint_collecting): Likewise.
3065         (target_malloc): Likewise.
3066         (download_tracepoint): Likewise.
3067         (download_trace_state_variables): Replace check with gdb_assert.
3068         (upload_fast_traceframes): Replace fatal with internal_error.
3069
3070 2014-08-19  Tom Tromey  <tromey@redhat.com>
3071             Gary Benson  <gbenson@redhat.com>
3072
3073         * Makefile.in (SFILES): Add common/common-debug.c.
3074         (OBS): Add common-debug.o.
3075         (common-debug.o): New rule.
3076         * debug.h (debug_printf): Don't declare.
3077         * debug.c (debug_printf): Renamed and rewritten as...
3078         (debug_vprintf): New function.
3079
3080 2014-08-19  Gary Benson  <gbenson@redhat.com>
3081
3082         * utils.h: Do not include print-utils.h.
3083
3084 2014-08-19  Tom Tromey  <tromey@redhat.com>
3085             Gary Benson  <gbenson@redhat.com>
3086
3087         * server.h: Add static assertion.
3088         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3089
3090 2014-08-19  Tom Tromey  <tromey@redhat.com>
3091             Gary Benson  <gbenson@redhat.com>
3092
3093         * Makefile.in (SFILES): Add common/errors.c.
3094         (OBS): Add errors.o.
3095         (IPA_OBS): Add errors-ipa.o.
3096         (errors.o): New rule.
3097         (errors-ipa.o): Likewise.
3098         * utils.h (perror_with_name, error, warning): Don't declare.
3099         * utils.c (warning): Renamed and rewritten as...
3100         (vwarning): New function.
3101         (error): Renamed and rewritten as...
3102         (verror): New function.
3103         (internal_error): Renamed and rewritten as...
3104         (internal_verror): New function.
3105
3106 2014-08-07  Gary Benson  <gbenson@redhat.com>
3107
3108         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3109         * configure: Regenerate.
3110         * config.in: Likewise.
3111         * server.h: Do not include errno.h.
3112         * event-loop.c: Likewise.
3113         * hostio-errno.c: Likewise.
3114         * linux-low.c: Likewise.
3115         * remote-utils.c: Likewise.
3116         * spu-low.c: Likewise.
3117         * utils.c: Likewise.
3118         * gdbreplay.c: Unconditionally include errno.h.
3119
3120 2014-08-07  Gary Benson  <gbenson@redhat.com>
3121
3122         * server.h: Do not include string.h.
3123         * event-loop.c: Likewise.
3124         * linux-low.c: Likewise.
3125         * regcache.c: Likewise.
3126         * remote-utils.c: Likewise.
3127         * spu-low.c: Likewise.
3128         * utils.c: Likewise.
3129
3130 2014-08-07  Gary Benson  <gbenson@redhat.com>
3131
3132         * server.h: Do not include gdb_assert.h.
3133
3134 2014-08-07  Gary Benson  <gbenson@redhat.com>
3135
3136         * server.h: Do not include common-utils.h.
3137
3138 2014-08-07  Gary Benson  <gbenson@redhat.com>
3139
3140         * server.h: Do not include ptid.h.
3141         * notif.h: Likewise.
3142
3143 2014-08-07  Gary Benson  <gbenson@redhat.com>
3144
3145         * server.h: Do not include gdb_locale.h.
3146
3147 2014-08-07  Gary Benson  <gbenson@redhat.com>
3148
3149         * server.h: Do not include gdb/signals.h.
3150         * win32-low.c: Likewise.
3151
3152 2014-08-07  Gary Benson  <gbenson@redhat.com>
3153
3154         * server.h: Do not include pathmax.h.
3155
3156 2014-08-07  Gary Benson  <gbenson@redhat.com>
3157
3158         * server.h: Do not include libiberty.h.
3159         * linux-bfin-low.c: Likewise.
3160
3161 2014-08-07  Gary Benson  <gbenson@redhat.com>
3162
3163         * server.h: Do not include ansidecl.h.
3164
3165 2014-08-07  Gary Benson  <gbenson@redhat.com>
3166
3167         * linux-x86-low.c: Do not include stddef.h.
3168         * lynx-ppc-low.c: Likewise.
3169         * tracepoint.c: Likewise.
3170
3171 2014-08-07  Gary Benson  <gbenson@redhat.com>
3172
3173         * server.h: Do not include stdarg.h.
3174         * nto-low.c: Likewise.
3175
3176 2014-08-07  Gary Benson  <gbenson@redhat.com>
3177
3178         * server.h: Do not include stdlib.h.
3179         * inferiors.c: Likewise.
3180         * linux-low.c: Likewise.
3181         * regcache.c: Likewise.
3182         * spu-low.c: Likewise.
3183         * tracepoint.c: Likewise.
3184         * utils.c: Likewise.
3185
3186 2014-08-07  Gary Benson  <gbenson@redhat.com>
3187
3188         * server.h: Do not include stdio.h.
3189         * linux-low.c: Likewise.
3190         * remote-utils.c: Likewise.
3191         * spu-low.c: Likewise.
3192         * utils.c: Likewise.
3193         * wincecompat.c: Likewise.
3194
3195 2014-08-06  Gary Benson  <gbenson@redhat.com>
3196
3197         * regcache.c (init_register_cache): Move conditionals inside if.
3198
3199 2014-08-06  Gary Benson  <gbenson@redhat.com>
3200
3201         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3202
3203 2014-07-31  Gary Benson  <gbenson@redhat.com>
3204
3205         * ax.h: Do not include server.h.
3206         * gdbthread.h: Likewise.
3207         * lynx-low.h: Likewise.
3208         * notif.h: Likewise.
3209
3210 2014-07-30  Gary Benson  <gbenson@redhat.com>
3211
3212         * server.h: Include common-defs.h.
3213         Do not include config.h or build-gnulib-gdbserver/config.h.
3214
3215 2014-07-30  Gary Benson  <gbenson@redhat.com>
3216
3217         * hostio-errno.c: Move server.h to top of includes list.
3218         * inferiors.c: Likewise.
3219         * linux-x86-low.c: Likewise.
3220         * notif.c: Include server.h.
3221
3222 2014-07-24  Tom Tromey  <tromey@redhat.com>
3223             Gary Benson  <gbenson@redhat.com>
3224
3225         * server.h (CORE_ADDR): Now unsigned.
3226
3227 2014-07-16  Pedro Alves  <palves@redhat.com>
3228
3229         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3230
3231 2014-07-15  Pedro Alves  <palves@redhat.com>
3232
3233         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3234         copy.
3235
3236 2014-07-11  Pedro Alves  <palves@redhat.com>
3237
3238         * linux-low.c (kill_wait_lwp): New function, based on
3239         kill_one_lwp_callback, but use my_waitpid directly.
3240         (kill_one_lwp_callback, linux_kill): Use it.
3241
3242 2014-06-23  Pedro Alves  <palves@redhat.com>
3243
3244         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3245         before setting DR0..DR3.
3246
3247 2014-06-20  Gary Benson  <gbenson@redhat.com>
3248
3249         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3250         * configure: Regenerated.
3251         * config.in: Likewise.
3252
3253 2014-06-20  Gary Benson  <gbenson@redhat.com>
3254
3255         * Makefile.in (SFILES): Update locations for files moved
3256         from common to nat.
3257         (object file files): Reordered.
3258
3259 2014-06-20  Gary Benson  <gbenson@redhat.com>
3260
3261         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3262         (i386_dr_low_set_addr): Likewise.
3263         (i386_dr_low_get_addr): Likewise.
3264         (i386_dr_low_can_set_control): Likewise.
3265         (i386_dr_low_set_control): Likewise.
3266         (i386_dr_low_get_control): Likewise.
3267         (i386_dr_low_get_status): Likewise.
3268         (i386_get_debug_register_length): Likewise.
3269         * linux-x86-low.c (i386_dr_low_set_addr):
3270         Changed signature.  Made static.
3271         (i386_dr_low_get_addr): Likewise.
3272         (i386_dr_low_set_control): Likewise.
3273         (i386_dr_low_get_control): Likewise.
3274         (i386_dr_low_get_status): Likewise.
3275         (i386_dr_low): New global variable.
3276         * win32-i386-low.c (i386_dr_low_set_addr):
3277         Changed signature.  Made static.
3278         (i386_dr_low_get_addr): Likewise.
3279         (i386_dr_low_set_control): Likewise.
3280         (i386_dr_low_get_control): Likewise.
3281         (i386_dr_low_get_status): Likewise.
3282         (i386_dr_low): New global variable.
3283
3284 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3285
3286         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3287         * Makefile.in (AR, AR_FLAGS): Define.
3288         * configure: Regenerate.
3289
3290 2014-06-19  Gary Benson  <gbenson@redhat.com>
3291
3292         * Makefile.in (i386-dregs.o): New rule.
3293         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3294         * i386-low.c (target.h): Remove include.
3295         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3296         (DR_CONTROL_SHIFT): Likewise.
3297         (DR_CONTROL_SIZE): Likewise.
3298         (DR_RW_EXECUTE): Likewise.
3299         (DR_RW_WRITE): Likewise.
3300         (DR_RW_READ): Likewise.
3301         (DR_RW_IORW): Likewise.
3302         (DR_LEN_1): Likewise.
3303         (DR_LEN_2): Likewise.
3304         (DR_LEN_4): Likewise.
3305         (DR_LEN_8): Likewise.
3306         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3307         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3308         (DR_ENABLE_SIZE): Likewise.
3309         (DR_LOCAL_SLOWDOWN): Likewise.
3310         (DR_GLOBAL_SLOWDOWN): Likewise.
3311         (DR_CONTROL_RESERVED): Likewise.
3312         (I386_DR_CONTROL_MASK): Likewise.
3313         (I386_DR_VACANT): Likewise.
3314         (I386_DR_LOCAL_ENABLE): Likewise.
3315         (I386_DR_GLOBAL_ENABLE): Likewise.
3316         (I386_DR_DISABLE): Likewise.
3317         (I386_DR_SET_RW_LEN): Likewise.
3318         (I386_DR_GET_RW_LEN): Likewise.
3319         (I386_DR_WATCH_HIT): Likewise.
3320         (i386_wp_op_t): Likewise.
3321         (i386_show_dr): Likewise.
3322         (i386_length_and_rw_bits): Likewise.
3323         (i386_insert_aligned_watchpoint): Likewise.
3324         (i386_remove_aligned_watchpoint): Likewise.
3325         (i386_handle_nonaligned_watchpoint): Likewise.
3326         i386_update_inferior_debug_regs(): Likewise.
3327         (i386_dr_insert_watchpoint): Likewise.
3328         (i386_dr_remove_watchpoint): Likewise.
3329         (i386_dr_region_ok_for_watchpoint): Likewise.
3330         (i386_dr_stopped_data_address): Likewise.
3331         (i386_dr_stopped_by_watchpoint): Likewise.
3332
3333 2014-06-19  Gary Benson  <gbenson@redhat.com>
3334
3335         * i386-low.c (i386_dr_show): Renamed to
3336         i386_show_dr and made static.  All uses updated.
3337         (i386_dr_length_and_rw_bits): Renamed to
3338         i386_length_and_rw_bits and made static.
3339         All uses updated.
3340         (i386_dr_insert_aligned_watchpoint): Renamed to
3341         i386_insert_aligned_watchpoint and made static.
3342         All uses updated.
3343         (i386_dr_remove_aligned_watchpoint): Renamed to
3344         i386_remove_aligned_watchpoint and made static.
3345         All uses updated.
3346         (i386_dr_update_inferior_debug_regs): Renamed to
3347         i386_update_inferior_debug_regs and made static.
3348         All uses updated.
3349
3350 2014-06-18  Gary Benson  <gbenson@redhat.com>
3351
3352         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3353         (i386_dr_low_can_set_control): Likewise.
3354         (i386_get_debug_register_length): Likewise.
3355         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3356         (i386_dr_low_can_set_control): Likewise.
3357         (i386_get_debug_register_length): Likewise.
3358
3359 2014-06-17  Gary Benson  <gbenson@redhat.com>
3360
3361         * i386-low.h (i386-dregs.h): New include.
3362         (DR_FIRSTADDR): Now in i386-dregs.h.
3363         (DR_LASTADDR): Likewise.
3364         (DR_NADDR): Likewise.
3365         (DR_STATUS): Likewise.
3366         (DR_CONTROL): Likewise.
3367         (i386_debug_reg_state): Likewise.
3368         (i386_dr_insert_watchpoint): Likewise.
3369         (i386_dr_remove_watchpoint): Likewise.
3370         (i386_dr_region_ok_for_watchpoint): Likewise.
3371         (i386_dr_stopped_data_address): Likewise.
3372         (i386_dr_stopped_by_watchpoint): Likewise.
3373         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3374
3375 2014-06-18  Gary Benson  <gbenson@redhat.com>
3376
3377         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3378         i386_dr_insert_watchpoint.
3379         (i386_low_remove_watchpoint): Renamed to
3380         i386_dr_remove_watchpoint.
3381         (i386_low_region_ok_for_watchpoint): Renamed to
3382         i386_dr_region_ok_for_watchpoint.
3383         (i386_low_stopped_data_address): Renamed to
3384         i386_dr_stopped_data_address.
3385         (i386_low_stopped_by_watchpoint): Renamed to
3386         i386_dr_stopped_by_watchpoint.
3387         * i386-low.c (i386_show_dr): Renamed to
3388         i386_dr_show and made nonstatic.  All uses updated.
3389         (i386_length_and_rw_bits): Renamed to
3390         i386_dr_length_and_rw_bits and made nonstatic.
3391         All uses updated.
3392         (i386_insert_aligned_watchpoint): Renamed to
3393         i386_dr_insert_aligned_watchpoint and made nonstatic.
3394         All uses updated.
3395         (i386_remove_aligned_watchpoint): Renamed to
3396         i386_dr_remove_aligned_watchpoint and made nonstatic.
3397         All uses updated.
3398         (i386_update_inferior_debug_regs): Renamed to
3399         i386_dr_update_inferior_debug_regs and made nonstatic.
3400         All uses updated.
3401         (i386_low_insert_watchpoint): Renamed to
3402         i386_dr_insert_watchpoint.  All uses updated.
3403         (i386_low_remove_watchpoint): Renamed to
3404         i386_dr_remove_watchpoint.  All uses updated.
3405         (i386_low_region_ok_for_watchpoint): Renamed to
3406         i386_dr_region_ok_for_watchpoint.  All uses updated.
3407         (i386_low_stopped_data_address): Renamed to
3408         i386_dr_stopped_data_address.  All uses updated.
3409         (i386_low_stopped_by_watchpoint): Renamed to
3410         i386_dr_stopped_by_watchpoint.  All uses updated.
3411
3412 2014-06-18  Gary Benson  <gbenson@redhat.com>
3413
3414         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3415         (i386_dr_low_can_set_control): Likewise.
3416         (i386_insert_aligned_watchpoint): New check.
3417
3418 2014-06-18  Gary Benson  <gbenson@redhat.com>
3419
3420         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3421         Renamed to state.
3422
3423 2014-06-18  Gary Benson  <gbenson@redhat.com>
3424
3425         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3426         instead of fatal and error.
3427         (i386_handle_nonaligned_watchpoint): Likewise.
3428
3429 2014-06-18  Gary Benson  <gbenson@redhat.com>
3430
3431         * i386-low.c (i386_get_debug_register_length): New macro.
3432         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3433         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3434         phex to format values.
3435
3436 2014-06-18  Gary Benson  <gbenson@redhat.com>
3437
3438         * i386-low.h: Comment changes.
3439         * i386-low.c: Likewise.
3440
3441 2014-06-18  Gary Benson  <gbenson@redhat.com>
3442
3443         * i386-low.c: Whitespace changes.
3444
3445 2014-06-12  Tom Tromey  <tromey@redhat.com>
3446
3447         * utils.c (freeargv): Remove.
3448
3449 2014-06-12  Tom Tromey  <tromey@redhat.com>
3450
3451         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3452         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3453         (parse_debug_format_options): Likewise.
3454         (gdbserver_usage): Likewise.
3455         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3456         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3457         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3458         against libiberty.
3459         ($(LIBGNU)): Depend on libiberty.
3460         (all-lib): Recurse into all subdirs.
3461         (install-only): Invoke "install" target in subdirs.
3462         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3463         targets.
3464         * configure: Rebuild.
3465         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3466         for vasprintf, vsnprintf, or gettimeofday.
3467         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3468         srv_tgtobj.
3469
3470 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3471
3472         * development.sh: Delete.
3473         * Makefile.in (config.status): Adjust dependency on development.sh.
3474         * configure.ac: Adjust development.sh source call.
3475         * configure: Regenerate.
3476
3477 2014-06-02  Pedro Alves  <palves@redhat.com>
3478
3479         * ax.c (gdb_free_agent_expr): New function.
3480         * ax.h (gdb_free_agent_expr): New declaration.
3481         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3482         list.
3483         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3484         static.
3485         (clear_breakpoint_conditions_and_commands): New function.
3486         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3487         (clear_breakpoint_conditions_and_commands): New declaration.
3488
3489 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3490
3491         * linux-aarch64-low.c (asm/ptrace.h): Include.
3492
3493 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3494
3495         Fix TLS access for -static -pthread.
3496         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3497         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3498         (thread_db_load_search, try_thread_db_load_1): Initialize it.
3499
3500 2014-05-20  Pedro Alves  <palves@redhat.com>
3501
3502         * linux-aarch64-low.c (aarch64_insert_point)
3503         (aarch64_remove_point): No longer check whether the type is
3504         supported here.  Adjust to new interface.
3505         (the_low_target): Install aarch64_supports_z_point_type as
3506         supports_z_point_type method.
3507         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3508         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3509         instead of a Z packet char.  Adjust.
3510         (arm_supports_z_point_type): New function.
3511         (arm_insert_point, arm_remove_point): Adjust to new interface.
3512         (the_low_target): Install arm_supports_z_point_type.
3513         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3514         (cris_insert_point, cris_remove_point): Adjust to new interface.
3515         Don't check whether the type is supported here.
3516         (the_low_target): Install cris_supports_z_point_type.
3517         * linux-low.c (linux_supports_z_point_type): New function.
3518         (linux_insert_point, linux_remove_point): Adjust to new interface.
3519         * linux-low.h (struct linux_target_ops) <insert_point,
3520         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
3521         raw_breakpoint pointer parameter.
3522         <supports_z_point_type>: New method.
3523         * linux-mips-low.c (mips_supports_z_point_type): New function.
3524         (mips_insert_point, mips_remove_point): Adjust to new interface.
3525         Use mips_supports_z_point_type.
3526         (the_low_target): Install mips_supports_z_point_type.
3527         * linux-ppc-low.c (the_low_target): Install NULL as
3528         supports_z_point_type method.
3529         * linux-s390-low.c (the_low_target): Install NULL as
3530         supports_z_point_type method.
3531         * linux-sparc-low.c (the_low_target): Install NULL as
3532         supports_z_point_type method.
3533         * linux-x86-low.c (x86_supports_z_point_type): New function.
3534         (x86_insert_point): Adjust to new insert_point interface.  Use
3535         insert_memory_breakpoint.  Adjust to new
3536         i386_low_insert_watchpoint interface.
3537         (x86_remove_point): Adjust to remove_point interface.  Use
3538         remove_memory_breakpoint.  Adjust to new
3539         i386_low_remove_watchpoint interface.
3540         (the_low_target): Install x86_supports_z_point_type.
3541         * lynx-low.c (lynx_target_ops): Install NULL as
3542         supports_z_point_type callback.
3543         * nto-low.c (nto_supports_z_point_type): New.
3544         (nto_insert_point, nto_remove_point): Adjust to new interface.
3545         (nto_target_ops): Install nto_supports_z_point_type.
3546         * mem-break.c: Adjust intro comment.
3547         (struct raw_breakpoint) <raw_type, size>: New fields.
3548         <inserted>: Update comment.
3549         <shlib_disabled>: Delete field.
3550         (enum bkpt_type) <gdb_breakpoint>: Delete value.
3551         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3552         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3553         (raw_bkpt_type_to_target_hw_bp_type): New function.
3554         (find_enabled_raw_code_breakpoint_at): New function.
3555         (find_raw_breakpoint_at): New type and size parameters.  Use them.
3556         (insert_memory_breakpoint): New function, based off
3557         set_raw_breakpoint_at.
3558         (remove_memory_breakpoint): New function.
3559         (set_raw_breakpoint_at): Reimplement.
3560         (set_breakpoint): New, based on set_breakpoint_at.
3561         (set_breakpoint_at): Reimplement.
3562         (delete_raw_breakpoint): Go through the_target->remove_point
3563         instead of assuming memory breakpoints.
3564         (find_gdb_breakpoint_at): Delete.
3565         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3566         (find_gdb_breakpoint): New function.
3567         (set_gdb_breakpoint_at): Delete.
3568         (z_type_supported): New function.
3569         (set_gdb_breakpoint_1): New function, loosely based off
3570         set_gdb_breakpoint_at.
3571         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3572         (delete_gdb_breakpoint_at): Delete.
3573         (delete_gdb_breakpoint_1): New function, loosely based off
3574         delete_gdb_breakpoint_at.
3575         (delete_gdb_breakpoint): New function.
3576         (clear_gdb_breakpoint_conditions): Rename to ...
3577         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
3578         breakpoint.
3579         (add_condition_to_breakpoint): Make static.
3580         (add_breakpoint_condition): Take a struct breakpoint pointer
3581         instead of an address.  Adjust.
3582         (gdb_condition_true_at_breakpoint): Rename to ...
3583         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3584         z_type parameter.
3585         (gdb_condition_true_at_breakpoint): Reimplement.
3586         (add_breakpoint_commands): Take a struct breakpoint pointer
3587         instead of an address.  Adjust.
3588         (gdb_no_commands_at_breakpoint): Rename to ...
3589         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
3590         parameter.  Return true if no breakpoint was found.  Change debug
3591         output.
3592         (gdb_no_commands_at_breakpoint): Reimplement.
3593         (run_breakpoint_commands): Rename to ...
3594         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
3595         and change return type to boolean.
3596         (run_breakpoint_commands): New function.
3597         (gdb_breakpoint_here): Also check for Z1 breakpoints.
3598         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3599         breakpoint.  Go through the_target->remove_point instead of
3600         assuming memory breakpoint.
3601         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3602         software and hardware breakpoints.
3603         (reinsert_raw_breakpoint): Go through the_target->insert_point
3604         instead of assuming memory breakpoint.
3605         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3606         software and hardware breakpoints.
3607         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3608         Check both software and hardware breakpoints.
3609         (validate_inserted_breakpoint): Assert the breakpoint is a
3610         software breakpoint.  Set the inserted flag to -1 instead of
3611         setting shlib_disabled.
3612         (delete_disabled_breakpoints): Adjust.
3613         (validate_breakpoints): Only validate software breakpoints.
3614         Adjust to inserted flag change.
3615         (check_mem_read, check_mem_write): Skip breakpoint types other
3616         than software breakpoints.  Adjust to inserted flag change.
3617         * mem-break.h (enum raw_bkpt_type): New enum.
3618         (raw_breakpoint, struct process_info): Forward declare.
3619         (Z_packet_to_target_hw_bp_type): Delete declaration.
3620         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3621         (set_gdb_breakpoint, delete_gdb_breakpoint)
3622         (clear_breakpoint_conditions): New declarations.
3623         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3624         (breakpoint_inserted_here): Update comment.
3625         (add_breakpoint_condition, add_breakpoint_commands): Replace
3626         address parameter with a breakpoint pointer parameter.
3627         (gdb_breakpoint_here): Update comment.
3628         (delete_gdb_breakpoint_at): Delete.
3629         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3630         * server.c (process_point_options): Take a struct breakpoint
3631         pointer instead of an address.  Adjust.
3632         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3633         delete_gdb_breakpoint.
3634         * spu-low.c (spu_target_ops): Install NULL as
3635         supports_z_point_type method.
3636         * target.h: Include mem-break.h.
3637         (struct target_ops) <prepare_to_access_memory>: Update comment.
3638         <supports_z_point_type>: New field.
3639         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3640         instead of a char.  Also take a raw breakpoint pointer.
3641         * win32-arm-low.c (the_low_target): Install NULL as
3642         supports_z_point_type.
3643         * win32-i386-low.c (i386_supports_z_point_type): New function.
3644         (i386_insert_point, i386_remove_point): Adjust to new interface.
3645         (the_low_target): Install i386_supports_z_point_type.
3646         * win32-low.c (win32_supports_z_point_type): New function.
3647         (win32_insert_point, win32_remove_point): Adjust to new interface.
3648         (win32_target_ops): Install win32_supports_z_point_type.
3649         * win32-low.h (struct win32_target_ops):
3650         <supports_z_point_type>: New method.
3651         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3652         instead of a char.  Also take a raw breakpoint pointer.
3653
3654 2014-05-20  Pedro Alves  <palves@redhat.com>
3655
3656         * mem-break.h: Include break-common.h.
3657         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3658         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3659         (Z_packet_to_target_hw_bp_type): New declaration.
3660         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3661         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3662         (Z_PACKET_ACCESS_WP): Delete macros.
3663         (Z_packet_to_hw_type): Delete function.
3664         * i386-low.h: Don't include break-common.h here.
3665         (Z_packet_to_hw_type): Delete declaration.
3666         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3667         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3668         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3669         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3670         * linux-aarch64-low.c: Don't include break-common.h here.
3671         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3672         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3673         (Z_packet_to_target_hw_bp_type): Delete function.
3674         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3675         function.
3676         (mips_insert_point, mips_remove_point): Use
3677         Z_packet_to_target_hw_bp_type.
3678
3679 2014-05-20  Pedro Alves  <palves@redhat.com>
3680
3681         * linux-aarch64-low.c: Include break-common.h.
3682         (enum target_point_type): Delete.
3683         (Z_packet_to_point_type): Rename to ...
3684         (Z_packet_to_target_hw_bp_type): ... this, and return a
3685         target_hw_bp_type instead.
3686         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3687         instead of an enum target_point_type.
3688         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
3689         breakpoint type.
3690         (aarch64_dr_state_insert_one_point)
3691         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3692         (aarch64_handle_aligned_watchpoint)
3693         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3694         Take an enum target_hw_bp_type instead of an enum
3695         target_point_type.
3696         (aarch64_supports_z_point_type): New function.
3697         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
3698         use Z_packet_to_target_hw_bp_type.
3699
3700 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
3701
3702         * configure.ac: Only use -Werror by default when DEVELOPMENT
3703         is true.
3704         * configure: Regenerate.
3705
3706 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3707
3708         Fix gdbserver qGetTLSAddr for x86_64 -m32.
3709         * linux-x86-low.c (X86_64_USER_REGS): New.
3710         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3711
3712 2014-04-28  Yao Qi  <yao@codesourcery.com>
3713
3714         * Makefile.in (i386-avx512.c): Fix the typo of generated file
3715         name.
3716
3717 2014-04-25  Pedro Alves  <palves@redhat.com>
3718
3719         PR server/16255
3720         * linux-low.c (linux_attach_fail_reason_string): New function.
3721         (linux_attach_lwp): Delete.
3722         (linux_attach_lwp_1): Rename to ...
3723         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
3724         argument.  Remove "initial" parameter.  Return int instead of
3725         void.  Don't error or warn here.
3726         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
3727         failure to attach to the tgid.  Call warning when failing to
3728         attach to an lwp.
3729         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3730         argument.  Remove "initial" parameter.  Return int instead of
3731         void.  Don't error or warn here.
3732         (linux_attach_fail_reason_string): New declaration.
3733         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3734         interface change.  Use linux_attach_fail_reason_string.
3735
3736 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
3737             Walfred Tedeschi  <walfred.tedeschi@intel.com>
3738
3739         * Makefile.in: Added rules to handle new files
3740         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3741         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3742         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3743         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3744         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3745         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3746         x32-avx512-linux.o.
3747         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3748         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3749         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3750         i386/x32-avx512.xml.
3751         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3752         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3753         i386/x32-avx512-linux.xml.
3754         * i387-fp.c (num_avx512_k_registers): New constant for number
3755         of K registers.
3756         (num_avx512_zmmh_low_registers): New constant for number of
3757         lower ZMM registers (0-15).
3758         (num_avx512_zmmh_high_registers): New constant for number of
3759         higher ZMM registers (16-31).
3760         (num_avx512_ymmh_registers): New contant for number of higher
3761         YMM registers (ymm16-31 added by avx521 on x86_64).
3762         (num_avx512_xmm_registers): New constant for number of higher
3763         XMM registers (xmm16-31 added by AVX512 on x86_64).
3764         (struct i387_xsave): Add space for AVX512 registers.
3765         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3766         Add code to handle AVX512 registers.
3767         (i387_xsave_to_cache): Add code to handle AVX512 registers.
3768         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3769         prototypei from generated file.
3770         (tdesc_amd64_avx512_linux): Likewise.
3771         (init_registers_x32_avx512_linux): Likewise.
3772         (tdesc_x32_avx512_linux): Likewise.
3773         (init_registers_i386_avx512_linux): Likewise.
3774         (tdesc_i386_avx512_linux): Likewise.
3775         (x86_64_regmap): Add AVX512 registers.
3776         (x86_linux_read_description): Add code to handle AVX512 XSTATE
3777         mask.
3778         (initialize_low_arch): Add code to initialize AVX512 registers.
3779
3780 2014-04-23  Pedro Alves  <palves@redhat.com>
3781
3782         * mem-break.c (find_gdb_breakpoint_at): Make static.
3783         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3784
3785 2014-04-23  Pedro Alves  <palves@redhat.com>
3786
3787         * i386-low.c: Don't include break-common.h here.
3788         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3789         prototype to take target_hw_bp_type as argument instead of a Z
3790         packet char.
3791         * i386-low.h: Include break-common.h here.
3792         (Z_packet_to_hw_type): Declare.
3793         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3794         prototypes.
3795         * linux-x86-low.c (x86_insert_point): Convert the packet number to
3796         a target_hw_bp_type before calling i386_low_insert_watchpoint.
3797         (x86_remove_point): Convert the packet number to a
3798         target_hw_bp_type before calling i386_low_remove_watchpoint.
3799         * win32-i386-low.c (i386_insert_point): Convert the packet number
3800         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3801         (i386_remove_point): Convert the packet number to a
3802         target_hw_bp_type before calling i386_low_remove_watchpoint.
3803
3804 2014-04-23  Pedro Alves  <palves@redhat.com>
3805
3806         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3807
3808 2014-04-10  Pedro Alves  <palves@redhat.com>
3809
3810         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3811         Check if the condition or command is NULL before checking if the
3812         breakpoint is known.  On success, return true.
3813         * mem-break.h (add_breakpoint_condition): Document return.
3814         (add_breakpoint_commands): Add describing comment.
3815         * server.c (skip_to_semicolon): New function.
3816         (process_point_options): Use it.
3817
3818 2014-04-09  Pedro Alves  <palves@redhat.com>
3819
3820         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3821         to lwpid_of.
3822
3823 2014-02-27  Pedro Alves  <palves@redhat.com>
3824
3825         PR 12702
3826         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3827         macros.
3828         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3829         output.
3830         (last_thread_of_process_p): Take a PID argument instead of a
3831         thread pointer.
3832         (linux_wait_for_lwp): Delete.
3833         (num_lwps, check_zombie_leaders, not_stopped_callback): New
3834         functions.
3835         (linux_low_filter_event): New function, party factored out from
3836         linux_wait_for_event.
3837         (linux_wait_for_event): Rename to ...
3838         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
3839         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
3840         sigsuspend.  Check for zombie leaders.
3841         (linux_wait_for_event): Reimplement as wrapper around
3842         linux_wait_for_event_filtered.
3843         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
3844         a normal or signal exit is seen, it's the whole process exiting.
3845         (wait_for_sigstop): No longer a for_each_inferior callback.
3846         Rewrite on top of linux_wait_for_event_filtered.
3847         (stop_all_lwps): Call wait_for_sigstop directly.
3848         * server.c (resume, handle_target_event): Handle
3849         TARGET_WAITKIND_NO_RESUMED.
3850
3851 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3852
3853         * win32-low.c (psapi_get_dll_name,
3854         * win32_CreateToolhelp32Snapshot): Delete.
3855         (win32_CreateToolhelp32Snapshot, win32_Module32First)
3856         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3857         Delete.
3858         (handle_load_dll): Add function description.
3859         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3860
3861 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3862
3863         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3864         Add comment.
3865         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3866         base address when calling win32_add_one_solib.
3867         (handle_load_dll): Delete local variable load_addr.
3868         Remove 0x1000 offset applied to DLL base address when calling
3869         win32_add_one_solib.
3870         (handle_unload_dll): Add comment.
3871
3872 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3873
3874         * win32-low.c (win32_add_all_dlls): Renames
3875         win32_ensure_ntdll_loaded.  Rewrite function documentation.
3876         Adjust implementation to always load all DLLs.
3877         Add 0x1000 offset to DLL base address when calling
3878         win32_add_one_solib.
3879         (child_initialization_done): New static global.
3880         (do_initial_child_stuff): Set child_initialization_done to
3881         zero during child initialization, and 1 after.  Replace call
3882         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3883         Add comment.
3884         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3885         (handle_unload_dll): Add function documentation.
3886         (get_child_debug_event): Ignore load and unload DLL events
3887         during child initialization.
3888
3889 2014-02-20  Doug Evans  <dje@google.com>
3890
3891         Remove global all_lwps.
3892         * inferiors.h (ptid_of): Move here from linux-low.h.
3893         (pid_of, lwpid_of): Ditto.
3894         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3895         parameter is a struct thread_info * now.
3896         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3897         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
3898         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3899         directly.
3900         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3901         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3902         * linux-arm-low.c (update_registers_callback): Update, "entry"
3903         parameter is a struct thread_info * now.
3904         Fetch lwpid from current_inferior directly.
3905         (arm_insert_point): Pass &all_threads to find_inferior instead of
3906         &all_lwps.
3907         (arm_remove_point): Ditto.
3908         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3909         (arm_prepare_to_resume): Fetch pid from thread.
3910         (arm_read_description): Fetch lwpid from current_inferior directly.
3911         * linux-low.c (all_lwps): Delete.
3912         (delete_lwp): Delete call to remove_inferior.
3913         (handle_extended_wait): Fetch lwpid from thread.
3914         (add_lwp): Don't set lwp->entry.id.  Remove call to
3915         add_inferior_to_list.
3916         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3917         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3918         (kill_one_lwp_callback): Ditto.
3919         (linux_kill): Don't dereference NULL pointer.
3920         Fetch ptid,lwpid from thread.
3921         (get_detach_signal): Fetch ptid from thread.
3922         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3923         Simplify call to regcache_invalidate_thread.
3924         (delete_lwp_callback): Update, "entry" parameter is a
3925         struct thread_info * now.  Fetch pid from thread.
3926         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3927         (status_pending_p_callback): Update, "entry" parameter is a
3928         struct thread_info * now.  Fetch ptid from thread.
3929         (find_lwp_pid): Update, "entry" parameter is a
3930         struct thread_info * now.
3931         (linux_wait_for_lwp): Fetch pid from thread.
3932         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3933         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3934         (enqueue_one_deferred_signal): Fetch lwpid from thread.
3935         (dequeue_one_deferred_signal): Ditto.
3936         (cancel_breakpoint): Fetch ptid from current_inferior.
3937         (linux_wait_for_event): Pass &all_threads to find_inferior,
3938         not &all_lwps.  Fetch ptid, lwpid from thread.
3939         (count_events_callback): Update, "entry" parameter is a
3940         struct thread_info * now.
3941         (select_singlestep_lwp_callback): Ditto.
3942         (select_event_lwp_callback): Ditto.
3943         (cancel_breakpoints_callback): Ditto.
3944         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3945         not &all_lwps.
3946         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
3947         (unsuspend_one_lwp): Update, "entry" parameter is a
3948         struct thread_info * now.
3949         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3950         not &all_lwps.
3951         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
3952         Fetch lwpid from thread, not lwp.
3953         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3954         Pass &all_threads to find_inferior, not &all_lwps.
3955         (send_sigstop): Fetch lwpid from thread, not lwp.
3956         (send_sigstop_callback): Update, "entry" parameter is a
3957         struct thread_info * now.
3958         (suspend_and_send_sigstop_callback): Ditto.
3959         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
3960         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3961         struct thread_info * now.
3962         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
3963         from thread, lwp.
3964         (lwp_running): Update, "entry" parameter is a
3965         struct thread_info * now.
3966         (stop_all_lwps): Fetch ptid from thread.
3967         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3968         (linux_resume_one_lwp): Fetch lwpid from thread.
3969         (linux_set_resume_request): Update, "entry" parameter is a
3970         struct thread_info * now.  Fetch pid, lwpid from thread.
3971         (resume_status_pending_p): Update, "entry" parameter is a
3972         struct thread_info * now.
3973         (need_step_over_p): Ditto.  Fetch lwpid from thread.
3974         (start_step_over): Fetch lwpid from thread.
3975         (linux_resume_one_thread): Update, "entry" parameter is a
3976         struct thread_info * now.  Fetch lwpid from thread.
3977         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3978         (proceed_one_lwp): Update, "entry" parameter is a
3979         struct thread_info * now.  Fetch lwpid from thread.
3980         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3981         struct thread_info * now.
3982         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3983         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
3984         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3985         directly.
3986         (regsets_store_inferior_registers): Ditto.
3987         (fetch_register, store_register): Ditto.
3988         (linux_read_memory, linux_write_memory): Ditto.
3989         (linux_request_interrupt): Ditto.
3990         (linux_read_auxv): Ditto.
3991         (linux_xfer_siginfo): Ditto.
3992         (linux_qxfer_spu): Ditto.
3993         (linux_qxfer_libraries_svr4): Ditto.
3994         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3995         moved to inferiors.h.
3996         (get_lwp): Delete.
3997         (get_thread_lwp): Update.
3998         (struct lwp_info): Delete member "entry".  Simplify comment for
3999         member "thread".
4000         (all_lwps): Delete.
4001         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4002         current_inferior directly.
4003         (update_watch_registers_callback): Update, "entry" parameter is a
4004         struct thread_info * now.  Fetch pid from thread.
4005         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4006         (mips_insert_point): Fetch lwpid from current_inferior.
4007         Pass &all_threads to find_inferior, not &all_lwps.
4008         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4009         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4010         directly.
4011         (mips_stopped_data_address): Ditto.
4012         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4013         directly.
4014         * linux-tile-low.c (tile_arch_setup): Ditto.
4015         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4016         (update_debug_registers_callback): Update, "entry" parameter is a
4017         struct thread_info * now.  Fetch pid from thread.
4018         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4019         Pass &all_threads to find_inferior, not &all_lwps.
4020         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4021         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4022         Pass &all_threads to find_inferior, not &all_lwps.
4023         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4024         (i386_dr_low_get_status): Ditto.
4025         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4026         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4027         (x86_linux_read_description): Ditto.
4028         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4029
4030 2014-02-20  Doug Evans  <dje@google.com>
4031
4032         * inferiors.c (get_first_inferior): Fix buglet.
4033
4034 2014-02-19  Doug Evans  <dje@google.com>
4035
4036         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4037         * inferiors.c (add_thread): Change result type to struct thread_info *.
4038         All callers updated.
4039         (add_lwp): Call add_thread here instead of in callers.
4040         All callers updated.
4041         * linux-low.h (get_lwp_thread): Rewrite.
4042         (struct lwp_info): New member "thread".
4043
4044 2014-02-19  Doug Evans  <dje@google.com>
4045
4046         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4047         All callers updated.
4048
4049 2014-02-19  Doug Evans  <dje@google.com>
4050
4051         * inferiors.c (add_thread): Fix whitespace.
4052
4053 2014-02-19  Doug Evans  <dje@google.com>
4054
4055         * dll.c (clear_dlls): Replace accessing list implemention details
4056         with API function.
4057         * gdbthread.h (get_first_thread): Declare.
4058         * inferiors.c (for_each_inferior_with_data): New function.
4059         (get_first_thread): New function.
4060         (find_thread_ptid): Simplify.
4061         (get_first_inferior): New function.
4062         (clear_list): Delete.
4063         (one_inferior_p): New function.
4064         (clear_inferior_list): New function.
4065         (clear_inferiors): Update.
4066         * inferiors.h (for_each_inferior_with_data): Declare.
4067         (clear_inferior_list): Declare.
4068         (one_inferior_p): Declare.
4069         (get_first_inferior): Declare.
4070         * linux-low.c (linux_wait_for_event): Replace accessing list
4071         implemention details with API function.
4072         * server.c (target_running): Ditto.
4073         (accumulate_file_name_length): New function.
4074         (emit_dll_description): New function.
4075         (handle_qxfer_libraries): Replace accessing list implemention
4076         details with API function.
4077         (handle_qxfer_threads_worker): New function.
4078         (handle_qxfer_threads_proper): Replace accessing list implemention
4079         details with API function.
4080         (handle_query): Ditto.
4081         (visit_actioned_threads_callback_ftype): New typedef.
4082         (visit_actioned_threads_data): New struct.
4083         (visit_actioned_threads): Rewrite to be find_inferior callback.
4084         (resume): Call find_inferior.
4085         (handle_status): Replace accessing list implemention
4086         details with API function.
4087         (process_serial_event): Replace accessing list implemention details
4088         with API function.
4089         * target.c (set_desired_inferior): Replace accessing list implemention
4090         details with API function.
4091         * tracepoint.c (same_process_p): New function.
4092         (gdb_agent_about_to_close): Replace accessing list implemention
4093         details with API function.
4094         * win32-low.c (child_delete_thread): Replace accessing list
4095         implemention details with API function.
4096         (match_dll_by_basename): New function.
4097         (dll_is_loaded_by_basename): New function.
4098         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4099         details call to dll_is_loaded_by_basename.
4100
4101 2014-02-19  Doug Evans  <dje@google.com>
4102
4103         * dll.h (struct dll_info): Add comment.
4104         * gdbthread.h (struct thread_info): Add comment.
4105         (current_ptid): Simplify.
4106         * inferiors.c (add_process): Update.
4107         (remove_process): Update.
4108         * inferiors.h (struct process_info): Rename member "head" to "entry".
4109         * linux-low.c (delete_lwp): Update.
4110         (add_lwp): Update.
4111         (last_thread_of_process_p): Update.
4112         (kill_one_lwp_callback, linux_kill): Update.
4113         (status_pending_p_callback): Update.
4114         (wait_for_sigstop): Update.  Simplify read of ptid.
4115         (start_step_over): Update.
4116         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4117         (get_lwp_thread): Update.
4118         (struct lwp_info): Rename member "head" to "entry".
4119         * regcache.h (inferior_list_entry): Delete.
4120         * server.c (kill_inferior_callback): Update.
4121         (detach_or_kill_inferior_callback): Update.
4122         (print_started_pid): Update.
4123         (print_attached_pid): Update.
4124         (process_serial_event): Simplify read of ptid.
4125         * thread-db.c (thread_db_create_event): Update.
4126         (thread_db_get_tls_address): Update.
4127         * win32-low.c (current_inferior_ptid): Simplify.
4128
4129 2014-02-19  Tom Tromey  <tromey@redhat.com>
4130
4131         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4132         argument.
4133         (target_supports_btrace): Update.
4134
4135 2014-02-14  Yao Qi  <yao@codesourcery.com>
4136
4137         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4138         (rsp-low-ipa.o): New target.
4139
4140 2014-02-12  Tom Tromey  <tromey@redhat.com>
4141
4142         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4143         convert_ascii_to_int.
4144         * regcache.c (registers_to_string): Likewise.
4145         * remote-utils.c (decode_M_packet): Likewise.
4146         * server.c (process_serial_event): Likewise.
4147
4148 2014-02-12  Tom Tromey  <tromey@redhat.com>
4149
4150         * server.c (handle_query, handle_v_run): Use hex2bin, not
4151         unhexify.
4152         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4153
4154 2014-02-12  Tom Tromey  <tromey@redhat.com>
4155
4156         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4157         convert_int_to_ascii.
4158         * regcache.c (registers_to_string, collect_register_as_string):
4159         Likewise.
4160         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4161         Likewise.
4162         * server.c (process_serial_event): Likewise.
4163         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4164         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4165
4166 2014-02-12  Tom Tromey  <tromey@redhat.com>
4167
4168         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4169         bin2hex, not hexify.
4170         * tracepoint.c (cmd_qtstatus): Likewise.
4171
4172 2014-02-12  Tom Tromey  <tromey@redhat.com>
4173
4174         * remote-utils.c (monitor_output): Pass explicit length to
4175         hexify.
4176
4177 2014-02-12  Tom Tromey  <tromey@redhat.com>
4178
4179         * tracepoint.c: Include rsp-low.h.
4180         * server.c: Include rsp-low.h.
4181         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4182         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4183         declare.
4184         * remote-utils.c: Include rsp-low.h.
4185         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4186         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4187         (convert_int_to_ascii, convert_ascii_to_int): Move to
4188         common/rsp-low.c.
4189         * regcache.c: Include rsp-low.h.
4190         * ax.c: Include rsp-low.h.
4191         * Makefile.in (SFILES): Add common/rsp-low.c.
4192         (OBS): Add rsp-low.o.
4193         (rsp-low.o): New target.
4194
4195 2014-02-12  Tom Tromey  <tromey@redhat.com>
4196
4197         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4198         Include print-utils.h.
4199         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4200         (plongest, thirty_two, phex_nz): Remove.
4201         * Makefile.in (SFILES): Add common/print-utils.c.
4202         (OBS): Add print-utils.o.
4203         (print-utils-ipa.o): New target.
4204         (print-utils.o): New target.
4205         (IPA_OBJS): Add print-utils-ipa.o.
4206
4207 2014-02-06  Tom Tromey  <tromey@redhat.com>
4208
4209         * Makefile.in (SFILES): Fix indentation.
4210
4211 2014-02-05  Doug Evans  <dje@google.com>
4212
4213         * linux-low.c (linux_wait_for_event): Improve comment.
4214         (linux_wait_1): Keep current_inferior in sync with event_child.
4215
4216 2014-01-22  Doug Evans  <dje@google.com>
4217
4218         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4219
4220 2014-01-22  Doug Evans  <dje@google.com>
4221
4222         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4223         * configure: Regenerate.
4224         * config.in: Regenerate.
4225         * Makefile.in (SFILES): Add debug.c.
4226         (OBS): Add debug.o.
4227         * debug.c: New file.
4228         * debug.h: New file.
4229         * linux-aarch64-low.c (*): Update all debugging printfs to use
4230         debug_printf instead of fprintf.
4231         * linux-arm-low.c (*): Ditto.
4232         * linux-cris-low.c (*): Ditto.
4233         * linux-crisv32-low.c (*): Ditto.
4234         * linux-m32r-low.c (*): Ditto.
4235         * linux-sparc-low.c (*): Ditto.
4236         * linux-x86.c (*): Ditto.
4237         * linux-low.c (*): Ditto.
4238         (linux_wait_1): Add calls to debug_enter, debug_exit.
4239         (linux_wait): Remove redundant debugging printf.
4240         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4241         (linux_resume, unstop_all_lwps): Ditto.
4242         * mem-break.c (*): Update all debugging printfs to use
4243         debug_printf instead of fprintf.
4244         * remote-utils.c (*): Ditto.
4245         * thread-db.c (*): Ditto.
4246         * server.c #include <ctype.h>, "gdb_vecs.h".
4247         (debug_threads): Moved to debug.c.
4248         (*): Update all debugging printfs to use debug_printf instead of
4249         fprintf.
4250         (start_inferior): Replace call to fflush with call to debug_flush.
4251         (monitor_show_help): Mention set debug-format.
4252         (parse_debug_format_options): New function.
4253         (handle_monitor_command): Handle "monitor set debug-format".
4254         (gdbserver_usage): Mention --debug-format.
4255         (main): Parse --debug-format.
4256         * server.h (debug_threads): Declaration moved to debug.h.
4257         #include "debug.h".
4258         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4259         trace_debug_1 that uses debug_printf.
4260         (tracepoint_look_up_symbols): Update all debugging printfs to use
4261         debug_printf instead of fprintf.
4262
4263 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4264
4265         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4266         sys/ptrace.h.
4267
4268 2014-01-17  Pedro Alves  <palves@redhat.com>
4269
4270         PR build/16445
4271         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4272         defined after including gdb_proc_service.h.
4273
4274 2014-01-16  Doug Evans  <dje@google.com>
4275
4276         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4277         (match_dll): Use it.
4278
4279 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4280
4281         * target.h (target_ops) <read_btrace>: Change parameters and
4282         return type to allow error reporting.
4283         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4284         trace reading errors on.
4285         * linux-low.c (linux_low_read_btrace): Pass trace reading
4286         errors on.
4287         (linux_low_disable_btrace): New.
4288
4289 2014-01-15  Doug Evans  <dje@google.com>
4290
4291         * inferiors.c (thread_id_to_gdb_id): Delete.
4292         * inferiors.h (thread_id_to_gdb_id): Delete.
4293
4294 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4295
4296         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4297         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4298         versions.
4299
4300 2014-01-08  Pedro Alves  <palves@redhat.com>
4301
4302         * server.c (handle_status): Don't discard previous queued stop
4303         replies or thread's pending status here.
4304         (main) <disconnection>: Do it here instead.
4305
4306 2014-01-08  Pedro Alves  <palves@redhat.com>
4307
4308         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4309         * server.c (visit_actioned_threads, handle_pending_status): New
4310         function.
4311         (handle_v_cont): Factor out parts to ...
4312         (resume): ... this new function.  If in all-stop, and a thread
4313         being resumed has a pending status, report it without actually
4314         resuming.
4315         (myresume): Adjust to use the new 'resume' function.
4316         (clear_pending_status_callback, set_pending_status_callback)
4317         (find_status_pending_thread_callback): New functions.
4318         (handle_status): Handle the case of multiple threads having
4319         interesting statuses to report.  Report threads' real last signal
4320         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4321         with an interesting thread to report the status for, instead of
4322         always reporting the status of the first thread.
4323
4324 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4325
4326         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4327         * gdbreplay.c (gdbreplay_version): Likewise.
4328
4329 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4330
4331         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4332         iov.iov_len with the real length in use.
4333
4334 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4335
4336         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4337         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4338         for all targets that use win32-low.c.
4339         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4340         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4341
4342 2013-12-13  Pedro Alves  <palves@redhat.com>
4343
4344         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4345         if equal to TARGET_WAITKIND_LOADED.
4346         * win32-low.c (cached_status): New static global.
4347         (win32_wait): Add declaration.
4348         (do_initial_child_stuff): Flush all initial pending debug events
4349         up to the initial breakpoint.
4350         (win32_wait): If CACHED_STATUS was set, return that instead
4351         of doing a real wait.  Remove the code resuming the execution
4352         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4353         during the initial phase.  Also remove the code changing
4354         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4355         TARGET_WAITKIND_STOPPED.
4356
4357 2013-12-11  Yao Qi  <yao@codesourcery.com>
4358
4359         * notif.c (handle_notif_ack): Return 0 if no notification
4360         matches.
4361
4362 2013-11-20  Doug Evans  <dje@google.com>
4363
4364         * linux-low.c (linux_set_resume_request): Fix comment.
4365
4366 2013-11-20  Doug Evans  <dje@google.com>
4367
4368         * linux-low.c (resume_status_pending_p): Tweak comment.
4369
4370 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4371
4372         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4373         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4374         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4375         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4376         (srv_amd64_regobj): Add amd64-mpx.o.
4377         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4378         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4379         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4380         * i387-fp.c (num_pl_bnd_register) Added constant.
4381         (num_pl_bnd_cfg_registers) Added constant.
4382         (struct i387_xsave) Added reserved area and MPX fields.
4383         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4384         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4385         function.
4386         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4387         (init_registers_amd64_mpx_linux): Declare new function.
4388         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4389         (x86_64_regmap): Add MPX registers.
4390         (x86_linux_read_description): Add MPX case.
4391         (initialize_low_arch): Initialize MPX targets.
4392
4393 2013-11-18  Tom Tromey  <tromey@redhat.com>
4394
4395         * configure: Rebuild.
4396         * configure.ac: Don't check for stdlib.h.
4397         * gdbreplay.c: Unconditionally include stdlib.h.
4398
4399 2013-11-18  Tom Tromey  <tromey@redhat.com>
4400
4401         * config.in: Rebuild.
4402         * configure: Rebuild.
4403         * configure.ac: Don't use AC_HEADER_DIRENT.
4404
4405 2013-11-18  Tom Tromey  <tromey@redhat.com>
4406
4407         * server.h: Don't check HAVE_STRING_H.
4408         * gdbreplay.c: Don't check HAVE_STRING_H.
4409         * configure: Rebuild.
4410
4411 2013-11-18  Tom Tromey  <tromey@redhat.com>
4412
4413         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4414         LIBGNU.
4415
4416 2013-11-08  Tom Tromey  <tromey@redhat.com>
4417
4418         * configure, config.in: Rebuild.
4419         * configure.ac: Remove unused configury.
4420
4421 2013-11-08  Tom Tromey  <tromey@redhat.com>
4422
4423         * acinclude.m4: Include common.m4, codeset.m4.
4424         * configure, config.in: Rebuild.
4425         * configure.ac: Use GDB_AC_COMMON.
4426
4427 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4428
4429         * linux-s390-low.c (HWCAP_S390_TE): New define.
4430         (s390_arch_setup): Consider the TE field in the HWCAP for
4431         determining 'have_regset_tdb'.
4432
4433 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4434
4435         PR gdb/16014
4436         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4437         call to sizeof.
4438
4439 2013-10-02  Pedro Alves  <palves@redhat.com>
4440
4441         * server.c (process_serial_event): Don't output "GDBserver
4442         exiting" if GDB is connected through stdio.
4443         * target.c (mywait): Likewise, be silent if GDB is connected
4444         through stdio.
4445
4446 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4447
4448         * lynx-low.c (lynx_add_threads_after_attach): New function.
4449         (lynx_attach): Remove call to add_thread.  Add call to
4450         lynx_add_threads_after_attach instead.
4451
4452 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4453
4454         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4455         * config.in, configure: Regenerated.
4456
4457 2013-09-18  Yao Qi  <yao@codesourcery.com>
4458
4459         PR server/15959
4460         * server.c (start_inferior): Clear 'resume_info'.
4461
4462 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4463
4464         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4465         for each register.
4466
4467 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4468
4469         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4470         linux-tile-low.o to srv_tgtobj.
4471
4472 2013-09-16  Will Newton  <will.newton@linaro.org>
4473
4474         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4475         out regs.
4476
4477 2013-09-06  Pedro Alves  <palves@redhat.com>
4478
4479         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4480         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4481         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4482         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4483         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4484         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4485
4486 2013-09-06  Pedro Alves  <palves@redhat.com>
4487
4488         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4489         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4490
4491 2013-09-06  Pedro Alves  <palves@redhat.com>
4492
4493         * linux-amd64-ipa.c: Include tracepoint.h.
4494         * linux-i386-ipa.c: Include tracepoint.h.
4495
4496 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4497
4498         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4499         (ps_get_thread_area): New function.
4500
4501 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4502
4503         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4504         (initialize_low_arch): Call init_registers_crisv32 rather than
4505         init_register_crisv32.
4506
4507 2013-09-05  Pedro Alves  <palves@redhat.com>
4508
4509         * server.h (handle_vFile, hostio_last_error_from_errno): Move
4510         to ...
4511         * hostio.h: ... this new file.
4512         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4513         win32-low.c: Include hostio.h.
4514
4515 2013-09-05  Pedro Alves  <palves@redhat.com>
4516
4517         * server.h (gdb_client_data, handler_func, callback_handler_func)
4518         (delete_file_handler, add_file_handler, append_callback_event)
4519         (delete_callback_event, start_event_loop, initialize_event_loop):
4520         Move to event-loop.h and include it.
4521         * event-loop.h: New file.
4522
4523 2013-09-05  Pedro Alves  <palves@redhat.com>
4524
4525         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4526         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4527         (loaded_dll, unloaded_dll): Move to ...
4528         * dll.h: ... this new file.
4529         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4530
4531 2013-09-05  Pedro Alves  <palves@redhat.com>
4532
4533         * server.h (current_process, get_thread_process, all_processes)
4534         (add_inferior_to_list, for_each_inferior, current_inferior)
4535         (remove_inferior, add_process, remove_process, find_process_pid)
4536         (have_started_inferiors_p, have_attached_inferiors_p)
4537         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4538         (clear_inferiors, find_inferior, find_inferior_id)
4539         (inferior_target_data, set_inferior_target_data)
4540         (inferior_regcache_data, set_inferior_regcache_data): Move to
4541         inferiors.h, and include it.
4542         * inferiors.h: New file.
4543
4544 2013-09-05  Pedro Alves  <palves@redhat.com>
4545
4546         * server.h (struct emit_ops, current_insn_ptr, emit_error):
4547         Move ...
4548         * ax.h: ... here.
4549
4550 2013-09-05  Pedro Alves  <palves@redhat.com>
4551
4552         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4553         tracepoint.h.
4554         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4555         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4556         (handle_tracepoint_general_set, handle_tracepoint_query)
4557         (tracepoint_finished_step, tracepoint_was_hit)
4558         (release_while_stepping_state_list, current_traceframe)
4559         (in_readonly_region, traceframe_read_mem)
4560         (fetch_traceframe_registers, traceframe_read_sdata)
4561         (traceframe_read_info, struct fast_tpoint_collect_status)
4562         (fast_tracepoint_collecting, force_unlock_trace_buffer)
4563         (handle_tracepoit_bkpts, initialize_low_tracepoint)
4564         (supply_fast_tracepoint_registers)
4565         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4566         (ipa_tdesc, claim_trampoline_space)
4567         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4568         (agent_mem_read, agent_get_trace_state_variable_value)
4569         (agent_set_trace_state_variable_value, agent_tsv_read)
4570         (agent_mem_read_string, get_raw_reg_func_addr)
4571         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4572         * tracepoint.h: ... this new file.
4573
4574 2013-09-05  Pedro Alves  <palves@redhat.com>
4575
4576         * server.h (perror_with_name, error, fatal, warning, paddress)
4577         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4578         include it.
4579         * utils.h: New file.
4580
4581 2013-09-05  Pedro Alves  <palves@redhat.com>
4582
4583         * server.h (remote_debug, noack_mode, transport_is_reliable)
4584         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4585         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4586         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4587         (write_enn, initialize_async_io, enable_async_io)
4588         (disable_async_io, check_remote_input_interrupt_request)
4589         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4590         (dead_thread_notify, prepare_resume_reply)
4591         (decode_address_to_semicolon, decode_address, decode_m_packet)
4592         (decode_M_packet, decode_X_packet, decode_xfer_write)
4593         (decode_search_memory_packet, unhexify, hexify)
4594         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4595         (look_up_one_symbol, relocate_instruction)
4596         (monitor_output): Move to remote-utils.h, and include it.
4597         * remote-utils.h: New file.
4598
4599 2013-09-05  Pedro Alves  <palves@redhat.com>
4600
4601         * server.h (_): Delete.
4602
4603 2013-09-02  Pedro Alves  <palves@redhat.com>
4604
4605         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4606         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4607         allocated.
4608         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4609
4610 2013-09-02  Pierre Muller  <muller@sourceware.org>
4611
4612         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4613         or WriteProcessMemory complete successfully and handle
4614         ERROR_PARTIAL_COPY error.
4615
4616 2013-09-02  Pedro Alves  <palves@redhat.com>
4617
4618         * server.c (gdb_read_memory): Return -1 on traceframe memory read
4619         error instead of EIO.
4620
4621 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4622
4623         PR server/15604
4624         * linux-low.c: Include filestuff.h.
4625         (linux_create_inferior) <pid == 0>: Call close_most_fds.
4626         * lynx-low.c: Include filestuff.h.
4627         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4628         * server.c: Include filestuff.h.
4629         (main): Call notice_open_fds.
4630         * spu-low.c: Include filestuff.h.
4631         (spu_create_inferior) <pid == 0>: Call close_most_fds.
4632
4633 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
4634
4635         * Makefile.in: Explain why ../target and ../nat are not
4636         listed as include file search paths.
4637         (linux-waitpid.o): New object file rule.
4638         * configure.srv (srv_native_linux_obj): New variable.
4639         Replace all occurrences of linux native object files with
4640         $srv_native_linux_obj.
4641         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4642         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4643         (linux_enable_event_reporting): Remove declaration.
4644         (my_waitpid): Moved to common/linux-waitpid.c.
4645         (linux_wait_for_event): Pass ptid when calling
4646         linux_enable_event_reporting.
4647         (linux_supports_tracefork_flag): Remove.
4648         (linux_enable_event_reporting): Likewise.
4649         (linux_tracefork_grandchild): Remove.
4650         (STACK_SIZE): Moved to common/linux-ptrace.c.
4651         (linux_tracefork_child): Remove.
4652         (linux_test_for_tracefork): Remove.
4653         (linux_look_up_symbols): Call linux_supports_traceclone.
4654         (initialize_low): Remove call to linux_test_for_tracefork.
4655         * linux-low.h (PTRACE_TYPE_ARG3): Move to
4656         common/linux-ptrace.h.
4657         (PTRACE_TYPE_ARG4): Likewise.
4658         Include linux-ptrace.h.
4659
4660 2013-08-21  Pedro Alves  <palves@redhat.com>
4661
4662         * config.in: Renegerate.
4663
4664 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
4665
4666         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4667         (SFILES): Remove $(srcdir)/common/target-common.c and
4668         add $(srcdir)/target/waitstatus.c.
4669         (OBS): Remove target-common.o and add waitstatus.o.
4670         (server_h): Remove $(srcdir)/../common/target-common.h and
4671         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4672         and $(srcdir)/../target/waitstatus.h.
4673         (target-common.o): Remove.
4674         (waitstatus.o): New target object file.
4675         * target.h: Do not include target-common.h and
4676         include target/resume.h, target/wait.h and
4677         target/waitstatus.h.
4678
4679 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
4680
4681         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4682         to PTRACE_TYPE_ARG3.
4683         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4684         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4685         PTRACE_TYPE_ARG4.
4686         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4687         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4688
4689 2013-07-27  Jie Zhang  <jie@codesourcery.com>
4690             Daniel Jacobowitz  <dan@codesourcery.com>
4691             Yao Qi  <yao@codesourcery.com>
4692
4693         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4694         (mips-linux-watch.o): New rule.
4695         (mips_linux_watch_h): New variable.
4696         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4697         srv_tgtobj.
4698         * linux-mips-low.c: Include mips-linux-watch.h.
4699         (struct arch_process_info, struct arch_lwp_info): New.
4700         (update_watch_registers_callback): New function.
4701         (mips_linux_new_process, mips_linux_new_thread) New functions.
4702         (mips_linux_prepare_to_resume, mips_insert_point): New
4703         functions.
4704         (mips_remove_point, mips_stopped_by_watchpoint): New
4705         functions.
4706         (rsp_bp_type_to_target_hw_bp_type): New function.
4707         (mips_stopped_data_address): New function.
4708         (the_low_target): Add watchpoint support functions.
4709
4710 2013-07-27  Yao Qi  <yao@codesourcery.com>
4711
4712         * i386-low.c: Include break-common.h.
4713         (enum target_hw_bp_type): Remove.
4714
4715 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
4716
4717         * Makefile.in (SFILES): /common/target-common.c.
4718         (OBS): Add target-common.o.
4719         (server_h): Add $(srcdir)/../common/target-common.h.
4720         (target-common.o): New target.
4721         * server.c (queue_stop_reply_callback): Free
4722         status string after use.
4723         * target.c (target_waitstatus_to_string): Remove.
4724         * target.h: Include target-common.h.
4725         (resume_kind): Likewise.
4726         (target_waitkind): Likewise.
4727         (target_waitstatus): Likewise.
4728         (TARGET_WNOHANG): Likewise.
4729
4730 2013-07-04  Yao Qi  <yao@codesourcery.com>
4731
4732         * Makefile.in (host_alias): Use @host_noncanonical@.
4733         (target_alias): Use @target_noncanonical@.
4734         * configure.ac: Use ACX_NONCANONICAL_TARGET and
4735         ACX_NONCANONICAL_HOST.
4736         * configure: Regenerated.
4737
4738         Revert:
4739         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4740
4741         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4742         * configure: Rebuild.
4743         * Makefile.in (version_host, version_target): Get from configure.
4744         (version.c): Use $(version_host) and $(version_target).
4745
4746 2013-07-03  Pedro Alves  <palves@redhat.com>
4747
4748         * Makefile.in (config.status): Depend on development.sh.
4749         * acinclude.m4: Include libmcheck.m4.
4750         * configure: Regenerate.
4751
4752 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4753
4754         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4755         attribute inside the parentheses.
4756         (winapi_DebugSetProcessKillOnExit): Ditto.
4757         (winapi_DebugBreakProcess): Ditto.
4758         (winapi_GenerateConsoleCtrlEvent): Ditto.
4759
4760 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4761
4762         * notif.h (notif_event): Add a dummy member to avoid compiler
4763         errors.
4764
4765 2013-07-01  Pedro Alves  <palves@redhat.com>
4766
4767         * hostio.c (HOSTIO_PATH_MAX): Define.
4768         (require_filename, handle_open, handle_unlink, handle_readlink):
4769         Use it.
4770
4771 2013-07-01  Pedro Alves  <palves@redhat.com>
4772
4773         * server.h: Include "pathmax.h".
4774         * linux-low.c: Don't include sys/param.h.
4775         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4776         MAXPATHLEN.
4777         * win32-low.c: Don't include sys/param.h.
4778         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4779
4780 2013-07-01  Pedro Alves  <palves@redhat.com>
4781
4782         * event-loop.c: Don't check HAVE_UNISTD_H before including
4783         <unistd.h>.
4784         * gdbreplay.c: Likewise.
4785         * remote-utils.c: Likewise.
4786         * server.c: Likewise.
4787         * configure.ac: Don't check for unistd.h.
4788         * configure: Regenerate.
4789
4790 2013-06-28  Tom Tromey  <tromey@redhat.com>
4791
4792         * Makefile.in (version.c): Use version.in, not
4793         common/version.in.
4794
4795 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4796
4797         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4798         * configure: Rebuild.
4799         * Makefile.in (version_host, version_target): Get from configure.
4800         (version.c): Use $(version_host) and $(version_target).
4801
4802 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4803
4804         Fix trace-status to output user name without trailing colon.
4805         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4806
4807 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4808
4809         Fix trace-status to output proper start-time and stop-time.
4810         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4811         output start time and stop time in hex as gdb expects.
4812
4813 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
4814
4815         * tracepoint.c (build_traceframe_info_xml): Output trace state
4816         variables present in the trace buffer.
4817
4818 2013-06-24  Tom Tromey  <tromey@redhat.com>
4819
4820         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4821         create-version.sh.
4822         (version.o): Remove.
4823         * gdbreplay.c: Include version.h.
4824         (version, host_name): Don't declare.
4825         * server.h: Include version.h.
4826         (version, host_name): Don't declare.
4827
4828 2013-06-12  Pedro Alves  <palves@redhat.com>
4829
4830         * linux-x86-low.c (linux_is_elf64): Delete global.
4831         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4832         with local linux_pid_exe_is_elf_64_file use.
4833
4834 2013-06-11  Pedro Alves  <palves@redhat.com>
4835
4836         * linux-low.c (regset_disabled, disable_regset): New functions.
4837         (regsets_fetch_inferior_registers)
4838         (regsets_store_inferior_registers): Use them.
4839         (initialize_regsets_info); Don't allocate the disabled_regsets
4840         array here.
4841         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4842         comment.
4843
4844 2013-06-11  Pedro Alves  <palves@redhat.com>
4845
4846         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4847         xmalloc.
4848
4849 2013-06-11  Pedro Alves  <palves@redhat.com>
4850
4851         * linux-x86-low.c (initialize_low_arch): Call
4852         init_registers_x32_avx_linux.
4853
4854 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
4855
4856         Fix compatibility with Android Bionic.
4857         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4858         it is not empty.
4859
4860 2013-06-07  Pedro Alves  <palves@redhat.com>
4861
4862         PR server/14823
4863         * Makefile.in (OBS): Add tdesc.o.
4864         (IPA_OBJS): Add tdesc-ipa.o.
4865         (tdesc-ipa.o): New rule.
4866         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4867         interface.
4868         * linux-low.c (new_inferior): Delete.
4869         (disabled_regsets, num_regsets): Delete.
4870         (linux_add_process): Adjust to set the new per-process
4871         new_inferior flag.
4872         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4873         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
4874         was a stop.  When calling arch_setup, switch the current inferior
4875         to the thread that got an event.
4876         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4877         (regsets_fetch_inferior_registers)
4878         (regsets_store_inferior_registers): New regsets_info parameter.
4879         Adjust to use it.
4880         (linux_register_in_regsets): New regs_info parameter.  Adjust to
4881         use it.
4882         (register_addr, fetch_register, store_register): New usrregs_info
4883         parameter.  Adjust to use it.
4884         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4885         parameter regs_info.  Adjust to use it.
4886         (linux_fetch_registers): Get the current inferior's regs_info, and
4887         adjust to use it.
4888         (linux_store_registers): Ditto.
4889         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4890         (initialize_low): Don't initialize the target_regsets here.  Call
4891         initialize_low_arch.
4892         * linux-low.h (target_regsets): Delete declaration.
4893         (struct regsets_info): New.
4894         (struct usrregs_info): New.
4895         (struct regs_info): New.
4896         (struct process_info_private) <new_inferior>: New field.
4897         (struct linux_target_ops): Delete the num_regs, regmap, and
4898         regset_bitmap fields.  New field regs_info.
4899         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4900         * i387-fp.c (num_xmm_registers): Delete.
4901         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4902         calls to new interface.
4903         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4904         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4905         Infer the number of xmm registers from the regcache's target
4906         description.
4907         * i387-fp.h (num_xmm_registers): Delete.
4908         * inferiors.c (add_thread): Don't install the thread's regcache
4909         here.
4910         * proc-service.c (gregset_info): Fetch the current inferior's
4911         regs_info.  Adjust to use it.
4912         * regcache.c: Include tdesc.h.
4913         (register_bytes, reg_defs, num_registers)
4914         (gdbserver_expedite_regs): Delete.
4915         (get_thread_regcache): If the thread doesn't have a regcache yet,
4916         create one, instead of aborting gdbserver.
4917         (regcache_invalidate_one): Rename to ...
4918         (regcache_invalidate_thread): ... this.
4919         (regcache_invalidate_one): New.
4920         (regcache_invalidate): Only invalidate registers of the current
4921         process.
4922         (init_register_cache): Add target_desc parameter, and use it.
4923         (new_register_cache): Ditto.  Assert the target description has a
4924         non zero registers_size.
4925         (regcache_cpy): Add assertions.  Adjust.
4926         (realloc_register_cache, set_register_cache): Delete.
4927         (registers_to_string, registers_from_string): Adjust.
4928         (find_register_by_name, find_regno, find_register_by_number)
4929         (register_cache_size): Add target_desc parameter, and use it.
4930         (free_register_cache_thread, free_register_cache_thread_one)
4931         (regcache_release, register_cache_size): New.
4932         (register_size): Add target_desc parameter, and use it.
4933         (register_data, supply_register, supply_register_zeroed)
4934         (supply_regblock, supply_register_by_name, collect_register)
4935         (collect_register_as_string, collect_register_by_name): Adjust.
4936         * regcache.h (struct target_desc): Forward declare.
4937         (struct regcache) <tdesc>: New field.
4938         (init_register_cache, new_register_cache): Add target_desc
4939         parameter.
4940         (regcache_invalidate_thread): Declare.
4941         (regcache_invalidate_one): Delete declaration.
4942         (regcache_release): Declare.
4943         (find_register_by_number, register_cache_size, register_size)
4944         (find_regno): Add target_desc parameter.
4945         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4946         declarations.
4947         * remote-utils.c: Include tdesc.h.
4948         (outreg, prepare_resume_reply): Adjust.
4949         * server.c: Include tdesc.h.
4950         (gdbserver_xmltarget): Delete declaration.
4951         (get_features_xml, process_serial_event): Adjust.
4952         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4953         declare.
4954         (struct process_info) <tdesc>: New field.
4955         (ipa_tdesc): Declare.
4956         * tdesc.c: New file.
4957         * tdesc.h: New file.
4958         * tracepoint.c: Include tdesc.h.
4959         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4960         (get_context_regcache): Adjust to pass ipa_tdesc down.
4961         (do_action_at_tracepoint): Adjust to get the register cache size
4962         from the context regcache's description.
4963         (traceframe_walk_blocks): Adjust to get the register cache size
4964         from the current trace frame's description.
4965         (traceframe_get_pc): Adjust to get current trace frame's
4966         description and pass it down.
4967         (gdb_collect): Adjust to get the register cache size from the
4968         IPA's description.
4969         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4970         (gdbserver_xmltarget): Delete.
4971         (initialize_low_tracepoint): Set the ipa's target description.
4972         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4973         (initialize_low_tracepoint): Set the ipa's target description.
4974         * linux-x86-low.c: Include tdesc.h.
4975         [__x86_64__] (is_64bit_tdesc): New.
4976         (ps_get_thread_area, x86_get_thread_area): Use it.
4977         (i386_cannot_store_register): Rename to ...
4978         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
4979         (i386_cannot_fetch_register): Rename to ...
4980         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
4981         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4982         to new interface.
4983         (target_regsets): Rename to ...
4984         (x86_regsets): ... this.
4985         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4986         interface.
4987         (x86_siginfo_fixup): Use is_64bit_tdesc.
4988         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4989         (tdesc_x32_avx_linux, tdesc_x32_linux)
4990         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4991         Declare.
4992         (x86_linux_update_xmltarget): Delete.
4993         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4994         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4995         (AMD64_LINUX_USER64_CS): New.
4996         (x86_linux_read_description): New, based on
4997         x86_linux_update_xmltarget.
4998         (same_process_callback): New.
4999         (x86_arch_setup_process_callback): New.
5000         (x86_linux_update_xmltarget): New.
5001         (x86_regsets_info): New.
5002         (amd64_linux_regs_info): New.
5003         (i386_linux_usrregs_info): New.
5004         (i386_linux_regs_info): New.
5005         (x86_linux_regs_info): New.
5006         (x86_arch_setup): Reimplement.
5007         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5008         (x86_emit_ops): Ditto.
5009         (the_low_target): Adjust.  Install x86_linux_regs_info,
5010         x86_cannot_fetch_register, and x86_cannot_store_register.
5011         (initialize_low_arch): New.
5012         * linux-ia64-low.c (tdesc_ia64): Declare.
5013         (ia64_fetch_register): Adjust.
5014         (ia64_usrregs_info, regs_info): New globals.
5015         (ia64_regs_info): New function.
5016         (the_low_target): Adjust.
5017         (initialize_low_arch): New function.
5018         * linux-sparc-low.c (tdesc_sparc64): Declare.
5019         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5020         Adjust.
5021         (sparc_arch_setup): New function.
5022         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5023         (the_low_target): Adjust.
5024         (initialize_low_arch): New function.
5025         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5026         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5027         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5028         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5029         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5030         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5031         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5032         (tdesc_powerpc_isa205_vsx64l): Declare.
5033         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5034         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5035         (ppc_set_pc, ppc_get_hwcap): Adjust.
5036         (ppc_usrregs_info): Forward declare.
5037         (!__powerpc64__) ppc_regmap_adjusted: New global.
5038         (ppc_arch_setup): Adjust to the current process'es target
5039         description.
5040         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5041         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5042         (ppc_store_evrregset): Adjust.
5043         (target_regsets): Rename to ...
5044         (ppc_regsets): ... this, and make static.
5045         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5046         (ppc_regs_info): New function.
5047         (the_low_target): Adjust.
5048         (initialize_low_arch): New function.
5049         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5050         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5051         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5052         (tdesc_s390x_linux64v2): Declare.
5053         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5054         (s390_fill_gregset, s390_store_last_break): Adjust.
5055         (target_regsets): Rename to ...
5056         (s390_regsets): ... this, and make static.
5057         (s390_get_pc, s390_set_pc): Adjust.
5058         (s390_get_hwcap): New target_desc parameter, and use it.
5059         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5060         (s390_arch_setup): Adjust to set the current process'es target
5061         description.  Don't adjust the regmap.
5062         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5063         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5064         (regs_info_3264): New globals.
5065         (s390_regs_info): New function.
5066         (the_low_target): Adjust.
5067         (initialize_low_arch): New function.
5068         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5069         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5070         [__mips64] (init_registers_mips_linux)
5071         (init_registers_mips_dsp_linux): Delete defines.
5072         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5073         (have_dsp): New global.
5074         (mips_read_description): New, based on mips_arch_setup.
5075         (mips_arch_setup): Reimplement.
5076         (get_usrregs_info): New function.
5077         (mips_cannot_fetch_register, mips_cannot_store_register)
5078         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5079         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5080         (target_regsets): Rename to ...
5081         (mips_regsets): ... this, and make static.
5082         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5083         (dsp_regs_info, regs_info): New globals.
5084         (mips_regs_info): New function.
5085         (the_low_target): Adjust.
5086         (initialize_low_arch): New function.
5087         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5088         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5089         Declare.
5090         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5091         (arm_read_description): New, with bits factored from
5092         arm_arch_setup.
5093         (arm_arch_setup): Reimplement.
5094         (target_regsets): Rename to ...
5095         (arm_regsets): ... this, and make static.
5096         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5097         (arm_regs_info): New function.
5098         (the_low_target): Adjust.
5099         (initialize_low_arch): New function.
5100         * linux-m68k-low.c (tdesc_m68k): Declare.
5101         (target_regsets): Rename to ...
5102         (m68k_regsets): ... this, and make static.
5103         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5104         (m68k_regs_info): New function.
5105         (m68k_arch_setup): New function.
5106         (the_low_target): Adjust.
5107         (initialize_low_arch): New function.
5108         * linux-sh-low.c (tdesc_sharch): Declare.
5109         (target_regsets): Rename to ...
5110         (sh_regsets): ... this, and make static.
5111         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5112         (sh_regs_info, sh_arch_setup): New functions.
5113         (the_low_target): Adjust.
5114         (initialize_low_arch): New function.
5115         * linux-bfin-low.c (tdesc_bfin): Declare.
5116         (bfin_arch_setup): New function.
5117         (bfin_usrregs_info, regs_info): New globals.
5118         (bfin_regs_info): New function.
5119         (the_low_target): Adjust.
5120         (initialize_low_arch): New function.
5121         * linux-cris-low.c (tdesc_cris): Declare.
5122         (cris_arch_setup): New function.
5123         (cris_usrregs_info, regs_info): New globals.
5124         (cris_regs_info): New function.
5125         (the_low_target): Adjust.
5126         (initialize_low_arch): New function.
5127         * linux-cris-low.c (tdesc_crisv32): Declare.
5128         (cris_arch_setup): New function.
5129         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5130         (cris_regs_info): New function.
5131         (the_low_target): Adjust.
5132         (initialize_low_arch): New function.
5133         * linux-m32r-low.c (tdesc_m32r): Declare.
5134         (m32r_arch_setup): New function.
5135         (m32r_usrregs_info, regs_info): New globals.
5136         (m32r_regs_info): Adjust.
5137         (initialize_low_arch): New function.
5138         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5139         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5140         (tic6x_usrregs_info): Forward declare.
5141         (tic6x_read_description): New function, based on ...
5142         (tic6x_arch_setup): ... this.  Reimplement.
5143         (target_regsets): Rename to ...
5144         (tic6x_regsets): ... this, and make static.
5145         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5146         (tic6x_regs_info): New function.
5147         (the_low_target): Adjust.
5148         (initialize_low_arch): New function.
5149         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5150         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5151         (target_regsets): Rename to ...
5152         (xtensa_regsets): ... this, and make static.
5153         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5154         globals.
5155         (xtensa_arch_setup, xtensa_regs_info): New functions.
5156         (the_low_target): Adjust.
5157         (initialize_low_arch): New function.
5158         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5159         (nios2_arch_setup): Set the current process'es tdesc.
5160         (target_regsets): Rename to ...
5161         (nios2_regsets): ... this.
5162         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5163         (nios2_regs_info): New function.
5164         (the_low_target): Adjust.
5165         (initialize_low_arch): New function.
5166         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5167         (aarch64_arch_setup): Set the current process'es tdesc.
5168         (target_regsets): Rename to ...
5169         (aarch64_regsets): ... this.
5170         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5171         (aarch64_regs_info): New function.
5172         (the_low_target): Adjust.
5173         (initialize_low_arch): New function.
5174         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5175         globals.
5176         (target_regsets): Rename to ...
5177         (tile_regsets): ... this.
5178         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5179         (tile_regs_info): New function.
5180         (tile_arch_setup): Set the current process'es tdesc.
5181         (the_low_target): Adjust.
5182         (initialize_low_arch): New function.
5183         * spu-low.c (tdesc_spu): Declare.
5184         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5185         * win32-arm-low.c (tdesc_arm): Declare.
5186         (arm_arch_setup): New function.
5187         (the_low_target): Install arm_arch_setup instead of
5188         init_registers_arm.
5189         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5190         (init_windows_x86): Rename to ...
5191         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5192         (the_low_target): Adjust.
5193         * win32-low.c (win32_tdesc): New global.
5194         (child_add_thread): Don't create the thread cache here.
5195         (do_initial_child_stuff): Set the new process'es tdesc.
5196         * win32-low.h (struct target_desc): Forward declare.
5197         (win32_tdesc): Declare.
5198         * lynx-i386-low.c (tdesc_i386): Declare global.
5199         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5200         * lynx-low.c (lynx_tdesc): New global.
5201         (lynx_add_process): Set the new process'es tdesc.
5202         * lynx-low.h (struct target_desc): Forward declare.
5203         (lynx_tdesc): Declare global.
5204         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5205         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5206         * nto-low.c (nto_tdesc): New global.
5207         (do_attach): Set the new process'es tdesc.
5208         * nto-low.h (struct target_desc): Forward declare.
5209         (nto_tdesc): Declare.
5210         * nto-x86-low.c (tdesc_i386): Declare.
5211         (nto_x86_arch_setup): Set `nto_tdesc'.
5212
5213 2013-06-04  Gary Benson  <gbenson@redhat.com>
5214
5215         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5216         to qSupported response when appropriate.
5217         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5218         with nonzero-length annex.
5219         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5220         arguments supplied in annex.
5221
5222 2013-05-31  Doug Evans  <dje@google.com>
5223
5224         PR server/15594
5225         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5226         64 bits in 64-cross-32 environment.
5227
5228 2013-05-28  Pedro Alves  <palves@redhat.com>
5229
5230         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5231         (aarch64-without-fpu.c): Delete rule.
5232         * configure.srv (aarch64*-*-linux*): Remove references to
5233         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5234         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5235         declaration.
5236
5237 2013-05-24  Pedro Alves  <palves@redhat.com>
5238
5239         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5240         instead of strchr/decode_address.  Error if the range isn't split
5241         with a ','.  Don't assume there's be a ':' in the action.
5242
5243 2013-05-23  Yao Qi  <yao@codesourcery.com>
5244             Pedro Alves  <palves@redhat.com>
5245
5246         * linux-low.c (lwp_in_step_range): New function.
5247         (linux_wait_1): If the thread was range stepping and stopped
5248         outside the stepping range, report the stop to GDB.  Otherwise,
5249         continue stepping.  Add range stepping debug output.
5250         (linux_set_resume_request): Copy the step range from the resume
5251         request to the lwp.
5252         (linux_supports_range_stepping): New.
5253         (linux_target_ops) <supports_range_stepping>: Set to
5254         linux_supports_range_stepping.
5255         * linux-low.h (struct linux_target_ops)
5256         <supports_range_stepping>: New field.
5257         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5258         * linux-x86-low.c (x86_supports_range_stepping): New.
5259         (the_low_target) <supports_range_stepping>: Set to
5260         x86_supports_range_stepping.
5261         * server.c (handle_v_cont): Handle 'r' action.
5262         (handle_v_requests): Append ";r" if the target supports range
5263         stepping.
5264         * target.h (struct thread_resume) <step_range_start,
5265         step_range_end>: New fields.
5266         (struct target_ops) <supports_range_stepping>:
5267         New field.
5268         (target_supports_range_stepping): New macro.
5269
5270 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5271
5272         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5273         confusion in comment.
5274
5275 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5276
5277         * lynx-low.c (struct process_info_private): New type.
5278         (lynx_add_process): New function.
5279         (lynx_create_inferior, lynx_attach): Replace calls to
5280         add_process by calls to lynx_add_process.
5281         (lynx_resume): If PTID is null, then try using
5282         current_process()->private->last_wait_event_ptid.
5283         Add comments.
5284         (lynx_clear_inferiors): Delete.  The contents of that function
5285         has been inlined in lynx_mourn;
5286         (lynx_wait_1): Save the ptid in the process's private data.
5287         (lynx_mourn): Free the process' private data.  Replace call
5288         to lynx_clear_inferiors by call to clear_inferiors.
5289
5290 2013-05-17  Yao Qi  <yao@codesourcery.com>
5291
5292         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5293         the right place.
5294
5295 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5296
5297         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5298         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5299         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5300         PT_TEXT_END_ADDR guards.  Update comments.
5301         (linux_target_op) <read_offsets>: Conditionally define to
5302         linux_read_offsets if the target is UCLIBC and if it defines
5303         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5304
5305 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5306             Andrew Jenner  <andrew@codesourcery.com>
5307
5308         * Makefile.in (SFILES): Add linux-nios2-low.c.
5309         (clean): Add action to delete nios2-linux.c.
5310         (nios2-linux.c): New rule.
5311         * configure.srv: Add nios2*-*-linux*.
5312         * linux-nios2-low.c: New.
5313
5314 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5315
5316         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5317
5318 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5319
5320         PR gdb/15186
5321         * ax.c (ax_printf): Add fflush.
5322
5323 2013-04-22  Tom Tromey  <tromey@redhat.com>
5324
5325         * Makefile.in (SFILES): Add filestuff.c.
5326         (OBS): Add filestuff.o.
5327         (filestuff.o): New target.
5328         * config.in, configure: Rebuild.
5329         * configure.ac: Check for fdwalk, pipe2.
5330
5331 2013-04-17  Pedro Alves  <palves@redhat.com>
5332
5333         * configure.ac (USE_THREAD_DB): Delete variable.
5334         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5335         Don't AC_SUBST USE_THREAD_DB.
5336         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5337         * config.in, configure: Regenerate.
5338
5339 2013-04-16  Pedro Alves  <palves@redhat.com>
5340
5341         * linux-low.h (struct lwp_info) <thread_known>: Move under
5342         the USE_THREAD_DB #ifdef.
5343
5344 2013-04-16  Pedro Alves  <palves@redhat.com>
5345
5346         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5347         (linux-low.o): Delete rule.
5348         * linux-low.h: Always include "gdb_thread_db.h" instead of
5349         conditionally including thread_db.h.
5350         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5351         HAVE_THREAD_DB_H.
5352
5353 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5354
5355         * Makefile.in (install-only): Fix make install regression.
5356
5357 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5358
5359         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5360         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5361         installation.
5362         * gdbserver.1: Remove.
5363
5364 2013-03-22  Pedro Alves  <palves@redhat.com>
5365
5366         * linux-low.c (handle_extended_wait): Don't call
5367         linux_enable_event_reporting.
5368
5369 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5370
5371         PR build/9098:
5372         * Makefile.in (SHELL): Use @SHELL@.
5373
5374 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5375
5376         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5377         compiler warning.
5378
5379 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5380
5381         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5382         Remove extraneous NULL element.
5383
5384 2013-03-13  Yao Qi  <yao@codesourcery.com>
5385
5386         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5387         'V' block in trace frame.
5388
5389 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5390
5391         * target.h (struct target_ops): Add btrace ops.
5392         (target_supports_btrace): New macro.
5393         (target_enable_btrace): New macro.
5394         (target_disable_btrace): New macro.
5395         (target_read_btrace): New macro.
5396         * gdbthread.h (struct thread_info): Add btrace field.
5397         * server.c: Include btrace-common.h.
5398         (handle_btrace_general_set): New function.
5399         (handle_btrace_enable): New function.
5400         (handle_btrace_disable): New function.
5401         (handle_general_set): Call handle_btrace_general_set.
5402         (handle_qxfer_btrace): New function.
5403         (struct qxfer qxfer_packets[]): Add btrace entry.
5404         * inferiors.c (remove_thread): Disable btrace.
5405         * linux-low: Include linux-btrace.h.
5406         (linux_low_enable_btrace): New function.
5407         (linux_low_read_btrace): New function.
5408         (linux_target_ops): Add btrace ops.
5409         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5410         Add srv_linux_btrace=yes.
5411         (x86_64-*-linux*): Add linux-btrace.o.
5412         Add srv_linux_btrace=yes.
5413         * configure.ac: Define HAVE_LINUX_BTRACE.
5414         * config.in: Regenerated.
5415         * configure: Regenerated.
5416
5417 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5418
5419         * server.c (handle_qxfer): Preserve error message if -3 is
5420         returned.
5421         (qxfer): Document the -3 return value.
5422
5423 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5424
5425         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5426         (linux_btrace_h): New variable.
5427         (linux-btrace.o): New rule.
5428
5429 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5430             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5431
5432         * tracepoint.c (trace_buffer_size): New global.
5433         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5434         (init_trace_buffer): Change to one-argument function. Allocate
5435         trace buffer memory.
5436         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5437         handle QTBuffer:size packet.
5438         (cmd_bigqtbuffer_size): New function.
5439         (initialize_tracepoint): Call init_trace_buffer with
5440         DEFAULT_TRACE_BUFFER_SIZE.
5441         * server.c (handle_query): Add QTBuffer:size in the
5442         supported packets.
5443
5444 2013-03-07  Yao Qi  <yao@codesourcery.com>
5445
5446         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5447         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5448         of -1.
5449         (cmd_qtsp): Adjust condition.  Do post increment.
5450         Set cur_action and cur_step_action back to 0.
5451
5452 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5453
5454         PR server/15236
5455         * linux-low.c (linux_write_memory): Return early success if LEN is
5456         zero.
5457
5458 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5459
5460         * configure.srv: Add x86_64-*-cygwin* as target.
5461
5462 2013-02-28  Tom Tromey  <tromey@redhat.com>
5463
5464         * configure.ac: Invoke AC_SYS_LARGEFILE.
5465         * configure, config.in: Rebuild.
5466
5467 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5468
5469         * win32-low.c: Throughout, fix format strings and casts of
5470         printf-like functions to avoid type related warnings on all
5471         platforms.
5472         (get_child_debug_event): Print dwDebugEventCode as hex since
5473         that's how it's usually documented.
5474
5475 2013-02-28  Yao Qi  <yao@codesourcery.com>
5476
5477         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5478         pulongest.
5479
5480 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5481
5482         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5483         (reg-tilegx32.c): New rule.
5484         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5485         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5486         different register info initializer according to elf class.
5487         (init_registers_tilgx32): New function.  The tilegx32 register info
5488         initializer.
5489         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5490         (tile_store_gregset): Likewise.
5491
5492 2013-02-27  Yao Qi  <yao@codesourcery.com>
5493
5494         * server.c (process_point_options): Print debug message when
5495         debug_threads is true.
5496
5497 2013-02-26  Yao Qi  <yao@codesourcery.com>
5498
5499         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5500
5501 2013-02-19  Pedro Alves  <palves@redhat.com>
5502             Kai Tietz <ktietz@redhat.com>
5503
5504         PR gdb/15161
5505
5506         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5507         instead of strtoul to extract address from packet.
5508         (process_serial_event) <'z'>: Likewise.
5509
5510 2013-02-18  Yao Qi  <yao@codesourcery.com>
5511
5512         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5513
5514 2013-02-14  Pedro Alves  <palves@redhat.com>
5515
5516         Plug memory leak.
5517
5518         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5519         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5520
5521 2013-02-14  Pedro Alves  <palves@redhat.com>
5522
5523         * tracepoint.c (cmd_qtdpsrc): Use savestring.
5524
5525 2013-02-14  Pedro Alves  <palves@redhat.com>
5526
5527         * tracepoint.c (save_string): Delete.
5528         (add_tracepoint_action): Use savestring instead of save_string.
5529
5530 2013-02-12  Pedro Alves  <palves@redhat.com>
5531
5532         * linux-xtensa-low.c: Ditto.
5533         * xtensa-xtregs.c: Ditto.
5534
5535 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
5536
5537         * thread-db.c (thread_db_get_tls_address): NULL pointer check
5538         thread_db.
5539
5540 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5541
5542         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5543         aarch64_num_wp_regs and aarch64_num_bp_regs to
5544         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5545
5546 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5547
5548         * linux-aarch64-low.c (ps_get_thread_area): Replace
5549         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5550
5551 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
5552             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5553             Nigel Stephens  <nigel.stephens@arm.com>
5554             Yufeng Zhang  <yufeng.zhang@arm.com>
5555
5556         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5557         (aarch64.c, aarch64-without-fpu.c): New targets.
5558         * configure.srv (aarch64*-*-linux*): New.
5559         * linux-aarch64-low.c: New file.
5560
5561 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5562
5563         * linux-low.c (handle_extended_wait, linux_create_inferior)
5564         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5565         (dequeue_one_deferred_signal, linux_resume_one_thread)
5566         (fetch_register, linux_write_memory, linux_enable_event_reporting)
5567         (linux_tracefork_grandchild, linux_test_for_tracefork)
5568         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5569         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5570         where the argument is 0.
5571
5572 2013-01-25  Yao Qi  <yao@codesourcery.com>
5573
5574         * event-loop.c: Include "queue.h".
5575         (gdb_event_p): New typedef.
5576         (struct gdb_event) <next_event>: Remove.
5577         (event_queue): Change to QUEUE(gdb_event_p).
5578         (async_queue_event): Remove.
5579         (gdb_event_xfree): New.
5580         (initialize_event_loop): New.
5581         (process_event): Use API from QUEUE.
5582         (wait_for_event): Likewise.
5583         * server.c (main): Call initialize_event_loop.
5584         * server.h (initialize_event_loop): Declare.
5585
5586 2013-01-18  Yao Qi  <yao@codesourcery.com>
5587
5588         * ax.h (struct eval_agent_expr_context): New.
5589         (gdb_eval_agent_expr): Update declaration.
5590         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5591         TFRAME.  Add new argument CTX.
5592         * server.h (struct eval_agent_expr_context): Declare.
5593         (agent_mem_read, agent_tsv_read): Update declaration.
5594         (agent_mem_read_string): Likewise.
5595         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5596         (add_traceframe_block): Add new argument TPOINT.
5597         Increase TPOINT->traceframe_usage.
5598         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5599         eval_tracepoint_agent_expr.
5600         (condition_true_at_tracepoint): Likewise.
5601         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
5602         (agent_mem_read_string, agent_tsv_read): Likewise.
5603
5604 2013-01-16  Yao Qi  <yao@codesourcery.com>
5605
5606         * linux-low.c (linux_resume_one_lwp): Don't check
5607         'lwp->bp_reinsert != 0'.
5608
5609 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5610             Pedro Alves  <palves@redhat.com>
5611
5612         * lynx-low.c (ptrace_request_to_str): Define a temporary
5613         macro and use it to simplify this function's implementation.
5614
5615 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5616
5617         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5618         sets errno.
5619
5620 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5621
5622         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5623
5624 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5625
5626         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5627
5628 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5629
5630         * lynx-low.c (lynx_resume): Use the resume_info parameter
5631         to determine the ptid for the lynx_ptrace call, unless
5632         it is equal to minus_one_ptid, in which case we use the
5633         ptid of the current_inferior.
5634         (lynx_wait_1): After having received a thread create/exit
5635         event, resume the inferior's execution using the signaling
5636         thread's ptid, rather than the old ptid.
5637
5638 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5639
5640         * lynx-low.c (lynx_resume): Delete variable ret.
5641
5642 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
5643
5644         * gdbreplay.c (gdbreplay_version): Update copyright year.
5645         * server.c (gdbserver_version): Likewise.
5646
5647 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5648
5649         * lynx-low.c (lynx_wait_1): Add debug trace before adding
5650         new thread.
5651
5652 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5653
5654         * lynx-low.c (ptrace_request_to_str): Add handling for
5655         PTRACE_GETTRACESIG.
5656
5657 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5658
5659         * lynx-low.c (lynx_attach): Delete variable new_process.
5660
5661 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5662
5663         * lynx-low.c (lynx_create_inferior): Delete variable
5664         new_process.
5665
5666 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5667
5668         * lynx-low.c (ptrace_request_to_str): Do not handle
5669         PTRACE_GETTHREADLIST if this macro does not exist.
5670
5671 2012-12-15  Yao Qi  <yao@codesourcery.com>
5672
5673         * Makefile.in (OBS): Add notif.o.
5674         * notif.c, notif.h: New.
5675         * server.c: Include "notif.h".
5676         (struct vstop_notif) <next>: Remove.
5677         <base>: New field.
5678         (queue_stop_reply): Update.
5679         (push_event, send_next_stop_reply): Remove.
5680         (discard_queued_stop_replies): Update.
5681         (notif_stop): New variable.
5682         (handle_v_stopped): Remove.
5683         (handle_v_requests): Don't call handle_v_stopped.  Call
5684         handle_ack_notif instead.
5685         (queue_stop_reply_callback): Call notif_event_enque instead
5686         of queue_stop_reply.
5687         (handle_status): Don't call send_next_stop_reply, call
5688         notif_write_event instead.
5689         (kill_inferior_callback): Likewise.
5690         (detach_or_kill_inferior_callback): Likewise.
5691         (main): Call initialize_notif.
5692         (process_serial_event): Call QUEUE_is_empty.
5693         (handle_target_event): Call notif_push instead of push event.
5694         * server.h (push_event): Remove declaration.
5695
5696 2012-12-10  Tom Tromey  <tromey@redhat.com>
5697
5698         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5699         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5700         macros.
5701         (.c.o): Rewrite.
5702         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5703         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5704         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5705         (amd64-linux-ipa.o, ax.o): Rewrite.
5706         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5707         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5708         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5709         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5710         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5711         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5712         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5713         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5714         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5715         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5716         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5717         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5718         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5719         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5720         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5721         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5722         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5723         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5724         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5725         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5726         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5727         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5728         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5729         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5730         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5731         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5732         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5733         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5734         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5735         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5736         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5737         (reg-tilegx.o): Remove.
5738         (all_object_files): New macro.
5739         Include .deps files.
5740         * aclocal.m4, configure: Rebuild.
5741         * acinclude.m4: Include depstand.m4, lead-dot.m4.
5742         * configure.ac: Invoke ZW_CREATE_DEPDIR,
5743         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
5744
5745 2012-12-05  Tom Tromey  <tromey@redhat.com>
5746
5747         PR gdb/14917:
5748         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5749
5750 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
5751
5752         * configure.ac: Check for linux/perf_event.h.
5753         * config.in: Regenerated.
5754         * configure: Regenerated.
5755
5756 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
5757
5758         * hostio.c (handle_readlink): Decrease buffer size
5759         parameter passed to readlink by one byte.
5760
5761 2012-11-26  Yao Qi  <yao@codesourcery.com>
5762
5763         * configure.ac (build_warnings): Append '-Wempty-body'.
5764         * configure: Regenerated.
5765         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5766         body.
5767
5768 2012-11-15  Pierre Muller  <muller@sourceware.org>
5769
5770         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5771         * config.in: Regenerate.
5772         * configure: Regenerate.
5773         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5774         Use "gdb_wait.h" header instead of <sys/wait.h> header.
5775         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5776         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5777         header.
5778         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
5779         instead of <sys/wait.h> header.
5780         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5781
5782 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
5783
5784         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5785         (various make rules): Remove -DGDBSERVER
5786
5787 2012-11-09  Yao Qi  <yao@codesourcery.com>
5788
5789         * spu-low.c (current_ptid): Move it to ..
5790         * gdbthread.h: ... here.  New.
5791         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5792         * server.c (myresume, process_serial_event): Likewise.
5793         * thread-db.c (thread_db_find_new_threads): Likewise.
5794         * tracepoint.c (run_inferior_command): Likewise.
5795
5796 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
5797
5798         * server.c (handle_search_memory_1): Include access length in
5799         warning message.
5800
5801 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
5802
5803         * linux-crisv32-low.c: Fix compile errors.
5804
5805 2012-09-04  Yao Qi  <yao@codesourcery.com>
5806
5807         * tracepoint.c (cmd_qtsv): Adjust debug message.
5808         Don't check CUR_TPOINT.
5809
5810 2012-08-28  Yao Qi  <yao@codesourcery.com>
5811
5812         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5813         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5814         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5815         Remove declarations of xmalloc, xreallloc, xstrdup and
5816         freeargv.
5817         * Makefile.in (libiberty_h): New.
5818         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5819         (linux-bfin-low.o): Append dependency 'libiberty.h'.
5820
5821 2012-08-23  Yao Qi  <yao@codesourcery.com>
5822
5823         * server.h: Remove declaration of 'xsnprintf'.
5824
5825 2012-08-22  Keith Seitz  <keiths@redhat.com>
5826
5827         * server.h: Include build-gnulib-gbserver/config.h.
5828         * gdbreplay.c: Likewise.
5829
5830 2012-08-08  Doug Evans  <dje@google.com>
5831
5832         * Makefile.in (SFILES): Add gdb_vecs.c.
5833         (OBS): Add gdb_vecs.o.
5834         (gdb_vecs_h, host_defs_h): New variables.
5835         (thread-db.o): Add $(gdb_vecs_h) dependency.
5836         (gdb_vecs.o): New rule.
5837         * thread-db.c: #include "gdb_vecs.h".
5838         (thread_db_load_search): Use a vector to iterate over path elements.
5839         Handle text appearing after "$pdir".
5840
5841         * configure.ac: Add check for strstr.
5842         * config.in: Regenerate.
5843         * configure: Regenerate.
5844
5845 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
5846
5847         * hostio.c (handle_pread): If pread fails, fall back to attempting
5848         lseek/read.
5849         (handle_pwrite): Likewise for pwrite.
5850
5851 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
5852
5853         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5854         between unsupported TYPE and unimplementable ADDR/LEN combination.
5855         (arm_insert_point): Act on new return value.
5856
5857 2012-07-31  Pedro Alves  <palves@redhat.com>
5858
5859         * server.c (process_point_options): Only skip tokens if we find
5860         one that is unrecognized.  Don't treat 'X' specially while
5861         skipping unrecognized tokens.
5862
5863 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
5864
5865         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5866         to 4-byte-align HW breakpoint addresses for Thumb.
5867
5868 2012-07-27  Yao Qi  <yao@codesourcery.com>
5869
5870         PR remote/14161.
5871
5872         * server.h: Declare gdb_agent_about_to_close.
5873         * target.c (kill_inferior): Include "agent.h".
5874         New.  Send command 'kill'.
5875         * target.h (kill_inferior): Removed macro.
5876         * tracepoint.c (gdb_agent_about_to_close): New.
5877         (gdb_agent_helper_thread): Handle command 'close'.
5878         Wait endlessly until the inferior stops.
5879         Install gdb_agent_remove_socket to atexit hook.
5880         (agent_socket_name): New static variable.
5881         (gdb_agent_socket_init): Replace local variable 'name' with
5882         'agent_socket_name'.
5883         (gdb_agent_remove_socket): New.
5884
5885 2012-07-27  Yao Qi  <yao@codesourcery.com>
5886
5887         * server.c (process_point_options): Stop at 'X' when parsing.
5888
5889 2012-07-19  Michael Eager  <eager@eagercon.com>
5890
5891         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5892         to hw_execute.
5893         * linux-x86-low.c (x86_insert_point, x86_remove_point):
5894         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5895         hardware breakpoint.
5896
5897 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5898
5899         * gdbserver/linux-low.c (initialize_low): Call
5900         linux_ptrace_init_warnings.
5901
5902 2012-07-02  Doug Evans  <dje@google.com>
5903
5904         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5905         pointer to int.
5906
5907 2012-07-02  Stan Shebs  <stan@codesourcery.com>
5908
5909         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5910         (ax.o): Add it to build rule.
5911         (ax-ipa.o): Ditto.
5912         (OBS): Add format.o.
5913         (IPA_OBS): Add format.o.
5914         * server.c (handle_query): Claim support for breakpoint commands.
5915         (process_point_options): Add command case.
5916         (process_serial_event): Leave running if there are printfs in
5917         effect.
5918         * mem-break.h (any_persistent_commands): Declare.
5919         (add_breakpoint_commands): Declare.
5920         (gdb_no_commands_at_breakpoint): Declare.
5921         (run_breakpoint_commands): Declare.
5922         * mem-break.c (struct point_command_list): New struct.
5923         (struct breakpoint): New field command_list.
5924         (any_persistent_commands): New function.
5925         (add_commands_to_breakpoint): New function.
5926         (add_breakpoint_commands): New function.
5927         (gdb_no_commands_at_breakpoint): New function.
5928         (run_breakpoint_commands): New function.
5929         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5930         locally.
5931         * ax.c: Include format.h.
5932         (ax_printf): New function.
5933         (gdb_eval_agent_expr): Add printf opcode.
5934
5935 2012-06-13  Yao Qi  <yao@codesourcery.com>
5936
5937         * server.c (start_inferior): Remove duplicated writes to fields
5938         'last_resume_kind' and 'last_status' of 'current_inferior'.
5939
5940 2012-06-12  Yao Qi  <yao@codesourcery.com>
5941             Pedro Alves  <palves@redhat.com>
5942
5943         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
5944         comment.
5945         * server.c (handle_v_cont): Extend comment.
5946
5947 2012-06-11  Yao Qi  <yao@codesourcery.com>
5948
5949         * linux-low.c (linux_attach): Add 'static'.
5950
5951 2012-06-06  Yao Qi  <yao@codesourcery.com>
5952
5953         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5954
5955 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5956
5957         Fix gcc -flto compilation warning.
5958         * server.c (main): Make variable multi_mode and attach volatile.
5959
5960 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5961
5962         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5963         if the platform doesn't know about it.
5964
5965 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
5966
5967         * Makefile.in (SFILES): Add linux-tile-low.c.
5968         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5969         * configure.srv: Handle tilegx-*-linux*.
5970         * linux-tile-low.c: New file.
5971
5972 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5973
5974         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5975
5976 2012-05-24  Pedro Alves  <palves@redhat.com>
5977
5978         PR gdb/7205
5979
5980         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5981
5982 2012-05-24  Pedro Alves  <palves@redhat.com>
5983
5984         PR gdb/7205
5985
5986         Replace target_signal with gdb_signal throughout.
5987
5988 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
5989
5990         * linux-low.c (linux_store_registers): Avoid the copying sequence
5991         when no data has been retrieved by ptrace.
5992
5993 2012-05-22  Will Deacon  <will.deacon@arm.com>
5994
5995         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5996         Include asm/ptrace.h.
5997         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5998         already defined.
5999
6000 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6001
6002         * linux-low.c (linux_store_registers): Don't re-retrieve data
6003         with ptrace that has already been obtained from /proc.  Always
6004         copy any data retrieved with ptrace to the buffer supplied.
6005
6006 2012-05-11  Yao Qi  <yao@codesourcery.com>
6007             Pedro Alves  <palves@redhat.com>
6008
6009         * linux-low.c (enum stopping_threads_kind): New.
6010         (stopping_threads): Change type to `enum stopping_threads_kind'.
6011         (handle_extended_wait): If stopping and suspending threads, leave
6012         the new_lwp suspended too.
6013         (linux_wait_for_event): Adjust.
6014         (stop_all_lwps): Set `stopping_threads' to
6015         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6016         whether we're suspending threads or just stopping them.  Assert no
6017         recursion happens.
6018
6019 2012-04-29  Yao Qi  <yao@codesourcery.com>
6020
6021         * server.h: Move some code to ...
6022         * gdbthread.h: ... here.  New.
6023         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6024         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6025         (nto-low.o, win32-low.o): Likewise.
6026         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6027         * regcache.c, remote-utils.c, server.c: Likewise.
6028         * target.c, tracepoint.c, win32-low.c: Likewise.
6029
6030 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6031
6032         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6033         (PTRACE_ARG4_TYPE): Likewise.
6034         (PTRACE_XFER_TYPE): Likewise.
6035         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6036         ptrace to PTRACE_ARG3_TYPE.
6037         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6038         (PTRACE_ARG4_TYPE): Likewise.
6039         (PTRACE_XFER_TYPE): Likewise.
6040         (linux_detach_one_lwp): Cast fourth argument of
6041         ptrace to long then PTRACE_ARG4_TYPE.
6042         (regsets_fetch_inferior_registers): Cast third argument of
6043         ptrace to long then PTRACE_ARG3_TYPE.
6044         (regsets_store_inferior_registers): Likewise.
6045
6046 2012-04-20  Pedro Alves  <palves@redhat.com>
6047
6048         * configure: Regenerate.
6049
6050 2012-04-19  Pedro Alves  <palves@redhat.com>
6051
6052         * Makefile.in (GNULIB_BUILDDIR): New.
6053         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6054         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6055         (all, install-only, uninstall, clean-info, all-lib, clean): No
6056         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6057         (maintainer-clean realclean distclean): Use subdir_do.
6058         (subdir_do): New.
6059         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6060         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6061         * acinclude.m4: Include acx_configure_dir.m4.
6062         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6063         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6064         ACX_CONFIGURE_DIR.
6065         (GNULIB): New.
6066         (GNULIB_STDINT_H): Adjust.
6067         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6068         * gdbreplay.c: Include build-gnulib/config.h.
6069         * server.h: Likewise.
6070         * aclocal.m4: Regenerate.
6071         * config.in: Regenerate.
6072         * configure: Regenerate.
6073
6074 2012-04-19  Pedro Alves  <palves@redhat.com>
6075
6076         * Makefile.in (LIBGNU, INCGNU): Adjust.
6077         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6078         (all, install-only, uninstall, clean-info, all-lib, clean)
6079         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6080         * configure.ac: Adjust AC_OUTPUT output.
6081         * aclocal.m4: Regenerate.
6082         * configure: Regenerate.
6083
6084 2012-04-19  Pedro Alves  <palves@redhat.com>
6085
6086         * Makefile.in (generated_files): New.
6087         (server_h): Remove the explicit dependency on config.h, and depend
6088         on $generated_files.
6089
6090 2012-04-19  Pedro Alves  <palves@redhat.com>
6091
6092         * Makefile.in (INCGNU): Add -Ignulib.
6093
6094 2012-04-19  Pedro Alves  <palves@redhat.com>
6095
6096         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6097         (INCGNU): ... this, and spell out -I here.
6098         (GNULIB_LIB): Rename to ...
6099         (LIBGNU): ... this.
6100         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6101
6102 2012-04-19  Pedro Alves  <palves@redhat.com>
6103
6104         * config.in: Regenerate.
6105
6106 2012-04-19  Pedro Alves  <palves@redhat.com>
6107
6108         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6109         * server.h (memmem): Remove declaration.
6110         * config.in: Regenerate.
6111         * configure: Regenerate.
6112
6113 2012-04-19  Yao Qi  <yao@codesourcery.com>
6114
6115         * Makefile.in (SFILES): Add common/vec.c.
6116         (OBS): Add vec.o.
6117         (vec.o): New rule.
6118
6119 2012-04-19  Yao Qi  <yao@codesourcery.com>
6120
6121         * remote-utils.c (prepare_resume_reply): Replace with macro
6122         target_core_of_thread.
6123         * server.c (handle_qxfer_threads_proper): Likewise.
6124         * target.h (traget_core_of_thread): New macro.
6125
6126 2012-04-18  Pedro Alves  <palves@redhat.com>
6127
6128         * aclocal.m4: Regenerate.
6129         * configure: Regenerate.
6130
6131 2012-04-16  Yao Qi  <yao@codesourcery.com>
6132
6133         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6134         duplicated on address.
6135
6136 2012-04-16  Yao Qi  <yao@codesourcery.com>
6137
6138         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6139         (struct tracepoint_action_ops) <send>: New field.
6140         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6141         (agent_expr_send, x_tracepoint_action_send): New.
6142         (l_tracepoint_action_send): New.
6143         (cmd_qtdp): Download and install tracepoint
6144         according to `use_agent'.
6145         (run_inferior_command): Add one more parameter `len'.
6146         Update callers.
6147         (tracepoint_send_agent): New.
6148         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6149
6150 2012-04-16  Yao Qi  <yao@codesourcery.com>
6151
6152         * tracepoint.c (download_tracepoints): Moved to ...
6153         (cmd_qtstart): ... here.
6154
6155 2012-04-14  Yao Qi  <yao@codesourcery.com>
6156
6157         * tracepoint.c: Include inttypes.h.
6158         (struct collect_memory_action): Use sized types.
6159         (struct tracepoint): Likewise.
6160         (cmd_qtdp, stop_tracing): Update print specifiers.
6161         (cmd_qtp, response_tracepoint): Likewise.
6162         (collect_data_at_tracepoint): Likewise.
6163         (collect_data_at_step): Likewise.
6164
6165 2012-04-14  Yao Qi  <yao@codesourcery.com>
6166
6167         Import gnulib module inttypes.
6168         * aclocal.m4, config.in, configure: Regenerated.
6169
6170 2012-04-14  Yao Qi  <yao@codesourcery.com>
6171
6172         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6173         Makefile and config.status at last.
6174
6175 2012-04-13  Yao Qi  <yao@codesourcery.com>
6176
6177         * tracepoint.c: Include stdint.h unconditionally.
6178
6179 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6180
6181         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6182         on BFD_HAVE_SYS_PROCFS_TYPE.
6183         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6184         * configure: Regenerate.
6185         * config.in: Likewise.
6186
6187 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6188
6189         * Makefile.in (clean): Also remove x32.c x32-linux.c
6190         x32-avx.c x32-avx-linux.c.
6191         (x32.o): New target.
6192         (x32.c): Likewise.
6193         (x32-linux.o): Likewise.
6194         (x32-linux.c): Likewise.
6195         (x32-avx.o): Likewise.
6196         (x32-avx.c): Likewise.
6197         (x32-avx-linux.o): Likewise.
6198         (x32-avx-linux.c): Likewise.
6199
6200         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6201         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6202         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6203         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6204         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6205         i386/x32-avx-linux.xml.
6206
6207         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6208         (init_registers_x32_avx_linux): Likwise.
6209         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6210         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6211
6212 2012-04-13  Pedro Alves  <palves@redhat.com>
6213
6214         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6215         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6216         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6217         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6218         the sub-make.
6219
6220 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6221
6222         * linux-x86-low.c (compat_x32_clock_t): New.
6223         (compat_x32_siginfo_t): Likewise.
6224         (compat_x32_siginfo_from_siginfo): Likewise.
6225         (siginfo_from_compat_x32_siginfo): Likewise.
6226         (linux_is_elf64): Likewise.
6227         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6228         and siginfo_from_compat_x32_siginfo for x32.
6229         (x86_arch_setup): Set linux_is_elf64.
6230
6231 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6232
6233         PR gdb/13969
6234         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6235         e_machine field.
6236         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6237         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6238         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6239         compatible with process.
6240
6241 2012-04-12  Yao Qi  <yao@codesourcery.com>
6242
6243         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6244         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6245         (install-only, install-info, clean): Handle sub dir gnulib.
6246         (all-lib, am--refresh): New targets.
6247         (memmem.o): Remove target.
6248         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6249         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6250         (AC_REPLACE_FUNCS): Remove memmem.
6251         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6252         (AC_OUTPUT): Generate Makefile in gnulib/.
6253         * aclocal.m4, config.in, configure: Regenerated.
6254
6255 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6256
6257         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6258
6259 2012-04-05  Pedro Alves  <palves@redhat.com>
6260
6261         -Werror=strict-aliasing
6262
6263         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6264         pointer.
6265
6266 2012-04-04  Pedro Alves  <palves@redhat.com>
6267
6268         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6269         (sparc_store_gregset_from_stack, sparc_store_gregset)
6270         (sparc_breakpoint_at): Fix formatting.
6271
6272 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6273
6274         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6275         are available.
6276         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6277         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6278         * config.in: Regenerate.
6279         * configure: Likewise.
6280
6281 2012-03-29  Pedro Alves  <palves@redhat.com>
6282
6283         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6284         Correct ptrace arguments.
6285
6286 2012-03-28  Pedro Alves  <palves@redhat.com>
6287
6288         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6289         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6290         (IA64_FR1_REGNUM): New defines.
6291         (ia64_fetch_register): New.
6292         (the_low_target): Install it.
6293         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6294         field.
6295         * linux-low.c (linux_fetch_registers): Try the
6296         the_low_target.fetch_register hook first.
6297
6298         * linux-arm-low.c (the_low_target): Adjust.
6299         * linux-bfin-low.c (the_low_target): Adjust.
6300         * linux-cris-low.c (the_low_target): Adjust.
6301         * linux-crisv32-low.c (the_low_target): Adjust.
6302         * linux-m32r-low.c (the_low_target): Adjust.
6303         * linux-m68k-low.c (the_low_target): Adjust.
6304         * linux-mips-low.c (the_low_target): Adjust.
6305         * linux-ppc-low.c (the_low_target): Adjust.
6306         * linux-s390-low.c (the_low_target): Adjust.
6307         * linux-sh-low.c (the_low_target): Adjust.
6308         * linux-sparc-low.c (the_low_target): Adjust.
6309         * linux-tic6x-low.c (the_low_target): Adjust.
6310         * linux-x86-low.c (the_low_target): Adjust.
6311         * linux-xtensa-low.c (the_low_target): Adjust.
6312
6313 2012-03-26  Pedro Alves  <palves@redhat.com>
6314
6315         * server.c (handle_qxfer_libraries): Don't bail early if
6316         the_target->qxfer_libraries_svr4 is not NULL.
6317
6318 2012-03-26  Pedro Alves  <palves@redhat.com>
6319
6320         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6321
6322 2012-03-23  Pedro Alves  <palves@redhat.com>
6323
6324         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6325         "library-list-svr4" element's start tag when the the DSO list is
6326         empty.
6327
6328 2012-03-23  Pedro Alves  <palves@redhat.com>
6329
6330         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6331         a variable whose type size is the same as the inferior's pointer
6332         size.
6333
6334 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6335
6336         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6337         struct siginfo.
6338         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6339         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6340         * linux-low.h: Include <signal.h>.
6341         (struct siginfo): Remove forward declaration.
6342         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6343         struct siginfo.
6344
6345 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6346
6347         * .gitignore: Ignore more files.
6348
6349 2012-03-19  Pedro Alves  <palves@redhat.com>
6350             Jan Kratochvil  <jan.kratochvil@redhat.com>
6351
6352         * server.c (cont_thread, general_thread): Add describing comments.
6353         (start_inferior): Clear `cont_thread'.
6354         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6355         of a process.
6356
6357 2012-03-15  Yao Qi  <yao@codesourcery.com>
6358
6359         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6360         handling to ...
6361         (cmd_qtdp): ... here.
6362
6363 2012-03-15  Yao Qi  <yao@codesourcery.com>
6364
6365         * tracepoint.c (struct tracepoint_action_ops): New.
6366         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6367         (m_tracepoint_action_download): New.
6368         (r_tracepoint_action_download): New.
6369         (x_tracepoint_action_download): New.
6370         (l_tracepoint_action_download): New.
6371         (add_tracepoint_action): Install `action->ops' according type.
6372         (download_tracepoint_1): Move code `download' function pointer
6373         of various tracepoint_action_ops.
6374
6375 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6376
6377         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6378         linux_ptrace_attach_warnings.
6379
6380 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6381
6382         * Makefile.in (linux-ptrace.o): New.
6383         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6384         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6385         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6386         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6387         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6388         of these targets.
6389         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6390
6391 2012-03-08  Yao Qi  <yao@codesourcery.com>
6392             Pedro Alves  <palves@redhat.com>
6393
6394         Fix PR server/13392.
6395         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6396         offset of JMP insn.
6397         * tracepoint.c (remove_tracepoint): New.
6398         (cmd_qtdp): Call remove_tracepoint when failed to install.
6399
6400 2012-03-07  Pedro Alves  <palves@redhat.com>
6401
6402         * linux-low.c (get_detach_signal): New.
6403         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6404         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6405         ptrace call.
6406         * server.c (program_signals, program_signals_p): New.
6407         (handle_general_set): Handle QProgramSignals.
6408         * server.h (program_signals, program_signals_p): Declare.
6409
6410 2012-03-05  Pedro Alves  <palves@redhat.com>
6411             Jan Kratochvil  <jan.kratochvil@redhat.com>
6412
6413         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6414         New comment why.
6415
6416 2012-03-03  Yao Qi  <yao@codesourcery.com>
6417
6418         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6419         agent_look_up_symbols.
6420
6421 2012-03-03  Yao Qi  <yao@codesourcery.com>
6422
6423         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6424         (linux-x86-low.o): Likewise.
6425         * server.h: Remove in_process_agent_loaded.
6426         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6427         common/agent.c.
6428         Update callers.
6429
6430 2012-03-03  Yao Qi  <yao@codesourcery.com>
6431
6432         * tracepoint.c (gdb_agent_capability): New global.
6433         (in_process_agent_loaded_ust): Renamed to
6434         `in_process_agent_supports_ust'.
6435         Update callers.
6436         (in_process_agent_supports_ust): Call agent_capability_check.
6437         (clear_installed_tracepoints): Assert that agent supports
6438         agent.
6439
6440 2012-03-03  Yao Qi  <yao@codesourcery.com>
6441
6442         * linux-low.c (linux_supports_agent): New.
6443         (linux_target_ops): Initialize field `supports_agent' with
6444         linux_supports_agent.
6445         * target.h (struct target_ops) <supports_agent>: New.
6446         (target_supports_agent): New macro.
6447         * server.c (handle_general_set): Handle packet 'QAgent'.
6448         (handle_query): Send `QAgent+'.
6449         * Makefile.in (server.o): Depends on agent.h.
6450
6451 2012-03-03  Yao Qi  <yao@codesourcery.com>
6452
6453         * Makefile.in (OBS): Add agent.o.
6454         Add new rule for agent.o.
6455         Track dependence of tracepoint.c on agent.h.
6456         * tracepoint.c (run_inferior_command_1):
6457         (run_inferior_command): Call agent_run_command.
6458         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6459         common/agent.c.
6460         (resume_thread, stop_thread): Likewise.
6461         (gdb_ust_socket_init): Renamed to ...
6462         (gdb_agent_socket_init): ... New.
6463         (gdb_ust_thread): Renamed to ...
6464         (gdb_agent_helper_thread): ... New.
6465         (gdb_ust_init): Move some code to ...
6466         (gdb_agent_init): ... here.  New.
6467         [HAVE_UST]: Call gdb_ust_init.
6468         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6469         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6470         * config.in, configure: Regenerated.
6471
6472 2012-03-02  Pedro Alves  <palves@redhat.com>
6473
6474         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6475         * linux-low.c (struct simple_pid_list): New.
6476         (stopped_pids): New a struct simple_pid_list pointer.
6477         (add_to_pid_list, pull_pid_from_list): New.
6478         (handle_extended_wait): Don't assume the first signal new children
6479         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6480         (linux_wait_for_lwp): Adjust.
6481
6482 2012-03-02  Yao Qi  <yao@codesourcery.com>
6483
6484         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6485         debug log.
6486
6487 2012-03-02  Yao Qi  <yao@codesourcery.com>
6488
6489         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6490         `stop_pc' and `tpoint'.  Update caller.
6491
6492 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6493
6494         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6495         * linux-low.c (use_linux_regsets): New macro.
6496         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6497         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6498         (linux_register_in_regsets): New function.
6499         (usr_fetch_inferior_registers): Skip registers covered by
6500         regsets.
6501         (usr_store_inferior_registers): Likewise.
6502         (usr_fetch_inferior_registers): New macro.
6503         (usr_store_inferior_registers): Likewise.
6504         (linux_fetch_registers): Handle mixed regset/non-regset targets.
6505         (linux_store_registers): Likewise.
6506         * linux-mips-low.c (init_registers_mips_dsp_linux): New
6507         prototype.
6508         (init_registers_mips64_dsp_linux): Likewise.
6509         (init_registers_mips_linux): New macro.
6510         (init_registers_mips_dsp_linux): Likewise.
6511         (mips_dsp_num_regs): Likewise.
6512         (DSP_BASE, DSP_CONTROL): New fallback macros.
6513         (mips_base_regs): New macro.
6514         (mips_regmap): Use it.  Fix the size.
6515         (mips_dsp_regmap): New variable.
6516         (mips_dsp_regset_bitmap): Likewise.
6517         (mips_arch_setup): New function.
6518         (mips_cannot_fetch_register): Use the_low_target.regmap rather
6519         than mips_regmap.
6520         (mips_cannot_store_register): Likewise.
6521         (the_low_target): Update .arch_setup, .num_regs and .regmap
6522         initializers.  Add .regset_bitmap initializer.
6523         * linux-arm-low.c (the_low_target): Add .regset_bitmap
6524         initializer.
6525         * linux-bfin-low.c (the_low_target): Likewise.
6526         * linux-cris-low.c (the_low_target): Likewise.
6527         * linux-crisv32-low.c (the_low_target): Likewise.
6528         * linux-ia64-low.c (the_low_target): Likewise.
6529         * linux-m32r-low.c (the_low_target): Likewise.
6530         * linux-m68k-low.c (the_low_target): Likewise.
6531         * linux-ppc-low.c (the_low_target): Likewise.
6532         * linux-s390-low.c (the_low_target): Likewise.
6533         * linux-sh-low.c (the_low_target): Likewise.
6534         * linux-sparc-low.c (the_low_target): Likewise.
6535         * linux-tic6x-low.c (the_low_target): Likewise.
6536         * linux-x86-low.c (the_low_target): Likewise.
6537         * linux-xtensa-low.c (the_low_target): Likewise.
6538         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6539         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
6540         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6541         srv_xmlfiles.
6542         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6543         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6544
6545 2012-02-29  Yao Qi  <yao@codesourcery.com>
6546             Pedro Alves  <palves@redhat.com>
6547
6548         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6549         `step_over_finished' is true.
6550
6551 2012-02-27  Pedro Alves  <palves@redhat.com>
6552
6553         * linux-low.c (pid_is_stopped): Delete, moved to common/.
6554         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6555
6556 2012-02-27  Pedro Alves  <palves@redhat.com>
6557
6558         PR server/9684
6559         * linux-low.c (pid_is_stopped): New.
6560         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6561
6562 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
6563
6564         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6565         of conditions.
6566
6567 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
6568
6569         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6570
6571 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6572
6573         * server.c (handle_query): Advertise support for target-side
6574         breakpoint condition evaluation.
6575         (process_point_options): New function.
6576         (process_serial_event): When inserting a breakpoint, check for
6577         a target-side condition that should be evaluated.
6578
6579         * mem-break.c: Include regcache.h and ax.h.
6580         (point_cond_list_t): New data structure.
6581         (breakpoint) <cond_list>: New field.
6582         (find_gdb_breakpoint_at): Make non-static.
6583         (delete_gdb_breakpoint_at): Clear any target-side
6584         conditions.
6585         (clear_gdb_breakpoint_conditions): New function.
6586         (add_condition_to_breakpoint): Likewise.
6587         (add_breakpoint_condition): Likewise.
6588         (gdb_condition_true_at_breakpoint): Likewise.
6589         (gdb_breakpoint_here): Return result directly instead
6590         of going through a local variable.
6591
6592         * mem-break.h (find_gdb_breakpoint_at): New prototype.
6593         (clear_gdb_breakpoint_conditions): Likewise.
6594         (add_breakpoint_condition): Likewise.
6595         (gdb_condition_true_at_breakpoint): Likewise.
6596
6597         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6598         (need_step_over_p): Take target-side breakpoint condition into
6599         consideration.
6600
6601 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6602
6603         * server.h: Include tracepoint.h.
6604         (agent_mem_read, agent_get_trace_state_variable_value,
6605         agent_set_trace_state_variable_value,
6606         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6607         get_set_tsv_func_addr): New prototypes.
6608
6609         * ax.h: New include file.
6610         * ax.c: New source file.
6611
6612         * tracepoint.c: Include ax.h.
6613         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6614         agent_expr, eval_result_type): Move to ax.h.
6615         (parse_agent_expr): Rename to ...
6616         (gdb_parse_agent_expr): ... this, make it non-static and move
6617         to ax.h.
6618         (unparse_agent_expr) Rename to ...
6619         (gdb_unparse_agent_expr): ... this, make it non-static and move
6620         to ax.h.
6621         (eval_agent_expr): Rename to ...
6622         (eval_tracepoint_agent_expr): ... this.
6623         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6624         forward declarations.
6625         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6626         (agent_get_trace_state_variable_value): New function.
6627         (agent_set_trace_state_variable_value): New function.
6628         (cmd_qtdp): Call gdb_parse_agent_expr (...).
6629         (response_tracepoint): Call gdb_unparse_agent_expr (...).
6630         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6631         (condition_true_at_tracepoint): Likewise.
6632         (parse_agent_expr): Rename to ...
6633         (gdb_parse_agent_expr): ... this and move to ax.c.
6634         (unparse_agent_expr): Rename to ...
6635         (gdb_unparse_agent_expr): ... this and move to ax.c.
6636         (gdb_agent_op_name): Move to ax.c.
6637         (eval_agent_expr): Rename to ...
6638         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6639         and move to ax.c.
6640         (eval_tracepoint_agent_expr): New function.
6641         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6642         non-static.
6643         (current_insn_ptr, emit_error, struct bytecode_address): Move to
6644         ax.c.
6645         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6646         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6647         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6648         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6649         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6650         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6651         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6652         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6653         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6654         (compile_bytecodes): Remove forward declaration.
6655         (is_goto_target): Move to ax.c.
6656         (compile_bytecodes): Move to ax.c and call
6657         agent_get_trace_state_variable_value (...) and
6658         agent_set_trace_state_variable_value (...).
6659
6660         * Makefile.in: Update ax.c and IPA dependencies.
6661
6662 2012-02-24  Pedro Alves  <palves@redhat.com>
6663
6664         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6665         (cmd_bigqtbuffer_circular): ... this.  Only handle
6666         'QTBuffer:circular:'.
6667         (handle_tracepoint_general_set): Adjust.
6668
6669 2012-02-16  Yao Qi  <yao@codesourcery.com>
6670
6671         * inferiors.c: Move code to ...
6672         * dll.c: .... here.  New.
6673         * server.h: Declare clear_dlls.
6674         * Makefile.in (SFILES): Add dll.c.
6675         (OBS): Add dll.o
6676         (dll.o): New rule.
6677
6678 2012-02-11  Yao Qi  <yao@codesourcery.com>
6679
6680         * server.c: (handle_monitor_command): Add a new parameter
6681         `own_buf'.
6682         (handle_query): Update caller.
6683
6684 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
6685
6686         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6687         * configure, config.in: Regenerate.
6688         * hostio.c: Provide an alternate implementation if HAVE_READLINK
6689         is not defined.
6690
6691 2012-02-02  Pedro Alves  <palves@redhat.com>
6692
6693         Try SIGKILL first, then PTRACE_KILL.
6694         * linux-low.c (linux_kill_one_lwp): New.
6695         (linux_kill_one_lwp): Rename to ...
6696         (kill_one_lwp_callback): ... this.  Use the new
6697         linux_kill_one_lwp.
6698
6699 2012-02-02  Pedro Alves  <palves@redhat.com>
6700
6701         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6702         inferior.
6703
6704 2012-01-27  Pedro Alves  <palves@redhat.com>
6705
6706         * linux-low.c (linux_child_pid_to_exec_file): Delete.
6707         (elf_64_file_p): Make static.
6708         (linux_pid_exe_is_elf_64_file): New.
6709         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6710         Delete declarations.
6711         (linux_pid_exe_is_elf_64_file): Declare.
6712         * linux-x86-low.c (x86_arch_setup): Use
6713         linux_pid_exe_is_elf_64_file.
6714
6715 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6716
6717         * linux-low.c (linux_wait_for_event_1): Rename to ...
6718         (linux_wait_for_event): ... here and merge it with former
6719         linux_wait_for_event - new variable wait_ptid, use it.
6720         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6721
6722 2012-01-23  Pedro Alves  <palves@redhat.com>
6723
6724         * server.c (main): Avoid yet another case of infinite loop while
6725         detaching/killing after a longjmp.
6726
6727 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6728
6729         Code cleanup.
6730         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6731
6732 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
6733
6734         * hostio.c (handle_readlink): New function.
6735         (handle_vFile): Call it to handle "vFile:readlink" packets.
6736
6737 2012-01-20  Pedro Alves  <palves@redhat.com>
6738             Ulrich Weigand  <ulrich.weigand@linaro.org>
6739
6740         * server.c (handle_v_requests): Only support vAttach and vRun to
6741         start multiple processes when in extended protocol mode.
6742
6743 2012-01-17  Pedro Alves  <palves@redhat.com>
6744
6745         * tracepoint.c (initialize_tracepoint): Use mmap instead of
6746         memalign plus mprotect to allocate the scratch buffer.
6747
6748 2012-01-13  Pedro Alves  <palves@redhat.com>
6749
6750         * server.c (attach_inferior): Clear `cont_thread'.
6751
6752 2012-01-13  Pedro Alves  <palves@redhat.com>
6753
6754         * server.c (main): Avoid infinite loop while detaching/killing
6755         after a longjmp.
6756
6757 2012-01-09  Doug Evans  <dje@google.com>
6758
6759         * server.c (start_inferior): Set last_ptid in --wrapper case.
6760
6761 2012-01-06  Yao Qi  <yao@codesourcery.com>
6762
6763         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6764         defined.
6765         [IN_PROCESS_AGENT] (debug_agent): New global variable.
6766
6767 2012-01-04  Yao Qi  <yao@codesourcery.com>
6768
6769         * tracepoint.c (cmd_qtdp): Print debug message
6770         for static tracepoint.
6771
6772 2012-01-04  Yao Qi  <yao@codesourcery.com>
6773
6774         * tracepoint.c (trace_vdebug): Differentiate debug message
6775         between gdbserver and IPA.
6776
6777 2012-01-03  Yao Qi  <yao@codesourcery.com>
6778
6779         * tracepoint.c (tracepoint_was_hit): Don't collect for
6780         static tracepoint.
6781
6782 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6783
6784         * terminal.h: Reformat copyright header.
6785
6786 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6787
6788         * server.c (gdbserver_version): Update copyright year.
6789         * gdbreplay.c (gdbreplay_version): Likewise.
6790
6791 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
6792
6793         * linux-low.c (linux_create_inferior): Put empty if clause for write.
6794
6795         Revert:
6796         2011-12-18  Hui Zhu  <teawater@gmail.com>
6797         * linux-low.c (linux_create_inferior): Save return value to ret.
6798
6799 2011-12-18  Hui Zhu  <teawater@gmail.com>
6800
6801         * linux-low.c (linux_create_inferior): Save return value to ret.
6802
6803 2011-12-16  Doug Evans  <dje@google.com>
6804
6805         * linux-low.c (linux_create_inferior): If stdio connection,
6806         redirect stdin from /dev/null, stdout to stderr.
6807         * remote-utils.c (remote_is_stdio): New static global.
6808         (remote_connection_is_stdio): New function.
6809         (remote_prepare): Handle stdio connection.
6810         (remote_open): Ditto.
6811         (remote_close): Don't close stdin for stdio connections.
6812         (read_prim,write_prim): New functions.  Replace all calls to
6813         read/write to these.
6814         * server.c (main): Watch for "-" argument.  Move call to
6815         remote_prepare before start_inferior.
6816         * server.h (STDIO_CONNECTION_NAME): New macro.
6817         (remote_connection_is_stdio): Declare.
6818
6819         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6820         in debugging output.
6821
6822 2011-12-15  Yao Qi  <yao@codesourcery.com>
6823
6824         * tracepoint.c: Include sys/syscall.h.
6825         (gdb_ust_thread): Remove preprocessor conditional.
6826
6827 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
6828
6829         * linux-low.c (linux_detach_one_lwp): Call
6830         the_low_target.prepare_to_resume before detaching.
6831
6832 2011-12-14  Yao Qi  <yao@codesourcery.com>
6833
6834         * tracepoint.c (gdb_ust_thread): Don't ignore return value
6835         of write.
6836
6837 2011-12-14  Yao Qi  <yao@codesourcery.com>
6838
6839         * i386-low.c (i386_low_stopped_data_address): Initialize local
6840         variable `control'.
6841
6842 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
6843
6844         PR remote/13492
6845
6846         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6847         DR_CONTROL unless necessary.  Extend comments.
6848         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6849         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
6850
6851 2011-12-13  Yao Qi  <yao@codesourcery.com>
6852
6853         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6854         macros.
6855         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6856
6857 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
6858
6859         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6860         Print new debug message for such case.
6861
6862 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6863
6864         Fix overlapping memcpy.
6865         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
6866         the read_inferior_memory transfer.
6867         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
6868         write_inferior_memory transfer.
6869         (set_fast_tracepoint_jump): New variable buf.  Use it for the
6870         read_inferior_memory and write_inferior_memory transfers.
6871         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6872         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6873         Use it for the write_inferior_memory transfer.
6874         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6875         buffers.
6876
6877 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6878
6879         * linux-low.c (fetch_register, store_register): Make code
6880         consistent, fix formatting.
6881
6882 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6883
6884         * linux-low.c (usr_store_inferior_registers): Factor out code
6885         to handle individual registers into...
6886         (store_register): ... this new function.
6887
6888 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
6889
6890         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6891         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6892         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6893         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6894         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6895         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6896         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6897         (srv_xmlfiles): Add new XML files.
6898
6899         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6900         and <sys/uio.h>.
6901         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6902         (init_registers_s390_linux32v1): Add prototype.
6903         (init_registers_s390_linux32v2): Likewise.
6904         (init_registers_s390_linux64v1): Likewise.
6905         (init_registers_s390_linux64v2): Likewise.
6906         (init_registers_s390x_linux64v1): Likewise.
6907         (init_registers_s390x_linux64v2): Likewise.
6908         (s390_num_regs): Increment to 52.
6909         (s390_regmap): Add orig_r2 register.
6910         (s390_num_regs_3264): Increment to 68.
6911         (s390_regmap_3264): Add orig_r2 register.
6912         (s390_collect_ptrace_register): Handle orig_r2 register.
6913         (s390_supply_ptrace_register): Likewise.
6914         (s390_fill_last_break): New function.
6915         (s390_store_last_break): Likewise.
6916         (s390_fill_system_call): New function.
6917         (s390_store_system_call): Likewise.
6918         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6919         register sets.
6920         (s390_check_regset): New function.
6921         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6922         NT_S390_SYSTEM_CALL regsets and use appropriate description.
6923         Update target_regsets for available register sets.
6924
6925 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
6926             Jan Kratochvil  <jan.kratochvil@redhat.com>
6927
6928         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6929         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6930         New.
6931         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6932         * linux-low.h (struct process_info_private): New member r_debug.
6933         * server.c (handle_qxfer_libraries): Call
6934         the_target->qxfer_libraries_svr4.
6935         (handle_qxfer_libraries_svr4): New function.
6936         (qxfer_packets): New entry "libraries-svr4".
6937         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6938         * target.h (struct target_ops): New member qxfer_libraries_svr4.
6939         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6940         PACKET_qXfer_libraries_svr4.
6941
6942 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
6943
6944         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6945         PSW address/mask between 8-byte and 16-byte formats.
6946         (s390_supply_ptrace_register): Likewise.
6947         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6948         basic addressing mode bit.
6949
6950 2011-11-24  Stan Shebs  <stan@codesourcery.com>
6951
6952         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6953
6954 2011-11-17  Stan Shebs  <stan@codesourcery.com>
6955
6956         * tracepoint.c (struct tracepoint): New field traceframe_usage.
6957         (tracing_start_time): New global.
6958         (tracing_stop_time): New global.
6959         (tracing_user_name): New global.
6960         (tracing_notes): New global.
6961         (tracing_stop_note): New global.
6962         (cmd_qtstart): Set traceframe_usage, start_time.
6963         (stop_tracing): Set stop_time.
6964         (cmd_qtstatus): Report additional status.
6965         (cmd_qtp): New function.
6966         (handle_tracepoint_query): Call it.
6967         (cmd_qtnotes): New function.
6968         (handle_tracepoint_general_set): Call it.
6969         (get_timestamp): Rename from tsv_get_timestamp.
6970
6971 2011-11-14  Stan Shebs  <stan@codesourcery.com>
6972             Kwok Cheung Yeung  <kcy@codesourcery.com>
6973
6974         * linux-x86-low.c (small_jump_insn): New.
6975         (i386_install_fast_tracepoint_jump_pad): Add arguments for
6976         trampoline and error message, build a trampoline and issue a small
6977         jump instruction to it.
6978         (x86_install_fast_tracepoint_jump_pad): Add arguments for
6979         trampoline and error message.
6980         (x86_get_min_fast_tracepoint_insn_len): New.
6981         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6982         * linux-low.h (struct linux_target_ops): Add arguments to
6983         install_fast_tracepoint_jump_pad operation, add new operation.
6984         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6985         arguments.
6986         (linux_get_min_fast_tracepoint_insn_len): New function.
6987         (linux_target_op): Add new operation.
6988         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6989         (gdb_trampoline_buffer_end): Ditto.
6990         (gdb_trampoline_buffer_error): Ditto.
6991         (struct ipa_sym_addresses): Add fields for new IPA variables.
6992         (symbol_list): Add entries for new IPA variables.
6993         (struct tracepoint): Add fields to hold the address range of the
6994         trampoline used by the tracepoint.
6995         (trampoline_buffer_head): New static variable.
6996         (trampoline_buffer_tail): Ditto.
6997         (claim_trampoline_space): New function.
6998         (have_fast_tracepoint_trampoline_buffer): New function.
6999         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7000         structure.
7001         (install_fast_tracepoint): Ditto, also add error buffer argument.
7002         (cmd_qtminftpilen): New function.
7003         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7004         (fast_tracepoint_from_trampoline_address): New function.
7005         (fast_tracepoint_collecting): Handle trampoline as part of jump
7006         pad space.
7007         (set_trampoline_buffer_space): New function.
7008         (initialize_tracepoint): Initialize new IPA variables.
7009         * target.h (struct target_ops): Add arguments to
7010         install_fast_tracepoint_jump_pad operation, add new
7011         get_min_fast_tracepoint_insn_len operation.
7012         (target_get_min_fast_tracepoint_insn_len): New.
7013         (install_fast_tracepoint_jump_pad): Add arguments.
7014         * server.h (IPA_BUFSIZ): Define.
7015         * linux-i386-ipa.c: Include extra header files.
7016         (initialize_fast_tracepoint_trampoline_buffer): New function.
7017         (initialize_low_tracepoint): Call it.
7018         * server.h (set_trampoline_buffer_space): Declare.
7019         (claim_trampoline_space): Ditto.
7020         (have_fast_tracepoint_trampoline_buffer): Ditto.
7021
7022 2011-11-14  Yao Qi  <yao@codesourcery.com>
7023
7024         * server.c (handle_query): Handle InstallInTrace for qSupported.
7025         * tracepoint.c (add_tracepoint): Sort list.
7026         (install_tracepoint, download_tracepoint): New.
7027         (cmd_qtdp): Call them to install and download tracepoints.
7028         (sort_tracepoints): Removed.
7029         (cmd_qtstart): Update.
7030
7031 2011-11-14  Yao Qi  <yao@codesourcery.com>
7032
7033         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7034         * mem-break.h: Declare.
7035         * tracepoint.c (cmd_qtstart): Move some code to ...
7036         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7037         New.
7038         (download_tracepoints): Move some code to ...
7039         (download_tracepoint_1): ... here.  New.
7040
7041 2011-11-08  Yao Qi  <yao@codesourcery.com>
7042
7043         * remote-utils.c (relocate_instruction): A comment fix.
7044
7045 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7046
7047         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7048         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7049         dr_status_mirror and dr_control_mirror from debug_reg_state.
7050         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7051         (i386_initial_stuff): Remove use of deleted globals.
7052         (i386_get_thread_context, i386_set_thread_context,
7053         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7054         from debug_reg_state.
7055
7056 2011-11-05  Yao Qi  <yao@codesourcery.com>
7057
7058         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7059         address as TPOINT's.
7060
7061 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7062
7063         * tracepoint.c (agent_mem_read_string): New function.
7064         (eval_agent_expr): Call it for tracenz.
7065         * server.c (handle_query): Report support for tracenz.
7066
7067 2011-11-02  Yao Qi  <yao@codesourcery.com>
7068
7069         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7070
7071 2011-11-02  Yao Qi  <yao@codesourcery.com>
7072
7073         * target.h: Fix a typo in comment.
7074
7075 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7076
7077         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7078         clobber the breakpoints' shadows with fast tracepoint jumps.
7079         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7080         * target.c (write_inferior_memory): Also pass MYADDR down to
7081         check_mem_write.
7082
7083 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7084
7085         * configure.ac: Check support for personality routine.
7086         * configure: Regenerate.
7087         * config.in: Likewise.
7088         * linux-low.c: Include <sys/personality.h>.
7089         Define ADDR_NO_RANDOMIZE if necessary.
7090         (linux_create_inferior): Disable address space randomization when
7091         forking inferior, if requested.
7092         (linux_supports_disable_randomization): New function.
7093         (linux_target_ops): Install it.
7094         * server.h (disable_randomization): Declare.
7095         * server.c (disable_randomization): New global variable.
7096         (handle_general_set): Handle QDisableRandomization.
7097         (handle_query): Likewise for qSupported.
7098         (main): Support --disable-randomization and --no-disable-randomization
7099         command line arguments.
7100         * target.h (struct target_ops): Add supports_disable_randomization.
7101         (target_supports_disable_randomization): New macro.
7102
7103 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7104
7105         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7106         ifdef check.
7107         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7108         [!PT_GETDSBT] (target_loadmap): New definition.
7109         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7110         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7111         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7112         and PT_GETDSBT to LINUX_LOADMAP.
7113         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7114         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7115
7116 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7117
7118         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7119         (arm_linux_hwbp_cap): New static variable.
7120         (arm_linux_get_hwbp_cap): Replace by ...
7121         (arm_linux_init_hwbp_cap): ... this new function.
7122         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7123         (arm_linux_get_hw_watchpoint_count): Likewise.
7124         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7125         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7126         (arm_prepare_to_resume): Use perror_with_name instead of error.
7127
7128 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7129
7130         * linux-arm-low.c: Include <signal.h>.
7131         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7132         (struct arm_linux_hwbp_cap): New data type.
7133         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7134         (struct arm_linux_hw_breakpoint): New data type.
7135         (MAX_BPTS, MAX_WPTS): Define.
7136         (struct arch_process_info, struct arch_lwp_info): New data types.
7137         (arm_linux_get_hwbp_cap): New function.
7138         (arm_linux_get_hw_breakpoint_count): Likewise.
7139         (arm_linux_get_hw_watchpoint_count): Likewise.
7140         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7141         (arm_hwbp_control_initialize): Likewise.
7142         (arm_hwbp_control_is_enabled): Likewise.
7143         (arm_hwbp_control_is_initialized): Likewise.
7144         (arm_hwbp_control_disable): Likewise.
7145         (arm_linux_hw_breakpoint_equal): Likewise.
7146         (arm_linux_hw_point_initialize): Likewise.
7147         (struct update_registers_data): New data structure.
7148         (update_registers_callback: New function.
7149         (arm_insert_point): Likewise.
7150         (arm_remove_point): Likewise.
7151         (arm_stopped_by_watchpoint): Likewise.
7152         (arm_stopped_data_address): Likewise.
7153         (arm_new_process): Likewise.
7154         (arm_new_thread): Likewise.
7155         (arm_prepare_to_resume): Likewise.
7156         (the_low_target): Register arm_insert_point, arm_remove_point,
7157         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7158         arm_new_thread, and arm_prepare_to_resume.
7159
7160 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7161
7162         * server.h (struct emit_ops): Add compare-goto fields.
7163         * tracepoint.c (gdb_agent_op_sizes): New table.
7164         (emit_eq_goto): New function.
7165         (emit_ne_goto): New function.
7166         (emit_lt_goto): New function.
7167         (emit_le_goto): New function.
7168         (emit_gt_goto): New function.
7169         (emit_ge_goto): New function.
7170         (is_goto_target): New function.
7171         (compile_bytecodes): Recognize special cases of compare-goto
7172         combinations and call specialized emitters for them.
7173         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7174         (amd64_emit_ne_goto): New function.
7175         (amd64_emit_lt_goto): New function.
7176         (amd64_emit_le_goto): New function.
7177         (amd64_emit_gt_goto): New function.
7178         (amd64_emit_ge_goto): New function.
7179         (amd64_emit_ops): Add the new functions.
7180         (i386_emit_eq_goto): New function.
7181         (i386_emit_ne_goto): New function.
7182         (i386_emit_lt_goto): New function.
7183         (i386_emit_le_goto): New function.
7184         (i386_emit_gt_goto): New function.
7185         (i386_emit_ge_goto): New function.
7186         (i386_emit_ops): Add the new functions.
7187
7188 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7189
7190         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7191         (i386_emit_epilogue): Restore %ebx.
7192
7193 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7194
7195         * server.c (step_thread): Remove definition.
7196         (process_serial_event): Don't handle Hs.
7197         * server.h (step_thread): Remove declaration.
7198         * target.c (set_desired_inferior): Remove use of step_thread.
7199
7200 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7201
7202         * linux-low.c: Include linux-procfs.h.
7203         (linux_attach_lwp_1): Update comments.
7204         (linux_attach): Scan for existing threads when attaching to a
7205         process that is the tgid.
7206         * Makefile.in: Update dependencies.
7207
7208 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7209
7210         * configure.srv: Add linux-procfs.o dependencies.
7211
7212 2011-08-14  Yao Qi  <yao@codesourcery.com>
7213
7214         * target.h (struct target_ops): Fix indent.
7215         * win32-low.c (win32_target_ops): Fix comment.
7216
7217 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7218             Yao Qi  <yao@codesourcery.com>
7219
7220         * Makefile.in (clean): Remove tic6x-*.c files.
7221         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7222         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7223         (tic6x-c64xp-linux.c): Likewise.
7224         * configure.srv: Add support for tic6x-*-uclinux.
7225         * linux-tic6x-low.c: New.
7226         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7227
7228 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7229             Yao Qi  <yao@codesourcery.com>
7230
7231         * target.h (struct target_ops): Add read_loadmap.
7232         * linux-low.c (struct target_loadseg): New type.
7233         (struct target_loadmap): New type.
7234         (linux_read_loadmap): New function.
7235         (linux_target_ops): Add linux_read_loadmap.
7236         * server.c (handle_query): Support qXfer:fdpic:read packet.
7237         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7238         to NULL.
7239
7240 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7241
7242         * win32-low.c: Include <stdint.h>.
7243
7244 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7245
7246         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7247         to the inferior here.
7248         (i386_remove_aligned_watchpoint): Ditto.
7249         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7250         fit part of the watchpoint in the debug registers.
7251         (i386_update_inferior_debug_regs): New.
7252         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7253         registers, and only update the inferior on success.
7254         (i386_low_remove_watchpoint): Ditto.
7255
7256 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7257
7258         * linux-low.c (compare_ints, unique, list_threads, show_process,
7259         linux_core_of_thread): Delete.
7260         (linux_target_ops): Change linux_core_of_thread to
7261         linux_common_core_of_thread.
7262         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7263         * utils.c (malloc_failure): Change type of argument.
7264         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7265         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7266         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7267         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7268         (IPA_OBJS): Add common-utils-ipa.o.
7269         (ptid_h, linux_osdata_h): New macros.
7270         (server_h): Add common/common-utils.h, common/xml-utils.h,
7271         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7272         common/ptid.h.
7273         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7274         ptid.o, buffer.o): New rules.
7275         (linux-low.o): Add common/linux-osdata.h as a dependency.
7276         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7277         * configure.ac: Add AC_HEADER_DIRENT check.
7278         * config.in: Regenerate.
7279         * configure: Regenerate.
7280         * remote-utils.c (xml_escape_text): Delete.
7281         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7282         buffer_xml_printf): Move to common/buffer.c.
7283         * server.c (main): Remove call to initialize_inferiors.
7284         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7285         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7286         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7287         internal_error, gdb_assert, gdb_assert_fail): Delete.
7288         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7289         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7290         common/buffer.h.
7291         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7292         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7293         initialize_inferiors): Delete.
7294
7295 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7296
7297         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7298         symbol error.
7299
7300 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7301
7302         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7303         assertion.
7304         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7305
7306 2011-05-26  Yao Qi  <yao@codesourcery.com>
7307
7308         * Makefile.in (thread-db.o): Track dependence to
7309         common/gdb_thread_db.h.
7310         * thread-db.c: include gdb_thread_db.h from right place.
7311
7312 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7313
7314         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7315         __FILE__ and __LINE__ to internal_error.
7316
7317 2011-05-13  Doug Evans  <dje@google.com>
7318
7319         * thread-db.c (try_thread_db_load_from_sdir): New function.
7320         (try_thread_db_load_from_dir): New function.
7321         (thread_db_load_search): Handle $sdir, ignore $pdir.
7322         Remove trying of system directories if search of
7323         libthread-db-search-path fails, that is now done via $sdir.
7324
7325 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7326
7327         * server.c (handle_query): Add EnableDisableTracepoints to the list
7328         of supported features.
7329         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7330         tracepoints.
7331         (cmd_qtenable_disable): New.
7332         (cmd_qtstart): Install tracepoints even if disabled.
7333         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7334         receiving a QTEnable or QTDisable packet.
7335         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7336         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7337         tracepoints.
7338         (gdb_probe): Skip data collection if static tracepoint is disabled.
7339
7340 2011-05-10  Doug Evans  <dje@google.com>
7341
7342         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7343
7344 2011-05-04  Doug Evans  <dje@google.com>
7345
7346         * linux-low.c (linux_join): Skip process lookup.
7347         * spu-low.c (spu_join): Ditto.
7348         * server.c (join_inferiors_callback): Delete.
7349         (process_serial_event): For 'D' packet (detach) call join_inferior
7350         directly.
7351
7352 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7353
7354         * README: Don't mention xscale*-*-linux*.
7355         * configure.srv (xscale*-*-linux*): Don't handle target.
7356
7357 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7358
7359         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7360         casting pointers.
7361         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7362         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7363         (i386_emit_void_call_2): Likewise.
7364
7365 2011-04-26  Yao Qi  <yao@codesourcery.com>
7366
7367         * linux-low.c: Move common macros to linux-ptrace.h.
7368         Include linux-ptrace.h.
7369         * Makefile.in (linux_ptrace_h): New.
7370         (linux-low.o): Depends on linux-ptrace.h.
7371
7372 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7373
7374         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7375         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7376         (remote_prepare): New function with most of the TCP code from ...
7377         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7378         setting transport_is_reliable.
7379         * server.c (run_once): New variable.
7380         (gdbserver_usage): Document it.
7381         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7382         the first run if RUN_ONCE.
7383         * server.h (run_once, remote_prepare): New declarations.
7384
7385 2011-04-19  Tom Tromey  <tromey@redhat.com>
7386
7387         * win32-low.c (handle_load_dll): Remove duplicate "the".
7388
7389 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7390
7391         Remove support for old Cygwin 1.5 versions.
7392         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7393         function to avoid warning.
7394         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7395         warning.
7396
7397 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7398
7399         * gdbserver/server.h (Macro _): Define it if not available.
7400
7401 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7402
7403         * hostio.c (handle_close): Remove unnecessary null test.
7404
7405 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7406
7407         * Makefile.in (maintainer-clean realclean distclean): Remove
7408         "make ...  subdir_do" command.
7409
7410 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7411
7412         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7413
7414         * server.c (handle_v_run): Free alloced buffer on early return.
7415
7416 2011-03-09  Yao Qi  <yao@codesourcery.com>
7417
7418         Revert:
7419         2011-03-04  Yao Qi  <yao@codesourcery.com>
7420
7421         * Makefile.in: Remove GNU make feature --directory.
7422
7423         2011-03-05  Yao Qi  <yao@codesourcery.com>
7424
7425         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7426         (subdir_do): New make target.  Copied from gdb/Makefile.
7427         (maintainer-clean, realclean, distclean, clean): Call corresponding
7428         make targets in common/Makefile.
7429
7430         2011-02-11  Yao Qi  <yao@codesourcery.com>
7431
7432         * configure.ac: Call AC_PROG_RANLIB.
7433         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7434         * configure: Regenerate.
7435
7436 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7437
7438         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7439
7440 2011-03-06  Yao Qi  <yao@codesourcery.com>
7441
7442         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7443
7444 2011-03-05  Yao Qi  <yao@codesourcery.com>
7445
7446         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7447         (subdir_do): New make target.  Copied from gdb/Makefile.
7448         (maintainer-clean, realclean, distclean, clean): Call corresponding
7449         make targets in common/Makefile.
7450
7451 2011-03-04  Yao Qi  <yao@codesourcery.com>
7452
7453         * Makefile.in: Remove GNU make feature --directory.
7454
7455 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7456
7457         * server.c (queue_stop_reply): Call xmalloc not malloc.
7458
7459 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7460
7461         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7462
7463 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7464
7465         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7466         (cmd_qtframe): Ditto.
7467         (cmd_qtbuffer): Ditto.
7468         (cmd_bigqtbuffer): Ditto.
7469
7470         * utils.c (decimal2str): Initialize 'width' to nine, then
7471         don't mess with it.
7472
7473 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7474
7475         * hostio.c (require_data): Free *data, not data.
7476
7477 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7478
7479         * hostio.c (require_data): Use free, not xfree.
7480
7481 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7482
7483         * server.c (handle_query): Discard unused value.
7484
7485         * hostio.c (require_data): Free malloc memory before returning
7486         error.
7487
7488 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7489
7490         * linux-low.c (list_threads): Call closedir for dirent.
7491
7492 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7493
7494         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7495         a case statement falls through.
7496
7497         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7498
7499         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7500         in comparison.
7501
7502 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7503
7504         * utils.c (decimal2str): Eliminate dead code and dead param.
7505         (pulongest): Drop dead param from call to decimal2str.
7506         (plongest): Ditto.
7507
7508 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
7509
7510         Revert the following patch (not approved yet):
7511         2011-02-21  Hui Zhu  <teawater@gmail.com>
7512         * tracepoint.c (tp_printf): New function.
7513         (eval_agent_expr): Handle gdb_agent_op_printf.
7514
7515 2011-02-21  Hui Zhu  <teawater@gmail.com>
7516
7517         * tracepoint.c (tp_printf): New function.
7518         (eval_agent_expr): Handle gdb_agent_op_printf.
7519
7520 2011-02-18  Tom Tromey  <tromey@redhat.com>
7521
7522         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7523         (tracepoint.o): Likewise.
7524         * tracepoint.c (enum gdb_agent_op): Use ax.def.
7525         (gdb_agent_op_names): Likewise.
7526
7527 2011-02-18  Tom Tromey  <tromey@redhat.com>
7528
7529         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7530         gdb_agent_op_rot>: New constants.
7531         (gdb_agent_op_names): Add pick and roll.
7532         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7533         cases.
7534
7535 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7536
7537         * aclocal.m4: Regenerated with aclocal-1.11.1.
7538
7539 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
7540
7541         * server.c (handle_qxfer_traceframe_info): New.
7542         (qxfer_packets): Register "traceframe-info".
7543         (handle_query): Report support for qXfer:traceframe-info:read+.
7544         * tracepoint.c (match_blocktype): New.
7545         (traceframe_find_block_type): Rename to ...
7546         (traceframe_walk_blocks): ... this.  Add callback filter argument,
7547         and use it.
7548         (traceframe_find_block_type): New, reimplemented on top of
7549         traceframe_walk_blocks.
7550         (build_traceframe_info_xml): New.
7551         (traceframe_read_info): New.
7552         * server.h (traceframe_read_info): Declare.
7553
7554 2011-02-11  Yao Qi  <yao@codesourcery.com>
7555
7556         * configure.ac: Call AC_PROG_RANLIB.
7557         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7558         * configure: Regenerate.
7559
7560 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
7561
7562         * server.c (gdb_read_memory): Change return semantics to allow
7563         partial transfers.
7564         (handle_search_memory_1): Adjust.
7565         (process_serial_event) <'m' packet>: Handle partial transfers.
7566         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7567
7568 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7569
7570         * regcache.c (init_register_cache): Initialize
7571         regcache->register_status.
7572         (free_register_cache): Release regcache->register_status.
7573         (regcache_cpy): Copy register_status.
7574         (registers_to_string): Print 'x's for unavailable registers.
7575         (supply_register): Mark the register's status valid or
7576         unavailable, depending on whether a buffer was passed in or not.
7577         (supply_register_zeroed): New.
7578         (supply_regblock): Mark the registers' status valid or
7579         unavailable, depending on whether a buffer was passed in or not.
7580         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7581         (struct regcache): New `register_status' field.
7582         (supply_register_zeroed): Declare.
7583         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7584         supply_register_zeroed, rather than passing a NULL buffer to
7585         supply_register.
7586         * tracepoint.c (fetch_traceframe_registers): Update comment.
7587
7588 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7589
7590         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7591         buffer explicit.
7592
7593 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
7594
7595         * server.h (decode_xfer_write): Change prototype.
7596         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7597         and don't extract the annex here.
7598         * server.c (decode_xfer_read): Remove `annex' parameter,
7599         and don't extract the annex here.
7600         (decode_xfer): New.
7601         (struct qxfer): New.
7602         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7603         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7604         (handle_qxfer_statictrace): New functions, abstracted out from
7605         handle_query, and made to use the struct qxfer interface.
7606         (handle_threads_qxfer_proper): Rename to ...
7607         (handle_qxfer_threads_proper): ... this.
7608         (handle_threads_qxfer): Rename to ...
7609         (handle_qxfer_threads): ... this.  Adjust.
7610         (qxfer_packets): New array.
7611         (handle_qxfer): New function.
7612         (handle_query): Use handle_qxfer.
7613
7614 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
7615
7616         * gdbreplay.c: Shorten lines of >= 80 columns.
7617         * linux-low.c: Ditto.
7618         * linux-ppc-low.c: Ditto.
7619         * linux-s390-low.c: Ditto.
7620         * linux-sparc-low.c: Ditto.
7621         * linux-x86-low.c: Ditto.
7622         * linux-xtensa-low.c: Ditto.
7623         * mem-break.c: Ditto.
7624         * nto-low.c: Ditto.
7625         * regcache.h: Ditto.
7626         * remote-utils.c: Ditto.
7627         * server.c: Ditto.
7628         * server.h: Ditto.
7629         * thread-db.c: Ditto.
7630         * tracepoint.c: Ditto.
7631         * utils.c: Ditto.
7632         * win32-low.h: Ditto.
7633
7634 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
7635
7636         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7637         update.
7638
7639 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
7640
7641         * server.c (gdbserver_version): Update copyright year in version
7642         output.
7643         * gdbreplay.c (gdbreplay_version): Ditto.
7644
7645 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
7646
7647         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7648         * linux-bfin-low.c: New file.
7649         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7650         PT_DATA_ADDR for BFIN targets.
7651         * Makefile.in (SFILES): Add linux-bfin-low.c.
7652         (clean): Remove reg-bfin.c.
7653         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7654         * README: Mention supported Blackfin targets.
7655
7656 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
7657
7658         * .gitignore: New file.
7659
7660 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
7661
7662         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7663
7664 2010-10-22  Jie Zhang  <jie@codesourcery.com>
7665
7666         * Makefile.in: Add FLAGS_TO_PASS variable.
7667         (install): Remove dependency of install-only and recursively
7668         invoke make for install-only.
7669
7670 2010-10-04  Doug Evans  <dje@google.com>
7671
7672         * Makefile.in (uninstall): Use $(DESTDIR).
7673
7674 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
7675
7676         PR gdb/11842
7677
7678         * linux-x86-low.c (compat_siginfo_from_siginfo)
7679         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7680         si_code is < 0.  Check for si_code == SI_TIMER before checking for
7681         si_code < 0.
7682
7683 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7684
7685         * lynx-i386-low.c: New file.
7686         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7687
7688 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7689
7690         * lynx-low.c (ptrace_request_to_str): Remove handling for
7691         request values that have been removed in LynxOS 5.x.
7692
7693 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7694
7695         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7696         <ptrace.h>
7697
7698 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
7699
7700         * configure.ac: Add --enable-inprocess-agent option.
7701         * configure: Rebuilt.
7702
7703 2010-09-06  Yao Qi  <yao@codesourcery.com>
7704
7705         * linux-low.c (linux_kill): Remove unused variable.
7706         (linux_stabilize_threads): Likewise.
7707         * server.c (start_inferior): Likewise.
7708         (queue_stop_reply_callback): Likewise.
7709         * tracepoint.c (do_action_at_tracepoint): Likewise.
7710
7711 2010-09-06  Yao Qi  <yao@codesourcery.com>
7712
7713         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7714         on return.
7715
7716 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7717
7718         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7719
7720 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
7721
7722         * Makefile.in (install-only): Replace $IPA_DEPFILES with
7723         "$(IPA_DEPFILES)".
7724
7725 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7726
7727         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7728         gdbserver/lynx-ppc-low.c: New files.
7729         * Makefile.in (lynx_low_h): New variable.
7730         (lynx-low.o, lynx-ppc-low.o): New rules.
7731         * configure.ac: On LynxOS, link with -lnetinet.
7732         * configure.srv: Add handling of powerpc-*-lynxos* targets.
7733         * configure: regenerate.
7734
7735 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7736
7737         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7738         * configure.ac: Add check for vasprintf and vsnprintf.
7739         * configure, config.in: Regenerate.
7740         * server.h (vasprintf, vsnprintf): Add conditional declarations.
7741
7742 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7743
7744         * gdbreplay.c: Move include of alloca.h up, next to include of
7745         malloc.h.
7746         * server.h: Add include of malloc.h.
7747         * mem-break.c: Remove include of malloc.h.
7748         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7749
7750 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7751
7752         * Makefile.in (memmem.o): Build with -Wno-error.
7753
7754 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7755
7756         * utils.c (xsnprintf): Make non-static.
7757         * server.h: Add xsnprintf declaration.
7758         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7759         replace calls to snprintf by calls to xsnprintf throughout.
7760
7761 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7762
7763         * configure.ac: Add configure check for alloca.
7764         * configure, config.in: Regenerate.
7765         * server.h: Include alloca.h if it exists.
7766         * gdbreplay.c: Include alloca.h if it exists.
7767
7768 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7769
7770         * linux-low.c (__SIGRTMIN): Define if not already defined.
7771         (linux_create_inferior): Check for __ANDROID__ rather than
7772         __SIGRTMIN.
7773         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7774         are already deferred.
7775         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7776         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7777         stopped and already has a pending signal to report.
7778         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7779         a pending signal to report or is moving out of a jump pad.
7780         (linux_init_signals): Check for __ANDROID__ rather than
7781         __SIGRTMIN.
7782
7783 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7784
7785         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7786         debug_threads check.  Avoid a linear search when not doing debug
7787         output.
7788
7789 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7790
7791         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7792         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7793         (struct file_handler) <fd>: Change type to gdb_fildes_t.
7794         (process_event): Change local fd's type to gdb_fildes_t.
7795         (create_file_handler): Adjust prototype.
7796         (delete_file_handler): Adjust prototype.
7797         (handle_file_event): Adjust prototype.  Use pfildes.
7798         (create_file_event): Adjsut prototype.
7799         * remote-utils.c (remote_desc, listen_desc): Change type to
7800         gdb_fildes_t.
7801         * server.h: New gdb_fildes_t typedef.
7802         [USE_WIN32API]: Include winsock2.h.
7803         (delete_file_handler, add_file_handler): Adjust prototypes.
7804         (pfildes): Declare.
7805         * utils.c (pfildes): New.
7806
7807 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7808
7809         * configure.ac (build_warnings): Add -Wno-char-subscripts.
7810         * configure: Regenerate.
7811
7812 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7813
7814         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7815         (linux_done_accessing_memory): ... this.
7816         (linux_target_ops): Adjust.
7817         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7818         * nto-low.c (nto_target_ops): Adjust comment.
7819         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7820         * spu-low.c (spu_target_ops): Adjust comment.
7821         * target.h (target_ops): Rename unprepare_to_access_memory field
7822         to done_accessing_memory.
7823         (unprepare_to_access_memory): Rename to ...
7824         (done_accessing_memory): ... this.
7825
7826 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7827
7828         * linux-low.c (linux_prepare_to_access_memory): New.
7829         (linux_unprepare_to_access_memory): New.
7830         (linux_target_ops): Install them.
7831         * server.c (read_memory): Rename to ...
7832         (gdb_read_memory): ... this.  Use
7833         prepare_to_access_memory/prepare_to_access_memory.
7834         (write_memory): Rename to ...
7835         (gdb_write_memory): ... this.  Use
7836         prepare_to_access_memory/prepare_to_access_memory.
7837         (handle_search_memory_1): Adjust.
7838         (process_serial_event): Adjust.
7839         * target.h (struct target_ops): New fields
7840         prepare_to_access_memory and unprepare_to_access_memory.
7841         (prepare_to_access_memory, unprepare_to_access_memory): New.
7842         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7843         prepare_to_access_memory/prepare_to_access_memory.
7844         * nto-low.c (nto_target_ops): Adjust.
7845         * spu-low.c (spu_target_ops): Adjust.
7846         * win32-low.c (win32_target_ops): Adjust.
7847
7848 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7849
7850         * Makefile.in (WARN_CFLAGS): Get it from configure.
7851         (WERROR_CFLAGS): New.
7852         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7853         * configure.ac: Introduce --enable-werror, which adds -Werror to
7854         the compiler command line.  Enabled by default.  Disable with
7855         --disable-werror.  Add -Wdeclaration-after-statement
7856         Wpointer-arith and -Wformat-nonliteral to warning flags.
7857         * configure: Regenerate.
7858
7859 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7860
7861         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7862
7863 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7864
7865         * gdbreplay.c (remote_error): New.
7866         (gdbchar): New.
7867         (expect): Use gdbchar.  Check for error reading from GDB.
7868         Clarify sync error output.
7869         (play): Check for errors writing to GDB.
7870         * linux-low.c (sigchld_handler): Really ignore `write' errors.
7871         * remote-utils.c (getpkt): Check for errors writing to the remote
7872         descriptor.
7873
7874 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7875
7876         * linux-low.c (linux_wait_1): Move non-debugging code out of
7877         `debug_threads' control.
7878
7879 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7880
7881         * linux-low.c (linux_wait_1): Don't set last_status here.
7882         * server.c (push_event, queue_stop_reply_callback): Assert we're
7883         not pushing a TARGET_WAITKIND_IGNORE event.
7884         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7885         (myresume, handle_target_event): Set the thread's last_resume_kind
7886         and last_status from the target returned status.
7887
7888 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7889
7890         PR threads/10729
7891
7892         * linux-x86-low.c (update_debug_registers_callback): New.
7893         (i386_dr_low_set_addr): Use it.
7894         (i386_dr_low_get_addr): New.
7895         (i386_dr_low_set_control): Use update_debug_registers_callback.
7896         (i386_dr_low_get_control): New.
7897         (i386_dr_low_get_status): Adjust.
7898         * linux-low.c (linux_stop_lwp): New.
7899         * linux-low.h (linux_stop_lwp): Declare.
7900
7901         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7902         argument instead of a i386_debug_reg_state.
7903         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7904         a i386_debug_reg_state.
7905         (i386_insert_aligned_watchpoint): Adjust.
7906         (i386_remove_aligned_watchpoint): Adjust.
7907         (i386_low_stopped_data_address): Read the debug registers from the
7908         inferior instead of from the mirrors.
7909         * i386-low.h (struct i386_debug_reg_state): Extend comment.
7910         (i386_dr_low_get_addr): Declare.
7911         (i386_dr_low_get_control): Declare.
7912         (i386_dr_low_get_status): Change prototype.
7913
7914         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7915         (i386_dr_low_get_addr): New.
7916         (i386_dr_low_get_control): New.
7917         (i386_dr_low_get_status): Adjust prototype.  Return
7918         dr_status_mirror.
7919         (i386_initial_stuff): Clear dr_status_mirror and
7920         dr_control_mirror.
7921         (i386_get_thread_context): Adjust.
7922         (i386_set_thread_context): Adjust.
7923         (i386_thread_added): Adjust.
7924
7925 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
7926
7927         * linux-low.h (linux_thread_area): Delete declaration.
7928
7929 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
7930
7931         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7932         after its termination.
7933
7934 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
7935
7936         * linux-low.c (gdb_wants_lwp_stopped): Delete.
7937         (gdb_wants_all_stopped): Delete.
7938         (linux_wait_1): Don't call them.
7939         * server.c (handle_v_cont): Tag all threads as want-stopped.
7940         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
7941         stopped as "client-wants-stopped".
7942
7943 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
7944
7945         * Makefile.in (signals_h): New.
7946         (server_h): Depend on it.
7947         (server.o): Don't depend on $(signals_def).
7948         (signals.o): Depend on $(signals_def).
7949
7950 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
7951
7952         * Makefile.in (signals_def): New.
7953         (server_h): Append include/gdb/signals.h and signals_def.
7954         (server.o): Append signals_def.
7955
7956 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
7957
7958         * server.c (handle_target_event): Use target_signal_to_host for
7959         resume_info.sig initialization.
7960         * target.h (struct thread_resume) <sig>: New comment.
7961
7962 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
7963
7964         * server.c (handle_query): strcpy() the returned string from paddress()
7965         instead of sprintf().
7966         * utils.c (paddress): Return phex_nz().
7967
7968 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
7969
7970         * server.c (handle_v_cont): Call mourn_inferior if process
7971         just exited.
7972         (myresume): Likewise.
7973
7974 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
7975
7976         Static tracepoints, and integration with UST.
7977
7978         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
7979         * mem-break.c (uninsert_all_breakpoints)
7980         (reinsert_all_breakpoints): New.
7981         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7982         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7983         (gdb_agent_ust_loaded, helper_thread_id)
7984         (gdb_agent_helper_thread_id): New macros.
7985         (struct ipa_sym_addresses): Add addr_ust_loaded,
7986         addr_helper_thread_id, addr_cmd_buf.
7987         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7988         (in_process_agent_loaded_ust): New.
7989         (write_e_ust_not_loaded): New.
7990         (maybe_write_ipa_ust_not_loaded): New.
7991         (struct collect_static_trace_data_action): New.
7992         (enum tracepoint_type) <static_tracepoint>: New.
7993         (struct tracepoint) <handle>: Mention static tracepoints.
7994         (struct static_tracepoint_ctx): New.
7995         (CMD_BUF_SIZE): New.
7996         (add_tracepoint_action): Handle static tracepoint actions.
7997         (unprobe_marker_at): New.
7998         (clear_installed_tracepoints): Handle static tracepoints.
7999         (cmd_qtdp): Handle static tracepoints.
8000         (probe_marker_at): New.
8001         (cmd_qtstart): Handle static tracepoints.
8002         (response_tracepoint): Handle static tracepoints.
8003         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8004         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8005         (get_context_regcache): Handle static tracepoints.
8006         (do_action_at_tracepoint): Handle static tracepoint actions.
8007         (traceframe_find_block_type): Handle static trace data blocks.
8008         (traceframe_read_sdata): New.
8009         (download_tracepoints): Download static tracepoint actions.
8010         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8011         (GDB_PROBE_NAME): New.
8012         (ust_ops): New.
8013         (GET_UST_SYM): New.
8014         (USTF): New.
8015         (dlsym_ust): New.
8016         (ust_marker_to_static_tracepoint): New.
8017         (gdb_probe): New.
8018         (collect_ust_data_at_tracepoint): New.
8019         (gdb_ust_probe): New.
8020         (UNIX_PATH_MAX, SOCK_DIR): New.
8021         (gdb_ust_connect_sync_socket): New.
8022         (resume_thread, stop_thread): New.
8023         (run_inferior_command): New.
8024         (init_named_socket): New.
8025         (gdb_ust_socket_init): New.
8026         (cstr_to_hexstr): New.
8027         (next_st): New.
8028         (first_marker, next_marker): New.
8029         (response_ust_marker): New.
8030         (cmd_qtfstm, cmd_qtsstm): New.
8031         (unprobe_marker_at, probe_marker_at): New.
8032         (cmd_qtstmat, gdb_ust_thread): New.
8033         (gdb_ust_init): New.
8034         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8035         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8036         (ST_REGENTRY): New.
8037         (x86_64_st_collect_regmap): New.
8038         (X86_64_NUM_ST_COLLECT_GREGS): New.
8039         (AMD64_RIP_REGNUM): New.
8040         (supply_static_tracepoint_registers): New.
8041         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8042         (ST_REGENTRY): New.
8043         (i386_st_collect_regmap): New.
8044         (i386_NUM_ST_COLLECT_GREGS): New.
8045         (supply_static_tracepoint_registers): New.
8046         * server.c (handle_query): Handle qXfer:statictrace:read.
8047         <qSupported>: Report support for StaticTracepoints, and
8048         qXfer:statictrace:read features.
8049         * server.h (traceframe_read_sdata)
8050         (supply_static_tracepoint_registers): Declare.
8051         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8052         (unpack_varlen_hex): Include in IPA build.
8053         * Makefile.in (ustlibs, ustinc): New.
8054         (IPA_OBJS): Add remote-utils-ipa.o.
8055         ($(IPA_LIB)): Link -ldl and -lpthread.
8056         (UST_CFLAGS): New.
8057         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8058         * config.in, configure: Regenerate.
8059
8060 2010-06-20  Ian Lance Taylor  <iant@google.com>
8061             Pedro Alves  <pedro@codesourcery.com>
8062
8063         * linux-x86-low.c (always_true): Delete.
8064         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8065         trying to fool the compiler with always_true.
8066
8067 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8068
8069         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8070         conditions in gdbserver.
8071
8072 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8073
8074         * spu-low.c (spu_read_memory): Wrap around local store limit.
8075         (spu_write_memory): Likewise.
8076
8077 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8078
8079         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8080         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8081         LONGEST uses.
8082         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8083         uses.
8084         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8085         uses with LONGEST uses.
8086
8087 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8088             Pedro Alves  <pedro@codesourcery.com>
8089
8090         Bytecode compiler.
8091
8092         * linux-x86-low.c: Include limits.h.
8093         (add_insns): New.
8094         (always_true): New.
8095         (EMIT_ASM): New.
8096         (EMIT_ASM32): New.
8097         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8098         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8099         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8100         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8101         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8102         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8103         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8104         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8105         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8106         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8107         (amd64_emit_void_call_2): New.
8108         (amd64_emit_ops): New.
8109         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8110         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8111         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8112         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8113         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8114         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8115         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8116         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8117         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8118         (i386_emit_stack_adjust, i386_emit_int_call_1)
8119         (i386_emit_void_call_2): New.
8120         (i386_emit_ops): New.
8121         (x86_emit_ops): New.
8122         (the_low_target): Install x86_emit_ops.
8123         * server.h (struct emit_ops): New.
8124         (get_raw_reg_func_addr): Declare.
8125         (current_insn_ptr, emit_error): Declare.
8126         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8127         (set_trace_state_variable_value): New defines.
8128         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8129         addr_get_trace_state_variable_value and
8130         addr_set_trace_state_variable_value.
8131         (symbol_list): New fields for get_raw_reg,
8132         get_trace_state_variable_value and set_trace_state_variable_value.
8133         (condfn): New typedef.
8134         (struct tracepoint): New field `compiled_cond'.
8135         (do_action_at_tracepoint): Clear compiled_cond.
8136         (get_trace_state_variable_value, set_trace_state_variable_value):
8137         Export in the IPA.
8138         (condition_true_at_tracepoint): If there's a compiled condition,
8139         run that.
8140         (current_insn_ptr, emit_error): New globals.
8141         (struct bytecode_address): New.
8142         (get_raw_reg_func_addr): New.
8143         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8144         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8145         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8146         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8147         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8148         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8149         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8150         (compile_tracepoint_condition, compile_bytecodes): New.
8151         * target.h (emit_ops): Forward declare.
8152         (struct target_ops): New field emit_ops.
8153         (target_emit_ops): New.
8154         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8155         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8156         * linux-low.c (linux_emit_ops): New.
8157         (linux_target_ops): Install it.
8158         * linux-low.h (struct linux_target_ops): New field emit_ops.
8159
8160 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8161
8162         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8163         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8164
8165 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8166             Stan Shebs  <stan@codesourcery.com>
8167
8168         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8169         (all): Depend on $(extra_libraries).
8170         (install-only): Install the IPA.
8171         (IPA_OBJS, IPA_LIB): New.
8172         (clean): Remove the IPA lib.
8173         (IPAGENT_CFLAGS): New.
8174         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8175         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8176         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8177         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8178         * configure.ac: Check for atomic builtins support in the compiler.
8179         (IPA_DEPFILES, extra_libraries): Define.
8180         * configure.srv (ipa_obj): Add description.
8181         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8182         (i[34567]86-*-linux*): Set ipa_obj.
8183         (x86_64-*-linux*): Set ipa_obj.
8184         * linux-low.c (stabilizing_threads): New.
8185         (supports_fast_tracepoints): New.
8186         (linux_detach): Stabilize threads before detaching.
8187         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8188         the lwp is either not stabilizing, or is moving out of a jump pad.
8189         (linux_fast_tracepoint_collecting): New.
8190         (maybe_move_out_of_jump_pad): New.
8191         (enqueue_one_deferred_signal): New.
8192         (dequeue_one_deferred_signal): New.
8193         (linux_wait_for_event_1): If moving out of a jump pad, defer
8194         pending signals to later.
8195         (linux_stabilize_threads): New.
8196         (linux_wait_1): Check if threads need moving out of jump pads, and
8197         do it if so.
8198         (stuck_in_jump_pad_callback): New.
8199         (move_out_of_jump_pad_callback): New.
8200         (lwp_running): New.
8201         (linux_resume_one_lwp): Handle moving out of jump pads.
8202         (linux_set_resume_request): Dequeue deferred signals.
8203         (need_step_over_p): Also step over fast tracepoint jumps.
8204         (start_step_over): Also uninsert fast tracepoint jumps.
8205         (finish_step_over): Also reinsert fast tracepoint jumps.
8206         (linux_install_fast_tracepoint_jump): New.
8207         (linux_target_ops): Install linux_stabilize_threads and
8208         linux_install_fast_tracepoint_jump_pad.
8209         * linux-low.h (linux_target_ops) <get_thread_area,
8210         install_fast_tracepoint_jump_pad>: New fields.
8211         (struct lwp_info) <collecting_fast_tracepoint,
8212         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8213         (linux_get_thread_area): Declare.
8214         * linux-x86-low.c (jump_insn): New.
8215         (x86_get_thread_area): New.
8216         (append_insns): New.
8217         (push_opcode): New.
8218         (amd64_install_fast_tracepoint_jump_pad): New.
8219         (i386_install_fast_tracepoint_jump_pad): New.
8220         (x86_install_fast_tracepoint_jump_pad): New.
8221         (the_low_target): Install x86_get_thread_area and
8222         x86_install_fast_tracepoint_jump_pad.
8223         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8224         (struct fast_tracepoint_jump): New.
8225         (fast_tracepoint_jump_insn): New.
8226         (fast_tracepoint_jump_shadow): New.
8227         (find_fast_tracepoint_jump_at): New.
8228         (fast_tracepoint_jump_here): New.
8229         (delete_fast_tracepoint_jump): New.
8230         (set_fast_tracepoint_jump): New.
8231         (uninsert_fast_tracepoint_jumps_at): New.
8232         (reinsert_fast_tracepoint_jumps_at): New.
8233         (set_breakpoint_at): Use write_inferior_memory.
8234         (uninsert_raw_breakpoint): Use write_inferior_memory.
8235         (check_mem_read): Mask out fast tracepoint jumps.
8236         (check_mem_write): Mask out fast tracepoint jumps.
8237         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8238         (set_fast_tracepoint_jump): Declare.
8239         (delete_fast_tracepoint_jump)
8240         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8241         (reinsert_fast_tracepoint_jumps_at): Declare.
8242         * regcache.c: Don't compile many functions when building the
8243         in-process agent library.
8244         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8245         the register buffer in the heap.
8246         (free_register_cache): If the register buffer isn't owned by the
8247         regcache, don't free it.
8248         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8249         pre-existing register caches.
8250         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8251         type.
8252         (convert_ascii_to_int): : Constify `from' parameter type.
8253         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8254         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8255         the needed buffer in-place.
8256         (relocate_instruction): New.
8257         * server.c (handle_query) <qSymbols>: If the target supports
8258         tracepoints, give it a chance of looking up symbols.  Report
8259         support for fast tracepoints.
8260         (handle_status): Stabilize threads.
8261         (process_serial_event): Adjust.
8262         * server.h (struct fast_tracepoint_jump): Forward declare.
8263         (struct process_info) <fast_tracepoint_jumps>: New field.
8264         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8265         (decode_X_packet, decode_M_packet): Adjust.
8266         (relocate_instruction): Declare.
8267         (in_process_agent_loaded): Declare.
8268         (tracepoint_look_up_symbols): Declare.
8269         (struct fast_tpoint_collect_status): Declare.
8270         (fast_tracepoint_collecting): Declare.
8271         (force_unlock_trace_buffer): Declare.
8272         (handle_tracepoint_bkpts): Declare.
8273         (initialize_low_tracepoint)
8274         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8275         * target.h (struct target_ops) <stabilize_threads,
8276         install_fast_tracepoint_jump_pad>: New fields.
8277         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8278         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8279         [HAVE_STDINT_H]: Include stdint.h.
8280         (trace_debug_1): Rename to ...
8281         (trace_vdebug): ... this.
8282         (trace_debug): Rename to ...
8283         (trace_debug_1): ... this.  Add `level' parameter.
8284         (trace_debug): New.
8285         (ATTR_USED, ATTR_NOINLINE): New.
8286         (IP_AGENT_EXPORT): New.
8287         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8288         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8289         (about_to_request_buffer_space, trace_buffer_is_full)
8290         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8291         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8292         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8293         (traceframe_write_count, traceframes_created)
8294         (trace_state_variables)
8295         New renaming defines.
8296         (struct ipa_sym_addresses): New.
8297         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8298         (symbol_list): New.
8299         (ipa_sym_addrs): New.
8300         (all_tracepoint_symbols_looked_up): New.
8301         (in_process_agent_loaded): New.
8302         (write_e_ipa_not_loaded): New.
8303         (maybe_write_ipa_not_loaded): New.
8304         (tracepoint_look_up_symbols): New.
8305         (debug_threads) [IN_PROCESS_AGENT]: New.
8306         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8307         (UNKNOWN_SIDE_EFFECTS): New.
8308         (stop_tracing): New.
8309         (flush_trace_buffer): New.
8310         (stop_tracing_bkpt): New.
8311         (flush_trace_buffer_bkpt): New.
8312         (read_inferior_integer): New.
8313         (read_inferior_uinteger): New.
8314         (read_inferior_data_pointer): New.
8315         (write_inferior_data_pointer): New.
8316         (write_inferior_integer): New.
8317         (write_inferior_uinteger): New.
8318         (struct collect_static_trace_data_action): Delete.
8319         (enum tracepoint_type): New.
8320         (struct tracepoint) <type>: New field `type'.
8321         <actions_str, step_actions, step_actions_str>: Only include in
8322         GDBserver.
8323         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8324         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8325         (tracepoints): Use IP_AGENT_EXPORT.
8326         (last_tracepoint): Don't include in the IPA.
8327         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8328         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8329         (alloced_trace_state_variables): New.
8330         (trace_state_variables): Use IP_AGENT_EXPORT.
8331         (traceframe_t): Delete unused variable.
8332         (circular_trace_buffer): Don't include in the IPA.
8333         (trace_buffer_start): Delete.
8334         (struct trace_buffer_control): New.
8335         (trace_buffer_free): Delete.
8336         (struct ipa_trace_buffer_control): New.
8337         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8338         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8339         New.
8340         (trace_buffer_ctrl): New.
8341         (TRACE_BUFFER_CTRL_CURR): New.
8342         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8343         Reimplement as macros.
8344         (trace_buffer_wrap): Delete.
8345         (traceframe_write_count, traceframe_read_count)
8346         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8347         (struct tracepoint_hit_ctx) <type>: New field.
8348         (struct fast_tracepoint_ctx): New.
8349         (memory_barrier): New.
8350         (cmpxchg): New.
8351         (record_tracepoint_error): Update atomically in the IPA.
8352         (clear_inferior_trace_buffer): New.
8353         (about_to_request_buffer_space): New.
8354         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8355         updating the same buffer.
8356         (add_tracepoint): Default the tracepoint's type to trap
8357         tracepoint, and orig_size to -1.
8358         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8359         internal variables.
8360         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8361         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8362         (cmd_qtdp): Handle fast tracepoints.
8363         (cmd_qtdv): Adjust.
8364         (max_jump_pad_size): New.
8365         (gdb_jump_pad_head): New.
8366         (get_jump_space_head): New.
8367         (claim_jump_space): New.
8368         (sort_tracepoints): New.
8369         (MAX_JUMP_SIZE): New.
8370         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8371         IPA.
8372         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8373         support.  Upload fast traceframes, and delete internal IPA
8374         breakpoints.
8375         (stop_tracing_handler): New.
8376         (flush_trace_buffer_handler): New.
8377         (cmd_qtstop): Upload fast tracepoints.
8378         (response_tracepoint): Handle fast tracepoints.
8379         (tracepoint_finished_step): Upload fast traceframes.  Set the
8380         tracepoint hit context's tracepoint type.
8381         (handle_tracepoint_bkpts): New.
8382         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8383         type.  Add comment about fast tracepoints.
8384         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8385         non-existing action_str field.
8386         (get_context_regcache): Handle fast tracepoints.
8387         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8388         to the regcache.
8389         (fast_tracepoint_from_jump_pad_address): New.
8390         (fast_tracepoint_from_ipa_tpoint_address): New.
8391         (collecting_t): New.
8392         (force_unlock_trace_buffer): New.
8393         (fast_tracepoint_collecting): New.
8394         (collecting): New.
8395         (gdb_collect): New.
8396         (write_inferior_data_ptr): New.
8397         (target_tp_heap): New.
8398         (target_malloc): New.
8399         (download_agent_expr): New.
8400         (UALIGN): New.
8401         (download_tracepoints): New.
8402         (download_trace_state_variables): New.
8403         (upload_fast_traceframes): New.
8404         (IPA_FIRST_TRACEFRAME): New.
8405         (IPA_NEXT_TRACEFRAME_1): New.
8406         (IPA_NEXT_TRACEFRAME): New.
8407         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8408         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8409         (gdb_jump_pad_buffer_end): New.
8410         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8411         (initialize_tracepoint): Adjust.
8412         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8413         buffer.  Initialize the low module.
8414         * utils.c (PREFIX, TOOLNAME): New.
8415         (malloc_failure): Use PREFIX.
8416         (error): In the IPA, an error causes an exit.
8417         (fatal, warning): Use PREFIX.
8418         (internal_error): Use TOOLNAME.
8419         (NUMCELLS): Increase to 10.
8420         * configure, config.in: Regenerate.
8421
8422 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8423
8424         * server.c (handle_query) <qSupported>: Do two passes over the
8425         qSupported string to avoid nesting strtok.
8426
8427 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8428
8429         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8430         (CDEPS): New.
8431         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8432         -Wl,--dynamic-list.
8433         * configure: Regenerate.
8434         * proc-service.list: New.
8435
8436 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8437
8438         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8439         New comment.
8440
8441 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8442
8443         * gdbreplay.c (remote_open): Check error return from socket() call by
8444         its equality to -1 not by it being negative.
8445         * remote-utils.c (remote_open): Likewise.
8446
8447 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8448
8449         * config.h: Regenerate.
8450
8451 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8452
8453         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8454         doesn't provide PTRACE_GET_THREAD_AREA.
8455
8456 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8457
8458         * linux-m68k-low.c: Include <asm/ptrace.h>
8459         (ps_get_thread_area): Implement.
8460
8461 2010-05-03  Doug Evans  <dje@google.com>
8462
8463         * event-loop.c (struct callback_event): New struct.
8464         (callback_list): New global.
8465         (append_callback_event, delete_callback_event): New functions.
8466         (process_callback): New function.
8467         (start_event_loop): Call it.
8468         * remote-utils.c (NOT_SCHEDULED): Define.
8469         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8470         moved out of readchar.
8471         (readchar): Rewrite.  Call reschedule before returning.
8472         (reset_readchar): New function.
8473         (remote_close): Call it.
8474         (process_remaining, reschedule): New functions.
8475         * server.h (callback_handler_func): New typedef.
8476         (append_callback_event, delete_callback_event): Declare.
8477
8478 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8479
8480         * proc-service.c (ps_pglobal_lookup): Use
8481         thread_db_look_up_one_symbol.
8482         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8483         parameter.  Use it instead of all_symbols_looked_up.
8484         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8485         field.
8486         (all_symbols_looked_up): Don't declare.
8487         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8488         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8489         field.
8490         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8491         Set all_symbols_looked_up here.
8492         (thread_db_look_up_one_symbol): New.
8493         (thread_db_get_tls_address): Adjust.
8494         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8495         thread_db object on the heap, and tentatively set it in the
8496         process structure.
8497         (thread_db_init): Don't set all_symbols_looked_up here.
8498         * linux-low.h (thread_db_look_up_one_symbol): Declare.
8499
8500 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8501
8502         * linux-low.c (linux_kill, linux_detach): Adjust.
8503         (status_pending_p_callback): Remove redundant statement.  Check
8504         for !TARGET_WAITIKIND_IGNORE, instead of
8505         TARGET_WAITKIND_STOPPED.
8506         (handle_tracepoints): Make sure LWP is locked.  Adjust.
8507         (linux_wait_for_event_1): Adjust.
8508         (linux_cancel_breakpoints): New.
8509         (unsuspend_one_lwp): New.
8510         (unsuspend_all_lwps): New.
8511         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8512         (send_sigstop_callback): Change return type to int, add new
8513         `except' parameter and handle it.
8514         (suspend_and_send_sigstop_callback): New.
8515         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8516         pass them down.  If SUSPEND, also increment the lwp's suspend
8517         count.
8518         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8519         (need_step_over_p): Don't consider suspended LWPs.
8520         (start_step_over): Adjust.
8521         (proceed_one_lwp): Change return type to int, add new `except'
8522         parameter and handle it.
8523         (unsuspend_and_proceed_one_lwp): New.
8524         (proceed_all_lwps): Use find_inferior instead of
8525         for_each_inferior.
8526         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
8527         also decrement the suspend count of LWPs.  Pass `except' down,
8528         instead of hacking its suspend count.
8529         (linux_pause_all): Add `freeze' parameter.  Adjust.
8530         (linux_unpause_all): New.
8531         (linux_target_ops): Install linux_unpause_all.
8532         * server.c (handle_status): Adjust.
8533         * target.h (struct target_ops): New fields `unpause_all' and
8534         `cancel_breakpoints'.  Add new parameter to `pause_all'.
8535         (pause_all): Add new `freeze' parameter.
8536         (unpause_all): New.
8537         (cancel_breakpoints): New.
8538         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8539         cancel breakpoints.
8540         (cmd_qtstart): Pause threads.
8541         (stop_tracing): Pause threads, and cancel breakpoints.
8542         * win32-low.c (win32_target_ops): Adjust.
8543
8544 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8545
8546         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8547         the inferior right away from here...
8548         (linux_wait_1): ... to here, and adjust to check the thread's
8549         last_resume_kind instead of the lwp's step or stop_expected flags.
8550
8551 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8552
8553         * README: Use consistent `GDB' and `GDBserver' spellings.
8554
8555 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8556
8557         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8558         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
8559         (linux_detach_one_lwp): Assume the lwp is stopped.
8560         (any_thread_of): Delete.
8561         (linux_detach): Stop all lwps here.  Don't blindly delete all
8562         breakpoints.
8563         (delete_lwp_callback): New.
8564         (linux_mourn): Delete all lwps of the process that is gone.
8565         (linux_wait_1): Don't delete the last lwp of the process here.
8566         * mem-break.h (mark_breakpoints_out): Declare.
8567         * mem-break.c (mark_breakpoints_out): New.
8568         (free_all_breakpoints): Use it.
8569         * server.c (handle_target_event): If the process is gone, mark
8570         breakpoints out.
8571         * thread-db.c (struct thread_db) <create_bp>: New field.
8572         (thread_db_enable_reporting): Fix prototype.  Store a thread event
8573         breakpoint reference in the thread_db struct.
8574         (thread_db_load_search): Clear the thread_db object.
8575         (try_thread_db_load_1): Ditto.
8576         (switch_to_process): New.
8577         (disable_thread_event_reporting): Use it.
8578         (remove_thread_event_breakpoints): New.
8579         (thread_db_detach, thread_db_mourn): Use it.
8580
8581 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
8582
8583         * linux-low.c (linux_enable_event_reporting): New.
8584         (linux_wait_for_event_1, handle_extended_wait): Use it.
8585
8586 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
8587
8588         * linux-low.c (linux_kill_one_lwp, linux_kill)
8589         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8590         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
8591         SIGSTOP even if the LWP is stopped.
8592         (send_sigstop_callback): New.
8593         (stop_all_lwps): Use send_sigstop_callback instead.
8594         (linux_resume_one_thread): Adjust.
8595         (proceed_one_lwp): Still proceed an LWP that the client has
8596         requested to stop, if we haven't reported it as stopped yet.  Make
8597         sure that LWPs the client want stopped, have a pending SIGSTOP.
8598
8599 2010-04-26  Doug Evans  <dje@google.com>
8600
8601         * server.c (handle_general_set): Make static.
8602
8603         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8604         Print received char after testing for error/eof instead of before.
8605         (input_interrupt): Tweak comment.
8606
8607 2010-04-23  Doug Evans  <dje@google.com>
8608
8609         * server.c (start_inferior): Print inferior argv if --debug.
8610
8611 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
8612
8613         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8614         * nto-x86-low.c: Include server.h
8615
8616 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
8617
8618         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8619         be consistent with other sources of this directory.
8620         (init_registers_amd64): Correct name of source file of this function
8621         in the comment.
8622
8623 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8624
8625         * configure.srv (x86_64-*-mingw*): New configuration for Windows
8626         64-bit executables.
8627
8628 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8629
8630         * win32-i386-low.c: Add 64-bit support.
8631         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8632         (init_registers_amd64): Declare.
8633         (mappings): Add 64-bit version of array.
8634         (init_windows_x86): New function.
8635         (the_low_target): Change init_arch field to init_windows_x86.
8636
8637 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8638
8639         * win32-low.c: Adapt to support also 64-bit architecture.
8640         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8641         (get_image_name): Use SIZE_T type for local variable `done'.
8642         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8643         (toolhelp_get_dll_name): Idem.
8644         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8645         Use uintptr_t typecast to avoid warning.
8646         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8647         (handle_exception): Use phex_nz to avoid warning.
8648         (win32_wait): Remove unused local variable `process'.
8649
8650 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8651
8652         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8653         `amd64-avx.o'.
8654
8655 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
8656
8657         * configure.ac: Use `ws2_32' library for srv_mingw.
8658         * configure: Regenerate.
8659         * gdbreplay.c: Include winsock2.h instead of winsock.h.
8660         * remote-utils.c: Likewise.
8661
8662 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
8663
8664         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8665         if __x86_64__ is defined.
8666
8667 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8668
8669         * configure: Regenerate.
8670
8671 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8672
8673         * server.c (handle_query): Handle 'qGetTIBAddr' query.
8674         * target.h (target_ops): New get_tib_address field.
8675         * win32-low.h (win32_thread_info): Add thread_local_base field.
8676         * win32-low.c (child_add_thread): Add tlb argument.
8677         Set thread_local_base field to TLB.
8678         (get_child_debug_event): Adapt to child_add_thread change.
8679         (win32_get_tib_address): New function.
8680         (win32_target_ops): Set get_tib_address field to
8681         win32_get_tib_address.
8682         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8683
8684 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8685
8686         * linux-low.c (linux_mourn): Also remove the process.
8687         * server.c (handle_target_event): Don't remove the process here.
8688         * nto-low.c (nto_mourn): New.
8689         (nto_target_ops): Install it.
8690         * spu-low.c (spu_mourn): New.
8691         (spu_target_ops): Install it.
8692         * win32-low.c (win32_mourn): New.
8693         (win32_target_ops): Install it.
8694
8695 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8696
8697         * server.h (buffer_xml_printf): Remove redundant `;'.
8698
8699 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8700
8701         * regcache.c (set_register_cache): Invalidate regcaches before
8702         changing the register cache layout.
8703         (regcache_invalidate_one): Allow a NULL regcache.
8704         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8705         regcaches before changing the register cache layout or the target
8706         regsets.
8707
8708 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
8709
8710         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8711         variable warning on Linux/x86-64.
8712
8713 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8714
8715         GDBserver disconnected tracing support.
8716
8717         * linux-low.c (linux_remove_process): Delete.
8718         (add_lwp): Don't set last_resume_kind here.
8719         (linux_kill): Use `mourn'.
8720         (linux_detach): Use `thread_db_detach', and `mourn'.
8721         (linux_mourn): New.
8722         (linux_attach_lwp_1): Adjust comment.
8723         (linux_attach): last_resume_kind moved the thread_info; adjust.
8724         (status_pending_p_callback): Adjust.
8725         (linux_wait_for_event_1): Adjust.
8726         (count_events_callback, select_singlestep_lwp_callback)
8727         (select_event_lwp_callback, cancel_breakpoints_callback)
8728         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8729         (proceed_one_lwp): Adjust.
8730         (linux_async): Add debug output.
8731         (linux_thread_stopped): New.
8732         (linux_pause_all): New.
8733         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8734         linux_pause_all.
8735         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8736         (thread_db_free): Delete declaration.
8737         (thread_db_detach, thread_db_mourn): Declare.
8738         * thread-db.c (thread_db_init): Use thread_db_mourn.
8739         (thread_db_free): Delete, split in two.
8740         (disable_thread_event_reporting): New.
8741         (thread_db_detach): New.
8742         (thread_db_mourn): New.
8743
8744         * server.h (struct thread_info) <last_resume_kind>: New field.
8745         <attached>: Add comment.
8746         <gdb_detached>: New field.
8747         (handler_func): Change return type to int.
8748         (handle_serial_event, handle_target_event): Ditto.
8749         (gdb_connected): Declare.
8750         (tracing): Delete.
8751         (disconnected_tracing): Declare.
8752         (stop_tracing): Declare.
8753
8754         * server.c (handle_query) <qSupported>: Report support for
8755         disconnected tracing.
8756         (queue_stop_reply_callback): Account for running threads.
8757         (gdb_wants_thread_stopped): New.
8758         (gdb_wants_all_threads_stopped): New.
8759         (gdb_reattached_process): New.
8760         (handle_status): Clear the `gdb_detached' flag of all processes.
8761         In all-stop, stop all threads.
8762         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
8763         (process_serial_event): If the remote connection breaks, or if an
8764         exit was forced with "monitor exit", force an event loop exit.
8765         Handle disconnected tracing on detach.
8766         (handle_serial_event): Adjust.
8767         (handle_target_event): If GDB isn't connected, forward events back
8768         to the inferior, unless the last process exited, in which case,
8769         exit gdbserver.  Adjust interface.
8770
8771         * remote-utils.c (remote_open): Don't block in accept.  Instead
8772         register an event loop source on the listen socket file
8773         descriptor.  Refactor bits into ...
8774         (listen_desc): ... this new global.
8775         (gdb_connected): ... this new function.
8776         (enable_async_notification): ... this new function.
8777         (handle_accept_event): ... this new function.
8778         (remote_close): Clear remote_desc.
8779
8780         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8781
8782         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8783         New fields.
8784         (mourn_inferior): Define.
8785         (target_process_qsupported): Avoid the dangling else problem.
8786         (thread_stopped): Define.
8787         (pause_all): Define.
8788         (target_waitstatus_to_string): Declare.
8789         * target.c (target_waitstatus_to_string): New.
8790
8791         * tracepoint.c (tracing): Make extern.
8792         (disconnected_tracing): New.
8793         (stop_tracing): Make extern.  Handle tracing stops due to GDB
8794         disconnecting.
8795         (cmd_qtdisconnected): New.
8796         (cmd_qtstatus): Report disconnected tracing status in trace reply.
8797         (handle_tracepoint_general_set): Handle QTDisconnected.
8798
8799         * event-loop.c (event_handler_func): Change return type to int.
8800         (process_event): Bail out if the event handler wants the event
8801         loop to stop.
8802         (handle_file_event): Ditto.
8803         (start_event_loop): Bail out if the event handler wants the event
8804         loop to stop.
8805
8806         * nto-low.c (nto_target_ops): Adjust.
8807         * spu-low.c (spu_wait): Don't remove the process here.
8808         (spu_target_ops): Adjust.
8809         * win32-low.c (win32_wait): Don't remove the process here.
8810         (win32_target_ops): Adjust.
8811
8812 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8813
8814         * regcache.c (realloc_register_cache): Invalidate inferior's
8815         regcache before recreating it.
8816
8817 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
8818
8819         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8820
8821 2010-04-09  Stan Shebs  <stan@codesourcery.com>
8822             Pedro Alves  <pedro@codesourcery.com>
8823
8824         * server.h (LONGEST): New.
8825         (struct thread_info) <while_stepping>: New field.
8826         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8827         Declare.
8828         (initialize_tracepoint, handle_tracepoint_general_set)
8829         (handle_tracepoint_query, tracepoint_finished_step)
8830         (tracepoint_was_hit, release_while_stepping_state_list):
8831         (current_traceframe): Declare.
8832         * server.c (handle_general_set): Handle tracepoint packets.
8833         (read_memory): New.
8834         (write_memory): New.
8835         (handle_search_memory_1): Use read_memory.
8836         (handle_query): Report support for conditional tracepoints, trace
8837         state variables, and tracepoint sources.  Handle tracepoint
8838         queries.
8839         (main): Initialize the tracepoints module.
8840         (process_serial_event): Handle traceframe reads/writes.
8841
8842         * linux-low.c (handle_tracepoints): New.
8843         (linux_wait_1): Call it.
8844         (linux_resume_one_lwp): Handle while-stepping.
8845         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8846         (linux_target_ops): Install them.
8847         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8848         New field.
8849         * linux-x86-low.c (x86_supports_tracepoints): New.
8850         (the_low_target). Install it.
8851
8852         * mem-break.h (delete_breakpoint): Declare.
8853         * mem-break.c (delete_breakpoint): Make external.
8854
8855         * target.h (struct target_ops): Add `supports_tracepoints',
8856         `read_pc', and `write_pc' fields.
8857         (target_supports_tracepoints): Define.
8858         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8859         (phex_nz): New.
8860
8861         * regcache.h (struct regcache) <registers_owned>: New field.
8862         (init_register_cache, regcache_cpy): Declare.
8863         (regcache_read_pc, regcache_write_pc): Declare.
8864         (register_cache_size): Declare.
8865         (supply_regblock): Declare.
8866         * regcache.c (init_register_cache): New.
8867         (new_register_cache): Use it.
8868         (regcache_cpy): New.
8869         (register_cache_size): New.
8870         (supply_regblock): New.
8871         (regcache_read_pc, regcache_write_pc): New.
8872
8873         * tracepoint.c: New.
8874
8875         * Makefile.in (OBS): Add tracepoint.o.
8876         (tracepoint.o): New rule.
8877
8878 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
8879
8880         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8881         (i386-mmx.o): New.
8882         (i386-mmx.c): Likewise.
8883         (i386-mmx-linux.o): Likewise.
8884         (i386-mmx-linux.c): Likewise.
8885
8886         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8887         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8888         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8889         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8890
8891         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8892         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8893         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8894
8895 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
8896
8897         * Makefile.in (clean): Updated.
8898         (i386-avx.o): New.
8899         (i386-avx.c): Likewise.
8900         (i386-avx-linux.o): Likewise.
8901         (i386-avx-linux.c): Likewise.
8902         (amd64-avx.o): Likewise.
8903         (amd64-avx.c): Likewise.
8904         (amd64-avx-linux.o): Likewise.
8905         (amd64-avx-linux.c): Likewise.
8906
8907         * configure.srv (srv_i386_regobj): Add i386-avx.o.
8908         (srv_i386_linux_regobj): Add i386-avx-linux.o.
8909         (srv_amd64_regobj): Add amd64-avx.o.
8910         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8911         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8912         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8913         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8914         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8915         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8916         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8917
8918         * i387-fp.c: Include "i386-xstate.h".
8919         (i387_xsave): New.
8920         (i387_cache_to_xsave): Likewise.
8921         (i387_xsave_to_cache): Likewise.
8922         (x86_xcr0): Likewise.
8923
8924         * i387-fp.h (i387_cache_to_xsave): Likewise.
8925         (i387_xsave_to_cache): Likewise.
8926         (x86_xcr0): Likewise.
8927
8928         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8929         * linux-crisv32-low.c (target_regsets): Likewise.
8930         * linux-m68k-low.c (target_regsets): Likewise.
8931         * linux-mips-low.c (target_regsets): Likewise.
8932         * linux-ppc-low.c (target_regsets): Likewise.
8933         * linux-s390-low.c (target_regsets): Likewise.
8934         * linux-sh-low.c (target_regsets): Likewise.
8935         * linux-sparc-low.c (target_regsets): Likewise.
8936         * linux-xtensa-low.c (target_regsets): Likewise.
8937
8938         * linux-low.c: Include <sys/uio.h>.
8939         (regsets_fetch_inferior_registers): Support nt_type.
8940         (regsets_store_inferior_registers): Likewise.
8941         (linux_process_qsupported): New.
8942         (linux_target_ops): Add linux_process_qsupported.
8943
8944         * linux-low.h (regset_info): Add nt_type.
8945         (linux_target_ops): Add process_qsupported.
8946
8947         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8948         and <sys/uio.h>.
8949         (init_registers_i386_avx_linux): New.
8950         (init_registers_amd64_avx_linux): Likewise.
8951         (xmltarget_i386_linux_no_xml): Likewise.
8952         (xmltarget_amd64_linux_no_xml): Likewise.
8953         (PTRACE_GETREGSET): Likewise.
8954         (PTRACE_SETREGSET): Likewise.
8955         (x86_fill_xstateregset): Likewise.
8956         (x86_store_xstateregset): Likewise.
8957         (use_xml): Likewise.
8958         (x86_linux_update_xmltarget): Likewise.
8959         (x86_linux_process_qsupported): Likewise.
8960         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8961         (x86_arch_setup): Don't call init_registers_amd64_linux nor
8962         init_registers_i386_linux here.  Call
8963         x86_linux_update_xmltarget.
8964         (the_low_target): Add x86_linux_process_qsupported.
8965
8966         * server.c (handle_query): Call target_process_qsupported.
8967
8968         * target.h (target_ops): Add process_qsupported.
8969         (target_process_qsupported): New.
8970
8971 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
8972
8973         * inferiors.c (add_thread): Set last_status kind to
8974         TARGET_WAITKIND_IGNORE.
8975         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8976         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
8977         (linux_wait_1): Move `thread' local definition to block that uses
8978         it.  Don't NULL initialize `event_child'.
8979         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8980         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8981         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8982
8983 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
8984
8985         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8986         an extended waitstatus, or by a watchpoint.
8987         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8988         thread was stepping or has been stopped by a watchpoint.
8989
8990 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
8991
8992         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8993         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8994         of another, then delete the previous, and validate all
8995         breakpoints.
8996         (validate_inserted_breakpoint): New.
8997         (delete_disabled_breakpoints): New.
8998         (validate_breakpoints): New.
8999         (check_mem_read): Validate breakpoints before trusting their
9000         shadow.  Delete disabled breakpoints.
9001         (check_mem_write): Validate breakpoints before trusting they
9002         should be inserted.  Delete disabled breakpoints.
9003         * mem-break.h (validate_breakpoints):
9004         * server.c (handle_query): Validate breakpoints when we see a
9005         qSymbol query.
9006
9007 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9008
9009         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9010         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9011         if we could tell there's a GDB breakpoint at stop_pc.
9012         (need_step_over_p): Don't do a step over if we find a GDB
9013         breakpoint at the resume PC.
9014
9015         * mem-break.c (struct raw_breakpoint): New.
9016         (enum bkpt_type): New type `gdb_breakpoint'.
9017         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9018         fields.  New field `raw'.
9019         (find_raw_breakpoint_at): New.
9020         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9021         breakpoint instead.
9022         (set_breakpoint_at): Adjust.
9023         (delete_raw_breakpoint): New.
9024         (release_breakpoint): New.
9025         (delete_breakpoint): Rename to...
9026         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9027         release_breakpoint.  Return ENOENT.
9028         (delete_breakpoint): Reimplement.
9029         (find_breakpoint_at): Delete.
9030         (find_gdb_breakpoint_at): New.
9031         (delete_breakpoint_at): Delete.
9032         (set_gdb_breakpoint_at): New.
9033         (delete_gdb_breakpoint_at): New.
9034         (gdb_breakpoint_here): New.
9035         (set_reinsert_breakpoint): Use release_breakpoint.
9036         (uninsert_breakpoint): Rename to ...
9037         (uninsert_raw_breakpoint): ... this.
9038         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9039         (reinsert_raw_breakpoint): Change parameter type to
9040         raw_breakpoint.
9041         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9042         instead.
9043         (check_breakpoints): Adjust.  Use release_breakpoint.
9044         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9045         (breakpoint_inserted_here): Ditto.
9046         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9047         Don't trust the breakpoint's shadow if it is not inserted.
9048         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9049         (delete_all_breakpoints): Adjust.
9050         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9051         use delete_breakpoint_1.
9052
9053         * mem-break.h (breakpoints_supported): Delete declaration.
9054         (set_gdb_breakpoint_at): Declare.
9055         (gdb_breakpoint_here): Declare.
9056         (delete_breakpoint_at): Delete.
9057         (delete_gdb_breakpoint_at): Declare.
9058
9059         * server.h (struct raw_breakpoint): Forward declare.
9060         (struct process_info): New field `raw_breakpoints'.
9061
9062         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9063         breakpoints.
9064
9065 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9066
9067         * linux-low.c (status_pending_p_callback): Fix comment.
9068         (linux_wait_for_event_1): Move most of the internal breakpoint
9069         handling from here...
9070         (linux_wait_1): ... to here.
9071         (count_events_callback): New.
9072         (select_singlestep_lwp_callback): New.
9073         (select_event_lwp_callback): New.
9074         (cancel_breakpoints_callback): New.
9075         (select_event_lwp): New.
9076         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9077         priority to all LWPs that have had events that should be reported
9078         to the client.  Cancel breakpoints when about to reporting the
9079         event to the client, not while stopping lwps.  No longer cancel
9080         finished single-steps here.
9081         (cancel_finished_single_step): Delete.
9082         (cancel_finished_single_steps): Delete.
9083
9084 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9085
9086         * mem-break.c (enum bkpt_type): New.
9087         (struct breakpoint): New field `type'.
9088         (set_breakpoint_at): Change return type to struct breakpoint
9089         pointer.  Set type to `other_breakpoint' by default.
9090         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9091         in the breakpoint list.
9092         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9093         (reinsert_breakpoint): Rename to ...
9094         (reinsert_raw_breakpoint): ... this.
9095         (reinsert_breakpoints_at): Adjust.
9096         * mem-break.h (struct breakpoint): Declare.
9097         (set_breakpoint_at): Change return type to struct breakpoint
9098         pointer.
9099
9100 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9101
9102         * server.c (handle_query): Assign, not compare.
9103
9104 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9105
9106         Teach linux gdbserver to step-over-breakpoints.
9107
9108         * linux-low.c (can_hardware_single_step): New.
9109         (supports_breakpoints): New.
9110         (handle_extended_wait): If stopping threads, read the stop pc of
9111         the new cloned LWP.
9112         (get_pc): New.
9113         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9114         low target doesn't support retrieving the PC.
9115         (add_lwp): Set last_resume_kind to resume_continue.
9116         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9117         (linux_attach): Don't clear stop_expected.  Set the lwp's
9118         last_resume_kind to resume_stop.
9119         (linux_detach_one_lwp): Don't check for removed breakpoints.
9120         (check_removed_breakpoint): Delete.
9121         (status_pending_p): Rename to ...
9122         (status_pending_p_callback): ... this.  Don't check for removed
9123         breakpoints.  Don't consider threads that are stopped from GDB's
9124         perspective.
9125         (linux_wait_for_lwp): Always read the stop_pc here.
9126         (cancel_breakpoint): New.
9127         (step_over_bkpt): New global.
9128         (linux_wait_for_event_1): Implement stepping over breakpoints.
9129         (gdb_wants_lwp_stopped): New.
9130         (gdb_wants_all_stopped): New.
9131         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9132         single-step traps here.  Store the thread's last reported target
9133         wait status.
9134         (send_sigstop): Don't clear stop_expected.  Always set it,
9135         instead.
9136         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9137         (cancel_finished_single_step): New.
9138         (cancel_finished_single_steps): New.
9139         (wait_for_sigstop): Don't cancel finished single-step traps here.
9140         (linux_resume_one_lwp): Don't check for removed breakpoints.
9141         Don't set `step' on non-hardware step archs.
9142         (linux_set_resume_request): Ignore resume_stop requests if already
9143         stopping or stopped.  Set the lwp's last_resume_kind.
9144         (resume_status_pending_p): Don't check for removed breakpoints.
9145         (need_step_over_p): New.
9146         (start_step_over): New.
9147         (finish_step_over): New.
9148         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9149         requests.  Clear the thread's last reported target waitstatus.
9150         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9151         (linux_resume): Start a step-over if necessary.
9152         (proceed_one_lwp): New.
9153         (proceed_all_lwps): New.
9154         (unstop_all_lwps): New.
9155         * linux-low.h (struct lwp_info): Rewrite comment for the
9156         `suspended' flag.  Add the `stop_pc' field.  Delete the
9157         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9158         Add `'last_resume_kind' and `need_step_over' fields.
9159         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9160         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9161         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9162         (set_raw_breakpoint_at): New.
9163         (set_breakpoint_at): Rewrite to use it.
9164         (reinsert_breakpoint_handler): Delete.
9165         (set_reinsert_breakpoint): New.
9166         (reinsert_breakpoint_by_bp): Delete.
9167         (delete_reinsert_breakpoints): New.
9168         (uninsert_breakpoint): Rewrite.
9169         (uninsert_breakpoints_at): New.
9170         (reinsert_breakpoint): Rewrite.
9171         (reinsert_breakpoints_at): New.
9172         (check_breakpoints): Rewrite.
9173         (breakpoint_here): New.
9174         (breakpoint_inserted_here): New.
9175         (check_mem_read): Adjust.
9176         * mem-break.h (breakpoints_supported, breakpoint_here)
9177         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9178         (reinsert_breakpoint_by_bp): Delete declaration.
9179         (delete_reinsert_breakpoints): Declare.
9180         (reinsert_breakpoint): Delete declaration.
9181         (reinsert_breakpoints_at): Declare.
9182         (uninsert_breakpoint): Delete declaration.
9183         (uninsert_breakpoints_at): Declare.
9184         (check_breakpoints): Adjust prototype.
9185         * server.h: Adjust include order.
9186         (struct thread_info): Declare here.  Add a `last_status' field.
9187
9188 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9189
9190         * server.c (crc32): New function.
9191         (handle_query): Add handling for 'qCRC:' request.
9192
9193 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9194
9195         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9196         lwp had been stopped by a watchpoint.
9197
9198 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9199
9200         * server.h (internal_error): Declare.
9201         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9202         * utils.c (internal_error): New function.
9203
9204 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9205
9206         * configure.srv: Fix typo setting srv_regobj.
9207
9208 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9209
9210         * linux-low.c (fetch_register): Avoid passing a non string literal
9211         format to `error'.
9212         (usr_store_inferior_registers): Ditto.
9213
9214 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9215
9216         * linux-low.c (linux_write_memory): Bail out early if peeking
9217         memory failed.
9218
9219 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9220
9221         * linux-low.h (struct lwp_info): New fields
9222         `stopped_by_watchpoint' and `stopped_data_address'.
9223         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9224         here, and cache them in the lwp object.
9225         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9226         directly.
9227         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9228         field.
9229         (linux_stopped_by_watchpoint): Rewrite.
9230         (linux_stopped_data_address): Rewrite.
9231
9232 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9233
9234         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9235         switching the current inferior, not before.
9236
9237 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9238
9239         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9240         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9241         i386-linux.c and amd64-linux.c.
9242         (reg-i386.o): Removed.
9243         (reg-i386.c): Likewise.
9244         (reg-i386-linux.o): Likewise.
9245         (reg-i386-linux.c): Likewise.
9246         (reg-x86-64.o): Likewise.
9247         (reg-x86-64.c): Likewise.
9248         (reg-x86-64-linux.o): Likewise.
9249         (reg-x86-64-linux.c): Likewise.
9250         (i386.o): New.
9251         (i386.c): Likewise.
9252         (i386-linux.o): Likewise.
9253         (i386-linux.c): Likewise.
9254         (amd64.o): Likewise.
9255         (amd64.c): Likewise.
9256         (amd64-linux.o): Likewise.
9257         (amd64-linux.c): Likewise.
9258
9259         * configure.srv (srv_i386_regobj): New.
9260         (srv_i386_linux_regobj): Likewise.
9261         (srv_amd64_regobj): Likewise.
9262         (srv_amd64_linux_regobj): Likewise.
9263         (srv_i386_32bit_xmlfiles): Likewise.
9264         (srv_i386_64bit_xmlfiles): Likewise.
9265         (srv_i386_xmlfiles): Likewise.
9266         (srv_amd64_xmlfiles): Likewise.
9267         (srv_i386_linux_xmlfiles): Likewise.
9268         (srv_amd64_linux_xmlfiles): Likewise.
9269         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9270         srv_xmlfiles to $srv_i386_xmlfiles.
9271         (i[34567]86-*-mingw32ce*): Likewise.
9272         (i[34567]86-*-mingw*): Likewise.
9273         (i[34567]86-*-nto*): Likewise.
9274         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9275         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9276         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9277         (x86_64-*-linux*): Likewise.
9278
9279         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9280         (init_registers_amd64_linux): New.
9281         (x86_arch_setup): Replace init_registers_x86_64_linux with
9282         init_registers_amd64_linux.
9283
9284 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9285
9286         * configure.ac: Check for libdl.  If it is not available link against
9287         static libthread_db.
9288         * configure: Regenerate.
9289
9290 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9291
9292         PR9605
9293
9294         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9295         handing a read watchpoint.
9296         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9297
9298 2010-02-12  Doug Evans  <dje@google.com>
9299
9300         * linux-low.c (linux_supports_tracefork_flag): Document.
9301         (linux_look_up_symbols): Add comment.
9302
9303 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9304
9305         * regcache.c (supply_register): Clear regcache if buf is NULL.
9306
9307 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9308             Joel Brobecker  <brobecker@adacore.com>
9309
9310         * inferiors.c (find_inferior): Add function documentation.
9311         (unloaded_dll): Handle the case where the unloaded dll has not
9312         been previously registered in the dll list.
9313
9314 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9315
9316         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9317         (thumb2_breakpoint): New.
9318         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9319
9320 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9321
9322         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9323         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9324         breakpoints.
9325
9326 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9327
9328         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9329
9330 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9331
9332         * linux-s390-low.c (s390_collect_ptrace_register)
9333         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9334
9335 2010-01-21  Doug Evans  <dje@google.com>
9336
9337         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9338         (PTRACE_ARG4_TYPE): New macro.
9339         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9340         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9341         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9342         (usr_store_inferior_registers): Ditto.
9343         (linux_read_memory, linux_write_memory): Ditto.
9344         (linux_test_for_tracefork): Ditto.
9345
9346         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9347         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9348
9349 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9350
9351         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9352         target.
9353
9354 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9355
9356         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9357         prototype to take a regcache.  Adjust.
9358
9359 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9360
9361         * regcache.h (struct thread_info): Forward declare.
9362         (struct regcache): New.
9363         (new_register_cache): Adjust prototype.
9364         (get_thread_regcache): Declare.
9365         (free_register_cache): Adjust prototype.
9366         (registers_to_string, registers_from_string): Ditto.
9367         (supply_register, supply_register_by_name, collect_register)
9368         (collect_register_as_string, collect_register_by_name): Ditto.
9369         * regcache.c (struct inferior_regcache_data): Delete.
9370         (get_regcache): Rename to ...
9371         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9372         fetching registers.
9373         (regcache_invalidate_one): Adjust.
9374         (regcache_invalidate): Fix prototype.
9375         (new_register_cache): Return the new register cache.
9376         (free_register_cache): Change prototype.
9377         (realloc_register_cache): Adjust.
9378         (registers_to_string): Change prototype to take a regcache.  Adjust.
9379         (registers_from_string): Ditto.
9380         (register_data): Ditto.
9381         (supply_register): Ditto.
9382         (supply_register_by_name): Ditto.
9383         (collect_register): Ditto.
9384         (collect_register_as_string): Ditto.
9385         (collect_register_by_name): Ditto.
9386         * server.c (process_serial_event): Adjust.
9387         * linux-low.h (regset_fill_func, regset_store_func): Change
9388         prototype.
9389         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9390         Change prototype.
9391         * linux-low.c (get_stop_pc): Adjust.
9392         (check_removed_breakpoint): Adjust.
9393         (linux_wait_for_event): Adjust.
9394         (linux_resume_one_lwp): Adjust.
9395         (fetch_register): Add regcache parameter.  Adjust.
9396         (usr_store_inferior_registers): Ditto.
9397         (regsets_fetch_inferior_registers): Ditto.
9398         (regsets_store_inferior_registers): Ditto.
9399         (linux_fetch_registers, linux_store_registers): Ditto.
9400         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9401         regcache.  Adjust.
9402         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9403         Ditto.
9404         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9405         prototype to take a regcache.
9406         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9407         * remote-utils.c (convert_ascii_to_int, outreg)
9408         (prepare_resume_reply): Change prototype to take a regcache.
9409         Adjust.
9410         * target.h (struct target_ops) <fetch_registers, store_registers>:
9411         Change prototype to take a regcache.
9412         (fetch_inferior_registers, store_inferior_registers): Change
9413         prototype to take a regcache.  Adjust.
9414         * proc-service.c (ps_lgetregs): Adjust.
9415         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9416         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9417         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9418         take a regcache.  Adjust.
9419         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9420         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9421         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9422         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9423         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9424         (cris_cannot_fetch_register):
9425         (cris_breakpoint_at): Change prototype to take a regcache.
9426         Adjust.
9427         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9428         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9429         to take a regcache.  Adjust.
9430         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9431         Adjust.
9432         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9433         take a regcache.  Adjust.
9434         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9435         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9436         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9437         * linux-mips-low.c (mips_get_pc):
9438         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9439         (mips_reinsert_addr): Adjust.
9440         (mips_collect_register): Change prototype to take a regcache.
9441         Adjust.
9442         (mips_supply_register):
9443         (mips_collect_register_32bit, mips_supply_register_32bit)
9444         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9445         (mips_store_fpregset): Ditto.
9446         * linux-ppc-low.c (ppc_supply_ptrace_register)
9447         (ppc_supply_ptrace_register): Ditto.
9448         (parse_spufs_run): Adjust.
9449         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9450         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9451         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9452         take a regcache.  Adjust.
9453         * linux-s390-low.c (s390_collect_ptrace_register)
9454         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9455         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9456         (s390_arch_setup): Adjust.
9457         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9458         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9459         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9460         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9461         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9462         regcache.  Adjust.
9463         (sparc_breakpoint_at): Adjust.
9464         * linux-xtensa-low.c (xtensa_fill_gregset):
9465         (xtensa_store_gregset):
9466         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9467         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9468         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9469         prototype to take a regcache.  Adjust.
9470         * win32-arm-low.c (arm_fetch_inferior_register)
9471         (arm_store_inferior_register): Change prototype to take a
9472         regcache.  Adjust.
9473         * win32-i386-low.c (i386_fetch_inferior_register)
9474         (i386_store_inferior_register): Change prototype to take a
9475         regcache.  Adjust.
9476         * win32-low.c (child_fetch_inferior_registers)
9477         (child_store_inferior_registers): Change prototype to take a
9478         regcache.  Adjust.
9479         (win32_wait): Adjust.
9480         (win32_fetch_inferior_registers): Change prototype to take a
9481         regcache.  Adjust.
9482         (win32_store_inferior_registers): Adjust.
9483         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9484         store_inferior_register>: Change prototype to take a regcache.
9485
9486 2010-01-20  Doug Evans  <dje@google.com>
9487
9488         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9489         #ifdef.
9490         (linux_wait_for_event1, linux_init_signals): Ditto.
9491         (W_STOPCODE): Provide definition if missing.
9492
9493 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9494
9495         * linux-low.c (linux_core_of_thread): New.
9496         (compare_ints, show_process, list_threads): New.
9497         (linux_qxfer_osdata): Report threads and cores.
9498         (linux_target_op): Register linux_core_of_thread.
9499         * remote-utils.c (prepare_resume_reply): Report the core.
9500         (buffer_xml_printf): Support %d specifier.
9501         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9502         New.
9503         (handle_query): Handle qXfer:threads.  Announce availability
9504         thereof.
9505         * target.h (struct target_ops): New field core_of_thread.
9506
9507 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
9508
9509         * Makefile.in (clean): Remove new generated files.
9510         (reg-s390.o, reg-s390.c): Remove rules.
9511         (reg-s390x.o, reg-s390x.c): Likewise.
9512         (s390-linux32.o, s390-linux32.c): Add rules.
9513         (s390-linux64.o, s390-linux64.c): Likewise.
9514         (s390x-linux64.o, s390x-linux64.c): Likewise.
9515         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9516         * linux-s390-low.c: Include <elf.h>.
9517         (HWCAP_S390_HIGH_GPRS): Define if undefined.
9518         (init_registers_s390): Remove prototype.
9519         (init_registers_s390x): Likewise.
9520         (init_registers_s390_linux32): Add prototype.
9521         (init_registers_s390_linux64): Likewise.
9522         (init_registers_s390x_linux64): Likewise.
9523         (s390_num_regs_3264): New define.
9524         (s390_regmap_3264): New global variable.
9525         (s390_cannot_fetch_register): Remove obsolete check.
9526         (s390_cannot_store_register): Likewise.
9527         (s390_collect_ptrace_register): Handle upper/lower register halves.
9528         (s390_supply_ptrace_register): Likewise.
9529         (s390_fill_gregset): Update to register number changes.
9530         (s390_get_hwcap): New routine.
9531         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9532         Install appropriate regmap and register set.
9533
9534 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
9535
9536         * server.c (gdbserver_version): Update copyright year to 2010.
9537         * gdbreplay.c (gdbreplay_version): Likewise.
9538
9539 2009-12-28  Doug Evans  <dje@google.com>
9540
9541         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9542         elf/external.h.  Include <elf.h> instead but only if necessary.
9543
9544 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
9545
9546         * linux-low.c (linux_remove_process): Remove `detaching'
9547         parameter.  Don't release/detach from thread_db here.
9548         (linux_kill): Release/detach from thread_db here, ...
9549         (linux_detach): ... and here, before actually detaching.
9550         (linux_wait_1): ... and here, when a process exits.
9551         * thread-db.c (any_thread_of): New.
9552         (thread_db_free): Switch the current inferior to a thread of the
9553         passed in process.
9554
9555 2009-12-21  Doug Evans  <dje@google.com>
9556
9557         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9558
9559         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9560         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9561         warning ifndef __NR_tkill.  Move setting of errno there too.
9562         Delete unnecessary resetting of errno after syscall.
9563         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9564
9565         * configure.ac: Check for dladdr.
9566         * config.in: Regenerate.
9567         * configure: Regenerate.
9568         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9569         (try_thread_db_load): Update.
9570
9571         * linux-low.c (my_waitpid): Delete unnecessary prototype.
9572
9573 2009-12-18  Doug Evans  <dje@google.com>
9574
9575         * event-loop.c: Include unistd.h if it exists.
9576
9577         * linux-low.c (my_waitpid): Move definition away from being in
9578         between linux_tracefork_child/linux_test_for_tracefork.
9579
9580         * gdb_proc_service.h (psaddr_t): Fix type.
9581         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9582         signature to match glibc.
9583
9584 2009-12-16  Doug Evans  <dje@google.com>
9585
9586         * linux-low.c (linux_read_memory): Fix argument to read.
9587
9588 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9589
9590         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9591         events, don't leave current_inferior pointing at null.
9592
9593 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9594
9595         * win32-low.c (LOG): Delete.
9596         (OUTMSG): Output to stderr.
9597         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9598         on compile time LOG macro.
9599         (win32_wait): Fix debug output.
9600
9601 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9602
9603         * win32-low.c (win32_add_one_solib): If the dll name is
9604         "ntdll.dll", prepend the system directory to the dll path.
9605
9606 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
9607
9608         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9609
9610 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9611             Vladimir Prus  <vladimir@codesourcery.com>
9612
9613         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9614         * configure.ac: Check for __mcoldfire__ and set
9615         gdb_cv_m68k_is_coldfire.
9616         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9617         reg-cf.o and reg-m68k.o.
9618         * configure: Regenerated.
9619
9620 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
9621
9622         * linux-low.c (linux_remove_process): Add `detaching' parameter.
9623         Pass it to thread_db_free.
9624         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9625         proper `detaching' argument to linux_remove_process.
9626         * linux-low.h (thread_db_free): Add `detaching' parameter.
9627         * thread-db.c (thread_db_init): Pass false as `detaching' argument
9628         to thread_db_free.
9629         (thread_db_free): Add `detaching' parameter.  Only
9630         call td_ta_clear_event if detaching from process.
9631
9632 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
9633
9634         * thread-db.c (thread_db_free): Fix typo.
9635
9636 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
9637
9638         PR gdb/10838
9639         * thread-db.c (thread_db_free): Call td_ta_clear_event.
9640
9641 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
9642
9643         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9644         with an i686 compiler.
9645         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9646         needed.
9647         * configure: Rebuilt.
9648
9649 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
9650
9651         PR gdb/10783
9652
9653         * server.c (handle_search_memory_1): Correct read_addr initialization
9654         in loop for searching subsequent chunks.
9655
9656 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
9657
9658         * configure.ac: New --with-libthread-db option.
9659         * thread-db.c: Allow direct dependence on libthread_db.
9660         (thread_db_free): Adjust.
9661         * config.in: Regenerate.
9662         * configure: Likewise.
9663
9664 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
9665
9666         PR gdb/10757
9667         * thread-db.c (attach_thread): New function.
9668         (maybe_attach_thread): Return success/failure.
9669         (find_new_threads_callback): Adjust.
9670         (thread_db_find_new_threads): Loop until no new threads.
9671
9672 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
9673
9674         * proc-service.c (ps_lgetregs): Formatting.
9675
9676 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
9677
9678         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9679         * configure.ac: Adjust.
9680         * linux-low.h (struct process_info_private): Move members to struct
9681         thread_db.
9682         (thread_db_free, thread_db_handle_monitor_command): New prototype.
9683         * linux-low.c (linux_remove_process): Adjust.
9684         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9685         * server.c (handle_query): Move code ...
9686         (handle_monitor_command): ... here. New function.
9687         * target.h (struct target_ops): New member.
9688         * thread-db.c (struct thread_db): New.
9689         (libthread_db_search_path): New variable.
9690         (thread_db_create_event, thread_db_enable_reporting)
9691         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9692         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9693         (try_thread_db_load_1, dladdr_to_soname): New functions.
9694         (try_thread_db_load, thread_db_load_search): New functions.
9695         (thread_db_init): Search for libthread_db.
9696         (thread_db_free): New function.
9697         (thread_db_handle_monitor_command): Likewise.
9698         * config.in: Regenerate.
9699         * configure: Regenerate.
9700
9701 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
9702
9703         * spu-low.c (spu_kill): Wait for inferior to terminate.
9704         Call clear_inferiors.
9705         (spu_detach): Call clear_inferiors.
9706
9707 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9708
9709         * aclocal.m4: Regenerate.
9710         * config.in: Likewise.
9711         * configure: Likewise.
9712
9713 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9714
9715         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9716         (parse_spufs_run): New function.
9717         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9718         (ppc_breakpoint_at): Handle SPU breakpoints.
9719
9720 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9721
9722         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9723         (SPUFS_MAGIC): Define.
9724         (spu_enumerate_spu_ids): New function.
9725         (linux_qxfer_spu): New function.
9726         (linux_target_ops): Install linux_qxfer_spu.
9727
9728 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9729
9730         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9731         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
9732         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9733         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9734         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9735         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9736         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9737         (init_registers_powerpc_cell32l): Add prototype.
9738         (init_registers_powerpc_cell64l): Likewise.
9739         (ppc_arch_setup): Detect Cell/B.E. architecture.
9740
9741 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9742
9743         * Makefile.in (datarootdir): New variable.
9744
9745 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9746
9747         * linux-low.c (linux_write_memory): Update debugging output.
9748         * Makefile.in (clean): Add new descriptions.
9749         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9750         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9751         * configure.srv: Add new files for arm*-*-linux*.
9752         * linux-arm-low.c: Add new declarations.
9753         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9754         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9755         (HWCAP_VFPv3D16): New.
9756         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9757         instead of __IWMMXT__.
9758         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9759         (arm_arch_setup): New.
9760         (target_regsets): Remove #ifdef.  Add VFP regset.
9761         (the_low_target): Use arm_arch_setup.
9762
9763 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9764
9765         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9766         the main thread again.
9767
9768 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
9769
9770         Adding Neutrino gdbserver.
9771         * configure: Regenerated.
9772         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9773         * configure.srv (i[34567]86-*-nto*): New target.
9774         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9775         * remote-utils.c [__QNX__]: Include sys/iomgr.h
9776         (nto_comctrl) [__QNX__]: New function.
9777         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9778
9779 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
9780
9781         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9782         srv_tgtobj.
9783
9784 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
9785             Pedro Alves  <pedro@codesourcery.com>
9786
9787         * win32-i386-low.c (i386_get_thread_context): Handle systems that
9788         don't support CONTEXT_EXTENDED_REGISTERS.
9789         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9790         (the_low_target): Install them.
9791         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9792         failing with ERROR_PIPE_NOT_CONNECTED.
9793
9794 2009-06-30  Doug Evans  <dje@google.com>
9795             Pierre Muller  <muller@ics.u-strasbg.fr>
9796
9797         Add h/w watchpoint support to x86-linux, win32-i386.
9798         * Makefile.in (SFILES): Add i386-low.c
9799         (i386_low_h): Define.
9800         (i386-low.o): Add dependencies.
9801         (linux-x86-low.o): Add i386-low.h dependency.
9802         (win32-i386-low.o): Ditto.
9803         * i386-low.c: New file.
9804         * i386-low.h: New file.
9805         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9806         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9807         * linux-low.c (linux_add_process): Initialize arch_private.
9808         (linux_remove_process): Free arch_private.
9809         (add_lwp): Initialize arch_private.
9810         (delete_lwp): Free arch_private.
9811         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9812         provided.
9813         * linux-low.h (process_info_private): New member arch_private.
9814         (lwp_info): New member arch_private.
9815         (linux_target_ops): New members new_process, new_thread,
9816         prepare_to_resume.
9817         (ptid_of): New macro.
9818         * linux-x86-low.c: Include stddef.h, i386-low.h.
9819         (arch_process_info): New struct.
9820         (arch_lwp_info): New struct.
9821         (x86_linux_dr_get, x86_linux_dr_set): New functions.
9822         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9823         (i386_dr_low_get_status): New function.
9824         (x86_insert_point, x86_remove_point): New functions.
9825         (x86_stopped_by_watchpoint): New function.
9826         (x86_stopped_data_address): New function.
9827         (x86_linux_new_process, x86_linux_new_thread): New functions.
9828         (x86_linux_prepare_to_resume): New function.
9829         (the_low_target): Add entries for insert_point, remove_point,
9830         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9831         prepare_to_resume.
9832         * server.c (debug_hw_points): New global.
9833         (monitor_show_help): Document set debug-hw-points.
9834         (handle_query): Process "set debug-hw-points".
9835         * server.h (debug_hw_points): Declare.
9836         (paddress): Declare.
9837         * utils.c (NUMCELLS, CELLSIZE): New macros.
9838         (get_sell, xsnprintf, paddress): New functions.
9839         * win32-arm-low.c (the_low_target): Add entries for insert_point,
9840         remove_point, stopped_by_watchpoint, stopped_data_address.
9841         * win32-i386-low.c: Include i386-low.h.
9842         (debug_reg_state): Replaces dr.
9843         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9844         (i386_dr_low_get_status): New function.
9845         (i386_insert_point, i386_remove_point): New functions.
9846         (i386_stopped_by_watchpoint): New function.
9847         (i386_stopped_data_address): New function.
9848         (i386_initial_stuff): Update.
9849         (get_thread_context,set_thread_context,i386_thread_added): Update.
9850         (the_low_target): Add entries for insert_point,
9851         remove_point, stopped_by_watchpoint, stopped_data_address.
9852         * win32-low.c (win32_insert_watchpoint): New function.
9853         (win32_remove_watchpoint): New function.
9854         (win32_stopped_by_watchpoint): New function.
9855         (win32_stopped_data_address): New function.
9856         (win32_target_ops): Add entries for insert_watchpoint,
9857         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9858         * win32-low.h (win32_target_ops): New members insert_point,
9859         remove_point, stopped_by_watchpoint, stopped_data_address.
9860
9861 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
9862
9863         * server.c (process_serial_event): Re-return unsupported, not
9864         error, if the type isn't recognized.  Re-allow supporting only
9865         insert or remove packets.  Also call require_running for
9866         breakpoints.  Add missing break statement to default case.  Tidy.
9867         * target.h (struct target_ops): Rename insert_watchpoint to
9868         insert_point, and remove_watchpoint to remove_point.
9869
9870         * linux-low.h (struct linux_target_ops): Likewise.
9871         * linux-low.c (linux_insert_watchpoint): Rename to ...
9872         (linux_insert_point): ... this.  Adjust.
9873         (linux_remove_watchpoint): Rename to ...
9874         (linux_remove_point): ... this.  Adjust.
9875         (linux_target_ops): Adjust.
9876         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9877         (cris_insert_point): ... this.
9878         (cris_remove_watchpoint): Rename to ...
9879         (cris_remove_point): ... this.
9880         (the_low_target): Adjust.
9881
9882 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
9883
9884         * server.c (handle_v_kill): Pass signal_pid to
9885         kill_inferior if multi_process is zero.
9886
9887 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
9888
9889         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9890         * target.h (target_ops): Comment for *_watchpoint to make it clear
9891         the functions can get types '0' and '1'.
9892
9893 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
9894
9895         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9896         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9897         * regcache.c (get_regcache): Likewise.
9898         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9899         * win32-low.c (child_fetch_inferior_registers): Remove check for
9900         regno 0.
9901
9902 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
9903             Pedro Alves <pedro@codesourcery.com>
9904
9905         * target.h (struct target_ops) <supports_multi_process>: New
9906         callback.
9907         (target_supports_multi_process): New.
9908         * server.c (handle_query): Even if GDB reports support, only
9909         enable multi-process if the target also supports it.  Report
9910         multi-process support only if the target backend supports it.
9911         * linux-low.c (linux_supports_multi_process): New function.
9912         (linux_target_ops): Install it as target_supports_multi_process
9913         callback.
9914
9915 2009-05-24  Doug Evans  <dje@google.com>
9916
9917         Global renaming of find_thread_pid to find_thread_ptid.
9918         * server.h (find_thread_ptid): Renamed from find_thread_pid.
9919         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9920         All callers updated.
9921
9922         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9923         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9924         directly.
9925
9926         * linux-low.c (get_stop_pc): Print pc if debug_threads.
9927         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9928         (linux_resume_one_lwp): Ditto.
9929
9930 2009-05-23  Doug Evans  <dje@google.com>
9931
9932         * linux-low.c (linux_resume_one_lwp): Change type of first arg
9933         from struct inferior_list_entry * to struct lwp_info *.
9934         All callers updated.
9935
9936 2009-05-13  Doug Evans  <dje@google.com>
9937
9938         * linux-x86-low.c: Don't include assert.h.
9939         (x86_siginfo_fixup): Use fatal, not assert.
9940         (x86_arch_setup): Fix comment.
9941
9942 2009-05-12  Doug Evans  <dje@google.com>
9943
9944         Biarch support for i386/amd64 gdbserver.
9945         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9946         Add linux-x86-low.c.
9947         (linux-i386-low.o, linux-x86-64-low.o): Delete.
9948         (linux-x86-low.o): Add.
9949         * linux-x86-64-low.c: Delete.
9950         * linux-i386-low.c: Delete.
9951         * linux-x86-low.c: New file.
9952         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9953         linux-x86-low.o.
9954         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9955         linux-x86-low.o.
9956         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9957         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9958         (linux_child_pid_to_exec_file): New function.
9959         (elf_64_header_p, elf_64_file_p): New functions.
9960         (siginfo_fixup): New function.
9961         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
9962         give target a chance to convert layout.
9963         * linux-low.h (linux_target_ops): New member siginfo_fixup.
9964         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9965
9966 2009-05-07  Doug Evans  <dje@google.com>
9967
9968         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9969         (regsets_store_inferior_registers): Ditto.
9970
9971 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
9972
9973         PR server/10048
9974
9975         * linux-low.c (must_set_ptrace_flags): Delete.
9976         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9977         of the global.
9978         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
9979         `lwp->must_set_ptrace_flags' instead.
9980         (linux_wait_for_event_1): Set ptrace options here.
9981         (linux_wait_1): ... not here.
9982
9983 2009-04-30  Doug Evans  <dje@google.com>
9984
9985         * inferiors.c (started_inferior_callback): New function.
9986         (attached_inferior_callback): New function.
9987         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9988         * server.c (print_started_pid, print_attached_pid): New functions.
9989         (detach_or_kill_for_exit): New function.
9990         (main): Call it instead of for_each_inferior (kill_inferior_callback).
9991         * server.h (have_started_inferiors_p): Declare.
9992         (have_attached_inferiors_p): Declare.
9993
9994         * inferiors.c (remove_process): Fix memory leak, free process.
9995         * linux-low.c (linux_remove_process): New function.
9996         (linux_kill): Call it instead of remove_process.
9997         (linux_detach, linux_wait_1): Ditto.
9998
9999 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10000
10001         * configure.srv: Add x86 Windows CE target.
10002
10003 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10004
10005         * inferiors.c (get_thread_process): Make global.
10006         * server.h (get_thread_process): Add prototype.
10007         * thread-db.c (find_one_thread): Use get_thread_process
10008         instead of current_process.
10009         (thread_db_get_tls_address): Do not crash if called when
10010         thread layer is not yet initialized.
10011
10012 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10013
10014         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10015         * spu-low.c (current_tid): Rename to ...
10016         (current_ptid): ... this.
10017         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10018         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10019         ptid_get_lwp (current_ptid) instead of current_tid.
10020         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10021         instead of current_tid.  Use find_process_pid to verify pid
10022         argument is valid.  Pass proper argument to remove_process.
10023         (spu_thread_alive): Compare current_ptid instead of current_tid.
10024         (spu_resume): Likewise.
10025
10026 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10027
10028         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10029         variable.
10030
10031 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10032
10033         Implement the multiprocess extensions, and add linux multiprocess
10034         support.
10035
10036         * server.h (ULONGEST): Declare.
10037         (struct ptid, ptid_t): New.
10038         (minus_one_ptid, null_ptid): Declare.
10039         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10040         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10041         (struct inferior_list_entry): Change `id' type from unsigned from
10042         to ptid_t.
10043         (struct sym_cache, struct breakpoint, struct
10044         process_info_private): Forward declare.
10045         (struct process_info): Declare.
10046         (current_process): Declare.
10047         (all_processes): Declare.
10048         (initialize_inferiors): Declare.
10049         (add_thread): Adjust to use ptid_t.
10050         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10051         (add_process, remove_process, find_thread_pid): Declare.
10052         (find_inferior_id): Adjust to use ptid_t.
10053         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10054         (multi_process): Declare.
10055         (push_event): Adjust to use ptid_t.
10056         (read_ptid, write_ptid): Declare.
10057         (prepare_resume_reply): Adjust to use ptid_t.
10058         (clear_symbol_cache): Declare.
10059         * inferiors.c (all_processes): New.
10060         (null_ptid, minus_one_ptid): New.
10061         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10062         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10063         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10064         parameter.  Adjust.
10065         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10066         (gdb_id_to_thread): Rename to ...
10067         (find_thread_pid): ... this.  Change unsigned long to ptid.
10068         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10069         (loaded_dll, pull_pid_from_list): Adjust.
10070         (add_process, remove_process, find_process_pid)
10071         (get_thread_process, current_process, initialize_inferiors): New.
10072         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10073         (struct target_waitstatus) <related_pid>: Ditto.
10074         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10075         return type to int.
10076         (struct target_ops) <join>: Add `pid' argument.
10077         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10078         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10079         to ptid.
10080         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10081         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10082         (target_pid_to_str): Declare.
10083         * target.c (set_desired_inferior): Adjust to use ptids.
10084         (mywait): Add new `ptid' argument.  Adjust.
10085         (target_pid_to_str): New.
10086         * mem-break.h (free_all_breakpoints): Declare.
10087         * mem-break.c (breakpoints): Delelete.
10088         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10089         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10090         to use per-process breakpoint list.
10091         (free_all_breakpoints): New.
10092         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10093         (symbol_cache, all_symbols_looked_up): Delete.
10094         (hexchars): New.
10095         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10096         read_ptid): New.
10097         (prepare_resume_reply): Change ptid argument's type from unsigned
10098         long to ptid_t.  Adjust.  Implement W;process and X;process.
10099         (free_sym_cache, clear_symbol_cache): New.
10100         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10101         * server.c (cont_thread, general_thread, step_thread): Change type
10102         to ptid_t.
10103         (attached): Delete.
10104         (multi_process): New.
10105         (last_ptid): Change type to ptid_t.
10106         (struct vstop_notif) <ptid>: Change type to ptid_t.
10107         (queue_stop_reply, push_event): Change `ptid' argument's type to
10108         ptid_t.
10109         (discard_queued_stop_replies): Add `pid' argument.
10110         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10111         changes.  Don't reference the `attached' global.
10112         (attach_inferior): Adjust to mywait interface changes.
10113         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10114         features.  Handle and report "multiprocess+".  Handle
10115         "qAttached:PID".
10116         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10117         changes.
10118         (handle_v_kill): New.
10119         (handle_v_stopped): Adjust to use target_pid_to_str.
10120         (handle_v_requests): Allow multiple attaches and runs when
10121         multiprocess extensions are in effect.  Handle "vKill".
10122         (myresume): Adjust to use ptids.
10123         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10124         (handle_status): Adjust to discard_queued_stop_replies interface
10125         change.
10126         (first_thread_of, kill_inferior_callback)
10127         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10128         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10129         and detaching from all inferiors.  Handle multiprocess packet
10130         variants.
10131         * linux-low.h: Include gdb_proc_service.h.
10132         (struct process_info_private): New.
10133         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10134         <lwpid_of>: Use ptid_get_lwp.
10135         (get_lwp_thread): Adjust.
10136         (struct lwp_info): Add `dead' member.
10137         (find_lwp_pid): Declare.
10138         * linux-low.c (thread_db_active): Delete.
10139         (new_inferior): Adjust comment.
10140         (inferior_pid): Delete.
10141         (linux_add_process): New.
10142         (handle_extended_wait): Adjust.
10143         (add_lwp): Change unsigned long to ptid.
10144         (linux_create_inferior): Add process to processes table.  Adjust
10145         to use ptids.  Don't set new_inferior here.
10146         (linux_attach_lwp): Rename to ...
10147         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10148         it.  Adjust to use ptids.
10149         (linux_attach_lwp): New.
10150         (linux_attach): Add process to processes table.  Don't set
10151         new_inferior here.
10152         (struct counter): New.
10153         (second_thread_of_pid_p, last_thread_of_process_p): New.
10154         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10155         multiple processes.
10156         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10157         processes.  Remove process from process table.
10158         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10159         to multiple processes.
10160         (any_thread_of): New.
10161         (linux_detach): Add `pid' argument, and handle it.  Remove process
10162         from processes table.
10163         (linux_join): Add `pid' argument.  Handle it.
10164         (linux_thread_alive): Change unsighed long argument to ptid_t.
10165         Consider dead lwps as not being alive.
10166         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10167         threads we're not interested in.
10168         (same_lwp, find_lwp_pid): New.
10169         (linux_wait_for_lwp): Change `pid' argument's type from int to
10170         ptid_t.  Adjust.
10171         (linux_wait_for_event): Rename to ...
10172         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10173         from int to ptid_t.  Adjust.
10174         (linux_wait_for_event): New.
10175         (linux_wait_1): Add `ptid' argument.  Change return type to
10176         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10177         that exit from the process table.
10178         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10179         Adjust.
10180         (mark_lwp_dead): New.
10181         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10182         stopping all threads, mark its main lwp as dead.
10183         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10184         ptids.
10185         (fetch_register, usr_store_inferior_registers)
10186         (regsets_fetch_inferior_registers)
10187         (regsets_store_inferior_registers, linux_read_memory)
10188         (linux_write_memory): Inline `inferior_pid'.
10189         (linux_look_up_symbols): Adjust to use per-process
10190         `thread_db_active'.
10191         (linux_request_interrupt): Adjust to use ptids.
10192         (linux_read_auxv): Inline `inferior_pid'.
10193         (initialize_low): Don't reference thread_db_active.
10194         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10195         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10196         (ps_getpid): Return the pid of the current inferior.
10197         * thread-db.c (proc_handle, thread_agent): Delete.
10198         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10199         per-process data.
10200         (find_one_thread): Change argument type to ptid_t.  Adjust to
10201         per-process data.
10202         (maybe_attach_thread): Adjust to per-process data and ptids.
10203         (thread_db_find_new_threads): Ditto.
10204         (thread_db_init): Ditto.
10205         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10206         processes table.  Adjust to use ptids.
10207         (spu_kill, spu_detach): Adjust interface.  Remove process from
10208         processes table.
10209         (spu_join, spu_thread_alive): Adjust interface.
10210         (spu_wait): Adjust interface.  Remove process from processes
10211         table.  Adjust to use ptids.
10212         * win32-low.c (current_inferior_tid): Delete.
10213         (current_inferior_ptid): New.
10214         (debug_event_ptid): New.
10215         (thread_rec): Take a ptid.  Adjust.
10216         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10217         (child_delete_thread): Ditto.
10218         (do_initial_child_stuff): Add `attached' argument.  Add process to
10219         processes table.
10220         (child_fetch_inferior_registers, child_store_inferior_registers):
10221         Adjust.
10222         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10223         (win32_attach): Pass 1 to do_initial_child_stuff.
10224         (win32_kill): Adjust interface.  Remove process from processes
10225         table.
10226         (win32_detach): Ditto.
10227         (win32_join): Adjust interface.
10228         (win32_thread_alive): Take a ptid.
10229         (win32_resume): Adjust to use ptids.
10230         (get_child_debug_event): Ditto.
10231         (win32_wait): Adjust interface.  Remove exiting process from
10232         processes table.
10233
10234 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10235
10236         Non-stop mode support.
10237
10238         * server.h (non_stop): Declare.
10239         (gdb_client_data, handler_func): Declare.
10240         (delete_file_handler, add_file_handler, start_event_loop):
10241         Declare.
10242         (handle_serial_event, handle_target_event, push_event)
10243         (putpkt_notif): Declare.
10244         * target.h (enum resume_kind): New.
10245         (struct thread_resume): Replace `step' field by `kind' field.
10246         (TARGET_WNOHANG): Define.
10247         (struct target_ops) <wait>: Add `options' argument.
10248         <supports_non_stop, async, start_non_stop>: New fields.
10249         (target_supports_non_stop, target_async): New.
10250         (start_non_stop): Declare.
10251         (mywait): Add `options' argument.
10252         * target.c (mywait): Add `options' argument.  Print child exit
10253         notifications here.
10254         (start_non_stop): New.
10255         * server.c (non_stop, own_buf, mem_buf): New globals.
10256         (struct vstop_notif): New.
10257         (notif_queue): New global.
10258         (queue_stop_reply, push_event, discard_queued_stop_replies)
10259         (send_next_stop_reply): New.
10260         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10261         interface changes.
10262         (attach_inferior): In non-stop mode, don't wait for the target
10263         here.
10264         (handle_general_set): Handle QNonStop.
10265         (handle_query): When handling qC, return the current general
10266         thread, instead of the first thread of the list.
10267         (handle_query): If the backend supports non-stop mode, include
10268         QNonStop+ in the qSupported query response.
10269         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10270         and non-stop mode.
10271         (handle_v_attach, handle_v_run): Handle non-stop mode.
10272         (handle_v_stopped): New.
10273         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10274         (myresume): Adjust to use resume_kind.  Handle non-stop.
10275         (queue_stop_reply_callback): New.
10276         (handle_status): Handle non-stop mode.
10277         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10278         Refactor serial protocol handling from here ...
10279         (process_serial_event): ... to this new function.  When GDB
10280         selects any thread, select one here.  In non-stop mode, wait until
10281         GDB acks all pending events before exiting.
10282         (handle_serial_event, handle_target_event): New.
10283         * remote-utils.c (remote_open): Install remote_desc in the event
10284         loop.
10285         (remote_close): Remove remote_desc from the event loop.
10286         (putpkt_binary): Rename to...
10287         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10288         (putpkt_binary): New as wrapper around putpkt_binary_1.
10289         (putpkt_notif): New.
10290         (prepare_resume_reply): In non-stop mode, don't change the
10291         general_thread.
10292         * event-loop.c: New.
10293         * Makefile.in (OBJ): Add event-loop.o.
10294         (event-loop.o): New rule.
10295
10296         * linux-low.h (pid_of): Moved here.
10297         (lwpid_of): New.
10298         (get_lwp_thread): Use lwpid_of.
10299         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10300         * linux-low.c (pid_of): Delete.
10301         (inferior_pid): Use lwpid_of.
10302         (linux_event_pipe): New.
10303         (target_is_async_p): New.
10304         (delete_lwp): New.
10305         (handle_extended_wait): Use lwpid_of.
10306         (add_lwp): Don't set lwpid field.
10307         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10308         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10309         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10310         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10311         first.  Adjust to linux_wait_for_event interface changes.  Use
10312         lwpid_of.
10313         (linux_detach): Don't delete the main lwp here.
10314         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10315         (status_pending_p): Don't consider explicitly suspended lwps.
10316         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10317         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10318         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10319         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10320         pointer.  Add status pointer argument.  Return a pid instead of a
10321         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10322         changes.  In non-stop mode, don't switch to a random thread.
10323         (linux_wait): Rename to...
10324         (linux_wait_1): ... this.  Add target_options argument, and handle
10325         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10326         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10327         clean exit and signal exit code.  Don't stop all threads in
10328         non-stop mode.  In all-stop mode, only stop all threads when
10329         reporting a stop to GDB.  Handle explicit thread stop requests.
10330         (async_file_flush, async_file_mark): New.
10331         (linux_wait): New.
10332         (send_sigstop): Use lwpid_of.
10333         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10334         interface changes.  In non-stop mode, don't switch to a random
10335         thread.
10336         (linux_resume_one_lwp): Use lwpid_of.
10337         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10338         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10339         non-stop mode, don't look for pending flag in all threads.
10340         (resume_status_pending_p): Don't consider explicitly suspended
10341         threads.
10342         (my_waitpid): Reimplement.  Emulate __WALL.
10343         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10344         Use lwpid_of.
10345         (sigchld_handler, linux_supports_non_stop, linux_async)
10346         (linux_start_non_stop): New.
10347         (linux_target_ops): Register linux_supports_non_stop, linux_async
10348         and linux_start_non_stop.
10349         (initialize_low): Install SIGCHLD handler.
10350         * thread-db.c (thread_db_create_event, find_one_thread)
10351         (thread_db_get_tls_address): Use lwpid_of.
10352         * win32-low.c (win32_detach): Adjust to use resume_kind.
10353         (win32_wait): Add `options' argument.
10354         * spu-low.c (spu_resume): Adjust to use resume_kind.
10355         (spu_wait): Add `options' argument.
10356
10357 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10358
10359         Decouple target code from remote protocol.
10360
10361         * target.h (enum target_waitkind): New.
10362         (struct target_waitstatus): New.
10363         (struct target_ops) <wait>: Return an unsigned long.  Take a
10364         target_waitstatus pointer instead of a char pointer.
10365         (mywait): Likewise.
10366         * target.c (mywait): Change prototype to return an unsigned long.
10367         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10368         * server.h (thread_from_wait, old_thread_from_wait): Delete
10369         declarations.
10370         (prepare_resume_reply): Change prototype to take a
10371         target_waitstatus.
10372         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10373         (last_status, last_ptid): New.
10374         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10375         pid instead of a signal.
10376         (attach_inferior): Remove "status" and "signal" parameters.
10377         Adjust.
10378         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10379         not as an address.
10380         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10381         (handle_v_requests, myresume): Remove "status" and "signal"
10382         parameters.  Adjust.
10383         (handle_status): New.
10384         (main): Delete local `status'.  Adjust.
10385         * remote-utils.c: Include target.h.
10386         (prepare_resume_reply): Change prototype to take a
10387         target_waitstatus.  Adjust.
10388
10389         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10390         interface.
10391         * spu-low.c (spu_wait): Adjust.
10392         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10393         Delete.
10394         (win32_wait): Adjust.
10395
10396 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10397
10398         * target.h (struct thread_resume): Delete leave_stopped member.
10399         (struct target_ops): Add a `n' argument to the `resume' callback.
10400         * server.c (start_inferior): Adjust.
10401         (handle_v_cont, myresume): Adjust.
10402         * linux-low.c (check_removed_breakpoint): Adjust to resume
10403         interface change, and to removed leave_stopped field.
10404         (resume_ptr): Delete.
10405         (struct thread_resume_array): New.
10406         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10407         resume interface change.
10408         (linux_continue_one_thread, linux_queue_one_thread)
10409         (resume_status_pending_p): Check if the resume field is NULL
10410         instead of checking the leave_stopped member.
10411         (linux_resume): Adjust to the target resume interface change.
10412         * spu-low.c (spu_resume): Adjust to the target resume interface
10413         change.
10414         * win32-low.c (win32_detach, win32_resume): Ditto.
10415
10416 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10417
10418         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10419         flag.
10420         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10421         pending.
10422         (linux_continue_one_thread): Only preserve the stepping flag if
10423         there's a pending breakpoint.
10424
10425 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10426
10427         * server.c (main): After the inferior having exited, call
10428         remote_close before exiting gdbserver.
10429
10430 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10431
10432         Fix size of FPSCR in Power 7 processors.
10433         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10434         (PPC_FEATURE_HAS_DFP): New #define.
10435         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10436         size of the FPSCR.
10437
10438 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10439
10440         * server.c (handle_query) Whitespace and formatting.
10441
10442 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10443
10444         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10445         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10446         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10447         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10448         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10449         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10450         Makefile.in, configure.ac: Fix whitespace throughout.
10451         * configure: Regenerate.
10452
10453 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10454
10455         * inferiors.c (find_inferior): Make it safe for the callback
10456         function to delete the currently iterated inferior.
10457
10458 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10459
10460         * Makefile.in (linuw_low_h): Move higher.
10461         (thread-db.o): Depend on $(linux_low_h).
10462
10463 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10464
10465         Rename "process" to "lwp" throughout.
10466
10467         * linux-low.c (all_processes): Rename to...
10468         (all_lwps): ... this.
10469         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10470         (add_process): Rename to ...
10471         (add_lwp): ... this.  Adjust.
10472         (linux_create_inferior): Adjust.
10473         (linux_attach_lwp): Adjust.
10474         (linux_attach): Adjust.
10475         (linux_kill_one_process): Rename to ...
10476         (linux_kill_one_lwp): ... this.  Adjust.
10477         (linux_kill): Adjust.
10478         (linux_detach_one_process): Rename to ...
10479         (linux_detach_one_lwp): ... this.  Adjust.
10480         (linux_detach): Adjust.
10481         (check_removed_breakpoint): Adjust.
10482         (status_pending_p): Adjust.
10483         (linux_wait_for_process): Rename to ...
10484         (linux_wait_for_lwp): ... this.  Adjust.
10485         (linux_wait_for_event): Adjust.
10486         (send_sigstop): Adjust.
10487         (wait_for_sigstop): Adjust.
10488         (stop_all_processes): Rename to ...
10489         (stop_all_lwps): ... this.
10490         (linux_resume_one_process): Rename to ...
10491         (linux_resume_one_lwp): ... this.  Adjust.
10492         (linux_set_resume_request, linux_continue_one_thread)
10493         (linux_queue_one_thread, resume_status_pending_p)
10494         (usr_store_inferior_registers, regsets_store_inferior_registers)
10495         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10496         Adjust.
10497         * linux-low.h (get_process): Rename to ...
10498         (get_lwp): ... this.  Adjust.
10499         (get_thread_process): Rename to ...
10500         (get_thread_lwp): ... this.  Adjust.
10501         (get_process_thread): Rename to ...
10502         (get_lwp_thread): ... this.  Adjust.
10503         (struct process_info): Rename to ...
10504         (struct lwp_info): ... this.
10505         (all_processes): Rename to ...
10506         (all_lwps): ... this.
10507         * proc-service.c (ps_lgetregs): Adjust.
10508         * thread-db.c (thread_db_create_event, find_one_thread)
10509         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10510
10511 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
10512
10513         * server.c (handle_query): Handle "qAttached".
10514
10515 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
10516
10517         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10518         GPLv3, update license URL.
10519
10520 2009-03-01  Doug Evans  <dje@google.com>
10521
10522         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10523         (server_h): Add gdb_signals.h.
10524         (signals.o): Update.
10525         * server.h (target_signal_from_host,target_signal_to_host_p)
10526         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10527
10528 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10529
10530         * remote-utils.c (getpkt): Also generate remote-debug
10531         information if noack_mode is set.
10532
10533 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
10534
10535         * server.c (handle_query): Report qXfer:siginfo:read and
10536         qXfer:siginfo:write as supported and handle them.
10537         * target.h (struct target_ops) <qxfer_siginfo>: New field.
10538         * linux-low.c (linux_xfer_siginfo): New.
10539         (linux_target_ops): Set it.
10540
10541 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
10542
10543         * server.c (gdbserver_usage): Mention --remote-debug.
10544         (main): Accept '--remote-debug' switch.
10545
10546 2009-01-18  Doug Evans  <dje@google.com>
10547
10548         * regcache.c (new_register_cache): No need to check result of xcalloc.
10549         * server.c (handle_search_memory): Back out calls to xmalloc,
10550         result is checked and error is returned to user upon failure.
10551         (handle_query): Ditto.  Add more checks for result of malloc.
10552         (handle_v_cont): Check result of malloc, report error back to
10553         user upon failure.
10554         (handle_v_run): Ditto.  Call freeargv.
10555         * server.h (freeargv): Declare.
10556         * utils.c (freeargv): New fn.
10557
10558 2009-01-15  Doug Evans  <dje@google.com>
10559
10560         * gdbreplay.c (perror_with_name): Make arg const char *.
10561         * server.h (target_signal_to_name): Make return type const char *.
10562         * thread-db.c (thread_db_err_str): Make return type const char *.
10563         * utils.c (perror_with_name): Make arg const char *.
10564
10565 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
10566
10567         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10568         when handling a EXIT_PROCESS_DEBUG_EVENT.
10569
10570 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
10571
10572         * gdbreplay.c (gdbreplay_version): Update copyright year.
10573         * server.c (gdbserver_version): Likewise.
10574
10575 2009-01-05  Doug Evans  <dje@google.com>
10576
10577         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10578         (handle_extended_wait): Improve comment.
10579
10580 2008-12-13  Doug Evans  <dje@google.com>
10581
10582         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10583         * server.h (ATTR_MALLOC): New macro.
10584         (xmalloc,xcalloc,xstrdup): Declare.
10585         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10586         * inferiors.c: Ditto.
10587         * linux-low.c: Ditto.
10588         * mem-break.c: Ditto.
10589         * regcache.c: Ditto.
10590         * remote-utils.c: Ditto.
10591         * server.c: Ditto.
10592         * target.c: Ditto.
10593         * win32-low.c: Ditto.
10594
10595 2008-12-12  Doug Evans  <dje@google.com>
10596
10597         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10598         in debugging printf.
10599
10600         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10601
10602 2008-12-09  Doug Evans  <dje@google.com>
10603
10604         * linux-low.h (struct process_info): Delete member tid, unused.
10605         * thread-db.c (find_one_thread): Update.
10606         (maybe_attach_thread): Update.
10607
10608 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
10609
10610         * target.h (struct target_ops): Add qxfer_osdata member.
10611         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10612         and dirent.h.
10613         (linux_qxfer_osdata): New functions.
10614         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10615         callback.
10616         * server.c (handle_query): Handle "qXfer:osdata:read:".
10617         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10618         (buffer_xml_printf): New functions.
10619         * server.h (struct buffer): New.
10620         (buffer_grow_str, buffer_grow_str0): New macros.
10621         (buffer_grow, buffer_free, buffer_init, buffer_finish)
10622         (buffer_xml_printf): Declare.
10623
10624 2008-11-24  Doug Evans  <dje@google.com>
10625
10626         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10627
10628 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
10629
10630         * server.c (handle_v_run): Always use the supplied argument list.
10631
10632 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
10633
10634         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10635         (xtensa_regmap_table): Add entry for scompare1.
10636
10637 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10638
10639         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10640         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10641         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10642         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10643         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10644         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10645         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10646         XML target descriptions.
10647         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10648         when inferior is running on an ISA 2.05 or later processor.  Add
10649         special case to return offset for full 64-bit slot of FPSCR when
10650         in 32-bits.
10651
10652 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
10653
10654         * Makefile.in (SFILES, clean): Added sparc64 files.
10655         (reg-sparc64.o, reg-sparc64.c): New.
10656         * configure.srv (sparc*-*-linux*): New configuration.
10657         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10658         syscall arguments for SPARC.
10659         (regsets_store_inferior_registers): Likewise.
10660         * linux-sparc-low.c: New file.
10661
10662 2008-10-21  Doug Evans  <dje@google.com>
10663
10664         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10665         (READLINE_DIR,READLINE_DEP): Delete.
10666         (INTERNAL_CFLAGS): Update.
10667         (LINTFLAGS): Update.
10668
10669 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
10670
10671         * server.c (handle_v_run): If GDB didn't specify an argv, use the
10672         whole argv from the last run, not just argv[0].
10673
10674 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
10675
10676         * regcache.c (new_register_cache): Return NULL if the register
10677         cache size isn't known yet.
10678         (free_register_cache): Avoid dereferencing a NULL regcache.
10679
10680 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10681
10682         * configure.srv: Merge MIPS and MIPS64.
10683
10684 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
10685
10686         * Makefile.in (uninstall): Apply $(EXEEXT) too.
10687
10688 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
10689
10690         * Makefile.in: Add required vsx dependencies.
10691
10692         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10693         Declare init_registers_powerpc_vsx32l.
10694         Declare init_registers_powerpc_vsx64l.
10695         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10696         (ppc_arch_setup): Check for VSX in hwcap.
10697         (ppc_fill_vsxregset): New function.
10698         (ppc_store_vsxregset): New function.
10699         Add new VSX entry in regset_info target_regsets.
10700
10701         * configure.srv: Add new VSX dependencies.
10702
10703 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
10704
10705         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10706         (remote_open): Set or clear transport_is_reliable.
10707         (putpkt_binary): Don't expect acks in noack mode.
10708         (getpkt): Don't send ack/nac in noack mode.
10709         * server.c (handle_general_set): Handle QStartNoAckMode.
10710         (handle_query): If connected by tcp pass QStartNoAckMode+ in
10711         qSupported.
10712         (main): Reset noack_mode on every connection.
10713         * server.h (noack_mode): Declare.
10714
10715 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10716
10717         * Makefile.in (GDBREPLAY_OBS): New variable.
10718         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10719
10720 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
10721             Daniel Jacobowitz  <dan@codesourcery.com>
10722
10723         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10724         (usr_store_inferior_registers): Likewise.
10725         (regsets_store_inferior_registers): Likewise.
10726
10727 2008-07-31  Rolf Jansen  <rj@surtec.com>
10728             Pedro Alves  <pedro@codesourcery.com>
10729
10730         * configure.ac: Check for memmem declaration.
10731         * server.c [HAVE_MALLOC_H]: Include malloc.h.
10732         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10733         (disable_packet_qfThreadInfo): Unconditionally compile.
10734         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10735         * configure, config.in: Regenerate.
10736
10737 2008-07-28  Doug Kwan  <dougkwan@google.com>
10738
10739         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10740         (linux_write_memory): Remove declaration of errno.
10741
10742 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
10743
10744         * linux-low.c (handle_extended_wait): Do not use "status"
10745         variable uninitialized.
10746
10747 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
10748
10749         * server.c (handle_v_attach): Inhibit reporting dll changes.
10750
10751 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
10752
10753         * remote-utils.c (prepare_resume_reply): If requested, don't
10754         output "thread:TID" in the T stop reply.
10755
10756         * server.c (disable_packet_vCont, disable_packet_Tthread)
10757         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10758         (handle_query): If requested, disable support for qC, qfThreadInfo
10759         and qsThreadInfo.
10760         (handle_v_requests): If requested, disable support for vCont.
10761         (gdbserver_show_disableable): New.
10762         (main): Handle --disable-packet and --disable-packet=LIST.
10763
10764         * server.h (disable_packet_vCont, disable_packet_Tthread)
10765         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10766
10767 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
10768
10769         * server.c (gdbserver_usage): Mention --version.
10770
10771 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
10772
10773         * Makefile.in (gdbreplay.o): New rule.
10774
10775 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
10776
10777         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10778         message, not gdbserver.
10779
10780 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
10781             Nathan Sidwell  <nathan@codesourcery.com>
10782             Joseph Myers  <joseph@codesourcery.com>
10783
10784         * acinclude.m4: Include ../../config/acx.m4.
10785         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10786         * configure, config.in: Regenerate.
10787         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10788         * server.c (gdbserver_version): Print PKGVERSION.
10789         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
10790         (main): Adjust gdbserver_usage calls.
10791         * gdbreplay.c (version, host_name): Add declarations.
10792         (gdbreplay_version, gdbreplay_usage): New.
10793         (main): Accept --version and --help options.
10794
10795 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
10796
10797         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10798         (arm_breakpoint_at): Handle Thumb.
10799         (the_low_target): Add comment.
10800
10801 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
10802
10803         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10804
10805 2008-05-09  Doug Evans  <dje@google.com>
10806
10807         * server.h (decode_search_memory_packet): Declare.
10808         * remote-utils.c (decode_search_memory_packet): New fn.
10809         * server.c (handle_search_memory_1): New fn.
10810         (handle_search_memory): New fn.
10811         (handle_query): Process qSearch:memory packets.
10812
10813 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10814
10815         * regcache.c (registers_length): Remove.
10816         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10817         full register packet.
10818         * regcache.h (registers_length): Remove prototype.
10819         * server.h (PBUFSIZ): Define to 16384.
10820
10821 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
10822
10823         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10824         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10825         powerpc-64l.o, and powerpc-altivec64l.o.
10826         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10827         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10828         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10829         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10830         rs6000/power-linux.xml, and rs6000/power64-linux.xml
10831         to srv_xmlfiles.
10832
10833         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10834         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10835         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10836         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10837         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10838         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10839         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10840         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10841         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10842         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10843         (clean): Update.
10844
10845         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10846         (init_registers_powerpc_32l): ... this new prototype.
10847         (init_registers_powerpc_32): Remove, replace by ...
10848         (init_registers_powerpc_altivec32l): ... this new prototype.
10849         (init_registers_powerpc_e500): Remove, replace by ...
10850         (init_registers_powerpc_e500l): ... this new prototype.
10851         (init_registers_ppc64): Remove, replace by ...
10852         (init_registers_powerpc_64l): ... this new prototype.
10853         (init_registers_powerpc_64): Remove, replace by ...
10854         (init_registers_powerpc_altivec64l): ... this new prototype.
10855         (ppc_num_regs): Set to 73.
10856         (PT_ORIG_R3, PT_TRAP): Define if necessary.
10857         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10858         (ppc_cannot_store_register): Handle orig_r3 and trap.
10859         (ppc_arch_setup): Update init_registers_... calls.
10860         (ppc_fill_gregset): Handle orig_r3 and trap.
10861
10862         * inferiors.c (clear_inferiors): Reset current_inferior.
10863
10864 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
10865
10866         * acinclude.m4: Add override.m4.
10867         * configure: Regenerate.
10868
10869 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10870
10871         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10872         initial call to init_register_ppc64.
10873
10874 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10875
10876         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10877         single powerpc*-*-linux* case.
10878         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10879
10880 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
10881
10882         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10883         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10884         from reg_xmlfiles.
10885         * linux-ppc-low.c: Include <elf.h>.
10886         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10887         (ppc_hwcap): New global variable.
10888         (ppc_regmap): Remove __SPE__ #ifdef sections.
10889         (ppc_regmap_e500): New global variable.
10890         (ppc_cannot_store_register): Update __SPE__ special case.
10891         (ppc_get_hwcap): New function.
10892         (ppc_arch_setup): Use it to determine whether inferior supports
10893         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
10894         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10895         Do not access registers if target does not support AltiVec.
10896         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10897         Do not access registers if target does not support SPE.
10898         (target_regsets): Unconditionally include AltiVec and SPE regsets.
10899
10900 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
10901
10902         * linux-low.c (disabled_regsets, num_regsets): New.
10903         (use_regsets_p): Delete.
10904         (linux_wait_for_process): Clear disabled_regsets.
10905         (regsets_fetch_inferior_registers): Check and set it.
10906         (regsets_store_inferior_registers): Likewise.
10907         (linux_fetch_registers, linux_store_registers): Do not use
10908         use_regsets_p.
10909         (initialize_low): Allocate disabled_regsets.
10910
10911 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
10912
10913         * Makefile.in (LIBOBJS): New.
10914         (OBS): Use LIBOBJS.
10915         (memmem.o): New rule.
10916         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10917         * configure: Regenerated.
10918
10919 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
10920
10921         * server.c (handle_query): Never return "unsupported" for
10922         qXfer:features:read queries.
10923
10924 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
10925
10926         * server.c (get_features_xml): Fix inverted condition.
10927         (handle_query): Always support qXfer:feature:read.
10928
10929 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
10930
10931         * server.c (wrapper_argv): New.
10932         (start_inferior): Handle wrapper_argv.  If set, expect an extra
10933         trap.
10934         (gdbserver_usage): Document --wrapper.
10935         (main): Parse --wrapper.
10936
10937 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10938
10939         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10940         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10941         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10942         (ppc_set_pc): Likewise.
10943         (ppc_arch_setup): New function.
10944         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10945         of collect_register.
10946         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10947
10948 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10949
10950         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10951         instead of linux-ppc64-low.o.
10952         * linux-ppc64-low.c: Remove file.
10953         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10954         (linux-ppc64-low.o): Remove rule.
10955
10956         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10957         (init_registers_powerpc_64): Likewise.
10958         (ppc_regmap): Conditionally define depending on __powerpc64__.
10959         (ppc_cannot_store_register): Do not special-case "fpscr" when
10960         compiled on __powerpc64__.
10961         (ppc_collect_ptrace_register): New function.
10962         (ppc_supply_ptrace_register): New function.
10963         (ppc_breakpoint): Change type to "unsigned int".
10964         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10965         (the_low_target): Conditionally provide initializers for the
10966         arch_setup member depending on __powerpc64__.  Install
10967         collect_ptrace_register and supply_ptrace_register members.
10968
10969 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10970
10971         * regcache.h (gdbserver_xmltarget): Add extern declaration.
10972         * server.c (gdbserver_xmltarget): Define.
10973         (get_features_xml): Use it to replace "target.xml" and arch_string.
10974
10975         * configure.srv: Remove srv_xmltarget.  Add XML files that were
10976         mentioned there to srv_xmlfiles instead.  Remove conditional tests
10977         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10978         srv_xmlfiles and srv_regobj to include all possible choices.
10979         * configure.ac (srv_xmltarget): Remove.
10980         (srv_xmlfiles): Do not add "target.xml".
10981         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10982         checks for supplementary target information.
10983         * configure: Regenerate.
10984         * Makefile.in (XML_TARGET): Remove.
10985         (target.xml): Remove rule.
10986         (clean): Do not clean up target.xml.
10987         (.PRECIOUS): Do not mention target.xml.
10988
10989         * target.h (struct target_ops): Remove arch_string member.
10990         * linux-low.c (linux_arch_string): Remove.
10991         (linux_target_ops): Remove arch_string initializer.
10992         * linux-low.h (struct linux_target_ops): Remove arch_string member.
10993         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10994         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10995         * spu-low.c (spu_arch_string): Remove.
10996         (spu_target_ops): Remove arch_string initializer.
10997         * win32-low.c (win32_arch_string): Remove.
10998         (win32_target_ops): Remove arch_string initializer.
10999         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11000         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11001         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11002
11003 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11004
11005         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11006         by collect_ptrace_register and supply_ptrace_register hooks.
11007         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11008         instead of checking for the_low_target.left_pad_xfer.
11009         (usr_store_inferior_registers): Use collect_ptrace_register callback
11010         instead of checking for the_low_target.left_pad_xfer.
11011
11012         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11013         (s390_supply_ptrace_register): Likewise.
11014         (s390_fill_gregset): Call s390_collect_ptrace_register.
11015         (the_low_target): Update.
11016
11017         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11018         (ppc_supply_ptrace_register): Likewise.
11019         (the_low_target): Update.
11020
11021         * linux-i386-low.c (the_low_target): Update.
11022         * linux-x86-64-low.c (the_low_target): Update.
11023
11024 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11025
11026         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11027         reg-s390.o and reg-s390x.o.
11028
11029         * linux-low.c (new_inferior): New global variable.
11030         (linux_create_inferior, linux_attach): Set it.
11031         (linux_wait_for_process): Call the_low_target.arch_setup after the
11032         target has stopped for the first time.
11033         (initialize_low): Do not call the_low_target.arch_setup.
11034
11035         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11036         (s390_set_pc): Likewise.
11037         (s390_arch_setup): New function.
11038         (the_low_target): Use s390_arch_setup as arch_setup routine.
11039
11040         * regcache.c (realloc_register_cache): New function.
11041         (set_register_cache): Call it for each existing regcache.
11042
11043 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11044
11045         * server.h (init_registers): Remove prototype.
11046
11047         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11048         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11049         instead of init_registers ().
11050         * linux-arm-low.c (init_registers_arm): Add prototype.
11051         (init_registers_arm_with_iwmmxt): Likewise.
11052         (the_low_target): Add initializer for arch_setup field.
11053         * linux-cris-low.c (init_registers_cris): Add prototype.
11054         (the_low_target): Add initializer for arch_setup field.
11055         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11056         (the_low_target): Add initializer for arch_setup field.
11057         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11058         (the_low_target): Add initializer for arch_setup field.
11059         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11060         (the_low_target): Add initializer for arch_setup field.
11061         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11062         (the_low_target): Add initializer for arch_setup field.
11063         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11064         (the_low_target): Add initializer for arch_setup field.
11065         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11066         (init_registers_mips64_linux): Likewise.
11067         (the_low_target): Add initializer for arch_setup field.
11068         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11069         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11070         (the_low_target): Add initializer for arch_setup field.
11071         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11072         (init_registers_powerpc_64): Likewise.
11073         (the_low_target): Add initializer for arch_setup field.
11074         * linux-s390-low.c (init_registers_s390): Add prototype.
11075         (init_registers_s390x): Likewise.
11076         (the_low_target): Add initializer for arch_setup field.
11077         * linux-sh-low.c (init_registers_sh): Add prototype.
11078         (the_low_target): Add initializer for arch_setup field.
11079         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11080         (the_low_target): Add initializer for arch_setup field.
11081         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11082         (the_low_target): Add initializer for arch_setup field.
11083
11084         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11085         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11086         instead of init_registers ().
11087         * win32-arm-low.c (init_registers_arm): Add prototype.
11088         (the_low_target): Add initializer for arch_setup field.
11089         * win32-i386-low.c (init_registers_i386): Add prototype.
11090         (the_low_target): Add initializer for arch_setup field.
11091
11092         * spu-low.c (init_registers_spu): Add prototype.
11093         (initialize_low): Call initialie_registers_spu () instead of
11094         initialize_registers ().
11095
11096 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11097
11098         * server.c (handle_v_requests): When handling the vRun and vAttach
11099         packets, if already debugging a process, don't kill it.  Return an
11100         error instead.
11101
11102 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11103
11104         * server.c (handle_query): Correct length check.
11105
11106 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11107
11108         * win32-low.c (do_initial_child_stuff): Add process handle
11109         parameter.  Set current_process_handle and current_process_id from the
11110         parameters. Clear globals.
11111         (win32_create_inferior): Don't set current_process_handle and
11112         current_process_id here.  Instead pass them on the call to
11113         do_initial_child_stuff.
11114         (win32_attach): Likewise.
11115         (win32_clear_inferiors): New.
11116         (win32_kill): Don't close the current process handle or the
11117         current thread handle here.  Instead call win32_clear_inferiors.
11118         (win32_detach): Don't open a new handle to the process.  Call
11119         win32_clear_inferiors.
11120         (win32_join): Don't rely on current_process_handle; open a new
11121         handle using the process id.
11122         (win32_wait): Call win32_clear_inferiors when the inferior process
11123         has exited.
11124
11125 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11126
11127         * server.c (monitor_show_help): Add "exit".
11128
11129 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11130
11131         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11132         (clean): Add reg-xtensa.c.
11133         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11134         * configure.srv (xtensa*-*-linux*) New target.
11135         * linux-xtensa-low.c: New.
11136         * xtensa-xtregs.c: New.
11137
11138 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11139
11140         * hostio.c: Don't include errno.h.
11141         (errno_to_fileio_errno): Move to hostio-errno.
11142         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11143         error number outputting to the target->hostio_last_error callback.
11144         (hostio_packet_error): Use FILEIO_EINVAL directly.
11145         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11146         calls to hostio_error.
11147         * hostio-errno.c: New.
11148         * server.h (hostio_last_error_from_errno): Declare.
11149         * target.h (target_ops): Add hostio_last_error member.
11150         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11151         as hostio_last_error handler.
11152         * spu-low.c (spu_target_ops): Likewise.
11153         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11154         (wince_hostio_last_error): New functions.
11155         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11156         as hostio_last_error handler.
11157         (win32_target_ops) [!_WIN32_WCE]: Register
11158         hostio_last_error_from_errno as hostio_last_error handler.
11159         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11160         (hostio-errno.o): New rule.
11161         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11162         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11163         hostio-errno.o.
11164         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11165         * configure: Regenerate.
11166
11167 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11168
11169         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11170         (linux_kill, linux_detach): Clean up the process list.
11171         * remote-utils.c (remote_open): Improve port number parsing.
11172         (putpkt_binary, input_interrupt): Only send interrupts if the target
11173         is running.
11174         * server.c (extended_protocol): Make static.
11175         (attached): Define earlier.
11176         (exit_requested, response_needed, program_argv): New variables.
11177         (target_running): New.
11178         (start_inferior): Clear attached here.
11179         (attach_inferior): Set attached here.
11180         (require_running): Define.
11181         (handle_query): Use require_running and target_running.  Implement
11182         "monitor exit".
11183         (handle_v_attach, handle_v_run): New.
11184         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11185         (gdbserver_usage): Update.
11186         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11187         --attach along with other options or after the port.  Save
11188         program_argv.  Support no initial program.  Resynchronize
11189         communication with GDB after an error.  Handle "monitor exit".
11190         Use require_running and target_running.  Always allow the extended
11191         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11192         restart in extended mode.
11193         * README: Refer to the GDB manual.  Update --attach usage.
11194
11195 2007-12-20  Andreas Schwab  <schwab@suse.de>
11196
11197         * linux-low.c (STACK_SIZE): Define.
11198         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11199         (linux_test_for_tracefork): Likewise.
11200
11201 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11202
11203         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11204         reinsert auto-delete breakpoints.
11205         * mem-break.c (struct breakpoint): Change return type of handler to
11206         int.
11207         (set_breakpoint_at): Update handler type.
11208         (reinsert_breakpoint_handler): Return 1 instead of calling
11209         delete_breakpoint.
11210         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11211         setting a new one.
11212         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11213         * mem-break.h (set_breakpoint_at): Update handler type.
11214         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11215         * win32-low.c (auto_delete_breakpoint): New.
11216         (get_child_debug_event): Use it.
11217
11218 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11219
11220         * configure.ac: Check for pread and pwrite.
11221         * hostio.c (handle_pread): Fall back to lseek and read.
11222         (handle_pwrite): Fall back to lseek and write.
11223         * config.in, configure: Regenerated.
11224
11225 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11226
11227         * server.c (myresume): Add own_buf argument.
11228         (main): Update calls.
11229
11230 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11231
11232         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11233         * remote-utils.c (remote_open): Do not call disable_async_io.
11234         (block_async_io): Delete.
11235         (unblock_async_io): Make static.
11236         (initialize_async_io): New.
11237         * server.c (handle_v_cont): Handle async I/O here.
11238         (myresume): Likewise.  Move other common resume tasks here...
11239         (main): ... from here.  Call initialize_async_io.  Disable async
11240         I/O before the main loop.
11241         * server.h (initialize_async_io): Declare.
11242         (block_async_io, unblock_async_io): Delete prototypes.
11243         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11244
11245 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11246
11247         * remote-utils.c (readchar): Allow binary data in received messages.
11248
11249 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11250
11251         * win32-low.c (attaching): New global.
11252         (win32_create_inferior): Clear the `attaching' global.
11253         (win32_attach): Set the `attaching' global.
11254         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11255         attaching.  Only set a breakpoint at the entry point if not
11256         attaching.
11257
11258 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11259
11260         * server.c (main): Don't report dll events on the initial
11261         connection on attaches.
11262
11263 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11264
11265         * server.c (main): Relax numerical bases supported for the pid of
11266         the --attach command line argument.
11267
11268 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11269
11270         * win32-low.c (win32_attach): Call OpenProcess before
11271         DebugActiveProcess, not after.  Add last error output to error
11272         call.
11273
11274 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11275
11276         * win32-low.c (win32_get_thread_context)
11277         (win32_set_thread_context): New functions.
11278         (thread_rec): Use win32_get_thread_context.
11279         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11280         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11281         field.
11282
11283 2007-12-03  Leo Zayas
11284             Pedro Alves  <pedro_alves@portugalmail.pt>
11285
11286         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11287         global variables.
11288         (child_add_thread): Minor cleanup.
11289         (child_continue): Resume artificially suspended threads before
11290         calling ContinueDebugEvent.
11291         (suspend_one_thread): New.
11292         (fake_breakpoint_event): New.
11293         (get_child_debug_event): Change return type to int.  Check here if
11294         gdb sent an interrupt request.  If a soft interrupt was requested,
11295         fake a breakpoint event.  Return 0 if there is no event to handle,
11296         and 1 otherwise.
11297         (win32_wait): Don't check here if gdb sent an interrupt request.
11298         Ensure there is a valid event to handle.
11299         (win32_request_interrupt): Add soft interruption method as last
11300         resort.
11301
11302 2007-12-03  Leo Zayas
11303             Pedro Alves  <pedro_alves@portugalmail.pt>
11304
11305         * win32-low.h (win32_thread_info): Add descriptions to the
11306         structure members.  Replace `suspend_count' counter by a
11307         `suspended' flag.
11308         * win32-low.c (thread_rec): Update condition of when to get the
11309         context from the inferior.  Rely on ContextFlags being set if it
11310         has already been retrieved.  Only suspend the inferior thread if
11311         we haven't already.  Warn if that fails.
11312         (continue_one_thread): s/suspend_count/suspended/.  Only call
11313         ResumeThread once.  Warn if that fails.
11314
11315 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11316
11317         * win32-low.c (win32_wait): Don't read from the inferior when it
11318         has already exited.
11319
11320 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11321
11322         * Makefile.in (win32_low_h): New variable.
11323         (win32-low.o): Add dependency on $(win32_low_h).
11324         (win32-arm-low.o, win32-i386-low.o): New rules.
11325
11326 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11327
11328         * hostio.c: Correct copyright year.
11329
11330 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11331
11332         * Makefile.in (OBS): Add hostio.o.
11333         (hostio.o): New rule.
11334         * server.h (handle_vFile): Declare.
11335         * hostio.c: New file.
11336         * server.c (handle_v_requests): Take packet_len and new_packet_len
11337         for binary packets.  Call handle_vFile.
11338         (main): Update call to handle_v_requests.
11339
11340 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11341
11342         * linux-low.c: Include <sched.h>.
11343
11344 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11345
11346         * linux-low.c (linux_tracefork_grandchild): New.
11347         (linux_tracefork_child): Use clone.
11348         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11349
11350 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11351
11352         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11353
11354 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11355
11356         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11357
11358 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11359
11360         * inferiors.c (change_inferior_id): Delete.
11361         (add_pid_to_list, pull_pid_from_list): New.
11362         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11363         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11364         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11365         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11366         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11367         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11368         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11369         (using_threads): Always set to 1.
11370         (handle_extended_wait): New.
11371         (add_process): Do not set TID.
11372         (linux_create_inferior): Set must_set_ptrace_flags.
11373         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11374         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11375         (linux_thread_alive): Rename TID argument to LWPID.
11376         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11377         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11378         call to dead_thread_notify.  Call handle_extended_wait.
11379         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11380         (send_sigstop): Delete sigstop_sent.
11381         (wait_for_sigstop): Avoid TID.
11382         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11383         (linux_test_for_tracefork): New.
11384         (linux_lookup_signals): Use thread_db_active and
11385         linux_supports_tracefork_flag.
11386         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11387         * linux-low.h (get_process_thread): Avoid TID.
11388         (struct process_ifo): Move thread_known and tid to the end.  Remove
11389         sigstop_sent.
11390         (linux_attach_lwp, thread_db_init): Update prototypes.
11391         * server.h (change_inferior_id): Delete prototype.
11392         (add_pid_to_list, pull_pid_from_list): New prototypes.
11393         * thread-db.c (thread_db_use_events): New.
11394         (find_first_thread): Rename to...
11395         (find_one_thread): ...this.  Update callers and messages.  Do not
11396         call fatal.  Check thread_db_use_events.  Do not call
11397         change_inferior_id or new_thread_notify.
11398         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11399         (thread_db_init): Set thread_db_use_events.  Check use_events.
11400         * utils.c (fatal, warning): Correct message prefix.
11401
11402 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11403
11404         * Makefile.in (clean): Remove new files.
11405         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11406         (powerpc-64.o, powerpc-64.c): New rules.
11407         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11408         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11409         with SPE.
11410         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11411         SPE targets.
11412         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11413         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11414         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11415         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11416         (target_regsets): Add AltiVec and SPE register sets.
11417         * configure.ac: Check for AltiVec and SPE.
11418         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11419         (ppc_fill_vrregset, ppc_store_vrregset): New.
11420         (target_regsets): Add AltiVec register set.
11421         * configure: Regenerated.
11422
11423 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11424
11425         * linux-low.c (O_LARGEFILE): Define.
11426         (linux_read_memory): Use /proc/PID/mem.
11427         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11428         * configure, config.in: Regenerated.
11429
11430 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11431
11432         * linux-low.c (linux_wait_for_event): Do not pass signals while
11433         single-stepping.
11434
11435 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11436
11437         * win32-low.c (create_process): New.
11438         (win32_create_inferior): Use create_process instead of
11439         CreateProcess.  If create_process failed retry appending an ".exe"
11440         suffix.  Store the GetLastError result immediatelly after
11441         create_process calls and use it on the call to error.
11442
11443 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11444
11445         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11446
11447 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11448
11449         * configure.ac: Switch license to GPLv3.
11450
11451 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11452
11453         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11454
11455 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11456
11457         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11458         typedef.
11459         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11460         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11461         CloseToolhelp32Snapshot.
11462         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11463         CloseToolhelp32Snapshot.
11464
11465 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11466
11467         * server.c (main): Check for inferior exit before main loop.
11468
11469 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11470
11471         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11472         instead of on tmp_desc.
11473
11474 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11475             Daniel Jacobowitz  <dan@codesourcery.com>
11476
11477         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11478         (add_thread): Minor cleanups.
11479         (clear_inferiors): Move lower in the file.  Clear the DLL
11480         list.
11481         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11482         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11483         (xml_escape_text): New.
11484         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11485         for qSupported.
11486         (handle_v_cont): Report errors.
11487         (gdbserver_version): Update.
11488         (main): Correct size of own_buf.  Do not report initial DLL events.
11489         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11490         (unloaded_dll, xml_escape_text): New.
11491         * win32-low.c (enum target_waitkind): Update comments.
11492         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11493         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11494         (win32_EnumProcessModules, win32_GetModuleInformation)
11495         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11496         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11497         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11498         (win32_Module32First, win32_Module32Next, load_toolhelp)
11499         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11500         (get_child_debug_event): Handle DLL events.
11501         (win32_wait): Likewise.
11502
11503 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11504
11505         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11506         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11507
11508 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11509
11510         * win32-low.c (handle_output_debug_string): Ignore event if not
11511         waiting.
11512
11513 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11514
11515         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11516
11517 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
11518
11519         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11520
11521 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
11522
11523         * inferiors.c (change_inferior_id): Add comment.
11524         * linux-low.c (check_removed_breakpoint): Add an early
11525         prototype.  Improve debug output.
11526         (linux_attach): Doc update.
11527         (linux_detach_one_process, linux_detach): Clean up before releasing
11528         each process.
11529         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11530         * linux-low.h (struct process_info): Doc improvement.
11531         * mem-break.c (delete_all_breakpoints): New.
11532         * mem-break.h (delete_all_breakpoints): New prototype.
11533         * thread-db.c (find_first_thread): New.
11534         (thread_db_create_event): Call it instead of
11535         thread_db_find_new_threads.  Clean up unused variables.
11536         (maybe_attach_thread): Remove first thread handling.
11537         (thread_db_find_new_threads): Use find_first_thread.
11538         (thread_db_get_tls_address): Likewise.
11539
11540 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
11541
11542         * thread-db.c (thread_db_find_new_threads): Add prototype.
11543         (thread_db_create_event): Check for the main thread before adding
11544         a new thread.
11545         (maybe_attach_thread): Only enable event reporting if TID == 0.
11546         (thread_db_get_tls_address): Check for new threads.
11547
11548 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
11549
11550         * linux-low.c (linux_create_inferior): Try execv before execvp.
11551         * spu-low.c (spu_create_inferior): Likewise.
11552
11553 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
11554
11555         * linux-low.c (linux_create_inferior): Change execv to execvp.
11556         * spu-low.c (spu_create_inferior): Likewies.
11557
11558 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
11559
11560         * Makefile.in (clean): Clean new files instead of deleted ones.
11561         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11562         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11563         rules.
11564         * configure.srv: Specify XML files and new regformats for MIPS and
11565         MIPS64 GNU/Linux.
11566         * linux-mips-low.c (mips_num_regs): Set to only used registers.
11567         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
11568         an entry for the restart register.
11569         (mips_cannot_fetch_register, mips_cannot_store_register)
11570         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11571         register names to match the XML descriptions.
11572         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
11573         restart register instead of $0.
11574
11575 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11576             Markus Deuling  <deuling@de.ibm.com>
11577
11578         * remote-utils.c (decode_xfer_write): New function.
11579         * server.h (decode_xfer_write): Add prototype.
11580         * server.c (handle_query): Add PACKET_LEN argument.  Support
11581         qXfer:spu:read and qXfer:spu:write packets.
11582         (main): Pass packet_len to handle_query.
11583         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11584         * target.h (target_ops): Add qxfer_spu.
11585
11586 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11587
11588         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11589         accessing non-seekable spufs files.
11590
11591 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
11592
11593         * server.c (handle_query): Add reply for qC packet.
11594
11595 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11596             Leo Zayas  <lerele@champenstudios@com>
11597
11598         * server.h (check_remote_input_interrupt_request): New function.
11599         * remote_utils.c (INVALID_DESCRIPTOR): New define.
11600         (remote_desc): Initialize with INVALID_DESCRIPTOR.
11601         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
11602         (check_remote_input_interrupt_request): New function.
11603         * server.h (check_remote_input_interrupt_request): Declare.
11604         * win32-low.c (winapi_DebugBreakProcess,
11605         winapi_GenerateConsoleCtrlEvent): New typedefs.
11606         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11607         to 250 ms.
11608         (win32_wait): Check for remote interrupt request
11609         with check_remote_input_interrupt_request.
11610         (win32_request_interrupt): New function.
11611         (win32_target_op): Set request_interrupt to win32_request_interrupt.
11612
11613 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11614
11615         * win32-low.c (debug_registers_changed,
11616         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11617         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11618         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11619         (thread_rec): Get context using the low target.
11620         (child_add_thread): Call thread_added on the low target,
11621         which does the same thing.
11622         (regptr): Delete.
11623         (do_initial_child_stuff): Remove debug registers references.
11624         Set context using the low target.  Resume threads after
11625         setting the contexts.
11626         (child_continue): Remove dead variable.  Remove debug
11627         registers references.
11628         (child_fetch_inferior_registers): Go through the low target.
11629         (do_child_store_inferior_registers): Remove.
11630         (child_store_inferior_registers): Go through the low target.
11631         (win32_resume): Remove debug registers references.
11632         Set context using the low target.
11633         (handle_exception): Change return type to void.  Don't record
11634         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
11635         first chance exception.
11636         (get_child_debug_event): Change return type to void.  Remove
11637         goto loop.  Always return after waiting for debug event.
11638         (win32_wait): Convert to switch statement.  Handle spurious
11639         events.
11640
11641         * win32-i386-low.c (debug_registers_changed,
11642         debug_registers_used): New.
11643         (initial_stuff): Rename to ...
11644         (i386_initial_stuff): ... this.  Clear debug registers
11645         state variables.
11646         (store_debug_registers): Delete.
11647         (i386_get_thread_context): New.
11648         (load_debug_registers): Delete.
11649         (i386_set_thread_context): New.
11650         (i386_thread_added): New.
11651         (single_step): Rename to ...
11652         (i386_single_step): ... this.
11653         (do_fetch_inferior_registers): Rename to ...
11654         (i386_fetch_inferior_register): ... this.
11655         (i386_store_inferior_register): New.
11656         (the_low_target): Adapt to new interface.
11657
11658         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11659         (arm_get_thread_context): New.
11660         (arm_set_thread_context): New.
11661         (regptr): New.
11662         (do_fetch_inferior_registers): Rename to ...
11663         (arm_fetch_inferior_register): ... this.
11664         (arm_store_inferior_register): New.
11665         (arm_wince_breakpoint): Reimplement as unsigned long.
11666         (arm_wince_breakpoint_len): Define.
11667         (the_low_target): Adapt to new interface.
11668
11669         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11670         load_debug_registers.  Add get_thread_context, set_thread_context,
11671         thread_added and store_inferior_register.  Rename
11672         fetch_inferior_registers to fetch_inferior_register.
11673         (regptr): Remove declaration.
11674
11675 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11676
11677         * linux-low.c (linux_detach): Change return type to int.  Return 0.
11678         * spu-low.c (spu_detach): Likewise.
11679
11680 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11681
11682         * target.h (target_ops): Change return type of detach to int.
11683         Add join.
11684         (join_inferior): New.
11685         * server.c (main): Don't skip detach support on mingw32.
11686         If the inferior doesn't support detaching return error.
11687         Call join_inferior instead of using waitpid.
11688         * linux-low.c (linux_join): New.
11689         (linux_target_op): Add linux_join.
11690         * spu-low.c (spu_join): New.
11691         (spu_target_ops): Add spu_join.
11692         * win32-low.c (win32_detach): Adapt to new interface.
11693         Reopen current_process_handle before detaching.  Issue a child
11694         resume before detaching.
11695         (win32_join): New.
11696         (win32_target_op): Add win32_join.
11697
11698 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11699
11700         * win32-low.c (win32-attach): Fix return value.
11701         * target.h (target_ops): Describe ATTACH return values.
11702
11703 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11704
11705         * win32-low.c (GETPROCADDRESS): Define.
11706         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
11707         (winapi_DebugSetProcessKillOnExit): Likewise.
11708         (win32_create_inferior): Force usage of ansi CreateProcessA.
11709         (win32_attach): Use GETPROCADDRESS.
11710         (win32_detach): Likewise.
11711
11712 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11713
11714         * win32-low.c (win32_wait): Don't use WSTOPSIG.
11715
11716 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
11717
11718         * win32-low.c: Commit leftover changes from 2007-03-29.
11719
11720 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11721
11722         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11723         fields short instead of int.  Add explicit padding.
11724         (i387_cache_to_fsave): Remove unnecessary casts.
11725         (i387_fsave_to_cache): Doc fix.
11726         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11727
11728 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11729
11730         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11731         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11732
11733 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11734
11735         * configure.srv (arm*-*-mingw32ce*): Move near the other
11736         arm targets.
11737
11738 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11739
11740         * configure.ac: Add errno checking.
11741         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11742         sys/file.h and malloc.h.
11743         (AC_CHECK_DECLS): Add perror.
11744         (srv_mingwce): Handle.
11745         * configure.srv (i[34567]86-*-cygwin*): Add
11746         win32-i386-low.o to srv_tgtobj.
11747         (i[34567]86-*-mingw*): Likewise.
11748         (arm*-*-mingw32ce*): Add case.
11749         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11750         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11751         [__MINGW32CE__] (strerror): New function.
11752         [__MINGW32CE__] (errno): Define to GetLastError.
11753         [__MINGW32CE__] (COUNTOF): New macro.
11754         (remote_open): Remove extra close call.
11755         * mem-break.c (delete_breakpoint_at): New function.
11756         * mem-break.h (delete_breakpoint_at): Declare.
11757         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11758         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11759         [USE_WIN32API] (read, write): Add char* casts.
11760         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11761         * server.h: Include wincecompat.h on Windows CE.
11762         [HAVE_ERRNO_H]: Check.
11763         (perror): Declare if not declared.
11764         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11765         (perror_with_name): Remove errno declaration.
11766         * wincecompat.h: New.
11767         * wincecompat.c: New.
11768         * win32-low.h: New.
11769         * win32-arm-low.c: New.
11770         * win32-i386-low.c: New.
11771         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11772         (OUTMSG2): Make it safe.
11773         (_T): New macro.
11774         (COUNTOF): New macro.
11775         (NUM_REGS): Get it from the low target.
11776         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11777         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11778         (thread_rec): Let low target handle debug registers.
11779         (child_add_thread): Likewise.
11780         (child_init_thread_list): Likewise.
11781         (continue_one_thread): Likewise.
11782         (regptr): New.
11783         (do_child_fetch_inferior_registers): Move to ...
11784         * win32-i386-low.c: ... here, and rename to ...
11785         (do_fetch_inferior_registers): ... this.
11786         * win32-low.c (child_fetch_inferior_registers):
11787         Go through the low target.
11788         (do_child_store_inferior_registers): Use regptr.
11789         (strwinerror): New function.
11790         (win32_create_inferior): Handle Windows CE.
11791         Use strwinerror instead of strerror on Windows error
11792         codes.  Add program to the error output.
11793         Don't close the main thread handle on Windows CE.
11794         (win32_attach): Use coredll.dll on Windows CE.
11795         (win32_kill): Close current process and current
11796         thread handles.
11797         (win32_detach): Use coredll.dll on Windows CE.
11798         (win32_resume): Let low target handle debug registers, and
11799         step request.
11800         (handle_exception): Add/Remove initial breakpoint.  Avoid
11801         non-existant WSTOPSIG on Windows CE.
11802         (win32_read_inferior_memory): Cast to remove warning.
11803         (win32_arch_string): Go through the low target.
11804         (initialize_low): Call set_breakpoint_data with the low
11805         target's breakpoint.
11806         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11807         FOP_REGNUM, mappings): Move to ...
11808         * win32-i386-low.c: ... here.
11809         * win32-low.c (win32_thread_info): Move to ...
11810         * win32-low.h: ... here.
11811         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11812         win32-arm-low.c and wincecompat.c.
11813         (all:): Add $EXEEXT.
11814         (install-only:): Likewise.
11815         (gdbserver:): Likewise.
11816         (gdbreplay:): Likewise.
11817         * config.in: Regenerate.
11818         * configure: Regenerate.
11819
11820 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11821
11822         * win32-low.c: Rename typedef thread_info to
11823         win32_thread_info throughout.
11824
11825 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11826
11827         * win32-i386-low.c: Rename to ...
11828         * win32-low.c: ... this.
11829         * configure.srv: Replace win32-i386-low.o with win32-low.o.
11830         * Makefile.in: Likewise.
11831
11832 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
11833
11834         * remote-utils.c (monitor_output): Constify msg parameter.
11835         * server.h (monitor_output): Likewise.
11836         * win32-i386-low.c (handle_output_debug_string): New.
11837         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11838         handle_output_debug_string.
11839         (get_child_debug_event): Likewise.
11840
11841 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
11842
11843         * server.c (main): Correct strtoul check.
11844
11845 2007-03-27  Jon Ringle  <jon@ringle.org>
11846
11847         * linux-low.c: Check __ARCH_HAS_MMU__ also.
11848
11849 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
11850
11851         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11852
11853 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
11854
11855         * terminal.h: Check HAVE_SGTTY_H.
11856
11857 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
11858
11859         * remote-utils.c (remote_open): Print out the assigned port number.
11860
11861 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
11862
11863         * remote-utils.c (monitor_output): New function.
11864         * server.c (debug_threads): Define here.
11865         (monitor_show_help): New function.
11866         (handle_query): Handle qRcmd.
11867         (main): Do not handle 'd' packet.
11868         * server.h (debug_threads, remote_debug, monitor_output): Declare.
11869         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11870         of debug_threads.
11871
11872 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11873
11874         * Makefile.in (EXEEXT): New.
11875         (clean): Use $(EXEEXT).
11876
11877 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11878
11879         * target.h (target_ops): Rename send_signal to request_interrupt,
11880         and remove enum target_signal parameter.
11881         * linux-low.c (linux_request_interrupt): Rename from
11882         linux_send_signal, and always send SIGINT.
11883         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11884         and always send SIGINT.
11885         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11886         of send_signal.
11887         (input_interrupt): Likewise.
11888
11889 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11890
11891         * server.c (get_features_xml): Check if target implemented
11892         arch_string.
11893         * win32-i386-low.c (win32_arch_string): New.
11894         (win32_target_ops): Add win32_arch_string as arch_string member.
11895
11896 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
11897
11898         * spu-low.c (spu_arch_string): New.
11899         (spu_target_ops): Add spu_arch_string.
11900
11901 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
11902
11903         * remote-utils.c: Remove HAVE_TERMINAL_H check.
11904         * configure.ac: Do not check for terminal.h.
11905         * configure, config.in: Regenerated.
11906
11907 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
11908
11909         * Makefile.in (OBS): Add $(XML_BUILTIN).
11910         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11911         (clean): Update.
11912         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11913         (arm-with-iwmmxt.c): New.
11914         * config.in, configure: Regenerate.
11915         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
11916         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
11917         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11918         (arm*-*-linux*): Add iWMMXt and regset support.
11919         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11920         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11921         (arm_store_wmmxregset, target_regsets): New.
11922         * server.c (get_features_xml): Take annex argument.  Check builtin
11923         XML documents.
11924         (handle_query): Handle multiple annexes.
11925
11926 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11927
11928         * remote-utils.c [USE_WIN32API] (read, write): Define.
11929         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11930         write.
11931
11932 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
11933
11934         * linux-i386-low.c (the_low_target): Set arch_string.
11935         * linux-x86-64-low.c (the_low_target): Likewise.
11936         * linux-low.c (linux_arch_string): New.
11937         (linux_target_ops): Add it.
11938         * linux-low.h (struct linux_target_ops): Add arch_string.
11939         * server.c (write_qxfer_response): Use const void * for DATA.
11940         (get_features_xml): New.
11941         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
11942         * target.h (struct target_ops): Add arch_string method.
11943
11944 2007-01-03  Denis Pilat  <denis.pilat@st.com>
11945             Daniel Jacobowitz  <dan@codesourcery.com>
11946
11947         * linux-low.c (linux_kill): Handle being called with no threads.
11948         * win32-i386-low.c (win32_kill): Likewise.
11949         (get_child_debug_event): Clear current_process_handle.
11950
11951 2006-12-30  Denis PILAT  <denis.pilat@st.com>
11952             Daniel Jacobowitz  <dan@codesourcery.com>
11953
11954         * remote-utils.c (remote_open): Check the type of specified
11955         serial port devices before opening them.
11956         * server.c (main): Kill the inferior if an error occurs during
11957         the first remote_open.
11958
11959 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
11960
11961         * README: Update supported targets.
11962
11963 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
11964
11965         * Makefile.in (clean): Remove reg-mips64.c.
11966         (reg-mips64.c, reg-mips64.o): New rules.
11967         * configure.srv: Handle mips64.  Include regset support for mips.
11968         * linux-mips-low.c (union mips_register): New.
11969         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11970         (mips_breakpoint, mips_breakpoint_at): Use int.
11971         (mips_collect_register, mips_supply_register)
11972         (mips_collect_register_32bit, mips_supply_register_32bit)
11973         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11974         (mips_store_fpregset, target_regsets): New.
11975         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11976
11977 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
11978
11979         * configure.srv: Add target "spu*-*-*".
11980         * Makefile.in (clean): Remove reg-spu.c.
11981         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11982         * spu-low.c: New file.
11983
11984 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
11985
11986         * configure.ac: Correct td_thr_tls_get_addr test.
11987         * configure: Regenerated.
11988
11989 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
11990
11991         * linux-low.c (linux_wait_for_event): Reformat.  Use the
11992         pass_signals array.
11993         * remote-utils.c (decode_address_to_semicolon): New.
11994         * server.c (pass_signals, handle_general_set): New.
11995         (handle_query): Mention QPassSignals for qSupported.
11996         (main): Call handle_general_set.
11997         * server.h (pass_signals, decode_address_to_semicolon): New.
11998
11999 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12000
12001         * server.c (handle_query): Correct error handling for read_auxv.
12002
12003 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12004
12005         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12006         and srv_linux_thread_db to yes.
12007         * linux-s390-low.c (s390_fill_gregset): New function.
12008         (target_regsets): Define data structure.
12009
12010 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12011
12012         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12013         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12014         * config.in, configure: Regenerated.
12015         * inferiors.c (gdb_id_to_thread): New function.
12016         (gdb_id_to_thread_id): Use it.
12017         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12018         * linux-low.h (struct process_info): Add th member.
12019         (thread_db_get_tls_address): New prototype.
12020         * remote-utils.c (decode_address): Make non-static.
12021         * server.c (handle_query): Handle qGetTLSAddr.
12022         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12023         * target.h (struct target_ops): Add get_tls_address.
12024         * thread-db.c (maybe_attach_thread): Save the thread handle.
12025         (thread_db_get_tls_address): New.
12026
12027 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12028
12029         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12030         (linux_resume_one_process): Take a siginfo_t *.  Update all
12031         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12032         (struct pending_signals): Add a siginfo_t.
12033         (linux_wait_for_process): Always set last_status.
12034         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12035         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12036         * linux-low.h (struct process_info): Add last_status.
12037
12038 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12039
12040         * remote-utils.c (try_rle): New function.
12041         (putpkt_binary): Use it.
12042
12043 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12044
12045         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12046         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12047         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12048         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12049         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12050         point registers.
12051
12052 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12053
12054         * server.c (terminal_fd): New variable.
12055         (old_foreground_pgrp): Likewise.
12056         (restore_old_foreground_pgrp): New function.
12057         (start_inferior): Record the terminal file descriptor in terminal_fd
12058         and its original foreground group in old_foreground_pgrp.  Register
12059         restore_old_foreground_pgrp with atexit().
12060
12061 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12062
12063         * server.c (handle_query): Correct qPart to qXfer.
12064
12065 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12066
12067         * configure.ac: Check for more headers which are missing on
12068         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12069         * configure.srv: Add Cygwin and mingw32.
12070         * remote-utils.c: Don't include headers unconditionally which
12071         are missing on mingw32.  Include <winsock.h> for mingw32.
12072         (remote_open): Adjust for mingw32 support.  Flush
12073         standard error after writing to it.
12074         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12075         (unblock_async_io, enable_async_io, disable_async_io)
12076         (readchar, getpkt): Update for Winsock support.
12077         (prepare_resume_reply): Expect a protocol signal number.
12078         * server.c: Disable <sys/wait.h> on mingw32.
12079         (start_inferior): Adjust for mingw32 support.  Flush
12080         standard error after writing to it.
12081         (attach_inferior): Likewise.  Use protocol signal
12082         numbers.
12083         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12084         and names.
12085         * win32-i386-low.c: New file.
12086         * Makefile.in (XM_CLIBS): Set.
12087         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12088         (win32-i386-low.o): New dependency rule.
12089         * linux-low.c (linux_wait): Use target signal numbers.
12090         * target.h (struct target_ops): Doc fix.
12091         * server.h (target_signal_to_name): New prototype.
12092         * gdbreplay.c: Don't include headers unconditionally which
12093         are missing on mingw32.  Include <winsock.h> for mingw32.
12094         (remote_close, remote_open): Adjust for Winsock support.
12095         * configure, config.in: Regenerated.
12096
12097 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12098
12099         * server.c (decode_xfer_read, write_qxfer_response): New.
12100         (handle_query): Take a packet length argument.  Handle
12101         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12102         the qSupported response.
12103         (main): Update call to handle_query.
12104
12105 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12106
12107         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12108         (putpkt_binary): Renamed from putpkt and adjusted for binary
12109         data.
12110         (putpkt): New wrapper for putpkt_binary.
12111         (readchar): Don't mask off the high bit.
12112         (decode_X_packet): New function.
12113         * server.c (main): Call putpkt_binary if a handler sets the packet
12114         length.  Save the length of the incoming packet.  Handle 'X'.
12115         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12116
12117 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12118
12119         * server.c (handle_query): Handle qSupported.
12120
12121 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12122
12123         * remote-utils.c (all_symbols_looked_up): New variable.
12124         (look_up_one_symbol): Check it.
12125         * server.h (look_up_one_symbol): New declaration.
12126         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12127
12128 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12129
12130         * Makefile.in (linux-arm-low.o): Update dependencies.
12131         * linux-arm-low.c: Include "gdb_proc_service.h".
12132         (PTRACE_GET_THREAD_AREA): Define.
12133         (ps_get_thread_area): New function.
12134
12135 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12136
12137         * configure.srv (m68k*-*-uclinux*): New target.
12138         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12139         (linux_resume_one_process): Remove extraneous cast.
12140         (linux_read_offsets): New.
12141         (linux_target_op): Add linux_read_offsets on mmuless systems.
12142         * server.c (handle_query): Add qOffsets logic.
12143         * target.h (struct target_ops): Add read_offsets.
12144
12145 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12146
12147         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12148         (PTRACE_GET_THREAD_AREA): Define.
12149         (ps_get_thread_area): New function.
12150         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12151         (linux-x86-64-low.o): Update.
12152
12153 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12154
12155         * configure.ac: Remove checks for prfpregset_t.
12156         * gdb_proc_service.h: New file.
12157         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12158         new "gdb_proc_service.h".
12159         * proc-service.c: Likewise.
12160         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12161         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12162         * Makefile.in (gdb_proc_service_h): Updated.
12163         * configure, config.in: Regenerated.
12164
12165 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12166
12167         * remote-utils.c (prepare_resume_reply): Move declaration
12168         of gdb_id_from_wait to the top of the block.
12169
12170 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12171
12172         * linux-low.c (regsets_store_inferior_registers): Read the regset
12173         from the target before filling it.
12174
12175 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12176
12177         * server.c (attach_inferior): Return SIGTRAP for a successful
12178         attach.
12179
12180 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12181
12182         * Makefile.in (OBS): Add version.o.
12183         (STAGESTUFF): Delete.
12184         (version.o): Add dependencies.
12185         (version.c): Replace rule.
12186         (clean): Remove version.c.
12187         * server.c (gdbserver_version): New.
12188         (gdbserver_usage): Use printf.
12189         (main): Handle --version and --help.
12190         * server.h (version, host_name): Add declarations.
12191
12192 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12193
12194         * linux-arm-low.c:
12195         * linux-arm-low.c:
12196         * inferiors.c:
12197         * i387-fp.h:
12198         * i387-fp.c:
12199         * gdbreplay.c:
12200         * regcache.c:
12201         * proc-service.c:
12202         * mem-break.h:
12203         * mem-break.c:
12204         * linux-x86-64-low.c:
12205         * linux-sh-low.c:
12206         * linux-s390-low.c:
12207         * linux-ppc64-low.c:
12208         * linux-ppc-low.c:
12209         * linux-mips-low.c:
12210         * linux-m68k-low.c:
12211         * linux-m32r-low.c:
12212         * linux-low.h:
12213         * linux-low.c:
12214         * linux-ia64-low.c:
12215         * linux-i386-low.c:
12216         * linux-crisv32-low.c:
12217         * thread-db.c:
12218         * terminal.h:
12219         * target.h:
12220         * target.c:
12221         * server.h:
12222         * server.c:
12223         * remote-utils.c:
12224         * regcache.h:
12225         * utils.c:
12226         * Makefile.in:
12227         * configure.ac:
12228         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12229         address.
12230
12231 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12232
12233         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12234         (arm_breakpoint_at): Recognize both breakpoints.
12235         (the_low_target): Use the correct breakpoint instruction.
12236
12237 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12238
12239         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12240         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12241         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12242         (the_low_target): Update.
12243
12244 2005-10-25  Andreas Schwab  <schwab@suse.de>
12245
12246         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12247
12248         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12249         (ia64_num_regs): Reduce to 462.
12250
12251 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12252
12253         * acinclude.m4: Correct quoting.
12254         * aclocal.m4: Regenerated.
12255
12256         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12257         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12258         (thread_db_init): Call thread_db_err_str.
12259         * configure.ac: Check for TD_VERSION.
12260         * config.in, configure: Regenerated.
12261
12262 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12263
12264         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12265
12266 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12267
12268         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12269         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12270         * config.in, configure: Regenerated.
12271         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12272         * linux-i386-low.c, linux-m68k-low.c: Update to use
12273         HAVE_PTRACE_GETREGS.
12274         * linux-low.c (regsets_fetch_inferior_registers)
12275         (regsets_store_inferior_registers): Only return 0 if we processed
12276         GENERAL_REGS.
12277         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12278         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12279
12280 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12281
12282         * inferiors.c (struct thread_info): Add gdb_id.
12283         (add_thread): Add gdb_id argument.
12284         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12285         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12286         calls to add_thread.
12287         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12288         * server.c (handle_query): Use thread_to_gdb_id.
12289         (handle_v_cont, main): Use gdb_id_to_thread_id.
12290         * server.h (add_thread): Update prototype.
12291         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12292         prototypes.
12293
12294 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12295
12296         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12297         left-padded registers.
12298         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12299         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12300
12301 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12302
12303         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12304         * configure: Regenerate.
12305         * config.in: Regenerate.
12306         * server.h (NEED_DECLARATION_STRERROR):
12307         Replace with !HAVE_DECL_STRERROR.
12308
12309 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12310
12311         * linux-low.c (linux_wait, linux_send_signal): Don't test
12312         an unsigned long variable for > 0 if it could be MAX_ULONG.
12313         * server.c (myresume): Likewise.
12314         * target.c (set_desired_inferior): Likewise.
12315
12316 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12317
12318         * configure.ac: Simplify and improve check for socklen_t.
12319         * configure, config.in: Regenerate.
12320
12321 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12322
12323         * acconfig.h: Remove.
12324         * configure.ac: Add a test for socklen_t.  Use three-argument
12325         AC_DEFINE throughout.
12326         * config.in: Regenerated using autoheader 2.59.
12327         * configure: Regenerated.
12328
12329         * gdbreplay.c (socklen_t): Provide a default.
12330         (remote_open): Use socklen_t.
12331         * remote-utils.c (socklen_t): Provide a default.
12332         (remote_open): Use socklen_t.
12333         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12334         unsigned char.
12335
12336         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12337         char for buffers.
12338         * linux-low.c (linux_read_memory, linux_write_memory)
12339         (linux_read_auxv): Likewise.
12340         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12341         (check_mem_write): Likewise.
12342         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12343         Likewise.
12344         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12345         (registers_from_string, register_data): Likewise.
12346         * server.c (handle_query, main): Likewise.
12347         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12348         (decode_M_packet): Likewise.
12349         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12350         * target.h (struct target_ops): Update read_memory, write_memory,
12351         and read_auxv.
12352         (read_inferior_memory, write_inferior_memory): Update.
12353         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12354         to unsigned char *.
12355         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12356         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12357         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12358         linux-s390-low.c, linux-sh-low.c: Update for changes in
12359         read_inferior_memory and the_low_target->breakpoint.
12360
12361 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12362
12363         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12364         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12365         * configure.srv: Add powerpc64-*-linux*.
12366         * linux-ppc64-low.c: New file.
12367
12368 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12369
12370         * linux-cris-low.c: New file with support for CRIS.
12371         * linux-crisv32-low.c: Ditto for CRISv32.
12372         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12373         (clean): Add reg-cris.c and reg-crisv32.c.
12374         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12375         reg-crisv32.o, and reg-crisv32.c to make rules.
12376         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12377         recognized targets.
12378
12379 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12380
12381         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12382         of sizeof (PTRACE_XFER_TYPE).
12383         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12384
12385 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12386
12387         * target.h (struct target_ops): Add insert_watchpoint,
12388         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12389         pointers for hardware watchpoint support.
12390         * linux-low.h (struct linux_target_ops): Ditto.
12391         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12392         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12393         to linux_target_ops.
12394         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12395         reply packet.
12396         * server.c (main): Recognize 'Z' and 'z' packets.
12397
12398 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12399
12400         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12401         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12402         (the_low_target): Add new members.
12403
12404 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12405
12406         * proc-service.c (ps_lgetregs): Search all_processes instead of
12407         all_threads.
12408
12409 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12410
12411         * server.c (start_inferior): Change return type to int.
12412         (attach_inferior): Change sigptr to int *.
12413         (handle_v_cont, handle_v_requests): Change signal to int *.
12414         (main): Change signal to int.
12415
12416 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12417
12418         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12419         * configure.srv: Add m32r*-*-linux*.
12420         * linux-m32r-low.c: New file.
12421
12422 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12423
12424         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12425
12426 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12427
12428         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12429         Take unsigned long arguments for PIDs.
12430         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12431         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12432         (wait_for_sigstop, linux_resume_one_process)
12433         (regsets_fetch_inferior_registers, linux_send_signal)
12434         (linux_read_auxv): Likewise.  Update the types of variables holding
12435         PIDs.  Update format string specifiers.
12436         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12437         * remote-utils.c (prepare_resume_reply): Likewise.
12438         * server.c (cont_thread, general_thread, step_thread)
12439         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12440         unsigned long.
12441         (handle_query): Update format specifiers.
12442         (handle_v_cont, main): Use strtoul for thread IDs.
12443         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12444         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12445         (general_thread, step_thread, thread_from_wait)
12446         (old_thread_from_wait): Update.
12447         * target.h (struct thread_resume): Use unsigned long for THREAD.
12448         (struct target_ops): Use unsigned long for arguments to attach and
12449         thread_alive.
12450
12451 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12452
12453         * acinclude.m4: Include bfd/bfd.m4 directly.
12454         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12455         <agriffis@toolchain.org>.
12456         * aclocal.m4, configure: Regenerated.
12457
12458 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12459
12460         * configure.ac: Rename configure.in, require autoconf 2.59.
12461         * configure: Re-generate.
12462
12463 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12464
12465         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12466         LIBS when finished.
12467         * aclocal.m4: Regenerated.
12468         * configure: Regenerated.
12469
12470 2004-11-21  Andreas Schwab  <schwab@suse.de>
12471
12472         * linux-m68k-low.c (m68k_num_gregs): Define.
12473         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12474         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12475         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12476         (m68k_breakpoint_at): New.  Add to the_low_target.
12477
12478         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12479         srv_linux_thread_db to yes.
12480
12481 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12482
12483         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12484         (ARCH_SET_FS): Likewise.
12485         (ARCH_GET_FS): Likewise.
12486         (ARCH_GET_GS): Likewise.
12487
12488 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12489
12490         * linux-i386-low.c (ps_get_thread_area): New.
12491         * linux-x86-64-low.c (ps_get_thread_area): New.
12492         * linux-low.c: Include <sys/syscall.h>.
12493         (linux_kill_one_process): Don't kill the first thread here.
12494         (linux_kill): Kill the first thread here.
12495         (kill_lwp): New function.
12496         (send_sigstop, linux_send_signal): Use it.
12497         * proc-service.c: Clean up #ifdefs.
12498         (fpregset_info): Delete.
12499         (ps_lgetregs): Update and enable implementation.
12500         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12501         implementations.
12502         * remote-utils.c (struct sym_cache, symbol_cache): New.
12503         (input_interrupt): Print a clearer message.
12504         (async_io_enabled): New variable.
12505         (enable_async_io, disable_async_io): Use it.  Update comments.
12506         (look_up_one_symbol): Use the symbol cache.
12507         * thread-db.c (thread_db_look_up_symbols): New function.
12508         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
12509
12510 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12511
12512         * configure.in: Test for -rdynamic.
12513         * configure: Regenerated.
12514         * Makefile (INTERNAL_LDFLAGS): New.
12515         (gdbserver, gdbreplay): Use it.
12516
12517 2004-09-02  Andrew Cagney  <cagney@gnu.org>
12518
12519         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12520
12521 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
12522
12523         * linux-low.c (linux_wait): Clear all_processes list also.
12524
12525 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12526
12527         * linux-low.c: Include <errno.h>.  Remove extern declaration of
12528         errno.
12529
12530 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12531
12532         * gdbreplay.c, server.h, utils.c: Update copyright years.
12533
12534 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12535
12536         * server.c (main): Print child status or termination signal from
12537         variable 'signal', not 'sig'.
12538
12539 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12540
12541         * linux-low.c (linux_read_memory): Change return type to
12542         int.  Check for and return error from ptrace().
12543         * target.c (read_inferior_memory): Change return type to int.  Pass
12544         back return status from the_target->read_memory().
12545         * target.h (struct target_ops): Adapt *read_memory() prototype.
12546         Update comment.
12547         (read_inferior_memory): Adapt prototype.
12548         * server.c (main): Return an error packet if
12549         read_inferior_memory() returns an error.
12550
12551 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
12552
12553         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12554         Unify with other clean targets.
12555
12556 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12557
12558         * server.c (handle_v_cont): Call set_desired_inferior.
12559
12560 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12561
12562         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12563
12564 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12565
12566         * linux-low.c (linux_wait): Unblock async I/O.
12567         (linux_resume): Block and enable async I/O.
12568         * remote-utils.c (block_async_io, unblock_async_io): New functions.
12569         * server.h (block_async_io, unblock_async_io): Add prototypes.
12570
12571 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12572
12573         * remote-utils.c (remote_open): Print a status notice after
12574         opening a TCP port.
12575         * server.c (attach_inferior): Print a status notice after
12576         attaching.
12577
12578 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12579
12580         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12581
12582 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
12583
12584         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12585         error packet.
12586         * server.c, target.h: Update copyright years.
12587
12588 2004-02-25  Roland McGrath  <roland@redhat.com>
12589
12590         * target.h (struct target_ops): New member `read_auxv'.
12591         * server.c (handle_query): Handle qPart:auxv:read: query using that.
12592         * linux-low.c (linux_read_auxv): New function.
12593         (linux_target_ops): Initialize `read_auxv' member to that.
12594
12595 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12596
12597         Committed by Jim Blandy  <jimb@redhat.com>.
12598
12599         * linux-s390-low.c (s390_num_regs): Update.
12600         (s390_regmap): Remove control registers.  Use __s390x__ predefine
12601         instead of GPR_SIZE to distiguish s390 and s390x targets.
12602
12603 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
12604
12605         * linux-low.c: Update copyright year.
12606         (check_removed_breakpoint): Clear pending_is_breakpoint.
12607         (linux_set_resume_request, linux_queue_one_thread)
12608         (resume_status_pending_p): New functions.
12609         (linux_continue_one_thread): Use process->resume.
12610         (linux_resume): Only resume threads if there are no pending events.
12611         * linux-low.h (struct process_info): Add resume request
12612         pointer.
12613
12614 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
12615
12616         * regcache.c (new_register_cache): Clear the allocated register
12617         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12618
12619 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
12620
12621         * linux-low.c (linux_resume): Take a struct thread_resume *
12622         argument.
12623         (linux_wait): Update call.
12624         (resume_ptr): New static variable.
12625         (linux_continue_one_thread): Renamed from
12626         linux_continue_one_process.  Use resume_ptr.
12627         (linux_resume): Use linux_continue_one_thread.
12628         * server.c (handle_v_cont, handle_v_requests): New functions.
12629         (myresume): New function.
12630         (main): Handle 'v' case.
12631         * target.h (struct thread_resume): New type.
12632         (struct target_ops): Change argument of "resume" to struct
12633         thread_resume *.
12634         (myresume): Delete macro.
12635
12636 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
12637
12638         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12639         (uninstall): Support DESTDIR.
12640
12641 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
12642
12643         * configure.srv: Add xscale*linux copy of arm*linux entry.
12644
12645 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
12646
12647         * linux-arm-low.c (arm_reinsert_addr): New function.
12648         (the_low_target): Add arm_reinsert_addr.
12649
12650 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
12651
12652         * mem-break.c: Remove whitespace at end of file.
12653
12654 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12655
12656         * configure.in: Check whether we need to prototype strerror.
12657         * server.h: Optionally prototype strerror.
12658         * gdbreplay.c (perror_with_name): Use strerror.
12659         * linux-low.c (linux_attach_lwp): Use strerror.
12660         * utils.c (perror_with_name): Use strerror.
12661         * config.in, configure: Regenerated.
12662
12663 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12664
12665         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12666         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12667
12668 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
12669
12670         * Makefile.in (SFILES): Update.
12671         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12672         low-sun3.c: Remove files.
12673
12674 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
12675
12676         * linux-low.c: Move comment to linux_thread_alive where it belonged.
12677         (linux_detach_one_process, linux_detach): New functions.
12678         (linux_target_ops): Add linux_detach.
12679         * server.c (main): Handle 'D' packet.
12680         * target.h (struct target_ops): Add "detach" member.
12681         (detach_inferior): Define.
12682
12683 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
12684
12685         From Kelley Cook  <kelleycook@wideopenwest.com>:
12686         * configure.srv: Accept i[34567]86 variants.
12687
12688 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
12689
12690         * linux-low.c (linux_wait_for_event): Correct comment typos.
12691         (linux_resume_one_process): Call check_removed_breakpoint.
12692         (linux_send_signal): New function.
12693         (linux_target_ops): Add linux_send_signal.
12694         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12695         of kill.
12696         * target.h (struct target_ops): Add send_signal.
12697
12698 2003-05-29  Jim Blandy  <jimb@redhat.com>
12699
12700         * linux-low.c (usr_store_inferior_registers): Transfer buf in
12701         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
12702         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12703         away part of the register's value.
12704
12705 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
12706
12707         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12708         (linux_wait_for_event, linux_init_signals): Likewise.
12709
12710 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
12711
12712         * configure.in: Check for stdlib.h.
12713         * configure: Regenerated.
12714         * config.in: Regenerated.
12715
12716 2003-01-04  Andreas Schwab  <schwab@suse.de>
12717
12718         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12719
12720 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
12721
12722         * Makefile.in: Remove obsolete code.
12723
12724 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
12725
12726         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12727         defined(PT_FPR0_HI).
12728
12729 2002-11-17  Stuart Hughes  <seh@zee2.com>
12730
12731         * linux-arm-low.c (arm_num_regs): Increase.
12732         (arm_regmap): Include status register.
12733
12734 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
12735
12736         * linux-low.c (register_addr): Remove incorrect -1 check.
12737
12738 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
12739
12740         * linux-low.c (linux_create_inferior): Call setpgid.  Return
12741         the new PID.
12742         (unstopped_p, linux_signal_pid): Remove.
12743         (linux_target_ops): Remove linux_signal_pid.
12744         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12745         global instead of target method.
12746         * target.h (struct target_ops): Remove signal_pid.  Update comment
12747         for create_inferior.
12748         * server.c (signal_pid): New variable.
12749         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
12750         gdbserver.  Set the child to be the foreground process group.
12751         (attach_inferior): Set signal_pid.
12752
12753 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
12754
12755         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12756
12757 2002-08-20  Jim Blandy  <jimb@redhat.com>
12758
12759         * Makefile.in (LDFLAGS): Allow the configure script to establish a
12760         default for this.
12761
12762 2002-08-01  Andrew Cagney  <cagney@redhat.com>
12763
12764         * Makefile.in: Make chill references obsolete.
12765
12766 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
12767
12768         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12769         * configure: Regenerate.
12770         * config.in: Regenerate.
12771
12772 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
12773
12774         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12775         (perror_with_name, remote_close, remote_open, expect, play): Static.
12776
12777 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
12778
12779         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12780         byte offsets instead of an array of indexes.
12781         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12782
12783 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
12784
12785         * regcache.c: Add comment.
12786
12787 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
12788
12789         * thread-db.c: New file.
12790         * proc-service.c: New file.
12791         * acinclude.m4: New file.
12792         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12793         proc-service.o, and thread-db.o.
12794         (linux-low.o): Add USE_THREAD_DB.
12795         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12796         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12797         * aclocal.m4: Regenerated.
12798         * config.in: Regenerated.
12799         * configure: Regenerated.
12800         * configure.in: Check for proc_service.h, sys/procfs.h,
12801         thread_db.h, and linux/elf.h headrs.
12802         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12803         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
12804         Check for -lthread_db and thread support.
12805         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12806         PowerPC, and SuperH.
12807         * i387-fp.c: Constify arguments.
12808         * i387-fp.h: Likewise.
12809         * inferiors.c: (struct thread_info): Renamed from
12810         `struct inferior_info'.  Remove PID member.  Use generic inferior
12811         list header.  All uses updated.
12812         (inferiors, signal_pid): Removed.
12813         (all_threads): New variable.
12814         (get_thread): Define.
12815         (add_inferior_to_list): New function.
12816         (for_each_inferior): New function.
12817         (change_inferior_id): New function.
12818         (add_inferior): Removed.
12819         (remove_inferior): New function.
12820         (add_thread): New function.
12821         (free_one_thread): New function.
12822         (remove_thread): New function.
12823         (clear_inferiors): Use for_each_inferior and free_one_thread.
12824         (find_inferior): New function.
12825         (find_inferior_id): New function.
12826         (inferior_target_data): Update argument type.
12827         (set_inferior_target_data): Likewise.
12828         (inferior_regcache_data): Likewise.
12829         (set_inferior_regcache_data): Likewise.
12830         * linux-low.c (linux_bp_reinsert): Remove.
12831         (all_processes, stopping_threads, using_thrads)
12832         (struct pending_signals, debug_threads, pid_of): New.
12833         (inferior_pid): Replace with macro.
12834         (struct inferior_linux_data): Remove.
12835         (get_stop_pc, add_process): New functions.
12836         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12837         Use add_process and add_thread.
12838         (linux_attach_lwp): New function, based on old linux_attach.  Use
12839         add_process and add_thread.  Set stop_expected for new threads.
12840         (linux_attach): New function.
12841         (linux_kill_one_process): New function.
12842         (linux_kill): Kill all LWPs.
12843         (linux_thread_alive): Use find_inferior_id.
12844         (check_removed_breakpoints, status_pending_p): New functions.
12845         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12846         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
12847         struct for the found process.
12848         (linux_wait_for_event): New function.
12849         (linux_wait): Use it.  Support LWPs.
12850         (send_sigstop, wait_for_sigstop, stop_all_processes)
12851         (linux_resume_one_process, linux_continue_one_process): New functions.
12852         (linux_resume): Support LWPs.
12853         (REGISTER_RAW_SIZE): Remove.
12854         (fetch_register): Use register_size instead.  Call supply_register.
12855         (usr_store_inferior_registers): Likewise.  Call collect_register.
12856         Fix recursive case.
12857         (regsets_fetch_inferior_registers): Improve error message.
12858         (regsets_store_inferior_registers): Add debugging.
12859         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12860         (unstopped_p, linux_signal_pid): New functions.
12861         (linux_target_ops): Add linux_signal_pid.
12862         (linux_init_signals): New function.
12863         (initialize_low): Call it.  Initialize using_threads.
12864         * regcache.c (inferior_regcache_data): Add valid
12865         flag.
12866         (get_regcache): Fetch registers lazily.  Add fetch argument
12867         and update all callers.
12868         (regcache_invalidate_one, regcache_invalidate): New
12869         functions.
12870         (new_register_cache): Renamed from create_register_cache.
12871         Return the new regcache.
12872         (free_register_cache): Change argument to a void *.
12873         (registers_to_string, registers_from_string): Call get_regcache
12874         with fetch flag set.
12875         (register_data): Make static.  Pass fetch flag to get_regcache.
12876         (supply_register): Call get_regcache with fetch flag clear.
12877         (collect_register): Call get_regcache with fetch flag set.
12878         (collect_register_as_string): New function.
12879         * regcache.h: Update.
12880         * remote-utils.c (putpkt): Flush after debug output and use
12881         stderr.
12882         Handle input interrupts while waiting for an ACK.
12883         (input_interrupt): Use signal_pid method.
12884         (getpkt): Flush after debug output and use stderr.
12885         (outreg): Use collect_register_as_string.
12886         (new_thread_notify, dead_thread_notify): New functions.
12887         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
12888         and general_thread.
12889         (look_up_one_symbol): Flush after debug output.
12890         * server.c (step_thread, server_waiting): New variables.
12891         (start_inferior): Don't use signal_pid.  Update call to mywait.
12892         (attach_inferior): Update call to mywait.
12893         (handle_query): Handle qfThreadInfo and qsThreadInfo.
12894         (main): Don't fetch/store registers explicitly.  Use
12895         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
12896         calls to mywait.
12897         * server.h: Update.
12898         (struct inferior_list, struct_inferior_list_entry): New.
12899         * target.c (set_desired_inferior): New.
12900         (write_inferior_memory): Constify.
12901         (mywait): New function.
12902         * target.h: Update.
12903         (struct target_ops): New signal_pid method.
12904         (mywait): Removed macro, added prototype.
12905
12906         * linux-low.h (regset_func): Removed.
12907         (regset_fill_func, regset_store_func): New.
12908         (enum regset_type): New.
12909         (struct regset_info): Add type field.  Use new operation types.
12910         (struct linux_target_ops): stop_pc renamed to get_pc.
12911         Add decr_pc_after_break and breakpoint_at.
12912         (get_process, get_thread_proess, get_process_thread)
12913         (strut process_info, all_processes, linux_attach_lwp)
12914         (thread_db_init): New.
12915
12916         * linux-arm-low.c (arm_get_pc, arm_set_pc,
12917         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12918         (the_low_target): Add new members.
12919         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12920         (i386_store_fpxregset): Constify.
12921         (target_regsets): Add new kind identifier.
12922         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
12923         (i386_set_pc): Add debugging.
12924         (i386_breakpoint_at): New function.
12925         (the_low_target): Add new members.
12926         * linux-mips-low.c (mips_get_pc, mips_set_pc)
12927         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12928         (mips_breakpoint_at): New.
12929         (the_low_target): Add new members.
12930         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12931         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12932         (the_low_target): Add new members.
12933         * linux-sh-low.c (sh_get_pc, sh_set_pc)
12934         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12935         (the_low_target): Add new members.
12936         * linux-x86-64-low.c (target_regsets): Add new kind
12937         identifier.
12938
12939 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
12940
12941         From Martin Pool <mbp@samba.org>:
12942         * server.c (gdbserver_usage): New function.
12943         (main): Call it.
12944
12945 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
12946
12947         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12948         stop_at -> stop_pc.
12949
12950 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
12951
12952         * Makefile.in: Remove obsolete code.
12953
12954 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
12955
12956         * linux-low.c (regsets_fetch_inferior_registers),
12957         (regsets_store_inferior_registers): Removed cast to int from
12958         ptrace() calls.
12959         * regcache.h: Added declaration of struct inferior_info.
12960
12961 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
12962
12963         * inferiors.c (struct inferior_info): Add regcache_data.
12964         (add_inferior): Call create_register_cache.
12965         (clear_inferiors): Call free_register_cache.
12966         (inferior_regcache_data, set_inferior_regcache_data): New functions.
12967         * regcache.c (struct inferior_regcache_data): New.
12968         (registers): Remove.
12969         (get_regcache): New function.
12970         (create_register_cache, free_register_cache): New functions.
12971         (set_register_cache): Don't initialize the register cache here.
12972         (registers_to_string, registers_from_string, register_data): Call
12973         get_regcache.
12974         * regcache.h: Add prototypes.
12975         * server.h: Likewise.
12976
12977 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
12978
12979         * mem-break.c: New file.
12980         * mem-break.h: New file.
12981         * Makefile.in: Add mem-break.o rule; update server.h
12982         dependencies.
12983         * inferiors.c (struct inferior_info): Add target_data
12984         member.
12985         (clear_inferiors): Free target_data member if set.
12986         (inferior_target_data, set_inferior_target_data): New functions.
12987         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12988         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
12989         * linux-low.c (linux_bp_reinsert): New variable.
12990         (struct inferior_linux_data): New.
12991         (linux_create_inferior): Use set_inferior_target_data.
12992         (linux_attach): Likewise.  Call add_inferior.
12993         (linux_wait_for_one_inferior): New function.
12994         (linux_wait): Call it.
12995         (linux_write_memory): Add const.
12996         (initialize_low): Call set_breakpoint_data.
12997         * linux-low.h (struct linux_target_ops): Add breakpoint
12998         handling members.
12999         * server.c (attach_inferior): Remove extra add_inferior
13000         call.
13001         * server.h: Include mem-break.h.  Update inferior.c
13002         prototypes.
13003         * target.c (read_inferior_memory)
13004         (write_inferior_memory): New functions.
13005         * target.h (read_inferior_memory)
13006         (write_inferior_memory): Change macros to prototypes.
13007         (struct target_ops): Update comments.  Add const to write_memory
13008         definition.
13009
13010 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13011
13012         * linux-low.c (usr_store_inferior_registers): Support
13013         registers which are allowed to fail to store.
13014         * linux-low.h (linux_target_ops): Likewise.
13015         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13016         (ppc_cannot_store_register): FPSCR may not be storable.
13017
13018 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13019
13020         * server.h: Include <string.h> if HAVE_STRING_H.
13021         * ChangeLog: Correct paths in last ChangeLog entry.
13022
13023 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13024
13025         * linux-low.h: Remove obsolete prototypes.
13026         (struct linux_target_ops): New.
13027         (extern the_low_target): New.
13028         * linux-low.c (num_regs, regmap): Remove declarations.
13029         (register_addr): Use the_low_target explicitly.
13030         (fetch_register): Likewise.
13031         (usr_fetch_inferior_registers): Likewise.
13032         (usr_store_inferior_registers): Likewise.
13033         * linux-arm-low.c (num_regs): Remove.
13034         (arm_num_regs): Define.
13035         (arm_regmap): Renamed from regmap, made static.
13036         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13037         made static.
13038         (arm_cannot_store_register): Renamed from cannot_store_register,
13039         made static.
13040         (the_low_target): New.
13041         * linux-i386-low.c (num_regs): Remove.
13042         (i386_num_regs): Define.
13043         (i386_regmap): Renamed from regmap, made static.
13044         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13045         made static.
13046         (i386_cannot_store_register): Renamed from cannot_store_register,
13047         made static.
13048         (the_low_target): New.
13049         * linux-ia64-low.c (num_regs): Remove.
13050         (ia64_num_regs): Define.
13051         (ia64_regmap): Renamed from regmap, made static.
13052         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13053         made static.
13054         (ia64_cannot_store_register): Renamed from cannot_store_register,
13055         made static.
13056         (the_low_target): New.
13057         * linux-m68k-low.c (num_regs): Remove.
13058         (m68k_num_regs): Define.
13059         (m68k_regmap): Renamed from regmap, made static.
13060         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13061         made static.
13062         (m68k_cannot_store_register): Renamed from cannot_store_register,
13063         made static.
13064         (the_low_target): New.
13065         * linux-mips-low.c (num_regs): Remove.
13066         (mips_num_regs): Define.
13067         (mips_regmap): Renamed from regmap, made static.
13068         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13069         made static.
13070         (mips_cannot_store_register): Renamed from cannot_store_register,
13071         made static.
13072         (the_low_target): New.
13073         * linux-ppc-low.c (num_regs): Remove.
13074         (ppc_num_regs): Define.
13075         (ppc_regmap): Renamed from regmap, made static.
13076         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13077         made static.
13078         (ppc_cannot_store_register): Renamed from cannot_store_register,
13079         made static.
13080         (the_low_target): New.
13081         * linux-s390-low.c (num_regs): Remove.
13082         (s390_num_regs): Define.
13083         (s390_regmap): Renamed from regmap, made static.
13084         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13085         made static.
13086         (s390_cannot_store_register): Renamed from cannot_store_register,
13087         made static.
13088         (the_low_target): New.
13089         * linux-sh-low.c (num_regs): Remove.
13090         (sh_num_regs): Define.
13091         (sh_regmap): Renamed from regmap, made static.
13092         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13093         made static.
13094         (sh_cannot_store_register): Renamed from cannot_store_register,
13095         made static.
13096         (the_low_target): New.
13097         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13098         (the_low_target): New.
13099
13100 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13101
13102         * Makefile.in: Add stamp-h target.
13103         * configure.in: Create stamp-h.
13104         * configure: Regenerated.
13105
13106 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13107
13108         * inferiors.c: New file.
13109         * target.c: New file.
13110         * target.h: New file.
13111         * Makefile.in:  Add target.o and inferiors.o.  Update
13112         dependencies.
13113         * linux-low.c (inferior_pid): New static variable,
13114         moved from server.c.
13115         (linux_create_inferior): Renamed from create_inferior.
13116         Call add_inferior.  Return 0 on success instead of a PID.
13117         (linux_attach): Renamed from myattach.
13118         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13119         (linux_thread_alive): Renamed from mythread_alive.
13120         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13121         child dies.
13122         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13123         (regsets_store_inferior_registers): Correct error message.
13124         Add missing ``return 0''.
13125         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13126         (linux_store_registers): Renamed from store_inferior_registers.
13127         (linux_read_memory): Renamed from read_inferior_memory.
13128         (linux_write_memory): Renamed from write_inferior_memory.
13129         (linux_target_ops): New structure.
13130         (initialize_low): Call set_target_ops ().
13131         * remote-utils.c (unhexify): New function.
13132         (hexify): New function.
13133         (input_interrupt): Send signals to ``signal_pid''.
13134         * server.c (inferior_pid): Remove.
13135         (start_inferior): Update create_inferior call.
13136         (attach_inferior): Call add_inferior.
13137         (handle_query): New function.
13138         (main): Call handle_query for `q' packets.
13139         * server.h: Include "target.h".  Remove obsolete prototypes.
13140         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13141
13142 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13143
13144         * Makefile.in: Add WARN_CFLAGS.  Update configury
13145         dependencies.
13146         * configure.in: Check for <string.h>
13147         * configure: Regenerate.
13148         * config.in: Regenerate.
13149         * gdbreplay.c: Include needed system headers.
13150         (remote_open): Remove strchr prototype.
13151         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13152         * regcache.c (supply_register): Change buf argument to const void *.
13153         (supply_register_by_name): Likewise.
13154         (collect_register): Change buf argument to void *.
13155         (collect_register_by_name): Likewise.
13156         * regcache.h: Add missing prototypes.
13157         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13158         * server.c (handle_query): New function.
13159         (attached): New static variable, moved out of main.
13160         (main): Quiet longjmp clobber warnings.
13161         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13162         * utils.c (error): Remove NORETURN.
13163         (fatal): Likewise.