btrace, gdbserver: remove the to_supports_btrace target method
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2
3         * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
4         * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5         * spu-low.c (spu_target_ops): Likewise.
6         * win32-low.c (win32_target_ops): Likewise.
7         * server.c (supported_btrace_packets): Report packets unconditionally.
8         * target.h (target_ops) <supports_btrace>: Remove.
9         (target_supports_btrace): Remove.
10
11 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12
13         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
14         (handle_btrace_disable): Change return type to void.  Use exceptions
15         to report errors.
16         (handle_btrace_general_set): Catch exception and copy message to
17         return message.
18
19 2018-02-08  Tom Tromey  <tom@tromey.com>
20
21         * linux-low.c (install_software_single_step_breakpoints): Use
22         make_scoped_restore.
23         * inferiors.c (make_cleanup_restore_current_thread): Remove.
24         (do_restore_current_thread_cleanup): Remove.
25         * gdbthread.h (make_cleanup_restore_current_thread): Don't
26         declare.
27
28 2018-02-08  Tom Tromey  <tom@tromey.com>
29
30         * mem-break.c (set_raw_breakpoint_at): Use
31         gdb::unique_xmalloc_ptr.
32
33 2018-01-30  Pedro Alves  <palves@redhat.com>
34
35         PR gdb/13211
36         * target.c (target_terminal::terminal_state): Rename to ...
37         (target_terminal::m_terminal_state): ... this.
38
39 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
40
41         * linux-low.c (handle_extended_wait): Surround call to
42         thread_db_notice_clone with #ifdef USE_THREAD_DB.
43
44 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
45
46         * linux-low.c (attach_proc_task_lwp_callback): Adjust to
47         linux_ptrace_attach_fail_reason_string now returning an
48         std::string.
49         (linux_attach): Likewise.
50         * thread-db.c (attach_thread): Likewise.
51
52 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
53
54         PR gdb/21559
55         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
56         checking for fs_base/gs_base fields in struct user_regs_struct.
57         * configure: Regenerate.
58
59 2018-01-16  Yao Qi  <yao.qi@linaro.org>
60
61         PR gdb/18749
62         * linux-low.c (fetch_register): Call supply_register instead of
63         error.
64
65 2018-01-08  Yao Qi  <yao.qi@linaro.org>
66             Simon Marchi  <simon.marchi@ericsson.com>
67
68         * Makefile.in (OBS): Remove selftest.o.
69         * configure.ac: Set srv_selftest_objs if $development is true.
70         (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
71         * configure: Re-generated.
72         * server.c (captured_main): Wrap variable selftest_filter with
73         GDB_SELF_TEST.
74
75 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
76
77         * server.c (parse_debug_format_options): Return std::string.
78         (handle_monitor_command, captured_main): Adjust.
79
80 2018-01-05  Pedro Alves  <palves@redhat.com>
81
82         PR gdb/18653
83         * server.c (captured_main): Pass quiet=false to
84         save_original_signals_state.
85
86 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
87
88         * gdbreplay.c (gdbreplay_version): Update copyright year in
89         version message.
90         * server.c (gdbserver_version): Likewise.
91
92 2017-12-08  Tom Tromey  <tom@tromey.com>
93
94         * ax.c (ax_printf): Update.
95
96 2017-12-07  Yao Qi  <yao.qi@linaro.org>
97
98         * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
99         aarch64_linux_read_description.
100         * linux-amd64-ipa.c (idx2mask): New array.
101         (get_ipa_tdesc): Move idx2mask out.
102         (initialize_low_tracepoint): Initialize target descriptions.
103         * linux-i386-ipa.c (idx2mask): New array.
104         (get_ipa_tdesc): Move idx2mask out.
105         (initialize_low_tracepoint): Initialize target descriptions.
106
107 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
108
109         * tdesc.c (struct tdesc_type): Change return type.
110         (tdesc_add_flag): Change parameter type.
111         (tdesc_add_bitfield): Likewise.
112         (tdesc_add_field): Likewise.
113         (tdesc_set_struct_size): Likewise.
114
115 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
116
117         * regcache.c (registers_to_string): Remove unused variable.
118
119 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
120
121         * inferiors.c (for_each_inferior_with_data): Remove.
122         * inferiors.h (for_each_inferior_with_data): Remove.
123         * server.c (handle_qxfer_threads_worker): Change parameter type.
124         (handle_qxfer_threads_proper): Use for_each_thread.
125
126 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
127
128         * inferiors.c (for_each_inferior): Remove.
129         (clear_inferiors): Use for_each_thread.
130         * inferiors.h (for_each_inferior): Remove.
131         * linux-low.c (linux_wait_for_event_filtered): Use
132         for_each_thread.
133         (linux_stabilize_threads): Likewise.
134         * regcache.c (regcache_release): Likewise.
135         * server.c (gdb_wants_all_threads_stopped): Likewise.
136         (clear_pending_status_callback): Remove.
137         (handle_status): Use for_each_thread.
138         (captured_main): Likewise.
139         * win32-low.c (child_init_thread_list): Likewise.
140         (win32_clear_inferiors): Likewise.
141         (fake_breakpoint_event): Likewise.
142
143 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
144
145         * inferiors.h (find_inferior): Remove.
146         * inferiors.c (find_inferior): Remove.
147
148 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
149
150         * linux-low.c (resume_status_pending_p): Update comment.
151         (need_step_over_p): Update comment.
152
153 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
154
155         * linux-low.c (proceed_one_lwp): Return void, change parameter
156         type.
157         (unsuspend_and_proceed_one_lwp): Likewise.
158         (proceed_all_lwps): Use for_each_thread.
159         (unstop_all_lwps): Likewise.
160
161 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
162
163         * linux-low.c (linux_resume_one_thread): Return void, take
164         parameter directly.
165         (linux_resume): Use for_each_thread.
166
167 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
168
169         * linux-low.c (send_sigstop_callback): Return void, change
170         parameter type.  Rename to...
171         (send_sigstop): ... this.
172         (suspend_and_send_sigstop_callback): Return void, change parameter
173         type.  Rename to...
174         (suspend_and_send_sigstop): ... this.
175         (stop_all_lwps): Use for_each_thread.
176
177 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
178
179         * linux-low.c (lwp_running): Return bool, remove unused
180         argument.
181         (linux_stabilize_threads): Use find_thread.
182
183 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
184
185         * linux-low.c (select_singlestep_lwp_callback): Remove.
186         (count_events_callback): Remove.
187         (select_event_lwp_callback): Remove.
188         (select_event_lwp): Use find_thread/for_each_thread.
189
190 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
191
192         * linux-low.c (not_stopped_callback): Return bool, take filter
193         argument directly.
194         (linux_wait_for_event_filtered): Use find_thread.
195         (linux_wait_1): Likewise.
196
197 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
198
199         * linux-low.c (same_lwp): Remove.
200         (find_lwp_pid): Use find_thread.
201
202 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
203
204         * linux-low.c (delete_lwp_callback): Remove.
205         (linux_mourn): Use for_each_thread.
206
207 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
208
209         * linux-low.c (linux_detach_lwp_callback): Return void, remove
210         args parameter, don't check for pid.
211         (linux_detach): Use for_each_thread.
212
213 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
214
215         * linux-low.c (struct counter): Remove.
216         (second_thread_of_pid_p): Remove.
217         (last_thread_of_process_p): Use find_thread.
218
219 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
220
221         * inferiors.c (find_inferior_in_random): Remove.
222         * inferiors.h (find_inferior_in_random): Remove.
223         * linux-low.c (status_pending_p_callback): Return bool, accept
224         parameter ptid directly.
225         (linux_wait_for_event_filtered): Use find_thread_in_random.
226         (linux_wait_1): Likewise.
227
228 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
229
230         * inferiors.c (find_inferior_id): Remove.
231         (find_thread_ptid): Move implemention from find_inferior_id to
232         here.
233         * inferiors.h (find_inferior_id): Remove.
234         * server.c (handle_status): Use find_thread_ptid.
235         (process_serial_event): Likewise.
236         * thread-db.c (find_one_thread): Likewise.
237         (thread_db_thread_handle): Likewise.
238         * win32-low.c (thread_rec): Likewise.
239         (child_delete_thread): Likewise.
240         (win32_thread_alive): Likewise.
241         (get_child_debug_event): Likewise.
242
243 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
244
245         * linux-mips-low.c (update_watch_registers_callback): Return
246         void, remove pid_p parameter, don't check for pid.
247         (mips_insert_point, mips_remove_point): Use for_each_thread.
248
249 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
250
251         * lynx.low (lynx_delete_thread_callback): Remove.
252         (lynx_mourn): Use for_each_thread.
253
254 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
255
256         * regcache.c (regcache_invalidate_one): Remove.
257         (regcache_invalidate_pid): use for_each_thread.
258
259 2017-11-26  Tom Tromey  <tom@tromey.com>
260
261         * linux-low.c (linux_create_inferior): Update.
262
263 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
264
265         * spu-low.c (spu_create_inferior): Fix typo in argument name.
266
267 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
268
269         * configure.srv: Add linux-aarch64-tdesc-selftest.o.
270         * linux-aarch64-low.c (initialize_low_arch): Call init func.
271         * linux-aarch64-tdesc-selftest.c: New file.
272         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
273
274 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
275
276         * configure.srv: Add new file.
277         * linux-aarch64-low.c (initialize_low_arch): Call init func.
278         * linux-aarch64-tdesc-selftest.c: New file.
279         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
280
281 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
282
283         * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
284         * linux-aarch64-low.c (initialize_low_arch): Remove init.
285         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
286
287 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
288
289         * configure.srv: Add new files.
290         * linux-aarch64-ipa.c (get_ipa_tdesc): Call
291         aarch64_linux_read_description.
292         * linux-aarch64-low.c (aarch64_linux_read_description):
293         Merge with aarch64_arch_setup.
294         (aarch64_arch_setup): Call aarch64_linux_read_description.
295         * linux-aarch64-tdesc.c: New file.
296         * linux-aarch64-tdesc.h: New file.
297
298 2017-11-24  Yao Qi  <yao.qi@linaro.org>
299
300         * configure.srv: Set $srv_regobj for tic6x-linux.
301         * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
302         (tic6x_read_description): Move some code to tic6x_arch_setup.
303         (tic6x_tdesc_test): New function.
304         (initialize_low_arch): Call selftests::register_test.
305
306 2017-11-22  Yao Qi  <yao.qi@linaro.org>
307
308         * remote-utils.c (prepare_resume_reply): Use memcpy.
309
310 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
311
312         * linux-low.c (kill_one_lwp_callback): Return void, take
313         argument directly, don't filter on pid.
314         (linux_kill): Use for_each_thread.
315
316 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
317
318         * linux-low.c (need_step_over_p): Return bool, remove dummy
319         argument.
320         (linux_resume, proceed_all_lwps): Use find_thread.
321
322 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
323
324         * linux-low.c (resume_status_pending_p): Return bool, remove
325         flag_p argument.
326         (linux_resume): Use find_thread.
327
328 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
329
330         * linux-low.c (struct thread_resume_array): Remove.
331         (linux_set_resume_request): Return void, take arguments
332         directly.
333         (linux_resume): Use for_each_thread.
334
335 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
336
337         * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
338         return bool, remove data argument.
339         (linux_stabilize_threads): Use find_thread.
340
341 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
342
343         * linux-low.c (unsuspend_one_lwp): Remove.
344         (unsuspend_all_lwps): Use for_each_thread, inline code from
345         unsuspend_one_lwp.
346
347 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
348
349         * gdbthread.h (find_thread): Add overload with ptid_t filter.
350         * linux-low.c (struct iterate_over_lwps_args): Remove.
351         (iterate_over_lwps_filter): Remove.
352         (iterate_over_lwps): Use find_thread.
353
354 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
355
356         * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
357         (linux_handle_new_gdb_connection): Use for_each_thread, inline
358         code from reset_lwp_ptrace_options_callback.
359
360 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
361
362         * linux-arm-low.c (struct update_registers_data): Remove.
363         (update_registers_callback): Return void, take arguments
364         directly, don't check thread's pid.
365         (arm_insert_point, arm_remove_point): Use for_each_thread.
366
367 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
368
369         * win32-low.c (continue_one_thread): Return void, take argument
370         directly.
371         (child_continue): Use for_each_thread.
372
373 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
374
375         * win32-i386-low.c (update_debug_registers_callback): Rename
376         to ...
377         (update_debug_registers): ... this, return void, remove pid_p arg.
378         (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
379
380 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
381
382         * inferiors.h (struct process_info): Add constructor, initialize
383         fields..
384         <syscalls_to_catch>: Change type to std::vector<int>.
385         * inferiors.c (add_process): Allocate process_info with new.
386         (remove_process): Free process_info with delete.
387         * linux-low.c (handle_extended_wait): Adjust.
388         (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
389         * server.c (handle_general_set): Adjust.
390
391 2017-11-16  Pedro Alves  <palves@redhat.com>
392
393         * remote-utils.c (remote_close): Block SIGIO signals instead of
394         uninstalling the SIGIO handler.
395
396 2017-11-16  Alan Hayward  <alan.hayward@arm.com>
397
398         * tdesc.c (tdesc_get_features_xml): Allow null osabi.
399
400 2017-11-16  Yao Qi  <yao.qi@linaro.org>
401
402         * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
403         (tic6x_store_gregset): Likewise.
404         (tic6x_usrregs_info): Move it up.
405
406 2017-11-15  Alan Hayward  <alan.hayward@arm.com>
407
408         * Makefile.in: Update arch rules.
409         * configure.srv: Explicitly mark arch/ files.
410
411 2017-11-13  Andreas Schwab  <schwab@suse.de>
412
413         * linux-m68k-low.c (m68k_supports_hardware_single_step): New
414         function.
415         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
416
417 2017-11-06  Pedro Alves  <palves@redhat.com>
418
419         * config.in, configure: Regenerate.
420
421 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
422
423         * target.c (struct thread_search): Remove.
424         (thread_search_callback): Remove.
425         (prepare_to_access_memory): Use for_each_thread instead of
426         find_inferior.  Inline code from thread_search_callback.
427
428 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
429
430         * server.c (struct visit_actioned_threads_data): Remove.
431         (visit_actioned_threads): Change prototype to take arguments
432         directly.
433         (resume): Use find_thread instead of find_inferior.
434
435 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
436
437         * server.c (queue_stop_reply_callback): Change prototype, return
438         void.
439         (find_status_pending_thread_callback): Remove.
440         (handle_status): Replace find_inferior with find_thread and
441         for_each_thread.
442
443 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
444
445         * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
446         with REGNO.
447         (aarch64_store_gregset): Likewise.
448         (aarch64_fill_fpregset): Likewise.
449         (aarch64_store_fpregset): Likewise.
450
451 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
452
453         * gdbthread.h (find_thread, for_each_thread): New functions.
454         * inferiors.c (thread_of_pid): Remove.
455         (find_any_thread_of_pid): Use find_thread.
456         * linux-low.c (num_lwps): Use for_each_thread.
457
458 2017-10-17  Yao Qi  <yao.qi@linaro.org>
459
460         * Makefile.in: Remove one rule.
461         * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
462
463 2017-10-17  Yao Qi  <yao.qi@linaro.org>
464
465         * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
466         Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
467
468 2017-10-17  Yao Qi  <yao.qi@linaro.org>
469
470         * configure.srv: Rename arm.o with arch/arm.o.
471
472 2017-10-17  Yao Qi  <yao.qi@linaro.org>
473
474         * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
475         (clean): Remove .o files in CONFIG_SRC_SUBDIR.
476         (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
477         (arch-i386.o, arch-amd64.o): Remove rules.
478         (arch/%.o): New rule.
479         Update POSTCOMPILE and COMPILE.pre.
480         * configure.ac: Invoke AC_CONFIG_COMMANDS.
481         * configure: Re-generated.
482         * configure.srv: Replace arch-i386.o with arch/i386.o.
483         Replace arch-amd64.o with arch/amd64.o.
484
485 2017-10-16  Yao Qi  <yao.qi@linaro.org>
486
487         * configure: Regenerated.
488
489 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
490
491         * inferiors.h: (struct inferior_list): Remove.
492         (struct inferior_list_entry); Remove.
493         (add_inferior_to_list, clear_inferior_list, one_inferior_p,
494         A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
495         get_first_inferior): Remove.
496         (for_each_inferior, for_each_inferior_with_data, find_inferior,
497         find_inferior_id, find_inferior_in_random): Change signature.
498         * inferiors.c (all_threads): Change type to
499         std::list<thread_info *>.
500         (get_thread): Remove macro.
501         (find_inferior, find_inferior_id): Change signature, implement
502         using find_thread.
503         (find_inferior_in_random): Change signature, implement using
504         find_thread_in_random.
505         (for_each_inferior, for_each_inferior_with_data): Change
506         signature, implement using for_each_thread.
507         (add_inferior_to_list, remove_inferior): Remove.
508         (add_thread, get_first_thread, thread_of_pid,
509         find_any_thread_of_pid, free_one_thread, remove_thread): Update.
510         (get_first_inferior, one_inferior_p, clear_inferior_list):
511         Remove.
512         (clear_inferiors, get_thread_process): Update.
513         * gdbthread.h: Include <list>.
514         (struct thread_info) <entry>: Remove field.
515         <id>: New field.
516         (all_threads): Change type to std::list<thread_info *>.
517         (get_first_inferior): Add doc.
518         (find_thread, for_each_thread, find_thread_in_random): New
519         functions.
520         (current_ptid, pid_of, ptid_of, lwpid_of): Update.
521         * linux-arm-low.c (update_registers_callback): Update.
522         * linux-low.c (second_thread_of_pid_p): Update.
523         (kill_one_lwp_callback, linux_detach_lwp_callback,
524         delete_lwp_callback, status_pending_p_callback, same_lwp,
525         find_lwp_pid, num_lwps, iterate_over_lwps_filter,
526         iterate_over_lwps, not_stopped_callback,
527         resume_stopped_resumed_lwps, count_events_callback,
528         select_singlestep_lwp_callback, select_event_lwp_callback,
529         unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
530         suspend_and_send_sigstop_callback, wait_for_sigstop,
531         stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
532         lwp_running, linux_set_resume_request, resume_status_pending_p,
533         need_step_over_p, start_step_over, linux_resume_one_thread,
534         proceed_one_lwp, unsuspend_and_proceed_one_lwp,
535         reset_lwp_ptrace_options_callback): Update.
536         * linux-mips-low.c (update_watch_registers_callback): Update.
537         * regcache.c (regcache_invalidate_one, regcache_invalidate):
538         Update.
539         (free_register_cache_thread_one): Remove.
540         (regcache_release): Update.
541         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
542         handle_qxfer_threads_worker): Update.
543         (handle_query): Update, use list iterator.
544         (visit_actioned_threads, handle_pending_status,
545         queue_stop_reply_callback, gdb_wants_all_threads_stopped,
546         clear_pending_status_callback, set_pending_status_callback,
547         find_status_pending_thread_callback, handle_status,
548         process_serial_event): Update.
549         * target.c (thread_search_callback): Update.
550         * thread-db.c (thread_db_get_tls_address): Update.
551         * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
552         Update.
553         * win32-i386-low.c (update_debug_registers_callback): Update.
554         * win32-low.c (delete_thread_info, child_delete_thread,
555         continue_one_thread, suspend_one_thread,
556         get_child_debug_event): Adjust.
557
558 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
559
560         * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
561         * inferiors.h: Include <list>.
562         (struct process_info) <entry>: Remove field.
563         <pid>: New field.
564         (pid_of): Change macro to function.
565         (ptid_of, lwpid_of): Remove macro.
566         (all_processes): Change type to std::list<process_info *>.
567         (ALL_PROCESSES): Remove macro.
568         (for_each_process, find_process): New function.
569         * inferiors.c (all_processes): Change type to
570         std::list<process_info *>.
571         (find_thread_process): Adjust.
572         (add_process): Likewise.
573         (remove_process): Likewise.
574         (find_process_pid): Likewise.
575         (get_first_process): Likewise.
576         (started_inferior_callback): Remove.
577         (have_started_inferiors_p): Adjust.
578         (attached_inferior_callback): Remove.
579         (have_attached_inferiors_p): Adjust.
580         * linux-low.c (check_zombie_leaders): Likewise.
581         * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
582         (x86_linux_update_xmltarget): Adjust.
583         * server.c (handle_query): Likewise.
584         (gdb_reattached_process): Remove.
585         (handle_status): Adjust.
586         (kill_inferior_callback): Likewise.
587         (detach_or_kill_inferior): Remove.
588         (print_started_pid): Likewise.
589         (print_attached_pid): Likewise.
590         (detach_or_kill_for_exit): Update.
591         (process_serial_event): Likewise.
592         * linux-arm-low.c (arm_new_fork): Likewise.
593
594 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
595
596         * dll.h: Include <list>.
597         (struct dll_info): Add constructor.
598         <entry>: Remove field.
599         (all_dlls): Change type to std::list<dll_info>.
600         * dll.c: Include <algorithm>.
601         (get_dll): Remove macro.
602         (all_dlls): Change type to std::list<dll_info *>.
603         (free_one_dll): Remove.
604         (match_dll): Likewise.
605         (loaded_dll): Adjust.
606         (unloaded_dll): Adjust to all_dlls type change, use
607         std::find_if.  Inline code from match_dll.
608         (clear_dlls): Adjust to all_dlls type change.
609         * server.c (emit_dll_description): Remove.
610         (handle_qxfer_libraries): Adjust to all_dlls type change,
611         integrate emit_dll_description's functionality.
612
613 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
614
615         * linux-low.h (struct linux_target_ops) <delete_process>: New
616         field.
617         * linux-low.c (linux_mourn): Call the_low_target.delete_process.
618         * linux-aarch64-low.c (aarch64_linux_delete_process): New.
619         (struct linux_target_ops): Add delete_process callback.
620         * linux-arm-low.c (arm_delete_process): New.
621         (struct linux_target_ops): Add delete_process callback.
622         * linux-bfin-low.c (struct linux_target_ops): Likewise.
623         * linux-crisv32-low.c (struct linux_target_ops): Likewise.
624         * linux-m32r-low.c (struct linux_target_ops): Likewise.
625         * linux-mips-low.c (mips_linux_delete_process): New.
626         (struct linux_target_ops): Add delete_process callback.
627         * linux-ppc-low.c (struct linux_target_ops): Likewise.
628         * linux-s390-low.c (struct linux_target_ops): Likewise.
629         * linux-sh-low.c (struct linux_target_ops): Likewise.
630         * linux-tic6x-low.c (struct linux_target_ops): Likewise.
631         * linux-tile-low.c (struct linux_target_ops): Likewise.
632         * linux-x86-low.c (x86_linux_delete_process): New.
633         (struct linux_target_ops): Add delete_process callback.
634         * linux-xtensa-low.c (struct linux_target_ops): Likewise.
635
636 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
637
638         * linux-aarch64-low.c (the_low_target): Add thread delete
639         callback.
640         * linux-arm-low.c (arm_delete_thread): New function.
641         (the_low_target): Add thread delete callback.
642         * linux-bfin-low.c (the_low_target): Likewise.
643         * linux-crisv32-low.c (the_low_target): Likewise.
644         * linux-low.c (delete_lwp): Invoke delete_thread callback if
645         set.
646         * linux-low.h (struct linux_target_ops) <delete_thread>: New
647         field.
648         * linux-m32r-low.c (the_low_target): Add thread delete callback.
649         * linux-mips-low.c (mips_linux_delete_thread): New function.
650         (the_low_target): Add thread delete callback.
651         * linux-ppc-low.c (the_low_target): Likewise.
652         * linux-s390-low.c (the_low_target): Likewise.
653         * linux-sh-low.c (the_low_target): Likewise.
654         * linux-tic6x-low.c (the_low_target): Likewise.
655         * linux-tile-low.c (the_low_target): Likewise.
656         * linux-x86-low.c (the_low_target): Likewise.
657         * linux-xtensa-low.c (the_low_target): Likewise.
658
659 2017-10-06  Yuanhui Zhang  <asmwarrior@gmail.com>
660
661         * win32-low.c: Include "common-inferior.h".
662
663 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
664
665         * inferiors.c (set_inferior_cwd): New function.
666         * server.c (handle_general_set): Handle QSetWorkingDir packet.
667         (handle_query): Inform that QSetWorkingDir is supported.
668         * win32-low.c (create_process): Pass the inferior's cwd to
669         CreateProcess.
670
671 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
672
673         * inferiors.c (current_inferior_cwd): New global variable.
674         (get_inferior_cwd): New function.
675         * inferiors.h (struct process_info) <cwd>: New field.
676
677 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
678
679         * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
680         (OBS): Add gdb_tilde_expand.o.
681
682 2017-10-02  Simon Marchi  <simon.marchi@ericsson.com>
683
684         * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
685         * nto-x86-low.c (nto_x86_arch_setup): Likewise.
686
687 2017-09-29  Pedro Alves  <palves@redhat.com>
688
689         * ax.c (gdb_parse_agent_expr): Constify.
690         * ax.h (gdb_parse_agent_expr): Constify.
691         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
692         Constify.
693         * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
694         * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
695         * remote-utils.h (read_ptid): Constify.
696         * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
697         (process_point_options, process_serial_event): Constify.
698         * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
699         (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
700         (cmd_qtbuffer): Constify.
701
702 2017-09-29  Pedro Alves  <palves@redhat.com>
703
704         * proc-service.c (ps_pdread): Return PS_ERR if reading memory
705         fails.
706
707 2017-09-29  Pedro Alves  <palves@redhat.com>
708
709         * linux-low.c (handle_extended_wait): Pass parent thread instead
710         of process to thread_db_notice_clone.
711         * linux-low.h (thread_db_notice_clone): Replace parent process
712         parameter with parent thread parameter.
713         * thread-db.c (find_one_thread): Add comment.
714         (thread_db_notice_clone): Replace parent process parameter with
715         parent thread parameter.  Temporarily switch to the parent thread.
716
717 2017-09-26  Sergio Durigan Junior  <sergiodj@redhat.com>
718
719         * gdbthread.h: Include "common-gdbthread.h".
720         * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
721         "if" when validating the ptid.
722         * remote-utils.c: Include "gdbthread.h".
723         (prepare_resume_reply): Use "switch_to_thread".
724         * target.c (done_accessing_memory): Likewise.
725
726 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
727
728         * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
729         s390x-gs-linux64.o to srv_regobj.  Add s390-gs-linux64.xml,
730         s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
731         srv_xmlfiles.  Add s390-gs-linux64-ipa.o and
732         s390x-gs-linux64-ipa.o to ipa_obj.
733         * linux-s390-low.c (HWCAP_S390_GS): New define.
734         (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
735         New functions.
736         (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
737         (s390_arch_setup): Check for guarded-storage support and choose
738         appropriate tdesc.
739         (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
740         init_registers_s390x_gs_linux64.
741         * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
742         enum value.
743         (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
744         (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
745
746 2017-09-22  Simon Marchi  <simon.marchi@ericsson.com>
747
748         * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
749
750 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
751
752         * linux-low.h (struct lwp_info): Add new field, thread_handle.
753         (thread_db_thread_handle): Declare.
754         * linux-low.c (linux_target_ops): Initialize thread_handle.
755         * server.c (handle_qxfer_threads_worker): Add support for
756         "handle" attribute.
757         * target.h (struct target_ops): Add new function pointer,
758         thread_handle.
759         (target_thread_handle): Define.
760         * thread-db.c (find_one_thread, attach_thread): Set thread_handle
761         field in lwp.
762         (thread_db_thread_handle): New function.
763
764 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
765
766         * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
767         * linux-low.h (thread_db_notice_clone): Declare.
768         * thread-db.c (thread_db_notice_clone): New function.
769
770 2017-09-21  Pedro Alves  <palves@redhat.com>
771
772         * server.c (gdb_read_memory, handle_status, process_serial_event)
773         (handle_serial_event, handle_target_event): Adjust to
774         set_desired_thread prototype change.
775         * target.c (set_desired_thread): Remove 'use_general' parameter
776         and adjust.
777         * target.h (set_desired_thread): Remove 'use_general' parameter.
778
779 2017-09-20  Tom Tromey  <tom@tromey.com>
780
781         * target.c (target_terminal::terminal_state): Define.
782         (target_terminal::init): Rename from target_terminal_init.
783         (target_terminal::inferior): Rename from
784         target_terminal_inferior.
785         (target_terminal::ours): Rename from target_terminal_ours.
786         (target_terminal::ours_for_output, target_terminal::info): New.
787
788 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
789
790         * server.c (accumulate_file_name_length): Remove.
791         (emit_dll_description): Adjust to std::string change.
792         (handle_qxfer_libraries): Use std::string to hold document.
793
794 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
795
796         * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
797         return type of xml_escape_text.
798         * server.c (emit_dll_description): Likewise.
799
800 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
801
802         * server.c (captured_main): Accept argument for --selftest.
803         Update run_tests call.
804         * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
805         when registering selftests.
806
807 2017-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>
808
809         * regcache.c (get_thread_regcache): Update code to use "std::vector"
810         instead of "VEC" for "target_desc.reg_defs".
811         (regcache_cpy): Likewise.
812         (registers_to_string): Likewise.
813         (registers_from_string): Likewise.
814         (find_regno): Likewise.
815         (supply_regblock): Likewise.
816         (regcache_raw_read_unsigned): Likewise.
817         * tdesc.c (init_target_desc): Likewise.
818         (tdesc_create_reg): Likewise.
819         * tdesc.h: Remove declaration of "tdesc_reg_p".  Include <vector>.
820         (struct target_desc) <reg_defs>: Convert to "std::vector".
821         (target_desc): Do not initialize "reg_defs".
822         (~target_desc): Update code to use "std::vector" instead of "VEC"
823         for "target_desc.reg_defs".
824         (operator==): Likewise.
825
826 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
827
828         * inferiors.h (thread_to_gdb_id): Remove.
829         * inferiors.c (thread_to_gdb_id): Remove.
830         * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
831         * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
832         lynx_store_registers, lynx_read_memory, lynx_write_memory):
833         Likewise.
834         * nto-low.c (nto_fetch_registers, nto_store_registers,
835         nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
836
837 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
838
839         * inferiors.h (gdb_id_to_thread_id): Remove.
840         * inferiors.c (gdb_id_to_thread_id): Remove.
841         * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
842         removal.  Move pid declaration closer to where it's used.
843
844 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
845
846         * server.c (handle_detach): New function.
847         (process_serial_event): Move code out, call handle_detach.
848
849 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
850
851         * server.c (require_running): Rename to ...
852         (require_running_or_return): ... this ...
853         (require_running_or_break): ... and this.
854         (handle_query, process_serial_event): Adjust.
855
856 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
857
858         * linux-low.c (linux_set_resume_request): Remove unused
859         variables.
860
861 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
862
863         * server.c (first_thread_of): Remove.
864         (process_serial_event): Replace usage of first_thread_of with
865         find_any_thread_of_pid.
866         * tracepoint.c (same_process_p): Remove.
867         (gdb_agent_about_to_close): Replace usage of same_process_p with
868         find_any_thread_of_pid.
869         * linux-x86-low.c (same_process_callback): Remove.
870         (x86_arch_setup_process_callback): Replace usage of
871         same_process_callback with find_any_thread_of_pid.
872         * thread-db.c (any_thread_of): Remove.
873         (switch_to_process): Replace usage of any_thread_of with
874         find_any_thread_of_pid.
875         * inferiors.c (thread_pid_matches_callback): Remove.
876         (find_thread_process): Adjust to use find_any_thread_of_pid.
877
878 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
879
880         * regcache.c (get_thread_regcache): Guard calls to "memset"
881           with "!VEC_empty".
882
883 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
884
885         * linux-low.c (handle_extended_wait): Use
886         "allocate_target_description" instead of "XNEW".
887         * linux-x86-low.c (initialize_low_arch): Likewise.
888
889 2017-09-05  Yao Qi  <yao.qi@linaro.org>
890
891         * configure.srv (srv_i386_regobj): Remove.
892         (srv_amd64_regobj): Remove.
893         (srv_regobj): Set it to "" for x86 non-linux targets.
894         * linux-x86-tdesc.c (i386_linux_read_description):
895         * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
896         (init_registers_i386): Remove the declaration.
897         (tdesc_i386): Remove the declaration.
898         (lynx_i386_arch_setup): Call i386_create_target_description.
899         * nto-x86-low.c: Likewise.
900         * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
901         [!__x86_64__]: include arch/i386.h.
902         (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
903
904 2017-09-05  Yao Qi  <yao.qi@linaro.org>
905
906         * configure.srv (srv_amd64_linux_xmlfiles): Remove
907         i386/amd64-XXX-linux from it.
908
909 2017-09-05  Yao Qi  <yao.qi@linaro.org>
910
911         * configure.srv: Empty srv_amd64_linux_regobj if $development is
912         false.
913         (ipa_amd64_linux_regobj): Remove.
914         (ipa_x32_linux_regobj): Remove.
915
916 2017-09-05  Yao Qi  <yao.qi@linaro.org>
917
918         * Makefile.in (arch-amd64.o): New rule.
919         * configure.srv: Append arch-amd64.o.
920         * linux-amd64-ipa.c: Include common/x86-xstate.h.
921         (get_ipa_tdesc): Call amd64_linux_read_description.
922         (initialize_low_tracepoint): Don't call init_registers_x32_XXX
923         and init_registers_amd64_XXX.
924         * linux-x86-low.c (x86_linux_read_description): Call
925         amd64_linux_read_description.
926         (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
927         (initialize_low_arch): Don't call init_registers_x32_XXX and
928         init_registers_amd64_XXX.
929         * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
930         and tdesc_amd64_XXX.
931         [__x86_64__] (amd64_tdesc_test): New function.
932         (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
933         and init_registers_amd64_XXX.
934         * linux-x86-tdesc.c: Include arch/amd64.h.
935         (xcr0_to_tdesc_idx): New function.
936         (i386_linux_read_description): New function.
937         (amd64_get_ipa_tdesc_idx): New function.
938         * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
939         (amd64_get_ipa_tdesc): Declare.
940
941 2017-09-05  Yao Qi  <yao.qi@linaro.org>
942
943         * configure.srv (srv_i386_linux_xmlfiles): Remove
944         i386/i386-XXX-linux.xml from it.
945
946 2017-09-05  Yao Qi  <yao.qi@linaro.org>
947
948         * configure.srv: Set srv_i386_linux_regobj empty if $development
949         is false.
950         * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
951         initialize_low_tdesc.
952         * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
953         with #if initialize_low_tdesc.
954         * linux-x86-tdesc-selftest.c: New file.
955         * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
956
957 2017-09-05  Yao Qi  <yao.qi@linaro.org>
958
959         * Makefile.in (arch-i386.o): New rule.
960         * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
961         (x86_64-*-linux*): Likewise.
962         * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
963         include arch/i386.h.
964         (i386_linux_read_description): Remove code and call
965         i386_create_target_description.
966         * tdesc.c (allocate_target_description): New function.
967         * tdesc.h (set_tdesc_architecture): Remove declaration.
968         (set_tdesc_osabi): Likewise.
969
970 2017-09-05  Yao Qi  <yao.qi@linaro.org>
971
972         * linux-x86-tdesc.c: Don't include <inttypes.h>.
973         (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
974         set_tdesc_architecture and set_tdesc_osabi.  Remove code setting
975         .xmltarget.
976         * server.c (get_features_xml): Call tdesc_get_features_xml.
977         * tdesc.c (set_tdesc_architecture): New function.
978         (set_tdesc_osabi): New function.
979         (tdesc_get_features_xml): New function.
980         (tdesc_create_feature): Add an argument.
981         * tdesc.h (struct target_desc) <features>: New field.
982         <arch, osabi>: New field.
983         (~target_desc): xfree features, arch, and osabi.
984         (target_desc::oerator==): Don't compare .xmltarget.
985         [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
986         (set_tdesc_osabi): Likewise.
987         (tdesc_get_features_xml): Likewise.
988
989 2017-09-05  Yao Qi  <yao.qi@linaro.org>
990
991         * linux-x86-tdesc.c: Include selftest.h.
992         (i386_tdesc_test): New function.
993         (initialize_low_tdesc): Call selftests::register_test.
994         * tdesc.h: Include regdef.h.
995         (target_desc): Override operator == and !=.
996
997 2017-09-05  Yao Qi  <yao.qi@linaro.org>
998
999         * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1000         (ipa_obj): Likewise.
1001         * linux-i386-ipa.c: Include common/x86-xstate.h
1002         (get_ipa_tdesc): Call i386_linux_read_description.
1003         (initialize_low_tracepoint): Don't call  init_registers_XXX
1004         functions, call initialize_low_tdesc instead.
1005         * linux-x86-low.c (x86_linux_read_description): Call
1006         i386_linux_read_description.
1007         (initialize_low_arch): Don't call init_registers_i386_XXX
1008         functions, call initialize_low_tdesc.
1009         * linux-x86-tdesc.c: New file.
1010         * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1011         (i386_get_ipa_tdesc_idx): Declare.
1012         (i386_get_ipa_tdesc): Declare.
1013         (initialize_low_tdesc): Declare.
1014
1015 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1016
1017         * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1018         instead of 0.
1019
1020 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1021
1022         * Makefile.in (IPA_OBJS): Add vec-ipa.o
1023         * regcache.c (get_thread_regcache): Use VEC_length.
1024         (init_register_cache): Likewise.
1025         (regcache_cpy): Likewise.
1026         (registers_to_string): Iterate reg_defs via VEC_iterate.
1027         (find_regno): Likewise.
1028         (find_register_by_number): Use VEC_index.
1029         (register_size): Call find_register_by_number.
1030         (register_data): Call find_register_by_number.
1031         (supply_regblock): Use VEC_length.
1032         (regcache_raw_read_unsigned): Likewise.
1033         * tdesc.c (init_target_desc): Iterate reg_defs via
1034         VEC_iterate.
1035         (default_description): Update initializer.
1036         (copy_target_description): Don't update field num_registers.
1037         * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1038         <num_registers>: Remove.
1039
1040 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1041
1042         * Makefile.in (.SECONDARY): Define target.
1043
1044 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
1045
1046         * linux-low.c (linux_wait_1): Adjust.
1047         * server.c (queue_stop_reply_callback): Adjust.
1048
1049 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1050
1051         * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1052         QEnvironmentUnset and QEnvironmentReset packets.
1053         (handle_query): Inform remote that QEnvironmentHexEncoded,
1054         QEnvironmentUnset and QEnvironmentReset are supported.
1055
1056 2017-08-25  Simon Marchi  <simon.marchi@ericsson.com>
1057
1058         * inferiors.h (inferior_target_data): Rename to ...
1059         (thread_target_data): ... this.
1060         (inferior_regcache_data): Rename to ...
1061         (thread_regcache_data): ... this.
1062         (set_inferior_regcache_data): Rename to ...
1063         (set_thread_regcache_data): ... this.
1064         * inferiors.c (inferior_target_data): Rename to ...
1065         (thread_target_data): ... this.
1066         (inferior_regcache_data): Rename to ...
1067         (thread_regcache_data): ... this.
1068         (set_inferior_regcache_data): Rename to ...
1069         (set_thread_regcache_data): ... this.
1070         (free_one_thread): Update.
1071         * linux-low.h (get_thread_lwp): Update.
1072         * regcache.c (get_thread_regcache): Update.
1073         (regcache_invalidate_thread): Update.
1074         (free_register_cache_thread): Update.
1075         * win32-i386-low.c (update_debug_registers_callback): Update.
1076         (win32_get_current_dr): Update.
1077         * win32-low.c (thread_rec): Update.
1078         (delete_thread_info): Update.
1079         (continue_one_thread): Update.
1080         (suspend_one_thread): Update.
1081
1082 2017-08-24  Simon Marchi  <simon.marchi@ericsson.com>
1083
1084         * inferiors.c (set_inferior_target_data): Remove.
1085         * inferiors.h (set_inferior_target_data): Remove.
1086
1087 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1088
1089         * Makefile.in (OBS): Add selftest.o.
1090         * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1091         * configure, config.in: Re-generated.
1092         * server.c: Include common/sefltest.h.
1093         (captured_main): Handle option --selftest.
1094
1095 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1096
1097         * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1098         i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1099         i386-avx-mpx.o and i386-mmx.o.
1100         (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1101         amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1102         (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1103         i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1104         i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1105         (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1106         i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1107         i386/amd64-avx-mpx.xml.
1108
1109 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1110
1111         * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1112         and x32-avx-avx512.o.
1113         (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1114         i386/x32-avx-avx512.xml.
1115
1116 2017-07-26  Simon Marchi  <simon.marchi@ericsson.com>
1117
1118         * tracepoint.h (enum class fast_tpoint_collect_result): New
1119         enumeration.
1120         (fast_tracepoint_collecting): Change return type to
1121         fast_tpoint_collect_result.
1122         * tracepoint.c (fast_tracepoint_collecting): Likewise.
1123         * linux-low.h: Include tracepoint.h.
1124         (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1125         fast_tpoint_collect_result.
1126         * linux-low.c (handle_tracepoints): Adjust.
1127         (linux_fast_tracepoint_collecting): Change return type to
1128         fast_tpoint_collect_result.
1129         (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1130         linux_wait_1, stuck_in_jump_pad_callback,
1131         lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1132         proceed_one_lwp): Adjust to type change.
1133
1134 2017-07-10  Yao Qi  <yao.qi@linaro.org>
1135
1136         * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1137
1138 2017-06-29  Yao Qi  <yao.qi@linaro.org>
1139
1140         * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1141         Remove.
1142         [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1143
1144 2017-06-20  Simon Marchi  <simon.marchi@ericsson.com>
1145
1146         * Makefile.in (IPA_OBJS): Sort and format one item per line.
1147
1148 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1149
1150         * linux-low.c (linux_create_inferior): Adjust code to access the
1151         environment information via 'gdb_environ' class.
1152         * lynx-low.c (lynx_create_inferior): Likewise.
1153         * server.c (our_environ): Make it an instance of 'gdb_environ'.
1154         (get_environ): Return a pointer to 'our_environ'.
1155         (captured_main): Initialize 'our_environ'.
1156         * server.h (get_environ): Adjust prototype.
1157         * spu-low.c (spu_create_inferior): Adjust code to access the
1158         environment information via 'gdb_environ' class.
1159
1160 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1161
1162         * linux-low.c (linux_read_memory, linux_write_memory): Remove
1163         usage of "register" keyword.
1164
1165 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1166
1167         * configure: Re-generate.
1168
1169 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1170
1171         * configure: Re-generate.
1172
1173 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1174
1175         * Makefile.in (COMPILE.pre): Add "-x c++".
1176
1177 2017-06-09  Sergio Durigan Junior  <sergiodj@redhat.com>
1178
1179         * fork-child.c: Conditionally include <signal.h>.
1180
1181 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1182
1183         * server.c (handle_general_set): Handle new packet
1184         "QStartupWithShell".
1185         (handle_query): Add "QStartupWithShell" to the list of supported
1186         packets.
1187         (gdbserver_usage): Add help text explaining the
1188         new "--startup-with-shell" and "--no-startup-with-shell" CLI
1189         options.
1190         (captured_main): Recognize and act upon the presence of the new
1191         CLI options.
1192
1193 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1194             Pedro Alves  <palves@redhat.com>
1195
1196         * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1197         * configure: Regenerate.
1198         * configure.srv (srv_linux_obj): Add "fork-child.o" and
1199         "fork-inferior.o".
1200         (i[34567]86-*-lynxos*): Likewise.
1201         (spu*-*-*): Likewise.
1202         * fork-child.c: New file.
1203         * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1204         and "environ.h".
1205         (linux_ptrace_fun): New function.
1206         (linux_create_inferior): Adjust function prototype to reflect
1207         change on "target.h".  Adjust function code to use
1208         "fork_inferior".
1209         (linux_request_interrupt): Delete "signal_pid".
1210         * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1211         (lynx_ptrace_fun): New function.
1212         (lynx_create_inferior): Adjust function prototype to reflect
1213         change on "target.h".  Adjust function code to use
1214         "fork_inferior".
1215         * nto-low.c (nto_create_inferior): Adjust function prototype and
1216         code to reflect change on "target.h".  Update comments.
1217         * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1218         "common-terminal.h" and "environ.h".
1219         (terminal_fd): Moved to fork-child.c.
1220         (old_foreground_pgrp): Likewise.
1221         (restore_old_foreground_pgrp): Likewise.
1222         (last_status): Make it global.
1223         (last_ptid): Likewise.
1224         (our_environ): New variable.
1225         (startup_with_shell): Likewise.
1226         (program_name): Likewise.
1227         (program_argv): Rename to...
1228         (program_args): ...this.
1229         (wrapper_argv): New variable.
1230         (start_inferior): Delete function.
1231         (get_exec_wrapper): New function.
1232         (get_exec_file): Likewise.
1233         (get_environ): Likewise.
1234         (prefork_hook): Likewise.
1235         (post_fork_inferior): Likewise.
1236         (postfork_hook): Likewise.
1237         (postfork_child_hook): Likewise.
1238         (handle_v_run): Update code to deal with arguments coming from the
1239         remote host.  Update calls from "start_inferior" to
1240         "create_inferior".
1241         (captured_main): Likewise.  Initialize environment variable.  Call
1242         "have_job_control".
1243         * server.h (post_fork_inferior): New prototype.
1244         (get_environ): Likewise.
1245         (last_status): Declare.
1246         (last_ptid): Likewise.
1247         (signal_pid): Likewise.
1248         * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1249         (spu_ptrace_fun): New function.
1250         (spu_create_inferior): Adjust function prototype to reflect change
1251         on "target.h".  Adjust function code to use "fork_inferior".
1252         * target.c (target_terminal_init): New function.
1253         (target_terminal_inferior): Likewise.
1254         (target_terminal_ours): Likewise.
1255         * target.h: Include <vector>.
1256         (struct target_ops) <create_inferior>: Update prototype.
1257         (create_inferior): Update macro.
1258         * utils.c (gdb_flush_out_err): New function.
1259         * win32-low.c (win32_create_inferior): Adjust function prototype
1260         and code to reflect change on "target.h".
1261
1262 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1263
1264         * inferiors.c (switch_to_thread): New function.
1265
1266 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1267
1268         * Makefile.in (SFILE): Add "common/job-control.c".
1269         (OBS): Add "job-control.o".
1270
1271 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1272
1273         * Makefile: Remove "@host_makefile_frag@".
1274
1275 2017-05-05  Pedro Alves  <palves@redhat.com>
1276
1277         * configure: Regenerate.
1278
1279 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1280
1281         * configure: Regenerate.
1282
1283 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
1284
1285         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1286         software_single_step change of return type to
1287         std::vector<CORE_ADDR>.
1288         * linux-low.c (install_software_single_step_breakpoints):
1289         Likewise.
1290         * linux-low.h (install_software_single_step_breakpoints):
1291         Likewise.
1292
1293 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1294
1295         * remote-utils.c: Include "gdb_termios.h" instead of
1296         "terminal.h".
1297         * terminal.h: Delete file.
1298
1299 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1300
1301         * server.c: Include <vector>.
1302         <program_argv, wrapper_argv>: Convert to std::vector.
1303         (start_inferior): Rewrite function to use C++.
1304         (handle_v_run): Likewise.  Update code that calculates the argv
1305         based on the vRun packet; use C++.
1306         (captured_main): Likewise.
1307
1308 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
1309
1310         * server.c (handle_v_cont): Initialize thread_resume::thread
1311         with null_ptid.
1312
1313 2017-04-05  Pedro Alves  <palves@redhat.com>
1314
1315         * configure: Regenerate.
1316
1317 2017-04-05  Pedro Alves  <palves@redhat.com>
1318
1319         * gdbreplay.c (sync_error): Constify.
1320         * linux-x86-low.c (push_opcode): Constify.
1321
1322 2017-04-05  Pedro Alves  <palves@redhat.com>
1323
1324         * win32-low.c (get_child_debug_event)
1325         <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1326         Report TARGET_WAITKIND_SPURIOUS instead.
1327
1328 2017-04-05  Pedro Alves  <palves@redhat.com>
1329
1330         * remote-utils.c (remote_prepare, remote_open): Constify.
1331         * remote-utils.h (remote_prepare, remote_open): Constify.
1332         * server.c (captured_main): Constify 'port' handling.
1333
1334 2017-04-04  Simon Marchi  <simon.marchi@ericsson.com>
1335
1336         * Makefile.in (clean): Clear .deps.
1337
1338 2017-03-31  Simon Marchi  <simon.marchi@polymtl.ca>
1339
1340         * .gitignore: Remove generated files, replace with wildcard.
1341         * (clean): Replace removal of generated files with wildcard.
1342         (version.c): Replace with...
1343         (version-generated.c): ...this.
1344         (xml-builtin.c): Replace with...
1345         (xml-builtin-generated.c): ...this.
1346         (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1347         (%.c: *regformats*): Replace with...
1348         (%-generated.c: *regformats*): ...this.
1349
1350 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1351
1352         * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1353         (xtensa_fill_gregset): Call collect_register_by_name for
1354         threadptr register.
1355         (xtensa_store_gregset): Call supply_register_by_name for
1356         threadptr register.
1357
1358 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1359
1360         * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1361         for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1362         (xtensa_store_gregset): Call supply_register for all registers in
1363         a0_regnum..a0_regnum + C0_NREGS range.
1364
1365 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1366
1367         * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1368         (ax-ipa.o: ax.c): Remove.
1369         (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1370         (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1371         (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1372         (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1373         (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1374
1375 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1376
1377         * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1378         (print-utils-ipa.o: ../common/print-utils.c): Remove.
1379         (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1380         (errors-ipa.o: ../common/errors.c): Remove.
1381         (format-ipa.o: ../common/format.c): Remove.
1382         (common-utils-ipa.o: ../common/common-utils.c): Remove.
1383
1384 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1385
1386         * Makefile.in (%-ipa.o: %.c): New rule.
1387         (tracepoint-ipa.o: tracepoint.c): Remove.
1388         (utils-ipa.o: utils.c): Remove.
1389         (remote-utils-ipa.o: remote-utils.c): Remove.
1390         (regcache-ipa.o: regcache.c): Remove.
1391         (i386-linux-ipa.o: i386-linux.c): Remove.
1392         (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1393         (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1394         (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1395         (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1396         (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1397         (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1398         (amd64-linux-ipa.o: amd64-linux.c): Remove.
1399         (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1400         (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1401         (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1402         (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1403         (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1404         (aarch64-ipa.o: aarch64.c): Remove.
1405         (s390-linux32-ipa.o: s390-linux32.c): Remove.
1406         (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1407         (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1408         (s390-linux64-ipa.o: s390-linux64.c): Remove.
1409         (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1410         (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1411         (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1412         (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1413         (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1414         (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1415         (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1416         (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1417         (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1418         (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1419         (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1420         (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1421         (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1422         (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1423         (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1424         (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1425         (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1426         (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1427         (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1428         (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1429         (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1430         (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1431         (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1432         (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1433         (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1434         (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1435         (tdesc-ipa.o: tdesc.c): Remove.
1436         (x32-linux-ipa.o: x32-linux.c): Remove.
1437         (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1438         (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1439
1440 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1441
1442         * Makefile.in (%.o: ../arch/%.c): New rule.
1443         (arm.o: ../arch/arm.c): Remove.
1444         (arm-linux.o: ../arch/arm-linux.c): Remove.
1445         (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1446         (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1447
1448 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1449
1450         * Makefile.in (%.o: ../nat/%.c): New rule.
1451         (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1452         (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1453         (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1454         (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1455         (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1456         (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1457         (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1458         (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1459         (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1460         (linux-personality.o: ../nat/linux-personality.c): Remove.
1461         (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1462         (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1463         (x86-linux.o: ../nat/x86-linux.c): Remove.
1464         (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1465         (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1466
1467 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1468
1469         * Makefile.in (%.o: ../common/%.c): New rule.
1470         (signals.o: ../common/signals.c): Remove.
1471         (print-utils.o: ../common/print-utils.c): Remove.
1472         (rsp-low.o: ../common/rsp-low.c): Remove.
1473         (common-utils.o: ../common/common-utils.c): Remove.
1474         (posix-strerror.o: ../common/posix-strerror.c): Remove.
1475         (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1476         (vec.o: ../common/vec.c): Remove.
1477         (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1478         (xml-utils.o: ../common/xml-utils.c): Remove.
1479         (ptid.o: ../common/ptid.c): Remove.
1480         (buffer.o: ../common/buffer.c): Remove.
1481         (format.o: ../common/format.c): Remove.
1482         (filestuff.o: ../common/filestuff.c): Remove.
1483         (agent.o: ../common/agent.c): Remove.
1484         (errors.o: ../common/errors.c): Remove.
1485         (environ.o: ../common/environ.c): Remove.
1486         (common-debug.o: ../common/common-debug.c): Remove.
1487         (cleanups.o: ../common/cleanups.c): Remove.
1488         (common-exceptions.o: ../common/common-exceptions.c): Remove.
1489         (fileio.o: ../common/fileio.c): Remove.
1490         (common-regcache.o: ../common/common-regcache.c): Remove.
1491         (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1492         (new-op.o: ../common/new-op.c): Remove.
1493         (btrace-common.o: ../common/btrace-common.c): Remove.
1494
1495 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1496
1497         * Makefile.in (%.o: ../target/%.c): New rule.
1498         (waitstatus.o: ../target/waitstatus.c): Remove.
1499
1500 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1501
1502         * Makefile.in
1503         (%.c: ../regformats/%.dat,
1504         (%.c: ../regformats/arm/%.dat,
1505         (%.c: ../regformats/i386/%.dat,
1506         (%.c: ../regformats/rs6000/%.dat): New rules.
1507         (aarch64.c): Remove.
1508         (reg-arm.c): Remove.
1509         (arm-with-iwmmxt.c): Remove.
1510         (arm-with-vfpv2.c): Remove.
1511         (arm-with-vfpv3.c): Remove.
1512         (arm-with-neon.c): Remove.
1513         (reg-bfin.c): Remove.
1514         (reg-cris.c): Remove.
1515         (reg-crisv32.c): Remove.
1516         (i386.c): Remove.
1517         (i386-linux.c): Remove.
1518         (i386-avx.c): Remove.
1519         (i386-avx-linux.c): Remove.
1520         (i386-avx-avx512.c): Remove.
1521         (i386-avx-avx512-linux.c): Remove.
1522         (i386-mpx.c): Remove.
1523         (i386-mpx-linux.c): Remove.
1524         (i386-avx-mpx-avx512-pku.c): Remove.
1525         (i386-avx-mpx-avx512-pku-linux.c): Remove.
1526         (i386-avx-mpx.c): Remove.
1527         (i386-avx-mpx-linux.c): Remove.
1528         (i386-mmx.c): Remove.
1529         (i386-mmx-linux.c): Remove.
1530         (reg-ia64.c): Remove.
1531         (reg-m32r.c): Remove.
1532         (reg-m68k.c): Remove.
1533         (reg-cf.c): Remove.
1534         (mips-linux.c): Remove.
1535         (mips-dsp-linux.c): Remove.
1536         (mips64-linux.c): Remove.
1537         (mips64-dsp-linux.c): Remove.
1538         (nios2-linux.c): Remove.
1539         (powerpc-32.c): Remove.
1540         (powerpc-32l.c): Remove.
1541         (powerpc-altivec32l.c): Remove.
1542         (powerpc-cell32l.c): Remove.
1543         (powerpc-vsx32l.c): Remove.
1544         (powerpc-isa205-32l.c): Remove.
1545         (powerpc-isa205-altivec32l.c): Remove.
1546         (powerpc-isa205-vsx32l.c): Remove.
1547         (powerpc-e500l.c): Remove.
1548         (powerpc-64l.c): Remove.
1549         (powerpc-altivec64l.c): Remove.
1550         (powerpc-cell64l.c): Remove.
1551         (powerpc-vsx64l.c): Remove.
1552         (powerpc-isa205-64l.c): Remove.
1553         (powerpc-isa205-altivec64l.c): Remove.
1554         (powerpc-isa205-vsx64l.c): Remove.
1555         (s390-linux32.c): Remove.
1556         (s390-linux32v1.c): Remove.
1557         (s390-linux32v2.c): Remove.
1558         (s390-linux64.c): Remove.
1559         (s390-linux64v1.c): Remove.
1560         (s390-linux64v2.c): Remove.
1561         (s390-te-linux64.c): Remove.
1562         (s390-vx-linux64.c): Remove.
1563         (s390-tevx-linux64.c): Remove.
1564         (s390x-linux64.c): Remove.
1565         (s390x-linux64v1.c): Remove.
1566         (s390x-linux64v2.c): Remove.
1567         (s390x-te-linux64.c): Remove.
1568         (s390x-vx-linux64.c): Remove.
1569         (s390x-tevx-linux64.c): Remove.
1570         (tic6x-c64xp-linux.c): Remove.
1571         (tic6x-c64x-linux.c): Remove.
1572         (tic6x-c62x-linux.c): Remove.
1573         (reg-sh.c): Remove.
1574         (reg-sparc64.c): Remove.
1575         (reg-spu.c): Remove.
1576         (amd64.c): Remove.
1577         (amd64-linux.c): Remove.
1578         (amd64-avx.c): Remove.
1579         (amd64-avx-linux.c): Remove.
1580         (amd64-avx-avx512.c): Remove.
1581         (amd64-avx-avx512-linux.c): Remove.
1582         (amd64-mpx.c): Remove.
1583         (amd64-mpx-linux.c): Remove.
1584         (amd64-avx-mpx-avx512-pku.c): Remove.
1585         (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1586         (amd64-avx-mpx.c): Remove.
1587         (amd64-avx-mpx-linux.c): Remove.
1588         (x32.c): Remove.
1589         (x32-linux.c): Remove.
1590         (x32-avx.c): Remove.
1591         (x32-avx-linux.c): Remove.
1592         (x32-avx-avx512.c): Remove.
1593         (x32-avx-avx512-linux.c): Remove.
1594         (reg-xtensa.c): Remove.
1595         (reg-tilegx.c): Remove.
1596         (reg-tilegx32.c): Remove.
1597
1598 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1599
1600         * Makefile.in (SFILES): Add "common/environ.c".
1601         (OBJS): Add "common/environ.h".
1602
1603 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1604
1605         * configure.ac: Check if the fs_base and gs_base members of
1606         `struct user_regs_struct' exist.
1607         * config.in: Regenerated.
1608         * configure: Likewise.
1609
1610 2017-01-09  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1611
1612         * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1613         target_read_memory.
1614         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1615         (get_next_pcs_syscall_next_pc): Likewise.
1616
1617 2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
1618
1619         * win32-i386-low.c: Fix incorrect reference to a couple source files.
1620         * nto-x86-low.c: Likewise.
1621
1622 2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
1623
1624         * Makefile.in: Include disable-implicit-rules.mk.
1625
1626 2016-11-23  Pedro Alves  <palves@redhat.com>
1627
1628         * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1629         (debug_vprintf): Use std::chrono::steady_clock instead of
1630         gettimeofday.  Use '.' instead of ':'.
1631         * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1632         (get_timestamp): Use std::chrono::steady_clock instead of
1633         gettimeofday.
1634
1635 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1636
1637         * Makefile.in: Fix whitespace formatting.
1638
1639 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1640
1641         * Makefile.in (SFILES, OBS): Flatten list and order
1642         alphabetically.
1643
1644 2016-11-23  Pedro Alves  <palves@redhat.com>
1645
1646         * event-loop.c (handle_file_event): Use warning.
1647         * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1648         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1649         Use warning.
1650
1651 2016-11-23  Pedro Alves  <palves@redhat.com>
1652
1653         * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1654         output.
1655         * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1656         * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1657         debug_printf and debug_flush for debug output.
1658         * server.c (handle_general_set): Likewise.
1659         * thread-db.c (try_thread_db_load): Use debug_printf for debug
1660         output.
1661
1662 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1663
1664         * Makefile.in (.c.o): Replace rule with ...
1665         (%.o: %.c): ... this one.
1666
1667 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1668
1669         * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1670         prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
1671         make.
1672         * configure.ac: Remove checks for the make program.
1673         * configure: Re-generate.
1674
1675 2016-10-28  Pedro Alves  <palves@redhat.com>
1676
1677         * Makefile.in (CXX_DIALECT): Get from configure.
1678         (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1679         * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1680         * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1681         * config.in: Regenerate.
1682         * configure: Regenerate.
1683
1684 2016-10-27  Yao Qi  <yao.qi@linaro.org>
1685
1686         * linux-low.c (linux_supports_range_stepping): Return true if
1687         can_software_single_step return true.
1688
1689 2016-10-27  Yao Qi  <yao.qi@linaro.org>
1690
1691         * inferiors.c (find_inferior_in_random): New function.
1692         * inferiors.h (find_inferior_in_random): Declare.
1693         * linux-low.c (linux_wait_for_event_filtered): Call
1694         find_inferior_in_random instead of find_inferior.
1695
1696 2016-10-27  Yao Qi  <yao.qi@linaro.org>
1697
1698         * linux-low.c (linux_wait_1): If single-step breakpoints are
1699         inserted, remove them.
1700
1701 2016-10-26  Pedro Alves  <palves@redhat.com>
1702
1703         * linux-low.c (handle_extended_wait): Link parent/child fork
1704         threads.
1705         (linux_wait_1): Unlink them.
1706         (linux_set_resume_request): Ignore resume requests for
1707         already-resumed and unhandled fork child threads.
1708         * linux-low.h (struct lwp_info) <fork_relative>: New field.
1709         * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1710         New functions.
1711         (handle_v_requests) <vCont>: Don't call require_running.
1712         * server.h (in_queued_stop_replies): New declaration.
1713
1714 2016-10-24  Yao Qi  <yao.qi@linaro.org>
1715
1716         PR server/20733
1717         * linux-aarch64-low.c (append_insns): Cast the return value to
1718         'uint32_t *'.
1719
1720 2016-10-10  Yao Qi  <yao.qi@linaro.org>
1721
1722         * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1723
1724 2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1725
1726         * target.c (target_supports_multi_process): New function, moved
1727         from...
1728         * target.h (target_supports_multi_process): ... here.  Remove
1729         macro.
1730
1731 2016-10-05  Tom Tromey  <tom@tromey.com>
1732
1733         PR remote/20655:
1734         * tracepoint.c (handle_tracepoint_bkpts): Check
1735         ipa_error_tracepoint, not ipa_stopping_tracepoint.
1736
1737 2016-10-05  Yao Qi  <yao.qi@linaro.org>
1738
1739         * configure.srv: Update the path of arm-*.xml files.
1740
1741 2016-10-05  Terry Guo  <terry.guo@arm.com>
1742             Yao Qi  <yao.qi@linaro.org>
1743
1744         * Makefile.in: Adjust the path of rules.
1745         * configure.srv: Update the path of xml files.
1746         * regformats/arm-with-iwmmxt.dat: Regenerated.
1747         * regformats/arm-with-neon.dat: Likewise.
1748         * regformats/arm-with-vfpv2.dat: Likewise.
1749         * regformats/arm-with-vfpv3.dat Likewise.
1750
1751 2016-09-30  Yao Qi  <yao.qi@linaro.org>
1752
1753         PR gdbserver/20627
1754         * target.c (target_stop_and_wait): Don't call
1755         target_continue_no_signal, use resume_stop instead.
1756
1757 2016-09-26  Yao Qi  <yao.qi@linaro.org>
1758
1759         * linux-low.c (linux_wait_1): Call debug_exit.
1760
1761 2016-09-23  Pedro Alves  <palves@redhat.com>
1762
1763         * Makefile.in (SFILES): Add common/new-op.c.
1764         (OBS): Add common/new-op.o.
1765         (new-op.o): New rule.
1766
1767 2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1768
1769         * .gitinore: Ignore more files.
1770
1771 2016-09-21  Yao Qi  <yao.qi@linaro.org>
1772
1773         * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1774         23.
1775
1776 2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
1777
1778         * server.c (start_inferior): Call target_mourn_inferior instead of
1779         mourn_inferior; pass ptid_t argument to it.
1780         (resume): Likewise.
1781         (handle_target_event): Likewise.
1782         * target.c (target_mourn_inferior): New function.
1783         * target.h (mourn_inferior): Delete macro.
1784
1785 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1786
1787         * linux-low.c (lwp_is_stepping): New function.
1788
1789 2016-09-06  Carl Love  <cel@us.ibm.com>
1790
1791         * server.c (start_inferior):  Fixed comment, requested comment change
1792         didn't get updated correctly.  Removed reference to ptrace () call as
1793         it is only true on Linux systems.
1794
1795 2016-09-06  Carl Love  <cel@us.ibm.com>
1796
1797         * server.c (start_inferior):  Do not call
1798         function target_post_create_inferior () if the
1799         inferior process has already exited.
1800
1801 2016-09-05  Pedro Alves  <palves@redhat.com>
1802
1803         * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1804         (COMPILE.pre, CC_LD): Use CXX directly.
1805         (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1806         * acinclude.m4: Don't include build-with-cxx.m4.
1807         * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1808         * configure: Regenerate.
1809
1810 2016-09-02  Akash Trehan  <akash.trehan123@gmail.com>
1811
1812         PR gdb/19495
1813         * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1814         call writing data to own_buf.
1815
1816 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
1817
1818         * target.c (mywait): Call target_wait instead of
1819         the_target->wait.
1820         (target_wait): New function.
1821
1822 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
1823
1824         * server.c (start_inferior): New variable 'ptid'.  Replace calls
1825         to the_target->resume by target_continue{,_no_signal}, depending
1826         on the case.
1827         * target.c (target_stop_and_wait): Call target_continue_no_signal
1828         instead of the_target->resume.
1829         (target_continue): New function.
1830
1831 2016-08-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1832
1833         * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1834
1835 2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
1836
1837         PR server/20491
1838         * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1839         ps_prochandle.
1840         * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1841         * linux-arm-low.c (ps_get_thread_area): Likewise.
1842         * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1843         * linux-m68k-low.c (ps_get_thread_area): Likewise.
1844         * linux-mips-low.c (ps_get_thread_area): Likewise.
1845         * linux-nios2-low.c (ps_get_thread_area): Likewise.
1846         * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1847         * linux-x86-low.c (ps_get_thread_area): Likewise.
1848         * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1849
1850 2016-08-19  Pedro Alves  <palves@redhat.com>
1851
1852         * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1853
1854 2016-08-19  Pedro Alves  <palves@redhat.com>
1855
1856         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1857         comment.  Use memcpy instead of casting through unsigned long.
1858
1859 2016-08-19  Pedro Alves  <palves@redhat.com>
1860
1861         * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1862         allocating around 0x80000000.
1863
1864 2016-08-19  Pedro Alves  <palves@redhat.com>
1865
1866         PR gdb/20415
1867         * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1868         (x32-avx512-linux-ipa.o): New rules.
1869         * configure.ac (x86_64-*-linux*): New x32 check.
1870         * configure.srv (ipa_x32_linux_regobj): New.
1871         (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1872         * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1873         descriptions.
1874         (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1875         descriptions.
1876         * configure: Regenerate.
1877
1878 2016-08-09  Pedro Alves  <palves@redhat.com>
1879
1880         PR gdb/18653
1881         * Makefile.in (OBS): Add signals-state-save-restore.o.
1882         (signals-state-save-restore.o): New rule.
1883         * config.in: Regenerate.
1884         * configure: Regenerate.
1885         * linux-low.c: Include "signals-state-save-restore.h".
1886         (linux_create_inferior): Call
1887         restore_original_signals_state.
1888         * server.c: Include "dispositions-save-restore.h".
1889         (captured_main): Call save_original_signals_state.
1890
1891 2016-08-05  Pedro Alves  <palves@redhat.com>
1892
1893         * configure: Regenerate.
1894
1895 2016-08-04  Yao Qi  <yao.qi@linaro.org>
1896
1897         * linux-low.c (regsets_fetch_inferior_registers): Check
1898         errno is ESRCH or not.
1899
1900 2016-08-02  Yao Qi  <yao.qi@linaro.org>
1901
1902         * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1903         <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1904         (thread_db_load_search): Update.
1905         (try_thread_db_load_1): Don't look for td_ta_event_addr,
1906         td_ta_set_event and td_ta_event_getmsg.
1907
1908 2016-07-26  Pedro Alves  <palves@redhat.com>
1909
1910         PR server/20414
1911         * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1912         of unsigned long for 64-bit registers and use uint32_t instead of
1913         unsigned int for 32-bit registers.
1914
1915 2016-07-26  Pedro Alves  <palves@redhat.com>
1916
1917         * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1918         to 'ptrace'.
1919
1920 2016-07-21  Tom Tromey  <tom@tromey.com>
1921
1922         * configure: Rebuild.
1923
1924 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1925
1926         * mem-break.c (find_gdb_breakpoint): Cast bp to
1927         'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1928
1929 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1930
1931         * server.c (handle_v_requests): Support s and S actions
1932         if target_supports_software_single_step return true.
1933
1934 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1935
1936         * linux-low.c (resume_stopped_resumed_lwps): If resume request
1937         is resume_step, call maybe_hw_step.
1938         (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1939         and unstop them.
1940         (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1941         breakpoints or not.
1942         (proceed_one_lwp): If resume request is resume_step, install
1943         reinsert breakpoints and call maybe_hw_step.
1944
1945 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1946
1947         * linux-low.c (proceed_one_lwp): Declare.
1948         (linux_resume_one_thread): Remove local variable 'step'.
1949         Lift code enqueue signal.  Call proceed_one_lwp instead of
1950         linux_resume_one_lwp.
1951
1952 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1953
1954         * linux-low.c (linux_resume_one_thread): Call
1955         enqueue_pending_signal.
1956
1957 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1958
1959         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1960         * inferiors.c (do_restore_current_thread_cleanup): New function.
1961         (make_cleanup_restore_current_thread): Likewise.
1962         * linux-low.c (install_software_single_step_breakpoints): Call
1963         make_cleanup_restore_current_thread.  Switch current_thread to
1964         thread.
1965
1966 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1967
1968         * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1969         (set_reinsert_breakpoint): New parameter ptid.  Callers updated.
1970         (clone_one_breakpoint): Likewise.
1971         (delete_reinsert_breakpoints): Change parameter to thread.
1972         Callers updated.
1973         (has_reinsert_breakpoints): Likewise.
1974         (uninsert_reinsert_breakpoints): Likewise.
1975         (reinsert_reinsert_breakpoints): Likewise.
1976         * mem-break.h (set_reinsert_breakpoint): Update declaration.
1977         (delete_reinsert_breakpoints): Likewise.
1978         (reinsert_reinsert_breakpoints): Likewise.
1979         (uninsert_reinsert_breakpoints): Likewise.
1980         (has_reinsert_breakpoints): Likewise.
1981
1982 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1983
1984         * inferiors.c (get_thread_process): Make parameter const.
1985         * inferiors.h (get_thread_process): Update declaration.
1986         * mem-break.c (clone_all_breakpoints): Remove all parameters.
1987         Add new parameters child_thread and parent_thread.  Callers
1988         updated.
1989         * mem-break.h (clone_all_breakpoints): Update declaration.
1990
1991 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1992
1993         * mem-break.c (struct breakpoint) <cond_list>: Remove.
1994         <command_list, handler>: Remove.
1995         (struct gdb_breakpoint): New.
1996         (struct other_breakpoint): New.
1997         (struct reinsert_breakpoint): New.
1998         (is_gdb_breakpoint): New function.
1999         (any_persistent_commands): Update command_list if
2000         is_gdb_breakpoint returns true.
2001         (set_breakpoint): Create breakpoints according to their types.
2002         (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2003         (set_gdb_breakpoint_1): Likewise.
2004         (set_gdb_breakpoint): Likewise.
2005         (clear_breakpoint_conditions): Change parameter type to
2006         'struct gdb_breakpoint *'.
2007         (clear_breakpoint_commands): Likewise.
2008         (clear_breakpoint_conditions_and_commands): Likewise.
2009         (add_condition_to_breakpoint): Likewise.
2010         (add_breakpoint_condition): Likewise.
2011         (add_commands_to_breakpoint): Likewise.
2012         (check_breakpoints): Check other_breakpoint.
2013         (clone_one_breakpoint): Clone breakpopint according to its type.
2014         * mem-break.h (struct gdb_breakpoint): Declare.
2015         (set_gdb_breakpoint): Update declaration.
2016         (clear_breakpoint_conditions_and_commands): Likewise.
2017         (add_breakpoint_condition): Likewise.
2018         (add_breakpoint_commands): Likewise.
2019         * server.c (process_point_options): Change parameter type to
2020         'struct gdb_breakpoint *'.
2021
2022 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2023
2024         * mem-break.c (set_breakpoint_at): Rename it to ...
2025         (set_breakpoint_type_at): ... it.
2026         (set_breakpoint_at): Call set_breakpoint_type_at.
2027         (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2028         * mem-break.h (set_breakpoint_at): Update comments.
2029
2030 2016-07-12  Chung-Lin Tang  <cltang@codesourcery.com>
2031
2032         * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2033         to buf parameter.
2034         (nios2_store_gregset): Likewise.
2035
2036 2016-07-01  Pedro Alves  <palves@redhat.com>
2037             Antoine Tremblay  <antoine.tremblay@ericsson.com>
2038
2039         * linux-low.c: Change interface to take the target lwp_info
2040         pointer directly and return void.  Handle detaching from a zombie
2041         thread.
2042         (linux_detach_lwp_callback): New function.
2043         (linux_detach): Detach from the leader thread after detaching from
2044         the clone threads.
2045
2046 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2047
2048         * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2049         for variable new_offset.
2050         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2051         (aarch64_ftrace_insn_reloc_cb): Likewise.
2052         (aarch64_ftrace_insn_reloc_tb): Likewise.
2053         (aarch64_install_fast_tracepoint_jump_pad): Likewise.  Use
2054         PRIx64 instead of PRIx32.
2055
2056 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2057
2058         * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2059         (the_low_target): Install arm_get_syscall_trapinfo.
2060
2061 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2062
2063         * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2064         function.
2065         (the_low_target): Install aarch64_get_syscall_trapinfo.
2066
2067 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2068
2069         * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2070         Callers updated.
2071         * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2072         Remove parameter sysno.
2073         * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2074         sysret.
2075
2076 2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2077
2078         * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2079         (s390_emit_ne_goto): Likewise.
2080         (s390_emit_lt_goto): Likewise.
2081         (s390_emit_le_goto): Likewise.
2082         (s390_emit_gt_goto): Likewise.
2083         (s390_emit_ge_goto): Likewise.
2084         (s390x_emit_eq_goto): Likewise.
2085         (s390x_emit_ne_goto): Likewise.
2086         (s390x_emit_lt_goto): Likewise.
2087         (s390x_emit_le_goto): Likewise.
2088         (s390x_emit_gt_goto): Likewise.
2089         (s390x_emit_ge_goto): Likewise.
2090         (s390_emit_ops_impl): Mark variable static.
2091         (s390x_emit_ops): Likewise.
2092
2093 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2094
2095         * linux-low.c (handle_extended_wait): Call
2096         uninsert_reinsert_breakpoints for the parent process.  Remove
2097         reinsert breakpoints from the child process.  Reinsert them to
2098         the parent process when vfork is done.
2099         * mem-break.c (uninsert_reinsert_breakpoints): New function.
2100         (reinsert_reinsert_breakpoints): New function.
2101         * mem-break.h (uninsert_reinsert_breakpoints): Declare
2102         (reinsert_reinsert_breakpoints): Declare.
2103
2104 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2105
2106         * linux-low.c (handle_extended_wait): If the parent is doing
2107         step-over, remove the reinsert breakpoints from the forked child.
2108
2109 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2110
2111         * linux-low.c (unsuspend_all_lwps): Declare.
2112         (linux_low_filter_event): If thread exited, call finish_step_over.
2113         If step-over is finished, unsuspend other threads.
2114
2115 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2116
2117         * linux-low.c (linux_resume_one_lwp_throw): Assert
2118         has_reinsert_breakpoints returns false.
2119         * mem-break.c (delete_disabled_breakpoints): Assert
2120         bp type isn't reinsert_breakpoint.
2121
2122 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2123
2124         * linux-low.c (maybe_hw_step): New function.
2125         (linux_resume_one_lwp_throw): Call maybe_hw_step.
2126         (finish_step_over): Switch current_thread to lwp temporarily,
2127         and assert has_reinsert_breakpoints returns true.
2128         (proceed_one_lwp): Call maybe_hw_step.
2129         * mem-break.c (has_reinsert_breakpoints): New function.
2130         * mem-break.h (has_reinsert_breakpoints): Declare.
2131
2132 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
2133
2134         * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2135
2136 2016-05-17  Yao Qi  <yao.qi@linaro.org>
2137
2138         * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2139         instead of find_inferior.
2140
2141 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2142
2143         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2144         Initialize res to zero.
2145
2146 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2147
2148         * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2149         to uint32_t.
2150
2151 2016-05-04  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2152
2153         * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2154         used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2155         (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2156
2157 2016-04-28  Par Olsson  <par.olsson@windriver.com>
2158             Simon Marchi  <simon.marchi@ericsson.com>
2159
2160         * tracepoint.c (write_inferior_int8): New function.
2161         (cmd_qtenable_disable): Write enable flag using
2162         write_inferior_int8.
2163
2164 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2165
2166         * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2167         (need_step_over_p): Return zero if the LWP has pending signals
2168         can be delivered on software single step target.
2169
2170 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2171
2172         * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2173         return instead of error.
2174
2175 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2176
2177         * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2178         to 23.
2179
2180 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2181
2182         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2183         signal when stepping over breakpoint with software single
2184         step.
2185
2186 2016-04-21  Pedro Alves  <palves@redhat.com>
2187
2188         * linux-s390-low.c (s390_collect_ptrace_register)
2189         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2190         add casts.
2191         (s390_check_regset): Use void * instead of gdb_byte *.
2192
2193 2016-04-20  Pedro Alves  <palves@redhat.com>
2194
2195         * configure: Renegerate.
2196
2197 2016-04-20  Yao Qi  <yao.qi@linaro.org>
2198
2199         * linux-aarch32-low.c: Include "arch/arm-linux.h".
2200         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2201         number 16.
2202         (arm_store_gregset): Likewise.
2203
2204 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2205
2206         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2207         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2208         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2209         (amd64-avx-mpx-linux.c): New rules.
2210         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2211         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2212         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2213         (srv_amd64_regobj): Add amd64-avx-mpx.o.
2214         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2215         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2216         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2217         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2218         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2219         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2220         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2221         * linux-x86-low.c (x86_linux_read_description): Add case for
2222         X86_XSTATE_AVX_MPX_MASK.
2223         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2224         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2225         init_registers_i386_avx_mpx_linux.
2226         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2227         (initialize_low_tracepoint): Call
2228         init_registers_i386_avx_mpx_linux.
2229         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
2230         (initialize_low_tracepoint): Call
2231         init_registers_amd64_avx_mpx_linux.
2232         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2233         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2234         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2235         declarations.
2236
2237 2016-04-18  Pedro Alves  <palves@redhat.com>
2238
2239         * configure: Regenerate.
2240
2241 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2242
2243         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2244         (aarch64_emit_sub): Likewise.
2245
2246 2016-04-12  Pedro Alves  <palves@redhat.com>
2247
2248         * utils.c (prepare_to_throw_exception): Delete.
2249
2250 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
2251
2252         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2253
2254 2016-04-05  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2255
2256         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2257
2258 2016-04-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2259
2260         * linux-aarch64-ipa.c: Add <elf.h> include.
2261         * linux-ppc-ipa.c: Add <elf.h> include.
2262         * linux-s390-ipa.c: Add <elf.h> include.
2263
2264 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2265
2266         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2267         (get_raw_reg_ptr): Likewise.
2268         (get_trace_state_variable_value_ptr): Likewise.
2269         (set_trace_state_variable_value_ptr): Likewise.
2270         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2271         char *.
2272
2273 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
2274             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2275
2276         PR/17221
2277         * linux-ppc-low.c (emit_insns): New function.
2278         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2279         (ppc_emit_prologue): New function.
2280         (ppc_emit_epilogue): New function.
2281         (ppc_emit_add): New function.
2282         (ppc_emit_sub): New function.
2283         (ppc_emit_mul): New function.
2284         (ppc_emit_lsh): New function.
2285         (ppc_emit_rsh_signed): New function.
2286         (ppc_emit_rsh_unsigned): New function.
2287         (ppc_emit_ext): New function.
2288         (ppc_emit_zero_ext): New function.
2289         (ppc_emit_log_not): New function.
2290         (ppc_emit_bit_and): New function.
2291         (ppc_emit_bit_or): New function.
2292         (ppc_emit_bit_xor): New function.
2293         (ppc_emit_bit_not): New function.
2294         (ppc_emit_equal): New function.
2295         (ppc_emit_less_signed): New function.
2296         (ppc_emit_less_unsigned): New function.
2297         (ppc_emit_ref): New function.
2298         (ppc_emit_const): New function.
2299         (ppc_emit_reg): New function.
2300         (ppc_emit_pop): New function.
2301         (ppc_emit_stack_flush): New function.
2302         (ppc_emit_swap): New function.
2303         (ppc_emit_stack_adjust): New function.
2304         (ppc_emit_call): New function.
2305         (ppc_emit_int_call_1): New function.
2306         (ppc_emit_void_call_2): New function.
2307         (ppc_emit_if_goto): New function.
2308         (ppc_emit_goto): New function.
2309         (ppc_emit_eq_goto): New function.
2310         (ppc_emit_ne_goto): New function.
2311         (ppc_emit_lt_goto): New function.
2312         (ppc_emit_le_goto): New function.
2313         (ppc_emit_gt_goto): New function.
2314         (ppc_emit_ge_goto): New function.
2315         (ppc_write_goto_address): New function.
2316         (ppc_emit_ops_impl): New static variable.
2317         (ppc64v1_emit_prologue): New function.
2318         (ppc64v2_emit_prologue): New function.
2319         (ppc64_emit_epilogue): New function.
2320         (ppc64_emit_add): New function.
2321         (ppc64_emit_sub): New function.
2322         (ppc64_emit_mul): New function.
2323         (ppc64_emit_lsh): New function.
2324         (ppc64_emit_rsh_signed): New function.
2325         (ppc64_emit_rsh_unsigned): New function.
2326         (ppc64_emit_ext): New function.
2327         (ppc64_emit_zero_ext): New function.
2328         (ppc64_emit_log_not): New function.
2329         (ppc64_emit_bit_and): New function.
2330         (ppc64_emit_bit_or): New function.
2331         (ppc64_emit_bit_xor): New function.
2332         (ppc64_emit_bit_not): New function.
2333         (ppc64_emit_equal): New function.
2334         (ppc64_emit_less_signed): New function.
2335         (ppc64_emit_less_unsigned): New function.
2336         (ppc64_emit_ref): New function.
2337         (ppc64_emit_const): New function.
2338         (ppc64v1_emit_reg): New function.
2339         (ppc64v2_emit_reg): New function.
2340         (ppc64_emit_pop): New function.
2341         (ppc64_emit_stack_flush): New function.
2342         (ppc64_emit_swap): New function.
2343         (ppc64v1_emit_call): New function.
2344         (ppc64v2_emit_call): New function.
2345         (ppc64v1_emit_int_call_1): New function.
2346         (ppc64v2_emit_int_call_1): New function.
2347         (ppc64v1_emit_void_call_2): New function.
2348         (ppc64v2_emit_void_call_2): New function.
2349         (ppc64_emit_if_goto): New function.
2350         (ppc64_emit_eq_goto): New function.
2351         (ppc64_emit_ne_goto): New function.
2352         (ppc64_emit_lt_goto): New function.
2353         (ppc64_emit_le_goto): New function.
2354         (ppc64_emit_gt_goto): New function.
2355         (ppc64_emit_ge_goto): New function.
2356         (ppc64v1_emit_ops_impl): New static variable.
2357         (ppc64v2_emit_ops_impl): New static variable.
2358         (ppc_emit_ops): New function.
2359         (linux_low_target): Wire in ppc_emit_ops.
2360
2361 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
2362             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2363
2364         PR/17221
2365         * Makefile.in: Add powerpc-*-ipa.o
2366         * configure.srv: Add ipa_obj for powerpc*-linux.
2367         * linux-ppc-ipa.c: New file.
2368         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2369         includes.
2370         (PPC_FIELD): New macro.
2371         (PPC_SEXT): New macro.
2372         (PPC_OP6): New macro.
2373         (PPC_BO): New macro.
2374         (PPC_LI): New macro.
2375         (PPC_BD): New macro.
2376         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2377         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2378         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2379         (ppc_get_thread_area): New function.
2380         (is_elfv2_inferior): New function.
2381         (gen_ds_form): New function.
2382         (GEN_STD): New macro.
2383         (GEN_STDU): New macro.
2384         (GEN_LD): New macro.
2385         (GEN_LDU): New macro.
2386         (gen_d_form): New function.
2387         (GEN_ADDI): New macro.
2388         (GEN_ADDIS): New macro.
2389         (GEN_LI): New macro.
2390         (GEN_LIS): New macro.
2391         (GEN_ORI): New macro.
2392         (GEN_ORIS): New macro.
2393         (GEN_LWZ): New macro.
2394         (GEN_STW): New macro.
2395         (GEN_STWU): New macro.
2396         (gen_xfx_form): New function.
2397         (GEN_MFSPR): New macro.
2398         (GEN_MTSPR): New macro.
2399         (GEN_MFCR): New macro.
2400         (GEN_MTCR): New macro.
2401         (GEN_SYNC): New macro.
2402         (GEN_LWSYNC): New macro.
2403         (gen_x_form): New function.
2404         (GEN_OR): New macro.
2405         (GEN_MR): New macro.
2406         (GEN_LWARX): New macro.
2407         (GEN_STWCX): New macro.
2408         (GEN_CMPW): New macro.
2409         (gen_md_form): New function.
2410         (GEN_RLDICL): New macro.
2411         (GEN_RLDICR): New macro.
2412         (gen_i_form): New function.
2413         (GEN_B): New macro.
2414         (GEN_BL): New macro.
2415         (gen_b_form): New function.
2416         (GEN_BNE): New macro.
2417         (GEN_LOAD): New macro.
2418         (GEN_STORE): New macro.
2419         (gen_limm): New function.
2420         (gen_atomic_xchg): New function.
2421         (gen_call): New function.
2422         (ppc_relocate_instruction): New function.
2423         (ppc_install_fast_tracepoint_jump_pad): New function.
2424         (ppc_get_min_fast_tracepoint_insn_len): New function.
2425         (ppc_get_ipa_tdesc_idx): New function.
2426         (the_low_target): Wire in the new functions.
2427         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2428         tdescs.
2429         * linux-ppc-tdesc.h: New file.
2430
2431 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2432
2433         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2434         (alloc_jump_pad_buffer): New function.
2435         * linux-amd64-ipa.c: Add <sys/mman.h> include.
2436         (alloc_jump_pad_buffer): New function.
2437         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2438         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2439         (alloc_jump_pad_buffer): New function.
2440         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2441         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2442         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2443         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2444
2445 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2446
2447         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2448         * linux-amd64-ipa.c: Likewise.
2449         * linux-i386-ipa.c: Likewise.
2450         * linux-s390-ipa.c: Likewise.
2451         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2452         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2453         set_trace_state_variable_value_ptr.
2454         (struct ipa_sym_addresses): Likewise.
2455         (symbol_list): Likewise.
2456         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2457         accessing gdb_collect directly.
2458         (gdb_collect_ptr_type): New typedef.
2459         (get_raw_reg_ptr_type): New typedef.
2460         (get_trace_state_variable_value_ptr_type): New typedef.
2461         (set_trace_state_variable_value_ptr_type): New typedef.
2462         (gdb_collect_ptr): New global.
2463         (get_raw_reg_ptr): New global.
2464         (get_trace_state_variable_value_ptr): New global.
2465         (set_trace_state_variable_value_ptr): New global.
2466         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2467         accessing get_raw_reg directly.
2468         (get_get_tsv_func_addr): Likewise for
2469         get_trace_state_variable_value_ptr.
2470         (get_set_tsv_func_addr): Likewise for
2471         set_trace_state_variable_value_ptr.
2472         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2473
2474 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
2475
2476         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2477
2478 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2479
2480         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2481         packets.
2482         (relocate_instruction): Remove own_buf.
2483         * server.c (own_buf): Make global.
2484         (handle_v_requests): Make global.
2485         * server.h (own_buf): New declaration.
2486         (handle_v_requests): New prototype.
2487
2488 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2489
2490         PR 18377
2491         * linux-s390-low.c (add_insns): New function.
2492         (s390_emit_prologue): New function.
2493         (s390_emit_epilogue): New function.
2494         (s390_emit_add): New function.
2495         (s390_emit_sub): New function.
2496         (s390_emit_mul): New function.
2497         (s390_emit_lsh): New function.
2498         (s390_emit_rsh_signed): New function.
2499         (s390_emit_rsh_unsigned): New function.
2500         (s390_emit_ext): New function.
2501         (s390_emit_log_not): New function.
2502         (s390_emit_bit_and): New function.
2503         (s390_emit_bit_or): New function.
2504         (s390_emit_bit_xor): New function.
2505         (s390_emit_bit_not): New function.
2506         (s390_emit_equal): New function.
2507         (s390_emit_less_signed): New function.
2508         (s390_emit_less_unsigned): New function.
2509         (s390_emit_ref): New function.
2510         (s390_emit_if_goto): New function.
2511         (s390_emit_goto): New function.
2512         (s390_write_goto_address): New function.
2513         (s390_emit_litpool): New function.
2514         (s390_emit_const): New function.
2515         (s390_emit_call): New function.
2516         (s390_emit_reg): New function.
2517         (s390_emit_pop): New function.
2518         (s390_emit_stack_flush): New function.
2519         (s390_emit_zero_ext): New function.
2520         (s390_emit_swap): New function.
2521         (s390_emit_stack_adjust): New function.
2522         (s390_emit_set_r2): New function.
2523         (s390_emit_int_call_1): New function.
2524         (s390_emit_void_call_2): New function.
2525         (s390_emit_eq_goto): New function.
2526         (s390_emit_ne_goto): New function.
2527         (s390_emit_lt_goto): New function.
2528         (s390_emit_le_goto): New function.
2529         (s390_emit_gt_goto): New function.
2530         (s390_emit_ge_goto): New function.
2531         (s390x_emit_prologue): New function.
2532         (s390x_emit_epilogue): New function.
2533         (s390x_emit_add): New function.
2534         (s390x_emit_sub): New function.
2535         (s390x_emit_mul): New function.
2536         (s390x_emit_lsh): New function.
2537         (s390x_emit_rsh_signed): New function.
2538         (s390x_emit_rsh_unsigned): New function.
2539         (s390x_emit_ext): New function.
2540         (s390x_emit_log_not): New function.
2541         (s390x_emit_bit_and): New function.
2542         (s390x_emit_bit_or): New function.
2543         (s390x_emit_bit_xor): New function.
2544         (s390x_emit_bit_not): New function.
2545         (s390x_emit_equal): New function.
2546         (s390x_emit_less_signed): New function.
2547         (s390x_emit_less_unsigned): New function.
2548         (s390x_emit_ref): New function.
2549         (s390x_emit_if_goto): New function.
2550         (s390x_emit_const): New function.
2551         (s390x_emit_call): New function.
2552         (s390x_emit_reg): New function.
2553         (s390x_emit_pop): New function.
2554         (s390x_emit_stack_flush): New function.
2555         (s390x_emit_zero_ext): New function.
2556         (s390x_emit_swap): New function.
2557         (s390x_emit_stack_adjust): New function.
2558         (s390x_emit_int_call_1): New function.
2559         (s390x_emit_void_call_2): New function.
2560         (s390x_emit_eq_goto): New function.
2561         (s390x_emit_ne_goto): New function.
2562         (s390x_emit_lt_goto): New function.
2563         (s390x_emit_le_goto): New function.
2564         (s390x_emit_gt_goto): New function.
2565         (s390x_emit_ge_goto): New function.
2566         (s390_emit_ops): New function.
2567         (struct linux_target_ops): Fill in emit_ops hook.
2568
2569 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2570
2571         PR 18377
2572         * Makefile.in: Add s390 IPA files.
2573         * configure.srv: Build IPA for s390.
2574         * linux-s390-ipa.c: New file.
2575         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2576         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2577         (tdesc_s390_linux32): Likewise.
2578         (init_registers_s390_linux32v1): Likewise.
2579         (tdesc_s390_linux32v1): Likewise.
2580         (init_registers_s390_linux32v2): Likewise.
2581         (tdesc_s390_linux32v2): Likewise.
2582         (init_registers_s390_linux64): Likewise.
2583         (tdesc_s390_linux64): Likewise.
2584         (init_registers_s390_linux64v1): Likewise.
2585         (tdesc_s390_linux64v1): Likewise.
2586         (init_registers_s390_linux64v2): Likewise.
2587         (tdesc_s390_linux64v2): Likewise.
2588         (init_registers_s390_te_linux64): Likewise.
2589         (tdesc_s390_te_linux64): Likewise.
2590         (init_registers_s390_vx_linux64): Likewise.
2591         (tdesc_s390_vx_linux64): Likewise.
2592         (init_registers_s390_tevx_linux64): Likewise.
2593         (tdesc_s390_tevx_linux64): Likewise.
2594         (init_registers_s390x_linux64): Likewise.
2595         (tdesc_s390x_linux64): Likewise.
2596         (init_registers_s390x_linux64v1): Likewise.
2597         (tdesc_s390x_linux64v1): Likewise.
2598         (init_registers_s390x_linux64v2): Likewise.
2599         (tdesc_s390x_linux64v2): Likewise.
2600         (init_registers_s390x_te_linux64): Likewise.
2601         (tdesc_s390x_te_linux64): Likewise.
2602         (init_registers_s390x_vx_linux64): Likewise.
2603         (tdesc_s390x_vx_linux64): Likewise.
2604         (init_registers_s390x_tevx_linux64): Likewise.
2605         (tdesc_s390x_tevx_linux64): Likewise.
2606         (have_hwcap_s390_vx): New static variable.
2607         (s390_arch_setup): Fill have_hwcap_s390_vx.
2608         (s390_get_thread_area): New function.
2609         (s390_ft_entry_gpr_esa): New const.
2610         (s390_ft_entry_gpr_zarch): New const.
2611         (s390_ft_entry_misc): New const.
2612         (s390_ft_entry_fr): New const.
2613         (s390_ft_entry_vr): New const.
2614         (s390_ft_main_31): New const.
2615         (s390_ft_main_64): New const.
2616         (s390_ft_exit_fr): New const.
2617         (s390_ft_exit_vr): New const.
2618         (s390_ft_exit_misc): New const.
2619         (s390_ft_exit_gpr_esa): New const.
2620         (s390_ft_exit_gpr_zarch): New const.
2621         (append_insns): New function.
2622         (s390_relocate_instruction): New function.
2623         (s390_install_fast_tracepoint_jump_pad): New function.
2624         (s390_get_min_fast_tracepoint_insn_len): New function.
2625         (s390_get_ipa_tdesc_idx): New function.
2626         (struct linux_target_ops): Wire in the above functions.
2627         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2628         * linux-s390-tdesc.h: New file.
2629
2630 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2631
2632         * linux-s390-low.c (s390_supports_tracepoints): New function.
2633         (struct linux_target_ops): Fill supports_tracepoints hook.
2634
2635 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2636
2637         * linux-low.c (lwp_signal_can_be_delivered): New function.
2638         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2639
2640 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2641
2642         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2643         0 if signal is enqueued.  Remove 'signal' from one debugging
2644         message.  Move one debugging message to some lines below.
2645         Remove code setting 'signal' to 0.
2646
2647 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2648
2649         * linux-low.c (linux_low_filter_event): Remove redundant
2650         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2651
2652 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2653
2654         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2655         (struct linux_target_ops): Wire in the above.
2656
2657 2016-03-03  Yao Qi  <yao.qi@linaro.org>
2658
2659         * linux-low.c: Update comments to start_step_over.
2660
2661 2016-03-03  Yao Qi  <yao.qi@linaro.org>
2662
2663         PR server/19736
2664         * linux-low.c (handle_extended_wait): Set child suspended
2665         if event_lwp->bp_reinsert isn't zero.
2666
2667 2016-03-02  Yao Qi  <yao.qi@linaro.org>
2668
2669         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2670         enqueue_pending_signal.
2671
2672 2016-03-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2673
2674         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2675         is actually loaded.
2676
2677 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2678
2679         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2680         (s390_regmap_3264) [!__s390x__]: New global.
2681         (s390_collect_ptrace_register): Skip map entries containing -1.
2682         (s390_supply_ptrace_register): Ditto.
2683         (s390_fill_gprs_high): New function.
2684         (s390_store_gprs_high): New function.
2685         (s390_regsets): Add NT_S390_HIGH_GPRS.
2686         (s390_get_hwcap): Enable on 31-bit.
2687         (have_hwcap_s390_high_gprs): Enable on 31-bit.
2688         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2689         Detect NT_S390_HIGH_GPRS.
2690         (s390_usrregs_info_3264): Enable on 31-bit.
2691         (s390_regs_info): Enable regs_info_3264 on 31-bit.
2692         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2693
2694 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2695
2696         PR gdb/13808
2697         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2698         * configure.srv: Ditto.
2699         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2700         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2701         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2702         (init_registers_amd64_linux): Remove prototype.
2703         (tdesc_amd64_linux): Remove declaration.
2704         (get_ipa_tdesc): New function.
2705         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2706         initialize remaining tdescs.
2707         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2708         (init_registers_i386_linux): Remove prototype.
2709         (tdesc_i386_linux): Remove declaration.
2710         (get_ipa_tdesc): New function.
2711         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2712         initialize remaining tdescs.
2713         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2714         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2715         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2716         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2717         (x86_get_ipa_tdesc_idx): New function.
2718         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2719         * linux-x86-tdesc.h: New file.
2720         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2721         (target_get_ipa_tdesc_idx): New macro.
2722         * tracepoint.c (ipa_tdesc_idx): New macro.
2723         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2724         (symbol_list): Add ipa_tdesc_idx.
2725         (cmd_qtstart): Write ipa_tdesc_idx in the target.
2726         (ipa_tdesc): Remove.
2727         (ipa_tdesc_idx): New variable.
2728         (get_context_regcache): Use get_ipa_tdesc.
2729         (gdb_collect): Ditto.
2730         (gdb_probe): Ditto.
2731         * tracepoint.h (get_ipa_tdesc): New prototype.
2732         (ipa_tdesc): Remove.
2733
2734 2016-02-24  Pedro Alves  <palves@redhat.com>
2735
2736         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2737         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
2738         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2739         Factor out common code between the USE_SIGTRAP_SIGINFO and
2740         !USE_SIGTRAP_SIGINFO blocks.
2741         (linux_low_filter_event): Call save_stop_reason instead of
2742         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2743         Update comments.
2744         (linux_wait_1): Update comments.
2745
2746 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
2747
2748         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2749         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2750         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2751         ppc_insert_point, ppc_remove_point.
2752
2753 2016-02-17  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2754
2755         * linux-s390-low.c (s390_supports_z_point_type): New function.
2756         (struct linux_target_ops): Wire s390_supports_z_point_type in.
2757
2758 2016-02-16  Yao Qi  <yao.qi@linaro.org>
2759
2760         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2761         PC.  Get pc from regcache_read_pc.
2762
2763 2016-02-12  Yao Qi  <yao.qi@linaro.org>
2764
2765         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2766         or linux_get_pc_32bit.
2767         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2768
2769 2016-02-12  Yao Qi  <yao.qi@linaro.org>
2770
2771         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2772         arm_linux_get_next_pcs_fixup.
2773
2774 2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2775
2776         * tracepoint.c (x_tracepoint_action_download): Change
2777         write_inferior_data_ptr to write_inferior_data_pointer.
2778         (cmd_qtstart): Likewise.
2779         (write_inferior_data_ptr): Remove.
2780         (download_agent_expr): Change write_inferior_data_ptr to
2781         write_inferior_data_pointer.
2782         (download_tracepoint_1): Likewise.
2783         (download_tracepoint): Likewise.
2784         (download_trace_state_variables): Likewise.
2785
2786 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
2787             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2788
2789         * tracepoint.c (struct tracepoint_action_ops): Remove.
2790         (struct tracepoint_action): Remove ops.
2791         (m_tracepoint_action_download, r_tracepoint_action_download)
2792         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2793         size and offset accordingly.
2794         (m_tracepoint_action_ops, r_tracepoint_action_ops)
2795         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2796         (tracepoint_action_send, tracepoint_action_download): New functions.
2797         Helpers for trace action handlers.
2798         (add_tracepoint_action): Remove setup actions ops.
2799         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2800
2801 2016-02-10  Yao Qi  <yao.qi@linaro.org>
2802
2803         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2804
2805 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
2806
2807         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2808         to AC_OUTPUT.
2809         * configure: Regenerate.
2810
2811 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
2812
2813         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2814         void * to gdb_byte *.
2815         * linux-low.c (siginfo_fixup): Likewise.
2816         (linux_xfer_siginfo): Likewise.
2817         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2818         Likewise.
2819         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2820
2821 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2822
2823         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2824         to srv_tgtobj.
2825         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2826         to srv_tgtobj.
2827         * linux-x86-low.c [__x86_64__]: Include
2828         "nat/amd64-linux-siginfo.h".
2829         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2830         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2831         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2832         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2833         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2834         (cpt_si_fd, si_timerid, si_overrun): Move from
2835         nat/amd64-linux-siginfo.c.
2836         * Makefile.in (amd64-linux-siginfo.o:): New rule.
2837
2838 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
2839
2840         * server.c (skip_to_semicolon):  Remove.
2841         (process_point_options): Use strchrnul instead of
2842         skip_to_semicolon.
2843
2844 2016-01-26  Yao Qi  <yao.qi@linaro.org>
2845
2846         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2847         * linux-low.c (install_software_single_step_breakpoints): Don't
2848         call regcache_read_pc.
2849         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2850         argument pc.
2851
2852 2016-01-26  Yao Qi  <yao.qi@linaro.org>
2853
2854         * linux-low.c (install_software_single_step_breakpoints): Call
2855         regcache_read_pc instead of get_pc.
2856
2857 2016-01-26  Yao Qi  <yao.qi@linaro.org>
2858
2859         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2860         (unblock_async_io): Rename to ...
2861         (block_unblock_async_io): ... it.  New function.
2862         (enable_async_io): Don't install SIGIO handler.  Unblock it
2863         instead.
2864         (disable_async_io): Don't ignore SIGIO.  Block it instead.
2865         (initialize_async_io): Install SIGIO handler.  Don't call
2866         unblock_async_io.
2867
2868 2016-01-26  Yao Qi  <yao.qi@linaro.org>
2869
2870         * remote-utils.c (getpkt): If the buffer isn't empty, and the
2871         first character is '\003', call *the_target->request_interrupt.
2872
2873 2016-01-25  Yao Qi  <yao.qi@linaro.org>
2874
2875         * remote-utils.c (new_thread_notify): Remove.
2876         (dead_thread_notify): Likewise.
2877         * remote-utils.h (new_thread_notify): Remove declaration.
2878         (dead_thread_notify): Likewise.
2879
2880 2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2881
2882         * gdb.trace/pending.exp: Fix expected message on continue.
2883
2884 2016-01-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2885
2886         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2887         it works properly on big-endian machines where sizeof (CORE_ADDR)
2888         != sizeof (void *).
2889
2890 2016-01-21  Pedro Alves  <palves@redhat.com>
2891
2892         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2893         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2894         * configure: Regenerate.
2895
2896 2016-01-21  Yao Qi  <yao.qi@linaro.org>
2897
2898         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2899         is_thumb and set it according to CPSR saved on the stack.
2900         (get_next_pcs_syscall_next_pc): Pass is_thumb to
2901         arm_sigreturn_next_pc.
2902
2903 2016-01-18  Yao Qi  <yao.qi@linaro.org>
2904
2905         * linux-low.c (linux_set_pc_64bit): New function.
2906         (linux_get_pc_64bit): New function.
2907         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2908         Declare.
2909         * linux-sparc-low.c (debug_threads): Remove declaration.
2910         (sparc_get_pc): Remove.
2911         (the_low_target): Use linux_get_pc_64bit instead of
2912         sparc_get_pc.
2913         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2914         (the_low_target): Use linux_get_pc_64bit and
2915         linux_set_pc_64bit.
2916
2917 2016-01-18  Yao Qi  <yao.qi@linaro.org>
2918
2919         * linux-arm-low.c (debug_threads): Remove declaration.
2920         (arm_get_pc, arm_set_pc): Remove.
2921         (the_low_target): Use linux_get_pc_32bit and
2922         linux_set_pc_32bit.
2923         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2924         (the_low_target): Use linux_get_pc_32bit and
2925         linux_set_pc_32bit.
2926         * linux-cris-low.c (debug_threads): Remove declaration.
2927         (cris_get_pc, cris_set_pc,): Remove.
2928         (the_low_target): Use linux_get_pc_32bit and
2929         linux_set_pc_32bit.
2930         * linux-crisv32-low.c (debug_threads): Remove declaration.
2931         (cris_get_pc, cris_set_pc): Remove.
2932         (the_low_target): Use linux_get_pc_32bit and
2933         linux_set_pc_32bit.
2934         * linux-low.c: Include inttypes.h.
2935         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2936         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2937         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2938         (the_low_target): Use linux_get_pc_32bit and
2939         linux_set_pc_32bit.
2940         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2941         (the_low_target): Use linux_get_pc_32bit and
2942         linux_set_pc_32bit.
2943         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2944         (the_low_target): Use linux_get_pc_32bit and
2945         linux_set_pc_32bit.
2946         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2947         (the_low_target): Use linux_get_pc_32bit and
2948         linux_set_pc_32bit.
2949         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2950         (the_low_target): Use linux_get_pc_32bit and
2951         linux_set_pc_32bit.
2952
2953 2016-01-18  Gary Benson  <gbenson@redhat.com>
2954
2955         * configure.ac (AC_FUNC_FORK): New check.
2956         * config.in: Regenerate.
2957         * configure: Likewise.
2958
2959 2016-01-14  Yao Qi  <yao.qi@linaro.org>
2960
2961         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2962         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2963         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2964         arm_get_next_pcs_ctor.
2965
2966 2016-01-12  Josh Stone  <jistone@redhat.com>
2967             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2968
2969         * inferiors.h: Include "gdb_vecs.h".
2970         (struct process_info): Add syscalls_to_catch.
2971         * inferiors.c (remove_process): Free syscalls_to_catch.
2972         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2973         syscall_return stops.
2974         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2975         * server.c (handle_general_set): Handle QCatchSyscalls.
2976         (handle_query): Report support for QCatchSyscalls.
2977         * target.h (struct target_ops): Add supports_catch_syscall.
2978         (target_supports_catch_syscall): New macro.
2979         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2980         (struct lwp_info): Add syscall_state.
2981         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2982         Maintain syscall_state and syscalls_to_catch across exec.
2983         (get_syscall_trapinfo): New function, proxy to the_low_target.
2984         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2985         (linux_low_filter_event): Toggle syscall_state entry/return for
2986         syscall traps, and set it ignored for all others.
2987         (gdb_catching_syscalls_p): New function.
2988         (gdb_catch_this_syscall_p): New function.
2989         (linux_wait_1): Handle SYSCALL_SIGTRAP.
2990         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2991         (linux_supports_catch_syscall): New function.
2992         (linux_target_ops): Install it.
2993         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2994         (the_low_target): Install it.
2995
2996 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
2997
2998         * acinclude.m4: Include new ../warning.m4 file.
2999         * configure: Regenerated.
3000         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3001
3002 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3003
3004         * ax.c (is_goto_target): Mark static.
3005         * linux-low.c (register_addr): Likewise.
3006         (linux_fetch_registers, linux_store_registers): Likewise.
3007         * mem-break.c (any_persistent_commands): Fix old prototype.
3008         (add_commands_to_breakpoint): Mark static.
3009         * regcache.c (find_register_by_name): Delete unused func.
3010         * remote-utils.c (hex_or_minus_one): Mark static.
3011         * server.c (monitor_show_help): Mark static.
3012         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3013         handle_v_requests): Likewise.
3014
3015 2016-01-12  Pedro Alves  <palves@redhat.com>
3016
3017         Remove use of the registered trademark symbol throughout.
3018
3019 2016-01-08  Yao Qi  <yao.qi@linaro.org>
3020
3021         * remote-utils.c (getpkt): If c is '\003', call target hook
3022         request_interrupt.
3023
3024 2016-01-06  Yao Qi  <yao.qi@linaro.org>
3025
3026         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3027         linux-aarch32-low.c.
3028         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3029         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3030         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3031         (thumb2_breakpoint): Declare.
3032         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3033         linux-aarch32-low.h.
3034         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3035         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3036         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3037
3038 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
3039
3040         * gdbreplay.c (gdbreplay_version): Change copyright year in
3041         version message.
3042         * server.c (gdbserver_version): Likewise.
3043
3044 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
3045
3046         * server.c (crc32_table): Delete.
3047         (crc32): Use libiberty's xcrc32 function.
3048
3049 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3050
3051         * lynx-low.c (lynx_delete_thread_callback): New function.
3052         (lynx_mourn): Properly delete our process and all of its
3053         threads.  Remove call to clear_inferiors.
3054
3055 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3056
3057         * target.c (thread_search_callback): Add check that
3058         the thread_stopped target callback is not NULL before
3059         calling it.
3060
3061 2015-12-21  Yao Qi  <yao.qi@linaro.org>
3062
3063         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3064         arm breakpoint.
3065
3066 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3067
3068         * server.c (handle_query): Call target_supports_software_single_step.
3069
3070 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3071
3072         * linux-low.c (single_step): New function.
3073         (linux_resume_one_lwp_throw): Call single_step.
3074         (start_step_over): Likewise.
3075
3076 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3077
3078         * Makefile.in (SFILES): Append arch/arm-linux.c,
3079         arch/arm-get-next-pcs.c.
3080         (arm-linux.o): New rule.
3081         (arm-get-next-pcs.o): New rule.
3082         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3083         arm-linux.o.
3084         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
3085         to linux-aarch32-low.c.
3086         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3087         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3088         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3089         (thumb2_breakpoint_len): Likewise.
3090         (arm_is_thumb_mode): Make non-static.
3091         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
3092         from linux-aarch32-low.c.
3093         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3094         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3095         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3096         (thumb2_breakpoint_len): Likewise.
3097         (arm_is_thumb_mode): New declaration.
3098         * linux-arm-low.c: Include arch/arm-linux.h
3099         aarch/arm-get-next-pcs.h, sys/syscall.h.
3100         (get_next_pcs_ops): New struct.
3101         (get_next_pcs_addr_bits_remove): New function.
3102         (get_next_pcs_is_thumb): New function.
3103         (get_next_pcs_read_memory_unsigned_integer): Likewise.
3104         (arm_sigreturn_next_pc): Likewise.
3105         (get_next_pcs_syscall_next_pc): Likewise.
3106         (arm_gdbserver_get_next_pcs): Likewise.
3107         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3108         Initialize.
3109         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3110         * server.h: Include gdb_vecs.h.
3111
3112 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3113
3114         * Makefile.in (SFILES): Append common/common-regcache.c.
3115         (OBS): Append common-regcache.o.
3116         (common-regcache.o): New rule.
3117         * regcache.c (init_register_cache): Initialize cache to
3118         REG_UNAVAILABLE.
3119         (regcache_raw_read_unsigned): New function.
3120         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3121         register_status enum.
3122
3123 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3124
3125         * linux-aarch64-low.c (the_low_targets): Rename
3126         breakpoint_reinsert_addr to get_next_pcs.
3127         * linux-arm-low.c (the_low_targets): Likewise.
3128         * linux-bfin-low.c (the_low_targets): Likewise.
3129         * linux-cris-low.c (the_low_targets): Likewise.
3130         * linux-crisv32-low.c (the_low_targets): Likewise.
3131         * linux-low.c (can_software_single_step): Likewise.
3132         (install_software_single_step_breakpoints): New function.
3133         (start_step_over): Use install_software_single_step_breakpoints.
3134         * linux-low.h: New CORE_ADDR vector.
3135         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3136         get_next_pcs.
3137         * linux-mips-low.c (the_low_targets): Likewise.
3138         * linux-nios2-low.c (the_low_targets): Likewise.
3139         * linux-sparc-low.c (the_low_targets): Likewise.
3140
3141 2015-12-17  Pedro Alves  <palves@redhat.com>
3142
3143         * linux-low.c (linux_kill_one_lwp): Remove references to
3144         LinuxThreads.
3145         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
3146         to 'kill'.
3147         (linux_init_signals): Delete.
3148         (initialize_low): Adjust.
3149         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3150
3151 2015-12-16  Pedro Alves  <palves@redhat.com>
3152
3153         * configure.ac (compiler warning flags): When testing a
3154         -Wno-foo option, check whether -Wfoo works instead.
3155         * configure: Regenerate.
3156
3157 2015-12-11  Don Breazeal  <donb@codesourcery.com>
3158
3159         * server.c (process_serial_event): Don't exit from gdbserver
3160         in remote mode if there are still active inferiors.
3161
3162 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3163
3164         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3165         arm_breakpoint_at if the process is 32-bit.
3166
3167 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3168
3169         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3170         arm breakpoint.
3171
3172 2015-12-07  Yao Qi  <yao.qi@linaro.org>
3173
3174         * configure.srv: Append arm.o to srv_tgtobj for
3175         aarch64*-*-linux* target.
3176         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
3177         from linux-arm-low.c.
3178         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3179         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3180         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3181         (thumb2_breakpoint_len): Likewise.
3182         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3183         (arm_breakpoint_kinds): Likewise.
3184         (arm_breakpoint_kind_from_pc): Likewise.
3185         (arm_sw_breakpoint_from_kind): Likewise.
3186         (arm_breakpoint_kind_from_current_state): Likewise.
3187         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3188         (arm_sw_breakpoint_from_kind): Declare.
3189         (arm_breakpoint_kind_from_current_state): Declare.
3190         (arm_breakpoint_at): Declare.
3191         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3192         arm_sw_breakpoint_from_kind if process is 32-bit.
3193         (aarch64_breakpoint_kind_from_pc): New function.
3194         (aarch64_breakpoint_kind_from_current_state): New function.
3195         (the_low_target): Initialize fields breakpoint_kind_from_pc
3196         and breakpoint_kind_from_current_state.
3197         * linux-arm-low.c (arm_breakpoint_kinds): Move to
3198         linux-aarch32-low.c.
3199         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3200         (arm_breakpoint, arm_breakpoint_len): Likewise.
3201         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3202         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3203         (arm_is_thumb_mode): Likewise.
3204         (arm_breakpoint_at): Likewise.
3205         (arm_breakpoint_kind_from_pc): Likewise.
3206         (arm_sw_breakpoint_from_kind): Likewise.
3207         (arm_breakpoint_kind_from_current_state): Likewise.
3208
3209         Revert:
3210         2015-08-04  Yao Qi  <yao.qi@linaro.org>
3211
3212         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3213         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3214         * server.c (extended_protocol): Remove "static".
3215         * server.h (extended_protocol): Declare it.
3216
3217 2015-12-04  Josh Stone  <jistone@redhat.com>
3218
3219         * target.h (struct target_ops) <arch_setup>: Rename to ...
3220         (struct target_ops) <post_create_inferior>: ... this.
3221         (target_arch_setup): Rename to ...
3222         (target_post_create_inferior): ... this, calling post_create_inferior.
3223         * server.c (start_inferior): Update target_arch_setup calls to
3224         target_post_create_inferior.
3225         * linux-low.c (linux_low_ptrace_options): Forward declare.
3226         (linux_arch_setup): Update its comment for general use.
3227         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3228         (struct linux_target_ops): Use linux_post_create_inferior.
3229         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3230         to post_create_inferior.
3231         * nto-low.c (struct nto_target_ops): Likewise.
3232         * spu-low.c (struct spu_target_ops): Likewise.
3233         * win32-low.c (struct win32_target_ops): Likewise.
3234
3235 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3236
3237         * linux-arm-low.c: Remove duplicate arch/arm.h include.
3238
3239 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3240
3241         * linux-arm-low.c (arm_reinsert_addr): Remove function.
3242         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3243         * linux-cris-low.c (cris_reinsert_addr> Remove function.
3244         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3245         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3246         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3247         * linux-mips-low.c (mips_reinsert_addr): Remove function.
3248         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3249         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3250         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3251         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3252         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3253
3254 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3255
3256         * linux-low.c (linux_look_up_symbols): Don't call
3257         linux_supports_traceclone.
3258         * linux-low.h (thread_db_init): Remove use_events argument.
3259         * thread-db.c (thread_db_use_event): Remove global variable.
3260         (struct thread_db) <td_thr_event_enable_p>: Remove field.
3261         (struct thread_db) <td_create_bp>: Remove field.
3262         (thread_db_create_event): Remove function.
3263         (thread_db_enable_reporting): Likewise.
3264         (find_one_thread): Don't check for thread_db_use_events.
3265         (attach_thread): Likewise.
3266         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3267         (try_thread_db_load_1): Don't check for thread_db_use_events.
3268         (thread_db_init): Remove use_events argument and thread events
3269         handling.
3270         (remove_thread_event_breakpoints): Remove function.
3271         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3272
3273 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3274
3275         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3276         New function.
3277         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3278         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3279         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3280         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3281         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3282         Initialize.
3283         * linux-crisv32-low.c (cris_supports_hardware_single_step):
3284         New function.
3285         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3286         * linux-low.c (can_hardware_single_step): Use
3287         supports_hardware_single_step.
3288         (can_software_single_step): New function.
3289         (start_step_over): Call can_software_single_step.
3290         (linux_supports_hardware_single_step): New function.
3291         (struct target_ops) <supports_software_single_step>: Initialize.
3292         * linux-low.h (struct linux_target_ops)
3293         <supports_hardware_single_step>: Initialize.
3294         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3295         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3296         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3297         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3298         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3299         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3300         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3301         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3302         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3303         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3304         Initialize.
3305         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3306         (struct linux_target_ops) <tile_supports_hardware_single_step>:
3307         Initialize.
3308         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3309         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3310         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3311         New function.
3312         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3313         * target.h (struct target_ops): <supports_software_single_step>:
3314         New field.
3315         (target_supports_software_single_step): New macro.
3316
3317 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3318
3319         * linux-low.c (linux_wait_1): Fix pc advance condition.
3320         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3321         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3322
3323 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3324
3325         * linux-arm-low.c (arm_is_thumb_mode): New function.
3326         (arm_breakpoint_at): Use arm_is_thumb_mode.
3327         (arm_breakpoint_kind_from_current_state): New function.
3328         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3329         Initialize.
3330         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3331         (linux_breakpoint_kind_from_current_state): New function.
3332         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3333         * linux-low.h (struct linux_target_ops)
3334         <breakpoint_kind_from_current_state>: New field.
3335         * target.h (struct target_ops): Likewise.
3336         (target_breakpoint_kind_from_current_state): New macro.
3337
3338 2015-11-30  Pedro Alves  <palves@redhat.com>
3339
3340         * linux-low.c (linux_resume): Wake up the event loop before
3341         returning.
3342
3343 2015-11-30  Pedro Alves  <palves@redhat.com>
3344
3345         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3346         check.
3347         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3348         to -1.
3349         * target.c (struct thread_search): New structure.
3350         (thread_search_callback): New function.
3351         (prev_general_thread): New global.
3352         (prepare_to_access_memory, done_accessing_memory): New functions.
3353         * target.h (prepare_to_access_memory, done_accessing_memory):
3354         Replace macros with function declarations.
3355
3356 2015-11-30  Pedro Alves  <palves@redhat.com>
3357
3358         PR 14618
3359         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3360         report TARGET_WAITKIND_NO_RESUMED.
3361         * remote-utils.c (prepare_resume_reply): Handle
3362         TARGET_WAITKIND_NO_RESUMED.
3363         * server.c (report_no_resumed): New global.
3364         (handle_query) <qSupported>: Handle "no-resumed+".  Report
3365         "no-resumed+" support.
3366         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3367         return error if the client doesn't support no-resumed events.
3368         (push_stop_notification): New function.
3369         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
3370         events if the client supports them.
3371
3372 2015-11-30  Pedro Alves  <palves@redhat.com>
3373
3374         * linux-low.c (thread_still_has_status_pending_p): Don't check
3375         vCont;t here.
3376         (lwp_resumed): New function.
3377         (status_pending_p_callback): Return early if the LWP is not
3378         supposed to be resumed.
3379
3380 2015-11-30  Pedro Alves  <palves@redhat.com>
3381
3382         * linux-low.c (handle_extended_wait): Assert that the LWP's
3383         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
3384         thread create events, leave the new child's status pending.
3385         (linux_low_filter_event): If GDB wants to hear about thread exit
3386         events, leave the LWP marked dead and don't delete it.
3387         (linux_wait_for_event_filtered): Don't check for thread exit.
3388         (filter_exit_event): New function.
3389         (linux_wait_1): Use it, when returning an exit event.
3390         (linux_resume_one_lwp_throw): Assert that the LWP's
3391         waitstatus is TARGET_WAITKIND_IGNORE.
3392         * remote-utils.c (prepare_resume_reply): Handle
3393         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3394         * server.c (report_thread_events): New global.
3395         (handle_general_set): Handle QThreadEvents.
3396         (handle_query) <qSupported>: Handle and report QThreadEvents+;
3397         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3398         TARGET_WAITKIND_THREAD_EXITED.
3399         * server.h (report_thread_events): Declare.
3400
3401 2015-11-30  Pedro Alves  <palves@redhat.com>
3402
3403         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3404         the thread's last_resume_kind was resume_stop.
3405
3406 2015-11-30  Pedro Alves  <palves@redhat.com>
3407
3408         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3409         before returning.
3410
3411 2015-11-30  Pedro Alves  <palves@redhat.com>
3412
3413         * server.c (handle_v_requests): Handle vCtrlC.
3414
3415 2015-11-30  Pedro Alves  <palves@redhat.com>
3416
3417         * gdbthread.h (find_any_thread_of_pid): Declare.
3418         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3419         functions.
3420         * server.c (handle_query): If current_thread is NULL, look for
3421         another thread of the selected process.
3422
3423 2015-11-26  Daniel Colascione  <dancol@dancol.org>
3424             Simon Marchi  <simon.marchi@ericsson.com>
3425
3426         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3427         * server.c (handle_qxfer_threads_worker): Refactor to include thread
3428         name in reply.
3429         * target.h (struct target_ops) <thread_name>: New field.
3430         (target_thread_name): New macro.
3431
3432 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
3433
3434         * regcache.h (regcache_invalidate_pid): Add declaration.
3435         * regcache.c (regcache_invalidate_pid): New function, extracted
3436         from regcache_invalidate.
3437         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3438         Add trivial documentation comment.
3439         * lynx-low.c: Use regcache_invalidate_pid instead of
3440         regcache_invalidate.
3441
3442 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
3443
3444         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3445         and Elf64_auxv_t if the target is Android.
3446
3447 2015-11-22  Doug Evans  <xdje42@gmail.com>
3448
3449         * target.h: #include <sys/types.h>.
3450
3451 2015-11-19  Pedro Alves  <palves@redhat.com>
3452
3453         * linux-low.c (linux_process_qsupported): Change prototype.
3454         Adjust.
3455         * linux-low.h (struct linux_target_ops) <process_qsupported>:
3456         Change prototype.
3457         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3458         and adjust to loop over all features.
3459         * server.c (handle_query) <qSupported>: Adjust to call
3460         target_process_qsupported once, passing it a vector of unprocessed
3461         features.
3462         * target.h (struct target_ops) <process_qsupported>: Change
3463         prototype.
3464         (target_process_qsupported): Adjust.
3465
3466 2015-11-19  Pedro Alves  <palves@redhat.com>
3467
3468         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3469         mode.
3470         * configure: Regenerate.
3471
3472 2015-11-19  Pedro Alves  <palves@redhat.com>
3473
3474         * configure: Regenerate.
3475
3476 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3477
3478         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3479         type to uint32_t.
3480
3481 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3482
3483         * linux-aarch64-low.c (enum aarch64_operand_type): New.
3484         (struct aarch64_operand): Move enum out.
3485
3486 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3487
3488         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3489         struct user_fpsimd_state *.
3490         (aarch64_store_fpregset): Likewise.
3491
3492 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3493
3494         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3495         struct user_pt_regs *.
3496         (aarch64_store_gregset): Likewise.
3497
3498 2015-11-18  Pedro Alves  <palves@redhat.com>
3499
3500         * Makefile.in (all_object_files): Add $IPA_OBJS.
3501
3502 2015-11-17  Pedro Alves  <palves@redhat.com>
3503
3504         * win32-low.c (win32_resume): Use gdb_signal_from_host,
3505         GDB_SIGNAL_0 and gdb_signal_to_string.
3506
3507 2015-11-17  Pedro Alves  <palves@redhat.com>
3508
3509         * win32-low.c (handle_output_debug_string): Remove parameter.
3510         (win32_kill): Remove our_status local and adjust call to
3511         handle_output_debug_string.
3512         (get_child_debug_event): Adjust call to
3513         handle_output_debug_string.
3514
3515 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3516
3517         * linux-mips-low.c (mips_fill_gregset): Add cast.
3518         (mips_store_gregset): Likewise.
3519         (mips_fill_fpregset): Likewise.
3520         (mips_store_fpregset): Likewise.
3521
3522 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3523
3524         * linux-mips-low.c (mips_add_watchpoint): Rename private to
3525         priv.
3526
3527 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3528
3529         * linux-mips-low.c (mips_linux_new_thread): Change type of
3530         watch_type to enum target_hw_bp_type.
3531
3532 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3533
3534                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3535                 Change return type to arm_hwbp_type.
3536
3537 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3538
3539         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3540         (arm_store_gregset): Likewise.
3541         * linux-arm-low.c (arm_get_hwcap): Likewise.
3542         (arm_read_description): Likewise.
3543
3544 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3545
3546         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3547
3548 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3549
3550         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3551         (ppc_fill_vsxregset): Likewise.
3552         (ppc_store_vsxregset): Likewise.
3553         (ppc_fill_vrregset): Likewise.
3554         (ppc_store_vrregset): Likewise.
3555         (ppc_fill_evrregset): Likewise.
3556         (ppc_store_evrregset): Likewise.
3557
3558 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3559
3560         * linux-ppc-low.c (ppc_usrregs_info): Remove
3561         forward-declaration.
3562         (ppc_arch_setup): Move lower in file.
3563
3564 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
3565
3566         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3567         (ps_pdwrite): Likewise.
3568
3569 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3570
3571         * linux-arm-low.c (arm_new_thread): Move pointer dereference
3572         to after assert checks.
3573
3574 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3575
3576         * proc-service.c (ps_pdread): Add/adjust casts.
3577         (ps_pdwrite): Add/adjust casts.
3578
3579 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
3580
3581         * server.c (handle_search_memory_1): Cast return value of
3582         memmem.
3583
3584 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
3585
3586         * server.c (write_qxfer_response): Change type of data to
3587         gdb_byte *.
3588
3589 2015-10-29  Pedro Alves  <palves@redhat.com>
3590
3591         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3592
3593 2015-10-29  Pedro Alves  <palves@redhat.com>
3594
3595         * tracepoint.c (clear_installed_tracepoints): Add casts.
3596
3597 2015-10-29  Pedro Alves  <palves@redhat.com>
3598
3599         * server.c (handle_v_cont, process_serial_event): Add enum
3600         gdb_signal casts to signal parsing code.
3601
3602 2015-10-29  Pedro Alves  <palves@redhat.com>
3603
3604         * linux-low.h (NULL_REGSET): Define.
3605         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3606         * linux-arm-low.c (arm_regsets): Likewise.
3607         * linux-crisv32-low.c (cris_regsets): Likewise.
3608         * linux-m68k-low.c (m68k_regsets): Likewise.
3609         * linux-mips-low.c (mips_regsets): Likewise.
3610         * linux-nios2-low.c (nios2_regsets): Likewise.
3611         * linux-ppc-low.c (ppc_regsets): Likewise.
3612         * linux-s390-low.c (s390_regsets): Likewise.
3613         * linux-sh-low.c (sh_regsets): Likewise.
3614         * linux-sparc-low.c (sparc_regsets): Likewise.
3615         * linux-tic6x-low.c (tic6x_regsets): Likewise.
3616         * linux-tile-low.c (tile_regsets): Likewise.
3617         * linux-x86-low.c (x86_regsets): Likewise.
3618         * linux-xtensa-low.c (xtensa_regsets): Likewise.
3619
3620 2015-10-29  Pedro Alves  <palves@redhat.com>
3621
3622         * linux-low.h (NULL_REGSET): Define.
3623         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3624         * linux-arm-low.c (arm_regsets): Likewise.
3625         * linux-crisv32-low.c (cris_regsets): Likewise.
3626         * linux-m68k-low.c (m68k_regsets): Likewise.
3627         * linux-mips-low.c (mips_regsets): Likewise.
3628         * linux-nios2-low.c (nios2_regsets): Likewise.
3629         * linux-ppc-low.c (ppc_regsets): Likewise.
3630         * linux-s390-low.c (s390_regsets): Likewise.
3631         * linux-sh-low.c (sh_regsets): Likewise.
3632         * linux-sparc-low.c (sparc_regsets): Likewise.
3633         * linux-tic6x-low.c (tic6x_regsets): Likewise.
3634         * linux-tile-low.c (tile_regsets): Likewise.
3635         * linux-x86-low.c (x86_regsets): Likewise.
3636         * linux-xtensa-low.c (xtensa_regsets): Likewise.
3637
3638 2015-10-26  Doug Evans  <dje@google.com>
3639
3640         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3641
3642 2015-10-26  Doug Evans  <dje@google.com>
3643
3644         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3645
3646 2015-10-26  Doug Evans  <dje@google.com>
3647
3648         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3649         for debug_printf.
3650         (attach_thread, find_new_threads_callback): Ditto.
3651
3652 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3653
3654         * mem-break.h (set_breakpoint_data): Remove.
3655
3656 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3657
3658         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3659         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3660         (initialize_low): Remove set_breakpoint_data call.
3661         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3662         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3663         (initialize_low): Remove set_breakpoint_data call.
3664         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3665         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3666         (initialize_low): Remove set_breakpoint_data call.
3667
3668 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3669
3670         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3671         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3672         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3673         * target.h (target_breakpoint_kind_from_pc): New macro.
3674
3675 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3676
3677         * linux-low.c (default_breakpoint_kind_from_pc): New function.
3678         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3679         the default breakpoint kind.
3680
3681 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3682
3683         * linux-arm-low.c (arm_supports_z_point_type): Add software
3684         breakpoint support.
3685
3686 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3687
3688         * linux-arm-low.c: Refactor breakpoint definitions.
3689         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3690         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3691
3692 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3693
3694         * Makefile.in: Add arm.c/o.
3695         * configure.srv: Likewise.
3696         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3697         (arm_breakpoint_kind_from_pc): New function.
3698         (arm_sw_breakpoint_from_kind): Return proper kind.
3699         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3700
3701 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3702
3703         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3704         removal.
3705         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3706         (struct raw_breakpoint) <size>: Remove.
3707         (struct raw_breakpoint) <kind>: Add.
3708         (bp_size): New function.
3709         (bp_opcode): Likewise.
3710         (find_raw_breakpoint_at): Adjust for kind.
3711         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3712         (remove_memory_breakpoint): Adjust for kind call bp_size.
3713         (set_raw_breakpoint_at): Adjust for kind.
3714         (set_breakpoint): Likewise.
3715         (set_breakpoint_at): Call breakpoint_kind_from_pc.
3716         (delete_raw_breakpoint): Adjust for kind.
3717         (delete_breakpoint): Likewise.
3718         (find_gdb_breakpoint): Likewise.
3719         (set_gdb_breakpoint_1): Likewise.
3720         (set_gdb_breakpoint): Likewise.
3721         (delete_gdb_breakpoint_1): Likewise.
3722         (delete_gdb_breakpoint): Likewise.
3723         (uninsert_raw_breakpoint): Likewise.
3724         (reinsert_raw_breakpoint): Likewise.
3725         (set_breakpoint_data): Remove.
3726         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3727         (check_mem_read): Adjust for kind call bp_size.
3728         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3729         (clone_one_breakpoint): Adjust for kind.
3730         * mem-break.h (set_gdb_breakpoint): Likewise.
3731         (delete_gdb_breakpoint): Likewise.
3732         * server.c (process_serial_event): Likewise.
3733
3734 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3735
3736         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3737         (struct linux_target_ops) <breakpoint>: Remove.
3738         (struct linux_target_ops) <breakpoint_len>: Remove.
3739         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3740         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3741         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3742         (arm_sw_breakpoint_from_kind): New function.
3743         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3744         (struct linux_target_ops) <breakpoint>: Remove.
3745         (struct linux_target_ops) <breakpoint_len>: Remove.
3746         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3747         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3748         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3749         (struct linux_target_ops) <breakpoint>: Remove.
3750         (struct linux_target_ops) <breakpoint_len>: Remove.
3751         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3752         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3753         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3754         (struct linux_target_ops) <breakpoint>: Remove.
3755         (struct linux_target_ops) <breakpoint_len>: Remove.
3756         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3757         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3758         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3759         and sw_breakpoint_from_kind to increment the pc.
3760         (linux_breakpoint_kind_from_pc): New function.
3761         (linux_sw_breakpoint_from_kind): New function.
3762         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3763         (initialize_low): Call breakpoint_kind_from_pc and
3764         sw_breakpoint_from_kind to replace breakpoint_data/len.
3765         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3766         New field.
3767         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3768         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3769         (struct linux_target_ops) <breakpoint>: Remove.
3770         (struct linux_target_ops) <breakpoint_len>: Remove.
3771         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3772         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3773         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3774         (struct linux_target_ops) <breakpoint>: Remove.
3775         (struct linux_target_ops) <breakpoint_len>: Remove.
3776         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3777         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3778         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3779         (struct linux_target_ops) <breakpoint>: Remove.
3780         (struct linux_target_ops) <breakpoint_len>: Remove.
3781         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3782         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3783         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3784         (struct linux_target_ops) <breakpoint>: Remove.
3785         (struct linux_target_ops) <breakpoint_len>: Remove.
3786         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3787         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3788         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3789         (struct linux_target_ops) <breakpoint>: Remove.
3790         (struct linux_target_ops) <breakpoint_len>: Remove.
3791         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3792         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3793         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3794         (struct linux_target_ops) <breakpoint>: Remove.
3795         (struct linux_target_ops) <breakpoint_len>: Remove.
3796         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3797         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3798         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3799         (struct linux_target_ops) <breakpoint>: Remove.
3800         (struct linux_target_ops) <breakpoint_len>: Remove.
3801         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3802         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3803         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3804         (struct linux_target_ops) <breakpoint>: Remove.
3805         (struct linux_target_ops) <breakpoint_len>: Remove.
3806         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3807         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3808         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3809         (struct linux_target_ops) <breakpoint>: Remove.
3810         (struct linux_target_ops) <breakpoint_len>: Remove.
3811         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3812         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3813         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3814         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3815         (struct linux_target_ops) <breakpoint>: Remove.
3816         (struct linux_target_ops) <breakpoint_len>: Remove.
3817         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3818         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3819         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3820         (struct linux_target_ops) <breakpoint>: Remove.
3821         (struct linux_target_ops) <breakpoint_len>: Remove.
3822         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3823         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3824
3825 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3826
3827         * linux-cris-low.c (cris_get_pc): Remove void arg.
3828
3829 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
3830
3831         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3832         variable name.
3833
3834 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
3835
3836         * inferiors.c (thread_pid_matches_callback): New function.
3837         (find_thread_process): New function.
3838         (remove_thread): Reset current_thread.
3839         (remove_process): Assert threads have been removed first.
3840
3841 2015-10-15  Yao Qi  <yao.qi@linaro.org>
3842
3843         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3844         if it is 3.
3845         (aarch64_remove_point): Likewise.
3846         * regcache.c (regcache_register_size): New function.
3847
3848 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3849
3850         * linux-aarch64-low.c: Update all callers as emit_load_store
3851         is renamed to aarch64_emit_load_store.
3852
3853 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3854
3855         * linux-aarch64-low.c: Update all callers of function renaming
3856         from emit_insn to aarch64_emit_insn.
3857
3858 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3859
3860         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3861         arch/aarch64-insn.h.
3862         (struct aarch64_memory_operand): Likewise.
3863         (ENCODE): Likewise.
3864         (emit_insn): Move to arch/aarch64-insn.c.
3865         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3866         (emit_load_store): Move to arch/aarch64-insn.c.
3867         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3868         (can_encode_int32): Remove.
3869
3870 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3871
3872         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3873         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3874         (aarch64_relocate_instruction): Likewise.
3875         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3876         (struct aarch64_insn_visitor): Likewise.
3877
3878 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3879
3880         * linux-aarch64-low.c (struct aarch64_insn_data): New.
3881         (struct aarch64_insn_visitor): New.
3882         (struct aarch64_insn_relocation_data): New.
3883         (aarch64_ftrace_insn_reloc_b): New function.
3884         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3885         (aarch64_ftrace_insn_reloc_cb): Likewise.
3886         (aarch64_ftrace_insn_reloc_tb): Likewise.
3887         (aarch64_ftrace_insn_reloc_adr): Likewise.
3888         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3889         (aarch64_ftrace_insn_reloc_others): Likewise.
3890         (visitor): New.
3891         (aarch64_relocate_instruction): Use visitor.
3892
3893 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3894
3895         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3896         int.  Add argument buf.
3897         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3898         aarch64_relocate_instruction.
3899
3900 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3901
3902         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3903         argument insn.  Remove local variable insn.  Don't call
3904         target_read_uint32.
3905         (aarch64_install_fast_tracepoint_jump_pad): Call
3906         target_read_uint32.
3907
3908 2015-09-30  Yao Qi  <yao.qi@linaro.org>
3909
3910         * linux-aarch64-low.c (emit_movk): Shorten a long line.
3911         (emit_load_store_pair): Likewise.
3912
3913 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
3914
3915         * dll.c (match_dll): Add cast(s).
3916         (unloaded_dll): Likewise.
3917         * linux-low.c (second_thread_of_pid_p): Likewise.
3918         (delete_lwp_callback): Likewise.
3919         (count_events_callback): Likewise.
3920         (select_event_lwp_callback): Likewise.
3921         (linux_set_resume_request): Likewise.
3922         * server.c (accumulate_file_name_length): Likewise.
3923         (emit_dll_description): Likewise.
3924         (handle_qxfer_threads_worker): Likewise.
3925         (visit_actioned_threads): Likewise.
3926         * thread-db.c (any_thread_of): Likewise.
3927         * tracepoint.c (same_process_p): Likewise.
3928         (match_blocktype): Likewise.
3929         (build_traceframe_info_xml): Likewise.
3930
3931 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
3932
3933         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3934         assignment.
3935         (gdb_unparse_agent_expr): Likewise.
3936         * hostio.c (require_data): Likewise.
3937         (handle_pread): Likewise.
3938         * linux-low.c (disable_regset): Likewise.
3939         (fetch_register): Likewise.
3940         (store_register): Likewise.
3941         (get_dynamic): Likewise.
3942         (linux_qxfer_libraries_svr4): Likewise.
3943         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3944         (set_fast_tracepoint_jump): Likewise.
3945         (uninsert_fast_tracepoint_jumps_at): Likewise.
3946         (reinsert_fast_tracepoint_jumps_at): Likewise.
3947         (validate_inserted_breakpoint): Likewise.
3948         (clone_agent_expr): Likewise.
3949         * regcache.c (init_register_cache): Likewise.
3950         * remote-utils.c (putpkt_binary_1): Likewise.
3951         (decode_M_packet): Likewise.
3952         (decode_X_packet): Likewise.
3953         (look_up_one_symbol): Likewise.
3954         (relocate_instruction): Likewise.
3955         (monitor_output): Likewise.
3956         * server.c (handle_search_memory): Likewise.
3957         (handle_qxfer_exec_file): Likewise.
3958         (handle_qxfer_libraries): Likewise.
3959         (handle_qxfer): Likewise.
3960         (handle_query): Likewise.
3961         (handle_v_cont): Likewise.
3962         (handle_v_run): Likewise.
3963         (captured_main): Likewise.
3964         * target.c (write_inferior_memory): Likewise.
3965         * thread-db.c (try_thread_db_load_from_dir): Likewise.
3966         * tracepoint.c (init_trace_buffer): Likewise.
3967         (add_tracepoint_action): Likewise.
3968         (add_traceframe): Likewise.
3969         (add_traceframe_block): Likewise.
3970         (cmd_qtdpsrc): Likewise.
3971         (cmd_qtdv): Likewise.
3972         (cmd_qtstatus): Likewise.
3973         (response_source): Likewise.
3974         (response_tsv): Likewise.
3975         (cmd_qtnotes): Likewise.
3976         (gdb_collect): Likewise.
3977         (initialize_tracepoint): Likewise.
3978
3979 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
3980
3981         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3982         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3983         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3984         <NOP>: New.
3985         (enum aarch64_condition_codes): New enum.
3986         (w0): New static global.
3987         (fp): Likewise.
3988         (lr): Likewise.
3989         (struct aarch64_memory_operand) <type>: New
3990         MEMORY_OPERAND_POSTINDEX type.
3991         (postindex_memory_operand): New helper function.
3992         (emit_ret): New function.
3993         (emit_load_store_pair): New function, factored out of emit_stp
3994         with support for MEMORY_OPERAND_POSTINDEX.
3995         (emit_stp): Rewrite using emit_load_store_pair.
3996         (emit_ldp): New function.
3997         (emit_load_store): Likewise.
3998         (emit_ldr): Mention post-index instruction in comment.
3999         (emit_ldrh): New function.
4000         (emit_ldrb): New function.
4001         (emit_ldrsw): Mention post-index instruction in comment.
4002         (emit_str): Likewise.
4003         (emit_subs): New function.
4004         (emit_cmp): Likewise.
4005         (emit_and): Likewise.
4006         (emit_orr): Likewise.
4007         (emit_orn): Likewise.
4008         (emit_eor): Likewise.
4009         (emit_mvn): Likewise.
4010         (emit_lslv): Likewise.
4011         (emit_lsrv): Likewise.
4012         (emit_asrv): Likewise.
4013         (emit_mul): Likewise.
4014         (emit_sbfm): Likewise.
4015         (emit_sbfx): Likewise.
4016         (emit_ubfm): Likewise.
4017         (emit_ubfx): Likewise.
4018         (emit_csinc): Likewise.
4019         (emit_cset): Likewise.
4020         (emit_nop): Likewise.
4021         (emit_ops_insns): New helper function.
4022         (emit_pop): Likewise.
4023         (emit_push): Likewise.
4024         (aarch64_emit_prologue): New function.
4025         (aarch64_emit_epilogue): Likewise.
4026         (aarch64_emit_add): Likewise.
4027         (aarch64_emit_sub): Likewise.
4028         (aarch64_emit_mul): Likewise.
4029         (aarch64_emit_lsh): Likewise.
4030         (aarch64_emit_rsh_signed): Likewise.
4031         (aarch64_emit_rsh_unsigned): Likewise.
4032         (aarch64_emit_ext): Likewise.
4033         (aarch64_emit_log_not): Likewise.
4034         (aarch64_emit_bit_and): Likewise.
4035         (aarch64_emit_bit_or): Likewise.
4036         (aarch64_emit_bit_xor): Likewise.
4037         (aarch64_emit_bit_not): Likewise.
4038         (aarch64_emit_equal): Likewise.
4039         (aarch64_emit_less_signed): Likewise.
4040         (aarch64_emit_less_unsigned): Likewise.
4041         (aarch64_emit_ref): Likewise.
4042         (aarch64_emit_if_goto): Likewise.
4043         (aarch64_emit_goto): Likewise.
4044         (aarch64_write_goto_address): Likewise.
4045         (aarch64_emit_const): Likewise.
4046         (aarch64_emit_call): Likewise.
4047         (aarch64_emit_reg): Likewise.
4048         (aarch64_emit_pop): Likewise.
4049         (aarch64_emit_stack_flush): Likewise.
4050         (aarch64_emit_zero_ext): Likewise.
4051         (aarch64_emit_swap): Likewise.
4052         (aarch64_emit_stack_adjust): Likewise.
4053         (aarch64_emit_int_call_1): Likewise.
4054         (aarch64_emit_void_call_2): Likewise.
4055         (aarch64_emit_eq_goto): Likewise.
4056         (aarch64_emit_ne_goto): Likewise.
4057         (aarch64_emit_lt_goto): Likewise.
4058         (aarch64_emit_le_goto): Likewise.
4059         (aarch64_emit_gt_goto): Likewise.
4060         (aarch64_emit_ge_got): Likewise.
4061         (aarch64_emit_ops_impl): New static global variable.
4062         (aarch64_emit_ops): New target function, return
4063         &aarch64_emit_ops_impl.
4064         (struct linux_target_ops): Install it.
4065
4066 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4067
4068         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4069         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4070         aarch64-ipa.o.
4071         * linux-aarch64-ipa.c: New file.
4072         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4073         and endian.h.
4074         (aarch64_get_thread_area): New target method.
4075         (extract_signed_bitfield): New helper function.
4076         (aarch64_decode_ldr_literal): New function.
4077         (enum aarch64_opcodes): New enum.
4078         (struct aarch64_register): New struct.
4079         (struct aarch64_operand): New struct.
4080         (x0): New static global.
4081         (x1): Likewise.
4082         (x2): Likewise.
4083         (x3): Likewise.
4084         (x4): Likewise.
4085         (w2): Likewise.
4086         (ip0): Likewise.
4087         (sp): Likewise.
4088         (xzr): Likewise.
4089         (aarch64_register): New helper function.
4090         (register_operand): Likewise.
4091         (immediate_operand): Likewise.
4092         (struct aarch64_memory_operand): New struct.
4093         (offset_memory_operand): New helper function.
4094         (preindex_memory_operand): Likewise.
4095         (enum aarch64_system_control_registers): New enum.
4096         (ENCODE): New macro.
4097         (emit_insn): New helper function.
4098         (emit_b): New function.
4099         (emit_bcond): Likewise.
4100         (emit_cb): Likewise.
4101         (emit_tb): Likewise.
4102         (emit_blr): Likewise.
4103         (emit_stp): Likewise.
4104         (emit_ldp_q_offset): Likewise.
4105         (emit_stp_q_offset): Likewise.
4106         (emit_load_store): Likewise.
4107         (emit_ldr): Likewise.
4108         (emit_ldrsw): Likewise.
4109         (emit_str): Likewise.
4110         (emit_ldaxr): Likewise.
4111         (emit_stxr): Likewise.
4112         (emit_stlr): Likewise.
4113         (emit_data_processing_reg): Likewise.
4114         (emit_data_processing): Likewise.
4115         (emit_add): Likewise.
4116         (emit_sub): Likewise.
4117         (emit_mov): Likewise.
4118         (emit_movk): Likewise.
4119         (emit_mov_addr): Likewise.
4120         (emit_mrs): Likewise.
4121         (emit_msr): Likewise.
4122         (emit_sevl): Likewise.
4123         (emit_wfe): Likewise.
4124         (append_insns): Likewise.
4125         (can_encode_int32_in): New helper function.
4126         (aarch64_relocate_instruction): New function.
4127         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4128         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4129         (struct linux_target_ops): Install aarch64_get_thread_area,
4130         aarch64_install_fast_tracepoint_jump_pad and
4131         aarch64_get_min_fast_tracepoint_insn_len.
4132
4133 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4134
4135         * Makefile.in (aarch64-insn.o): New rule.
4136         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4137
4138 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4139
4140         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4141
4142 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4143
4144         * tracepoint.c (max_jump_pad_size): Remove.
4145
4146 2015-09-18  Yao Qi  <yao.qi@linaro.org>
4147
4148         * linux-aarch64-low.c: Don't include sys/uio.h.
4149         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4150
4151 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
4152
4153         * tracepoint.c (eval_result_type): Change prototype.
4154         (condition_true_at_tracepoint): Fix argument to compiled_cond.
4155
4156 2015-09-15  Pedro Alves  <palves@redhat.com>
4157
4158         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4159         Check whether to report exec events instead of checking whether
4160         multiprocess is enabled.
4161
4162 2015-09-15  Pedro Alves  <palves@redhat.com>
4163
4164         PR remote/18965
4165         * remote-utils.c (prepare_resume_reply): Merge
4166         TARGET_WAITKIND_VFORK_DONE switch case with the
4167         TARGET_WAITKIND_FORKED case.
4168
4169 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4170
4171         * server.c (handle_query): Check string comparison using
4172         "else if" instead of "if".
4173
4174 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4175
4176         * server.c (vCont_supported): New global variable.
4177         (handle_query): Set vCont_supported to 1 if "vContSupported+"
4178         matches.  Append ";vContSupported+" to own_buf.
4179         (handle_v_requests): Append ";s;S" to own_buf if target supports
4180         hardware single step or vCont_supported is false.
4181         (capture_main): Set vCont_supported to zero.
4182
4183 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4184
4185         * linux-low.c (linux_supports_conditional_breakpoints): Rename
4186         it to ...
4187         (linux_supports_hardware_single_step): ... New function.
4188         (linux_target_ops): Update.
4189         * lynx-low.c (lynx_target_ops): Set field
4190         supports_hardware_single_step to target_can_do_hardware_single_step.
4191         * nto-low.c (nto_target_ops): Likewise.
4192         * spu-low.c (spu_target_ops): Likewise.
4193         * win32-low.c (win32_target_ops): Likewise.
4194         * target.c (target_can_do_hardware_single_step): New function.
4195         * target.h (struct target_ops) <supports_conditional_breakpoints>:
4196         Remove.  <supports_hardware_single_step>: New field.
4197         (target_supports_conditional_breakpoints): Remove.
4198         (target_supports_hardware_single_step): New macro.
4199         (target_can_do_hardware_single_step): Declare.
4200         * server.c (handle_query): Use target_supports_hardware_single_step
4201         instead of target_supports_conditional_breakpoints.
4202
4203 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4204
4205         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4206         function.
4207         (struct linux_target_ops the_low_target): Install
4208         aarch64_linux_siginfo_fixup.
4209
4210 2015-09-11  Don Breazeal  <donb@codesourcery.com>
4211             Luis Machado  <lgustavo@codesourcery.com>
4212
4213         * linux-low.c (linux_mourn): Static declaration.
4214         (linux_arch_setup): Move in front of
4215         handle_extended_wait.
4216         (linux_arch_setup_thread): New function.
4217         (handle_extended_wait): Handle exec events.  Call
4218         linux_arch_setup_thread.  Make event_lwp argument a
4219         pointer-to-a-pointer.
4220         (check_zombie_leaders): Do not check stopped threads.
4221         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4222         (linux_low_filter_event): Add lwp and thread for exec'ing
4223         non-leader thread if leader thread has been deleted.
4224         Refactor code into linux_arch_setup_thread and call it.
4225         Pass child lwp pointer by reference to handle_extended_wait.
4226         (linux_wait_for_event_filtered): Update comment.
4227         (linux_wait_1): Prevent clobbering exec event status.
4228         (linux_supports_exec_events): New function.
4229         (linux_target_ops) <supports_exec_events>: Initialize new member.
4230         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4231         new member.
4232         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4233         * server.c (report_exec_events): New global variable.
4234         (handle_query): Handle qSupported query for exec-events feature.
4235         (captured_main): Initialize report_exec_events.
4236         * server.h (report_exec_events): Declare new global variable.
4237         * target.h (struct target_ops) <supports_exec_events>: New
4238         member.
4239         (target_supports_exec_events): New macro.
4240         * win32-low.c (win32_target_ops) <supports_exec_events>:
4241         Initialize new member.
4242
4243 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
4244
4245         * linux-low.c (linux_low_enable_btrace): Remove.
4246         (linux_target_ops): Replace linux_low_enable_btrace with
4247         linux_enable_btrace.
4248
4249 2015-09-03  Yao Qi  <yao.qi@linaro.org>
4250
4251         * linux-aarch64-low.c (aarch64_insert_point): Call
4252         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4253         returns true.
4254
4255 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4256
4257         * linux-low.c (check_stopped_by_breakpoint): Use
4258         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4259
4260 2015-08-27  Pedro Alves  <palves@redhat.com>
4261
4262         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4263
4264 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
4265
4266         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4267         the XNEW-family equivalent.
4268         (compile_bytecodes): Likewise.
4269         * dll.c (loaded_dll): Likewise.
4270         * event-loop.c (append_callback_event): Likewise.
4271         (create_file_handler): Likewise.
4272         (create_file_event): Likewise.
4273         * hostio.c (handle_open): Likewise.
4274         * inferiors.c (add_thread): Likewise.
4275         (add_process): Likewise.
4276         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4277         * linux-arm-low.c (arm_new_process): Likewise.
4278         (arm_new_thread): Likewise.
4279         * linux-low.c (add_to_pid_list): Likewise.
4280         (linux_add_process): Likewise.
4281         (handle_extended_wait): Likewise.
4282         (add_lwp): Likewise.
4283         (enqueue_one_deferred_signal): Likewise.
4284         (enqueue_pending_signal): Likewise.
4285         (linux_resume_one_lwp_throw): Likewise.
4286         (linux_resume_one_thread): Likewise.
4287         (linux_read_memory): Likewise.
4288         (linux_write_memory): Likewise.
4289         * linux-mips-low.c (mips_linux_new_process): Likewise.
4290         (mips_linux_new_thread): Likewise.
4291         (mips_add_watchpoint): Likewise.
4292         * linux-x86-low.c (initialize_low_arch): Likewise.
4293         * lynx-low.c (lynx_add_process): Likewise.
4294         * mem-break.c (set_raw_breakpoint_at): Likewise.
4295         (set_breakpoint): Likewise.
4296         (add_condition_to_breakpoint): Likewise.
4297         (add_commands_to_breakpoint): Likewise.
4298         (clone_agent_expr): Likewise.
4299         (clone_one_breakpoint): Likewise.
4300         * regcache.c (new_register_cache): Likewise.
4301         * remote-utils.c (look_up_one_symbol): Likewise.
4302         * server.c (queue_stop_reply): Likewise.
4303         (start_inferior): Likewise.
4304         (queue_stop_reply_callback): Likewise.
4305         (handle_target_event): Likewise.
4306         * spu-low.c (fetch_ppc_memory): Likewise.
4307         (store_ppc_memory): Likewise.
4308         * target.c (set_target_ops): Likewise.
4309         * thread-db.c (thread_db_load_search): Likewise.
4310         (try_thread_db_load_1): Likewise.
4311         * tracepoint.c (add_tracepoint): Likewise.
4312         (add_tracepoint_action): Likewise.
4313         (create_trace_state_variable): Likewise.
4314         (cmd_qtdpsrc): Likewise.
4315         (cmd_qtro): Likewise.
4316         (add_while_stepping_state): Likewise.
4317         * win32-low.c (child_add_thread): Likewise.
4318         (get_image_name): Likewise.
4319
4320 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4321
4322         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4323
4324 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4325
4326         * Makefile.in (aarch64-linux.o): New rule.
4327         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4328         srv_tgtobj.
4329         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4330         (aarch64_init_debug_reg_state): Make it extern.
4331         (aarch64_linux_prepare_to_resume): Remove.
4332
4333 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4334
4335         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4336         lwp_arch_private_info and ptid_of_lwp.
4337
4338 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4339
4340         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4341         Find proc_info by find_process_pid.  All callers updated.
4342
4343 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4344
4345         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4346         Remove.
4347         (debug_reg_change_callback): Remove.
4348         (aarch64_notify_debug_reg_change): Remove.
4349
4350 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4351
4352         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4353         Call current_lwp_ptid.
4354
4355 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4356
4357         * linux-aarch64-low.c (debug_reg_change_callback): Use
4358         debug_printf.
4359
4360 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4361
4362         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4363
4364 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4365
4366         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4367
4368 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4369
4370         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4371         the code.
4372
4373 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4374
4375         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4376         Remove.
4377         (debug_reg_change_callback): Remove argument entry and add argument
4378         lwp.  Remove local variable thread.  Don't print thread id in the
4379         debugging output.  Don't check whether pid of thread equals to pid.
4380         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
4381         iterate_over_lwps instead find_inferior.
4382
4383 2015-08-24  Pedro Alves  <palves@redhat.com>
4384
4385         * inferiors.c (get_first_process): New function.
4386         * inferiors.h (get_first_process): New declaration.
4387         * remote-utils.c (read_ptid): Default to the first process in the
4388         list, instead of to the current thread's process.
4389
4390 2015-08-24  Pedro Alves  <palves@redhat.com>
4391
4392         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4393         * event-loop.c: Likewise.
4394         * remote-utils.c: Likewise.
4395         * tracepoint.c: Likewise.
4396
4397 2015-08-24  Pedro Alves  <palves@redhat.com>
4398
4399         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4400         ptid_get_lwp.
4401
4402 2015-08-21  Pedro Alves  <palves@redhat.com>
4403
4404         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4405         instead of literal 1.
4406
4407 2015-08-21  Pedro Alves  <palves@redhat.com>
4408
4409         * tdesc.c (default_description): Explicitly zero-initialize.
4410
4411 2015-08-21  Pedro Alves  <palves@redhat.com>
4412
4413         PR gdb/18749
4414         * inferiors.c (remove_thread): Discard any pending stop reply for
4415         this thread.
4416         * server.c (remove_all_on_match_pid): Rename to ...
4417         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
4418         instead of a pid.
4419         (discard_queued_stop_replies): Change parameter to a ptid.  Now
4420         extern.
4421         (handle_v_kill, kill_inferior_callback, captured_main)
4422         (process_serial_event): Adjust.
4423         * server.h (discard_queued_stop_replies): Declare.
4424
4425 2015-08-21  Pedro Alves  <palves@redhat.com>
4426
4427         * linux-low.c (wait_for_sigstop): Always switch to no thread
4428         selected if the previously current thread dies.
4429         * lynx-low.c (lynx_request_interrupt): Use the first thread's
4430         process instead of the current thread's.
4431         * remote-utils.c (input_interrupt): Don't check if there's no
4432         current thread.
4433         * server.c (gdb_read_memory, gdb_write_memory): If setting the
4434         current thread to the general thread fails, error out.
4435         (handle_qxfer_auxv, handle_qxfer_libraries)
4436         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4437         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4438         (handle_query): Check if there's a thread selected instead of
4439         checking whether there's any thread in the thread list.
4440         (handle_qxfer_threads, handle_qxfer_btrace)
4441         (handle_qxfer_btrace_conf): Don't error out early if there's no
4442         thread in the thread list.
4443         (handle_v_cont, myresume): Don't set the current thread to the
4444         continue thread.
4445         (process_serial_event) <Hg handling>: Also set thread_id if the
4446         previous general thread is still alive.
4447         (process_serial_event) <g/G handling>: If setting the current
4448         thread to the general thread fails, error out.
4449         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4450         thread's lwp instead of the current thread's.
4451         * target.c (set_desired_thread): If the desired thread was not
4452         found, leave the current thread pointing to NULL.  Return an int
4453         (boolean) indicating success.
4454         * target.h (set_desired_thread): Change return type to int.
4455
4456 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
4457
4458         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4459         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4460         #includes.
4461         (ps_get_thread_area): New function.
4462
4463 2015-08-19  Gary Benson  <gbenson@redhat.com>
4464
4465         * hostio.c (handle_pread): Do not attempt to read more data
4466         than hostio_reply_with_data can fit in a packet.
4467
4468 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
4469
4470         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4471
4472 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
4473
4474         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4475
4476 2015-08-06  Pedro Alves  <palves@redhat.com>
4477
4478         * tracepoint.c (expr_eval_result): Now an int.
4479
4480 2015-08-06  Pedro Alves  <palves@redhat.com>
4481
4482         * gdbthread.h (struct regcache): Forward declare.
4483         (struct thread_info) <regcache_data>: Now a struct regcache
4484         pointer.
4485         * inferiors.c (inferior_regcache_data)
4486         (set_inferior_regcache_data): Now work with struct regcache
4487         pointers.
4488         * inferiors.h (struct regcache): Forward declare.
4489         (inferior_regcache_data, set_inferior_regcache_data): Now work
4490         with struct regcache pointers.
4491         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4492         (free_register_cache_thread): Remove struct regcache pointer
4493         casts.
4494
4495 2015-08-06  Pedro Alves  <palves@redhat.com>
4496
4497         * server.c (captured_main): On error, print the exception message
4498         to stderr, and if run_once is set, throw a quit.
4499
4500 2015-08-06  Pedro Alves  <palves@redhat.com>
4501
4502         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4503         the current thread.
4504
4505 2015-08-06  Pedro Alves  <palves@redhat.com>
4506
4507         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4508         reading beyond the passed in buffer length.
4509
4510 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
4511
4512         * tracepoint.c (symbol_list) <required>: Remove.
4513
4514 2015-08-06  Pedro Alves  <palves@redhat.com>
4515
4516         * linux-low.c (handle_extended_wait): Set the fork child's suspend
4517         count if stopping and suspending threads.
4518         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4519         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4520         (linux_detach): Complete an ongoing step-over.
4521         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
4522         throughout.
4523         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4524         (linux_wait_1): If passing a signal to the inferior after
4525         finishing a step-over, unsuspend and re-resume all lwps.  If we
4526         see a single-step event but the thread should be continuing, don't
4527         pass the trap to gdb.
4528         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4529         internal_error instead of gdb_assert.
4530         (enqueue_pending_signal): New function.
4531         (check_ptrace_stopped_lwp_gone): Add debug output.
4532         (start_step_over): Use internal_error instead of gdb_assert.
4533         (complete_ongoing_step_over): New function.
4534         (linux_resume_one_thread): Don't resume a suspended thread.
4535         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4536         it stepping.
4537
4538 2015-08-06  Pedro Alves  <palves@redhat.com>
4539
4540         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4541         (linux_thread_alive): Use lwp_is_marked_dead.
4542         (extended_event_reported): Delete.
4543         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4544         instead of extended_event_reported.
4545         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
4546         as well.
4547         (lwp_is_marked_dead): New function.
4548         (lwp_running): Use lwp_is_marked_dead.
4549         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4550         comment.
4551
4552 2015-08-06  Pedro Alves  <palves@redhat.com>
4553
4554         * linux-low.c (linux_wait_1): Move fork event output out of the
4555         !report_to_gdb check.  Pass event_child->waitstatus to
4556         target_waitstatus_to_string instead of ourstatus.
4557
4558 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4559
4560         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4561         if current_thread is 32 bit.
4562
4563 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4564
4565         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4566         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4567         * server.c (extended_protocol): Remove "static".
4568         * server.h (extended_protocol): Declare it.
4569
4570 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4571
4572         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4573         both aarch64 and aarch32.
4574         (aarch64_set_pc): Likewise.
4575
4576 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4577
4578         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4579         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4580         arm-with-neon.xml to srv_xmlfiles.
4581         * linux-aarch64-low.c: Include linux-aarch32-low.h.
4582         (is_64bit_tdesc): New function.
4583         (aarch64_linux_read_description): New function.
4584         (aarch64_arch_setup): Call aarch64_linux_read_description.
4585         (regs_info): Rename to regs_info_aarch64.
4586         (aarch64_regs_info): Return right regs_info.
4587         (initialize_low_arch): Call initialize_low_arch_aarch32.
4588
4589 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4590
4591         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4592         * linux-aarch32-low.c: New file.
4593         * linux-aarch32-low.h: New file.
4594         * linux-arm-low.c (arm_fill_gregset): Move it to
4595         linux-aarch32-low.c.
4596         (arm_store_gregset): Likewise.
4597         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4598         (arm_store_vfpregset): Call arm_store_vfpregset_num.
4599         (arm_arch_setup): Check if PTRACE_GETREGSET works.
4600         (regs_info): Rename to regs_info_arm.
4601         (arm_regs_info): Return regs_info_aarch32 if
4602         have_ptrace_getregset is 1 and target description is
4603         arm_with_neon or arm_with_vfpv3.
4604         (initialize_low_arch): Don't call init_registers_arm_with_neon.
4605         Call initialize_low_arch_aarch32 instead.
4606
4607 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4608
4609         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4610         * linux-low.c: ... here.
4611         * linux-low.h (have_ptrace_getregset): Declare it.
4612
4613 2015-08-04  Pedro Alves  <palves@redhat.com>
4614
4615         * thread-db.c (struct thread_db): Use new typedefs.
4616         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4617         CHK calls.
4618         (disable_thread_event_reporting): Cast result of dlsym to
4619         destination function pointer type.
4620         (thread_db_mourn): Use td_ta_delete_ftype.
4621
4622 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
4623
4624         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4625         arch variant.
4626         (CDX_BREAKPOINT): Define for R2.
4627         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4628         (the_low_target): Add comments.
4629
4630 2015-07-30  Yao Qi  <yao.qi@linaro.org>
4631
4632         * linux-arm-low.c (arm_hwcap): Remove it.
4633         (arm_read_description): New local variable arm_hwcap.  Don't
4634         set arm_hwcap to zero.
4635
4636 2015-07-30  Yao Qi  <yao.qi@linaro.org>
4637
4638         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4639         Use regcache->tdesc instead.
4640         (arm_store_wmmxregset): Likewise.
4641         (arm_fill_vfpregset): Likewise.
4642         (arm_store_vfpregset): Likewise.
4643
4644 2015-07-30  Yao Qi  <yao.qi@linaro.org>
4645
4646         * linux-arm-low.c: Include arch/arm.h.
4647         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4648         (arm_store_gregset): Likewise.
4649
4650 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
4651
4652         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4653         ptrace's 4th parameter.
4654
4655 2015-07-27  Yao Qi  <yao.qi@linaro.org>
4656
4657         * configure.srv (case aarch64*-*-linux*): Don't set
4658         srv_linux_usrregs.
4659
4660 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
4661
4662         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4663         sys/ptrace.h.
4664         * linux-arm-low.c: Likewise.
4665         * linux-cris-low.c: Likewise.
4666         * linux-crisv32-low.c: Likewise.
4667         * linux-low.c: Likewise.
4668         * linux-m68k-low.c: Likewise.
4669         * linux-mips-low.c: Likewise.
4670         * linux-nios2-low.c: Likewise.
4671         * linux-s390-low.c: Likewise.
4672         * linux-sparc-low.c: Likewise.
4673         * linux-tic6x-low.c: Likewise.
4674         * linux-tile-low.c: Likewise.
4675         * linux-x86-low.c: Likewise.
4676
4677 2015-07-24  Pedro Alves  <palves@redhat.com>
4678
4679         * config.in: Regenerate.
4680         * configure: Regenerate.
4681
4682 2015-07-24  Pedro Alves  <palves@redhat.com>
4683
4684         * acinclude.m4: Include ../ptrace.m4.
4685         * configure.ac: Call GDB_AC_PTRACE.
4686         * config.in, configure: Regenerate.
4687
4688 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4689
4690         * linux-low.c (linux_create_inferior): Remove setting to
4691         proc->priv->new_inferior.
4692         (linux_attach): Likewise.
4693         (linux_low_filter_event): Likewise.
4694         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4695
4696 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4697
4698         * linux-low.c (linux_arch_setup): New function.
4699         (linux_low_filter_event): If proc->tdesc is NULL and
4700         proc->attached is true, call the_low_target.arch_setup.
4701         Otherwise, keep status pending, and return.
4702         (linux_resume_one_lwp_throw): Don't call get_pc if
4703         thread->while_stepping isn't NULL.  Don't call
4704         get_thread_regcache if proc->tdesc is NULL.
4705         (need_step_over_p): Return 0 if proc->tdesc is NULL.
4706         (linux_target_ops): Install arch_setup.
4707         * server.c (start_inferior): Call the_target->arch_setup.
4708         * target.h (struct target_ops) <arch_setup>: New field.
4709         (target_arch_setup): New marco.
4710         * lynx-low.c (lynx_target_ops): Update.
4711         * nto-low.c (nto_target_ops): Update.
4712         * spu-low.c (spu_target_ops): Update.
4713         * win32-low.c (win32_target_ops): Update.
4714
4715 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4716
4717         * linux-low.c (linux_add_process): Don't set
4718         proc->priv->new_inferior.
4719         (linux_create_inferior): Set proc->priv->new_inferior to 1.
4720         (linux_attach): Likewise.
4721
4722 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4723
4724         * server.c (start_inferior): Code refactor.
4725
4726 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4727
4728         * server.c (process_serial_event): Set general_thread.
4729
4730 2015-07-21  Yao Qi  <yao.qi@linaro.org>
4731
4732         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4733         aarch64_linux_get_debug_reg_capacity.
4734
4735 2015-07-17  Yao Qi  <yao.qi@linaro.org>
4736
4737         * Makefile.in (aarch64-linux-hw-point.o): New rule.
4738         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4739         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4740         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4741         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4742         (AARCH64_HWP_ALIGNMENT): Likewise.
4743         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4744         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4745         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4746         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4747         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4748         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4749         (struct aarch64_debug_reg_state): Likewise.
4750         (struct arch_lwp_info): Likewise.
4751         (aarch64_align_watchpoint): Likewise.
4752         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4753         (aarch64_watchpoint_length): Likewise.
4754         (aarch64_point_encode_ctrl_reg): Likewise
4755         (aarch64_point_is_aligned): Likewise.
4756         (aarch64_align_watchpoint): Likewise.
4757         (aarch64_linux_set_debug_regs):
4758         (aarch64_dr_state_insert_one_point): Likewise.
4759         (aarch64_dr_state_remove_one_point): Likewise.
4760         (aarch64_handle_breakpoint): Likewise.
4761         (aarch64_handle_aligned_watchpoint): Likewise.
4762         (aarch64_handle_unaligned_watchpoint): Likewise.
4763         (aarch64_handle_watchpoint): Likewise.
4764
4765 2015-07-17  Yao Qi  <yao.qi@linaro.org>
4766
4767         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4768         and don't aarch64_get_debug_reg_state.  All callers update.
4769         (aarch64_handle_aligned_watchpoint): Likewise.
4770         (aarch64_handle_unaligned_watchpoint): Likewise.
4771         (aarch64_handle_watchpoint): Likewise.
4772         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4773         (aarch64_remove_point): Likewise.
4774
4775 2015-07-17  Yao Qi  <yao.qi@linaro.org>
4776
4777         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4778         debug_printf.
4779         (aarch64_handle_unaligned_watchpoint): Likewise.
4780
4781 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
4782
4783         Revert the previous 3 commits:
4784         Move gdb_regex* to common/
4785         Move linux_find_memory_regions_full & co.
4786         gdbserver build-id attribute generator
4787
4788 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
4789             Jan Kratochvil  <jan.kratochvil@redhat.com>
4790
4791         gdbserver build-id attribute generator.
4792         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4793         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4794         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4795         (find_phdr): New.
4796         (get_dynamic): Use find_pdhr to traverse program headers.
4797         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4798         (compare_mapping_entry_range, struct find_memory_region_callback_data)
4799         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4800         (get_hex_build_id): New.
4801         (linux_qxfer_libraries_svr4): Add optional build-id attribute
4802         to reply XML document.
4803
4804 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
4805             Jan Kratochvil  <jan.kratochvil@redhat.com>
4806
4807         * target.c: Include target/target-utils.h and fcntl.h.
4808         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4809         (target_fileio_read_stralloc): New functions.
4810
4811 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
4812
4813         * Makefile.in (OBS): Add gdb_regex.o.
4814         (gdb_regex.o): New.
4815         * config.in: Rebuilt.
4816         * configure: Rebuilt.
4817
4818 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
4819             Jan Kratochvil  <jan.kratochvil@redhat.com>
4820
4821         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4822         * Makefile.in (OBS): Add target-utils.o.
4823         (linux-maps.o, target-utils.o): New.
4824         * configure.srv (srv_linux_obj): Add linux-maps.o.
4825
4826 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
4827
4828         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4829         function, return 1.
4830         (the_low_target): Install it.
4831
4832 2015-07-14  Pedro Alves  <palves@redhat.com>
4833
4834         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4835         Instead, ignore ECHILD, and throw an error for other errnos.
4836
4837 2015-07-10  Pedro Alves  <palves@redhat.com>
4838
4839         * event-loop.c (struct callback_event) <data>: Change type to
4840         gdb_client_data instance instead of gdb_client_data pointer.
4841         (append_callback_event): Adjust.
4842
4843 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
4844
4845         * linux-aarch64-low.c: Add comments for each linux_target_ops
4846         method.  Remove comments already covered in target_ops and
4847         linux_target_ops definitions.
4848         (the_low_target): Add comments for each unimplemented method.
4849
4850 2015-07-09  Yao Qi  <yao.qi@linaro.org>
4851
4852         * linux-aarch64-low.c (aarch64_regmap): Remove.
4853         (aarch64_usrregs_info): Remove.
4854         (regs_info): Set field usrregs to NULL.
4855
4856 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
4857
4858         * linux-low.c: Include "rsp-low.h"
4859         (linux_low_encode_pt_config, linux_low_encode_raw): New.
4860         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4861         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4862         (handle_btrace_enable_pt): New.
4863         (handle_btrace_general_set): Support "pt".
4864         (handle_btrace_conf_general_set): Support "pt:size".
4865
4866 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
4867
4868         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4869         Z_PACKET_SW_BP.
4870
4871 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
4872
4873         * linux-aarch64-low.c: Remove comment about endianness.
4874         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
4875         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
4876         memcmp.
4877
4878 2015-06-24  Gary Benson  <gbenson@redhat.com>
4879
4880         * linux-i386-ipa.c (stdint.h): Do not include.
4881         * lynx-i386-low.c (stdint.h): Likewise.
4882         * lynx-ppc-low.c (stdint.h): Likewise.
4883         * mem-break.c (stdint.h): Likewise.
4884         * thread-db.c (stdint.h): Likewise.
4885         * tracepoint.c (stdint.h): Likewise.
4886         * win32-low.c (stdint.h): Likewise.
4887
4888 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
4889
4890         * server.c (write_qxfer_response): Update call to
4891         remote_escape_output.
4892
4893 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
4894             Jan Kratochvil  <jan.kratochvil@redhat.com>
4895
4896         Merge multiple hex conversions.
4897         * gdbreplay.c (tohex): Rename to 'fromhex'.
4898         (logchar): Use fromhex.
4899
4900 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
4901
4902         * server.c (handle_qxfer_libraries): Set `version' attribute for
4903         <library-list>.
4904
4905 2015-06-10  Gary Benson  <gbenson@redhat.com>
4906
4907         * target.h (struct target_ops) <multifs_open>: New field.
4908         <multifs_unlink>: Likewise.
4909         <multifs_readlink>: Likewise.
4910         * linux-low.c (nat/linux-namespaces.h): New include.
4911         (linux_target_ops): Initialize the_target->multifs_open,
4912         the_target->multifs_unlink and the_target->multifs_readlink.
4913         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4914         * hostio.c (hostio_fs_pid): New static variable.
4915         (hostio_handle_new_gdb_connection): New function.
4916         (handle_setfs): Likewise.
4917         (handle_open): Use the_target->multifs_open as appropriate.
4918         (handle_unlink): Use the_target->multifs_unlink as appropriate.
4919         (handle_readlink): Use the_target->multifs_readlink as
4920         appropriate.
4921         (handle_vFile): Handle vFile:setfs packets.
4922         * server.c (handle_query): Call hostio_handle_new_gdb_connection
4923         after target_handle_new_gdb_connection.
4924
4925 2015-06-10  Gary Benson  <gbenson@redhat.com>
4926
4927         * configure.ac (AC_CHECK_FUNCS): Add setns.
4928         * config.in: Regenerate.
4929         * configure: Likewise.
4930         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4931         (linux-namespaces.o): New rule.
4932         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4933
4934 2015-06-09  Gary Benson <gbenson@redhat.com>
4935
4936         * hostio.c (handle_open): Process mode argument with
4937         fileio_to_host_mode.
4938
4939 2015-06-01  Yao Qi  <yao.qi@linaro.org>
4940
4941         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4942         * linux-x86-low.c: Likewise.
4943
4944 2015-05-28  Don Breazeal  <donb@codesourcery.com>
4945
4946         * linux-low.c (handle_extended_wait): Initialize
4947         thread_info.last_resume_kind for new fork children.
4948
4949 2015-05-15  Pedro Alves  <palves@redhat.com>
4950
4951         * target.h (target_handle_new_gdb_connection): Rewrite using if
4952         wrapped in do/while.
4953
4954 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
4955
4956         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4957         * configure, config.in: Regenerate.
4958         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4959         Declare typedef.
4960
4961 2015-05-12  Don Breazeal  <donb@codesourcery.com>
4962
4963         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4964         PTRACE_EVENT_VFORK_DONE.
4965         (linux_low_ptrace_options, extended_event_reported): Add vfork
4966         events.
4967         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4968         and "vforkdone" for RSP 'T' Stop Reply Packet.
4969         * server.h (report_vfork_events): Declare
4970         global variable.
4971
4972 2015-05-12  Don Breazeal  <donb@codesourcery.com>
4973
4974         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4975         (the_low_target) <new_fork>: Initialize new member.
4976         * linux-arm-low.c (arm_new_fork): New function.
4977         (the_low_target) <new_fork>: Initialize new member.
4978         * linux-low.c (handle_extended_wait): Call new target function
4979         new_fork.
4980         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4981         * linux-mips-low.c (mips_add_watchpoint): New function
4982         extracted from mips_insert_point.
4983         (the_low_target) <new_fork>: Initialize new member.
4984         (mips_linux_new_fork): New function.
4985         (mips_insert_point): Call mips_add_watchpoint.
4986         * linux-x86-low.c (x86_linux_new_fork): New function.
4987         (the_low_target) <new_fork>: Initialize new member.
4988
4989 2015-05-12  Don Breazeal  <donb@codesourcery.com>
4990
4991         * linux-low.c (handle_extended_wait): Implement return value,
4992         rename argument 'event_child' to 'event_lwp', handle
4993         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4994         (linux_low_ptrace_options): New function.
4995         (linux_low_filter_event): Call linux_low_ptrace_options,
4996         use different argument fo linux_enable_event_reporting,
4997         use return value from handle_extended_wait.
4998         (extended_event_reported): New function.
4999         (linux_wait_1): Call extended_event_reported and set
5000         status to report fork events.
5001         (linux_write_memory): Add pid to debug message.
5002         (reset_lwp_ptrace_options_callback): New function.
5003         (linux_handle_new_gdb_connection): New function.
5004         (linux_target_ops): Initialize new structure member.
5005         * linux-low.h (struct lwp_info) <waitstatus>: New member.
5006         * lynx-low.c: Initialize new structure member.
5007         * remote-utils.c (prepare_resume_reply): Implement stop reason
5008         "fork" for "T" stop message.
5009         * server.c (handle_query): Call handle_new_gdb_connection.
5010         * server.h (report_fork_events): Declare global flag.
5011         * target.h (struct target_ops) <handle_new_gdb_connection>:
5012         New member.
5013         (target_handle_new_gdb_connection): New macro.
5014         * win32-low.c: Initialize new structure member.
5015
5016 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5017
5018         * mem-break.c (APPEND_TO_LIST): Define macro.
5019         (clone_agent_expr): New function.
5020         (clone_one_breakpoint): New function.
5021         (clone_all_breakpoints): New function.
5022         * mem-break.h: Declare new functions.
5023
5024 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5025
5026         * linux-low.c (linux_supports_fork_events): New function.
5027         (linux_supports_vfork_events): New function.
5028         (linux_target_ops): Initialize new structure members.
5029         (initialize_low): Call linux_check_ptrace_features.
5030         * lynx-low.c (lynx_target_ops): Initialize new structure
5031         members.
5032         * server.c (report_fork_events, report_vfork_events):
5033         New global flags.
5034         (handle_query): Add new features to qSupported packet and
5035         response.
5036         (captured_main): Initialize new global variables.
5037         * target.h (struct target_ops) <supports_fork_events>:
5038         New member.
5039         <supports_vfork_events>: New member.
5040         (target_supports_fork_events): New macro.
5041         (target_supports_vfork_events): New macro.
5042         * win32-low.c (win32_target_ops): Initialize new structure
5043         members.
5044
5045 2015-05-12  Gary Benson <gbenson@redhat.com>
5046
5047         * server.c (handle_qxfer_exec_file): Use current process
5048         if annex is empty.
5049
5050 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
5051
5052         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
5053         Remove HAVE_PTRACE_GETREGS conditionals.
5054         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5055         instead of PTRACE_GETREGS and PTRACE_SETREGS.
5056
5057 2015-05-08  Yao Qi  <yao.qi@linaro.org>
5058
5059         * linux-low.c (linux_supports_conditional_breakpoints): New
5060         function.
5061         (linux_target_ops): Install new target method.
5062         * lynx-low.c (lynx_target_ops): Install NULL hook for
5063         supports_conditional_breakpoints.
5064         * nto-low.c (nto_target_ops): Likewise.
5065         * spu-low.c (spu_target_ops): Likewise.
5066         * win32-low.c (win32_target_ops): Likewise.
5067         * server.c (handle_query): Check
5068         target_supports_conditional_breakpoints.
5069         * target.h (struct target_ops) <supports_conditional_breakpoints>:
5070         New field.
5071         (target_supports_conditional_breakpoints): New macro.
5072
5073 2015-05-06  Pedro Alves  <palves@redhat.com>
5074
5075         PR server/18081
5076         * server.c (start_inferior): If the process exits, mourn it.
5077
5078 2015-04-21  Gary Benson <gbenson@redhat.com>
5079
5080         * hostio.c (fileio_open_flags_to_host): Factored out to
5081         fileio_to_host_openflags in common/fileio.c.  Single use
5082         updated.
5083
5084 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5085
5086         * linux-xtensa-low.c (xtensa_fill_gregset)
5087         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5088         XCHAL_HAVE_LOOP.
5089
5090 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5091
5092         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5093         (regs_info): Replace usrregs pointer with NULL.
5094
5095 2015-04-17  Gary Benson  <gbenson@redhat.com>
5096
5097         * target.h (struct target_ops) <pid_to_exec_file>: New field.
5098         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5099         * server.c (handle_qxfer_exec_file): New function.
5100         (qxfer_packets): Add exec-file entry.
5101         (handle_query): Report qXfer:exec-file:read as supported packet.
5102
5103 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
5104
5105         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5106
5107 2015-04-09  Gary Benson <gbenson@redhat.com>
5108
5109         * hostio-errno.c (errno_to_fileio_error): Remove function.
5110         Update caller to use remote_fileio_to_fio_error.
5111
5112 2015-04-09  Yao Qi  <yao.qi@linaro.org>
5113
5114         * linux-low.c (linux_insert_point): Call
5115         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5116         (linux_remove_point): Call remove_memory_breakpoint if type is
5117         raw_bkpt_type_sw.
5118         * linux-x86-low.c (x86_insert_point): Don't call
5119         insert_memory_breakpoint.
5120         (x86_remove_point): Don't call remove_memory_breakpoint.
5121
5122 2015-04-01  Pedro Alves  <palves@redhat.com>
5123             Cleber Rosa  <crosa@redhat.com>
5124
5125         * server.c (gdbserver_usage): Reorganize and extend the usage
5126         message.
5127
5128 2015-03-24  Pedro Alves  <palves@redhat.com>
5129
5130         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5131         output.  Also dump TRAP_TRACE.
5132         (linux_low_filter_event): In debug output, distinguish a
5133         resume_stop SIGSTOP from a delayed SIGSTOP.
5134
5135 2015-03-24  Gary Benson  <gbenson@redhat.com>
5136
5137         * linux-x86-low.c (x86_linux_new_thread): Moved to
5138         nat/x86-linux.c.
5139         (x86_linux_prepare_to_resume): Likewise.
5140
5141 2015-03-24  Gary Benson  <gbenson@redhat.com>
5142
5143         * Makefile.in (x86-linux-dregs.o): New rule.
5144         * configure.srv: Add x86-linux-dregs.o to relevant targets.
5145         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5146         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5147         (x86_linux_dr_get): Likewise.
5148         (x86_linux_dr_set): Likewise.
5149         (update_debug_registers_callback): Likewise.
5150         (x86_linux_dr_set_addr): Likewise.
5151         (x86_linux_dr_get_addr): Likewise.
5152         (x86_linux_dr_set_control): Likewise.
5153         (x86_linux_dr_get_control): Likewise.
5154         (x86_linux_dr_get_status): Likewise.
5155         (x86_linux_update_debug_registers): Likewise.
5156
5157 2015-03-24  Gary Benson  <gbenson@redhat.com>
5158
5159         * linux-x86-low.c (x86_linux_update_debug_registers):
5160         New function, factored out from...
5161         (x86_linux_prepare_to_resume): ...this.
5162
5163 2015-03-24  Gary Benson  <gbenson@redhat.com>
5164
5165         * linux-x86-low.c (x86_linux_dr_get): Update comments.
5166         (x86_linux_dr_set): Likewise.
5167         (update_debug_registers_callback): Likewise.
5168         (x86_linux_dr_set_addr): Likewise.
5169         (x86_linux_dr_get_addr): Likewise.
5170         (x86_linux_dr_set_control): Likewise.
5171         (x86_linux_dr_get_control): Likewise.
5172         (x86_linux_dr_get_status): Likewise.
5173         (x86_linux_prepare_to_resume): Likewise.
5174
5175 2015-03-24  Gary Benson  <gbenson@redhat.com>
5176
5177         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5178         Use perror_with_name.  Pass string through gettext.
5179         (x86_linux_dr_set): Likewise.
5180
5181 2015-03-24  Gary Benson  <gbenson@redhat.com>
5182
5183         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5184         (x86_linux_dr_set_addr): ...this.
5185         (x86_dr_low_get_addr): Rename to...
5186         (x86_linux_dr_get_addr): ...this.
5187         (x86_dr_low_set_control): Rename to...
5188         (x86_linux_dr_set_control): ...this.
5189         (x86_dr_low_get_control): Rename to...
5190         (x86_linux_dr_get_control): ...this.
5191         (x86_dr_low_get_status): Rename to...
5192         (x86_linux_dr_get_status): ...this.
5193         (x86_dr_low): Update with new function names.
5194
5195 2015-03-24  Gary Benson  <gbenson@redhat.com>
5196
5197         * Makefile.in (x86-linux.o): New rule.
5198         * configure.srv: Add x86-linux.o to relevant targets.
5199         * linux-low.c (lwp_set_arch_private_info): New function.
5200         (lwp_arch_private_info): Likewise.
5201         * linux-x86-low.c: Include nat/x86-linux.h.
5202         (arch_lwp_info): Removed structure.
5203         (update_debug_registers_callback):
5204         Use lwp_set_debug_registers_changed.
5205         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5206         and lwp_set_debug_registers_changed.
5207         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5208
5209 2015-03-24  Gary Benson  <gbenson@redhat.com>
5210
5211         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5212         * linux-arm-low.c (arm_new_thread): Likewise.
5213         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5214         * linux-mips-low.c (mips_linux_new_thread): Likewise.
5215         * linux-x86-low.c (x86_linux_new_thread): Likewise.
5216         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5217
5218 2015-03-24  Gary Benson  <gbenson@redhat.com>
5219
5220         * linux-low.c (ptid_of_lwp): New function.
5221         (lwp_is_stopped): Likewise.
5222         (lwp_stop_reason): Likewise.
5223         * linux-x86-low.c (update_debug_registers_callback):
5224         Use lwp_is_stopped.
5225         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5226         lwp_stop_reason.
5227
5228 2015-03-24  Gary Benson  <gbenson@redhat.com>
5229
5230         * linux-low.h (linux_stop_lwp): Remove declaration.
5231
5232 2015-03-24  Gary Benson  <gbenson@redhat.com>
5233
5234         * linux-low.h: Include nat/linux-nat.h.
5235         * linux-low.c (iterate_over_lwps_args): New structure.
5236         (iterate_over_lwps_filter): New function.
5237         (iterate_over_lwps): Likewise.
5238         * linux-x86-low.c (update_debug_registers_callback):
5239         Update signature to what iterate_over_lwps expects.
5240         Remove PID check that iterate_over_lwps now performs.
5241         (x86_dr_low_set_addr): Use iterate_over_lwps.
5242         (x86_dr_low_set_control): Likewise.
5243
5244 2015-03-24  Gary Benson  <gbenson@redhat.com>
5245
5246         * linux-x86-low.c (x86_debug_reg_state): New function.
5247         (x86_linux_prepare_to_resume): Use the above.
5248
5249 2015-03-24  Gary Benson  <gbenson@redhat.com>
5250
5251         * linux-low.c (current_lwp_ptid): New function.
5252         * linux-x86-low.c: Include nat/linux-nat.h.
5253         (x86_dr_low_get_addr): Use current_lwp_ptid.
5254         (x86_dr_low_get_control): Likewise.
5255         (x86_dr_low_get_status): Likewise.
5256
5257 2015-03-20  Pedro Alves  <palves@redhat.com>
5258
5259         * tracepoint.c (cmd_qtstatus): Make "str" const.
5260
5261 2015-03-20  Pedro Alves  <palves@redhat.com>
5262
5263         * server.c (handle_general_set): Make "req_str" const.
5264
5265 2015-03-19  Pedro Alves  <palves@redhat.com>
5266
5267         * linux-low.c (linux_resume_one_lwp): Rename to ...
5268         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
5269         instead call perror_with_name.
5270         (check_ptrace_stopped_lwp_gone): New function.
5271         (linux_resume_one_lwp): Reimplement as wrapper around
5272         linux_resume_one_lwp_throw that swallows errors if the LWP is
5273         gone.
5274
5275 2015-03-19  Pedro Alves  <palves@redhat.com>
5276
5277         * linux-low.c (count_events_callback, select_event_lwp_callback):
5278         No longer check whether the thread has resume_stop as last resume
5279         kind.
5280
5281 2015-03-19 Pedro Alves  <palves@redhat.com>
5282
5283         * linux-low.c (count_events_callback, select_event_lwp_callback):
5284         Use the lwp's status_pending_p field, not the thread's.
5285
5286 2015-03-19  Pedro Alves  <palves@redhat.com>
5287
5288         * linux-low.c (select_event_lwp_callback): Update comments to
5289         no longer mention SIGTRAP.
5290
5291 2015-03-18  Gary Benson  <gbenson@redhat.com>
5292
5293         * server.c (handle_query): Do not report vFile:fstat as supported.
5294
5295 2015-03-11  Gary Benson  <gbenson@redhat.com>
5296
5297         * hostio.c (sys/types.h): New include.
5298         (sys/stat.h): Likewise.
5299         (common-remote-fileio.h): Likewise.
5300         (handle_fstat): New function.
5301         (handle_vFile): Handle vFile:fstat packets.
5302
5303 2015-03-11  Gary Benson  <gbenson@redhat.com>
5304
5305         * configure.ac (AC_CHECK_MEMBERS): Add checks for
5306         struct stat.st_blocks and struct stat.st_blksize.
5307         * configure: Regenerate.
5308         * config.in: Likewise.
5309         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5310         (OBS): Add common-remote-fileio.o.
5311         (common-remote-fileio.o): New rule.
5312
5313 2015-03-09  Pedro Alves  <palves@redhat.com>
5314
5315         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5316         'struct sockaddr' pointer in 'accept' call.
5317
5318 2015-03-09  Pedro Alves  <palves@redhat.com>
5319
5320         Revert:
5321         2015-03-07  Pedro Alves  <palves@redhat.com>
5322         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5323         or <winsock2.h> here.  Instead include "gdb_socket.h".
5324         (remote_open): Use union gdb_sockaddr_u.
5325         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5326         or <winsock2.h> here.  Instead include "gdb_socket.h".
5327         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5328         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5329         or <sys/un.h>.
5330         (init_named_socket, gdb_agent_helper_thread): Use union
5331         gdb_sockaddr_u.
5332
5333 2015-03-07  Pedro Alves  <palves@redhat.com>
5334
5335         * configure.ac (build_warnings): Move
5336         -Wdeclaration-after-statement to the C-specific set.
5337         * configure: Regenerate.
5338
5339 2015-03-07  Pedro Alves  <palves@redhat.com>
5340
5341         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5342         or <winsock2.h> here.  Instead include "gdb_socket.h".
5343         (remote_open): Use union gdb_sockaddr_u.
5344         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5345         or <winsock2.h> here.  Instead include "gdb_socket.h".
5346         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5347         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5348         or <sys/un.h>.
5349         (init_named_socket, gdb_agent_helper_thread): Use union
5350         gdb_sockaddr_u.
5351
5352 2015-03-07  Pedro Alves  <palves@redhat.com>
5353
5354         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5355         instead.
5356
5357 2015-03-06  Yao Qi  <yao.qi@linaro.org>
5358
5359         * linux-aarch64-low.c (aarch64_insert_point): Use
5360         show_debug_regs as a boolean.
5361         (aarch64_remove_point): Likewise.
5362
5363 2015-03-05  Pedro Alves  <palves@redhat.com>
5364
5365         * lynx-low.c (lynx_target_ops): Install NULL hooks for
5366         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5367         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5368         * nto-low.c (nto_target_ops): Likewise.
5369         * spu-low.c (spu_target_ops): Likewise.
5370         * win32-low.c (win32_target_ops): Likewise.
5371
5372 2015-03-04  Pedro Alves  <palves@redhat.com>
5373
5374         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5375         Decide whether a breakpoint triggered based on the SIGTRAP's
5376         siginfo.si_code.
5377         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5378         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5379         (linux_low_filter_event): Check for breakpoints before checking
5380         watchpoints.
5381         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5382         siginfo.si_code.
5383         (linux_stopped_by_sw_breakpoint)
5384         (linux_supports_stopped_by_sw_breakpoint)
5385         (linux_stopped_by_hw_breakpoint)
5386         (linux_supports_stopped_by_hw_breakpoint): New functions.
5387         (linux_target_ops): Install new target methods.
5388
5389 2015-03-04  Pedro Alves  <palves@redhat.com>
5390
5391         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5392         * server.c (swbreak_feature, hwbreak_feature): New globals.
5393         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5394         (captured_main): Clear swbreak_feature and hwbreak_feature.
5395         * server.h (swbreak_feature, hwbreak_feature): Declare.
5396         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5397         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5398         supports_stopped_by_hw_breakpoint>: New fields.
5399         (target_supports_stopped_by_sw_breakpoint)
5400         (target_stopped_by_sw_breakpoint)
5401         (target_supports_stopped_by_hw_breakpoint)
5402         (target_stopped_by_hw_breakpoint): Declare.
5403
5404 2015-03-04  Pedro Alves  <palves@redhat.com>
5405
5406         enum lwp_stop_reason -> enum target_stop_reason
5407         * linux-low.c (check_stopped_by_breakpoint): Adjust.
5408         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5409         (linux_wait_1, stuck_in_jump_pad_callback)
5410         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5411         (linux_stopped_by_watchpoint):
5412         * linux-low.h (enum lwp_stop_reason): Delete.
5413         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5414         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5415
5416 2015-03-04  Yao Qi  <yao.qi@linaro.org>
5417
5418         * Makefile.in (SFILES): Add linux-aarch64-low.c.
5419
5420 2015-03-03  Gary Benson  <gbenson@redhat.com>
5421
5422         * hostio.c (handle_vFile): Fix prefix lengths.
5423
5424 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
5425
5426         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5427         ptr_bits.
5428
5429 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5430
5431         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5432         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5433         (clean): Add "rm -f" for above C files.
5434         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5435         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5436         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5437         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5438         * linux-s390-low.c (HWCAP_S390_VX): New macro.
5439         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5440         (init_registers_s390x_vx_linux64)
5441         (init_registers_s390x_tevx_linux64)
5442         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5443         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5444         declarations.
5445         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5446         (s390_store_vxrs_high): New functions.
5447         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5448         NT_S390_VXRS_HIGH.
5449         (s390_arch_setup): Add logic for selecting one of the new target
5450         descriptions.  Activate the new vector regsets if applicable.
5451         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5452         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5453         and init_registers_s390x_tevx_linux64.
5454
5455 2015-03-01  Pedro Alves  <palves@redhat.com>
5456
5457         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5458         parameter.
5459
5460 2015-02-27  Pedro Alves  <palves@redhat.com>
5461
5462         * linux-x86-low.c (u_debugreg_offset): New function.
5463         (x86_linux_dr_get, x86_linux_dr_set): Use it.
5464
5465 2015-02-27  Pedro Alves  <palves@redhat.com>
5466
5467         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5468         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5469         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5470         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5471         (ps_lsetfpregs, ps_getpid)
5472         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5473         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5474         (ps_lsetxregs, ps_plog): Declare.
5475
5476 2015-02-27  Pedro Alves  <palves@redhat.com>
5477
5478         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5479         IP_AGENT_EXPORT_FUNC.
5480         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5481         IP_AGENT_EXPORT_FUNC.
5482         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5483         (IP_AGENT_EXPORT): Delete.
5484         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5485         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5486         (gdb_trampoline_buffer_error, collecting, gdb_collect)
5487         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5488         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5489         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5490         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5491         (traceframe_read_count, traceframe_write_count)
5492         (traceframes_created, trace_state_variables, get_raw_reg)
5493         (get_trace_state_variable_value, set_trace_state_variable_value)
5494         (ust_loaded, helper_thread_id, cmd_buf): Use
5495         IPA_SYM_EXPORTED_NAME.
5496         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5497         (tracepoints) Use IP_AGENT_EXPORT_VAR.
5498         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5499         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5500         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5501         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5502         EXTERN_C_PUSH/EXTERN_C_POP.
5503         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5504         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5505         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5506         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5507         (traceframe_write_count, traceframe_read_count)
5508         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5509         (about_to_request_buffer_space, get_trace_state_variable_value)
5510         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5511         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5512         EXTERN_C_PUSH/EXTERN_C_POP.
5513         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5514         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5515         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5516         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5517         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5518         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5519         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5520         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5521         Define.
5522         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5523         (IP_AGENT_EXPORT_VAR_DECL): Define.
5524         (tracing): Declare.
5525         (gdb_agent_get_raw_reg): Declare.
5526
5527 2015-02-27  Tom Tromey  <tromey@redhat.com>
5528             Pedro Alves  <palves@redhat.com>
5529
5530         Rename symbols whose names are reserved C++ keywords throughout.
5531
5532 2015-02-27  Pedro Alves  <palves@redhat.com>
5533
5534         * Makefile.in (COMPILER): New, get it from autoconf.
5535         (CXX): Get from autoconf instead.
5536         (COMPILE.pre): Use COMPILER.
5537         (CC-LD): Rename to ...
5538         (CC_LD): ... this.  Use COMPILER.
5539         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5540         (CXX_FOR_TARGET): Default to g++ instead of gcc.
5541         * acinclude.m4: Include build-with-cxx.m4.
5542         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5543         Disable -Werror by default if building in C++ mode.
5544         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5545         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5546         the C++ compiler.  Save/restore CXXFLAGS too.
5547         * configure: Regenerate.
5548
5549 2015-02-27  Pedro Alves  <palves@redhat.com>
5550
5551         * acinclude.m4: Include libiberty.m4.
5552         * configure.ac: Call libiberty_INIT.
5553         * config.in, configure: Regenerate.
5554
5555 2015-02-26  Pedro Alves  <palves@redhat.com>
5556
5557         * linux-low.c (linux_wait_1): When incrementing the PC past a
5558         program breakpoint always use the_low_target.breakpoint_len as
5559         increment, rather than the maximum between that and
5560         the_low_target.decr_pc_after_break.
5561
5562 2015-02-23  Pedro Alves  <palves@redhat.com>
5563
5564         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5565         thread was doing a step-over; always adjust the PC if
5566         we stepped over a permanent breakpoint.
5567         (linux_wait_1): If we stepped over breakpoint that was on top of a
5568         permanent breakpoint, manually advance the PC past it.
5569
5570 2015-02-23  Pedro Alves  <palves@redhat.com>
5571
5572         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5573         modes.
5574         (x86_fill_gregset, x86_store_gregset): Use it when handling
5575         $orig_eax.
5576
5577 2015-02-20  Pedro Alves  <palves@redhat.com>
5578
5579         * thread-db.c: Include "nat/linux-procfs.h".
5580         (thread_db_init): Skip listing new threads if the kernel supports
5581         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5582
5583 2015-02-20  Pedro Alves  <palves@redhat.com>
5584
5585         * linux-low.c (status_pending_p_callback): Use ptid_match.
5586
5587 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
5588
5589         PR breakpoints/16812
5590         * linux-low.c (wstatus_maybe_breakpoint): Remove.
5591         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5592         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5593
5594 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
5595
5596         PR breakpoints/15956
5597         * tracepoint.c (cmd_qtinit): Add check for current_thread.
5598
5599 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5600
5601         * linux-low.c (linux_low_btrace_conf): Print size.
5602         * server.c (handle_btrace_conf_general_set): New.
5603         (hanle_general_set): Call handle_btrace_conf_general_set.
5604         (handle_query): Report Qbtrace-conf:bts:size as supported.
5605
5606 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5607
5608         * linux-low.c (linux_low_enable_btrace): Update parameters.
5609         (linux_low_btrace_conf): New.
5610         (linux_target_ops)<to_btrace_conf>: Initialize.
5611         * server.c (current_btrace_conf): New.
5612         (handle_btrace_enable): Rename to ...
5613         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
5614         to target_enable_btrace.  Update comment.  Update users.
5615         (handle_qxfer_btrace_conf): New.
5616         (qxfer_packets): Add btrace-conf entry.
5617         (handle_query): Report qXfer:btrace-conf:read as supported packet.
5618         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5619         (target_ops)<read_btrace_conf>: New.
5620         (target_enable_btrace): Update parameters.
5621         (target_read_btrace_conf): New.
5622
5623 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5624
5625         * server.c (handle_btrace_general_set): Remove call to
5626         target_supports_btrace.
5627         (supported_btrace_packets): New.
5628         (handle_query): Call supported_btrace_packets.
5629         * target.h: include btrace-common.h.
5630         (btrace_target_info): Removed.
5631         (supports_btrace, target_supports_btrace): Update parameters.
5632
5633 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5634
5635         * Makefile.in (SFILES): Add common/btrace-common.c.
5636         (OBS): Add common/btrace-common.o.
5637         (btrace-common.o): Add build rules.
5638         * linux-low: Include btrace-common.h.
5639         (linux_low_read_btrace): Use struct btrace_data.  Call
5640         btrace_data_init and btrace_data_fini.
5641
5642 2015-02-06  Pedro Alves  <palves@redhat.com>
5643
5644         * thread-db.c (find_new_threads_callback): Add debug output.
5645
5646 2015-02-04  Pedro Alves  <palves@redhat.com>
5647
5648         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5649         (resume_stopped_resumed_lwps): New function.
5650         (linux_wait_for_event_filtered): Use it.
5651
5652 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5653
5654         * Makefile.in (SFILES): Add linux-personality.c.
5655         (linux-personality.o): New rule.
5656         * configure.srv (srv_linux_obj): Add linux-personality.o to the
5657         list of objects to be built.
5658         * linux-low.c: Include nat/linux-personality.h.
5659         (linux_create_inferior): Remove code to disable address space
5660         randomization (moved to ../nat/linux-personality.c).  Create
5661         cleanup to disable address space randomization.
5662
5663 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5664
5665         * Makefile.in (posix-strerror.o): New rule.
5666         (mingw-strerror.o): Likewise.
5667         * configure: Regenerated.
5668         * configure.ac: Source file ../common/common.host.  Initialize new
5669         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
5670
5671 2015-01-14  Yao Qi  <yao@codesourcery.com>
5672
5673         * Makefile.in (SFILES): Add nat/ppc-linux.c.
5674         (ppc-linux.o): New rule.
5675         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5676         * configure.ac: AC_CHECK_FUNCS(getauxval).
5677         * config.in: Re-generated.
5678         * configure: Re-generated.
5679         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5680         ppc64_64bit_inferior_p
5681
5682 2015-01-14  Yao Qi  <yao@codesourcery.com>
5683
5684         * linux-ppc-low.c: Include "nat/ppc-linux.h".
5685          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5686         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
5687         (PT_ORIG_R3, PT_TRAP): Likewise.
5688         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5689         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5690         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5691
5692 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
5693
5694         * i387-fp.c (i387_cache_to_xsave): In look over
5695         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5696         zmmh_low_space field by use of zmmh_high_space.
5697
5698 2015-01-09  Pedro Alves  <palves@redhat.com>
5699
5700         * linux-low.c (step_over_bkpt): Move higher up in the file.
5701         (handle_extended_wait): Don't store the stop_pc here.
5702         (get_stop_pc): Adjust comments and rename to ...
5703         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
5704         stopped for a software breakpoint or hardware breakpoint.
5705         (thread_still_has_status_pending_p): New function.
5706         (status_pending_p_callback): Use
5707         thread_still_has_status_pending_p.  If the event is no longer
5708         interesting, resume the LWP.
5709         (handle_tracepoints): Add assert.
5710         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5711         (wstatus_maybe_breakpoint): New function.
5712         (cancel_breakpoint): Delete function.
5713         (check_stopped_by_watchpoint): New function, factored out from
5714         linux_low_filter_event.
5715         (lp_status_maybe_breakpoint): Delete function.
5716         (linux_low_filter_event): Remove filter_ptid argument.
5717         Leave thread group exits pending here.  Store the LWP's stop PC.
5718         Always leave events pending.
5719         (linux_wait_for_event_filtered): Pull all events out of the
5720         kernel, and leave them all pending.
5721         (count_events_callback, select_event_lwp_callback): Consider all
5722         events.
5723         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5724         (select_event_lwp): Only give preference to the stepping LWP in
5725         all-stop mode.  Adjust comments.
5726         (ignore_event): New function.
5727         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
5728         references to cancel_breakpoints.  Adjust to renames.  Also give
5729         equal priority to all LWPs that have had events in non-stop mode.
5730         If reporting a software breakpoint event, unadjust the LWP's PC.
5731         (linux_wait): If linux_wait_1 returned an ignored event, retry.
5732         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5733         Adjust.
5734         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
5735         (resume_status_pending_p): Use thread_still_has_status_pending_p.
5736         (linux_stopped_by_watchpoint): Adjust.
5737         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5738         * linux-low.h (enum lwp_stop_reason): New.
5739         (struct lwp_info) <stop_pc>: Adjust comment.
5740         <stopped_by_watchpoint>: Delete field.
5741         <stop_reason>: New field.
5742         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5743         * mem-break.c (software_breakpoint_inserted_here)
5744         (hardware_breakpoint_inserted_here): New function.
5745         * mem-break.h (software_breakpoint_inserted_here)
5746         (hardware_breakpoint_inserted_here): Declare.
5747         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5748         (cancel_breakpoints): Delete.
5749         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5750         (upload_fast_traceframes): Remove references to
5751         cancel_breakpoints.
5752
5753 2015-01-09  Pedro Alves  <palves@redhat.com>
5754
5755         * thread-db.c (find_new_threads_callback): Ignore thread if the
5756         kernel thread ID is -1.
5757
5758 2015-01-09  Pedro Alves  <palves@redhat.com>
5759
5760         * linux-low.c (linux_attach_fail_reason_string): Move to
5761         nat/linux-ptrace.c, and rename.
5762         (linux_attach_lwp): Update comment.
5763         (attach_proc_task_lwp_callback): New function.
5764         (linux_attach): Adjust to rename and use
5765         linux_proc_attach_tgid_threads.
5766         (linux_attach_fail_reason_string): Delete declaration.
5767
5768 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
5769
5770         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5771         * server.c (gdbserver_version): Likewise.
5772
5773 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
5774
5775         * remote-utils.c: Include ctype.h.
5776         (input_interrupt): Explicitly handle the case when the char
5777         received is the NUL byte.  Improve the printing of non-ASCII
5778         characters.
5779
5780 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
5781
5782         * linux-low.c (linux_low_filter_event): Update call to
5783         linux_enable_event_reporting following the addition of
5784         a new parameter to that function.
5785
5786 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
5787
5788         PR server/17457
5789         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5790         (AARCH64_FPCR_REGNO): Likewise.
5791         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5792         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5793         (aarch64_store_fpregset): Likewise.
5794
5795 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
5796
5797         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5798         Remove FIXME comment about assumption about N.
5799
5800 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
5801
5802         * configure.ac: If large-file support is disabled in GDBserver,
5803         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5804         * configure: Regenerate.
5805
5806 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5807
5808         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5809         warning upon ENODATA from ptrace.
5810         * linux-s390-low.c (s390_store_tdb): New.
5811         (s390_regsets): Add regset for NT_S390_TDB.
5812
5813 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5814
5815         * linux-low.c (regsets_store_inferior_registers): Skip regsets
5816         without a fill_function.
5817         * linux-s390-low.c (s390_fill_last_break): Remove.
5818         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5819         (s390_arch_setup): Use regset's size instead of fill_function for
5820         loop end condition.
5821
5822 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5823
5824         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5825         the regset's store function when ptrace returned an error.
5826         * regcache.c (get_thread_regcache): Invalidate register cache
5827         before fetching inferior's registers.
5828
5829 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5830
5831         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5832         while-loop as for-loop.
5833         (regsets_store_inferior_registers): Likewise.
5834
5835 2014-11-28  Yao Qi  <yao@codesourcery.com>
5836
5837         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5838         * config.in, configure: Re-generate.
5839         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5840         is defined.
5841
5842 2014-11-21  Yao Qi  <yao@codesourcery.com>
5843
5844         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5845         (AC_CHECK_HEADERS): Remove malloc.h.
5846         * configure: Re-generated.
5847         * config.in: Re-generated.
5848         * server.h: Don't include alloca.h and malloc.h.
5849         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5850         Don't include malloc.h.
5851
5852 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
5853
5854         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5855         corresponding ERRNO check in same block.
5856
5857 2014-11-12  Pedro Alves  <palves@redhat.com>
5858
5859         * server.c (cont_thread): Update comment.
5860         (start_inferior, attach_inferior): No longer clear cont_thread.
5861         (handle_v_cont): No longer set cont_thread.
5862         (captured_main): Clear cont_thread each time a GDB connects.
5863
5864 2014-11-12  Pedro Alves  <palves@redhat.com>
5865
5866         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5867         thread, and don't resume all threads if the Hc thread has exited.
5868
5869 2014-11-12  Pedro Alves  <palves@redhat.com>
5870
5871         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5872         the process group instead of to a specific LWP.
5873
5874 2014-10-15  Pedro Alves  <palves@redhat.com>
5875
5876         PR server/17487
5877         * win32-arm-low.c (arm_set_thread_context): Remove current_event
5878         parameter.
5879         (arm_set_thread_context): Delete.
5880         (the_low_target): Adjust.
5881         * win32-i386-low.c (debug_registers_changed)
5882         (debug_registers_used): Delete.
5883         (update_debug_registers_callback): New function.
5884         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5885         needing to update their debug registers.
5886         (win32_get_current_dr): New function.
5887         (x86_dr_low_get_addr, x86_dr_low_get_control)
5888         (x86_dr_low_get_status): Fetch the debug register from the thread
5889         record's context.
5890         (i386_initial_stuff): Adjust.
5891         (i386_get_thread_context): Remove current_event parameter.  Don't
5892         clear debug_registers_changed nor copy DR values to
5893         debug_reg_state.
5894         (i386_set_thread_context): Delete.
5895         (i386_prepare_to_resume): New function.
5896         (i386_thread_added): Mark the thread as needing to update irs
5897         debug registers.
5898         (the_low_target): Remove i386_set_thread_context and install
5899         i386_prepare_to_resume.
5900         * win32-low.c (win32_get_thread_context): Adjust.
5901         (win32_set_thread_context): Use SetThreadContext
5902         directly.
5903         (win32_prepare_to_resume): New function.
5904         (win32_require_context): New function, factored out from ...
5905         (thread_rec): ... this.
5906         (continue_one_thread): Call win32_prepare_to_resume on each thread
5907         we're about to continue.
5908         (win32_resume): Call win32_prepare_to_resume on the event thread.
5909         * win32-low.h (struct win32_thread_info)
5910         <debug_registers_changed>: New field.
5911         (struct win32_target_ops): Change prototype of set_thread_context,
5912         delete set_thread_context and add prepare_to_resume.
5913         (win32_require_context): New declaration.
5914
5915 2014-10-08  Gary Benson  <gbenson@redhat.com>
5916
5917         * server.h: Do not include common-exceptions.h.
5918
5919 2014-10-08  Gary Benson  <gbenson@redhat.com>
5920
5921         * server.h: Do not include cleanups.h.
5922
5923 2014-09-30  James Hogan  <james.hogan@imgtec.com>
5924
5925         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5926         mips64-dsp-linux.c.
5927
5928 2014-09-23  Yao Qi  <yao@codesourcery.com>
5929
5930         * linux-low.c (lp_status_maybe_breakpoint): New function.
5931         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5932         (count_events_callback): Likewise.
5933         (select_event_lwp_callback): Likewise.
5934         (cancel_breakpoints_callback): Likewise.
5935
5936 2014-09-19  Don Breazeal  <donb@codesourcery.com>
5937
5938         * linux-low.c (handle_extended_wait): Call
5939         linux_ptrace_get_extended_event.
5940         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5941         linux_is_extended_waitstatus.
5942
5943 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
5944
5945         * Makefile.in (CPPFLAGS): Define.
5946         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5947         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5948
5949 2014-09-16  Gary Benson  <gbenson@redhat.com>
5950
5951         * inferiors.h (current_inferior): Renamed as...
5952         (current_thread): New variable.  All uses updated.
5953         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5954         (maybe_move_out_of_jump_pad): Likewise.
5955         (cancel_breakpoint): Likewise.
5956         (linux_low_filter_event): Likewise.
5957         (wait_for_sigstop): Likewise.
5958         (linux_resume_one_lwp): Likewise.
5959         (need_step_over_p): Likewise.
5960         (start_step_over): Likewise.
5961         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5962         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5963         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5964         and save_inferior as saved_thread.
5965         * regcache.c (get_thread_regcache): Renamed saved_inferior as
5966         saved_thread.
5967         (regcache_invalidate_thread): Likewise.
5968         * remote-utils.c (prepare_resume_reply): Likewise.
5969         * thread-db.c (thread_db_get_tls_address): Likewise.
5970         (disable_thread_event_reporting): Likewise.
5971         (remove_thread_event_breakpoints): Likewise.
5972         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5973         as saved_thread.
5974         * target.h (set_desired_inferior): Renamed as...
5975         (set_desired_thread): New declaration.  All uses updated.
5976         * server.c (myresume): Updated comment to reference thread instead
5977         of inferior.
5978         (handle_serial_event): Likewise.
5979         (handle_target_event): Likewise.
5980
5981 2014-09-12  Tom Tromey  <tromey@redhat.com>
5982             Gary Benson  <gbenson@redhat.com>
5983
5984         * regcache.h: Include common-regcache.h.
5985         (regcache_read_pc): Don't declare.
5986         * regcache.c (get_thread_regcache_for_ptid): New function.
5987
5988 2014-09-11  Tom Tromey  <tromey@redhat.com>
5989             Gary Benson  <gbenson@redhat.com>
5990
5991         * symbol.c: New file.
5992         * Makefile.in (SFILES): Add symbol.c.
5993         (OBS): Add symbol.o.
5994
5995 2014-09-11  Gary Benson  <gbenson@redhat.com>
5996
5997         * target.c (target_stop_ptid, target_continue_ptid): New
5998         functions.
5999
6000 2014-09-11  Tom Tromey  <tromey@redhat.com>
6001             Gary Benson  <gbenson@redhat.com>
6002
6003         * target.h: Include target/target.h.
6004         * target.c (target_read_memory, target_read_uint32)
6005         (target_write_memory): New functions.
6006
6007 2014-09-11  Gary Benson  <gbenson@redhat.com>
6008
6009         * server.h (debug_hw_points): Don't declare.
6010         * server.c (debug_hw_points): Don't define.  Replace all uses
6011         with show_debug_regs.
6012         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
6013         all uses with show_debug_regs.
6014
6015 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
6016
6017         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6018         endianness into account.
6019         (ppc_supply_ptrace_register): Likewise.
6020
6021 2014-09-03  James Hogan  <james.hogan@imgtec.com>
6022
6023         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6024         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6025
6026 2014-09-03  Gary Benson  <gbenson@redhat.com>
6027
6028         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6029         ALL_DEBUG_ADDRESS_REGISTERS.
6030
6031 2014-09-02  Gary Benson  <gbenson@redhat.com>
6032
6033         * i386-low.h: Renamed as...
6034         * x86-low.h: New file.  All type, function and variable name
6035         prefixes changed from "i386_" to "x86_".  All references updated.
6036         * i386-low.c: Renamed as...
6037         * x86-low.c: New file.  All type, function and variable name
6038         prefixes changed from "i386_" to "x86_".  All references updated.
6039
6040 2014-09-02  Gary Benson  <gbenson@redhat.com>
6041
6042         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6043         (x86_linux_new_thread): Likewise.
6044
6045 2014-08-29  Gary Benson  <gbenson@redhat.com>
6046
6047         * server.h (setjmp.h): Do not include.
6048         (toplevel): Do not declare.
6049         (common-exceptions.h): Include.
6050         (cleanups.h): Likewise.
6051         * server.c (toplevel): Do not define.
6052         (exit_code): New static global.
6053         (detach_or_kill_for_exit_cleanup): New function.
6054         (main): New function.  Original main renamed to...
6055         (captured_main): New function.
6056         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6057
6058 2014-08-29  Gary Benson  <gbenson@redhat.com>
6059
6060         * Makefile.in (SFILES): Add common/common-exceptions.c.
6061         (OBS): Add common-exceptions.o.
6062         (common-exceptions.o): New rule.
6063         * utils.c (prepare_to_throw_exception): New function.
6064
6065 2014-08-29  Gary Benson  <gbenson@redhat.com>
6066
6067         * config.in: Regenerate.
6068         * configure: Likewise.
6069
6070 2014-08-29  Gary Benson  <gbenson@redhat.com>
6071
6072         * Makefile.in (SFILES): Add common/cleanups.c.
6073         (OBS): cleanups.o.
6074         (cleanups.o): New rule.
6075
6076 2014-08-29  Gary Benson  <gbenson@redhat.com>
6077
6078         * utils.c (internal_vwarning): New function.
6079
6080 2014-08-28  Gary Benson  <gbenson@redhat.com>
6081
6082         * utils.h (fatal): Remove declaration.
6083         * utils.c (fatal): Remove function.
6084
6085 2014-08-28  Gary Benson  <gbenson@redhat.com>
6086
6087         * tracepoint.c (gdb_agent_init): Replace fatal with
6088         perror_with_name.
6089         (initialize_tracepoint): Likewise.
6090
6091 2014-08-28  Gary Benson  <gbenson@redhat.com>
6092
6093         * remote-utils.c (remote_prepare): Replace fatal with error.
6094
6095 2014-08-28  Gary Benson  <gbenson@redhat.com>
6096
6097         * linux-low.c (linux_async): Replace fatal with warning.
6098         Tidy up and return.
6099         (linux_start_non_stop): Return -1 if linux_async failed.
6100
6101 2014-08-28  Gary Benson  <gbenson@redhat.com>
6102
6103         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6104         gdb_assert.
6105         (i386_dr_low_get_addr): Remove vague comment.
6106         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6107         gdb_assert.
6108
6109 2014-08-28  Gary Benson  <gbenson@redhat.com>
6110
6111         * inferiors.c (get_thread_process): Replace check with gdb_assert.
6112         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6113         internal_error.
6114         (linux_resume_one_lwp): Likewise.
6115         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6116         gdb_assert.
6117         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6118         with internal_error.
6119         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6120         (init_register_cache): Replace fatal with gdb_assert_not_reached.
6121         (find_register_by_name): Replace fatal with internal_error.
6122         (find_regno): Likewise.
6123         * tdesc.c (init_target_desc): Replace check with gdb_assert.
6124         * thread-db.c (thread_db_create_event): Likewise.
6125         (thread_db_load_search): Likewise.
6126         (try_thread_db_load_1): Likewise.
6127         * tracepoint.c (get_jump_space_head): Replace fatal with
6128         internal_error.
6129         (claim_trampoline_space): Likewise.
6130         (have_fast_tracepoint_trampoline_buffer): Likewise.
6131         (cmd_qtstart): Likewise.
6132         (stop_tracing): Likewise.
6133         (fast_tracepoint_collecting): Likewise.
6134         (target_malloc): Likewise.
6135         (download_tracepoint): Likewise.
6136         (download_trace_state_variables): Replace check with gdb_assert.
6137         (upload_fast_traceframes): Replace fatal with internal_error.
6138
6139 2014-08-19  Tom Tromey  <tromey@redhat.com>
6140             Gary Benson  <gbenson@redhat.com>
6141
6142         * Makefile.in (SFILES): Add common/common-debug.c.
6143         (OBS): Add common-debug.o.
6144         (common-debug.o): New rule.
6145         * debug.h (debug_printf): Don't declare.
6146         * debug.c (debug_printf): Renamed and rewritten as...
6147         (debug_vprintf): New function.
6148
6149 2014-08-19  Gary Benson  <gbenson@redhat.com>
6150
6151         * utils.h: Do not include print-utils.h.
6152
6153 2014-08-19  Tom Tromey  <tromey@redhat.com>
6154             Gary Benson  <gbenson@redhat.com>
6155
6156         * server.h: Add static assertion.
6157         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6158
6159 2014-08-19  Tom Tromey  <tromey@redhat.com>
6160             Gary Benson  <gbenson@redhat.com>
6161
6162         * Makefile.in (SFILES): Add common/errors.c.
6163         (OBS): Add errors.o.
6164         (IPA_OBS): Add errors-ipa.o.
6165         (errors.o): New rule.
6166         (errors-ipa.o): Likewise.
6167         * utils.h (perror_with_name, error, warning): Don't declare.
6168         * utils.c (warning): Renamed and rewritten as...
6169         (vwarning): New function.
6170         (error): Renamed and rewritten as...
6171         (verror): New function.
6172         (internal_error): Renamed and rewritten as...
6173         (internal_verror): New function.
6174
6175 2014-08-07  Gary Benson  <gbenson@redhat.com>
6176
6177         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6178         * configure: Regenerate.
6179         * config.in: Likewise.
6180         * server.h: Do not include errno.h.
6181         * event-loop.c: Likewise.
6182         * hostio-errno.c: Likewise.
6183         * linux-low.c: Likewise.
6184         * remote-utils.c: Likewise.
6185         * spu-low.c: Likewise.
6186         * utils.c: Likewise.
6187         * gdbreplay.c: Unconditionally include errno.h.
6188
6189 2014-08-07  Gary Benson  <gbenson@redhat.com>
6190
6191         * server.h: Do not include string.h.
6192         * event-loop.c: Likewise.
6193         * linux-low.c: Likewise.
6194         * regcache.c: Likewise.
6195         * remote-utils.c: Likewise.
6196         * spu-low.c: Likewise.
6197         * utils.c: Likewise.
6198
6199 2014-08-07  Gary Benson  <gbenson@redhat.com>
6200
6201         * server.h: Do not include gdb_assert.h.
6202
6203 2014-08-07  Gary Benson  <gbenson@redhat.com>
6204
6205         * server.h: Do not include common-utils.h.
6206
6207 2014-08-07  Gary Benson  <gbenson@redhat.com>
6208
6209         * server.h: Do not include ptid.h.
6210         * notif.h: Likewise.
6211
6212 2014-08-07  Gary Benson  <gbenson@redhat.com>
6213
6214         * server.h: Do not include gdb_locale.h.
6215
6216 2014-08-07  Gary Benson  <gbenson@redhat.com>
6217
6218         * server.h: Do not include gdb/signals.h.
6219         * win32-low.c: Likewise.
6220
6221 2014-08-07  Gary Benson  <gbenson@redhat.com>
6222
6223         * server.h: Do not include pathmax.h.
6224
6225 2014-08-07  Gary Benson  <gbenson@redhat.com>
6226
6227         * server.h: Do not include libiberty.h.
6228         * linux-bfin-low.c: Likewise.
6229
6230 2014-08-07  Gary Benson  <gbenson@redhat.com>
6231
6232         * server.h: Do not include ansidecl.h.
6233
6234 2014-08-07  Gary Benson  <gbenson@redhat.com>
6235
6236         * linux-x86-low.c: Do not include stddef.h.
6237         * lynx-ppc-low.c: Likewise.
6238         * tracepoint.c: Likewise.
6239
6240 2014-08-07  Gary Benson  <gbenson@redhat.com>
6241
6242         * server.h: Do not include stdarg.h.
6243         * nto-low.c: Likewise.
6244
6245 2014-08-07  Gary Benson  <gbenson@redhat.com>
6246
6247         * server.h: Do not include stdlib.h.
6248         * inferiors.c: Likewise.
6249         * linux-low.c: Likewise.
6250         * regcache.c: Likewise.
6251         * spu-low.c: Likewise.
6252         * tracepoint.c: Likewise.
6253         * utils.c: Likewise.
6254
6255 2014-08-07  Gary Benson  <gbenson@redhat.com>
6256
6257         * server.h: Do not include stdio.h.
6258         * linux-low.c: Likewise.
6259         * remote-utils.c: Likewise.
6260         * spu-low.c: Likewise.
6261         * utils.c: Likewise.
6262         * wincecompat.c: Likewise.
6263
6264 2014-08-06  Gary Benson  <gbenson@redhat.com>
6265
6266         * regcache.c (init_register_cache): Move conditionals inside if.
6267
6268 2014-08-06  Gary Benson  <gbenson@redhat.com>
6269
6270         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6271
6272 2014-07-31  Gary Benson  <gbenson@redhat.com>
6273
6274         * ax.h: Do not include server.h.
6275         * gdbthread.h: Likewise.
6276         * lynx-low.h: Likewise.
6277         * notif.h: Likewise.
6278
6279 2014-07-30  Gary Benson  <gbenson@redhat.com>
6280
6281         * server.h: Include common-defs.h.
6282         Do not include config.h or build-gnulib-gdbserver/config.h.
6283
6284 2014-07-30  Gary Benson  <gbenson@redhat.com>
6285
6286         * hostio-errno.c: Move server.h to top of includes list.
6287         * inferiors.c: Likewise.
6288         * linux-x86-low.c: Likewise.
6289         * notif.c: Include server.h.
6290
6291 2014-07-24  Tom Tromey  <tromey@redhat.com>
6292             Gary Benson  <gbenson@redhat.com>
6293
6294         * server.h (CORE_ADDR): Now unsigned.
6295
6296 2014-07-16  Pedro Alves  <palves@redhat.com>
6297
6298         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6299
6300 2014-07-15  Pedro Alves  <palves@redhat.com>
6301
6302         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6303         copy.
6304
6305 2014-07-11  Pedro Alves  <palves@redhat.com>
6306
6307         * linux-low.c (kill_wait_lwp): New function, based on
6308         kill_one_lwp_callback, but use my_waitpid directly.
6309         (kill_one_lwp_callback, linux_kill): Use it.
6310
6311 2014-06-23  Pedro Alves  <palves@redhat.com>
6312
6313         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6314         before setting DR0..DR3.
6315
6316 2014-06-20  Gary Benson  <gbenson@redhat.com>
6317
6318         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6319         * configure: Regenerated.
6320         * config.in: Likewise.
6321
6322 2014-06-20  Gary Benson  <gbenson@redhat.com>
6323
6324         * Makefile.in (SFILES): Update locations for files moved
6325         from common to nat.
6326         (object file files): Reordered.
6327
6328 2014-06-20  Gary Benson  <gbenson@redhat.com>
6329
6330         * i386-low.h (i386_dr_low_can_set_addr): Removed.
6331         (i386_dr_low_set_addr): Likewise.
6332         (i386_dr_low_get_addr): Likewise.
6333         (i386_dr_low_can_set_control): Likewise.
6334         (i386_dr_low_set_control): Likewise.
6335         (i386_dr_low_get_control): Likewise.
6336         (i386_dr_low_get_status): Likewise.
6337         (i386_get_debug_register_length): Likewise.
6338         * linux-x86-low.c (i386_dr_low_set_addr):
6339         Changed signature.  Made static.
6340         (i386_dr_low_get_addr): Likewise.
6341         (i386_dr_low_set_control): Likewise.
6342         (i386_dr_low_get_control): Likewise.
6343         (i386_dr_low_get_status): Likewise.
6344         (i386_dr_low): New global variable.
6345         * win32-i386-low.c (i386_dr_low_set_addr):
6346         Changed signature.  Made static.
6347         (i386_dr_low_get_addr): Likewise.
6348         (i386_dr_low_set_control): Likewise.
6349         (i386_dr_low_get_control): Likewise.
6350         (i386_dr_low_get_status): Likewise.
6351         (i386_dr_low): New global variable.
6352
6353 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6354
6355         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6356         * Makefile.in (AR, AR_FLAGS): Define.
6357         * configure: Regenerate.
6358
6359 2014-06-19  Gary Benson  <gbenson@redhat.com>
6360
6361         * Makefile.in (i386-dregs.o): New rule.
6362         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6363         * i386-low.c (target.h): Remove include.
6364         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6365         (DR_CONTROL_SHIFT): Likewise.
6366         (DR_CONTROL_SIZE): Likewise.
6367         (DR_RW_EXECUTE): Likewise.
6368         (DR_RW_WRITE): Likewise.
6369         (DR_RW_READ): Likewise.
6370         (DR_RW_IORW): Likewise.
6371         (DR_LEN_1): Likewise.
6372         (DR_LEN_2): Likewise.
6373         (DR_LEN_4): Likewise.
6374         (DR_LEN_8): Likewise.
6375         (DR_LOCAL_ENABLE_SHIFT): Likewise.
6376         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6377         (DR_ENABLE_SIZE): Likewise.
6378         (DR_LOCAL_SLOWDOWN): Likewise.
6379         (DR_GLOBAL_SLOWDOWN): Likewise.
6380         (DR_CONTROL_RESERVED): Likewise.
6381         (I386_DR_CONTROL_MASK): Likewise.
6382         (I386_DR_VACANT): Likewise.
6383         (I386_DR_LOCAL_ENABLE): Likewise.
6384         (I386_DR_GLOBAL_ENABLE): Likewise.
6385         (I386_DR_DISABLE): Likewise.
6386         (I386_DR_SET_RW_LEN): Likewise.
6387         (I386_DR_GET_RW_LEN): Likewise.
6388         (I386_DR_WATCH_HIT): Likewise.
6389         (i386_wp_op_t): Likewise.
6390         (i386_show_dr): Likewise.
6391         (i386_length_and_rw_bits): Likewise.
6392         (i386_insert_aligned_watchpoint): Likewise.
6393         (i386_remove_aligned_watchpoint): Likewise.
6394         (i386_handle_nonaligned_watchpoint): Likewise.
6395         i386_update_inferior_debug_regs(): Likewise.
6396         (i386_dr_insert_watchpoint): Likewise.
6397         (i386_dr_remove_watchpoint): Likewise.
6398         (i386_dr_region_ok_for_watchpoint): Likewise.
6399         (i386_dr_stopped_data_address): Likewise.
6400         (i386_dr_stopped_by_watchpoint): Likewise.
6401
6402 2014-06-19  Gary Benson  <gbenson@redhat.com>
6403
6404         * i386-low.c (i386_dr_show): Renamed to
6405         i386_show_dr and made static.  All uses updated.
6406         (i386_dr_length_and_rw_bits): Renamed to
6407         i386_length_and_rw_bits and made static.
6408         All uses updated.
6409         (i386_dr_insert_aligned_watchpoint): Renamed to
6410         i386_insert_aligned_watchpoint and made static.
6411         All uses updated.
6412         (i386_dr_remove_aligned_watchpoint): Renamed to
6413         i386_remove_aligned_watchpoint and made static.
6414         All uses updated.
6415         (i386_dr_update_inferior_debug_regs): Renamed to
6416         i386_update_inferior_debug_regs and made static.
6417         All uses updated.
6418
6419 2014-06-18  Gary Benson  <gbenson@redhat.com>
6420
6421         * i386-low.h (i386_dr_low_can_set_addr): New macro.
6422         (i386_dr_low_can_set_control): Likewise.
6423         (i386_get_debug_register_length): Likewise.
6424         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6425         (i386_dr_low_can_set_control): Likewise.
6426         (i386_get_debug_register_length): Likewise.
6427
6428 2014-06-17  Gary Benson  <gbenson@redhat.com>
6429
6430         * i386-low.h (i386-dregs.h): New include.
6431         (DR_FIRSTADDR): Now in i386-dregs.h.
6432         (DR_LASTADDR): Likewise.
6433         (DR_NADDR): Likewise.
6434         (DR_STATUS): Likewise.
6435         (DR_CONTROL): Likewise.
6436         (i386_debug_reg_state): Likewise.
6437         (i386_dr_insert_watchpoint): Likewise.
6438         (i386_dr_remove_watchpoint): Likewise.
6439         (i386_dr_region_ok_for_watchpoint): Likewise.
6440         (i386_dr_stopped_data_address): Likewise.
6441         (i386_dr_stopped_by_watchpoint): Likewise.
6442         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6443
6444 2014-06-18  Gary Benson  <gbenson@redhat.com>
6445
6446         * i386-low.h (i386_low_insert_watchpoint): Renamed to
6447         i386_dr_insert_watchpoint.
6448         (i386_low_remove_watchpoint): Renamed to
6449         i386_dr_remove_watchpoint.
6450         (i386_low_region_ok_for_watchpoint): Renamed to
6451         i386_dr_region_ok_for_watchpoint.
6452         (i386_low_stopped_data_address): Renamed to
6453         i386_dr_stopped_data_address.
6454         (i386_low_stopped_by_watchpoint): Renamed to
6455         i386_dr_stopped_by_watchpoint.
6456         * i386-low.c (i386_show_dr): Renamed to
6457         i386_dr_show and made nonstatic.  All uses updated.
6458         (i386_length_and_rw_bits): Renamed to
6459         i386_dr_length_and_rw_bits and made nonstatic.
6460         All uses updated.
6461         (i386_insert_aligned_watchpoint): Renamed to
6462         i386_dr_insert_aligned_watchpoint and made nonstatic.
6463         All uses updated.
6464         (i386_remove_aligned_watchpoint): Renamed to
6465         i386_dr_remove_aligned_watchpoint and made nonstatic.
6466         All uses updated.
6467         (i386_update_inferior_debug_regs): Renamed to
6468         i386_dr_update_inferior_debug_regs and made nonstatic.
6469         All uses updated.
6470         (i386_low_insert_watchpoint): Renamed to
6471         i386_dr_insert_watchpoint.  All uses updated.
6472         (i386_low_remove_watchpoint): Renamed to
6473         i386_dr_remove_watchpoint.  All uses updated.
6474         (i386_low_region_ok_for_watchpoint): Renamed to
6475         i386_dr_region_ok_for_watchpoint.  All uses updated.
6476         (i386_low_stopped_data_address): Renamed to
6477         i386_dr_stopped_data_address.  All uses updated.
6478         (i386_low_stopped_by_watchpoint): Renamed to
6479         i386_dr_stopped_by_watchpoint.  All uses updated.
6480
6481 2014-06-18  Gary Benson  <gbenson@redhat.com>
6482
6483         * i386-low.c (i386_dr_low_can_set_addr): New macro.
6484         (i386_dr_low_can_set_control): Likewise.
6485         (i386_insert_aligned_watchpoint): New check.
6486
6487 2014-06-18  Gary Benson  <gbenson@redhat.com>
6488
6489         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6490         Renamed to state.
6491
6492 2014-06-18  Gary Benson  <gbenson@redhat.com>
6493
6494         * i386-low.c (i386_length_and_rw_bits): Use internal_error
6495         instead of fatal and error.
6496         (i386_handle_nonaligned_watchpoint): Likewise.
6497
6498 2014-06-18  Gary Benson  <gbenson@redhat.com>
6499
6500         * i386-low.c (i386_get_debug_register_length): New macro.
6501         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
6502         (i386_show_dr): Use debug_printf instead of fprintf.  Use
6503         phex to format values.
6504
6505 2014-06-18  Gary Benson  <gbenson@redhat.com>
6506
6507         * i386-low.h: Comment changes.
6508         * i386-low.c: Likewise.
6509
6510 2014-06-18  Gary Benson  <gbenson@redhat.com>
6511
6512         * i386-low.c: Whitespace changes.
6513
6514 2014-06-12  Tom Tromey  <tromey@redhat.com>
6515
6516         * utils.c (freeargv): Remove.
6517
6518 2014-06-12  Tom Tromey  <tromey@redhat.com>
6519
6520         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6521         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6522         (parse_debug_format_options): Likewise.
6523         (gdbserver_usage): Likewise.
6524         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6525         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6526         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6527         against libiberty.
6528         ($(LIBGNU)): Depend on libiberty.
6529         (all-lib): Recurse into all subdirs.
6530         (install-only): Invoke "install" target in subdirs.
6531         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6532         targets.
6533         * configure: Rebuild.
6534         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
6535         for vasprintf, vsnprintf, or gettimeofday.
6536         * configure.srv: Don't add safe-ctype.o or lbasename.o to
6537         srv_tgtobj.
6538
6539 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
6540
6541         * development.sh: Delete.
6542         * Makefile.in (config.status): Adjust dependency on development.sh.
6543         * configure.ac: Adjust development.sh source call.
6544         * configure: Regenerate.
6545
6546 2014-06-02  Pedro Alves  <palves@redhat.com>
6547
6548         * ax.c (gdb_free_agent_expr): New function.
6549         * ax.h (gdb_free_agent_expr): New declaration.
6550         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6551         list.
6552         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6553         static.
6554         (clear_breakpoint_conditions_and_commands): New function.
6555         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6556         (clear_breakpoint_conditions_and_commands): New declaration.
6557
6558 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6559
6560         * linux-aarch64-low.c (asm/ptrace.h): Include.
6561
6562 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
6563
6564         Fix TLS access for -static -pthread.
6565         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6566         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6567         (thread_db_load_search, try_thread_db_load_1): Initialize it.
6568
6569 2014-05-20  Pedro Alves  <palves@redhat.com>
6570
6571         * linux-aarch64-low.c (aarch64_insert_point)
6572         (aarch64_remove_point): No longer check whether the type is
6573         supported here.  Adjust to new interface.
6574         (the_low_target): Install aarch64_supports_z_point_type as
6575         supports_z_point_type method.
6576         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6577         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6578         instead of a Z packet char.  Adjust.
6579         (arm_supports_z_point_type): New function.
6580         (arm_insert_point, arm_remove_point): Adjust to new interface.
6581         (the_low_target): Install arm_supports_z_point_type.
6582         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6583         (cris_insert_point, cris_remove_point): Adjust to new interface.
6584         Don't check whether the type is supported here.
6585         (the_low_target): Install cris_supports_z_point_type.
6586         * linux-low.c (linux_supports_z_point_type): New function.
6587         (linux_insert_point, linux_remove_point): Adjust to new interface.
6588         * linux-low.h (struct linux_target_ops) <insert_point,
6589         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
6590         raw_breakpoint pointer parameter.
6591         <supports_z_point_type>: New method.
6592         * linux-mips-low.c (mips_supports_z_point_type): New function.
6593         (mips_insert_point, mips_remove_point): Adjust to new interface.
6594         Use mips_supports_z_point_type.
6595         (the_low_target): Install mips_supports_z_point_type.
6596         * linux-ppc-low.c (the_low_target): Install NULL as
6597         supports_z_point_type method.
6598         * linux-s390-low.c (the_low_target): Install NULL as
6599         supports_z_point_type method.
6600         * linux-sparc-low.c (the_low_target): Install NULL as
6601         supports_z_point_type method.
6602         * linux-x86-low.c (x86_supports_z_point_type): New function.
6603         (x86_insert_point): Adjust to new insert_point interface.  Use
6604         insert_memory_breakpoint.  Adjust to new
6605         i386_low_insert_watchpoint interface.
6606         (x86_remove_point): Adjust to remove_point interface.  Use
6607         remove_memory_breakpoint.  Adjust to new
6608         i386_low_remove_watchpoint interface.
6609         (the_low_target): Install x86_supports_z_point_type.
6610         * lynx-low.c (lynx_target_ops): Install NULL as
6611         supports_z_point_type callback.
6612         * nto-low.c (nto_supports_z_point_type): New.
6613         (nto_insert_point, nto_remove_point): Adjust to new interface.
6614         (nto_target_ops): Install nto_supports_z_point_type.
6615         * mem-break.c: Adjust intro comment.
6616         (struct raw_breakpoint) <raw_type, size>: New fields.
6617         <inserted>: Update comment.
6618         <shlib_disabled>: Delete field.
6619         (enum bkpt_type) <gdb_breakpoint>: Delete value.
6620         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6621         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6622         (raw_bkpt_type_to_target_hw_bp_type): New function.
6623         (find_enabled_raw_code_breakpoint_at): New function.
6624         (find_raw_breakpoint_at): New type and size parameters.  Use them.
6625         (insert_memory_breakpoint): New function, based off
6626         set_raw_breakpoint_at.
6627         (remove_memory_breakpoint): New function.
6628         (set_raw_breakpoint_at): Reimplement.
6629         (set_breakpoint): New, based on set_breakpoint_at.
6630         (set_breakpoint_at): Reimplement.
6631         (delete_raw_breakpoint): Go through the_target->remove_point
6632         instead of assuming memory breakpoints.
6633         (find_gdb_breakpoint_at): Delete.
6634         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6635         (find_gdb_breakpoint): New function.
6636         (set_gdb_breakpoint_at): Delete.
6637         (z_type_supported): New function.
6638         (set_gdb_breakpoint_1): New function, loosely based off
6639         set_gdb_breakpoint_at.
6640         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6641         (delete_gdb_breakpoint_at): Delete.
6642         (delete_gdb_breakpoint_1): New function, loosely based off
6643         delete_gdb_breakpoint_at.
6644         (delete_gdb_breakpoint): New function.
6645         (clear_gdb_breakpoint_conditions): Rename to ...
6646         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
6647         breakpoint.
6648         (add_condition_to_breakpoint): Make static.
6649         (add_breakpoint_condition): Take a struct breakpoint pointer
6650         instead of an address.  Adjust.
6651         (gdb_condition_true_at_breakpoint): Rename to ...
6652         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6653         z_type parameter.
6654         (gdb_condition_true_at_breakpoint): Reimplement.
6655         (add_breakpoint_commands): Take a struct breakpoint pointer
6656         instead of an address.  Adjust.
6657         (gdb_no_commands_at_breakpoint): Rename to ...
6658         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
6659         parameter.  Return true if no breakpoint was found.  Change debug
6660         output.
6661         (gdb_no_commands_at_breakpoint): Reimplement.
6662         (run_breakpoint_commands): Rename to ...
6663         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
6664         and change return type to boolean.
6665         (run_breakpoint_commands): New function.
6666         (gdb_breakpoint_here): Also check for Z1 breakpoints.
6667         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6668         breakpoint.  Go through the_target->remove_point instead of
6669         assuming memory breakpoint.
6670         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6671         software and hardware breakpoints.
6672         (reinsert_raw_breakpoint): Go through the_target->insert_point
6673         instead of assuming memory breakpoint.
6674         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6675         software and hardware breakpoints.
6676         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6677         Check both software and hardware breakpoints.
6678         (validate_inserted_breakpoint): Assert the breakpoint is a
6679         software breakpoint.  Set the inserted flag to -1 instead of
6680         setting shlib_disabled.
6681         (delete_disabled_breakpoints): Adjust.
6682         (validate_breakpoints): Only validate software breakpoints.
6683         Adjust to inserted flag change.
6684         (check_mem_read, check_mem_write): Skip breakpoint types other
6685         than software breakpoints.  Adjust to inserted flag change.
6686         * mem-break.h (enum raw_bkpt_type): New enum.
6687         (raw_breakpoint, struct process_info): Forward declare.
6688         (Z_packet_to_target_hw_bp_type): Delete declaration.
6689         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6690         (set_gdb_breakpoint, delete_gdb_breakpoint)
6691         (clear_breakpoint_conditions): New declarations.
6692         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6693         (breakpoint_inserted_here): Update comment.
6694         (add_breakpoint_condition, add_breakpoint_commands): Replace
6695         address parameter with a breakpoint pointer parameter.
6696         (gdb_breakpoint_here): Update comment.
6697         (delete_gdb_breakpoint_at): Delete.
6698         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6699         * server.c (process_point_options): Take a struct breakpoint
6700         pointer instead of an address.  Adjust.
6701         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6702         delete_gdb_breakpoint.
6703         * spu-low.c (spu_target_ops): Install NULL as
6704         supports_z_point_type method.
6705         * target.h: Include mem-break.h.
6706         (struct target_ops) <prepare_to_access_memory>: Update comment.
6707         <supports_z_point_type>: New field.
6708         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6709         instead of a char.  Also take a raw breakpoint pointer.
6710         * win32-arm-low.c (the_low_target): Install NULL as
6711         supports_z_point_type.
6712         * win32-i386-low.c (i386_supports_z_point_type): New function.
6713         (i386_insert_point, i386_remove_point): Adjust to new interface.
6714         (the_low_target): Install i386_supports_z_point_type.
6715         * win32-low.c (win32_supports_z_point_type): New function.
6716         (win32_insert_point, win32_remove_point): Adjust to new interface.
6717         (win32_target_ops): Install win32_supports_z_point_type.
6718         * win32-low.h (struct win32_target_ops):
6719         <supports_z_point_type>: New method.
6720         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6721         instead of a char.  Also take a raw breakpoint pointer.
6722
6723 2014-05-20  Pedro Alves  <palves@redhat.com>
6724
6725         * mem-break.h: Include break-common.h.
6726         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6727         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6728         (Z_packet_to_target_hw_bp_type): New declaration.
6729         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6730         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6731         (Z_PACKET_ACCESS_WP): Delete macros.
6732         (Z_packet_to_hw_type): Delete function.
6733         * i386-low.h: Don't include break-common.h here.
6734         (Z_packet_to_hw_type): Delete declaration.
6735         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6736         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6737         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6738         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6739         * linux-aarch64-low.c: Don't include break-common.h here.
6740         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6741         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6742         (Z_packet_to_target_hw_bp_type): Delete function.
6743         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6744         function.
6745         (mips_insert_point, mips_remove_point): Use
6746         Z_packet_to_target_hw_bp_type.
6747
6748 2014-05-20  Pedro Alves  <palves@redhat.com>
6749
6750         * linux-aarch64-low.c: Include break-common.h.
6751         (enum target_point_type): Delete.
6752         (Z_packet_to_point_type): Rename to ...
6753         (Z_packet_to_target_hw_bp_type): ... this, and return a
6754         target_hw_bp_type instead.
6755         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6756         instead of an enum target_point_type.
6757         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
6758         breakpoint type.
6759         (aarch64_dr_state_insert_one_point)
6760         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6761         (aarch64_handle_aligned_watchpoint)
6762         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6763         Take an enum target_hw_bp_type instead of an enum
6764         target_point_type.
6765         (aarch64_supports_z_point_type): New function.
6766         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
6767         use Z_packet_to_target_hw_bp_type.
6768
6769 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
6770
6771         * configure.ac: Only use -Werror by default when DEVELOPMENT
6772         is true.
6773         * configure: Regenerate.
6774
6775 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
6776
6777         Fix gdbserver qGetTLSAddr for x86_64 -m32.
6778         * linux-x86-low.c (X86_64_USER_REGS): New.
6779         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6780
6781 2014-04-28  Yao Qi  <yao@codesourcery.com>
6782
6783         * Makefile.in (i386-avx512.c): Fix the typo of generated file
6784         name.
6785
6786 2014-04-25  Pedro Alves  <palves@redhat.com>
6787
6788         PR server/16255
6789         * linux-low.c (linux_attach_fail_reason_string): New function.
6790         (linux_attach_lwp): Delete.
6791         (linux_attach_lwp_1): Rename to ...
6792         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
6793         argument.  Remove "initial" parameter.  Return int instead of
6794         void.  Don't error or warn here.
6795         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
6796         failure to attach to the tgid.  Call warning when failing to
6797         attach to an lwp.
6798         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6799         argument.  Remove "initial" parameter.  Return int instead of
6800         void.  Don't error or warn here.
6801         (linux_attach_fail_reason_string): New declaration.
6802         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6803         interface change.  Use linux_attach_fail_reason_string.
6804
6805 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
6806             Walfred Tedeschi  <walfred.tedeschi@intel.com>
6807
6808         * Makefile.in: Added rules to handle new files
6809         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6810         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6811         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6812         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6813         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6814         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6815         x32-avx512-linux.o.
6816         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6817         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6818         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6819         i386/x32-avx512.xml.
6820         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6821         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6822         i386/x32-avx512-linux.xml.
6823         * i387-fp.c (num_avx512_k_registers): New constant for number
6824         of K registers.
6825         (num_avx512_zmmh_low_registers): New constant for number of
6826         lower ZMM registers (0-15).
6827         (num_avx512_zmmh_high_registers): New constant for number of
6828         higher ZMM registers (16-31).
6829         (num_avx512_ymmh_registers): New contant for number of higher
6830         YMM registers (ymm16-31 added by avx521 on x86_64).
6831         (num_avx512_xmm_registers): New constant for number of higher
6832         XMM registers (xmm16-31 added by AVX512 on x86_64).
6833         (struct i387_xsave): Add space for AVX512 registers.
6834         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6835         Add code to handle AVX512 registers.
6836         (i387_xsave_to_cache): Add code to handle AVX512 registers.
6837         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6838         prototypei from generated file.
6839         (tdesc_amd64_avx512_linux): Likewise.
6840         (init_registers_x32_avx512_linux): Likewise.
6841         (tdesc_x32_avx512_linux): Likewise.
6842         (init_registers_i386_avx512_linux): Likewise.
6843         (tdesc_i386_avx512_linux): Likewise.
6844         (x86_64_regmap): Add AVX512 registers.
6845         (x86_linux_read_description): Add code to handle AVX512 XSTATE
6846         mask.
6847         (initialize_low_arch): Add code to initialize AVX512 registers.
6848
6849 2014-04-23  Pedro Alves  <palves@redhat.com>
6850
6851         * mem-break.c (find_gdb_breakpoint_at): Make static.
6852         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6853
6854 2014-04-23  Pedro Alves  <palves@redhat.com>
6855
6856         * i386-low.c: Don't include break-common.h here.
6857         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6858         prototype to take target_hw_bp_type as argument instead of a Z
6859         packet char.
6860         * i386-low.h: Include break-common.h here.
6861         (Z_packet_to_hw_type): Declare.
6862         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6863         prototypes.
6864         * linux-x86-low.c (x86_insert_point): Convert the packet number to
6865         a target_hw_bp_type before calling i386_low_insert_watchpoint.
6866         (x86_remove_point): Convert the packet number to a
6867         target_hw_bp_type before calling i386_low_remove_watchpoint.
6868         * win32-i386-low.c (i386_insert_point): Convert the packet number
6869         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6870         (i386_remove_point): Convert the packet number to a
6871         target_hw_bp_type before calling i386_low_remove_watchpoint.
6872
6873 2014-04-23  Pedro Alves  <palves@redhat.com>
6874
6875         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6876
6877 2014-04-10  Pedro Alves  <palves@redhat.com>
6878
6879         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6880         Check if the condition or command is NULL before checking if the
6881         breakpoint is known.  On success, return true.
6882         * mem-break.h (add_breakpoint_condition): Document return.
6883         (add_breakpoint_commands): Add describing comment.
6884         * server.c (skip_to_semicolon): New function.
6885         (process_point_options): Use it.
6886
6887 2014-04-09  Pedro Alves  <palves@redhat.com>
6888
6889         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6890         to lwpid_of.
6891
6892 2014-02-27  Pedro Alves  <palves@redhat.com>
6893
6894         PR 12702
6895         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6896         macros.
6897         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6898         output.
6899         (last_thread_of_process_p): Take a PID argument instead of a
6900         thread pointer.
6901         (linux_wait_for_lwp): Delete.
6902         (num_lwps, check_zombie_leaders, not_stopped_callback): New
6903         functions.
6904         (linux_low_filter_event): New function, party factored out from
6905         linux_wait_for_event.
6906         (linux_wait_for_event): Rename to ...
6907         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
6908         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
6909         sigsuspend.  Check for zombie leaders.
6910         (linux_wait_for_event): Reimplement as wrapper around
6911         linux_wait_for_event_filtered.
6912         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
6913         a normal or signal exit is seen, it's the whole process exiting.
6914         (wait_for_sigstop): No longer a for_each_inferior callback.
6915         Rewrite on top of linux_wait_for_event_filtered.
6916         (stop_all_lwps): Call wait_for_sigstop directly.
6917         * server.c (resume, handle_target_event): Handle
6918         TARGET_WAITKIND_NO_RESUMED.
6919
6920 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
6921
6922         * win32-low.c (psapi_get_dll_name,
6923         * win32_CreateToolhelp32Snapshot): Delete.
6924         (win32_CreateToolhelp32Snapshot, win32_Module32First)
6925         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6926         Delete.
6927         (handle_load_dll): Add function description.
6928         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6929
6930 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
6931
6932         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6933         Add comment.
6934         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6935         base address when calling win32_add_one_solib.
6936         (handle_load_dll): Delete local variable load_addr.
6937         Remove 0x1000 offset applied to DLL base address when calling
6938         win32_add_one_solib.
6939         (handle_unload_dll): Add comment.
6940
6941 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
6942
6943         * win32-low.c (win32_add_all_dlls): Renames
6944         win32_ensure_ntdll_loaded.  Rewrite function documentation.
6945         Adjust implementation to always load all DLLs.
6946         Add 0x1000 offset to DLL base address when calling
6947         win32_add_one_solib.
6948         (child_initialization_done): New static global.
6949         (do_initial_child_stuff): Set child_initialization_done to
6950         zero during child initialization, and 1 after.  Replace call
6951         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6952         Add comment.
6953         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6954         (handle_unload_dll): Add function documentation.
6955         (get_child_debug_event): Ignore load and unload DLL events
6956         during child initialization.
6957
6958 2014-02-20  Doug Evans  <dje@google.com>
6959
6960         Remove global all_lwps.
6961         * inferiors.h (ptid_of): Move here from linux-low.h.
6962         (pid_of, lwpid_of): Ditto.
6963         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6964         parameter is a struct thread_info * now.
6965         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6966         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
6967         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6968         directly.
6969         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6970         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6971         * linux-arm-low.c (update_registers_callback): Update, "entry"
6972         parameter is a struct thread_info * now.
6973         Fetch lwpid from current_inferior directly.
6974         (arm_insert_point): Pass &all_threads to find_inferior instead of
6975         &all_lwps.
6976         (arm_remove_point): Ditto.
6977         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6978         (arm_prepare_to_resume): Fetch pid from thread.
6979         (arm_read_description): Fetch lwpid from current_inferior directly.
6980         * linux-low.c (all_lwps): Delete.
6981         (delete_lwp): Delete call to remove_inferior.
6982         (handle_extended_wait): Fetch lwpid from thread.
6983         (add_lwp): Don't set lwp->entry.id.  Remove call to
6984         add_inferior_to_list.
6985         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6986         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6987         (kill_one_lwp_callback): Ditto.
6988         (linux_kill): Don't dereference NULL pointer.
6989         Fetch ptid,lwpid from thread.
6990         (get_detach_signal): Fetch ptid from thread.
6991         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6992         Simplify call to regcache_invalidate_thread.
6993         (delete_lwp_callback): Update, "entry" parameter is a
6994         struct thread_info * now.  Fetch pid from thread.
6995         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6996         (status_pending_p_callback): Update, "entry" parameter is a
6997         struct thread_info * now.  Fetch ptid from thread.
6998         (find_lwp_pid): Update, "entry" parameter is a
6999         struct thread_info * now.
7000         (linux_wait_for_lwp): Fetch pid from thread.
7001         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7002         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7003         (enqueue_one_deferred_signal): Fetch lwpid from thread.
7004         (dequeue_one_deferred_signal): Ditto.
7005         (cancel_breakpoint): Fetch ptid from current_inferior.
7006         (linux_wait_for_event): Pass &all_threads to find_inferior,
7007         not &all_lwps.  Fetch ptid, lwpid from thread.
7008         (count_events_callback): Update, "entry" parameter is a
7009         struct thread_info * now.
7010         (select_singlestep_lwp_callback): Ditto.
7011         (select_event_lwp_callback): Ditto.
7012         (cancel_breakpoints_callback): Ditto.
7013         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7014         not &all_lwps.
7015         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
7016         (unsuspend_one_lwp): Update, "entry" parameter is a
7017         struct thread_info * now.
7018         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7019         not &all_lwps.
7020         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
7021         Fetch lwpid from thread, not lwp.
7022         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7023         Pass &all_threads to find_inferior, not &all_lwps.
7024         (send_sigstop): Fetch lwpid from thread, not lwp.
7025         (send_sigstop_callback): Update, "entry" parameter is a
7026         struct thread_info * now.
7027         (suspend_and_send_sigstop_callback): Ditto.
7028         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
7029         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7030         struct thread_info * now.
7031         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
7032         from thread, lwp.
7033         (lwp_running): Update, "entry" parameter is a
7034         struct thread_info * now.
7035         (stop_all_lwps): Fetch ptid from thread.
7036         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7037         (linux_resume_one_lwp): Fetch lwpid from thread.
7038         (linux_set_resume_request): Update, "entry" parameter is a
7039         struct thread_info * now.  Fetch pid, lwpid from thread.
7040         (resume_status_pending_p): Update, "entry" parameter is a
7041         struct thread_info * now.
7042         (need_step_over_p): Ditto.  Fetch lwpid from thread.
7043         (start_step_over): Fetch lwpid from thread.
7044         (linux_resume_one_thread): Update, "entry" parameter is a
7045         struct thread_info * now.  Fetch lwpid from thread.
7046         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7047         (proceed_one_lwp): Update, "entry" parameter is a
7048         struct thread_info * now.  Fetch lwpid from thread.
7049         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7050         struct thread_info * now.
7051         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7052         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
7053         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7054         directly.
7055         (regsets_store_inferior_registers): Ditto.
7056         (fetch_register, store_register): Ditto.
7057         (linux_read_memory, linux_write_memory): Ditto.
7058         (linux_request_interrupt): Ditto.
7059         (linux_read_auxv): Ditto.
7060         (linux_xfer_siginfo): Ditto.
7061         (linux_qxfer_spu): Ditto.
7062         (linux_qxfer_libraries_svr4): Ditto.
7063         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7064         moved to inferiors.h.
7065         (get_lwp): Delete.
7066         (get_thread_lwp): Update.
7067         (struct lwp_info): Delete member "entry".  Simplify comment for
7068         member "thread".
7069         (all_lwps): Delete.
7070         * linux-mips-low.c (mips_read_description): Fetch lwpid from
7071         current_inferior directly.
7072         (update_watch_registers_callback): Update, "entry" parameter is a
7073         struct thread_info * now.  Fetch pid from thread.
7074         (mips_linux_prepare_to_resume): Fetch ptid from thread.
7075         (mips_insert_point): Fetch lwpid from current_inferior.
7076         Pass &all_threads to find_inferior, not &all_lwps.
7077         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7078         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7079         directly.
7080         (mips_stopped_data_address): Ditto.
7081         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7082         directly.
7083         * linux-tile-low.c (tile_arch_setup): Ditto.
7084         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7085         (update_debug_registers_callback): Update, "entry" parameter is a
7086         struct thread_info * now.  Fetch pid from thread.
7087         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7088         Pass &all_threads to find_inferior, not &all_lwps.
7089         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7090         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7091         Pass &all_threads to find_inferior, not &all_lwps.
7092         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7093         (i386_dr_low_get_status): Ditto.
7094         (x86_linux_prepare_to_resume): Fetch ptid from thread.
7095         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7096         (x86_linux_read_description): Ditto.
7097         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7098
7099 2014-02-20  Doug Evans  <dje@google.com>
7100
7101         * inferiors.c (get_first_inferior): Fix buglet.
7102
7103 2014-02-19  Doug Evans  <dje@google.com>
7104
7105         * gdbthread.h (add_thread): Change result type to struct thread_info *.
7106         * inferiors.c (add_thread): Change result type to struct thread_info *.
7107         All callers updated.
7108         (add_lwp): Call add_thread here instead of in callers.
7109         All callers updated.
7110         * linux-low.h (get_lwp_thread): Rewrite.
7111         (struct lwp_info): New member "thread".
7112
7113 2014-02-19  Doug Evans  <dje@google.com>
7114
7115         * linux-low.c (add_lwp): Change result to struct lwp_info *.
7116         All callers updated.
7117
7118 2014-02-19  Doug Evans  <dje@google.com>
7119
7120         * inferiors.c (add_thread): Fix whitespace.
7121
7122 2014-02-19  Doug Evans  <dje@google.com>
7123
7124         * dll.c (clear_dlls): Replace accessing list implemention details
7125         with API function.
7126         * gdbthread.h (get_first_thread): Declare.
7127         * inferiors.c (for_each_inferior_with_data): New function.
7128         (get_first_thread): New function.
7129         (find_thread_ptid): Simplify.
7130         (get_first_inferior): New function.
7131         (clear_list): Delete.
7132         (one_inferior_p): New function.
7133         (clear_inferior_list): New function.
7134         (clear_inferiors): Update.
7135         * inferiors.h (for_each_inferior_with_data): Declare.
7136         (clear_inferior_list): Declare.
7137         (one_inferior_p): Declare.
7138         (get_first_inferior): Declare.
7139         * linux-low.c (linux_wait_for_event): Replace accessing list
7140         implemention details with API function.
7141         * server.c (target_running): Ditto.
7142         (accumulate_file_name_length): New function.
7143         (emit_dll_description): New function.
7144         (handle_qxfer_libraries): Replace accessing list implemention
7145         details with API function.
7146         (handle_qxfer_threads_worker): New function.
7147         (handle_qxfer_threads_proper): Replace accessing list implemention
7148         details with API function.
7149         (handle_query): Ditto.
7150         (visit_actioned_threads_callback_ftype): New typedef.
7151         (visit_actioned_threads_data): New struct.
7152         (visit_actioned_threads): Rewrite to be find_inferior callback.
7153         (resume): Call find_inferior.
7154         (handle_status): Replace accessing list implemention
7155         details with API function.
7156         (process_serial_event): Replace accessing list implemention details
7157         with API function.
7158         * target.c (set_desired_inferior): Replace accessing list implemention
7159         details with API function.
7160         * tracepoint.c (same_process_p): New function.
7161         (gdb_agent_about_to_close): Replace accessing list implemention
7162         details with API function.
7163         * win32-low.c (child_delete_thread): Replace accessing list
7164         implemention details with API function.
7165         (match_dll_by_basename): New function.
7166         (dll_is_loaded_by_basename): New function.
7167         (win32_ensure_ntdll_loaded): Replace accessing list implemention
7168         details call to dll_is_loaded_by_basename.
7169
7170 2014-02-19  Doug Evans  <dje@google.com>
7171
7172         * dll.h (struct dll_info): Add comment.
7173         * gdbthread.h (struct thread_info): Add comment.
7174         (current_ptid): Simplify.
7175         * inferiors.c (add_process): Update.
7176         (remove_process): Update.
7177         * inferiors.h (struct process_info): Rename member "head" to "entry".
7178         * linux-low.c (delete_lwp): Update.
7179         (add_lwp): Update.
7180         (last_thread_of_process_p): Update.
7181         (kill_one_lwp_callback, linux_kill): Update.
7182         (status_pending_p_callback): Update.
7183         (wait_for_sigstop): Update.  Simplify read of ptid.
7184         (start_step_over): Update.
7185         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7186         (get_lwp_thread): Update.
7187         (struct lwp_info): Rename member "head" to "entry".
7188         * regcache.h (inferior_list_entry): Delete.
7189         * server.c (kill_inferior_callback): Update.
7190         (detach_or_kill_inferior_callback): Update.
7191         (print_started_pid): Update.
7192         (print_attached_pid): Update.
7193         (process_serial_event): Simplify read of ptid.
7194         * thread-db.c (thread_db_create_event): Update.
7195         (thread_db_get_tls_address): Update.
7196         * win32-low.c (current_inferior_ptid): Simplify.
7197
7198 2014-02-19  Tom Tromey  <tromey@redhat.com>
7199
7200         * target.h (struct target_ops) <supports_btrace>: Add target_ops
7201         argument.
7202         (target_supports_btrace): Update.
7203
7204 2014-02-14  Yao Qi  <yao@codesourcery.com>
7205
7206         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7207         (rsp-low-ipa.o): New target.
7208
7209 2014-02-12  Tom Tromey  <tromey@redhat.com>
7210
7211         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7212         convert_ascii_to_int.
7213         * regcache.c (registers_to_string): Likewise.
7214         * remote-utils.c (decode_M_packet): Likewise.
7215         * server.c (process_serial_event): Likewise.
7216
7217 2014-02-12  Tom Tromey  <tromey@redhat.com>
7218
7219         * server.c (handle_query, handle_v_run): Use hex2bin, not
7220         unhexify.
7221         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7222
7223 2014-02-12  Tom Tromey  <tromey@redhat.com>
7224
7225         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7226         convert_int_to_ascii.
7227         * regcache.c (registers_to_string, collect_register_as_string):
7228         Likewise.
7229         * remote-utils.c (look_up_one_symbol, relocate_instruction):
7230         Likewise.
7231         * server.c (process_serial_event): Likewise.
7232         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7233         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7234
7235 2014-02-12  Tom Tromey  <tromey@redhat.com>
7236
7237         * remote-utils.c (look_up_one_symbol, monitor_output): Use
7238         bin2hex, not hexify.
7239         * tracepoint.c (cmd_qtstatus): Likewise.
7240
7241 2014-02-12  Tom Tromey  <tromey@redhat.com>
7242
7243         * remote-utils.c (monitor_output): Pass explicit length to
7244         hexify.
7245
7246 2014-02-12  Tom Tromey  <tromey@redhat.com>
7247
7248         * tracepoint.c: Include rsp-low.h.
7249         * server.c: Include rsp-low.h.
7250         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7251         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7252         declare.
7253         * remote-utils.c: Include rsp-low.h.
7254         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7255         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7256         (convert_int_to_ascii, convert_ascii_to_int): Move to
7257         common/rsp-low.c.
7258         * regcache.c: Include rsp-low.h.
7259         * ax.c: Include rsp-low.h.
7260         * Makefile.in (SFILES): Add common/rsp-low.c.
7261         (OBS): Add rsp-low.o.
7262         (rsp-low.o): New target.
7263
7264 2014-02-12  Tom Tromey  <tromey@redhat.com>
7265
7266         * utils.h (pulongest, plongest, phex_nz): Don't declare.
7267         Include print-utils.h.
7268         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7269         (plongest, thirty_two, phex_nz): Remove.
7270         * Makefile.in (SFILES): Add common/print-utils.c.
7271         (OBS): Add print-utils.o.
7272         (print-utils-ipa.o): New target.
7273         (print-utils.o): New target.
7274         (IPA_OBJS): Add print-utils-ipa.o.
7275
7276 2014-02-06  Tom Tromey  <tromey@redhat.com>
7277
7278         * Makefile.in (SFILES): Fix indentation.
7279
7280 2014-02-05  Doug Evans  <dje@google.com>
7281
7282         * linux-low.c (linux_wait_for_event): Improve comment.
7283         (linux_wait_1): Keep current_inferior in sync with event_child.
7284
7285 2014-01-22  Doug Evans  <dje@google.com>
7286
7287         * gdbthread.h (gdb_id_to_thread): Delete, unused.
7288
7289 2014-01-22  Doug Evans  <dje@google.com>
7290
7291         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7292         * configure: Regenerate.
7293         * config.in: Regenerate.
7294         * Makefile.in (SFILES): Add debug.c.
7295         (OBS): Add debug.o.
7296         * debug.c: New file.
7297         * debug.h: New file.
7298         * linux-aarch64-low.c (*): Update all debugging printfs to use
7299         debug_printf instead of fprintf.
7300         * linux-arm-low.c (*): Ditto.
7301         * linux-cris-low.c (*): Ditto.
7302         * linux-crisv32-low.c (*): Ditto.
7303         * linux-m32r-low.c (*): Ditto.
7304         * linux-sparc-low.c (*): Ditto.
7305         * linux-x86.c (*): Ditto.
7306         * linux-low.c (*): Ditto.
7307         (linux_wait_1): Add calls to debug_enter, debug_exit.
7308         (linux_wait): Remove redundant debugging printf.
7309         (stop_all_lwps): Add calls to debug_enter, debug_exit.
7310         (linux_resume, unstop_all_lwps): Ditto.
7311         * mem-break.c (*): Update all debugging printfs to use
7312         debug_printf instead of fprintf.
7313         * remote-utils.c (*): Ditto.
7314         * thread-db.c (*): Ditto.
7315         * server.c #include <ctype.h>, "gdb_vecs.h".
7316         (debug_threads): Moved to debug.c.
7317         (*): Update all debugging printfs to use debug_printf instead of
7318         fprintf.
7319         (start_inferior): Replace call to fflush with call to debug_flush.
7320         (monitor_show_help): Mention set debug-format.
7321         (parse_debug_format_options): New function.
7322         (handle_monitor_command): Handle "monitor set debug-format".
7323         (gdbserver_usage): Mention --debug-format.
7324         (main): Parse --debug-format.
7325         * server.h (debug_threads): Declaration moved to debug.h.
7326         #include "debug.h".
7327         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7328         trace_debug_1 that uses debug_printf.
7329         (tracepoint_look_up_symbols): Update all debugging printfs to use
7330         debug_printf instead of fprintf.
7331
7332 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
7333
7334         * linux-xtensa-low.c: Include asm/ptrace.h instead of
7335         sys/ptrace.h.
7336
7337 2014-01-17  Pedro Alves  <palves@redhat.com>
7338
7339         PR build/16445
7340         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7341         defined after including gdb_proc_service.h.
7342
7343 2014-01-16  Doug Evans  <dje@google.com>
7344
7345         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7346         (match_dll): Use it.
7347
7348 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
7349
7350         * target.h (target_ops) <read_btrace>: Change parameters and
7351         return type to allow error reporting.
7352         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
7353         trace reading errors on.
7354         * linux-low.c (linux_low_read_btrace): Pass trace reading
7355         errors on.
7356         (linux_low_disable_btrace): New.
7357
7358 2014-01-15  Doug Evans  <dje@google.com>
7359
7360         * inferiors.c (thread_id_to_gdb_id): Delete.
7361         * inferiors.h (thread_id_to_gdb_id): Delete.
7362
7363 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
7364
7365         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7366         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
7367         versions.
7368
7369 2014-01-08  Pedro Alves  <palves@redhat.com>
7370
7371         * server.c (handle_status): Don't discard previous queued stop
7372         replies or thread's pending status here.
7373         (main) <disconnection>: Do it here instead.
7374
7375 2014-01-08  Pedro Alves  <palves@redhat.com>
7376
7377         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7378         * server.c (visit_actioned_threads, handle_pending_status): New
7379         function.
7380         (handle_v_cont): Factor out parts to ...
7381         (resume): ... this new function.  If in all-stop, and a thread
7382         being resumed has a pending status, report it without actually
7383         resuming.
7384         (myresume): Adjust to use the new 'resume' function.
7385         (clear_pending_status_callback, set_pending_status_callback)
7386         (find_status_pending_thread_callback): New functions.
7387         (handle_status): Handle the case of multiple threads having
7388         interesting statuses to report.  Report threads' real last signal
7389         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
7390         with an interesting thread to report the status for, instead of
7391         always reporting the status of the first thread.
7392
7393 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
7394
7395         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7396         * gdbreplay.c (gdbreplay_version): Likewise.
7397
7398 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
7399
7400         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7401         iov.iov_len with the real length in use.
7402
7403 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
7404
7405         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7406         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7407         for all targets that use win32-low.c.
7408         * win32-low.c (win32_ensure_ntdll_loaded): New function.
7409         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7410
7411 2013-12-13  Pedro Alves  <palves@redhat.com>
7412
7413         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7414         if equal to TARGET_WAITKIND_LOADED.
7415         * win32-low.c (cached_status): New static global.
7416         (win32_wait): Add declaration.
7417         (do_initial_child_stuff): Flush all initial pending debug events
7418         up to the initial breakpoint.
7419         (win32_wait): If CACHED_STATUS was set, return that instead
7420         of doing a real wait.  Remove the code resuming the execution
7421         of the inferior after receiving a TARGET_WAITKIND_LOADED event
7422         during the initial phase.  Also remove the code changing
7423         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7424         TARGET_WAITKIND_STOPPED.
7425
7426 2013-12-11  Yao Qi  <yao@codesourcery.com>
7427
7428         * notif.c (handle_notif_ack): Return 0 if no notification
7429         matches.
7430
7431 2013-11-20  Doug Evans  <dje@google.com>
7432
7433         * linux-low.c (linux_set_resume_request): Fix comment.
7434
7435 2013-11-20  Doug Evans  <dje@google.com>
7436
7437         * linux-low.c (resume_status_pending_p): Tweak comment.
7438
7439 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7440
7441         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7442         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7443         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7444         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7445         (srv_amd64_regobj): Add amd64-mpx.o.
7446         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7447         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7448         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7449         * i387-fp.c (num_pl_bnd_register) Added constant.
7450         (num_pl_bnd_cfg_registers) Added constant.
7451         (struct i387_xsave) Added reserved area and MPX fields.
7452         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7453         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7454         function.
7455         (tdesc_i386_mpx_linux): Add MPX amd64 target.
7456         (init_registers_amd64_mpx_linux): Declare new function.
7457         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7458         (x86_64_regmap): Add MPX registers.
7459         (x86_linux_read_description): Add MPX case.
7460         (initialize_low_arch): Initialize MPX targets.
7461
7462 2013-11-18  Tom Tromey  <tromey@redhat.com>
7463
7464         * configure: Rebuild.
7465         * configure.ac: Don't check for stdlib.h.
7466         * gdbreplay.c: Unconditionally include stdlib.h.
7467
7468 2013-11-18  Tom Tromey  <tromey@redhat.com>
7469
7470         * config.in: Rebuild.
7471         * configure: Rebuild.
7472         * configure.ac: Don't use AC_HEADER_DIRENT.
7473
7474 2013-11-18  Tom Tromey  <tromey@redhat.com>
7475
7476         * server.h: Don't check HAVE_STRING_H.
7477         * gdbreplay.c: Don't check HAVE_STRING_H.
7478         * configure: Rebuild.
7479
7480 2013-11-18  Tom Tromey  <tromey@redhat.com>
7481
7482         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7483         LIBGNU.
7484
7485 2013-11-08  Tom Tromey  <tromey@redhat.com>
7486
7487         * configure, config.in: Rebuild.
7488         * configure.ac: Remove unused configury.
7489
7490 2013-11-08  Tom Tromey  <tromey@redhat.com>
7491
7492         * acinclude.m4: Include common.m4, codeset.m4.
7493         * configure, config.in: Rebuild.
7494         * configure.ac: Use GDB_AC_COMMON.
7495
7496 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7497
7498         * linux-s390-low.c (HWCAP_S390_TE): New define.
7499         (s390_arch_setup): Consider the TE field in the HWCAP for
7500         determining 'have_regset_tdb'.
7501
7502 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
7503
7504         PR gdb/16014
7505         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7506         call to sizeof.
7507
7508 2013-10-02  Pedro Alves  <palves@redhat.com>
7509
7510         * server.c (process_serial_event): Don't output "GDBserver
7511         exiting" if GDB is connected through stdio.
7512         * target.c (mywait): Likewise, be silent if GDB is connected
7513         through stdio.
7514
7515 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
7516
7517         * lynx-low.c (lynx_add_threads_after_attach): New function.
7518         (lynx_attach): Remove call to add_thread.  Add call to
7519         lynx_add_threads_after_attach instead.
7520
7521 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
7522
7523         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7524         * config.in, configure: Regenerated.
7525
7526 2013-09-18  Yao Qi  <yao@codesourcery.com>
7527
7528         PR server/15959
7529         * server.c (start_inferior): Clear 'resume_info'.
7530
7531 2013-09-16  Jiong Wang  <jiwang@tilera.com>
7532
7533         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7534         for each register.
7535
7536 2013-09-16  Jiong Wang  <jiwang@tilera.com>
7537
7538         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7539         linux-tile-low.o to srv_tgtobj.
7540
7541 2013-09-16  Will Newton  <will.newton@linaro.org>
7542
7543         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7544         out regs.
7545
7546 2013-09-06  Pedro Alves  <palves@redhat.com>
7547
7548         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7549         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7550         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7551         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7552         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7553         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7554
7555 2013-09-06  Pedro Alves  <palves@redhat.com>
7556
7557         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7558         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7559
7560 2013-09-06  Pedro Alves  <palves@redhat.com>
7561
7562         * linux-amd64-ipa.c: Include tracepoint.h.
7563         * linux-i386-ipa.c: Include tracepoint.h.
7564
7565 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
7566
7567         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7568         (ps_get_thread_area): New function.
7569
7570 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
7571
7572         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7573         (initialize_low_arch): Call init_registers_crisv32 rather than
7574         init_register_crisv32.
7575
7576 2013-09-05  Pedro Alves  <palves@redhat.com>
7577
7578         * server.h (handle_vFile, hostio_last_error_from_errno): Move
7579         to ...
7580         * hostio.h: ... this new file.
7581         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7582         win32-low.c: Include hostio.h.
7583
7584 2013-09-05  Pedro Alves  <palves@redhat.com>
7585
7586         * server.h (gdb_client_data, handler_func, callback_handler_func)
7587         (delete_file_handler, add_file_handler, append_callback_event)
7588         (delete_callback_event, start_event_loop, initialize_event_loop):
7589         Move to event-loop.h and include it.
7590         * event-loop.h: New file.
7591
7592 2013-09-05  Pedro Alves  <palves@redhat.com>
7593
7594         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7595         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7596         (loaded_dll, unloaded_dll): Move to ...
7597         * dll.h: ... this new file.
7598         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7599
7600 2013-09-05  Pedro Alves  <palves@redhat.com>
7601
7602         * server.h (current_process, get_thread_process, all_processes)
7603         (add_inferior_to_list, for_each_inferior, current_inferior)
7604         (remove_inferior, add_process, remove_process, find_process_pid)
7605         (have_started_inferiors_p, have_attached_inferiors_p)
7606         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7607         (clear_inferiors, find_inferior, find_inferior_id)
7608         (inferior_target_data, set_inferior_target_data)
7609         (inferior_regcache_data, set_inferior_regcache_data): Move to
7610         inferiors.h, and include it.
7611         * inferiors.h: New file.
7612
7613 2013-09-05  Pedro Alves  <palves@redhat.com>
7614
7615         * server.h (struct emit_ops, current_insn_ptr, emit_error):
7616         Move ...
7617         * ax.h: ... here.
7618
7619 2013-09-05  Pedro Alves  <palves@redhat.com>
7620
7621         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7622         tracepoint.h.
7623         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7624         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7625         (handle_tracepoint_general_set, handle_tracepoint_query)
7626         (tracepoint_finished_step, tracepoint_was_hit)
7627         (release_while_stepping_state_list, current_traceframe)
7628         (in_readonly_region, traceframe_read_mem)
7629         (fetch_traceframe_registers, traceframe_read_sdata)
7630         (traceframe_read_info, struct fast_tpoint_collect_status)
7631         (fast_tracepoint_collecting, force_unlock_trace_buffer)
7632         (handle_tracepoit_bkpts, initialize_low_tracepoint)
7633         (supply_fast_tracepoint_registers)
7634         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7635         (ipa_tdesc, claim_trampoline_space)
7636         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7637         (agent_mem_read, agent_get_trace_state_variable_value)
7638         (agent_set_trace_state_variable_value, agent_tsv_read)
7639         (agent_mem_read_string, get_raw_reg_func_addr)
7640         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7641         * tracepoint.h: ... this new file.
7642
7643 2013-09-05  Pedro Alves  <palves@redhat.com>
7644
7645         * server.h (perror_with_name, error, fatal, warning, paddress)
7646         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7647         include it.
7648         * utils.h: New file.
7649
7650 2013-09-05  Pedro Alves  <palves@redhat.com>
7651
7652         * server.h (remote_debug, noack_mode, transport_is_reliable)
7653         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7654         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7655         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7656         (write_enn, initialize_async_io, enable_async_io)
7657         (disable_async_io, check_remote_input_interrupt_request)
7658         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7659         (dead_thread_notify, prepare_resume_reply)
7660         (decode_address_to_semicolon, decode_address, decode_m_packet)
7661         (decode_M_packet, decode_X_packet, decode_xfer_write)
7662         (decode_search_memory_packet, unhexify, hexify)
7663         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7664         (look_up_one_symbol, relocate_instruction)
7665         (monitor_output): Move to remote-utils.h, and include it.
7666         * remote-utils.h: New file.
7667
7668 2013-09-05  Pedro Alves  <palves@redhat.com>
7669
7670         * server.h (_): Delete.
7671
7672 2013-09-02  Pedro Alves  <palves@redhat.com>
7673
7674         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7675         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7676         allocated.
7677         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7678
7679 2013-09-02  Pierre Muller  <muller@sourceware.org>
7680
7681         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7682         or WriteProcessMemory complete successfully and handle
7683         ERROR_PARTIAL_COPY error.
7684
7685 2013-09-02  Pedro Alves  <palves@redhat.com>
7686
7687         * server.c (gdb_read_memory): Return -1 on traceframe memory read
7688         error instead of EIO.
7689
7690 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7691
7692         PR server/15604
7693         * linux-low.c: Include filestuff.h.
7694         (linux_create_inferior) <pid == 0>: Call close_most_fds.
7695         * lynx-low.c: Include filestuff.h.
7696         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7697         * server.c: Include filestuff.h.
7698         (main): Call notice_open_fds.
7699         * spu-low.c: Include filestuff.h.
7700         (spu_create_inferior) <pid == 0>: Call close_most_fds.
7701
7702 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
7703
7704         * Makefile.in: Explain why ../target and ../nat are not
7705         listed as include file search paths.
7706         (linux-waitpid.o): New object file rule.
7707         * configure.srv (srv_native_linux_obj): New variable.
7708         Replace all occurrences of linux native object files with
7709         $srv_native_linux_obj.
7710         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7711         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7712         (linux_enable_event_reporting): Remove declaration.
7713         (my_waitpid): Moved to common/linux-waitpid.c.
7714         (linux_wait_for_event): Pass ptid when calling
7715         linux_enable_event_reporting.
7716         (linux_supports_tracefork_flag): Remove.
7717         (linux_enable_event_reporting): Likewise.
7718         (linux_tracefork_grandchild): Remove.
7719         (STACK_SIZE): Moved to common/linux-ptrace.c.
7720         (linux_tracefork_child): Remove.
7721         (linux_test_for_tracefork): Remove.
7722         (linux_look_up_symbols): Call linux_supports_traceclone.
7723         (initialize_low): Remove call to linux_test_for_tracefork.
7724         * linux-low.h (PTRACE_TYPE_ARG3): Move to
7725         common/linux-ptrace.h.
7726         (PTRACE_TYPE_ARG4): Likewise.
7727         Include linux-ptrace.h.
7728
7729 2013-08-21  Pedro Alves  <palves@redhat.com>
7730
7731         * config.in: Renegerate.
7732
7733 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
7734
7735         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7736         (SFILES): Remove $(srcdir)/common/target-common.c and
7737         add $(srcdir)/target/waitstatus.c.
7738         (OBS): Remove target-common.o and add waitstatus.o.
7739         (server_h): Remove $(srcdir)/../common/target-common.h and
7740         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7741         and $(srcdir)/../target/waitstatus.h.
7742         (target-common.o): Remove.
7743         (waitstatus.o): New target object file.
7744         * target.h: Do not include target-common.h and
7745         include target/resume.h, target/wait.h and
7746         target/waitstatus.h.
7747
7748 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
7749
7750         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7751         to PTRACE_TYPE_ARG3.
7752         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7753         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7754         PTRACE_TYPE_ARG4.
7755         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7756         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7757
7758 2013-07-27  Jie Zhang  <jie@codesourcery.com>
7759             Daniel Jacobowitz  <dan@codesourcery.com>
7760             Yao Qi  <yao@codesourcery.com>
7761
7762         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7763         (mips-linux-watch.o): New rule.
7764         (mips_linux_watch_h): New variable.
7765         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7766         srv_tgtobj.
7767         * linux-mips-low.c: Include mips-linux-watch.h.
7768         (struct arch_process_info, struct arch_lwp_info): New.
7769         (update_watch_registers_callback): New function.
7770         (mips_linux_new_process, mips_linux_new_thread) New functions.
7771         (mips_linux_prepare_to_resume, mips_insert_point): New
7772         functions.
7773         (mips_remove_point, mips_stopped_by_watchpoint): New
7774         functions.
7775         (rsp_bp_type_to_target_hw_bp_type): New function.
7776         (mips_stopped_data_address): New function.
7777         (the_low_target): Add watchpoint support functions.
7778
7779 2013-07-27  Yao Qi  <yao@codesourcery.com>
7780
7781         * i386-low.c: Include break-common.h.
7782         (enum target_hw_bp_type): Remove.
7783
7784 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
7785
7786         * Makefile.in (SFILES): /common/target-common.c.
7787         (OBS): Add target-common.o.
7788         (server_h): Add $(srcdir)/../common/target-common.h.
7789         (target-common.o): New target.
7790         * server.c (queue_stop_reply_callback): Free
7791         status string after use.
7792         * target.c (target_waitstatus_to_string): Remove.
7793         * target.h: Include target-common.h.
7794         (resume_kind): Likewise.
7795         (target_waitkind): Likewise.
7796         (target_waitstatus): Likewise.
7797         (TARGET_WNOHANG): Likewise.
7798
7799 2013-07-04  Yao Qi  <yao@codesourcery.com>
7800
7801         * Makefile.in (host_alias): Use @host_noncanonical@.
7802         (target_alias): Use @target_noncanonical@.
7803         * configure.ac: Use ACX_NONCANONICAL_TARGET and
7804         ACX_NONCANONICAL_HOST.
7805         * configure: Regenerated.
7806
7807         Revert:
7808         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
7809
7810         * configure.ac (version_host, version_target): Set and AC_SUBST them.
7811         * configure: Rebuild.
7812         * Makefile.in (version_host, version_target): Get from configure.
7813         (version.c): Use $(version_host) and $(version_target).
7814
7815 2013-07-03  Pedro Alves  <palves@redhat.com>
7816
7817         * Makefile.in (config.status): Depend on development.sh.
7818         * acinclude.m4: Include libmcheck.m4.
7819         * configure: Regenerate.
7820
7821 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
7822
7823         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7824         attribute inside the parentheses.
7825         (winapi_DebugSetProcessKillOnExit): Ditto.
7826         (winapi_DebugBreakProcess): Ditto.
7827         (winapi_GenerateConsoleCtrlEvent): Ditto.
7828
7829 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
7830
7831         * notif.h (notif_event): Add a dummy member to avoid compiler
7832         errors.
7833
7834 2013-07-01  Pedro Alves  <palves@redhat.com>
7835
7836         * hostio.c (HOSTIO_PATH_MAX): Define.
7837         (require_filename, handle_open, handle_unlink, handle_readlink):
7838         Use it.
7839
7840 2013-07-01  Pedro Alves  <palves@redhat.com>
7841
7842         * server.h: Include "pathmax.h".
7843         * linux-low.c: Don't include sys/param.h.
7844         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7845         MAXPATHLEN.
7846         * win32-low.c: Don't include sys/param.h.
7847         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7848
7849 2013-07-01  Pedro Alves  <palves@redhat.com>
7850
7851         * event-loop.c: Don't check HAVE_UNISTD_H before including
7852         <unistd.h>.
7853         * gdbreplay.c: Likewise.
7854         * remote-utils.c: Likewise.
7855         * server.c: Likewise.
7856         * configure.ac: Don't check for unistd.h.
7857         * configure: Regenerate.
7858
7859 2013-06-28  Tom Tromey  <tromey@redhat.com>
7860
7861         * Makefile.in (version.c): Use version.in, not
7862         common/version.in.
7863
7864 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
7865
7866         * configure.ac (version_host, version_target): Set and AC_SUBST them.
7867         * configure: Rebuild.
7868         * Makefile.in (version_host, version_target): Get from configure.
7869         (version.c): Use $(version_host) and $(version_target).
7870
7871 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
7872
7873         Fix trace-status to output user name without trailing colon.
7874         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7875
7876 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
7877
7878         Fix trace-status to output proper start-time and stop-time.
7879         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7880         output start time and stop time in hex as gdb expects.
7881
7882 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
7883
7884         * tracepoint.c (build_traceframe_info_xml): Output trace state
7885         variables present in the trace buffer.
7886
7887 2013-06-24  Tom Tromey  <tromey@redhat.com>
7888
7889         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7890         create-version.sh.
7891         (version.o): Remove.
7892         * gdbreplay.c: Include version.h.
7893         (version, host_name): Don't declare.
7894         * server.h: Include version.h.
7895         (version, host_name): Don't declare.
7896
7897 2013-06-12  Pedro Alves  <palves@redhat.com>
7898
7899         * linux-x86-low.c (linux_is_elf64): Delete global.
7900         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7901         with local linux_pid_exe_is_elf_64_file use.
7902
7903 2013-06-11  Pedro Alves  <palves@redhat.com>
7904
7905         * linux-low.c (regset_disabled, disable_regset): New functions.
7906         (regsets_fetch_inferior_registers)
7907         (regsets_store_inferior_registers): Use them.
7908         (initialize_regsets_info); Don't allocate the disabled_regsets
7909         array here.
7910         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7911         comment.
7912
7913 2013-06-11  Pedro Alves  <palves@redhat.com>
7914
7915         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7916         xmalloc.
7917
7918 2013-06-11  Pedro Alves  <palves@redhat.com>
7919
7920         * linux-x86-low.c (initialize_low_arch): Call
7921         init_registers_x32_avx_linux.
7922
7923 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
7924
7925         Fix compatibility with Android Bionic.
7926         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7927         it is not empty.
7928
7929 2013-06-07  Pedro Alves  <palves@redhat.com>
7930
7931         PR server/14823
7932         * Makefile.in (OBS): Add tdesc.o.
7933         (IPA_OBJS): Add tdesc-ipa.o.
7934         (tdesc-ipa.o): New rule.
7935         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7936         interface.
7937         * linux-low.c (new_inferior): Delete.
7938         (disabled_regsets, num_regsets): Delete.
7939         (linux_add_process): Adjust to set the new per-process
7940         new_inferior flag.
7941         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7942         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
7943         was a stop.  When calling arch_setup, switch the current inferior
7944         to the thread that got an event.
7945         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7946         (regsets_fetch_inferior_registers)
7947         (regsets_store_inferior_registers): New regsets_info parameter.
7948         Adjust to use it.
7949         (linux_register_in_regsets): New regs_info parameter.  Adjust to
7950         use it.
7951         (register_addr, fetch_register, store_register): New usrregs_info
7952         parameter.  Adjust to use it.
7953         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7954         parameter regs_info.  Adjust to use it.
7955         (linux_fetch_registers): Get the current inferior's regs_info, and
7956         adjust to use it.
7957         (linux_store_registers): Ditto.
7958         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7959         (initialize_low): Don't initialize the target_regsets here.  Call
7960         initialize_low_arch.
7961         * linux-low.h (target_regsets): Delete declaration.
7962         (struct regsets_info): New.
7963         (struct usrregs_info): New.
7964         (struct regs_info): New.
7965         (struct process_info_private) <new_inferior>: New field.
7966         (struct linux_target_ops): Delete the num_regs, regmap, and
7967         regset_bitmap fields.  New field regs_info.
7968         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7969         * i387-fp.c (num_xmm_registers): Delete.
7970         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7971         calls to new interface.
7972         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7973         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7974         Infer the number of xmm registers from the regcache's target
7975         description.
7976         * i387-fp.h (num_xmm_registers): Delete.
7977         * inferiors.c (add_thread): Don't install the thread's regcache
7978         here.
7979         * proc-service.c (gregset_info): Fetch the current inferior's
7980         regs_info.  Adjust to use it.
7981         * regcache.c: Include tdesc.h.
7982         (register_bytes, reg_defs, num_registers)
7983         (gdbserver_expedite_regs): Delete.
7984         (get_thread_regcache): If the thread doesn't have a regcache yet,
7985         create one, instead of aborting gdbserver.
7986         (regcache_invalidate_one): Rename to ...
7987         (regcache_invalidate_thread): ... this.
7988         (regcache_invalidate_one): New.
7989         (regcache_invalidate): Only invalidate registers of the current
7990         process.
7991         (init_register_cache): Add target_desc parameter, and use it.
7992         (new_register_cache): Ditto.  Assert the target description has a
7993         non zero registers_size.
7994         (regcache_cpy): Add assertions.  Adjust.
7995         (realloc_register_cache, set_register_cache): Delete.
7996         (registers_to_string, registers_from_string): Adjust.
7997         (find_register_by_name, find_regno, find_register_by_number)
7998         (register_cache_size): Add target_desc parameter, and use it.
7999         (free_register_cache_thread, free_register_cache_thread_one)
8000         (regcache_release, register_cache_size): New.
8001         (register_size): Add target_desc parameter, and use it.
8002         (register_data, supply_register, supply_register_zeroed)
8003         (supply_regblock, supply_register_by_name, collect_register)
8004         (collect_register_as_string, collect_register_by_name): Adjust.
8005         * regcache.h (struct target_desc): Forward declare.
8006         (struct regcache) <tdesc>: New field.
8007         (init_register_cache, new_register_cache): Add target_desc
8008         parameter.
8009         (regcache_invalidate_thread): Declare.
8010         (regcache_invalidate_one): Delete declaration.
8011         (regcache_release): Declare.
8012         (find_register_by_number, register_cache_size, register_size)
8013         (find_regno): Add target_desc parameter.
8014         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8015         declarations.
8016         * remote-utils.c: Include tdesc.h.
8017         (outreg, prepare_resume_reply): Adjust.
8018         * server.c: Include tdesc.h.
8019         (gdbserver_xmltarget): Delete declaration.
8020         (get_features_xml, process_serial_event): Adjust.
8021         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8022         declare.
8023         (struct process_info) <tdesc>: New field.
8024         (ipa_tdesc): Declare.
8025         * tdesc.c: New file.
8026         * tdesc.h: New file.
8027         * tracepoint.c: Include tdesc.h.
8028         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8029         (get_context_regcache): Adjust to pass ipa_tdesc down.
8030         (do_action_at_tracepoint): Adjust to get the register cache size
8031         from the context regcache's description.
8032         (traceframe_walk_blocks): Adjust to get the register cache size
8033         from the current trace frame's description.
8034         (traceframe_get_pc): Adjust to get current trace frame's
8035         description and pass it down.
8036         (gdb_collect): Adjust to get the register cache size from the
8037         IPA's description.
8038         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8039         (gdbserver_xmltarget): Delete.
8040         (initialize_low_tracepoint): Set the ipa's target description.
8041         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8042         (initialize_low_tracepoint): Set the ipa's target description.
8043         * linux-x86-low.c: Include tdesc.h.
8044         [__x86_64__] (is_64bit_tdesc): New.
8045         (ps_get_thread_area, x86_get_thread_area): Use it.
8046         (i386_cannot_store_register): Rename to ...
8047         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
8048         (i386_cannot_fetch_register): Rename to ...
8049         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
8050         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8051         to new interface.
8052         (target_regsets): Rename to ...
8053         (x86_regsets): ... this.
8054         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8055         interface.
8056         (x86_siginfo_fixup): Use is_64bit_tdesc.
8057         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8058         (tdesc_x32_avx_linux, tdesc_x32_linux)
8059         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8060         Declare.
8061         (x86_linux_update_xmltarget): Delete.
8062         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8063         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8064         (AMD64_LINUX_USER64_CS): New.
8065         (x86_linux_read_description): New, based on
8066         x86_linux_update_xmltarget.
8067         (same_process_callback): New.
8068         (x86_arch_setup_process_callback): New.
8069         (x86_linux_update_xmltarget): New.
8070         (x86_regsets_info): New.
8071         (amd64_linux_regs_info): New.
8072         (i386_linux_usrregs_info): New.
8073         (i386_linux_regs_info): New.
8074         (x86_linux_regs_info): New.
8075         (x86_arch_setup): Reimplement.
8076         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8077         (x86_emit_ops): Ditto.
8078         (the_low_target): Adjust.  Install x86_linux_regs_info,
8079         x86_cannot_fetch_register, and x86_cannot_store_register.
8080         (initialize_low_arch): New.
8081         * linux-ia64-low.c (tdesc_ia64): Declare.
8082         (ia64_fetch_register): Adjust.
8083         (ia64_usrregs_info, regs_info): New globals.
8084         (ia64_regs_info): New function.
8085         (the_low_target): Adjust.
8086         (initialize_low_arch): New function.
8087         * linux-sparc-low.c (tdesc_sparc64): Declare.
8088         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8089         Adjust.
8090         (sparc_arch_setup): New function.
8091         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8092         (the_low_target): Adjust.
8093         (initialize_low_arch): New function.
8094         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8095         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8096         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8097         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8098         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8099         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8100         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8101         (tdesc_powerpc_isa205_vsx64l): Declare.
8102         (ppc_cannot_store_register, ppc_collect_ptrace_register)
8103         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8104         (ppc_set_pc, ppc_get_hwcap): Adjust.
8105         (ppc_usrregs_info): Forward declare.
8106         (!__powerpc64__) ppc_regmap_adjusted: New global.
8107         (ppc_arch_setup): Adjust to the current process'es target
8108         description.
8109         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8110         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8111         (ppc_store_evrregset): Adjust.
8112         (target_regsets): Rename to ...
8113         (ppc_regsets): ... this, and make static.
8114         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8115         (ppc_regs_info): New function.
8116         (the_low_target): Adjust.
8117         (initialize_low_arch): New function.
8118         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8119         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8120         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8121         (tdesc_s390x_linux64v2): Declare.
8122         (s390_collect_ptrace_register, s390_supply_ptrace_register)
8123         (s390_fill_gregset, s390_store_last_break): Adjust.
8124         (target_regsets): Rename to ...
8125         (s390_regsets): ... this, and make static.
8126         (s390_get_pc, s390_set_pc): Adjust.
8127         (s390_get_hwcap): New target_desc parameter, and use it.
8128         [__s390x__] (have_hwcap_s390_high_gprs): New global.
8129         (s390_arch_setup): Adjust to set the current process'es target
8130         description.  Don't adjust the regmap.
8131         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8132         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8133         (regs_info_3264): New globals.
8134         (s390_regs_info): New function.
8135         (the_low_target): Adjust.
8136         (initialize_low_arch): New function.
8137         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8138         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8139         [__mips64] (init_registers_mips_linux)
8140         (init_registers_mips_dsp_linux): Delete defines.
8141         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8142         (have_dsp): New global.
8143         (mips_read_description): New, based on mips_arch_setup.
8144         (mips_arch_setup): Reimplement.
8145         (get_usrregs_info): New function.
8146         (mips_cannot_fetch_register, mips_cannot_store_register)
8147         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8148         (mips_fill_fpregset, mips_store_fpregset): Adjust.
8149         (target_regsets): Rename to ...
8150         (mips_regsets): ... this, and make static.
8151         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8152         (dsp_regs_info, regs_info): New globals.
8153         (mips_regs_info): New function.
8154         (the_low_target): Adjust.
8155         (initialize_low_arch): New function.
8156         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8157         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8158         Declare.
8159         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8160         (arm_read_description): New, with bits factored from
8161         arm_arch_setup.
8162         (arm_arch_setup): Reimplement.
8163         (target_regsets): Rename to ...
8164         (arm_regsets): ... this, and make static.
8165         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8166         (arm_regs_info): New function.
8167         (the_low_target): Adjust.
8168         (initialize_low_arch): New function.
8169         * linux-m68k-low.c (tdesc_m68k): Declare.
8170         (target_regsets): Rename to ...
8171         (m68k_regsets): ... this, and make static.
8172         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8173         (m68k_regs_info): New function.
8174         (m68k_arch_setup): New function.
8175         (the_low_target): Adjust.
8176         (initialize_low_arch): New function.
8177         * linux-sh-low.c (tdesc_sharch): Declare.
8178         (target_regsets): Rename to ...
8179         (sh_regsets): ... this, and make static.
8180         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8181         (sh_regs_info, sh_arch_setup): New functions.
8182         (the_low_target): Adjust.
8183         (initialize_low_arch): New function.
8184         * linux-bfin-low.c (tdesc_bfin): Declare.
8185         (bfin_arch_setup): New function.
8186         (bfin_usrregs_info, regs_info): New globals.
8187         (bfin_regs_info): New function.
8188         (the_low_target): Adjust.
8189         (initialize_low_arch): New function.
8190         * linux-cris-low.c (tdesc_cris): Declare.
8191         (cris_arch_setup): New function.
8192         (cris_usrregs_info, regs_info): New globals.
8193         (cris_regs_info): New function.
8194         (the_low_target): Adjust.
8195         (initialize_low_arch): New function.
8196         * linux-cris-low.c (tdesc_crisv32): Declare.
8197         (cris_arch_setup): New function.
8198         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8199         (cris_regs_info): New function.
8200         (the_low_target): Adjust.
8201         (initialize_low_arch): New function.
8202         * linux-m32r-low.c (tdesc_m32r): Declare.
8203         (m32r_arch_setup): New function.
8204         (m32r_usrregs_info, regs_info): New globals.
8205         (m32r_regs_info): Adjust.
8206         (initialize_low_arch): New function.
8207         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8208         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8209         (tic6x_usrregs_info): Forward declare.
8210         (tic6x_read_description): New function, based on ...
8211         (tic6x_arch_setup): ... this.  Reimplement.
8212         (target_regsets): Rename to ...
8213         (tic6x_regsets): ... this, and make static.
8214         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8215         (tic6x_regs_info): New function.
8216         (the_low_target): Adjust.
8217         (initialize_low_arch): New function.
8218         * linux-xtensa-low.c (tdesc_xtensa): Declare.
8219         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8220         (target_regsets): Rename to ...
8221         (xtensa_regsets): ... this, and make static.
8222         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8223         globals.
8224         (xtensa_arch_setup, xtensa_regs_info): New functions.
8225         (the_low_target): Adjust.
8226         (initialize_low_arch): New function.
8227         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8228         (nios2_arch_setup): Set the current process'es tdesc.
8229         (target_regsets): Rename to ...
8230         (nios2_regsets): ... this.
8231         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8232         (nios2_regs_info): New function.
8233         (the_low_target): Adjust.
8234         (initialize_low_arch): New function.
8235         * linux-aarch64-low.c (tdesc_aarch64): Declare.
8236         (aarch64_arch_setup): Set the current process'es tdesc.
8237         (target_regsets): Rename to ...
8238         (aarch64_regsets): ... this.
8239         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8240         (aarch64_regs_info): New function.
8241         (the_low_target): Adjust.
8242         (initialize_low_arch): New function.
8243         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8244         globals.
8245         (target_regsets): Rename to ...
8246         (tile_regsets): ... this.
8247         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8248         (tile_regs_info): New function.
8249         (tile_arch_setup): Set the current process'es tdesc.
8250         (the_low_target): Adjust.
8251         (initialize_low_arch): New function.
8252         * spu-low.c (tdesc_spu): Declare.
8253         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8254         * win32-arm-low.c (tdesc_arm): Declare.
8255         (arm_arch_setup): New function.
8256         (the_low_target): Install arm_arch_setup instead of
8257         init_registers_arm.
8258         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8259         (init_windows_x86): Rename to ...
8260         (i386_arch_setup): ... this.  Set `win32_tdesc'.
8261         (the_low_target): Adjust.
8262         * win32-low.c (win32_tdesc): New global.
8263         (child_add_thread): Don't create the thread cache here.
8264         (do_initial_child_stuff): Set the new process'es tdesc.
8265         * win32-low.h (struct target_desc): Forward declare.
8266         (win32_tdesc): Declare.
8267         * lynx-i386-low.c (tdesc_i386): Declare global.
8268         (lynx_i386_arch_setup): Set `lynx_tdesc'.
8269         * lynx-low.c (lynx_tdesc): New global.
8270         (lynx_add_process): Set the new process'es tdesc.
8271         * lynx-low.h (struct target_desc): Forward declare.
8272         (lynx_tdesc): Declare global.
8273         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8274         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8275         * nto-low.c (nto_tdesc): New global.
8276         (do_attach): Set the new process'es tdesc.
8277         * nto-low.h (struct target_desc): Forward declare.
8278         (nto_tdesc): Declare.
8279         * nto-x86-low.c (tdesc_i386): Declare.
8280         (nto_x86_arch_setup): Set `nto_tdesc'.
8281
8282 2013-06-04  Gary Benson  <gbenson@redhat.com>
8283
8284         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8285         to qSupported response when appropriate.
8286         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8287         with nonzero-length annex.
8288         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8289         arguments supplied in annex.
8290
8291 2013-05-31  Doug Evans  <dje@google.com>
8292
8293         PR server/15594
8294         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8295         64 bits in 64-cross-32 environment.
8296
8297 2013-05-28  Pedro Alves  <palves@redhat.com>
8298
8299         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8300         (aarch64-without-fpu.c): Delete rule.
8301         * configure.srv (aarch64*-*-linux*): Remove references to
8302         aarch64-without-fpu.o and aarch64-without-fpu.xml.
8303         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8304         declaration.
8305
8306 2013-05-24  Pedro Alves  <palves@redhat.com>
8307
8308         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8309         instead of strchr/decode_address.  Error if the range isn't split
8310         with a ','.  Don't assume there's be a ':' in the action.
8311
8312 2013-05-23  Yao Qi  <yao@codesourcery.com>
8313             Pedro Alves  <palves@redhat.com>
8314
8315         * linux-low.c (lwp_in_step_range): New function.
8316         (linux_wait_1): If the thread was range stepping and stopped
8317         outside the stepping range, report the stop to GDB.  Otherwise,
8318         continue stepping.  Add range stepping debug output.
8319         (linux_set_resume_request): Copy the step range from the resume
8320         request to the lwp.
8321         (linux_supports_range_stepping): New.
8322         (linux_target_ops) <supports_range_stepping>: Set to
8323         linux_supports_range_stepping.
8324         * linux-low.h (struct linux_target_ops)
8325         <supports_range_stepping>: New field.
8326         (struct lwp_info) <step_range_start, step_range_end>: New fields.
8327         * linux-x86-low.c (x86_supports_range_stepping): New.
8328         (the_low_target) <supports_range_stepping>: Set to
8329         x86_supports_range_stepping.
8330         * server.c (handle_v_cont): Handle 'r' action.
8331         (handle_v_requests): Append ";r" if the target supports range
8332         stepping.
8333         * target.h (struct thread_resume) <step_range_start,
8334         step_range_end>: New fields.
8335         (struct target_ops) <supports_range_stepping>:
8336         New field.
8337         (target_supports_range_stepping): New macro.
8338
8339 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
8340
8341         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8342         confusion in comment.
8343
8344 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
8345
8346         * lynx-low.c (struct process_info_private): New type.
8347         (lynx_add_process): New function.
8348         (lynx_create_inferior, lynx_attach): Replace calls to
8349         add_process by calls to lynx_add_process.
8350         (lynx_resume): If PTID is null, then try using
8351         current_process()->private->last_wait_event_ptid.
8352         Add comments.
8353         (lynx_clear_inferiors): Delete.  The contents of that function
8354         has been inlined in lynx_mourn;
8355         (lynx_wait_1): Save the ptid in the process's private data.
8356         (lynx_mourn): Free the process' private data.  Replace call
8357         to lynx_clear_inferiors by call to clear_inferiors.
8358
8359 2013-05-17  Yao Qi  <yao@codesourcery.com>
8360
8361         * i386-low.c (i386_length_and_rw_bits): Move the comment to
8362         the right place.
8363
8364 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
8365
8366         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8367         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
8368         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8369         PT_TEXT_END_ADDR guards.  Update comments.
8370         (linux_target_op) <read_offsets>: Conditionally define to
8371         linux_read_offsets if the target is UCLIBC and if it defines
8372         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8373
8374 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
8375             Andrew Jenner  <andrew@codesourcery.com>
8376
8377         * Makefile.in (SFILES): Add linux-nios2-low.c.
8378         (clean): Add action to delete nios2-linux.c.
8379         (nios2-linux.c): New rule.
8380         * configure.srv: Add nios2*-*-linux*.
8381         * linux-nios2-low.c: New.
8382
8383 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
8384
8385         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8386
8387 2013-04-25  Hui Zhu  <hui@codesourcery.com>
8388
8389         PR gdb/15186
8390         * ax.c (ax_printf): Add fflush.
8391
8392 2013-04-22  Tom Tromey  <tromey@redhat.com>
8393
8394         * Makefile.in (SFILES): Add filestuff.c.
8395         (OBS): Add filestuff.o.
8396         (filestuff.o): New target.
8397         * config.in, configure: Rebuild.
8398         * configure.ac: Check for fdwalk, pipe2.
8399
8400 2013-04-17  Pedro Alves  <palves@redhat.com>
8401
8402         * configure.ac (USE_THREAD_DB): Delete variable.
8403         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8404         Don't AC_SUBST USE_THREAD_DB.
8405         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8406         * config.in, configure: Regenerate.
8407
8408 2013-04-16  Pedro Alves  <palves@redhat.com>
8409
8410         * linux-low.h (struct lwp_info) <thread_known>: Move under
8411         the USE_THREAD_DB #ifdef.
8412
8413 2013-04-16  Pedro Alves  <palves@redhat.com>
8414
8415         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8416         (linux-low.o): Delete rule.
8417         * linux-low.h: Always include "gdb_thread_db.h" instead of
8418         conditionally including thread_db.h.
8419         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8420         HAVE_THREAD_DB_H.
8421
8422 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
8423
8424         * Makefile.in (install-only): Fix make install regression.
8425
8426 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
8427
8428         Convert man pages to texinfo, new gdbinit.5 texinfo page.
8429         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8430         installation.
8431         * gdbserver.1: Remove.
8432
8433 2013-03-22  Pedro Alves  <palves@redhat.com>
8434
8435         * linux-low.c (handle_extended_wait): Don't call
8436         linux_enable_event_reporting.
8437
8438 2013-03-15  Tony Theodore  <tonyt@logyst.com>
8439
8440         PR build/9098:
8441         * Makefile.in (SHELL): Use @SHELL@.
8442
8443 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8444
8445         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8446         compiler warning.
8447
8448 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
8449
8450         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8451         Remove extraneous NULL element.
8452
8453 2013-03-13  Yao Qi  <yao@codesourcery.com>
8454
8455         * tracepoint.c (traceframe_read_tsv): Look for the last matched
8456         'V' block in trace frame.
8457
8458 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
8459
8460         * target.h (struct target_ops): Add btrace ops.
8461         (target_supports_btrace): New macro.
8462         (target_enable_btrace): New macro.
8463         (target_disable_btrace): New macro.
8464         (target_read_btrace): New macro.
8465         * gdbthread.h (struct thread_info): Add btrace field.
8466         * server.c: Include btrace-common.h.
8467         (handle_btrace_general_set): New function.
8468         (handle_btrace_enable): New function.
8469         (handle_btrace_disable): New function.
8470         (handle_general_set): Call handle_btrace_general_set.
8471         (handle_qxfer_btrace): New function.
8472         (struct qxfer qxfer_packets[]): Add btrace entry.
8473         * inferiors.c (remove_thread): Disable btrace.
8474         * linux-low: Include linux-btrace.h.
8475         (linux_low_enable_btrace): New function.
8476         (linux_low_read_btrace): New function.
8477         (linux_target_ops): Add btrace ops.
8478         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8479         Add srv_linux_btrace=yes.
8480         (x86_64-*-linux*): Add linux-btrace.o.
8481         Add srv_linux_btrace=yes.
8482         * configure.ac: Define HAVE_LINUX_BTRACE.
8483         * config.in: Regenerated.
8484         * configure: Regenerated.
8485
8486 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
8487
8488         * server.c (handle_qxfer): Preserve error message if -3 is
8489         returned.
8490         (qxfer): Document the -3 return value.
8491
8492 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
8493
8494         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8495         (linux_btrace_h): New variable.
8496         (linux-btrace.o): New rule.
8497
8498 2013-03-08  Stan Shebs  <stan@codesourcery.com>
8499             Hafiz Abid Qadeer  <abidh@codesourcery.com>
8500
8501         * tracepoint.c (trace_buffer_size): New global.
8502         (DEFAULT_TRACE_BUFFER_SIZE): New define.
8503         (init_trace_buffer): Change to one-argument function. Allocate
8504         trace buffer memory.
8505         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8506         handle QTBuffer:size packet.
8507         (cmd_bigqtbuffer_size): New function.
8508         (initialize_tracepoint): Call init_trace_buffer with
8509         DEFAULT_TRACE_BUFFER_SIZE.
8510         * server.c (handle_query): Add QTBuffer:size in the
8511         supported packets.
8512
8513 2013-03-07  Yao Qi  <yao@codesourcery.com>
8514
8515         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8516         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8517         of -1.
8518         (cmd_qtsp): Adjust condition.  Do post increment.
8519         Set cur_action and cur_step_action back to 0.
8520
8521 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
8522
8523         PR server/15236
8524         * linux-low.c (linux_write_memory): Return early success if LEN is
8525         zero.
8526
8527 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
8528
8529         * configure.srv: Add x86_64-*-cygwin* as target.
8530
8531 2013-02-28  Tom Tromey  <tromey@redhat.com>
8532
8533         * configure.ac: Invoke AC_SYS_LARGEFILE.
8534         * configure, config.in: Rebuild.
8535
8536 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
8537
8538         * win32-low.c: Throughout, fix format strings and casts of
8539         printf-like functions to avoid type related warnings on all
8540         platforms.
8541         (get_child_debug_event): Print dwDebugEventCode as hex since
8542         that's how it's usually documented.
8543
8544 2013-02-28  Yao Qi  <yao@codesourcery.com>
8545
8546         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8547         pulongest.
8548
8549 2013-02-27  Jiong Wang  <jiwang@tilera.com>
8550
8551         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8552         (reg-tilegx32.c): New rule.
8553         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8554         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
8555         different register info initializer according to elf class.
8556         (init_registers_tilgx32): New function.  The tilegx32 register info
8557         initializer.
8558         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8559         (tile_store_gregset): Likewise.
8560
8561 2013-02-27  Yao Qi  <yao@codesourcery.com>
8562
8563         * server.c (process_point_options): Print debug message when
8564         debug_threads is true.
8565
8566 2013-02-26  Yao Qi  <yao@codesourcery.com>
8567
8568         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8569
8570 2013-02-19  Pedro Alves  <palves@redhat.com>
8571             Kai Tietz <ktietz@redhat.com>
8572
8573         PR gdb/15161
8574
8575         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8576         instead of strtoul to extract address from packet.
8577         (process_serial_event) <'z'>: Likewise.
8578
8579 2013-02-18  Yao Qi  <yao@codesourcery.com>
8580
8581         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8582
8583 2013-02-14  Pedro Alves  <palves@redhat.com>
8584
8585         Plug memory leak.
8586
8587         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8588         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8589
8590 2013-02-14  Pedro Alves  <palves@redhat.com>
8591
8592         * tracepoint.c (cmd_qtdpsrc): Use savestring.
8593
8594 2013-02-14  Pedro Alves  <palves@redhat.com>
8595
8596         * tracepoint.c (save_string): Delete.
8597         (add_tracepoint_action): Use savestring instead of save_string.
8598
8599 2013-02-12  Pedro Alves  <palves@redhat.com>
8600
8601         * linux-xtensa-low.c: Ditto.
8602         * xtensa-xtregs.c: Ditto.
8603
8604 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
8605
8606         * thread-db.c (thread_db_get_tls_address): NULL pointer check
8607         thread_db.
8608
8609 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
8610
8611         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8612         aarch64_num_wp_regs and aarch64_num_bp_regs to
8613         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8614
8615 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
8616
8617         * linux-aarch64-low.c (ps_get_thread_area): Replace
8618         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8619
8620 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
8621             Marcus Shawcroft  <marcus.shawcroft@arm.com>
8622             Nigel Stephens  <nigel.stephens@arm.com>
8623             Yufeng Zhang  <yufeng.zhang@arm.com>
8624
8625         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8626         (aarch64.c, aarch64-without-fpu.c): New targets.
8627         * configure.srv (aarch64*-*-linux*): New.
8628         * linux-aarch64-low.c: New file.
8629
8630 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
8631
8632         * linux-low.c (handle_extended_wait, linux_create_inferior)
8633         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8634         (dequeue_one_deferred_signal, linux_resume_one_thread)
8635         (fetch_register, linux_write_memory, linux_enable_event_reporting)
8636         (linux_tracefork_grandchild, linux_test_for_tracefork)
8637         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8638         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8639         where the argument is 0.
8640
8641 2013-01-25  Yao Qi  <yao@codesourcery.com>
8642
8643         * event-loop.c: Include "queue.h".
8644         (gdb_event_p): New typedef.
8645         (struct gdb_event) <next_event>: Remove.
8646         (event_queue): Change to QUEUE(gdb_event_p).
8647         (async_queue_event): Remove.
8648         (gdb_event_xfree): New.
8649         (initialize_event_loop): New.
8650         (process_event): Use API from QUEUE.
8651         (wait_for_event): Likewise.
8652         * server.c (main): Call initialize_event_loop.
8653         * server.h (initialize_event_loop): Declare.
8654
8655 2013-01-18  Yao Qi  <yao@codesourcery.com>
8656
8657         * ax.h (struct eval_agent_expr_context): New.
8658         (gdb_eval_agent_expr): Update declaration.
8659         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8660         TFRAME.  Add new argument CTX.
8661         * server.h (struct eval_agent_expr_context): Declare.
8662         (agent_mem_read, agent_tsv_read): Update declaration.
8663         (agent_mem_read_string): Likewise.
8664         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8665         (add_traceframe_block): Add new argument TPOINT.
8666         Increase TPOINT->traceframe_usage.
8667         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8668         eval_tracepoint_agent_expr.
8669         (condition_true_at_tracepoint): Likewise.
8670         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
8671         (agent_mem_read_string, agent_tsv_read): Likewise.
8672
8673 2013-01-16  Yao Qi  <yao@codesourcery.com>
8674
8675         * linux-low.c (linux_resume_one_lwp): Don't check
8676         'lwp->bp_reinsert != 0'.
8677
8678 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8679             Pedro Alves  <palves@redhat.com>
8680
8681         * lynx-low.c (ptrace_request_to_str): Define a temporary
8682         macro and use it to simplify this function's implementation.
8683
8684 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8685
8686         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8687         sets errno.
8688
8689 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8690
8691         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8692
8693 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8694
8695         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8696
8697 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8698
8699         * lynx-low.c (lynx_resume): Use the resume_info parameter
8700         to determine the ptid for the lynx_ptrace call, unless
8701         it is equal to minus_one_ptid, in which case we use the
8702         ptid of the current_inferior.
8703         (lynx_wait_1): After having received a thread create/exit
8704         event, resume the inferior's execution using the signaling
8705         thread's ptid, rather than the old ptid.
8706
8707 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8708
8709         * lynx-low.c (lynx_resume): Delete variable ret.
8710
8711 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
8712
8713         * gdbreplay.c (gdbreplay_version): Update copyright year.
8714         * server.c (gdbserver_version): Likewise.
8715
8716 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8717
8718         * lynx-low.c (lynx_wait_1): Add debug trace before adding
8719         new thread.
8720
8721 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8722
8723         * lynx-low.c (ptrace_request_to_str): Add handling for
8724         PTRACE_GETTRACESIG.
8725
8726 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8727
8728         * lynx-low.c (lynx_attach): Delete variable new_process.
8729
8730 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8731
8732         * lynx-low.c (lynx_create_inferior): Delete variable
8733         new_process.
8734
8735 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8736
8737         * lynx-low.c (ptrace_request_to_str): Do not handle
8738         PTRACE_GETTHREADLIST if this macro does not exist.
8739
8740 2012-12-15  Yao Qi  <yao@codesourcery.com>
8741
8742         * Makefile.in (OBS): Add notif.o.
8743         * notif.c, notif.h: New.
8744         * server.c: Include "notif.h".
8745         (struct vstop_notif) <next>: Remove.
8746         <base>: New field.
8747         (queue_stop_reply): Update.
8748         (push_event, send_next_stop_reply): Remove.
8749         (discard_queued_stop_replies): Update.
8750         (notif_stop): New variable.
8751         (handle_v_stopped): Remove.
8752         (handle_v_requests): Don't call handle_v_stopped.  Call
8753         handle_ack_notif instead.
8754         (queue_stop_reply_callback): Call notif_event_enque instead
8755         of queue_stop_reply.
8756         (handle_status): Don't call send_next_stop_reply, call
8757         notif_write_event instead.
8758         (kill_inferior_callback): Likewise.
8759         (detach_or_kill_inferior_callback): Likewise.
8760         (main): Call initialize_notif.
8761         (process_serial_event): Call QUEUE_is_empty.
8762         (handle_target_event): Call notif_push instead of push event.
8763         * server.h (push_event): Remove declaration.
8764
8765 2012-12-10  Tom Tromey  <tromey@redhat.com>
8766
8767         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8768         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8769         macros.
8770         (.c.o): Rewrite.
8771         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8772         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8773         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8774         (amd64-linux-ipa.o, ax.o): Rewrite.
8775         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8776         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8777         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8778         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8779         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8780         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8781         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8782         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8783         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8784         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8785         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8786         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8787         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8788         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8789         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8790         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8791         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8792         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8793         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8794         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8795         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8796         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8797         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8798         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8799         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8800         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8801         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8802         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8803         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8804         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8805         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8806         (reg-tilegx.o): Remove.
8807         (all_object_files): New macro.
8808         Include .deps files.
8809         * aclocal.m4, configure: Rebuild.
8810         * acinclude.m4: Include depstand.m4, lead-dot.m4.
8811         * configure.ac: Invoke ZW_CREATE_DEPDIR,
8812         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
8813
8814 2012-12-05  Tom Tromey  <tromey@redhat.com>
8815
8816         PR gdb/14917:
8817         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8818
8819 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
8820
8821         * configure.ac: Check for linux/perf_event.h.
8822         * config.in: Regenerated.
8823         * configure: Regenerated.
8824
8825 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
8826
8827         * hostio.c (handle_readlink): Decrease buffer size
8828         parameter passed to readlink by one byte.
8829
8830 2012-11-26  Yao Qi  <yao@codesourcery.com>
8831
8832         * configure.ac (build_warnings): Append '-Wempty-body'.
8833         * configure: Regenerated.
8834         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8835         body.
8836
8837 2012-11-15  Pierre Muller  <muller@sourceware.org>
8838
8839         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8840         * config.in: Regenerate.
8841         * configure: Regenerate.
8842         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8843         Use "gdb_wait.h" header instead of <sys/wait.h> header.
8844         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8845         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8846         header.
8847         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
8848         instead of <sys/wait.h> header.
8849         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8850
8851 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
8852
8853         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8854         (various make rules): Remove -DGDBSERVER
8855
8856 2012-11-09  Yao Qi  <yao@codesourcery.com>
8857
8858         * spu-low.c (current_ptid): Move it to ..
8859         * gdbthread.h: ... here.  New.
8860         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8861         * server.c (myresume, process_serial_event): Likewise.
8862         * thread-db.c (thread_db_find_new_threads): Likewise.
8863         * tracepoint.c (run_inferior_command): Likewise.
8864
8865 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
8866
8867         * server.c (handle_search_memory_1): Include access length in
8868         warning message.
8869
8870 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
8871
8872         * linux-crisv32-low.c: Fix compile errors.
8873
8874 2012-09-04  Yao Qi  <yao@codesourcery.com>
8875
8876         * tracepoint.c (cmd_qtsv): Adjust debug message.
8877         Don't check CUR_TPOINT.
8878
8879 2012-08-28  Yao Qi  <yao@codesourcery.com>
8880
8881         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8882         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8883         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8884         Remove declarations of xmalloc, xreallloc, xstrdup and
8885         freeargv.
8886         * Makefile.in (libiberty_h): New.
8887         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8888         (linux-bfin-low.o): Append dependency 'libiberty.h'.
8889
8890 2012-08-23  Yao Qi  <yao@codesourcery.com>
8891
8892         * server.h: Remove declaration of 'xsnprintf'.
8893
8894 2012-08-22  Keith Seitz  <keiths@redhat.com>
8895
8896         * server.h: Include build-gnulib-gbserver/config.h.
8897         * gdbreplay.c: Likewise.
8898
8899 2012-08-08  Doug Evans  <dje@google.com>
8900
8901         * Makefile.in (SFILES): Add gdb_vecs.c.
8902         (OBS): Add gdb_vecs.o.
8903         (gdb_vecs_h, host_defs_h): New variables.
8904         (thread-db.o): Add $(gdb_vecs_h) dependency.
8905         (gdb_vecs.o): New rule.
8906         * thread-db.c: #include "gdb_vecs.h".
8907         (thread_db_load_search): Use a vector to iterate over path elements.
8908         Handle text appearing after "$pdir".
8909
8910         * configure.ac: Add check for strstr.
8911         * config.in: Regenerate.
8912         * configure: Regenerate.
8913
8914 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
8915
8916         * hostio.c (handle_pread): If pread fails, fall back to attempting
8917         lseek/read.
8918         (handle_pwrite): Likewise for pwrite.
8919
8920 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
8921
8922         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8923         between unsupported TYPE and unimplementable ADDR/LEN combination.
8924         (arm_insert_point): Act on new return value.
8925
8926 2012-07-31  Pedro Alves  <palves@redhat.com>
8927
8928         * server.c (process_point_options): Only skip tokens if we find
8929         one that is unrecognized.  Don't treat 'X' specially while
8930         skipping unrecognized tokens.
8931
8932 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
8933
8934         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8935         to 4-byte-align HW breakpoint addresses for Thumb.
8936
8937 2012-07-27  Yao Qi  <yao@codesourcery.com>
8938
8939         PR remote/14161.
8940
8941         * server.h: Declare gdb_agent_about_to_close.
8942         * target.c (kill_inferior): Include "agent.h".
8943         New.  Send command 'kill'.
8944         * target.h (kill_inferior): Removed macro.
8945         * tracepoint.c (gdb_agent_about_to_close): New.
8946         (gdb_agent_helper_thread): Handle command 'close'.
8947         Wait endlessly until the inferior stops.
8948         Install gdb_agent_remove_socket to atexit hook.
8949         (agent_socket_name): New static variable.
8950         (gdb_agent_socket_init): Replace local variable 'name' with
8951         'agent_socket_name'.
8952         (gdb_agent_remove_socket): New.
8953
8954 2012-07-27  Yao Qi  <yao@codesourcery.com>
8955
8956         * server.c (process_point_options): Stop at 'X' when parsing.
8957
8958 2012-07-19  Michael Eager  <eager@eagercon.com>
8959
8960         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8961         to hw_execute.
8962         * linux-x86-low.c (x86_insert_point, x86_remove_point):
8963         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8964         hardware breakpoint.
8965
8966 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
8967
8968         * gdbserver/linux-low.c (initialize_low): Call
8969         linux_ptrace_init_warnings.
8970
8971 2012-07-02  Doug Evans  <dje@google.com>
8972
8973         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8974         pointer to int.
8975
8976 2012-07-02  Stan Shebs  <stan@codesourcery.com>
8977
8978         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8979         (ax.o): Add it to build rule.
8980         (ax-ipa.o): Ditto.
8981         (OBS): Add format.o.
8982         (IPA_OBS): Add format.o.
8983         * server.c (handle_query): Claim support for breakpoint commands.
8984         (process_point_options): Add command case.
8985         (process_serial_event): Leave running if there are printfs in
8986         effect.
8987         * mem-break.h (any_persistent_commands): Declare.
8988         (add_breakpoint_commands): Declare.
8989         (gdb_no_commands_at_breakpoint): Declare.
8990         (run_breakpoint_commands): Declare.
8991         * mem-break.c (struct point_command_list): New struct.
8992         (struct breakpoint): New field command_list.
8993         (any_persistent_commands): New function.
8994         (add_commands_to_breakpoint): New function.
8995         (add_breakpoint_commands): New function.
8996         (gdb_no_commands_at_breakpoint): New function.
8997         (run_breakpoint_commands): New function.
8998         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8999         locally.
9000         * ax.c: Include format.h.
9001         (ax_printf): New function.
9002         (gdb_eval_agent_expr): Add printf opcode.
9003
9004 2012-06-13  Yao Qi  <yao@codesourcery.com>
9005
9006         * server.c (start_inferior): Remove duplicated writes to fields
9007         'last_resume_kind' and 'last_status' of 'current_inferior'.
9008
9009 2012-06-12  Yao Qi  <yao@codesourcery.com>
9010             Pedro Alves  <palves@redhat.com>
9011
9012         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
9013         comment.
9014         * server.c (handle_v_cont): Extend comment.
9015
9016 2012-06-11  Yao Qi  <yao@codesourcery.com>
9017
9018         * linux-low.c (linux_attach): Add 'static'.
9019
9020 2012-06-06  Yao Qi  <yao@codesourcery.com>
9021
9022         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9023
9024 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
9025
9026         Fix gcc -flto compilation warning.
9027         * server.c (main): Make variable multi_mode and attach volatile.
9028
9029 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9030
9031         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9032         if the platform doesn't know about it.
9033
9034 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
9035
9036         * Makefile.in (SFILES): Add linux-tile-low.c.
9037         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9038         * configure.srv: Handle tilegx-*-linux*.
9039         * linux-tile-low.c: New file.
9040
9041 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9042
9043         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9044
9045 2012-05-24  Pedro Alves  <palves@redhat.com>
9046
9047         PR gdb/7205
9048
9049         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9050
9051 2012-05-24  Pedro Alves  <palves@redhat.com>
9052
9053         PR gdb/7205
9054
9055         Replace target_signal with gdb_signal throughout.
9056
9057 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
9058
9059         * linux-low.c (linux_store_registers): Avoid the copying sequence
9060         when no data has been retrieved by ptrace.
9061
9062 2012-05-22  Will Deacon  <will.deacon@arm.com>
9063
9064         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9065         Include asm/ptrace.h.
9066         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9067         already defined.
9068
9069 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
9070
9071         * linux-low.c (linux_store_registers): Don't re-retrieve data
9072         with ptrace that has already been obtained from /proc.  Always
9073         copy any data retrieved with ptrace to the buffer supplied.
9074
9075 2012-05-11  Yao Qi  <yao@codesourcery.com>
9076             Pedro Alves  <palves@redhat.com>
9077
9078         * linux-low.c (enum stopping_threads_kind): New.
9079         (stopping_threads): Change type to `enum stopping_threads_kind'.
9080         (handle_extended_wait): If stopping and suspending threads, leave
9081         the new_lwp suspended too.
9082         (linux_wait_for_event): Adjust.
9083         (stop_all_lwps): Set `stopping_threads' to
9084         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9085         whether we're suspending threads or just stopping them.  Assert no
9086         recursion happens.
9087
9088 2012-04-29  Yao Qi  <yao@codesourcery.com>
9089
9090         * server.h: Move some code to ...
9091         * gdbthread.h: ... here.  New.
9092         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9093         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9094         (nto-low.o, win32-low.o): Likewise.
9095         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9096         * regcache.c, remote-utils.c, server.c: Likewise.
9097         * target.c, tracepoint.c, win32-low.c: Likewise.
9098
9099 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9100
9101         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9102         (PTRACE_ARG4_TYPE): Likewise.
9103         (PTRACE_XFER_TYPE): Likewise.
9104         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9105         ptrace to PTRACE_ARG3_TYPE.
9106         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9107         (PTRACE_ARG4_TYPE): Likewise.
9108         (PTRACE_XFER_TYPE): Likewise.
9109         (linux_detach_one_lwp): Cast fourth argument of
9110         ptrace to long then PTRACE_ARG4_TYPE.
9111         (regsets_fetch_inferior_registers): Cast third argument of
9112         ptrace to long then PTRACE_ARG3_TYPE.
9113         (regsets_store_inferior_registers): Likewise.
9114
9115 2012-04-20  Pedro Alves  <palves@redhat.com>
9116
9117         * configure: Regenerate.
9118
9119 2012-04-19  Pedro Alves  <palves@redhat.com>
9120
9121         * Makefile.in (GNULIB_BUILDDIR): New.
9122         (LIBGNU, INCGNU, GNULIB_H): Adjust.
9123         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9124         (all, install-only, uninstall, clean-info, all-lib, clean): No
9125         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
9126         (maintainer-clean realclean distclean): Use subdir_do.
9127         (subdir_do): New.
9128         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
9129         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
9130         * acinclude.m4: Include acx_configure_dir.m4.
9131         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9132         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
9133         ACX_CONFIGURE_DIR.
9134         (GNULIB): New.
9135         (GNULIB_STDINT_H): Adjust.
9136         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9137         * gdbreplay.c: Include build-gnulib/config.h.
9138         * server.h: Likewise.
9139         * aclocal.m4: Regenerate.
9140         * config.in: Regenerate.
9141         * configure: Regenerate.
9142
9143 2012-04-19  Pedro Alves  <palves@redhat.com>
9144
9145         * Makefile.in (LIBGNU, INCGNU): Adjust.
9146         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9147         (all, install-only, uninstall, clean-info, all-lib, clean)
9148         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9149         * configure.ac: Adjust AC_OUTPUT output.
9150         * aclocal.m4: Regenerate.
9151         * configure: Regenerate.
9152
9153 2012-04-19  Pedro Alves  <palves@redhat.com>
9154
9155         * Makefile.in (generated_files): New.
9156         (server_h): Remove the explicit dependency on config.h, and depend
9157         on $generated_files.
9158
9159 2012-04-19  Pedro Alves  <palves@redhat.com>
9160
9161         * Makefile.in (INCGNU): Add -Ignulib.
9162
9163 2012-04-19  Pedro Alves  <palves@redhat.com>
9164
9165         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9166         (INCGNU): ... this, and spell out -I here.
9167         (GNULIB_LIB): Rename to ...
9168         (LIBGNU): ... this.
9169         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9170
9171 2012-04-19  Pedro Alves  <palves@redhat.com>
9172
9173         * config.in: Regenerate.
9174
9175 2012-04-19  Pedro Alves  <palves@redhat.com>
9176
9177         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9178         * server.h (memmem): Remove declaration.
9179         * config.in: Regenerate.
9180         * configure: Regenerate.
9181
9182 2012-04-19  Yao Qi  <yao@codesourcery.com>
9183
9184         * Makefile.in (SFILES): Add common/vec.c.
9185         (OBS): Add vec.o.
9186         (vec.o): New rule.
9187
9188 2012-04-19  Yao Qi  <yao@codesourcery.com>
9189
9190         * remote-utils.c (prepare_resume_reply): Replace with macro
9191         target_core_of_thread.
9192         * server.c (handle_qxfer_threads_proper): Likewise.
9193         * target.h (traget_core_of_thread): New macro.
9194
9195 2012-04-18  Pedro Alves  <palves@redhat.com>
9196
9197         * aclocal.m4: Regenerate.
9198         * configure: Regenerate.
9199
9200 2012-04-16  Yao Qi  <yao@codesourcery.com>
9201
9202         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9203         duplicated on address.
9204
9205 2012-04-16  Yao Qi  <yao@codesourcery.com>
9206
9207         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9208         (struct tracepoint_action_ops) <send>: New field.
9209         (m_tracepoint_action_send, r_tracepoint_action_send): New.
9210         (agent_expr_send, x_tracepoint_action_send): New.
9211         (l_tracepoint_action_send): New.
9212         (cmd_qtdp): Download and install tracepoint
9213         according to `use_agent'.
9214         (run_inferior_command): Add one more parameter `len'.
9215         Update callers.
9216         (tracepoint_send_agent): New.
9217         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9218
9219 2012-04-16  Yao Qi  <yao@codesourcery.com>
9220
9221         * tracepoint.c (download_tracepoints): Moved to ...
9222         (cmd_qtstart): ... here.
9223
9224 2012-04-14  Yao Qi  <yao@codesourcery.com>
9225
9226         * tracepoint.c: Include inttypes.h.
9227         (struct collect_memory_action): Use sized types.
9228         (struct tracepoint): Likewise.
9229         (cmd_qtdp, stop_tracing): Update print specifiers.
9230         (cmd_qtp, response_tracepoint): Likewise.
9231         (collect_data_at_tracepoint): Likewise.
9232         (collect_data_at_step): Likewise.
9233
9234 2012-04-14  Yao Qi  <yao@codesourcery.com>
9235
9236         Import gnulib module inttypes.
9237         * aclocal.m4, config.in, configure: Regenerated.
9238
9239 2012-04-14  Yao Qi  <yao@codesourcery.com>
9240
9241         * Makefile.in (maintainer-clean, realclean, distclean): Remove
9242         Makefile and config.status at last.
9243
9244 2012-04-13  Yao Qi  <yao@codesourcery.com>
9245
9246         * tracepoint.c: Include stdint.h unconditionally.
9247
9248 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9249
9250         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9251         on BFD_HAVE_SYS_PROCFS_TYPE.
9252         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9253         * configure: Regenerate.
9254         * config.in: Likewise.
9255
9256 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
9257
9258         * Makefile.in (clean): Also remove x32.c x32-linux.c
9259         x32-avx.c x32-avx-linux.c.
9260         (x32.o): New target.
9261         (x32.c): Likewise.
9262         (x32-linux.o): Likewise.
9263         (x32-linux.c): Likewise.
9264         (x32-avx.o): Likewise.
9265         (x32-avx.c): Likewise.
9266         (x32-avx-linux.o): Likewise.
9267         (x32-avx-linux.c): Likewise.
9268
9269         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9270         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9271         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9272         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9273         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9274         i386/x32-avx-linux.xml.
9275
9276         * linux-x86-low.c (init_registers_x32_linux): New prototype.
9277         (init_registers_x32_avx_linux): Likwise.
9278         (x86_linux_update_xmltarget): Call init_registers_x32_linux
9279         or init_registers_x32_avx_linux if linux_is_elf64 is false.
9280
9281 2012-04-13  Pedro Alves  <palves@redhat.com>
9282
9283         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9284         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9285         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9286         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9287         the sub-make.
9288
9289 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9290
9291         * linux-x86-low.c (compat_x32_clock_t): New.
9292         (compat_x32_siginfo_t): Likewise.
9293         (compat_x32_siginfo_from_siginfo): Likewise.
9294         (siginfo_from_compat_x32_siginfo): Likewise.
9295         (linux_is_elf64): Likewise.
9296         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9297         and siginfo_from_compat_x32_siginfo for x32.
9298         (x86_arch_setup): Set linux_is_elf64.
9299
9300 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9301
9302         PR gdb/13969
9303         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9304         e_machine field.
9305         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9306         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9307         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9308         compatible with process.
9309
9310 2012-04-12  Yao Qi  <yao@codesourcery.com>
9311
9312         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9313         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9314         (install-only, install-info, clean): Handle sub dir gnulib.
9315         (all-lib, am--refresh): New targets.
9316         (memmem.o): Remove target.
9317         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9318         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
9319         (AC_REPLACE_FUNCS): Remove memmem.
9320         Invoke gl_INIT and AM_INIT_AUTOMAKE.
9321         (AC_OUTPUT): Generate Makefile in gnulib/.
9322         * aclocal.m4, config.in, configure: Regenerated.
9323
9324 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
9325
9326         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9327
9328 2012-04-05  Pedro Alves  <palves@redhat.com>
9329
9330         -Werror=strict-aliasing
9331
9332         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9333         pointer.
9334
9335 2012-04-04  Pedro Alves  <palves@redhat.com>
9336
9337         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9338         (sparc_store_gregset_from_stack, sparc_store_gregset)
9339         (sparc_breakpoint_at): Fix formatting.
9340
9341 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9342
9343         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9344         are available.
9345         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9346         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9347         * config.in: Regenerate.
9348         * configure: Likewise.
9349
9350 2012-03-29  Pedro Alves  <palves@redhat.com>
9351
9352         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9353         Correct ptrace arguments.
9354
9355 2012-03-28  Pedro Alves  <palves@redhat.com>
9356
9357         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9358         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9359         (IA64_FR1_REGNUM): New defines.
9360         (ia64_fetch_register): New.
9361         (the_low_target): Install it.
9362         * linux-low.h (struct linux_target_ops) <fetch_register>: New
9363         field.
9364         * linux-low.c (linux_fetch_registers): Try the
9365         the_low_target.fetch_register hook first.
9366
9367         * linux-arm-low.c (the_low_target): Adjust.
9368         * linux-bfin-low.c (the_low_target): Adjust.
9369         * linux-cris-low.c (the_low_target): Adjust.
9370         * linux-crisv32-low.c (the_low_target): Adjust.
9371         * linux-m32r-low.c (the_low_target): Adjust.
9372         * linux-m68k-low.c (the_low_target): Adjust.
9373         * linux-mips-low.c (the_low_target): Adjust.
9374         * linux-ppc-low.c (the_low_target): Adjust.
9375         * linux-s390-low.c (the_low_target): Adjust.
9376         * linux-sh-low.c (the_low_target): Adjust.
9377         * linux-sparc-low.c (the_low_target): Adjust.
9378         * linux-tic6x-low.c (the_low_target): Adjust.
9379         * linux-x86-low.c (the_low_target): Adjust.
9380         * linux-xtensa-low.c (the_low_target): Adjust.
9381
9382 2012-03-26  Pedro Alves  <palves@redhat.com>
9383
9384         * server.c (handle_qxfer_libraries): Don't bail early if
9385         the_target->qxfer_libraries_svr4 is not NULL.
9386
9387 2012-03-26  Pedro Alves  <palves@redhat.com>
9388
9389         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9390
9391 2012-03-23  Pedro Alves  <palves@redhat.com>
9392
9393         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9394         "library-list-svr4" element's start tag when the the DSO list is
9395         empty.
9396
9397 2012-03-23  Pedro Alves  <palves@redhat.com>
9398
9399         * linux-low.c (read_one_ptr): Read the inferior's pointer through
9400         a variable whose type size is the same as the inferior's pointer
9401         size.
9402
9403 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
9404
9405         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9406         struct siginfo.
9407         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9408         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9409         * linux-low.h: Include <signal.h>.
9410         (struct siginfo): Remove forward declaration.
9411         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9412         struct siginfo.
9413
9414 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
9415
9416         * .gitignore: Ignore more files.
9417
9418 2012-03-19  Pedro Alves  <palves@redhat.com>
9419             Jan Kratochvil  <jan.kratochvil@redhat.com>
9420
9421         * server.c (cont_thread, general_thread): Add describing comments.
9422         (start_inferior): Clear `cont_thread'.
9423         (handle_v_cont): Don't set `cont_thread' if resuming all threads
9424         of a process.
9425
9426 2012-03-15  Yao Qi  <yao@codesourcery.com>
9427
9428         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9429         handling to ...
9430         (cmd_qtdp): ... here.
9431
9432 2012-03-15  Yao Qi  <yao@codesourcery.com>
9433
9434         * tracepoint.c (struct tracepoint_action_ops): New.
9435         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9436         (m_tracepoint_action_download): New.
9437         (r_tracepoint_action_download): New.
9438         (x_tracepoint_action_download): New.
9439         (l_tracepoint_action_download): New.
9440         (add_tracepoint_action): Install `action->ops' according type.
9441         (download_tracepoint_1): Move code `download' function pointer
9442         of various tracepoint_action_ops.
9443
9444 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
9445
9446         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
9447         linux_ptrace_attach_warnings.
9448
9449 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
9450
9451         * Makefile.in (linux-ptrace.o): New.
9452         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9453         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9454         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9455         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9456         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9457         of these targets.
9458         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9459
9460 2012-03-08  Yao Qi  <yao@codesourcery.com>
9461             Pedro Alves  <palves@redhat.com>
9462
9463         Fix PR server/13392.
9464         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9465         offset of JMP insn.
9466         * tracepoint.c (remove_tracepoint): New.
9467         (cmd_qtdp): Call remove_tracepoint when failed to install.
9468
9469 2012-03-07  Pedro Alves  <palves@redhat.com>
9470
9471         * linux-low.c (get_detach_signal): New.
9472         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9473         Pass on pending signals to PTRACE_DETACH.  Check the result of the
9474         ptrace call.
9475         * server.c (program_signals, program_signals_p): New.
9476         (handle_general_set): Handle QProgramSignals.
9477         * server.h (program_signals, program_signals_p): Declare.
9478
9479 2012-03-05  Pedro Alves  <palves@redhat.com>
9480             Jan Kratochvil  <jan.kratochvil@redhat.com>
9481
9482         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9483         New comment why.
9484
9485 2012-03-03  Yao Qi  <yao@codesourcery.com>
9486
9487         * tracepoint.c (tracepoint_look_up_symbols): Update call to
9488         agent_look_up_symbols.
9489
9490 2012-03-03  Yao Qi  <yao@codesourcery.com>
9491
9492         * Makefile.in (linux-low.o): Keep dependence on agent.h.
9493         (linux-x86-low.o): Likewise.
9494         * server.h: Remove in_process_agent_loaded.
9495         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
9496         common/agent.c.
9497         Update callers.
9498
9499 2012-03-03  Yao Qi  <yao@codesourcery.com>
9500
9501         * tracepoint.c (gdb_agent_capability): New global.
9502         (in_process_agent_loaded_ust): Renamed to
9503         `in_process_agent_supports_ust'.
9504         Update callers.
9505         (in_process_agent_supports_ust): Call agent_capability_check.
9506         (clear_installed_tracepoints): Assert that agent supports
9507         agent.
9508
9509 2012-03-03  Yao Qi  <yao@codesourcery.com>
9510
9511         * linux-low.c (linux_supports_agent): New.
9512         (linux_target_ops): Initialize field `supports_agent' with
9513         linux_supports_agent.
9514         * target.h (struct target_ops) <supports_agent>: New.
9515         (target_supports_agent): New macro.
9516         * server.c (handle_general_set): Handle packet 'QAgent'.
9517         (handle_query): Send `QAgent+'.
9518         * Makefile.in (server.o): Depends on agent.h.
9519
9520 2012-03-03  Yao Qi  <yao@codesourcery.com>
9521
9522         * Makefile.in (OBS): Add agent.o.
9523         Add new rule for agent.o.
9524         Track dependence of tracepoint.c on agent.h.
9525         * tracepoint.c (run_inferior_command_1):
9526         (run_inferior_command): Call agent_run_command.
9527         (gdb_ust_connect_sync_socket): Deleted.  Move it to
9528         common/agent.c.
9529         (resume_thread, stop_thread): Likewise.
9530         (gdb_ust_socket_init): Renamed to ...
9531         (gdb_agent_socket_init): ... New.
9532         (gdb_ust_thread): Renamed to ...
9533         (gdb_agent_helper_thread): ... New.
9534         (gdb_ust_init): Move some code to ...
9535         (gdb_agent_init): ... here.  New.
9536         [HAVE_UST]: Call gdb_ust_init.
9537         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
9538         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9539         * config.in, configure: Regenerated.
9540
9541 2012-03-02  Pedro Alves  <palves@redhat.com>
9542
9543         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9544         * linux-low.c (struct simple_pid_list): New.
9545         (stopped_pids): New a struct simple_pid_list pointer.
9546         (add_to_pid_list, pull_pid_from_list): New.
9547         (handle_extended_wait): Don't assume the first signal new children
9548         report is SIGSTOP.  Adjust call to pull_pid_from_list.
9549         (linux_wait_for_lwp): Adjust.
9550
9551 2012-03-02  Yao Qi  <yao@codesourcery.com>
9552
9553         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9554         debug log.
9555
9556 2012-03-02  Yao Qi  <yao@codesourcery.com>
9557
9558         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9559         `stop_pc' and `tpoint'.  Update caller.
9560
9561 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
9562
9563         * linux-low.h (linux_target_ops): Add regset_bitmap member.
9564         * linux-low.c (use_linux_regsets): New macro.
9565         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9566         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9567         (linux_register_in_regsets): New function.
9568         (usr_fetch_inferior_registers): Skip registers covered by
9569         regsets.
9570         (usr_store_inferior_registers): Likewise.
9571         (usr_fetch_inferior_registers): New macro.
9572         (usr_store_inferior_registers): Likewise.
9573         (linux_fetch_registers): Handle mixed regset/non-regset targets.
9574         (linux_store_registers): Likewise.
9575         * linux-mips-low.c (init_registers_mips_dsp_linux): New
9576         prototype.
9577         (init_registers_mips64_dsp_linux): Likewise.
9578         (init_registers_mips_linux): New macro.
9579         (init_registers_mips_dsp_linux): Likewise.
9580         (mips_dsp_num_regs): Likewise.
9581         (DSP_BASE, DSP_CONTROL): New fallback macros.
9582         (mips_base_regs): New macro.
9583         (mips_regmap): Use it.  Fix the size.
9584         (mips_dsp_regmap): New variable.
9585         (mips_dsp_regset_bitmap): Likewise.
9586         (mips_arch_setup): New function.
9587         (mips_cannot_fetch_register): Use the_low_target.regmap rather
9588         than mips_regmap.
9589         (mips_cannot_store_register): Likewise.
9590         (the_low_target): Update .arch_setup, .num_regs and .regmap
9591         initializers.  Add .regset_bitmap initializer.
9592         * linux-arm-low.c (the_low_target): Add .regset_bitmap
9593         initializer.
9594         * linux-bfin-low.c (the_low_target): Likewise.
9595         * linux-cris-low.c (the_low_target): Likewise.
9596         * linux-crisv32-low.c (the_low_target): Likewise.
9597         * linux-ia64-low.c (the_low_target): Likewise.
9598         * linux-m32r-low.c (the_low_target): Likewise.
9599         * linux-m68k-low.c (the_low_target): Likewise.
9600         * linux-ppc-low.c (the_low_target): Likewise.
9601         * linux-s390-low.c (the_low_target): Likewise.
9602         * linux-sh-low.c (the_low_target): Likewise.
9603         * linux-sparc-low.c (the_low_target): Likewise.
9604         * linux-tic6x-low.c (the_low_target): Likewise.
9605         * linux-x86-low.c (the_low_target): Likewise.
9606         * linux-xtensa-low.c (the_low_target): Likewise.
9607         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9608         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
9609         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9610         srv_xmlfiles.
9611         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9612         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9613
9614 2012-02-29  Yao Qi  <yao@codesourcery.com>
9615             Pedro Alves  <palves@redhat.com>
9616
9617         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9618         `step_over_finished' is true.
9619
9620 2012-02-27  Pedro Alves  <palves@redhat.com>
9621
9622         * linux-low.c (pid_is_stopped): Delete, moved to common/.
9623         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9624
9625 2012-02-27  Pedro Alves  <palves@redhat.com>
9626
9627         PR server/9684
9628         * linux-low.c (pid_is_stopped): New.
9629         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9630
9631 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
9632
9633         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9634         of conditions.
9635
9636 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
9637
9638         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9639
9640 2012-02-24  Luis Machado  <lgustavo@codesourcery>
9641
9642         * server.c (handle_query): Advertise support for target-side
9643         breakpoint condition evaluation.
9644         (process_point_options): New function.
9645         (process_serial_event): When inserting a breakpoint, check for
9646         a target-side condition that should be evaluated.
9647
9648         * mem-break.c: Include regcache.h and ax.h.
9649         (point_cond_list_t): New data structure.
9650         (breakpoint) <cond_list>: New field.
9651         (find_gdb_breakpoint_at): Make non-static.
9652         (delete_gdb_breakpoint_at): Clear any target-side
9653         conditions.
9654         (clear_gdb_breakpoint_conditions): New function.
9655         (add_condition_to_breakpoint): Likewise.
9656         (add_breakpoint_condition): Likewise.
9657         (gdb_condition_true_at_breakpoint): Likewise.
9658         (gdb_breakpoint_here): Return result directly instead
9659         of going through a local variable.
9660
9661         * mem-break.h (find_gdb_breakpoint_at): New prototype.
9662         (clear_gdb_breakpoint_conditions): Likewise.
9663         (add_breakpoint_condition): Likewise.
9664         (gdb_condition_true_at_breakpoint): Likewise.
9665
9666         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9667         (need_step_over_p): Take target-side breakpoint condition into
9668         consideration.
9669
9670 2012-02-24  Luis Machado  <lgustavo@codesourcery>
9671
9672         * server.h: Include tracepoint.h.
9673         (agent_mem_read, agent_get_trace_state_variable_value,
9674         agent_set_trace_state_variable_value,
9675         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9676         get_set_tsv_func_addr): New prototypes.
9677
9678         * ax.h: New include file.
9679         * ax.c: New source file.
9680
9681         * tracepoint.c: Include ax.h.
9682         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9683         agent_expr, eval_result_type): Move to ax.h.
9684         (parse_agent_expr): Rename to ...
9685         (gdb_parse_agent_expr): ... this, make it non-static and move
9686         to ax.h.
9687         (unparse_agent_expr) Rename to ...
9688         (gdb_unparse_agent_expr): ... this, make it non-static and move
9689         to ax.h.
9690         (eval_agent_expr): Rename to ...
9691         (eval_tracepoint_agent_expr): ... this.
9692         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9693         forward declarations.
9694         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9695         (agent_get_trace_state_variable_value): New function.
9696         (agent_set_trace_state_variable_value): New function.
9697         (cmd_qtdp): Call gdb_parse_agent_expr (...).
9698         (response_tracepoint): Call gdb_unparse_agent_expr (...).
9699         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9700         (condition_true_at_tracepoint): Likewise.
9701         (parse_agent_expr): Rename to ...
9702         (gdb_parse_agent_expr): ... this and move to ax.c.
9703         (unparse_agent_expr): Rename to ...
9704         (gdb_unparse_agent_expr): ... this and move to ax.c.
9705         (gdb_agent_op_name): Move to ax.c.
9706         (eval_agent_expr): Rename to ...
9707         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9708         and move to ax.c.
9709         (eval_tracepoint_agent_expr): New function.
9710         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9711         non-static.
9712         (current_insn_ptr, emit_error, struct bytecode_address): Move to
9713         ax.c.
9714         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9715         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9716         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9717         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9718         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9719         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9720         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9721         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9722         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9723         (compile_bytecodes): Remove forward declaration.
9724         (is_goto_target): Move to ax.c.
9725         (compile_bytecodes): Move to ax.c and call
9726         agent_get_trace_state_variable_value (...) and
9727         agent_set_trace_state_variable_value (...).
9728
9729         * Makefile.in: Update ax.c and IPA dependencies.
9730
9731 2012-02-24  Pedro Alves  <palves@redhat.com>
9732
9733         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9734         (cmd_bigqtbuffer_circular): ... this.  Only handle
9735         'QTBuffer:circular:'.
9736         (handle_tracepoint_general_set): Adjust.
9737
9738 2012-02-16  Yao Qi  <yao@codesourcery.com>
9739
9740         * inferiors.c: Move code to ...
9741         * dll.c: .... here.  New.
9742         * server.h: Declare clear_dlls.
9743         * Makefile.in (SFILES): Add dll.c.
9744         (OBS): Add dll.o
9745         (dll.o): New rule.
9746
9747 2012-02-11  Yao Qi  <yao@codesourcery.com>
9748
9749         * server.c: (handle_monitor_command): Add a new parameter
9750         `own_buf'.
9751         (handle_query): Update caller.
9752
9753 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
9754
9755         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9756         * configure, config.in: Regenerate.
9757         * hostio.c: Provide an alternate implementation if HAVE_READLINK
9758         is not defined.
9759
9760 2012-02-02  Pedro Alves  <palves@redhat.com>
9761
9762         Try SIGKILL first, then PTRACE_KILL.
9763         * linux-low.c (linux_kill_one_lwp): New.
9764         (linux_kill_one_lwp): Rename to ...
9765         (kill_one_lwp_callback): ... this.  Use the new
9766         linux_kill_one_lwp.
9767
9768 2012-02-02  Pedro Alves  <palves@redhat.com>
9769
9770         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9771         inferior.
9772
9773 2012-01-27  Pedro Alves  <palves@redhat.com>
9774
9775         * linux-low.c (linux_child_pid_to_exec_file): Delete.
9776         (elf_64_file_p): Make static.
9777         (linux_pid_exe_is_elf_64_file): New.
9778         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9779         Delete declarations.
9780         (linux_pid_exe_is_elf_64_file): Declare.
9781         * linux-x86-low.c (x86_arch_setup): Use
9782         linux_pid_exe_is_elf_64_file.
9783
9784 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
9785
9786         * linux-low.c (linux_wait_for_event_1): Rename to ...
9787         (linux_wait_for_event): ... here and merge it with former
9788         linux_wait_for_event - new variable wait_ptid, use it.
9789         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9790
9791 2012-01-23  Pedro Alves  <palves@redhat.com>
9792
9793         * server.c (main): Avoid yet another case of infinite loop while
9794         detaching/killing after a longjmp.
9795
9796 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9797
9798         Code cleanup.
9799         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9800
9801 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
9802
9803         * hostio.c (handle_readlink): New function.
9804         (handle_vFile): Call it to handle "vFile:readlink" packets.
9805
9806 2012-01-20  Pedro Alves  <palves@redhat.com>
9807             Ulrich Weigand  <ulrich.weigand@linaro.org>
9808
9809         * server.c (handle_v_requests): Only support vAttach and vRun to
9810         start multiple processes when in extended protocol mode.
9811
9812 2012-01-17  Pedro Alves  <palves@redhat.com>
9813
9814         * tracepoint.c (initialize_tracepoint): Use mmap instead of
9815         memalign plus mprotect to allocate the scratch buffer.
9816
9817 2012-01-13  Pedro Alves  <palves@redhat.com>
9818
9819         * server.c (attach_inferior): Clear `cont_thread'.
9820
9821 2012-01-13  Pedro Alves  <palves@redhat.com>
9822
9823         * server.c (main): Avoid infinite loop while detaching/killing
9824         after a longjmp.
9825
9826 2012-01-09  Doug Evans  <dje@google.com>
9827
9828         * server.c (start_inferior): Set last_ptid in --wrapper case.
9829
9830 2012-01-06  Yao Qi  <yao@codesourcery.com>
9831
9832         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9833         defined.
9834         [IN_PROCESS_AGENT] (debug_agent): New global variable.
9835
9836 2012-01-04  Yao Qi  <yao@codesourcery.com>
9837
9838         * tracepoint.c (cmd_qtdp): Print debug message
9839         for static tracepoint.
9840
9841 2012-01-04  Yao Qi  <yao@codesourcery.com>
9842
9843         * tracepoint.c (trace_vdebug): Differentiate debug message
9844         between gdbserver and IPA.
9845
9846 2012-01-03  Yao Qi  <yao@codesourcery.com>
9847
9848         * tracepoint.c (tracepoint_was_hit): Don't collect for
9849         static tracepoint.
9850
9851 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
9852
9853         * terminal.h: Reformat copyright header.
9854
9855 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
9856
9857         * server.c (gdbserver_version): Update copyright year.
9858         * gdbreplay.c (gdbreplay_version): Likewise.
9859
9860 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
9861
9862         * linux-low.c (linux_create_inferior): Put empty if clause for write.
9863
9864         Revert:
9865         2011-12-18  Hui Zhu  <teawater@gmail.com>
9866         * linux-low.c (linux_create_inferior): Save return value to ret.
9867
9868 2011-12-18  Hui Zhu  <teawater@gmail.com>
9869
9870         * linux-low.c (linux_create_inferior): Save return value to ret.
9871
9872 2011-12-16  Doug Evans  <dje@google.com>
9873
9874         * linux-low.c (linux_create_inferior): If stdio connection,
9875         redirect stdin from /dev/null, stdout to stderr.
9876         * remote-utils.c (remote_is_stdio): New static global.
9877         (remote_connection_is_stdio): New function.
9878         (remote_prepare): Handle stdio connection.
9879         (remote_open): Ditto.
9880         (remote_close): Don't close stdin for stdio connections.
9881         (read_prim,write_prim): New functions.  Replace all calls to
9882         read/write to these.
9883         * server.c (main): Watch for "-" argument.  Move call to
9884         remote_prepare before start_inferior.
9885         * server.h (STDIO_CONNECTION_NAME): New macro.
9886         (remote_connection_is_stdio): Declare.
9887
9888         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9889         in debugging output.
9890
9891 2011-12-15  Yao Qi  <yao@codesourcery.com>
9892
9893         * tracepoint.c: Include sys/syscall.h.
9894         (gdb_ust_thread): Remove preprocessor conditional.
9895
9896 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
9897
9898         * linux-low.c (linux_detach_one_lwp): Call
9899         the_low_target.prepare_to_resume before detaching.
9900
9901 2011-12-14  Yao Qi  <yao@codesourcery.com>
9902
9903         * tracepoint.c (gdb_ust_thread): Don't ignore return value
9904         of write.
9905
9906 2011-12-14  Yao Qi  <yao@codesourcery.com>
9907
9908         * i386-low.c (i386_low_stopped_data_address): Initialize local
9909         variable `control'.
9910
9911 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
9912
9913         PR remote/13492
9914
9915         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9916         DR_CONTROL unless necessary.  Extend comments.
9917         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9918         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
9919
9920 2011-12-13  Yao Qi  <yao@codesourcery.com>
9921
9922         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9923         macros.
9924         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9925
9926 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
9927
9928         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9929         Print new debug message for such case.
9930
9931 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
9932
9933         Fix overlapping memcpy.
9934         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
9935         the read_inferior_memory transfer.
9936         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
9937         write_inferior_memory transfer.
9938         (set_fast_tracepoint_jump): New variable buf.  Use it for the
9939         read_inferior_memory and write_inferior_memory transfers.
9940         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9941         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9942         Use it for the write_inferior_memory transfer.
9943         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9944         buffers.
9945
9946 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
9947
9948         * linux-low.c (fetch_register, store_register): Make code
9949         consistent, fix formatting.
9950
9951 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
9952
9953         * linux-low.c (usr_store_inferior_registers): Factor out code
9954         to handle individual registers into...
9955         (store_register): ... this new function.
9956
9957 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
9958
9959         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9960         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9961         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9962         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9963         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9964         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9965         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9966         (srv_xmlfiles): Add new XML files.
9967
9968         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9969         and <sys/uio.h>.
9970         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9971         (init_registers_s390_linux32v1): Add prototype.
9972         (init_registers_s390_linux32v2): Likewise.
9973         (init_registers_s390_linux64v1): Likewise.
9974         (init_registers_s390_linux64v2): Likewise.
9975         (init_registers_s390x_linux64v1): Likewise.
9976         (init_registers_s390x_linux64v2): Likewise.
9977         (s390_num_regs): Increment to 52.
9978         (s390_regmap): Add orig_r2 register.
9979         (s390_num_regs_3264): Increment to 68.
9980         (s390_regmap_3264): Add orig_r2 register.
9981         (s390_collect_ptrace_register): Handle orig_r2 register.
9982         (s390_supply_ptrace_register): Likewise.
9983         (s390_fill_last_break): New function.
9984         (s390_store_last_break): Likewise.
9985         (s390_fill_system_call): New function.
9986         (s390_store_system_call): Likewise.
9987         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9988         register sets.
9989         (s390_check_regset): New function.
9990         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9991         NT_S390_SYSTEM_CALL regsets and use appropriate description.
9992         Update target_regsets for available register sets.
9993
9994 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
9995             Jan Kratochvil  <jan.kratochvil@redhat.com>
9996
9997         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9998         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9999         New.
10000         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10001         * linux-low.h (struct process_info_private): New member r_debug.
10002         * server.c (handle_qxfer_libraries): Call
10003         the_target->qxfer_libraries_svr4.
10004         (handle_qxfer_libraries_svr4): New function.
10005         (qxfer_packets): New entry "libraries-svr4".
10006         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10007         * target.h (struct target_ops): New member qxfer_libraries_svr4.
10008         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10009         PACKET_qXfer_libraries_svr4.
10010
10011 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
10012
10013         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10014         PSW address/mask between 8-byte and 16-byte formats.
10015         (s390_supply_ptrace_register): Likewise.
10016         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10017         basic addressing mode bit.
10018
10019 2011-11-24  Stan Shebs  <stan@codesourcery.com>
10020
10021         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10022
10023 2011-11-17  Stan Shebs  <stan@codesourcery.com>
10024
10025         * tracepoint.c (struct tracepoint): New field traceframe_usage.
10026         (tracing_start_time): New global.
10027         (tracing_stop_time): New global.
10028         (tracing_user_name): New global.
10029         (tracing_notes): New global.
10030         (tracing_stop_note): New global.
10031         (cmd_qtstart): Set traceframe_usage, start_time.
10032         (stop_tracing): Set stop_time.
10033         (cmd_qtstatus): Report additional status.
10034         (cmd_qtp): New function.
10035         (handle_tracepoint_query): Call it.
10036         (cmd_qtnotes): New function.
10037         (handle_tracepoint_general_set): Call it.
10038         (get_timestamp): Rename from tsv_get_timestamp.
10039
10040 2011-11-14  Stan Shebs  <stan@codesourcery.com>
10041             Kwok Cheung Yeung  <kcy@codesourcery.com>
10042
10043         * linux-x86-low.c (small_jump_insn): New.
10044         (i386_install_fast_tracepoint_jump_pad): Add arguments for
10045         trampoline and error message, build a trampoline and issue a small
10046         jump instruction to it.
10047         (x86_install_fast_tracepoint_jump_pad): Add arguments for
10048         trampoline and error message.
10049         (x86_get_min_fast_tracepoint_insn_len): New.
10050         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10051         * linux-low.h (struct linux_target_ops): Add arguments to
10052         install_fast_tracepoint_jump_pad operation, add new operation.
10053         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10054         arguments.
10055         (linux_get_min_fast_tracepoint_insn_len): New function.
10056         (linux_target_op): Add new operation.
10057         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10058         (gdb_trampoline_buffer_end): Ditto.
10059         (gdb_trampoline_buffer_error): Ditto.
10060         (struct ipa_sym_addresses): Add fields for new IPA variables.
10061         (symbol_list): Add entries for new IPA variables.
10062         (struct tracepoint): Add fields to hold the address range of the
10063         trampoline used by the tracepoint.
10064         (trampoline_buffer_head): New static variable.
10065         (trampoline_buffer_tail): Ditto.
10066         (claim_trampoline_space): New function.
10067         (have_fast_tracepoint_trampoline_buffer): New function.
10068         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10069         structure.
10070         (install_fast_tracepoint): Ditto, also add error buffer argument.
10071         (cmd_qtminftpilen): New function.
10072         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10073         (fast_tracepoint_from_trampoline_address): New function.
10074         (fast_tracepoint_collecting): Handle trampoline as part of jump
10075         pad space.
10076         (set_trampoline_buffer_space): New function.
10077         (initialize_tracepoint): Initialize new IPA variables.
10078         * target.h (struct target_ops): Add arguments to
10079         install_fast_tracepoint_jump_pad operation, add new
10080         get_min_fast_tracepoint_insn_len operation.
10081         (target_get_min_fast_tracepoint_insn_len): New.
10082         (install_fast_tracepoint_jump_pad): Add arguments.
10083         * server.h (IPA_BUFSIZ): Define.
10084         * linux-i386-ipa.c: Include extra header files.
10085         (initialize_fast_tracepoint_trampoline_buffer): New function.
10086         (initialize_low_tracepoint): Call it.
10087         * server.h (set_trampoline_buffer_space): Declare.
10088         (claim_trampoline_space): Ditto.
10089         (have_fast_tracepoint_trampoline_buffer): Ditto.
10090
10091 2011-11-14  Yao Qi  <yao@codesourcery.com>
10092
10093         * server.c (handle_query): Handle InstallInTrace for qSupported.
10094         * tracepoint.c (add_tracepoint): Sort list.
10095         (install_tracepoint, download_tracepoint): New.
10096         (cmd_qtdp): Call them to install and download tracepoints.
10097         (sort_tracepoints): Removed.
10098         (cmd_qtstart): Update.
10099
10100 2011-11-14  Yao Qi  <yao@codesourcery.com>
10101
10102         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10103         * mem-break.h: Declare.
10104         * tracepoint.c (cmd_qtstart): Move some code to ...
10105         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10106         New.
10107         (download_tracepoints): Move some code to ...
10108         (download_tracepoint_1): ... here.  New.
10109
10110 2011-11-08  Yao Qi  <yao@codesourcery.com>
10111
10112         * remote-utils.c (relocate_instruction): A comment fix.
10113
10114 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
10115
10116         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10117         (i386_dr_low_get_control, i386_dr_low_get_status): Use
10118         dr_status_mirror and dr_control_mirror from debug_reg_state.
10119         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10120         (i386_initial_stuff): Remove use of deleted globals.
10121         (i386_get_thread_context, i386_set_thread_context,
10122         i386_thread_added): Use dr_status_mirror and dr_control_mirror
10123         from debug_reg_state.
10124
10125 2011-11-05  Yao Qi  <yao@codesourcery.com>
10126
10127         * tracepoint.c (gdb_collect): Loop over tracepoints of same
10128         address as TPOINT's.
10129
10130 2011-11-02  Stan Shebs  <stan@codesourcery.com>
10131
10132         * tracepoint.c (agent_mem_read_string): New function.
10133         (eval_agent_expr): Call it for tracenz.
10134         * server.c (handle_query): Report support for tracenz.
10135
10136 2011-11-02  Yao Qi  <yao@codesourcery.com>
10137
10138         * tracepoint.c (cmd_qtstart): Remove unused local variables.
10139
10140 2011-11-02  Yao Qi  <yao@codesourcery.com>
10141
10142         * target.h: Fix a typo in comment.
10143
10144 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
10145
10146         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
10147         clobber the breakpoints' shadows with fast tracepoint jumps.
10148         * mem-break.h (check_mem_write): Add `myaddr' parameter.
10149         * target.c (write_inferior_memory): Also pass MYADDR down to
10150         check_mem_write.
10151
10152 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
10153
10154         * configure.ac: Check support for personality routine.
10155         * configure: Regenerate.
10156         * config.in: Likewise.
10157         * linux-low.c: Include <sys/personality.h>.
10158         Define ADDR_NO_RANDOMIZE if necessary.
10159         (linux_create_inferior): Disable address space randomization when
10160         forking inferior, if requested.
10161         (linux_supports_disable_randomization): New function.
10162         (linux_target_ops): Install it.
10163         * server.h (disable_randomization): Declare.
10164         * server.c (disable_randomization): New global variable.
10165         (handle_general_set): Handle QDisableRandomization.
10166         (handle_query): Likewise for qSupported.
10167         (main): Support --disable-randomization and --no-disable-randomization
10168         command line arguments.
10169         * target.h (struct target_ops): Add supports_disable_randomization.
10170         (target_supports_disable_randomization): New macro.
10171
10172 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
10173
10174         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10175         ifdef check.
10176         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10177         [!PT_GETDSBT] (target_loadmap): New definition.
10178         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10179         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10180         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10181         and PT_GETDSBT to LINUX_LOADMAP.
10182         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10183         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10184
10185 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10186
10187         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10188         (arm_linux_hwbp_cap): New static variable.
10189         (arm_linux_get_hwbp_cap): Replace by ...
10190         (arm_linux_init_hwbp_cap): ... this new function.
10191         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10192         (arm_linux_get_hw_watchpoint_count): Likewise.
10193         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10194         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10195         (arm_prepare_to_resume): Use perror_with_name instead of error.
10196
10197 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10198
10199         * linux-arm-low.c: Include <signal.h>.
10200         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10201         (struct arm_linux_hwbp_cap): New data type.
10202         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10203         (struct arm_linux_hw_breakpoint): New data type.
10204         (MAX_BPTS, MAX_WPTS): Define.
10205         (struct arch_process_info, struct arch_lwp_info): New data types.
10206         (arm_linux_get_hwbp_cap): New function.
10207         (arm_linux_get_hw_breakpoint_count): Likewise.
10208         (arm_linux_get_hw_watchpoint_count): Likewise.
10209         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10210         (arm_hwbp_control_initialize): Likewise.
10211         (arm_hwbp_control_is_enabled): Likewise.
10212         (arm_hwbp_control_is_initialized): Likewise.
10213         (arm_hwbp_control_disable): Likewise.
10214         (arm_linux_hw_breakpoint_equal): Likewise.
10215         (arm_linux_hw_point_initialize): Likewise.
10216         (struct update_registers_data): New data structure.
10217         (update_registers_callback: New function.
10218         (arm_insert_point): Likewise.
10219         (arm_remove_point): Likewise.
10220         (arm_stopped_by_watchpoint): Likewise.
10221         (arm_stopped_data_address): Likewise.
10222         (arm_new_process): Likewise.
10223         (arm_new_thread): Likewise.
10224         (arm_prepare_to_resume): Likewise.
10225         (the_low_target): Register arm_insert_point, arm_remove_point,
10226         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10227         arm_new_thread, and arm_prepare_to_resume.
10228
10229 2011-09-15  Stan Shebs  <stan@codesourcery.com>
10230
10231         * server.h (struct emit_ops): Add compare-goto fields.
10232         * tracepoint.c (gdb_agent_op_sizes): New table.
10233         (emit_eq_goto): New function.
10234         (emit_ne_goto): New function.
10235         (emit_lt_goto): New function.
10236         (emit_le_goto): New function.
10237         (emit_gt_goto): New function.
10238         (emit_ge_goto): New function.
10239         (is_goto_target): New function.
10240         (compile_bytecodes): Recognize special cases of compare-goto
10241         combinations and call specialized emitters for them.
10242         * linux-x86-low.c (amd64_emit_eq_goto): New function.
10243         (amd64_emit_ne_goto): New function.
10244         (amd64_emit_lt_goto): New function.
10245         (amd64_emit_le_goto): New function.
10246         (amd64_emit_gt_goto): New function.
10247         (amd64_emit_ge_goto): New function.
10248         (amd64_emit_ops): Add the new functions.
10249         (i386_emit_eq_goto): New function.
10250         (i386_emit_ne_goto): New function.
10251         (i386_emit_lt_goto): New function.
10252         (i386_emit_le_goto): New function.
10253         (i386_emit_gt_goto): New function.
10254         (i386_emit_ge_goto): New function.
10255         (i386_emit_ops): Add the new functions.
10256
10257 2011-09-08  Stan Shebs  <stan@codesourcery.com>
10258
10259         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10260         (i386_emit_epilogue): Restore %ebx.
10261
10262 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
10263
10264         * server.c (step_thread): Remove definition.
10265         (process_serial_event): Don't handle Hs.
10266         * server.h (step_thread): Remove declaration.
10267         * target.c (set_desired_inferior): Remove use of step_thread.
10268
10269 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10270
10271         * linux-low.c: Include linux-procfs.h.
10272         (linux_attach_lwp_1): Update comments.
10273         (linux_attach): Scan for existing threads when attaching to a
10274         process that is the tgid.
10275         * Makefile.in: Update dependencies.
10276
10277 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10278
10279         * configure.srv: Add linux-procfs.o dependencies.
10280
10281 2011-08-14  Yao Qi  <yao@codesourcery.com>
10282
10283         * target.h (struct target_ops): Fix indent.
10284         * win32-low.c (win32_target_ops): Fix comment.
10285
10286 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
10287             Yao Qi  <yao@codesourcery.com>
10288
10289         * Makefile.in (clean): Remove tic6x-*.c files.
10290         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10291         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10292         (tic6x-c64xp-linux.c): Likewise.
10293         * configure.srv: Add support for tic6x-*-uclinux.
10294         * linux-tic6x-low.c: New.
10295         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10296
10297 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
10298             Yao Qi  <yao@codesourcery.com>
10299
10300         * target.h (struct target_ops): Add read_loadmap.
10301         * linux-low.c (struct target_loadseg): New type.
10302         (struct target_loadmap): New type.
10303         (linux_read_loadmap): New function.
10304         (linux_target_ops): Add linux_read_loadmap.
10305         * server.c (handle_query): Support qXfer:fdpic:read packet.
10306         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10307         to NULL.
10308
10309 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
10310
10311         * win32-low.c: Include <stdint.h>.
10312
10313 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
10314
10315         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10316         to the inferior here.
10317         (i386_remove_aligned_watchpoint): Ditto.
10318         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10319         fit part of the watchpoint in the debug registers.
10320         (i386_update_inferior_debug_regs): New.
10321         (i386_low_insert_watchpoint): Work on a local mirror of the debug
10322         registers, and only update the inferior on success.
10323         (i386_low_remove_watchpoint): Ditto.
10324
10325 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
10326
10327         * linux-low.c (compare_ints, unique, list_threads, show_process,
10328         linux_core_of_thread): Delete.
10329         (linux_target_ops): Change linux_core_of_thread to
10330         linux_common_core_of_thread.
10331         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10332         * utils.c (malloc_failure): Change type of argument.
10333         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10334         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10335         common/linux-osdata.c, common/ptid.c and common/buffer.c.
10336         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10337         (IPA_OBJS): Add common-utils-ipa.o.
10338         (ptid_h, linux_osdata_h): New macros.
10339         (server_h): Add common/common-utils.h, common/xml-utils.h,
10340         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10341         common/ptid.h.
10342         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10343         ptid.o, buffer.o): New rules.
10344         (linux-low.o): Add common/linux-osdata.h as a dependency.
10345         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10346         * configure.ac: Add AC_HEADER_DIRENT check.
10347         * config.in: Regenerate.
10348         * configure: Regenerate.
10349         * remote-utils.c (xml_escape_text): Delete.
10350         (buffer_grow, buffer_free, buffer_init, buffer_finish,
10351         buffer_xml_printf): Move to common/buffer.c.
10352         * server.c (main): Remove call to initialize_inferiors.
10353         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10354         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10355         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10356         internal_error, gdb_assert, gdb_assert_fail): Delete.
10357         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10358         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10359         common/buffer.h.
10360         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10361         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10362         initialize_inferiors): Delete.
10363
10364 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
10365
10366         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10367         symbol error.
10368
10369 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
10370
10371         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10372         assertion.
10373         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10374
10375 2011-05-26  Yao Qi  <yao@codesourcery.com>
10376
10377         * Makefile.in (thread-db.o): Track dependence to
10378         common/gdb_thread_db.h.
10379         * thread-db.c: include gdb_thread_db.h from right place.
10380
10381 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
10382
10383         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10384         __FILE__ and __LINE__ to internal_error.
10385
10386 2011-05-13  Doug Evans  <dje@google.com>
10387
10388         * thread-db.c (try_thread_db_load_from_sdir): New function.
10389         (try_thread_db_load_from_dir): New function.
10390         (thread_db_load_search): Handle $sdir, ignore $pdir.
10391         Remove trying of system directories if search of
10392         libthread-db-search-path fails, that is now done via $sdir.
10393
10394 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
10395
10396         * server.c (handle_query): Add EnableDisableTracepoints to the list
10397         of supported features.
10398         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10399         tracepoints.
10400         (cmd_qtenable_disable): New.
10401         (cmd_qtstart): Install tracepoints even if disabled.
10402         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10403         receiving a QTEnable or QTDisable packet.
10404         (gdb_collect): Skip data collection if fast tracepoint is disabled.
10405         (ust_marker_to_static_tracepoint): Do not ignore disabled static
10406         tracepoints.
10407         (gdb_probe): Skip data collection if static tracepoint is disabled.
10408
10409 2011-05-10  Doug Evans  <dje@google.com>
10410
10411         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10412
10413 2011-05-04  Doug Evans  <dje@google.com>
10414
10415         * linux-low.c (linux_join): Skip process lookup.
10416         * spu-low.c (spu_join): Ditto.
10417         * server.c (join_inferiors_callback): Delete.
10418         (process_serial_event): For 'D' packet (detach) call join_inferior
10419         directly.
10420
10421 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
10422
10423         * README: Don't mention xscale*-*-linux*.
10424         * configure.srv (xscale*-*-linux*): Don't handle target.
10425
10426 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
10427
10428         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10429         casting pointers.
10430         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10431         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10432         (i386_emit_void_call_2): Likewise.
10433
10434 2011-04-26  Yao Qi  <yao@codesourcery.com>
10435
10436         * linux-low.c: Move common macros to linux-ptrace.h.
10437         Include linux-ptrace.h.
10438         * Makefile.in (linux_ptrace_h): New.
10439         (linux-low.o): Depends on linux-ptrace.h.
10440
10441 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10442
10443         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10444         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
10445         (remote_prepare): New function with most of the TCP code from ...
10446         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
10447         setting transport_is_reliable.
10448         * server.c (run_once): New variable.
10449         (gdbserver_usage): Document it.
10450         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
10451         the first run if RUN_ONCE.
10452         * server.h (run_once, remote_prepare): New declarations.
10453
10454 2011-04-19  Tom Tromey  <tromey@redhat.com>
10455
10456         * win32-low.c (handle_load_dll): Remove duplicate "the".
10457
10458 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
10459
10460         Remove support for old Cygwin 1.5 versions.
10461         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10462         function to avoid warning.
10463         (win32_add_one_solib): Use cygwin_conv_path function to avoid
10464         warning.
10465
10466 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
10467
10468         * gdbserver/server.h (Macro _): Define it if not available.
10469
10470 2011-03-14  Michael Snyder  <msnyder@vmware.com>
10471
10472         * hostio.c (handle_close): Remove unnecessary null test.
10473
10474 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
10475
10476         * Makefile.in (maintainer-clean realclean distclean): Remove
10477         "make ...  subdir_do" command.
10478
10479 2011-03-10  Michael Snyder  <msnyder@vmware.com>
10480
10481         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10482
10483         * server.c (handle_v_run): Free alloced buffer on early return.
10484
10485 2011-03-09  Yao Qi  <yao@codesourcery.com>
10486
10487         Revert:
10488         2011-03-04  Yao Qi  <yao@codesourcery.com>
10489
10490         * Makefile.in: Remove GNU make feature --directory.
10491
10492         2011-03-05  Yao Qi  <yao@codesourcery.com>
10493
10494         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10495         (subdir_do): New make target.  Copied from gdb/Makefile.
10496         (maintainer-clean, realclean, distclean, clean): Call corresponding
10497         make targets in common/Makefile.
10498
10499         2011-02-11  Yao Qi  <yao@codesourcery.com>
10500
10501         * configure.ac: Call AC_PROG_RANLIB.
10502         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
10503         * configure: Regenerate.
10504
10505 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
10506
10507         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10508
10509 2011-03-06  Yao Qi  <yao@codesourcery.com>
10510
10511         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10512
10513 2011-03-05  Yao Qi  <yao@codesourcery.com>
10514
10515         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10516         (subdir_do): New make target.  Copied from gdb/Makefile.
10517         (maintainer-clean, realclean, distclean, clean): Call corresponding
10518         make targets in common/Makefile.
10519
10520 2011-03-04  Yao Qi  <yao@codesourcery.com>
10521
10522         * Makefile.in: Remove GNU make feature --directory.
10523
10524 2011-03-04  Michael Snyder  <msnyder@vmware.com>
10525
10526         * server.c (queue_stop_reply): Call xmalloc not malloc.
10527
10528 2011-03-02  Michael Snyder  <msnyder@vmware.com>
10529
10530         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10531
10532 2011-02-28  Michael Snyder  <msnyder@vmware.com>
10533
10534         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10535         (cmd_qtframe): Ditto.
10536         (cmd_qtbuffer): Ditto.
10537         (cmd_bigqtbuffer): Ditto.
10538
10539         * utils.c (decimal2str): Initialize 'width' to nine, then
10540         don't mess with it.
10541
10542 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10543
10544         * hostio.c (require_data): Free *data, not data.
10545
10546 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
10547
10548         * hostio.c (require_data): Use free, not xfree.
10549
10550 2011-02-27  Michael Snyder  <msnyder@vmware.com>
10551
10552         * server.c (handle_query): Discard unused value.
10553
10554         * hostio.c (require_data): Free malloc memory before returning
10555         error.
10556
10557 2011-02-26  Michael Snyder  <msnyder@vmware.com>
10558
10559         * linux-low.c (list_threads): Call closedir for dirent.
10560
10561 2011-02-27  Michael Snyder  <msnyder@vmware.com>
10562
10563         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10564         a case statement falls through.
10565
10566         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10567
10568         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10569         in comparison.
10570
10571 2011-02-26  Michael Snyder  <msnyder@vmware.com>
10572
10573         * utils.c (decimal2str): Eliminate dead code and dead param.
10574         (pulongest): Drop dead param from call to decimal2str.
10575         (plongest): Ditto.
10576
10577 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
10578
10579         Revert the following patch (not approved yet):
10580         2011-02-21  Hui Zhu  <teawater@gmail.com>
10581         * tracepoint.c (tp_printf): New function.
10582         (eval_agent_expr): Handle gdb_agent_op_printf.
10583
10584 2011-02-21  Hui Zhu  <teawater@gmail.com>
10585
10586         * tracepoint.c (tp_printf): New function.
10587         (eval_agent_expr): Handle gdb_agent_op_printf.
10588
10589 2011-02-18  Tom Tromey  <tromey@redhat.com>
10590
10591         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10592         (tracepoint.o): Likewise.
10593         * tracepoint.c (enum gdb_agent_op): Use ax.def.
10594         (gdb_agent_op_names): Likewise.
10595
10596 2011-02-18  Tom Tromey  <tromey@redhat.com>
10597
10598         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10599         gdb_agent_op_rot>: New constants.
10600         (gdb_agent_op_names): Add pick and roll.
10601         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10602         cases.
10603
10604 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
10605
10606         * aclocal.m4: Regenerated with aclocal-1.11.1.
10607
10608 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
10609
10610         * server.c (handle_qxfer_traceframe_info): New.
10611         (qxfer_packets): Register "traceframe-info".
10612         (handle_query): Report support for qXfer:traceframe-info:read+.
10613         * tracepoint.c (match_blocktype): New.
10614         (traceframe_find_block_type): Rename to ...
10615         (traceframe_walk_blocks): ... this.  Add callback filter argument,
10616         and use it.
10617         (traceframe_find_block_type): New, reimplemented on top of
10618         traceframe_walk_blocks.
10619         (build_traceframe_info_xml): New.
10620         (traceframe_read_info): New.
10621         * server.h (traceframe_read_info): Declare.
10622
10623 2011-02-11  Yao Qi  <yao@codesourcery.com>
10624
10625         * configure.ac: Call AC_PROG_RANLIB.
10626         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
10627         * configure: Regenerate.
10628
10629 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
10630
10631         * server.c (gdb_read_memory): Change return semantics to allow
10632         partial transfers.
10633         (handle_search_memory_1): Adjust.
10634         (process_serial_event) <'m' packet>: Handle partial transfers.
10635         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10636
10637 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
10638
10639         * regcache.c (init_register_cache): Initialize
10640         regcache->register_status.
10641         (free_register_cache): Release regcache->register_status.
10642         (regcache_cpy): Copy register_status.
10643         (registers_to_string): Print 'x's for unavailable registers.
10644         (supply_register): Mark the register's status valid or
10645         unavailable, depending on whether a buffer was passed in or not.
10646         (supply_register_zeroed): New.
10647         (supply_regblock): Mark the registers' status valid or
10648         unavailable, depending on whether a buffer was passed in or not.
10649         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10650         (struct regcache): New `register_status' field.
10651         (supply_register_zeroed): Declare.
10652         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10653         supply_register_zeroed, rather than passing a NULL buffer to
10654         supply_register.
10655         * tracepoint.c (fetch_traceframe_registers): Update comment.
10656
10657 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
10658
10659         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10660         buffer explicit.
10661
10662 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
10663
10664         * server.h (decode_xfer_write): Change prototype.
10665         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10666         and don't extract the annex here.
10667         * server.c (decode_xfer_read): Remove `annex' parameter,
10668         and don't extract the annex here.
10669         (decode_xfer): New.
10670         (struct qxfer): New.
10671         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10672         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10673         (handle_qxfer_statictrace): New functions, abstracted out from
10674         handle_query, and made to use the struct qxfer interface.
10675         (handle_threads_qxfer_proper): Rename to ...
10676         (handle_qxfer_threads_proper): ... this.
10677         (handle_threads_qxfer): Rename to ...
10678         (handle_qxfer_threads): ... this.  Adjust.
10679         (qxfer_packets): New array.
10680         (handle_qxfer): New function.
10681         (handle_query): Use handle_qxfer.
10682
10683 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
10684
10685         * gdbreplay.c: Shorten lines of >= 80 columns.
10686         * linux-low.c: Ditto.
10687         * linux-ppc-low.c: Ditto.
10688         * linux-s390-low.c: Ditto.
10689         * linux-sparc-low.c: Ditto.
10690         * linux-x86-low.c: Ditto.
10691         * linux-xtensa-low.c: Ditto.
10692         * mem-break.c: Ditto.
10693         * nto-low.c: Ditto.
10694         * regcache.h: Ditto.
10695         * remote-utils.c: Ditto.
10696         * server.c: Ditto.
10697         * server.h: Ditto.
10698         * thread-db.c: Ditto.
10699         * tracepoint.c: Ditto.
10700         * utils.c: Ditto.
10701         * win32-low.h: Ditto.
10702
10703 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
10704
10705         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10706         update.
10707
10708 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
10709
10710         * server.c (gdbserver_version): Update copyright year in version
10711         output.
10712         * gdbreplay.c (gdbreplay_version): Ditto.
10713
10714 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
10715
10716         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10717         * linux-bfin-low.c: New file.
10718         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10719         PT_DATA_ADDR for BFIN targets.
10720         * Makefile.in (SFILES): Add linux-bfin-low.c.
10721         (clean): Remove reg-bfin.c.
10722         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10723         * README: Mention supported Blackfin targets.
10724
10725 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
10726
10727         * .gitignore: New file.
10728
10729 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
10730
10731         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10732
10733 2010-10-22  Jie Zhang  <jie@codesourcery.com>
10734
10735         * Makefile.in: Add FLAGS_TO_PASS variable.
10736         (install): Remove dependency of install-only and recursively
10737         invoke make for install-only.
10738
10739 2010-10-04  Doug Evans  <dje@google.com>
10740
10741         * Makefile.in (uninstall): Use $(DESTDIR).
10742
10743 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
10744
10745         PR gdb/11842
10746
10747         * linux-x86-low.c (compat_siginfo_from_siginfo)
10748         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10749         si_code is < 0.  Check for si_code == SI_TIMER before checking for
10750         si_code < 0.
10751
10752 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
10753
10754         * lynx-i386-low.c: New file.
10755         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10756
10757 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
10758
10759         * lynx-low.c (ptrace_request_to_str): Remove handling for
10760         request values that have been removed in LynxOS 5.x.
10761
10762 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
10763
10764         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10765         <ptrace.h>
10766
10767 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
10768
10769         * configure.ac: Add --enable-inprocess-agent option.
10770         * configure: Rebuilt.
10771
10772 2010-09-06  Yao Qi  <yao@codesourcery.com>
10773
10774         * linux-low.c (linux_kill): Remove unused variable.
10775         (linux_stabilize_threads): Likewise.
10776         * server.c (start_inferior): Likewise.
10777         (queue_stop_reply_callback): Likewise.
10778         * tracepoint.c (do_action_at_tracepoint): Likewise.
10779
10780 2010-09-06  Yao Qi  <yao@codesourcery.com>
10781
10782         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10783         on return.
10784
10785 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
10786
10787         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10788
10789 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
10790
10791         * Makefile.in (install-only): Replace $IPA_DEPFILES with
10792         "$(IPA_DEPFILES)".
10793
10794 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10795
10796         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10797         gdbserver/lynx-ppc-low.c: New files.
10798         * Makefile.in (lynx_low_h): New variable.
10799         (lynx-low.o, lynx-ppc-low.o): New rules.
10800         * configure.ac: On LynxOS, link with -lnetinet.
10801         * configure.srv: Add handling of powerpc-*-lynxos* targets.
10802         * configure: regenerate.
10803
10804 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10805
10806         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10807         * configure.ac: Add check for vasprintf and vsnprintf.
10808         * configure, config.in: Regenerate.
10809         * server.h (vasprintf, vsnprintf): Add conditional declarations.
10810
10811 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10812
10813         * gdbreplay.c: Move include of alloca.h up, next to include of
10814         malloc.h.
10815         * server.h: Add include of malloc.h.
10816         * mem-break.c: Remove include of malloc.h.
10817         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10818
10819 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10820
10821         * Makefile.in (memmem.o): Build with -Wno-error.
10822
10823 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10824
10825         * utils.c (xsnprintf): Make non-static.
10826         * server.h: Add xsnprintf declaration.
10827         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10828         replace calls to snprintf by calls to xsnprintf throughout.
10829
10830 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10831
10832         * configure.ac: Add configure check for alloca.
10833         * configure, config.in: Regenerate.
10834         * server.h: Include alloca.h if it exists.
10835         * gdbreplay.c: Include alloca.h if it exists.
10836
10837 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
10838
10839         * linux-low.c (__SIGRTMIN): Define if not already defined.
10840         (linux_create_inferior): Check for __ANDROID__ rather than
10841         __SIGRTMIN.
10842         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10843         are already deferred.
10844         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10845         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10846         stopped and already has a pending signal to report.
10847         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10848         a pending signal to report or is moving out of a jump pad.
10849         (linux_init_signals): Check for __ANDROID__ rather than
10850         __SIGRTMIN.
10851
10852 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
10853
10854         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10855         debug_threads check.  Avoid a linear search when not doing debug
10856         output.
10857
10858 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
10859
10860         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10861         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10862         (struct file_handler) <fd>: Change type to gdb_fildes_t.
10863         (process_event): Change local fd's type to gdb_fildes_t.
10864         (create_file_handler): Adjust prototype.
10865         (delete_file_handler): Adjust prototype.
10866         (handle_file_event): Adjust prototype.  Use pfildes.
10867         (create_file_event): Adjsut prototype.
10868         * remote-utils.c (remote_desc, listen_desc): Change type to
10869         gdb_fildes_t.
10870         * server.h: New gdb_fildes_t typedef.
10871         [USE_WIN32API]: Include winsock2.h.
10872         (delete_file_handler, add_file_handler): Adjust prototypes.
10873         (pfildes): Declare.
10874         * utils.c (pfildes): New.
10875
10876 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
10877
10878         * configure.ac (build_warnings): Add -Wno-char-subscripts.
10879         * configure: Regenerate.
10880
10881 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
10882
10883         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10884         (linux_done_accessing_memory): ... this.
10885         (linux_target_ops): Adjust.
10886         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10887         * nto-low.c (nto_target_ops): Adjust comment.
10888         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10889         * spu-low.c (spu_target_ops): Adjust comment.
10890         * target.h (target_ops): Rename unprepare_to_access_memory field
10891         to done_accessing_memory.
10892         (unprepare_to_access_memory): Rename to ...
10893         (done_accessing_memory): ... this.
10894
10895 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
10896
10897         * linux-low.c (linux_prepare_to_access_memory): New.
10898         (linux_unprepare_to_access_memory): New.
10899         (linux_target_ops): Install them.
10900         * server.c (read_memory): Rename to ...
10901         (gdb_read_memory): ... this.  Use
10902         prepare_to_access_memory/prepare_to_access_memory.
10903         (write_memory): Rename to ...
10904         (gdb_write_memory): ... this.  Use
10905         prepare_to_access_memory/prepare_to_access_memory.
10906         (handle_search_memory_1): Adjust.
10907         (process_serial_event): Adjust.
10908         * target.h (struct target_ops): New fields
10909         prepare_to_access_memory and unprepare_to_access_memory.
10910         (prepare_to_access_memory, unprepare_to_access_memory): New.
10911         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10912         prepare_to_access_memory/prepare_to_access_memory.
10913         * nto-low.c (nto_target_ops): Adjust.
10914         * spu-low.c (spu_target_ops): Adjust.
10915         * win32-low.c (win32_target_ops): Adjust.
10916
10917 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
10918
10919         * Makefile.in (WARN_CFLAGS): Get it from configure.
10920         (WERROR_CFLAGS): New.
10921         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10922         * configure.ac: Introduce --enable-werror, which adds -Werror to
10923         the compiler command line.  Enabled by default.  Disable with
10924         --disable-werror.  Add -Wdeclaration-after-statement
10925         Wpointer-arith and -Wformat-nonliteral to warning flags.
10926         * configure: Regenerate.
10927
10928 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
10929
10930         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10931
10932 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
10933
10934         * gdbreplay.c (remote_error): New.
10935         (gdbchar): New.
10936         (expect): Use gdbchar.  Check for error reading from GDB.
10937         Clarify sync error output.
10938         (play): Check for errors writing to GDB.
10939         * linux-low.c (sigchld_handler): Really ignore `write' errors.
10940         * remote-utils.c (getpkt): Check for errors writing to the remote
10941         descriptor.
10942
10943 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
10944
10945         * linux-low.c (linux_wait_1): Move non-debugging code out of
10946         `debug_threads' control.
10947
10948 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
10949
10950         * linux-low.c (linux_wait_1): Don't set last_status here.
10951         * server.c (push_event, queue_stop_reply_callback): Assert we're
10952         not pushing a TARGET_WAITKIND_IGNORE event.
10953         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10954         (myresume, handle_target_event): Set the thread's last_resume_kind
10955         and last_status from the target returned status.
10956
10957 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
10958
10959         PR threads/10729
10960
10961         * linux-x86-low.c (update_debug_registers_callback): New.
10962         (i386_dr_low_set_addr): Use it.
10963         (i386_dr_low_get_addr): New.
10964         (i386_dr_low_set_control): Use update_debug_registers_callback.
10965         (i386_dr_low_get_control): New.
10966         (i386_dr_low_get_status): Adjust.
10967         * linux-low.c (linux_stop_lwp): New.
10968         * linux-low.h (linux_stop_lwp): Declare.
10969
10970         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10971         argument instead of a i386_debug_reg_state.
10972         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10973         a i386_debug_reg_state.
10974         (i386_insert_aligned_watchpoint): Adjust.
10975         (i386_remove_aligned_watchpoint): Adjust.
10976         (i386_low_stopped_data_address): Read the debug registers from the
10977         inferior instead of from the mirrors.
10978         * i386-low.h (struct i386_debug_reg_state): Extend comment.
10979         (i386_dr_low_get_addr): Declare.
10980         (i386_dr_low_get_control): Declare.
10981         (i386_dr_low_get_status): Change prototype.
10982
10983         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10984         (i386_dr_low_get_addr): New.
10985         (i386_dr_low_get_control): New.
10986         (i386_dr_low_get_status): Adjust prototype.  Return
10987         dr_status_mirror.
10988         (i386_initial_stuff): Clear dr_status_mirror and
10989         dr_control_mirror.
10990         (i386_get_thread_context): Adjust.
10991         (i386_set_thread_context): Adjust.
10992         (i386_thread_added): Adjust.
10993
10994 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
10995
10996         * linux-low.h (linux_thread_area): Delete declaration.
10997
10998 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
10999
11000         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11001         after its termination.
11002
11003 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
11004
11005         * linux-low.c (gdb_wants_lwp_stopped): Delete.
11006         (gdb_wants_all_stopped): Delete.
11007         (linux_wait_1): Don't call them.
11008         * server.c (handle_v_cont): Tag all threads as want-stopped.
11009         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
11010         stopped as "client-wants-stopped".
11011
11012 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
11013
11014         * Makefile.in (signals_h): New.
11015         (server_h): Depend on it.
11016         (server.o): Don't depend on $(signals_def).
11017         (signals.o): Depend on $(signals_def).
11018
11019 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
11020
11021         * Makefile.in (signals_def): New.
11022         (server_h): Append include/gdb/signals.h and signals_def.
11023         (server.o): Append signals_def.
11024
11025 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
11026
11027         * server.c (handle_target_event): Use target_signal_to_host for
11028         resume_info.sig initialization.
11029         * target.h (struct thread_resume) <sig>: New comment.
11030
11031 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
11032
11033         * server.c (handle_query): strcpy() the returned string from paddress()
11034         instead of sprintf().
11035         * utils.c (paddress): Return phex_nz().
11036
11037 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
11038
11039         * server.c (handle_v_cont): Call mourn_inferior if process
11040         just exited.
11041         (myresume): Likewise.
11042
11043 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
11044
11045         Static tracepoints, and integration with UST.
11046
11047         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
11048         * mem-break.c (uninsert_all_breakpoints)
11049         (reinsert_all_breakpoints): New.
11050         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11051         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11052         (gdb_agent_ust_loaded, helper_thread_id)
11053         (gdb_agent_helper_thread_id): New macros.
11054         (struct ipa_sym_addresses): Add addr_ust_loaded,
11055         addr_helper_thread_id, addr_cmd_buf.
11056         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11057         (in_process_agent_loaded_ust): New.
11058         (write_e_ust_not_loaded): New.
11059         (maybe_write_ipa_ust_not_loaded): New.
11060         (struct collect_static_trace_data_action): New.
11061         (enum tracepoint_type) <static_tracepoint>: New.
11062         (struct tracepoint) <handle>: Mention static tracepoints.
11063         (struct static_tracepoint_ctx): New.
11064         (CMD_BUF_SIZE): New.
11065         (add_tracepoint_action): Handle static tracepoint actions.
11066         (unprobe_marker_at): New.
11067         (clear_installed_tracepoints): Handle static tracepoints.
11068         (cmd_qtdp): Handle static tracepoints.
11069         (probe_marker_at): New.
11070         (cmd_qtstart): Handle static tracepoints.
11071         (response_tracepoint): Handle static tracepoints.
11072         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11073         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11074         (get_context_regcache): Handle static tracepoints.
11075         (do_action_at_tracepoint): Handle static tracepoint actions.
11076         (traceframe_find_block_type): Handle static trace data blocks.
11077         (traceframe_read_sdata): New.
11078         (download_tracepoints): Download static tracepoint actions.
11079         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11080         (GDB_PROBE_NAME): New.
11081         (ust_ops): New.
11082         (GET_UST_SYM): New.
11083         (USTF): New.
11084         (dlsym_ust): New.
11085         (ust_marker_to_static_tracepoint): New.
11086         (gdb_probe): New.
11087         (collect_ust_data_at_tracepoint): New.
11088         (gdb_ust_probe): New.
11089         (UNIX_PATH_MAX, SOCK_DIR): New.
11090         (gdb_ust_connect_sync_socket): New.
11091         (resume_thread, stop_thread): New.
11092         (run_inferior_command): New.
11093         (init_named_socket): New.
11094         (gdb_ust_socket_init): New.
11095         (cstr_to_hexstr): New.
11096         (next_st): New.
11097         (first_marker, next_marker): New.
11098         (response_ust_marker): New.
11099         (cmd_qtfstm, cmd_qtsstm): New.
11100         (unprobe_marker_at, probe_marker_at): New.
11101         (cmd_qtstmat, gdb_ust_thread): New.
11102         (gdb_ust_init): New.
11103         (initialize_tracepoint_ftlib): Call gdb_ust_init.
11104         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11105         (ST_REGENTRY): New.
11106         (x86_64_st_collect_regmap): New.
11107         (X86_64_NUM_ST_COLLECT_GREGS): New.
11108         (AMD64_RIP_REGNUM): New.
11109         (supply_static_tracepoint_registers): New.
11110         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11111         (ST_REGENTRY): New.
11112         (i386_st_collect_regmap): New.
11113         (i386_NUM_ST_COLLECT_GREGS): New.
11114         (supply_static_tracepoint_registers): New.
11115         * server.c (handle_query): Handle qXfer:statictrace:read.
11116         <qSupported>: Report support for StaticTracepoints, and
11117         qXfer:statictrace:read features.
11118         * server.h (traceframe_read_sdata)
11119         (supply_static_tracepoint_registers): Declare.
11120         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11121         (unpack_varlen_hex): Include in IPA build.
11122         * Makefile.in (ustlibs, ustinc): New.
11123         (IPA_OBJS): Add remote-utils-ipa.o.
11124         ($(IPA_LIB)): Link -ldl and -lpthread.
11125         (UST_CFLAGS): New.
11126         (IPAGENT_CFLAGS): Add UST_CFLAGS.
11127         * config.in, configure: Regenerate.
11128
11129 2010-06-20  Ian Lance Taylor  <iant@google.com>
11130             Pedro Alves  <pedro@codesourcery.com>
11131
11132         * linux-x86-low.c (always_true): Delete.
11133         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11134         trying to fool the compiler with always_true.
11135
11136 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
11137
11138         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11139         conditions in gdbserver.
11140
11141 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
11142
11143         * spu-low.c (spu_read_memory): Wrap around local store limit.
11144         (spu_write_memory): Likewise.
11145
11146 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
11147
11148         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11149         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11150         LONGEST uses.
11151         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11152         uses.
11153         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11154         uses with LONGEST uses.
11155
11156 2010-06-14  Stan Shebs  <stan@codesourcery.com>
11157             Pedro Alves  <pedro@codesourcery.com>
11158
11159         Bytecode compiler.
11160
11161         * linux-x86-low.c: Include limits.h.
11162         (add_insns): New.
11163         (always_true): New.
11164         (EMIT_ASM): New.
11165         (EMIT_ASM32): New.
11166         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11167         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11168         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11169         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11170         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11171         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11172         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11173         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11174         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11175         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11176         (amd64_emit_void_call_2): New.
11177         (amd64_emit_ops): New.
11178         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11179         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11180         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11181         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11182         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11183         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11184         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11185         (i386_emit_call, i386_emit_reg, i386_emit_pop)
11186         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11187         (i386_emit_stack_adjust, i386_emit_int_call_1)
11188         (i386_emit_void_call_2): New.
11189         (i386_emit_ops): New.
11190         (x86_emit_ops): New.
11191         (the_low_target): Install x86_emit_ops.
11192         * server.h (struct emit_ops): New.
11193         (get_raw_reg_func_addr): Declare.
11194         (current_insn_ptr, emit_error): Declare.
11195         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11196         (set_trace_state_variable_value): New defines.
11197         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11198         addr_get_trace_state_variable_value and
11199         addr_set_trace_state_variable_value.
11200         (symbol_list): New fields for get_raw_reg,
11201         get_trace_state_variable_value and set_trace_state_variable_value.
11202         (condfn): New typedef.
11203         (struct tracepoint): New field `compiled_cond'.
11204         (do_action_at_tracepoint): Clear compiled_cond.
11205         (get_trace_state_variable_value, set_trace_state_variable_value):
11206         Export in the IPA.
11207         (condition_true_at_tracepoint): If there's a compiled condition,
11208         run that.
11209         (current_insn_ptr, emit_error): New globals.
11210         (struct bytecode_address): New.
11211         (get_raw_reg_func_addr): New.
11212         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11213         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11214         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11215         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11216         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11217         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11218         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11219         (compile_tracepoint_condition, compile_bytecodes): New.
11220         * target.h (emit_ops): Forward declare.
11221         (struct target_ops): New field emit_ops.
11222         (target_emit_ops): New.
11223         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11224         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11225         * linux-low.c (linux_emit_ops): New.
11226         (linux_target_ops): Install it.
11227         * linux-low.h (struct linux_target_ops): New field emit_ops.
11228
11229 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
11230
11231         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11232         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11233
11234 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
11235             Stan Shebs  <stan@codesourcery.com>
11236
11237         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11238         (all): Depend on $(extra_libraries).
11239         (install-only): Install the IPA.
11240         (IPA_OBJS, IPA_LIB): New.
11241         (clean): Remove the IPA lib.
11242         (IPAGENT_CFLAGS): New.
11243         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11244         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11245         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11246         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11247         * configure.ac: Check for atomic builtins support in the compiler.
11248         (IPA_DEPFILES, extra_libraries): Define.
11249         * configure.srv (ipa_obj): Add description.
11250         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11251         (i[34567]86-*-linux*): Set ipa_obj.
11252         (x86_64-*-linux*): Set ipa_obj.
11253         * linux-low.c (stabilizing_threads): New.
11254         (supports_fast_tracepoints): New.
11255         (linux_detach): Stabilize threads before detaching.
11256         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
11257         the lwp is either not stabilizing, or is moving out of a jump pad.
11258         (linux_fast_tracepoint_collecting): New.
11259         (maybe_move_out_of_jump_pad): New.
11260         (enqueue_one_deferred_signal): New.
11261         (dequeue_one_deferred_signal): New.
11262         (linux_wait_for_event_1): If moving out of a jump pad, defer
11263         pending signals to later.
11264         (linux_stabilize_threads): New.
11265         (linux_wait_1): Check if threads need moving out of jump pads, and
11266         do it if so.
11267         (stuck_in_jump_pad_callback): New.
11268         (move_out_of_jump_pad_callback): New.
11269         (lwp_running): New.
11270         (linux_resume_one_lwp): Handle moving out of jump pads.
11271         (linux_set_resume_request): Dequeue deferred signals.
11272         (need_step_over_p): Also step over fast tracepoint jumps.
11273         (start_step_over): Also uninsert fast tracepoint jumps.
11274         (finish_step_over): Also reinsert fast tracepoint jumps.
11275         (linux_install_fast_tracepoint_jump): New.
11276         (linux_target_ops): Install linux_stabilize_threads and
11277         linux_install_fast_tracepoint_jump_pad.
11278         * linux-low.h (linux_target_ops) <get_thread_area,
11279         install_fast_tracepoint_jump_pad>: New fields.
11280         (struct lwp_info) <collecting_fast_tracepoint,
11281         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11282         (linux_get_thread_area): Declare.
11283         * linux-x86-low.c (jump_insn): New.
11284         (x86_get_thread_area): New.
11285         (append_insns): New.
11286         (push_opcode): New.
11287         (amd64_install_fast_tracepoint_jump_pad): New.
11288         (i386_install_fast_tracepoint_jump_pad): New.
11289         (x86_install_fast_tracepoint_jump_pad): New.
11290         (the_low_target): Install x86_get_thread_area and
11291         x86_install_fast_tracepoint_jump_pad.
11292         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11293         (struct fast_tracepoint_jump): New.
11294         (fast_tracepoint_jump_insn): New.
11295         (fast_tracepoint_jump_shadow): New.
11296         (find_fast_tracepoint_jump_at): New.
11297         (fast_tracepoint_jump_here): New.
11298         (delete_fast_tracepoint_jump): New.
11299         (set_fast_tracepoint_jump): New.
11300         (uninsert_fast_tracepoint_jumps_at): New.
11301         (reinsert_fast_tracepoint_jumps_at): New.
11302         (set_breakpoint_at): Use write_inferior_memory.
11303         (uninsert_raw_breakpoint): Use write_inferior_memory.
11304         (check_mem_read): Mask out fast tracepoint jumps.
11305         (check_mem_write): Mask out fast tracepoint jumps.
11306         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11307         (set_fast_tracepoint_jump): Declare.
11308         (delete_fast_tracepoint_jump)
11309         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11310         (reinsert_fast_tracepoint_jumps_at): Declare.
11311         * regcache.c: Don't compile many functions when building the
11312         in-process agent library.
11313         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11314         the register buffer in the heap.
11315         (free_register_cache): If the register buffer isn't owned by the
11316         regcache, don't free it.
11317         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11318         pre-existing register caches.
11319         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11320         type.
11321         (convert_ascii_to_int): : Constify `from' parameter type.
11322         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11323         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
11324         the needed buffer in-place.
11325         (relocate_instruction): New.
11326         * server.c (handle_query) <qSymbols>: If the target supports
11327         tracepoints, give it a chance of looking up symbols.  Report
11328         support for fast tracepoints.
11329         (handle_status): Stabilize threads.
11330         (process_serial_event): Adjust.
11331         * server.h (struct fast_tracepoint_jump): Forward declare.
11332         (struct process_info) <fast_tracepoint_jumps>: New field.
11333         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11334         (decode_X_packet, decode_M_packet): Adjust.
11335         (relocate_instruction): Declare.
11336         (in_process_agent_loaded): Declare.
11337         (tracepoint_look_up_symbols): Declare.
11338         (struct fast_tpoint_collect_status): Declare.
11339         (fast_tracepoint_collecting): Declare.
11340         (force_unlock_trace_buffer): Declare.
11341         (handle_tracepoint_bkpts): Declare.
11342         (initialize_low_tracepoint)
11343         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11344         * target.h (struct target_ops) <stabilize_threads,
11345         install_fast_tracepoint_jump_pad>: New fields.
11346         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11347         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11348         [HAVE_STDINT_H]: Include stdint.h.
11349         (trace_debug_1): Rename to ...
11350         (trace_vdebug): ... this.
11351         (trace_debug): Rename to ...
11352         (trace_debug_1): ... this.  Add `level' parameter.
11353         (trace_debug): New.
11354         (ATTR_USED, ATTR_NOINLINE): New.
11355         (IP_AGENT_EXPORT): New.
11356         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11357         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11358         (about_to_request_buffer_space, trace_buffer_is_full)
11359         (stopping_tracepoint, expr_eval_result, error_tracepoint)
11360         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11361         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11362         (traceframe_write_count, traceframes_created)
11363         (trace_state_variables)
11364         New renaming defines.
11365         (struct ipa_sym_addresses): New.
11366         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11367         (symbol_list): New.
11368         (ipa_sym_addrs): New.
11369         (all_tracepoint_symbols_looked_up): New.
11370         (in_process_agent_loaded): New.
11371         (write_e_ipa_not_loaded): New.
11372         (maybe_write_ipa_not_loaded): New.
11373         (tracepoint_look_up_symbols): New.
11374         (debug_threads) [IN_PROCESS_AGENT]: New.
11375         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11376         (UNKNOWN_SIDE_EFFECTS): New.
11377         (stop_tracing): New.
11378         (flush_trace_buffer): New.
11379         (stop_tracing_bkpt): New.
11380         (flush_trace_buffer_bkpt): New.
11381         (read_inferior_integer): New.
11382         (read_inferior_uinteger): New.
11383         (read_inferior_data_pointer): New.
11384         (write_inferior_data_pointer): New.
11385         (write_inferior_integer): New.
11386         (write_inferior_uinteger): New.
11387         (struct collect_static_trace_data_action): Delete.
11388         (enum tracepoint_type): New.
11389         (struct tracepoint) <type>: New field `type'.
11390         <actions_str, step_actions, step_actions_str>: Only include in
11391         GDBserver.
11392         <orig_size, obj_addr_on_target, adjusted_insn_addr>
11393         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11394         (tracepoints): Use IP_AGENT_EXPORT.
11395         (last_tracepoint): Don't include in the IPA.
11396         (stopping_tracepoint): Use IP_AGENT_EXPORT.
11397         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11398         (alloced_trace_state_variables): New.
11399         (trace_state_variables): Use IP_AGENT_EXPORT.
11400         (traceframe_t): Delete unused variable.
11401         (circular_trace_buffer): Don't include in the IPA.
11402         (trace_buffer_start): Delete.
11403         (struct trace_buffer_control): New.
11404         (trace_buffer_free): Delete.
11405         (struct ipa_trace_buffer_control): New.
11406         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11407         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11408         New.
11409         (trace_buffer_ctrl): New.
11410         (TRACE_BUFFER_CTRL_CURR): New.
11411         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11412         Reimplement as macros.
11413         (trace_buffer_wrap): Delete.
11414         (traceframe_write_count, traceframe_read_count)
11415         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11416         (struct tracepoint_hit_ctx) <type>: New field.
11417         (struct fast_tracepoint_ctx): New.
11418         (memory_barrier): New.
11419         (cmpxchg): New.
11420         (record_tracepoint_error): Update atomically in the IPA.
11421         (clear_inferior_trace_buffer): New.
11422         (about_to_request_buffer_space): New.
11423         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11424         updating the same buffer.
11425         (add_tracepoint): Default the tracepoint's type to trap
11426         tracepoint, and orig_size to -1.
11427         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11428         internal variables.
11429         (create_trace_state_variable): New parameter `gdb'.  Handle it.
11430         (clear_installed_tracepoints): Clear fast tracepoint jumps.
11431         (cmd_qtdp): Handle fast tracepoints.
11432         (cmd_qtdv): Adjust.
11433         (max_jump_pad_size): New.
11434         (gdb_jump_pad_head): New.
11435         (get_jump_space_head): New.
11436         (claim_jump_space): New.
11437         (sort_tracepoints): New.
11438         (MAX_JUMP_SIZE): New.
11439         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
11440         IPA.
11441         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11442         support.  Upload fast traceframes, and delete internal IPA
11443         breakpoints.
11444         (stop_tracing_handler): New.
11445         (flush_trace_buffer_handler): New.
11446         (cmd_qtstop): Upload fast tracepoints.
11447         (response_tracepoint): Handle fast tracepoints.
11448         (tracepoint_finished_step): Upload fast traceframes.  Set the
11449         tracepoint hit context's tracepoint type.
11450         (handle_tracepoint_bkpts): New.
11451         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11452         type.  Add comment about fast tracepoints.
11453         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11454         non-existing action_str field.
11455         (get_context_regcache): Handle fast tracepoints.
11456         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11457         to the regcache.
11458         (fast_tracepoint_from_jump_pad_address): New.
11459         (fast_tracepoint_from_ipa_tpoint_address): New.
11460         (collecting_t): New.
11461         (force_unlock_trace_buffer): New.
11462         (fast_tracepoint_collecting): New.
11463         (collecting): New.
11464         (gdb_collect): New.
11465         (write_inferior_data_ptr): New.
11466         (target_tp_heap): New.
11467         (target_malloc): New.
11468         (download_agent_expr): New.
11469         (UALIGN): New.
11470         (download_tracepoints): New.
11471         (download_trace_state_variables): New.
11472         (upload_fast_traceframes): New.
11473         (IPA_FIRST_TRACEFRAME): New.
11474         (IPA_NEXT_TRACEFRAME_1): New.
11475         (IPA_NEXT_TRACEFRAME): New.
11476         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11477         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11478         (gdb_jump_pad_buffer_end): New.
11479         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11480         (initialize_tracepoint): Adjust.
11481         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11482         buffer.  Initialize the low module.
11483         * utils.c (PREFIX, TOOLNAME): New.
11484         (malloc_failure): Use PREFIX.
11485         (error): In the IPA, an error causes an exit.
11486         (fatal, warning): Use PREFIX.
11487         (internal_error): Use TOOLNAME.
11488         (NUMCELLS): Increase to 10.
11489         * configure, config.in: Regenerate.
11490
11491 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
11492
11493         * server.c (handle_query) <qSupported>: Do two passes over the
11494         qSupported string to avoid nesting strtok.
11495
11496 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11497
11498         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11499         (CDEPS): New.
11500         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
11501         -Wl,--dynamic-list.
11502         * configure: Regenerate.
11503         * proc-service.list: New.
11504
11505 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11506
11507         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11508         New comment.
11509
11510 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
11511
11512         * gdbreplay.c (remote_open): Check error return from socket() call by
11513         its equality to -1 not by it being negative.
11514         * remote-utils.c (remote_open): Likewise.
11515
11516 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
11517
11518         * config.h: Regenerate.
11519
11520 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
11521
11522         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11523         doesn't provide PTRACE_GET_THREAD_AREA.
11524
11525 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
11526
11527         * linux-m68k-low.c: Include <asm/ptrace.h>
11528         (ps_get_thread_area): Implement.
11529
11530 2010-05-03  Doug Evans  <dje@google.com>
11531
11532         * event-loop.c (struct callback_event): New struct.
11533         (callback_list): New global.
11534         (append_callback_event, delete_callback_event): New functions.
11535         (process_callback): New function.
11536         (start_event_loop): Call it.
11537         * remote-utils.c (NOT_SCHEDULED): Define.
11538         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11539         moved out of readchar.
11540         (readchar): Rewrite.  Call reschedule before returning.
11541         (reset_readchar): New function.
11542         (remote_close): Call it.
11543         (process_remaining, reschedule): New functions.
11544         * server.h (callback_handler_func): New typedef.
11545         (append_callback_event, delete_callback_event): Declare.
11546
11547 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
11548
11549         * proc-service.c (ps_pglobal_lookup): Use
11550         thread_db_look_up_one_symbol.
11551         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11552         parameter.  Use it instead of all_symbols_looked_up.
11553         * server.h (struct process_info) <all_symbols_looked_up>: Delete
11554         field.
11555         (all_symbols_looked_up): Don't declare.
11556         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11557         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11558         field.
11559         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11560         Set all_symbols_looked_up here.
11561         (thread_db_look_up_one_symbol): New.
11562         (thread_db_get_tls_address): Adjust.
11563         (thread_db_load_search, try_thread_db_load_1): Always allocate the
11564         thread_db object on the heap, and tentatively set it in the
11565         process structure.
11566         (thread_db_init): Don't set all_symbols_looked_up here.
11567         * linux-low.h (thread_db_look_up_one_symbol): Declare.
11568
11569 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
11570
11571         * linux-low.c (linux_kill, linux_detach): Adjust.
11572         (status_pending_p_callback): Remove redundant statement.  Check
11573         for !TARGET_WAITIKIND_IGNORE, instead of
11574         TARGET_WAITKIND_STOPPED.
11575         (handle_tracepoints): Make sure LWP is locked.  Adjust.
11576         (linux_wait_for_event_1): Adjust.
11577         (linux_cancel_breakpoints): New.
11578         (unsuspend_one_lwp): New.
11579         (unsuspend_all_lwps): New.
11580         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11581         (send_sigstop_callback): Change return type to int, add new
11582         `except' parameter and handle it.
11583         (suspend_and_send_sigstop_callback): New.
11584         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11585         pass them down.  If SUSPEND, also increment the lwp's suspend
11586         count.
11587         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11588         (need_step_over_p): Don't consider suspended LWPs.
11589         (start_step_over): Adjust.
11590         (proceed_one_lwp): Change return type to int, add new `except'
11591         parameter and handle it.
11592         (unsuspend_and_proceed_one_lwp): New.
11593         (proceed_all_lwps): Use find_inferior instead of
11594         for_each_inferior.
11595         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
11596         also decrement the suspend count of LWPs.  Pass `except' down,
11597         instead of hacking its suspend count.
11598         (linux_pause_all): Add `freeze' parameter.  Adjust.
11599         (linux_unpause_all): New.
11600         (linux_target_ops): Install linux_unpause_all.
11601         * server.c (handle_status): Adjust.
11602         * target.h (struct target_ops): New fields `unpause_all' and
11603         `cancel_breakpoints'.  Add new parameter to `pause_all'.
11604         (pause_all): Add new `freeze' parameter.
11605         (unpause_all): New.
11606         (cancel_breakpoints): New.
11607         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11608         cancel breakpoints.
11609         (cmd_qtstart): Pause threads.
11610         (stop_tracing): Pause threads, and cancel breakpoints.
11611         * win32-low.c (win32_target_ops): Adjust.
11612
11613 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
11614
11615         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11616         the inferior right away from here...
11617         (linux_wait_1): ... to here, and adjust to check the thread's
11618         last_resume_kind instead of the lwp's step or stop_expected flags.
11619
11620 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
11621
11622         * README: Use consistent `GDB' and `GDBserver' spellings.
11623
11624 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
11625
11626         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11627         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
11628         (linux_detach_one_lwp): Assume the lwp is stopped.
11629         (any_thread_of): Delete.
11630         (linux_detach): Stop all lwps here.  Don't blindly delete all
11631         breakpoints.
11632         (delete_lwp_callback): New.
11633         (linux_mourn): Delete all lwps of the process that is gone.
11634         (linux_wait_1): Don't delete the last lwp of the process here.
11635         * mem-break.h (mark_breakpoints_out): Declare.
11636         * mem-break.c (mark_breakpoints_out): New.
11637         (free_all_breakpoints): Use it.
11638         * server.c (handle_target_event): If the process is gone, mark
11639         breakpoints out.
11640         * thread-db.c (struct thread_db) <create_bp>: New field.
11641         (thread_db_enable_reporting): Fix prototype.  Store a thread event
11642         breakpoint reference in the thread_db struct.
11643         (thread_db_load_search): Clear the thread_db object.
11644         (try_thread_db_load_1): Ditto.
11645         (switch_to_process): New.
11646         (disable_thread_event_reporting): Use it.
11647         (remove_thread_event_breakpoints): New.
11648         (thread_db_detach, thread_db_mourn): Use it.
11649
11650 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
11651
11652         * linux-low.c (linux_enable_event_reporting): New.
11653         (linux_wait_for_event_1, handle_extended_wait): Use it.
11654
11655 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
11656
11657         * linux-low.c (linux_kill_one_lwp, linux_kill)
11658         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11659         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
11660         SIGSTOP even if the LWP is stopped.
11661         (send_sigstop_callback): New.
11662         (stop_all_lwps): Use send_sigstop_callback instead.
11663         (linux_resume_one_thread): Adjust.
11664         (proceed_one_lwp): Still proceed an LWP that the client has
11665         requested to stop, if we haven't reported it as stopped yet.  Make
11666         sure that LWPs the client want stopped, have a pending SIGSTOP.
11667
11668 2010-04-26  Doug Evans  <dje@google.com>
11669
11670         * server.c (handle_general_set): Make static.
11671
11672         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11673         Print received char after testing for error/eof instead of before.
11674         (input_interrupt): Tweak comment.
11675
11676 2010-04-23  Doug Evans  <dje@google.com>
11677
11678         * server.c (start_inferior): Print inferior argv if --debug.
11679
11680 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
11681
11682         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11683         * nto-x86-low.c: Include server.h
11684
11685 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
11686
11687         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11688         be consistent with other sources of this directory.
11689         (init_registers_amd64): Correct name of source file of this function
11690         in the comment.
11691
11692 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11693
11694         * configure.srv (x86_64-*-mingw*): New configuration for Windows
11695         64-bit executables.
11696
11697 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11698
11699         * win32-i386-low.c: Add 64-bit support.
11700         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11701         (init_registers_amd64): Declare.
11702         (mappings): Add 64-bit version of array.
11703         (init_windows_x86): New function.
11704         (the_low_target): Change init_arch field to init_windows_x86.
11705
11706 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11707
11708         * win32-low.c: Adapt to support also 64-bit architecture.
11709         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11710         (get_image_name): Use SIZE_T type for local variable `done'.
11711         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11712         (toolhelp_get_dll_name): Idem.
11713         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11714         Use uintptr_t typecast to avoid warning.
11715         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11716         (handle_exception): Use phex_nz to avoid warning.
11717         (win32_wait): Remove unused local variable `process'.
11718
11719 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11720
11721         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11722         `amd64-avx.o'.
11723
11724 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
11725
11726         * configure.ac: Use `ws2_32' library for srv_mingw.
11727         * configure: Regenerate.
11728         * gdbreplay.c: Include winsock2.h instead of winsock.h.
11729         * remote-utils.c: Likewise.
11730
11731 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
11732
11733         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11734         if __x86_64__ is defined.
11735
11736 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
11737
11738         * configure: Regenerate.
11739
11740 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
11741
11742         * server.c (handle_query): Handle 'qGetTIBAddr' query.
11743         * target.h (target_ops): New get_tib_address field.
11744         * win32-low.h (win32_thread_info): Add thread_local_base field.
11745         * win32-low.c (child_add_thread): Add tlb argument.
11746         Set thread_local_base field to TLB.
11747         (get_child_debug_event): Adapt to child_add_thread change.
11748         (win32_get_tib_address): New function.
11749         (win32_target_ops): Set get_tib_address field to
11750         win32_get_tib_address.
11751         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11752
11753 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
11754
11755         * linux-low.c (linux_mourn): Also remove the process.
11756         * server.c (handle_target_event): Don't remove the process here.
11757         * nto-low.c (nto_mourn): New.
11758         (nto_target_ops): Install it.
11759         * spu-low.c (spu_mourn): New.
11760         (spu_target_ops): Install it.
11761         * win32-low.c (win32_mourn): New.
11762         (win32_target_ops): Install it.
11763
11764 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
11765
11766         * server.h (buffer_xml_printf): Remove redundant `;'.
11767
11768 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
11769
11770         * regcache.c (set_register_cache): Invalidate regcaches before
11771         changing the register cache layout.
11772         (regcache_invalidate_one): Allow a NULL regcache.
11773         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11774         regcaches before changing the register cache layout or the target
11775         regsets.
11776
11777 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
11778
11779         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11780         variable warning on Linux/x86-64.
11781
11782 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
11783
11784         GDBserver disconnected tracing support.
11785
11786         * linux-low.c (linux_remove_process): Delete.
11787         (add_lwp): Don't set last_resume_kind here.
11788         (linux_kill): Use `mourn'.
11789         (linux_detach): Use `thread_db_detach', and `mourn'.
11790         (linux_mourn): New.
11791         (linux_attach_lwp_1): Adjust comment.
11792         (linux_attach): last_resume_kind moved the thread_info; adjust.
11793         (status_pending_p_callback): Adjust.
11794         (linux_wait_for_event_1): Adjust.
11795         (count_events_callback, select_singlestep_lwp_callback)
11796         (select_event_lwp_callback, cancel_breakpoints_callback)
11797         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11798         (proceed_one_lwp): Adjust.
11799         (linux_async): Add debug output.
11800         (linux_thread_stopped): New.
11801         (linux_pause_all): New.
11802         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11803         linux_pause_all.
11804         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11805         (thread_db_free): Delete declaration.
11806         (thread_db_detach, thread_db_mourn): Declare.
11807         * thread-db.c (thread_db_init): Use thread_db_mourn.
11808         (thread_db_free): Delete, split in two.
11809         (disable_thread_event_reporting): New.
11810         (thread_db_detach): New.
11811         (thread_db_mourn): New.
11812
11813         * server.h (struct thread_info) <last_resume_kind>: New field.
11814         <attached>: Add comment.
11815         <gdb_detached>: New field.
11816         (handler_func): Change return type to int.
11817         (handle_serial_event, handle_target_event): Ditto.
11818         (gdb_connected): Declare.
11819         (tracing): Delete.
11820         (disconnected_tracing): Declare.
11821         (stop_tracing): Declare.
11822
11823         * server.c (handle_query) <qSupported>: Report support for
11824         disconnected tracing.
11825         (queue_stop_reply_callback): Account for running threads.
11826         (gdb_wants_thread_stopped): New.
11827         (gdb_wants_all_threads_stopped): New.
11828         (gdb_reattached_process): New.
11829         (handle_status): Clear the `gdb_detached' flag of all processes.
11830         In all-stop, stop all threads.
11831         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
11832         (process_serial_event): If the remote connection breaks, or if an
11833         exit was forced with "monitor exit", force an event loop exit.
11834         Handle disconnected tracing on detach.
11835         (handle_serial_event): Adjust.
11836         (handle_target_event): If GDB isn't connected, forward events back
11837         to the inferior, unless the last process exited, in which case,
11838         exit gdbserver.  Adjust interface.
11839
11840         * remote-utils.c (remote_open): Don't block in accept.  Instead
11841         register an event loop source on the listen socket file
11842         descriptor.  Refactor bits into ...
11843         (listen_desc): ... this new global.
11844         (gdb_connected): ... this new function.
11845         (enable_async_notification): ... this new function.
11846         (handle_accept_event): ... this new function.
11847         (remote_close): Clear remote_desc.
11848
11849         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11850
11851         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11852         New fields.
11853         (mourn_inferior): Define.
11854         (target_process_qsupported): Avoid the dangling else problem.
11855         (thread_stopped): Define.
11856         (pause_all): Define.
11857         (target_waitstatus_to_string): Declare.
11858         * target.c (target_waitstatus_to_string): New.
11859
11860         * tracepoint.c (tracing): Make extern.
11861         (disconnected_tracing): New.
11862         (stop_tracing): Make extern.  Handle tracing stops due to GDB
11863         disconnecting.
11864         (cmd_qtdisconnected): New.
11865         (cmd_qtstatus): Report disconnected tracing status in trace reply.
11866         (handle_tracepoint_general_set): Handle QTDisconnected.
11867
11868         * event-loop.c (event_handler_func): Change return type to int.
11869         (process_event): Bail out if the event handler wants the event
11870         loop to stop.
11871         (handle_file_event): Ditto.
11872         (start_event_loop): Bail out if the event handler wants the event
11873         loop to stop.
11874
11875         * nto-low.c (nto_target_ops): Adjust.
11876         * spu-low.c (spu_wait): Don't remove the process here.
11877         (spu_target_ops): Adjust.
11878         * win32-low.c (win32_wait): Don't remove the process here.
11879         (win32_target_ops): Adjust.
11880
11881 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
11882
11883         * regcache.c (realloc_register_cache): Invalidate inferior's
11884         regcache before recreating it.
11885
11886 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
11887
11888         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11889
11890 2010-04-09  Stan Shebs  <stan@codesourcery.com>
11891             Pedro Alves  <pedro@codesourcery.com>
11892
11893         * server.h (LONGEST): New.
11894         (struct thread_info) <while_stepping>: New field.
11895         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11896         Declare.
11897         (initialize_tracepoint, handle_tracepoint_general_set)
11898         (handle_tracepoint_query, tracepoint_finished_step)
11899         (tracepoint_was_hit, release_while_stepping_state_list):
11900         (current_traceframe): Declare.
11901         * server.c (handle_general_set): Handle tracepoint packets.
11902         (read_memory): New.
11903         (write_memory): New.
11904         (handle_search_memory_1): Use read_memory.
11905         (handle_query): Report support for conditional tracepoints, trace
11906         state variables, and tracepoint sources.  Handle tracepoint
11907         queries.
11908         (main): Initialize the tracepoints module.
11909         (process_serial_event): Handle traceframe reads/writes.
11910
11911         * linux-low.c (handle_tracepoints): New.
11912         (linux_wait_1): Call it.
11913         (linux_resume_one_lwp): Handle while-stepping.
11914         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11915         (linux_target_ops): Install them.
11916         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11917         New field.
11918         * linux-x86-low.c (x86_supports_tracepoints): New.
11919         (the_low_target). Install it.
11920
11921         * mem-break.h (delete_breakpoint): Declare.
11922         * mem-break.c (delete_breakpoint): Make external.
11923
11924         * target.h (struct target_ops): Add `supports_tracepoints',
11925         `read_pc', and `write_pc' fields.
11926         (target_supports_tracepoints): Define.
11927         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11928         (phex_nz): New.
11929
11930         * regcache.h (struct regcache) <registers_owned>: New field.
11931         (init_register_cache, regcache_cpy): Declare.
11932         (regcache_read_pc, regcache_write_pc): Declare.
11933         (register_cache_size): Declare.
11934         (supply_regblock): Declare.
11935         * regcache.c (init_register_cache): New.
11936         (new_register_cache): Use it.
11937         (regcache_cpy): New.
11938         (register_cache_size): New.
11939         (supply_regblock): New.
11940         (regcache_read_pc, regcache_write_pc): New.
11941
11942         * tracepoint.c: New.
11943
11944         * Makefile.in (OBS): Add tracepoint.o.
11945         (tracepoint.o): New rule.
11946
11947 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
11948
11949         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11950         (i386-mmx.o): New.
11951         (i386-mmx.c): Likewise.
11952         (i386-mmx-linux.o): Likewise.
11953         (i386-mmx-linux.c): Likewise.
11954
11955         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11956         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11957         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11958         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11959
11960         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11961         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11962         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11963
11964 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
11965
11966         * Makefile.in (clean): Updated.
11967         (i386-avx.o): New.
11968         (i386-avx.c): Likewise.
11969         (i386-avx-linux.o): Likewise.
11970         (i386-avx-linux.c): Likewise.
11971         (amd64-avx.o): Likewise.
11972         (amd64-avx.c): Likewise.
11973         (amd64-avx-linux.o): Likewise.
11974         (amd64-avx-linux.c): Likewise.
11975
11976         * configure.srv (srv_i386_regobj): Add i386-avx.o.
11977         (srv_i386_linux_regobj): Add i386-avx-linux.o.
11978         (srv_amd64_regobj): Add amd64-avx.o.
11979         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11980         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11981         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11982         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11983         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11984         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11985         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11986
11987         * i387-fp.c: Include "i386-xstate.h".
11988         (i387_xsave): New.
11989         (i387_cache_to_xsave): Likewise.
11990         (i387_xsave_to_cache): Likewise.
11991         (x86_xcr0): Likewise.
11992
11993         * i387-fp.h (i387_cache_to_xsave): Likewise.
11994         (i387_xsave_to_cache): Likewise.
11995         (x86_xcr0): Likewise.
11996
11997         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11998         * linux-crisv32-low.c (target_regsets): Likewise.
11999         * linux-m68k-low.c (target_regsets): Likewise.
12000         * linux-mips-low.c (target_regsets): Likewise.
12001         * linux-ppc-low.c (target_regsets): Likewise.
12002         * linux-s390-low.c (target_regsets): Likewise.
12003         * linux-sh-low.c (target_regsets): Likewise.
12004         * linux-sparc-low.c (target_regsets): Likewise.
12005         * linux-xtensa-low.c (target_regsets): Likewise.
12006
12007         * linux-low.c: Include <sys/uio.h>.
12008         (regsets_fetch_inferior_registers): Support nt_type.
12009         (regsets_store_inferior_registers): Likewise.
12010         (linux_process_qsupported): New.
12011         (linux_target_ops): Add linux_process_qsupported.
12012
12013         * linux-low.h (regset_info): Add nt_type.
12014         (linux_target_ops): Add process_qsupported.
12015
12016         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12017         and <sys/uio.h>.
12018         (init_registers_i386_avx_linux): New.
12019         (init_registers_amd64_avx_linux): Likewise.
12020         (xmltarget_i386_linux_no_xml): Likewise.
12021         (xmltarget_amd64_linux_no_xml): Likewise.
12022         (PTRACE_GETREGSET): Likewise.
12023         (PTRACE_SETREGSET): Likewise.
12024         (x86_fill_xstateregset): Likewise.
12025         (x86_store_xstateregset): Likewise.
12026         (use_xml): Likewise.
12027         (x86_linux_update_xmltarget): Likewise.
12028         (x86_linux_process_qsupported): Likewise.
12029         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12030         (x86_arch_setup): Don't call init_registers_amd64_linux nor
12031         init_registers_i386_linux here.  Call
12032         x86_linux_update_xmltarget.
12033         (the_low_target): Add x86_linux_process_qsupported.
12034
12035         * server.c (handle_query): Call target_process_qsupported.
12036
12037         * target.h (target_ops): Add process_qsupported.
12038         (target_process_qsupported): New.
12039
12040 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
12041
12042         * inferiors.c (add_thread): Set last_status kind to
12043         TARGET_WAITKIND_IGNORE.
12044         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12045         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
12046         (linux_wait_1): Move `thread' local definition to block that uses
12047         it.  Don't NULL initialize `event_child'.
12048         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12049         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12050         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12051
12052 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12053
12054         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12055         an extended waitstatus, or by a watchpoint.
12056         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12057         thread was stepping or has been stopped by a watchpoint.
12058
12059 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12060
12061         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12062         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12063         of another, then delete the previous, and validate all
12064         breakpoints.
12065         (validate_inserted_breakpoint): New.
12066         (delete_disabled_breakpoints): New.
12067         (validate_breakpoints): New.
12068         (check_mem_read): Validate breakpoints before trusting their
12069         shadow.  Delete disabled breakpoints.
12070         (check_mem_write): Validate breakpoints before trusting they
12071         should be inserted.  Delete disabled breakpoints.
12072         * mem-break.h (validate_breakpoints):
12073         * server.c (handle_query): Validate breakpoints when we see a
12074         qSymbol query.
12075
12076 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12077
12078         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12079         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
12080         if we could tell there's a GDB breakpoint at stop_pc.
12081         (need_step_over_p): Don't do a step over if we find a GDB
12082         breakpoint at the resume PC.
12083
12084         * mem-break.c (struct raw_breakpoint): New.
12085         (enum bkpt_type): New type `gdb_breakpoint'.
12086         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12087         fields.  New field `raw'.
12088         (find_raw_breakpoint_at): New.
12089         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
12090         breakpoint instead.
12091         (set_breakpoint_at): Adjust.
12092         (delete_raw_breakpoint): New.
12093         (release_breakpoint): New.
12094         (delete_breakpoint): Rename to...
12095         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
12096         release_breakpoint.  Return ENOENT.
12097         (delete_breakpoint): Reimplement.
12098         (find_breakpoint_at): Delete.
12099         (find_gdb_breakpoint_at): New.
12100         (delete_breakpoint_at): Delete.
12101         (set_gdb_breakpoint_at): New.
12102         (delete_gdb_breakpoint_at): New.
12103         (gdb_breakpoint_here): New.
12104         (set_reinsert_breakpoint): Use release_breakpoint.
12105         (uninsert_breakpoint): Rename to ...
12106         (uninsert_raw_breakpoint): ... this.
12107         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12108         (reinsert_raw_breakpoint): Change parameter type to
12109         raw_breakpoint.
12110         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12111         instead.
12112         (check_breakpoints): Adjust.  Use release_breakpoint.
12113         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12114         (breakpoint_inserted_here): Ditto.
12115         (check_mem_read): Adjust to iterate over raw breakpoints instead.
12116         Don't trust the breakpoint's shadow if it is not inserted.
12117         (check_mem_write): Adjust to iterate over raw breakpoints instead.
12118         (delete_all_breakpoints): Adjust.
12119         (free_all_breakpoints): Mark all breakpoints as uninserted, and
12120         use delete_breakpoint_1.
12121
12122         * mem-break.h (breakpoints_supported): Delete declaration.
12123         (set_gdb_breakpoint_at): Declare.
12124         (gdb_breakpoint_here): Declare.
12125         (delete_breakpoint_at): Delete.
12126         (delete_gdb_breakpoint_at): Declare.
12127
12128         * server.h (struct raw_breakpoint): Forward declare.
12129         (struct process_info): New field `raw_breakpoints'.
12130
12131         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12132         breakpoints.
12133
12134 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12135
12136         * linux-low.c (status_pending_p_callback): Fix comment.
12137         (linux_wait_for_event_1): Move most of the internal breakpoint
12138         handling from here...
12139         (linux_wait_1): ... to here.
12140         (count_events_callback): New.
12141         (select_singlestep_lwp_callback): New.
12142         (select_event_lwp_callback): New.
12143         (cancel_breakpoints_callback): New.
12144         (select_event_lwp): New.
12145         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
12146         priority to all LWPs that have had events that should be reported
12147         to the client.  Cancel breakpoints when about to reporting the
12148         event to the client, not while stopping lwps.  No longer cancel
12149         finished single-steps here.
12150         (cancel_finished_single_step): Delete.
12151         (cancel_finished_single_steps): Delete.
12152
12153 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12154
12155         * mem-break.c (enum bkpt_type): New.
12156         (struct breakpoint): New field `type'.
12157         (set_breakpoint_at): Change return type to struct breakpoint
12158         pointer.  Set type to `other_breakpoint' by default.
12159         (delete_breakpoint): Rewrite, supporting more than one breakpoint
12160         in the breakpoint list.
12161         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12162         (reinsert_breakpoint): Rename to ...
12163         (reinsert_raw_breakpoint): ... this.
12164         (reinsert_breakpoints_at): Adjust.
12165         * mem-break.h (struct breakpoint): Declare.
12166         (set_breakpoint_at): Change return type to struct breakpoint
12167         pointer.
12168
12169 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12170
12171         * server.c (handle_query): Assign, not compare.
12172
12173 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12174
12175         Teach linux gdbserver to step-over-breakpoints.
12176
12177         * linux-low.c (can_hardware_single_step): New.
12178         (supports_breakpoints): New.
12179         (handle_extended_wait): If stopping threads, read the stop pc of
12180         the new cloned LWP.
12181         (get_pc): New.
12182         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
12183         low target doesn't support retrieving the PC.
12184         (add_lwp): Set last_resume_kind to resume_continue.
12185         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
12186         (linux_attach): Don't clear stop_expected.  Set the lwp's
12187         last_resume_kind to resume_stop.
12188         (linux_detach_one_lwp): Don't check for removed breakpoints.
12189         (check_removed_breakpoint): Delete.
12190         (status_pending_p): Rename to ...
12191         (status_pending_p_callback): ... this.  Don't check for removed
12192         breakpoints.  Don't consider threads that are stopped from GDB's
12193         perspective.
12194         (linux_wait_for_lwp): Always read the stop_pc here.
12195         (cancel_breakpoint): New.
12196         (step_over_bkpt): New global.
12197         (linux_wait_for_event_1): Implement stepping over breakpoints.
12198         (gdb_wants_lwp_stopped): New.
12199         (gdb_wants_all_stopped): New.
12200         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
12201         single-step traps here.  Store the thread's last reported target
12202         wait status.
12203         (send_sigstop): Don't clear stop_expected.  Always set it,
12204         instead.
12205         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12206         (cancel_finished_single_step): New.
12207         (cancel_finished_single_steps): New.
12208         (wait_for_sigstop): Don't cancel finished single-step traps here.
12209         (linux_resume_one_lwp): Don't check for removed breakpoints.
12210         Don't set `step' on non-hardware step archs.
12211         (linux_set_resume_request): Ignore resume_stop requests if already
12212         stopping or stopped.  Set the lwp's last_resume_kind.
12213         (resume_status_pending_p): Don't check for removed breakpoints.
12214         (need_step_over_p): New.
12215         (start_step_over): New.
12216         (finish_step_over): New.
12217         (linux_resume_one_thread): Always queue a sigstop for resume_stop
12218         requests.  Clear the thread's last reported target waitstatus.
12219         Don't use the `suspended' flag.  Don't consider pending breakpoints.
12220         (linux_resume): Start a step-over if necessary.
12221         (proceed_one_lwp): New.
12222         (proceed_all_lwps): New.
12223         (unstop_all_lwps): New.
12224         * linux-low.h (struct lwp_info): Rewrite comment for the
12225         `suspended' flag.  Add the `stop_pc' field.  Delete the
12226         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
12227         Add `'last_resume_kind' and `need_step_over' fields.
12228         * inferiors.c (struct thread_info): Delete, moved elsewhere.
12229         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12230         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
12231         (set_raw_breakpoint_at): New.
12232         (set_breakpoint_at): Rewrite to use it.
12233         (reinsert_breakpoint_handler): Delete.
12234         (set_reinsert_breakpoint): New.
12235         (reinsert_breakpoint_by_bp): Delete.
12236         (delete_reinsert_breakpoints): New.
12237         (uninsert_breakpoint): Rewrite.
12238         (uninsert_breakpoints_at): New.
12239         (reinsert_breakpoint): Rewrite.
12240         (reinsert_breakpoints_at): New.
12241         (check_breakpoints): Rewrite.
12242         (breakpoint_here): New.
12243         (breakpoint_inserted_here): New.
12244         (check_mem_read): Adjust.
12245         * mem-break.h (breakpoints_supported, breakpoint_here)
12246         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12247         (reinsert_breakpoint_by_bp): Delete declaration.
12248         (delete_reinsert_breakpoints): Declare.
12249         (reinsert_breakpoint): Delete declaration.
12250         (reinsert_breakpoints_at): Declare.
12251         (uninsert_breakpoint): Delete declaration.
12252         (uninsert_breakpoints_at): Declare.
12253         (check_breakpoints): Adjust prototype.
12254         * server.h: Adjust include order.
12255         (struct thread_info): Declare here.  Add a `last_status' field.
12256
12257 2010-03-23  Michael Snyder  <msnyder@vmware.com>
12258
12259         * server.c (crc32): New function.
12260         (handle_query): Add handling for 'qCRC:' request.
12261
12262 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
12263
12264         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12265         lwp had been stopped by a watchpoint.
12266
12267 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
12268
12269         * server.h (internal_error): Declare.
12270         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12271         * utils.c (internal_error): New function.
12272
12273 2010-03-15  Andreas Schwab  <schwab@redhat.com>
12274
12275         * configure.srv: Fix typo setting srv_regobj.
12276
12277 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
12278
12279         * linux-low.c (fetch_register): Avoid passing a non string literal
12280         format to `error'.
12281         (usr_store_inferior_registers): Ditto.
12282
12283 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
12284
12285         * linux-low.c (linux_write_memory): Bail out early if peeking
12286         memory failed.
12287
12288 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
12289
12290         * linux-low.h (struct lwp_info): New fields
12291         `stopped_by_watchpoint' and `stopped_data_address'.
12292         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12293         here, and cache them in the lwp object.
12294         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12295         directly.
12296         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12297         field.
12298         (linux_stopped_by_watchpoint): Rewrite.
12299         (linux_stopped_data_address): Rewrite.
12300
12301 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
12302
12303         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12304         switching the current inferior, not before.
12305
12306 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
12307
12308         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12309         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12310         i386-linux.c and amd64-linux.c.
12311         (reg-i386.o): Removed.
12312         (reg-i386.c): Likewise.
12313         (reg-i386-linux.o): Likewise.
12314         (reg-i386-linux.c): Likewise.
12315         (reg-x86-64.o): Likewise.
12316         (reg-x86-64.c): Likewise.
12317         (reg-x86-64-linux.o): Likewise.
12318         (reg-x86-64-linux.c): Likewise.
12319         (i386.o): New.
12320         (i386.c): Likewise.
12321         (i386-linux.o): Likewise.
12322         (i386-linux.c): Likewise.
12323         (amd64.o): Likewise.
12324         (amd64.c): Likewise.
12325         (amd64-linux.o): Likewise.
12326         (amd64-linux.c): Likewise.
12327
12328         * configure.srv (srv_i386_regobj): New.
12329         (srv_i386_linux_regobj): Likewise.
12330         (srv_amd64_regobj): Likewise.
12331         (srv_amd64_linux_regobj): Likewise.
12332         (srv_i386_32bit_xmlfiles): Likewise.
12333         (srv_i386_64bit_xmlfiles): Likewise.
12334         (srv_i386_xmlfiles): Likewise.
12335         (srv_amd64_xmlfiles): Likewise.
12336         (srv_i386_linux_xmlfiles): Likewise.
12337         (srv_amd64_linux_xmlfiles): Likewise.
12338         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
12339         srv_xmlfiles to $srv_i386_xmlfiles.
12340         (i[34567]86-*-mingw32ce*): Likewise.
12341         (i[34567]86-*-mingw*): Likewise.
12342         (i[34567]86-*-nto*): Likewise.
12343         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12344         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
12345         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12346         (x86_64-*-linux*): Likewise.
12347
12348         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12349         (init_registers_amd64_linux): New.
12350         (x86_arch_setup): Replace init_registers_x86_64_linux with
12351         init_registers_amd64_linux.
12352
12353 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
12354
12355         * configure.ac: Check for libdl.  If it is not available link against
12356         static libthread_db.
12357         * configure: Regenerate.
12358
12359 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
12360
12361         PR9605
12362
12363         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12364         handing a read watchpoint.
12365         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12366
12367 2010-02-12  Doug Evans  <dje@google.com>
12368
12369         * linux-low.c (linux_supports_tracefork_flag): Document.
12370         (linux_look_up_symbols): Add comment.
12371
12372 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
12373
12374         * regcache.c (supply_register): Clear regcache if buf is NULL.
12375
12376 2010-02-02  Nicolas Roche  <roche@sourceware.org>
12377             Joel Brobecker  <brobecker@adacore.com>
12378
12379         * inferiors.c (find_inferior): Add function documentation.
12380         (unloaded_dll): Handle the case where the unloaded dll has not
12381         been previously registered in the dll list.
12382
12383 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12384
12385         * linux-arm-low.c (thumb_breakpoint_len): Delete.
12386         (thumb2_breakpoint): New.
12387         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12388
12389 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12390
12391         * linux-low.c (get_stop_pc): Check for SIGTRAP.
12392         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12393         breakpoints.
12394
12395 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
12396
12397         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12398
12399 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12400
12401         * linux-s390-low.c (s390_collect_ptrace_register)
12402         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12403
12404 2010-01-21  Doug Evans  <dje@google.com>
12405
12406         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12407         (PTRACE_ARG4_TYPE): New macro.
12408         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12409         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12410         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12411         (usr_store_inferior_registers): Ditto.
12412         (linux_read_memory, linux_write_memory): Ditto.
12413         (linux_test_for_tracefork): Ditto.
12414
12415         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12416         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12417
12418 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
12419
12420         * proc-service.c (ps_lgetregs): Don't refetch registers from the
12421         target.
12422
12423 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
12424
12425         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12426         prototype to take a regcache.  Adjust.
12427
12428 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
12429
12430         * regcache.h (struct thread_info): Forward declare.
12431         (struct regcache): New.
12432         (new_register_cache): Adjust prototype.
12433         (get_thread_regcache): Declare.
12434         (free_register_cache): Adjust prototype.
12435         (registers_to_string, registers_from_string): Ditto.
12436         (supply_register, supply_register_by_name, collect_register)
12437         (collect_register_as_string, collect_register_by_name): Ditto.
12438         * regcache.c (struct inferior_regcache_data): Delete.
12439         (get_regcache): Rename to ...
12440         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
12441         fetching registers.
12442         (regcache_invalidate_one): Adjust.
12443         (regcache_invalidate): Fix prototype.
12444         (new_register_cache): Return the new register cache.
12445         (free_register_cache): Change prototype.
12446         (realloc_register_cache): Adjust.
12447         (registers_to_string): Change prototype to take a regcache.  Adjust.
12448         (registers_from_string): Ditto.
12449         (register_data): Ditto.
12450         (supply_register): Ditto.
12451         (supply_register_by_name): Ditto.
12452         (collect_register): Ditto.
12453         (collect_register_as_string): Ditto.
12454         (collect_register_by_name): Ditto.
12455         * server.c (process_serial_event): Adjust.
12456         * linux-low.h (regset_fill_func, regset_store_func): Change
12457         prototype.
12458         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12459         Change prototype.
12460         * linux-low.c (get_stop_pc): Adjust.
12461         (check_removed_breakpoint): Adjust.
12462         (linux_wait_for_event): Adjust.
12463         (linux_resume_one_lwp): Adjust.
12464         (fetch_register): Add regcache parameter.  Adjust.
12465         (usr_store_inferior_registers): Ditto.
12466         (regsets_fetch_inferior_registers): Ditto.
12467         (regsets_store_inferior_registers): Ditto.
12468         (linux_fetch_registers, linux_store_registers): Ditto.
12469         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12470         regcache.  Adjust.
12471         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12472         Ditto.
12473         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12474         prototype to take a regcache.
12475         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12476         * remote-utils.c (convert_ascii_to_int, outreg)
12477         (prepare_resume_reply): Change prototype to take a regcache.
12478         Adjust.
12479         * target.h (struct target_ops) <fetch_registers, store_registers>:
12480         Change prototype to take a regcache.
12481         (fetch_inferior_registers, store_inferior_registers): Change
12482         prototype to take a regcache.  Adjust.
12483         * proc-service.c (ps_lgetregs): Adjust.
12484         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12485         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12486         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12487         take a regcache.  Adjust.
12488         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12489         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12490         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12491         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
12492         * linux-cris-low.c (cris_get_pc, cris_set_pc)
12493         (cris_cannot_fetch_register):
12494         (cris_breakpoint_at): Change prototype to take a regcache.
12495         Adjust.
12496         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12497         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12498         to take a regcache.  Adjust.
12499         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12500         Adjust.
12501         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12502         take a regcache.  Adjust.
12503         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12504         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12505         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
12506         * linux-mips-low.c (mips_get_pc):
12507         (mips_set_pc): Change prototype to take a regcache.  Adjust.
12508         (mips_reinsert_addr): Adjust.
12509         (mips_collect_register): Change prototype to take a regcache.
12510         Adjust.
12511         (mips_supply_register):
12512         (mips_collect_register_32bit, mips_supply_register_32bit)
12513         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12514         (mips_store_fpregset): Ditto.
12515         * linux-ppc-low.c (ppc_supply_ptrace_register)
12516         (ppc_supply_ptrace_register): Ditto.
12517         (parse_spufs_run): Adjust.
12518         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12519         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12520         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12521         take a regcache.  Adjust.
12522         * linux-s390-low.c (s390_collect_ptrace_register)
12523         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12524         (s390_set_pc): Change prototype to take a regcache.  Adjust.
12525         (s390_arch_setup): Adjust.
12526         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12527         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
12528         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12529         (sparc_fill_gregset, sparc_store_gregset_from_stack)
12530         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12531         regcache.  Adjust.
12532         (sparc_breakpoint_at): Adjust.
12533         * linux-xtensa-low.c (xtensa_fill_gregset):
12534         (xtensa_store_gregset):
12535         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12536         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
12537         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12538         prototype to take a regcache.  Adjust.
12539         * win32-arm-low.c (arm_fetch_inferior_register)
12540         (arm_store_inferior_register): Change prototype to take a
12541         regcache.  Adjust.
12542         * win32-i386-low.c (i386_fetch_inferior_register)
12543         (i386_store_inferior_register): Change prototype to take a
12544         regcache.  Adjust.
12545         * win32-low.c (child_fetch_inferior_registers)
12546         (child_store_inferior_registers): Change prototype to take a
12547         regcache.  Adjust.
12548         (win32_wait): Adjust.
12549         (win32_fetch_inferior_registers): Change prototype to take a
12550         regcache.  Adjust.
12551         (win32_store_inferior_registers): Adjust.
12552         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12553         store_inferior_register>: Change prototype to take a regcache.
12554
12555 2010-01-20  Doug Evans  <dje@google.com>
12556
12557         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12558         #ifdef.
12559         (linux_wait_for_event1, linux_init_signals): Ditto.
12560         (W_STOPCODE): Provide definition if missing.
12561
12562 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
12563
12564         * linux-low.c (linux_core_of_thread): New.
12565         (compare_ints, show_process, list_threads): New.
12566         (linux_qxfer_osdata): Report threads and cores.
12567         (linux_target_op): Register linux_core_of_thread.
12568         * remote-utils.c (prepare_resume_reply): Report the core.
12569         (buffer_xml_printf): Support %d specifier.
12570         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12571         New.
12572         (handle_query): Handle qXfer:threads.  Announce availability
12573         thereof.
12574         * target.h (struct target_ops): New field core_of_thread.
12575
12576 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
12577
12578         * Makefile.in (clean): Remove new generated files.
12579         (reg-s390.o, reg-s390.c): Remove rules.
12580         (reg-s390x.o, reg-s390x.c): Likewise.
12581         (s390-linux32.o, s390-linux32.c): Add rules.
12582         (s390-linux64.o, s390-linux64.c): Likewise.
12583         (s390x-linux64.o, s390x-linux64.c): Likewise.
12584         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12585         * linux-s390-low.c: Include <elf.h>.
12586         (HWCAP_S390_HIGH_GPRS): Define if undefined.
12587         (init_registers_s390): Remove prototype.
12588         (init_registers_s390x): Likewise.
12589         (init_registers_s390_linux32): Add prototype.
12590         (init_registers_s390_linux64): Likewise.
12591         (init_registers_s390x_linux64): Likewise.
12592         (s390_num_regs_3264): New define.
12593         (s390_regmap_3264): New global variable.
12594         (s390_cannot_fetch_register): Remove obsolete check.
12595         (s390_cannot_store_register): Likewise.
12596         (s390_collect_ptrace_register): Handle upper/lower register halves.
12597         (s390_supply_ptrace_register): Likewise.
12598         (s390_fill_gregset): Update to register number changes.
12599         (s390_get_hwcap): New routine.
12600         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12601         Install appropriate regmap and register set.
12602
12603 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
12604
12605         * server.c (gdbserver_version): Update copyright year to 2010.
12606         * gdbreplay.c (gdbreplay_version): Likewise.
12607
12608 2009-12-28  Doug Evans  <dje@google.com>
12609
12610         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12611         elf/external.h.  Include <elf.h> instead but only if necessary.
12612
12613 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
12614
12615         * linux-low.c (linux_remove_process): Remove `detaching'
12616         parameter.  Don't release/detach from thread_db here.
12617         (linux_kill): Release/detach from thread_db here, ...
12618         (linux_detach): ... and here, before actually detaching.
12619         (linux_wait_1): ... and here, when a process exits.
12620         * thread-db.c (any_thread_of): New.
12621         (thread_db_free): Switch the current inferior to a thread of the
12622         passed in process.
12623
12624 2009-12-21  Doug Evans  <dje@google.com>
12625
12626         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12627
12628         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12629         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12630         warning ifndef __NR_tkill.  Move setting of errno there too.
12631         Delete unnecessary resetting of errno after syscall.
12632         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12633
12634         * configure.ac: Check for dladdr.
12635         * config.in: Regenerate.
12636         * configure: Regenerate.
12637         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12638         (try_thread_db_load): Update.
12639
12640         * linux-low.c (my_waitpid): Delete unnecessary prototype.
12641
12642 2009-12-18  Doug Evans  <dje@google.com>
12643
12644         * event-loop.c: Include unistd.h if it exists.
12645
12646         * linux-low.c (my_waitpid): Move definition away from being in
12647         between linux_tracefork_child/linux_test_for_tracefork.
12648
12649         * gdb_proc_service.h (psaddr_t): Fix type.
12650         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12651         signature to match glibc.
12652
12653 2009-12-16  Doug Evans  <dje@google.com>
12654
12655         * linux-low.c (linux_read_memory): Fix argument to read.
12656
12657 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
12658
12659         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12660         events, don't leave current_inferior pointing at null.
12661
12662 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
12663
12664         * win32-low.c (LOG): Delete.
12665         (OUTMSG): Output to stderr.
12666         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12667         on compile time LOG macro.
12668         (win32_wait): Fix debug output.
12669
12670 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
12671
12672         * win32-low.c (win32_add_one_solib): If the dll name is
12673         "ntdll.dll", prepend the system directory to the dll path.
12674
12675 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
12676
12677         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12678
12679 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12680             Vladimir Prus  <vladimir@codesourcery.com>
12681
12682         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12683         * configure.ac: Check for __mcoldfire__ and set
12684         gdb_cv_m68k_is_coldfire.
12685         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12686         reg-cf.o and reg-m68k.o.
12687         * configure: Regenerated.
12688
12689 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
12690
12691         * linux-low.c (linux_remove_process): Add `detaching' parameter.
12692         Pass it to thread_db_free.
12693         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12694         proper `detaching' argument to linux_remove_process.
12695         * linux-low.h (thread_db_free): Add `detaching' parameter.
12696         * thread-db.c (thread_db_init): Pass false as `detaching' argument
12697         to thread_db_free.
12698         (thread_db_free): Add `detaching' parameter.  Only
12699         call td_ta_clear_event if detaching from process.
12700
12701 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
12702
12703         * thread-db.c (thread_db_free): Fix typo.
12704
12705 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
12706
12707         PR gdb/10838
12708         * thread-db.c (thread_db_free): Call td_ta_clear_event.
12709
12710 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
12711
12712         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12713         with an i686 compiler.
12714         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12715         needed.
12716         * configure: Rebuilt.
12717
12718 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
12719
12720         PR gdb/10783
12721
12722         * server.c (handle_search_memory_1): Correct read_addr initialization
12723         in loop for searching subsequent chunks.
12724
12725 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
12726
12727         * configure.ac: New --with-libthread-db option.
12728         * thread-db.c: Allow direct dependence on libthread_db.
12729         (thread_db_free): Adjust.
12730         * config.in: Regenerate.
12731         * configure: Likewise.
12732
12733 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
12734
12735         PR gdb/10757
12736         * thread-db.c (attach_thread): New function.
12737         (maybe_attach_thread): Return success/failure.
12738         (find_new_threads_callback): Adjust.
12739         (thread_db_find_new_threads): Loop until no new threads.
12740
12741 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
12742
12743         * proc-service.c (ps_lgetregs): Formatting.
12744
12745 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
12746
12747         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12748         * configure.ac: Adjust.
12749         * linux-low.h (struct process_info_private): Move members to struct
12750         thread_db.
12751         (thread_db_free, thread_db_handle_monitor_command): New prototype.
12752         * linux-low.c (linux_remove_process): Adjust.
12753         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12754         * server.c (handle_query): Move code ...
12755         (handle_monitor_command): ... here. New function.
12756         * target.h (struct target_ops): New member.
12757         * thread-db.c (struct thread_db): New.
12758         (libthread_db_search_path): New variable.
12759         (thread_db_create_event, thread_db_enable_reporting)
12760         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12761         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12762         (try_thread_db_load_1, dladdr_to_soname): New functions.
12763         (try_thread_db_load, thread_db_load_search): New functions.
12764         (thread_db_init): Search for libthread_db.
12765         (thread_db_free): New function.
12766         (thread_db_handle_monitor_command): Likewise.
12767         * config.in: Regenerate.
12768         * configure: Regenerate.
12769
12770 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
12771
12772         * spu-low.c (spu_kill): Wait for inferior to terminate.
12773         Call clear_inferiors.
12774         (spu_detach): Call clear_inferiors.
12775
12776 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12777
12778         * aclocal.m4: Regenerate.
12779         * config.in: Likewise.
12780         * configure: Likewise.
12781
12782 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
12783
12784         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12785         (parse_spufs_run): New function.
12786         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12787         (ppc_breakpoint_at): Handle SPU breakpoints.
12788
12789 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
12790
12791         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12792         (SPUFS_MAGIC): Define.
12793         (spu_enumerate_spu_ids): New function.
12794         (linux_qxfer_spu): New function.
12795         (linux_target_ops): Install linux_qxfer_spu.
12796
12797 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
12798
12799         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12800         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
12801         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12802         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12803         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12804         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12805         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12806         (init_registers_powerpc_cell32l): Add prototype.
12807         (init_registers_powerpc_cell64l): Likewise.
12808         (ppc_arch_setup): Detect Cell/B.E. architecture.
12809
12810 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12811
12812         * Makefile.in (datarootdir): New variable.
12813
12814 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
12815
12816         * linux-low.c (linux_write_memory): Update debugging output.
12817         * Makefile.in (clean): Add new descriptions.
12818         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12819         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12820         * configure.srv: Add new files for arm*-*-linux*.
12821         * linux-arm-low.c: Add new declarations.
12822         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12823         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12824         (HWCAP_VFPv3D16): New.
12825         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12826         instead of __IWMMXT__.
12827         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12828         (arm_arch_setup): New.
12829         (target_regsets): Remove #ifdef.  Add VFP regset.
12830         (the_low_target): Use arm_arch_setup.
12831
12832 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
12833
12834         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12835         the main thread again.
12836
12837 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
12838
12839         Adding Neutrino gdbserver.
12840         * configure: Regenerated.
12841         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12842         * configure.srv (i[34567]86-*-nto*): New target.
12843         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12844         * remote-utils.c [__QNX__]: Include sys/iomgr.h
12845         (nto_comctrl) [__QNX__]: New function.
12846         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12847
12848 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
12849
12850         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12851         srv_tgtobj.
12852
12853 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
12854             Pedro Alves  <pedro@codesourcery.com>
12855
12856         * win32-i386-low.c (i386_get_thread_context): Handle systems that
12857         don't support CONTEXT_EXTENDED_REGISTERS.
12858         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12859         (the_low_target): Install them.
12860         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12861         failing with ERROR_PIPE_NOT_CONNECTED.
12862
12863 2009-06-30  Doug Evans  <dje@google.com>
12864             Pierre Muller  <muller@ics.u-strasbg.fr>
12865
12866         Add h/w watchpoint support to x86-linux, win32-i386.
12867         * Makefile.in (SFILES): Add i386-low.c
12868         (i386_low_h): Define.
12869         (i386-low.o): Add dependencies.
12870         (linux-x86-low.o): Add i386-low.h dependency.
12871         (win32-i386-low.o): Ditto.
12872         * i386-low.c: New file.
12873         * i386-low.h: New file.
12874         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12875         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12876         * linux-low.c (linux_add_process): Initialize arch_private.
12877         (linux_remove_process): Free arch_private.
12878         (add_lwp): Initialize arch_private.
12879         (delete_lwp): Free arch_private.
12880         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12881         provided.
12882         * linux-low.h (process_info_private): New member arch_private.
12883         (lwp_info): New member arch_private.
12884         (linux_target_ops): New members new_process, new_thread,
12885         prepare_to_resume.
12886         (ptid_of): New macro.
12887         * linux-x86-low.c: Include stddef.h, i386-low.h.
12888         (arch_process_info): New struct.
12889         (arch_lwp_info): New struct.
12890         (x86_linux_dr_get, x86_linux_dr_set): New functions.
12891         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12892         (i386_dr_low_get_status): New function.
12893         (x86_insert_point, x86_remove_point): New functions.
12894         (x86_stopped_by_watchpoint): New function.
12895         (x86_stopped_data_address): New function.
12896         (x86_linux_new_process, x86_linux_new_thread): New functions.
12897         (x86_linux_prepare_to_resume): New function.
12898         (the_low_target): Add entries for insert_point, remove_point,
12899         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12900         prepare_to_resume.
12901         * server.c (debug_hw_points): New global.
12902         (monitor_show_help): Document set debug-hw-points.
12903         (handle_query): Process "set debug-hw-points".
12904         * server.h (debug_hw_points): Declare.
12905         (paddress): Declare.
12906         * utils.c (NUMCELLS, CELLSIZE): New macros.
12907         (get_sell, xsnprintf, paddress): New functions.
12908         * win32-arm-low.c (the_low_target): Add entries for insert_point,
12909         remove_point, stopped_by_watchpoint, stopped_data_address.
12910         * win32-i386-low.c: Include i386-low.h.
12911         (debug_reg_state): Replaces dr.
12912         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12913         (i386_dr_low_get_status): New function.
12914         (i386_insert_point, i386_remove_point): New functions.
12915         (i386_stopped_by_watchpoint): New function.
12916         (i386_stopped_data_address): New function.
12917         (i386_initial_stuff): Update.
12918         (get_thread_context,set_thread_context,i386_thread_added): Update.
12919         (the_low_target): Add entries for insert_point,
12920         remove_point, stopped_by_watchpoint, stopped_data_address.
12921         * win32-low.c (win32_insert_watchpoint): New function.
12922         (win32_remove_watchpoint): New function.
12923         (win32_stopped_by_watchpoint): New function.
12924         (win32_stopped_data_address): New function.
12925         (win32_target_ops): Add entries for insert_watchpoint,
12926         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12927         * win32-low.h (win32_target_ops): New members insert_point,
12928         remove_point, stopped_by_watchpoint, stopped_data_address.
12929
12930 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
12931
12932         * server.c (process_serial_event): Re-return unsupported, not
12933         error, if the type isn't recognized.  Re-allow supporting only
12934         insert or remove packets.  Also call require_running for
12935         breakpoints.  Add missing break statement to default case.  Tidy.
12936         * target.h (struct target_ops): Rename insert_watchpoint to
12937         insert_point, and remove_watchpoint to remove_point.
12938
12939         * linux-low.h (struct linux_target_ops): Likewise.
12940         * linux-low.c (linux_insert_watchpoint): Rename to ...
12941         (linux_insert_point): ... this.  Adjust.
12942         (linux_remove_watchpoint): Rename to ...
12943         (linux_remove_point): ... this.  Adjust.
12944         (linux_target_ops): Adjust.
12945         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12946         (cris_insert_point): ... this.
12947         (cris_remove_watchpoint): Rename to ...
12948         (cris_remove_point): ... this.
12949         (the_low_target): Adjust.
12950
12951 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
12952
12953         * server.c (handle_v_kill): Pass signal_pid to
12954         kill_inferior if multi_process is zero.
12955
12956 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
12957
12958         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12959         * target.h (target_ops): Comment for *_watchpoint to make it clear
12960         the functions can get types '0' and '1'.
12961
12962 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
12963
12964         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12965         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12966         * regcache.c (get_regcache): Likewise.
12967         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12968         * win32-low.c (child_fetch_inferior_registers): Remove check for
12969         regno 0.
12970
12971 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
12972             Pedro Alves <pedro@codesourcery.com>
12973
12974         * target.h (struct target_ops) <supports_multi_process>: New
12975         callback.
12976         (target_supports_multi_process): New.
12977         * server.c (handle_query): Even if GDB reports support, only
12978         enable multi-process if the target also supports it.  Report
12979         multi-process support only if the target backend supports it.
12980         * linux-low.c (linux_supports_multi_process): New function.
12981         (linux_target_ops): Install it as target_supports_multi_process
12982         callback.
12983
12984 2009-05-24  Doug Evans  <dje@google.com>
12985
12986         Global renaming of find_thread_pid to find_thread_ptid.
12987         * server.h (find_thread_ptid): Renamed from find_thread_pid.
12988         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12989         All callers updated.
12990
12991         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12992         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12993         directly.
12994
12995         * linux-low.c (get_stop_pc): Print pc if debug_threads.
12996         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12997         (linux_resume_one_lwp): Ditto.
12998
12999 2009-05-23  Doug Evans  <dje@google.com>
13000
13001         * linux-low.c (linux_resume_one_lwp): Change type of first arg
13002         from struct inferior_list_entry * to struct lwp_info *.
13003         All callers updated.
13004
13005 2009-05-13  Doug Evans  <dje@google.com>
13006
13007         * linux-x86-low.c: Don't include assert.h.
13008         (x86_siginfo_fixup): Use fatal, not assert.
13009         (x86_arch_setup): Fix comment.
13010
13011 2009-05-12  Doug Evans  <dje@google.com>
13012
13013         Biarch support for i386/amd64 gdbserver.
13014         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13015         Add linux-x86-low.c.
13016         (linux-i386-low.o, linux-x86-64-low.o): Delete.
13017         (linux-x86-low.o): Add.
13018         * linux-x86-64-low.c: Delete.
13019         * linux-i386-low.c: Delete.
13020         * linux-x86-low.c: New file.
13021         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13022         linux-x86-low.o.
13023         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13024         linux-x86-low.o.
13025         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13026         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13027         (linux_child_pid_to_exec_file): New function.
13028         (elf_64_header_p, elf_64_file_p): New functions.
13029         (siginfo_fixup): New function.
13030         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
13031         give target a chance to convert layout.
13032         * linux-low.h (linux_target_ops): New member siginfo_fixup.
13033         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13034
13035 2009-05-07  Doug Evans  <dje@google.com>
13036
13037         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13038         (regsets_store_inferior_registers): Ditto.
13039
13040 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
13041
13042         PR server/10048
13043
13044         * linux-low.c (must_set_ptrace_flags): Delete.
13045         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13046         of the global.
13047         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
13048         `lwp->must_set_ptrace_flags' instead.
13049         (linux_wait_for_event_1): Set ptrace options here.
13050         (linux_wait_1): ... not here.
13051
13052 2009-04-30  Doug Evans  <dje@google.com>
13053
13054         * inferiors.c (started_inferior_callback): New function.
13055         (attached_inferior_callback): New function.
13056         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13057         * server.c (print_started_pid, print_attached_pid): New functions.
13058         (detach_or_kill_for_exit): New function.
13059         (main): Call it instead of for_each_inferior (kill_inferior_callback).
13060         * server.h (have_started_inferiors_p): Declare.
13061         (have_attached_inferiors_p): Declare.
13062
13063         * inferiors.c (remove_process): Fix memory leak, free process.
13064         * linux-low.c (linux_remove_process): New function.
13065         (linux_kill): Call it instead of remove_process.
13066         (linux_detach, linux_wait_1): Ditto.
13067
13068 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
13069
13070         * configure.srv: Add x86 Windows CE target.
13071
13072 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13073
13074         * inferiors.c (get_thread_process): Make global.
13075         * server.h (get_thread_process): Add prototype.
13076         * thread-db.c (find_one_thread): Use get_thread_process
13077         instead of current_process.
13078         (thread_db_get_tls_address): Do not crash if called when
13079         thread layer is not yet initialized.
13080
13081 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13082
13083         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13084         * spu-low.c (current_tid): Rename to ...
13085         (current_ptid): ... this.
13086         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13087         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13088         ptid_get_lwp (current_ptid) instead of current_tid.
13089         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13090         instead of current_tid.  Use find_process_pid to verify pid
13091         argument is valid.  Pass proper argument to remove_process.
13092         (spu_thread_alive): Compare current_ptid instead of current_tid.
13093         (spu_resume): Likewise.
13094
13095 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
13096
13097         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13098         variable.
13099
13100 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13101
13102         Implement the multiprocess extensions, and add linux multiprocess
13103         support.
13104
13105         * server.h (ULONGEST): Declare.
13106         (struct ptid, ptid_t): New.
13107         (minus_one_ptid, null_ptid): Declare.
13108         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13109         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13110         (struct inferior_list_entry): Change `id' type from unsigned from
13111         to ptid_t.
13112         (struct sym_cache, struct breakpoint, struct
13113         process_info_private): Forward declare.
13114         (struct process_info): Declare.
13115         (current_process): Declare.
13116         (all_processes): Declare.
13117         (initialize_inferiors): Declare.
13118         (add_thread): Adjust to use ptid_t.
13119         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13120         (add_process, remove_process, find_thread_pid): Declare.
13121         (find_inferior_id): Adjust to use ptid_t.
13122         (cont_thread, general_thread, step_thread): Change type to ptid_t.
13123         (multi_process): Declare.
13124         (push_event): Adjust to use ptid_t.
13125         (read_ptid, write_ptid): Declare.
13126         (prepare_resume_reply): Adjust to use ptid_t.
13127         (clear_symbol_cache): Declare.
13128         * inferiors.c (all_processes): New.
13129         (null_ptid, minus_one_ptid): New.
13130         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13131         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13132         (add_thread): Change unsigned long to ptid.  Remove gdb_id
13133         parameter.  Adjust.
13134         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13135         (gdb_id_to_thread): Rename to ...
13136         (find_thread_pid): ... this.  Change unsigned long to ptid.
13137         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13138         (loaded_dll, pull_pid_from_list): Adjust.
13139         (add_process, remove_process, find_process_pid)
13140         (get_thread_process, current_process, initialize_inferiors): New.
13141         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13142         (struct target_waitstatus) <related_pid>: Ditto.
13143         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
13144         return type to int.
13145         (struct target_ops) <join>: Add `pid' argument.
13146         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13147         (struct target_ops) <wait>: Add `ptid' field.  Change return type
13148         to ptid.
13149         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13150         (mywait): Add `ptid' argument.  Change return type to ptid_t.
13151         (target_pid_to_str): Declare.
13152         * target.c (set_desired_inferior): Adjust to use ptids.
13153         (mywait): Add new `ptid' argument.  Adjust.
13154         (target_pid_to_str): New.
13155         * mem-break.h (free_all_breakpoints): Declare.
13156         * mem-break.c (breakpoints): Delelete.
13157         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13158         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13159         to use per-process breakpoint list.
13160         (free_all_breakpoints): New.
13161         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13162         (symbol_cache, all_symbols_looked_up): Delete.
13163         (hexchars): New.
13164         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13165         read_ptid): New.
13166         (prepare_resume_reply): Change ptid argument's type from unsigned
13167         long to ptid_t.  Adjust.  Implement W;process and X;process.
13168         (free_sym_cache, clear_symbol_cache): New.
13169         (look_up_one_symbol): Adjust to per-process symbol cache.  *
13170         * server.c (cont_thread, general_thread, step_thread): Change type
13171         to ptid_t.
13172         (attached): Delete.
13173         (multi_process): New.
13174         (last_ptid): Change type to ptid_t.
13175         (struct vstop_notif) <ptid>: Change type to ptid_t.
13176         (queue_stop_reply, push_event): Change `ptid' argument's type to
13177         ptid_t.
13178         (discard_queued_stop_replies): Add `pid' argument.
13179         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
13180         changes.  Don't reference the `attached' global.
13181         (attach_inferior): Adjust to mywait interface changes.
13182         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
13183         features.  Handle and report "multiprocess+".  Handle
13184         "qAttached:PID".
13185         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
13186         changes.
13187         (handle_v_kill): New.
13188         (handle_v_stopped): Adjust to use target_pid_to_str.
13189         (handle_v_requests): Allow multiple attaches and runs when
13190         multiprocess extensions are in effect.  Handle "vKill".
13191         (myresume): Adjust to use ptids.
13192         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
13193         (handle_status): Adjust to discard_queued_stop_replies interface
13194         change.
13195         (first_thread_of, kill_inferior_callback)
13196         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13197         (main): Call initialize_inferiors.  Adjust to use ptids, killing
13198         and detaching from all inferiors.  Handle multiprocess packet
13199         variants.
13200         * linux-low.h: Include gdb_proc_service.h.
13201         (struct process_info_private): New.
13202         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13203         <lwpid_of>: Use ptid_get_lwp.
13204         (get_lwp_thread): Adjust.
13205         (struct lwp_info): Add `dead' member.
13206         (find_lwp_pid): Declare.
13207         * linux-low.c (thread_db_active): Delete.
13208         (new_inferior): Adjust comment.
13209         (inferior_pid): Delete.
13210         (linux_add_process): New.
13211         (handle_extended_wait): Adjust.
13212         (add_lwp): Change unsigned long to ptid.
13213         (linux_create_inferior): Add process to processes table.  Adjust
13214         to use ptids.  Don't set new_inferior here.
13215         (linux_attach_lwp): Rename to ...
13216         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
13217         it.  Adjust to use ptids.
13218         (linux_attach_lwp): New.
13219         (linux_attach): Add process to processes table.  Don't set
13220         new_inferior here.
13221         (struct counter): New.
13222         (second_thread_of_pid_p, last_thread_of_process_p): New.
13223         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
13224         multiple processes.
13225         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
13226         processes.  Remove process from process table.
13227         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
13228         to multiple processes.
13229         (any_thread_of): New.
13230         (linux_detach): Add `pid' argument, and handle it.  Remove process
13231         from processes table.
13232         (linux_join): Add `pid' argument.  Handle it.
13233         (linux_thread_alive): Change unsighed long argument to ptid_t.
13234         Consider dead lwps as not being alive.
13235         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
13236         threads we're not interested in.
13237         (same_lwp, find_lwp_pid): New.
13238         (linux_wait_for_lwp): Change `pid' argument's type from int to
13239         ptid_t.  Adjust.
13240         (linux_wait_for_event): Rename to ...
13241         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
13242         from int to ptid_t.  Adjust.
13243         (linux_wait_for_event): New.
13244         (linux_wait_1): Add `ptid' argument.  Change return type to
13245         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
13246         that exit from the process table.
13247         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
13248         Adjust.
13249         (mark_lwp_dead): New.
13250         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
13251         stopping all threads, mark its main lwp as dead.
13252         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13253         ptids.
13254         (fetch_register, usr_store_inferior_registers)
13255         (regsets_fetch_inferior_registers)
13256         (regsets_store_inferior_registers, linux_read_memory)
13257         (linux_write_memory): Inline `inferior_pid'.
13258         (linux_look_up_symbols): Adjust to use per-process
13259         `thread_db_active'.
13260         (linux_request_interrupt): Adjust to use ptids.
13261         (linux_read_auxv): Inline `inferior_pid'.
13262         (initialize_low): Don't reference thread_db_active.
13263         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13264         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13265         (ps_getpid): Return the pid of the current inferior.
13266         * thread-db.c (proc_handle, thread_agent): Delete.
13267         (thread_db_create_event, thread_db_enable_reporting): Adjust to
13268         per-process data.
13269         (find_one_thread): Change argument type to ptid_t.  Adjust to
13270         per-process data.
13271         (maybe_attach_thread): Adjust to per-process data and ptids.
13272         (thread_db_find_new_threads): Ditto.
13273         (thread_db_init): Ditto.
13274         * spu-low.c (spu_create_inferior, spu_attach): Add process to
13275         processes table.  Adjust to use ptids.
13276         (spu_kill, spu_detach): Adjust interface.  Remove process from
13277         processes table.
13278         (spu_join, spu_thread_alive): Adjust interface.
13279         (spu_wait): Adjust interface.  Remove process from processes
13280         table.  Adjust to use ptids.
13281         * win32-low.c (current_inferior_tid): Delete.
13282         (current_inferior_ptid): New.
13283         (debug_event_ptid): New.
13284         (thread_rec): Take a ptid.  Adjust.
13285         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
13286         (child_delete_thread): Ditto.
13287         (do_initial_child_stuff): Add `attached' argument.  Add process to
13288         processes table.
13289         (child_fetch_inferior_registers, child_store_inferior_registers):
13290         Adjust.
13291         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13292         (win32_attach): Pass 1 to do_initial_child_stuff.
13293         (win32_kill): Adjust interface.  Remove process from processes
13294         table.
13295         (win32_detach): Ditto.
13296         (win32_join): Adjust interface.
13297         (win32_thread_alive): Take a ptid.
13298         (win32_resume): Adjust to use ptids.
13299         (get_child_debug_event): Ditto.
13300         (win32_wait): Adjust interface.  Remove exiting process from
13301         processes table.
13302
13303 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13304
13305         Non-stop mode support.
13306
13307         * server.h (non_stop): Declare.
13308         (gdb_client_data, handler_func): Declare.
13309         (delete_file_handler, add_file_handler, start_event_loop):
13310         Declare.
13311         (handle_serial_event, handle_target_event, push_event)
13312         (putpkt_notif): Declare.
13313         * target.h (enum resume_kind): New.
13314         (struct thread_resume): Replace `step' field by `kind' field.
13315         (TARGET_WNOHANG): Define.
13316         (struct target_ops) <wait>: Add `options' argument.
13317         <supports_non_stop, async, start_non_stop>: New fields.
13318         (target_supports_non_stop, target_async): New.
13319         (start_non_stop): Declare.
13320         (mywait): Add `options' argument.
13321         * target.c (mywait): Add `options' argument.  Print child exit
13322         notifications here.
13323         (start_non_stop): New.
13324         * server.c (non_stop, own_buf, mem_buf): New globals.
13325         (struct vstop_notif): New.
13326         (notif_queue): New global.
13327         (queue_stop_reply, push_event, discard_queued_stop_replies)
13328         (send_next_stop_reply): New.
13329         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
13330         interface changes.
13331         (attach_inferior): In non-stop mode, don't wait for the target
13332         here.
13333         (handle_general_set): Handle QNonStop.
13334         (handle_query): When handling qC, return the current general
13335         thread, instead of the first thread of the list.
13336         (handle_query): If the backend supports non-stop mode, include
13337         QNonStop+ in the qSupported query response.
13338         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
13339         and non-stop mode.
13340         (handle_v_attach, handle_v_run): Handle non-stop mode.
13341         (handle_v_stopped): New.
13342         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
13343         (myresume): Adjust to use resume_kind.  Handle non-stop.
13344         (queue_stop_reply_callback): New.
13345         (handle_status): Handle non-stop mode.
13346         (main): Clear non_stop flag on reconnection.  Use the event-loop.
13347         Refactor serial protocol handling from here ...
13348         (process_serial_event): ... to this new function.  When GDB
13349         selects any thread, select one here.  In non-stop mode, wait until
13350         GDB acks all pending events before exiting.
13351         (handle_serial_event, handle_target_event): New.
13352         * remote-utils.c (remote_open): Install remote_desc in the event
13353         loop.
13354         (remote_close): Remove remote_desc from the event loop.
13355         (putpkt_binary): Rename to...
13356         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
13357         (putpkt_binary): New as wrapper around putpkt_binary_1.
13358         (putpkt_notif): New.
13359         (prepare_resume_reply): In non-stop mode, don't change the
13360         general_thread.
13361         * event-loop.c: New.
13362         * Makefile.in (OBJ): Add event-loop.o.
13363         (event-loop.o): New rule.
13364
13365         * linux-low.h (pid_of): Moved here.
13366         (lwpid_of): New.
13367         (get_lwp_thread): Use lwpid_of.
13368         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
13369         * linux-low.c (pid_of): Delete.
13370         (inferior_pid): Use lwpid_of.
13371         (linux_event_pipe): New.
13372         (target_is_async_p): New.
13373         (delete_lwp): New.
13374         (handle_extended_wait): Use lwpid_of.
13375         (add_lwp): Don't set lwpid field.
13376         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
13377         (linux_kill_one_lwp): If killing a running lwp, stop it first.
13378         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
13379         (linux_detach_one_lwp): If detaching from a running lwp, stop it
13380         first.  Adjust to linux_wait_for_event interface changes.  Use
13381         lwpid_of.
13382         (linux_detach): Don't delete the main lwp here.
13383         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
13384         (status_pending_p): Don't consider explicitly suspended lwps.
13385         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13386         pointer.  Add OPTIONS argument.  Change return type to int.  Use
13387         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
13388         (linux_wait_for_event): Take an integer pid instead of a lwp_info
13389         pointer.  Add status pointer argument.  Return a pid instead of a
13390         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
13391         changes.  In non-stop mode, don't switch to a random thread.
13392         (linux_wait): Rename to...
13393         (linux_wait_1): ... this.  Add target_options argument, and handle
13394         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
13395         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
13396         clean exit and signal exit code.  Don't stop all threads in
13397         non-stop mode.  In all-stop mode, only stop all threads when
13398         reporting a stop to GDB.  Handle explicit thread stop requests.
13399         (async_file_flush, async_file_mark): New.
13400         (linux_wait): New.
13401         (send_sigstop): Use lwpid_of.
13402         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
13403         interface changes.  In non-stop mode, don't switch to a random
13404         thread.
13405         (linux_resume_one_lwp): Use lwpid_of.
13406         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13407         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
13408         non-stop mode, don't look for pending flag in all threads.
13409         (resume_status_pending_p): Don't consider explicitly suspended
13410         threads.
13411         (my_waitpid): Reimplement.  Emulate __WALL.
13412         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13413         Use lwpid_of.
13414         (sigchld_handler, linux_supports_non_stop, linux_async)
13415         (linux_start_non_stop): New.
13416         (linux_target_ops): Register linux_supports_non_stop, linux_async
13417         and linux_start_non_stop.
13418         (initialize_low): Install SIGCHLD handler.
13419         * thread-db.c (thread_db_create_event, find_one_thread)
13420         (thread_db_get_tls_address): Use lwpid_of.
13421         * win32-low.c (win32_detach): Adjust to use resume_kind.
13422         (win32_wait): Add `options' argument.
13423         * spu-low.c (spu_resume): Adjust to use resume_kind.
13424         (spu_wait): Add `options' argument.
13425
13426 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13427
13428         Decouple target code from remote protocol.
13429
13430         * target.h (enum target_waitkind): New.
13431         (struct target_waitstatus): New.
13432         (struct target_ops) <wait>: Return an unsigned long.  Take a
13433         target_waitstatus pointer instead of a char pointer.
13434         (mywait): Likewise.
13435         * target.c (mywait): Change prototype to return an unsigned long.
13436         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
13437         * server.h (thread_from_wait, old_thread_from_wait): Delete
13438         declarations.
13439         (prepare_resume_reply): Change prototype to take a
13440         target_waitstatus.
13441         * server.c (thread_from_wait, old_thread_from_wait): Delete.
13442         (last_status, last_ptid): New.
13443         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
13444         pid instead of a signal.
13445         (attach_inferior): Remove "status" and "signal" parameters.
13446         Adjust.
13447         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13448         not as an address.
13449         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13450         (handle_v_requests, myresume): Remove "status" and "signal"
13451         parameters.  Adjust.
13452         (handle_status): New.
13453         (main): Delete local `status'.  Adjust.
13454         * remote-utils.c: Include target.h.
13455         (prepare_resume_reply): Change prototype to take a
13456         target_waitstatus.  Adjust.
13457
13458         * linux-low.c (linux_wait): Adjust to new target_ops->wait
13459         interface.
13460         * spu-low.c (spu_wait): Adjust.
13461         * win32-low.c (enum target_waitkind, struct target_waitstatus):
13462         Delete.
13463         (win32_wait): Adjust.
13464
13465 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13466
13467         * target.h (struct thread_resume): Delete leave_stopped member.
13468         (struct target_ops): Add a `n' argument to the `resume' callback.
13469         * server.c (start_inferior): Adjust.
13470         (handle_v_cont, myresume): Adjust.
13471         * linux-low.c (check_removed_breakpoint): Adjust to resume
13472         interface change, and to removed leave_stopped field.
13473         (resume_ptr): Delete.
13474         (struct thread_resume_array): New.
13475         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
13476         resume interface change.
13477         (linux_continue_one_thread, linux_queue_one_thread)
13478         (resume_status_pending_p): Check if the resume field is NULL
13479         instead of checking the leave_stopped member.
13480         (linux_resume): Adjust to the target resume interface change.
13481         * spu-low.c (spu_resume): Adjust to the target resume interface
13482         change.
13483         * win32-low.c (win32_detach, win32_resume): Ditto.
13484
13485 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13486
13487         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13488         flag.
13489         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13490         pending.
13491         (linux_continue_one_thread): Only preserve the stepping flag if
13492         there's a pending breakpoint.
13493
13494 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
13495
13496         * server.c (main): After the inferior having exited, call
13497         remote_close before exiting gdbserver.
13498
13499 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
13500
13501         Fix size of FPSCR in Power 7 processors.
13502         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13503         (PPC_FEATURE_HAS_DFP): New #define.
13504         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13505         size of the FPSCR.
13506
13507 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
13508
13509         * server.c (handle_query) Whitespace and formatting.
13510
13511 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
13512
13513         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13514         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13515         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13516         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13517         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13518         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13519         Makefile.in, configure.ac: Fix whitespace throughout.
13520         * configure: Regenerate.
13521
13522 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
13523
13524         * inferiors.c (find_inferior): Make it safe for the callback
13525         function to delete the currently iterated inferior.
13526
13527 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
13528
13529         * Makefile.in (linuw_low_h): Move higher.
13530         (thread-db.o): Depend on $(linux_low_h).
13531
13532 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
13533
13534         Rename "process" to "lwp" throughout.
13535
13536         * linux-low.c (all_processes): Rename to...
13537         (all_lwps): ... this.
13538         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13539         (add_process): Rename to ...
13540         (add_lwp): ... this.  Adjust.
13541         (linux_create_inferior): Adjust.
13542         (linux_attach_lwp): Adjust.
13543         (linux_attach): Adjust.
13544         (linux_kill_one_process): Rename to ...
13545         (linux_kill_one_lwp): ... this.  Adjust.
13546         (linux_kill): Adjust.
13547         (linux_detach_one_process): Rename to ...
13548         (linux_detach_one_lwp): ... this.  Adjust.
13549         (linux_detach): Adjust.
13550         (check_removed_breakpoint): Adjust.
13551         (status_pending_p): Adjust.
13552         (linux_wait_for_process): Rename to ...
13553         (linux_wait_for_lwp): ... this.  Adjust.
13554         (linux_wait_for_event): Adjust.
13555         (send_sigstop): Adjust.
13556         (wait_for_sigstop): Adjust.
13557         (stop_all_processes): Rename to ...
13558         (stop_all_lwps): ... this.
13559         (linux_resume_one_process): Rename to ...
13560         (linux_resume_one_lwp): ... this.  Adjust.
13561         (linux_set_resume_request, linux_continue_one_thread)
13562         (linux_queue_one_thread, resume_status_pending_p)
13563         (usr_store_inferior_registers, regsets_store_inferior_registers)
13564         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13565         Adjust.
13566         * linux-low.h (get_process): Rename to ...
13567         (get_lwp): ... this.  Adjust.
13568         (get_thread_process): Rename to ...
13569         (get_thread_lwp): ... this.  Adjust.
13570         (get_process_thread): Rename to ...
13571         (get_lwp_thread): ... this.  Adjust.
13572         (struct process_info): Rename to ...
13573         (struct lwp_info): ... this.
13574         (all_processes): Rename to ...
13575         (all_lwps): ... this.
13576         * proc-service.c (ps_lgetregs): Adjust.
13577         * thread-db.c (thread_db_create_event, find_one_thread)
13578         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13579
13580 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
13581
13582         * server.c (handle_query): Handle "qAttached".
13583
13584 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
13585
13586         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13587         GPLv3, update license URL.
13588
13589 2009-03-01  Doug Evans  <dje@google.com>
13590
13591         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13592         (server_h): Add gdb_signals.h.
13593         (signals.o): Update.
13594         * server.h (target_signal_from_host,target_signal_to_host_p)
13595         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13596
13597 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
13598
13599         * remote-utils.c (getpkt): Also generate remote-debug
13600         information if noack_mode is set.
13601
13602 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
13603
13604         * server.c (handle_query): Report qXfer:siginfo:read and
13605         qXfer:siginfo:write as supported and handle them.
13606         * target.h (struct target_ops) <qxfer_siginfo>: New field.
13607         * linux-low.c (linux_xfer_siginfo): New.
13608         (linux_target_ops): Set it.
13609
13610 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
13611
13612         * server.c (gdbserver_usage): Mention --remote-debug.
13613         (main): Accept '--remote-debug' switch.
13614
13615 2009-01-18  Doug Evans  <dje@google.com>
13616
13617         * regcache.c (new_register_cache): No need to check result of xcalloc.
13618         * server.c (handle_search_memory): Back out calls to xmalloc,
13619         result is checked and error is returned to user upon failure.
13620         (handle_query): Ditto.  Add more checks for result of malloc.
13621         (handle_v_cont): Check result of malloc, report error back to
13622         user upon failure.
13623         (handle_v_run): Ditto.  Call freeargv.
13624         * server.h (freeargv): Declare.
13625         * utils.c (freeargv): New fn.
13626
13627 2009-01-15  Doug Evans  <dje@google.com>
13628
13629         * gdbreplay.c (perror_with_name): Make arg const char *.
13630         * server.h (target_signal_to_name): Make return type const char *.
13631         * thread-db.c (thread_db_err_str): Make return type const char *.
13632         * utils.c (perror_with_name): Make arg const char *.
13633
13634 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
13635
13636         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13637         when handling a EXIT_PROCESS_DEBUG_EVENT.
13638
13639 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
13640
13641         * gdbreplay.c (gdbreplay_version): Update copyright year.
13642         * server.c (gdbserver_version): Likewise.
13643
13644 2009-01-05  Doug Evans  <dje@google.com>
13645
13646         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13647         (handle_extended_wait): Improve comment.
13648
13649 2008-12-13  Doug Evans  <dje@google.com>
13650
13651         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13652         * server.h (ATTR_MALLOC): New macro.
13653         (xmalloc,xcalloc,xstrdup): Declare.
13654         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13655         * inferiors.c: Ditto.
13656         * linux-low.c: Ditto.
13657         * mem-break.c: Ditto.
13658         * regcache.c: Ditto.
13659         * remote-utils.c: Ditto.
13660         * server.c: Ditto.
13661         * target.c: Ditto.
13662         * win32-low.c: Ditto.
13663
13664 2008-12-12  Doug Evans  <dje@google.com>
13665
13666         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13667         in debugging printf.
13668
13669         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13670
13671 2008-12-09  Doug Evans  <dje@google.com>
13672
13673         * linux-low.h (struct process_info): Delete member tid, unused.
13674         * thread-db.c (find_one_thread): Update.
13675         (maybe_attach_thread): Update.
13676
13677 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
13678
13679         * target.h (struct target_ops): Add qxfer_osdata member.
13680         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13681         and dirent.h.
13682         (linux_qxfer_osdata): New functions.
13683         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13684         callback.
13685         * server.c (handle_query): Handle "qXfer:osdata:read:".
13686         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13687         (buffer_xml_printf): New functions.
13688         * server.h (struct buffer): New.
13689         (buffer_grow_str, buffer_grow_str0): New macros.
13690         (buffer_grow, buffer_free, buffer_init, buffer_finish)
13691         (buffer_xml_printf): Declare.
13692
13693 2008-11-24  Doug Evans  <dje@google.com>
13694
13695         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13696
13697 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
13698
13699         * server.c (handle_v_run): Always use the supplied argument list.
13700
13701 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
13702
13703         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13704         (xtensa_regmap_table): Add entry for scompare1.
13705
13706 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
13707
13708         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13709         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13710         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13711         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13712         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13713         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13714         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13715         XML target descriptions.
13716         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13717         when inferior is running on an ISA 2.05 or later processor.  Add
13718         special case to return offset for full 64-bit slot of FPSCR when
13719         in 32-bits.
13720
13721 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
13722
13723         * Makefile.in (SFILES, clean): Added sparc64 files.
13724         (reg-sparc64.o, reg-sparc64.c): New.
13725         * configure.srv (sparc*-*-linux*): New configuration.
13726         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13727         syscall arguments for SPARC.
13728         (regsets_store_inferior_registers): Likewise.
13729         * linux-sparc-low.c: New file.
13730
13731 2008-10-21  Doug Evans  <dje@google.com>
13732
13733         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13734         (READLINE_DIR,READLINE_DEP): Delete.
13735         (INTERNAL_CFLAGS): Update.
13736         (LINTFLAGS): Update.
13737
13738 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
13739
13740         * server.c (handle_v_run): If GDB didn't specify an argv, use the
13741         whole argv from the last run, not just argv[0].
13742
13743 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
13744
13745         * regcache.c (new_register_cache): Return NULL if the register
13746         cache size isn't known yet.
13747         (free_register_cache): Avoid dereferencing a NULL regcache.
13748
13749 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
13750
13751         * configure.srv: Merge MIPS and MIPS64.
13752
13753 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
13754
13755         * Makefile.in (uninstall): Apply $(EXEEXT) too.
13756
13757 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
13758
13759         * Makefile.in: Add required vsx dependencies.
13760
13761         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13762         Declare init_registers_powerpc_vsx32l.
13763         Declare init_registers_powerpc_vsx64l.
13764         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13765         (ppc_arch_setup): Check for VSX in hwcap.
13766         (ppc_fill_vsxregset): New function.
13767         (ppc_store_vsxregset): New function.
13768         Add new VSX entry in regset_info target_regsets.
13769
13770         * configure.srv: Add new VSX dependencies.
13771
13772 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
13773
13774         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13775         (remote_open): Set or clear transport_is_reliable.
13776         (putpkt_binary): Don't expect acks in noack mode.
13777         (getpkt): Don't send ack/nac in noack mode.
13778         * server.c (handle_general_set): Handle QStartNoAckMode.
13779         (handle_query): If connected by tcp pass QStartNoAckMode+ in
13780         qSupported.
13781         (main): Reset noack_mode on every connection.
13782         * server.h (noack_mode): Declare.
13783
13784 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13785
13786         * Makefile.in (GDBREPLAY_OBS): New variable.
13787         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13788
13789 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
13790             Daniel Jacobowitz  <dan@codesourcery.com>
13791
13792         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13793         (usr_store_inferior_registers): Likewise.
13794         (regsets_store_inferior_registers): Likewise.
13795
13796 2008-07-31  Rolf Jansen  <rj@surtec.com>
13797             Pedro Alves  <pedro@codesourcery.com>
13798
13799         * configure.ac: Check for memmem declaration.
13800         * server.c [HAVE_MALLOC_H]: Include malloc.h.
13801         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13802         (disable_packet_qfThreadInfo): Unconditionally compile.
13803         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13804         * configure, config.in: Regenerate.
13805
13806 2008-07-28  Doug Kwan  <dougkwan@google.com>
13807
13808         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13809         (linux_write_memory): Remove declaration of errno.
13810
13811 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
13812
13813         * linux-low.c (handle_extended_wait): Do not use "status"
13814         variable uninitialized.
13815
13816 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
13817
13818         * server.c (handle_v_attach): Inhibit reporting dll changes.
13819
13820 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
13821
13822         * remote-utils.c (prepare_resume_reply): If requested, don't
13823         output "thread:TID" in the T stop reply.
13824
13825         * server.c (disable_packet_vCont, disable_packet_Tthread)
13826         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13827         (handle_query): If requested, disable support for qC, qfThreadInfo
13828         and qsThreadInfo.
13829         (handle_v_requests): If requested, disable support for vCont.
13830         (gdbserver_show_disableable): New.
13831         (main): Handle --disable-packet and --disable-packet=LIST.
13832
13833         * server.h (disable_packet_vCont, disable_packet_Tthread)
13834         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13835
13836 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
13837
13838         * server.c (gdbserver_usage): Mention --version.
13839
13840 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
13841
13842         * Makefile.in (gdbreplay.o): New rule.
13843
13844 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
13845
13846         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13847         message, not gdbserver.
13848
13849 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
13850             Nathan Sidwell  <nathan@codesourcery.com>
13851             Joseph Myers  <joseph@codesourcery.com>
13852
13853         * acinclude.m4: Include ../../config/acx.m4.
13854         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13855         * configure, config.in: Regenerate.
13856         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13857         * server.c (gdbserver_version): Print PKGVERSION.
13858         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
13859         (main): Adjust gdbserver_usage calls.
13860         * gdbreplay.c (version, host_name): Add declarations.
13861         (gdbreplay_version, gdbreplay_usage): New.
13862         (main): Accept --version and --help options.
13863
13864 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
13865
13866         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13867         (arm_breakpoint_at): Handle Thumb.
13868         (the_low_target): Add comment.
13869
13870 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
13871
13872         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13873
13874 2008-05-09  Doug Evans  <dje@google.com>
13875
13876         * server.h (decode_search_memory_packet): Declare.
13877         * remote-utils.c (decode_search_memory_packet): New fn.
13878         * server.c (handle_search_memory_1): New fn.
13879         (handle_search_memory): New fn.
13880         (handle_query): Process qSearch:memory packets.
13881
13882 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
13883
13884         * regcache.c (registers_length): Remove.
13885         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13886         full register packet.
13887         * regcache.h (registers_length): Remove prototype.
13888         * server.h (PBUFSIZ): Define to 16384.
13889
13890 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
13891
13892         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13893         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13894         powerpc-64l.o, and powerpc-altivec64l.o.
13895         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13896         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13897         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13898         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13899         rs6000/power-linux.xml, and rs6000/power64-linux.xml
13900         to srv_xmlfiles.
13901
13902         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13903         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13904         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13905         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13906         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13907         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13908         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13909         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13910         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13911         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13912         (clean): Update.
13913
13914         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13915         (init_registers_powerpc_32l): ... this new prototype.
13916         (init_registers_powerpc_32): Remove, replace by ...
13917         (init_registers_powerpc_altivec32l): ... this new prototype.
13918         (init_registers_powerpc_e500): Remove, replace by ...
13919         (init_registers_powerpc_e500l): ... this new prototype.
13920         (init_registers_ppc64): Remove, replace by ...
13921         (init_registers_powerpc_64l): ... this new prototype.
13922         (init_registers_powerpc_64): Remove, replace by ...
13923         (init_registers_powerpc_altivec64l): ... this new prototype.
13924         (ppc_num_regs): Set to 73.
13925         (PT_ORIG_R3, PT_TRAP): Define if necessary.
13926         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13927         (ppc_cannot_store_register): Handle orig_r3 and trap.
13928         (ppc_arch_setup): Update init_registers_... calls.
13929         (ppc_fill_gregset): Handle orig_r3 and trap.
13930
13931         * inferiors.c (clear_inferiors): Reset current_inferior.
13932
13933 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
13934
13935         * acinclude.m4: Add override.m4.
13936         * configure: Regenerate.
13937
13938 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
13939
13940         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13941         initial call to init_register_ppc64.
13942
13943 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
13944
13945         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13946         single powerpc*-*-linux* case.
13947         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13948
13949 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
13950
13951         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13952         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13953         from reg_xmlfiles.
13954         * linux-ppc-low.c: Include <elf.h>.
13955         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13956         (ppc_hwcap): New global variable.
13957         (ppc_regmap): Remove __SPE__ #ifdef sections.
13958         (ppc_regmap_e500): New global variable.
13959         (ppc_cannot_store_register): Update __SPE__ special case.
13960         (ppc_get_hwcap): New function.
13961         (ppc_arch_setup): Use it to determine whether inferior supports
13962         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
13963         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13964         Do not access registers if target does not support AltiVec.
13965         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13966         Do not access registers if target does not support SPE.
13967         (target_regsets): Unconditionally include AltiVec and SPE regsets.
13968
13969 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
13970
13971         * linux-low.c (disabled_regsets, num_regsets): New.
13972         (use_regsets_p): Delete.
13973         (linux_wait_for_process): Clear disabled_regsets.
13974         (regsets_fetch_inferior_registers): Check and set it.
13975         (regsets_store_inferior_registers): Likewise.
13976         (linux_fetch_registers, linux_store_registers): Do not use
13977         use_regsets_p.
13978         (initialize_low): Allocate disabled_regsets.
13979
13980 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
13981
13982         * Makefile.in (LIBOBJS): New.
13983         (OBS): Use LIBOBJS.
13984         (memmem.o): New rule.
13985         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13986         * configure: Regenerated.
13987
13988 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
13989
13990         * server.c (handle_query): Never return "unsupported" for
13991         qXfer:features:read queries.
13992
13993 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
13994
13995         * server.c (get_features_xml): Fix inverted condition.
13996         (handle_query): Always support qXfer:feature:read.
13997
13998 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
13999
14000         * server.c (wrapper_argv): New.
14001         (start_inferior): Handle wrapper_argv.  If set, expect an extra
14002         trap.
14003         (gdbserver_usage): Document --wrapper.
14004         (main): Parse --wrapper.
14005
14006 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14007
14008         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14009         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14010         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14011         (ppc_set_pc): Likewise.
14012         (ppc_arch_setup): New function.
14013         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14014         of collect_register.
14015         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14016
14017 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14018
14019         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14020         instead of linux-ppc64-low.o.
14021         * linux-ppc64-low.c: Remove file.
14022         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14023         (linux-ppc64-low.o): Remove rule.
14024
14025         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14026         (init_registers_powerpc_64): Likewise.
14027         (ppc_regmap): Conditionally define depending on __powerpc64__.
14028         (ppc_cannot_store_register): Do not special-case "fpscr" when
14029         compiled on __powerpc64__.
14030         (ppc_collect_ptrace_register): New function.
14031         (ppc_supply_ptrace_register): New function.
14032         (ppc_breakpoint): Change type to "unsigned int".
14033         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14034         (the_low_target): Conditionally provide initializers for the
14035         arch_setup member depending on __powerpc64__.  Install
14036         collect_ptrace_register and supply_ptrace_register members.
14037
14038 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14039
14040         * regcache.h (gdbserver_xmltarget): Add extern declaration.
14041         * server.c (gdbserver_xmltarget): Define.
14042         (get_features_xml): Use it to replace "target.xml" and arch_string.
14043
14044         * configure.srv: Remove srv_xmltarget.  Add XML files that were
14045         mentioned there to srv_xmlfiles instead.  Remove conditional tests
14046         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14047         srv_xmlfiles and srv_regobj to include all possible choices.
14048         * configure.ac (srv_xmltarget): Remove.
14049         (srv_xmlfiles): Do not add "target.xml".
14050         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14051         checks for supplementary target information.
14052         * configure: Regenerate.
14053         * Makefile.in (XML_TARGET): Remove.
14054         (target.xml): Remove rule.
14055         (clean): Do not clean up target.xml.
14056         (.PRECIOUS): Do not mention target.xml.
14057
14058         * target.h (struct target_ops): Remove arch_string member.
14059         * linux-low.c (linux_arch_string): Remove.
14060         (linux_target_ops): Remove arch_string initializer.
14061         * linux-low.h (struct linux_target_ops): Remove arch_string member.
14062         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14063         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14064         * spu-low.c (spu_arch_string): Remove.
14065         (spu_target_ops): Remove arch_string initializer.
14066         * win32-low.c (win32_arch_string): Remove.
14067         (win32_target_ops): Remove arch_string initializer.
14068         * win32-low.h (struct win32_target_ops): Remove arch_string member.
14069         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14070         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14071
14072 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14073
14074         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14075         by collect_ptrace_register and supply_ptrace_register hooks.
14076         * linux-low.c (fetch_register): Use supply_ptrace_register callback
14077         instead of checking for the_low_target.left_pad_xfer.
14078         (usr_store_inferior_registers): Use collect_ptrace_register callback
14079         instead of checking for the_low_target.left_pad_xfer.
14080
14081         * linux-s390-low.c (s390_collect_ptrace_register): New function.
14082         (s390_supply_ptrace_register): Likewise.
14083         (s390_fill_gregset): Call s390_collect_ptrace_register.
14084         (the_low_target): Update.
14085
14086         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14087         (ppc_supply_ptrace_register): Likewise.
14088         (the_low_target): Update.
14089
14090         * linux-i386-low.c (the_low_target): Update.
14091         * linux-x86-64-low.c (the_low_target): Update.
14092
14093 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14094
14095         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14096         reg-s390.o and reg-s390x.o.
14097
14098         * linux-low.c (new_inferior): New global variable.
14099         (linux_create_inferior, linux_attach): Set it.
14100         (linux_wait_for_process): Call the_low_target.arch_setup after the
14101         target has stopped for the first time.
14102         (initialize_low): Do not call the_low_target.arch_setup.
14103
14104         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14105         (s390_set_pc): Likewise.
14106         (s390_arch_setup): New function.
14107         (the_low_target): Use s390_arch_setup as arch_setup routine.
14108
14109         * regcache.c (realloc_register_cache): New function.
14110         (set_register_cache): Call it for each existing regcache.
14111
14112 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14113
14114         * server.h (init_registers): Remove prototype.
14115
14116         * linux-low.h (struct linux_target_ops): Add arch_setup field.
14117         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14118         instead of init_registers ().
14119         * linux-arm-low.c (init_registers_arm): Add prototype.
14120         (init_registers_arm_with_iwmmxt): Likewise.
14121         (the_low_target): Add initializer for arch_setup field.
14122         * linux-cris-low.c (init_registers_cris): Add prototype.
14123         (the_low_target): Add initializer for arch_setup field.
14124         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14125         (the_low_target): Add initializer for arch_setup field.
14126         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14127         (the_low_target): Add initializer for arch_setup field.
14128         * linux-ia64-low.c (init_registers_ia64): Add prototype.
14129         (the_low_target): Add initializer for arch_setup field.
14130         * linux-m32r-low.c (init_registers_m32r): Add prototype.
14131         (the_low_target): Add initializer for arch_setup field.
14132         * linux-m68k-low.c (init_registers_m68k): Add prototype.
14133         (the_low_target): Add initializer for arch_setup field.
14134         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14135         (init_registers_mips64_linux): Likewise.
14136         (the_low_target): Add initializer for arch_setup field.
14137         * linux-ppc-low.c (init_registers_ppc): Add prototype.
14138         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14139         (the_low_target): Add initializer for arch_setup field.
14140         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14141         (init_registers_powerpc_64): Likewise.
14142         (the_low_target): Add initializer for arch_setup field.
14143         * linux-s390-low.c (init_registers_s390): Add prototype.
14144         (init_registers_s390x): Likewise.
14145         (the_low_target): Add initializer for arch_setup field.
14146         * linux-sh-low.c (init_registers_sh): Add prototype.
14147         (the_low_target): Add initializer for arch_setup field.
14148         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14149         (the_low_target): Add initializer for arch_setup field.
14150         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14151         (the_low_target): Add initializer for arch_setup field.
14152
14153         * win32-low.h (struct win32_target_ops): Add arch_setup field.
14154         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14155         instead of init_registers ().
14156         * win32-arm-low.c (init_registers_arm): Add prototype.
14157         (the_low_target): Add initializer for arch_setup field.
14158         * win32-i386-low.c (init_registers_i386): Add prototype.
14159         (the_low_target): Add initializer for arch_setup field.
14160
14161         * spu-low.c (init_registers_spu): Add prototype.
14162         (initialize_low): Call initialie_registers_spu () instead of
14163         initialize_registers ().
14164
14165 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
14166
14167         * server.c (handle_v_requests): When handling the vRun and vAttach
14168         packets, if already debugging a process, don't kill it.  Return an
14169         error instead.
14170
14171 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
14172
14173         * server.c (handle_query): Correct length check.
14174
14175 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
14176
14177         * win32-low.c (do_initial_child_stuff): Add process handle
14178         parameter.  Set current_process_handle and current_process_id from the
14179         parameters. Clear globals.
14180         (win32_create_inferior): Don't set current_process_handle and
14181         current_process_id here.  Instead pass them on the call to
14182         do_initial_child_stuff.
14183         (win32_attach): Likewise.
14184         (win32_clear_inferiors): New.
14185         (win32_kill): Don't close the current process handle or the
14186         current thread handle here.  Instead call win32_clear_inferiors.
14187         (win32_detach): Don't open a new handle to the process.  Call
14188         win32_clear_inferiors.
14189         (win32_join): Don't rely on current_process_handle; open a new
14190         handle using the process id.
14191         (win32_wait): Call win32_clear_inferiors when the inferior process
14192         has exited.
14193
14194 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
14195
14196         * server.c (monitor_show_help): Add "exit".
14197
14198 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
14199
14200         * Makefile.in (SFILES): Add linux-xtensa-low.c.
14201         (clean): Add reg-xtensa.c.
14202         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14203         * configure.srv (xtensa*-*-linux*) New target.
14204         * linux-xtensa-low.c: New.
14205         * xtensa-xtregs.c: New.
14206
14207 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
14208
14209         * hostio.c: Don't include errno.h.
14210         (errno_to_fileio_errno): Move to hostio-errno.
14211         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
14212         error number outputting to the target->hostio_last_error callback.
14213         (hostio_packet_error): Use FILEIO_EINVAL directly.
14214         (handle_open, handle_pread, hostio_error, handle_unlink): Update
14215         calls to hostio_error.
14216         * hostio-errno.c: New.
14217         * server.h (hostio_last_error_from_errno): Declare.
14218         * target.h (target_ops): Add hostio_last_error member.
14219         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14220         as hostio_last_error handler.
14221         * spu-low.c (spu_target_ops): Likewise.
14222         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14223         (wince_hostio_last_error): New functions.
14224         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14225         as hostio_last_error handler.
14226         (win32_target_ops) [!_WIN32_WCE]: Register
14227         hostio_last_error_from_errno as hostio_last_error handler.
14228         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14229         (hostio-errno.o): New rule.
14230         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14231         * configure.srv (srv_hostio_err_objs): New variable.  Default to
14232         hostio-errno.o.
14233         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14234         * configure: Regenerate.
14235
14236 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
14237
14238         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14239         (linux_kill, linux_detach): Clean up the process list.
14240         * remote-utils.c (remote_open): Improve port number parsing.
14241         (putpkt_binary, input_interrupt): Only send interrupts if the target
14242         is running.
14243         * server.c (extended_protocol): Make static.
14244         (attached): Define earlier.
14245         (exit_requested, response_needed, program_argv): New variables.
14246         (target_running): New.
14247         (start_inferior): Clear attached here.
14248         (attach_inferior): Set attached here.
14249         (require_running): Define.
14250         (handle_query): Use require_running and target_running.  Implement
14251         "monitor exit".
14252         (handle_v_attach, handle_v_run): New.
14253         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
14254         (gdbserver_usage): Update.
14255         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
14256         --attach along with other options or after the port.  Save
14257         program_argv.  Support no initial program.  Resynchronize
14258         communication with GDB after an error.  Handle "monitor exit".
14259         Use require_running and target_running.  Always allow the extended
14260         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
14261         restart in extended mode.
14262         * README: Refer to the GDB manual.  Update --attach usage.
14263
14264 2007-12-20  Andreas Schwab  <schwab@suse.de>
14265
14266         * linux-low.c (STACK_SIZE): Define.
14267         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
14268         (linux_test_for_tracefork): Likewise.
14269
14270 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
14271
14272         * linux-low.c (linux_wait_for_event): Update messages.  Do not
14273         reinsert auto-delete breakpoints.
14274         * mem-break.c (struct breakpoint): Change return type of handler to
14275         int.
14276         (set_breakpoint_at): Update handler type.
14277         (reinsert_breakpoint_handler): Return 1 instead of calling
14278         delete_breakpoint.
14279         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14280         setting a new one.
14281         (check_breakpoints): Delete auto-delete breakpoints and return 2.
14282         * mem-break.h (set_breakpoint_at): Update handler type.
14283         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14284         * win32-low.c (auto_delete_breakpoint): New.
14285         (get_child_debug_event): Use it.
14286
14287 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
14288
14289         * configure.ac: Check for pread and pwrite.
14290         * hostio.c (handle_pread): Fall back to lseek and read.
14291         (handle_pwrite): Fall back to lseek and write.
14292         * config.in, configure: Regenerated.
14293
14294 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
14295
14296         * server.c (myresume): Add own_buf argument.
14297         (main): Update calls.
14298
14299 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
14300
14301         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14302         * remote-utils.c (remote_open): Do not call disable_async_io.
14303         (block_async_io): Delete.
14304         (unblock_async_io): Make static.
14305         (initialize_async_io): New.
14306         * server.c (handle_v_cont): Handle async I/O here.
14307         (myresume): Likewise.  Move other common resume tasks here...
14308         (main): ... from here.  Call initialize_async_io.  Disable async
14309         I/O before the main loop.
14310         * server.h (initialize_async_io): Declare.
14311         (block_async_io, unblock_async_io): Delete prototypes.
14312         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14313
14314 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
14315
14316         * remote-utils.c (readchar): Allow binary data in received messages.
14317
14318 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14319
14320         * win32-low.c (attaching): New global.
14321         (win32_create_inferior): Clear the `attaching' global.
14322         (win32_attach): Set the `attaching' global.
14323         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14324         attaching.  Only set a breakpoint at the entry point if not
14325         attaching.
14326
14327 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14328
14329         * server.c (main): Don't report dll events on the initial
14330         connection on attaches.
14331
14332 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14333
14334         * server.c (main): Relax numerical bases supported for the pid of
14335         the --attach command line argument.
14336
14337 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14338
14339         * win32-low.c (win32_attach): Call OpenProcess before
14340         DebugActiveProcess, not after.  Add last error output to error
14341         call.
14342
14343 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14344
14345         * win32-low.c (win32_get_thread_context)
14346         (win32_set_thread_context): New functions.
14347         (thread_rec): Use win32_get_thread_context.
14348         (continue_one_thread, win32_resume): Use win32_set_thread_context.
14349         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14350         field.
14351
14352 2007-12-03  Leo Zayas
14353             Pedro Alves  <pedro_alves@portugalmail.pt>
14354
14355         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14356         global variables.
14357         (child_add_thread): Minor cleanup.
14358         (child_continue): Resume artificially suspended threads before
14359         calling ContinueDebugEvent.
14360         (suspend_one_thread): New.
14361         (fake_breakpoint_event): New.
14362         (get_child_debug_event): Change return type to int.  Check here if
14363         gdb sent an interrupt request.  If a soft interrupt was requested,
14364         fake a breakpoint event.  Return 0 if there is no event to handle,
14365         and 1 otherwise.
14366         (win32_wait): Don't check here if gdb sent an interrupt request.
14367         Ensure there is a valid event to handle.
14368         (win32_request_interrupt): Add soft interruption method as last
14369         resort.
14370
14371 2007-12-03  Leo Zayas
14372             Pedro Alves  <pedro_alves@portugalmail.pt>
14373
14374         * win32-low.h (win32_thread_info): Add descriptions to the
14375         structure members.  Replace `suspend_count' counter by a
14376         `suspended' flag.
14377         * win32-low.c (thread_rec): Update condition of when to get the
14378         context from the inferior.  Rely on ContextFlags being set if it
14379         has already been retrieved.  Only suspend the inferior thread if
14380         we haven't already.  Warn if that fails.
14381         (continue_one_thread): s/suspend_count/suspended/.  Only call
14382         ResumeThread once.  Warn if that fails.
14383
14384 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
14385
14386         * win32-low.c (win32_wait): Don't read from the inferior when it
14387         has already exited.
14388
14389 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
14390
14391         * Makefile.in (win32_low_h): New variable.
14392         (win32-low.o): Add dependency on $(win32_low_h).
14393         (win32-arm-low.o, win32-i386-low.o): New rules.
14394
14395 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
14396
14397         * hostio.c: Correct copyright year.
14398
14399 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
14400
14401         * Makefile.in (OBS): Add hostio.o.
14402         (hostio.o): New rule.
14403         * server.h (handle_vFile): Declare.
14404         * hostio.c: New file.
14405         * server.c (handle_v_requests): Take packet_len and new_packet_len
14406         for binary packets.  Call handle_vFile.
14407         (main): Update call to handle_v_requests.
14408
14409 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
14410
14411         * linux-low.c: Include <sched.h>.
14412
14413 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
14414
14415         * linux-low.c (linux_tracefork_grandchild): New.
14416         (linux_tracefork_child): Use clone.
14417         (linux_test_for_tracefork): Use clone; allocate and free a stack.
14418
14419 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
14420
14421         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14422
14423 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
14424
14425         * linux-low.c (handle_extended_wait): Handle unexpected signals.
14426
14427 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
14428
14429         * inferiors.c (change_inferior_id): Delete.
14430         (add_pid_to_list, pull_pid_from_list): New.
14431         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14432         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14433         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14434         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14435         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14436         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14437         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14438         (using_threads): Always set to 1.
14439         (handle_extended_wait): New.
14440         (add_process): Do not set TID.
14441         (linux_create_inferior): Set must_set_ptrace_flags.
14442         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
14443         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
14444         (linux_thread_alive): Rename TID argument to LWPID.
14445         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
14446         (linux_wait_for_event): Do not use TID or check using_threads.  Update
14447         call to dead_thread_notify.  Call handle_extended_wait.
14448         (linux_create_inferior): Use PTRACE_SETOPTIONS.
14449         (send_sigstop): Delete sigstop_sent.
14450         (wait_for_sigstop): Avoid TID.
14451         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14452         (linux_test_for_tracefork): New.
14453         (linux_lookup_signals): Use thread_db_active and
14454         linux_supports_tracefork_flag.
14455         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14456         * linux-low.h (get_process_thread): Avoid TID.
14457         (struct process_ifo): Move thread_known and tid to the end.  Remove
14458         sigstop_sent.
14459         (linux_attach_lwp, thread_db_init): Update prototypes.
14460         * server.h (change_inferior_id): Delete prototype.
14461         (add_pid_to_list, pull_pid_from_list): New prototypes.
14462         * thread-db.c (thread_db_use_events): New.
14463         (find_first_thread): Rename to...
14464         (find_one_thread): ...this.  Update callers and messages.  Do not
14465         call fatal.  Check thread_db_use_events.  Do not call
14466         change_inferior_id or new_thread_notify.
14467         (maybe_attach_thread): Update.  Do not call new_thread_notify.
14468         (thread_db_init): Set thread_db_use_events.  Check use_events.
14469         * utils.c (fatal, warning): Correct message prefix.
14470
14471 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
14472
14473         * Makefile.in (clean): Remove new files.
14474         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14475         (powerpc-64.o, powerpc-64.c): New rules.
14476         * configure.srv: Use alternate register sets for powerpc64-*-linux*
14477         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14478         with SPE.
14479         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14480         SPE targets.
14481         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14482         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14483         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14484         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14485         (target_regsets): Add AltiVec and SPE register sets.
14486         * configure.ac: Check for AltiVec and SPE.
14487         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14488         (ppc_fill_vrregset, ppc_store_vrregset): New.
14489         (target_regsets): Add AltiVec register set.
14490         * configure: Regenerated.
14491
14492 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
14493
14494         * linux-low.c (O_LARGEFILE): Define.
14495         (linux_read_memory): Use /proc/PID/mem.
14496         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
14497         * configure, config.in: Regenerated.
14498
14499 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
14500
14501         * linux-low.c (linux_wait_for_event): Do not pass signals while
14502         single-stepping.
14503
14504 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14505
14506         * win32-low.c (create_process): New.
14507         (win32_create_inferior): Use create_process instead of
14508         CreateProcess.  If create_process failed retry appending an ".exe"
14509         suffix.  Store the GetLastError result immediatelly after
14510         create_process calls and use it on the call to error.
14511
14512 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14513
14514         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14515
14516 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
14517
14518         * configure.ac: Switch license to GPLv3.
14519
14520 2007-08-01  Michael Snyder  <msnyder@access-company.com>
14521
14522         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14523
14524 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
14525
14526         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14527         typedef.
14528         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14529         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
14530         CloseToolhelp32Snapshot.
14531         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14532         CloseToolhelp32Snapshot.
14533
14534 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
14535
14536         * server.c (main): Check for inferior exit before main loop.
14537
14538 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
14539
14540         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14541         instead of on tmp_desc.
14542
14543 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
14544             Daniel Jacobowitz  <dan@codesourcery.com>
14545
14546         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14547         (add_thread): Minor cleanups.
14548         (clear_inferiors): Move lower in the file.  Clear the DLL
14549         list.
14550         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14551         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14552         (xml_escape_text): New.
14553         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
14554         for qSupported.
14555         (handle_v_cont): Report errors.
14556         (gdbserver_version): Update.
14557         (main): Correct size of own_buf.  Do not report initial DLL events.
14558         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14559         (unloaded_dll, xml_escape_text): New.
14560         * win32-low.c (enum target_waitkind): Update comments.
14561         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14562         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14563         (win32_EnumProcessModules, win32_GetModuleInformation)
14564         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14565         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14566         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14567         (win32_Module32First, win32_Module32Next, load_toolhelp)
14568         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14569         (get_child_debug_event): Handle DLL events.
14570         (win32_wait): Likewise.
14571
14572 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
14573
14574         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14575         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14576
14577 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
14578
14579         * win32-low.c (handle_output_debug_string): Ignore event if not
14580         waiting.
14581
14582 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
14583
14584         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14585
14586 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
14587
14588         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14589
14590 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
14591
14592         * inferiors.c (change_inferior_id): Add comment.
14593         * linux-low.c (check_removed_breakpoint): Add an early
14594         prototype.  Improve debug output.
14595         (linux_attach): Doc update.
14596         (linux_detach_one_process, linux_detach): Clean up before releasing
14597         each process.
14598         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14599         * linux-low.h (struct process_info): Doc improvement.
14600         * mem-break.c (delete_all_breakpoints): New.
14601         * mem-break.h (delete_all_breakpoints): New prototype.
14602         * thread-db.c (find_first_thread): New.
14603         (thread_db_create_event): Call it instead of
14604         thread_db_find_new_threads.  Clean up unused variables.
14605         (maybe_attach_thread): Remove first thread handling.
14606         (thread_db_find_new_threads): Use find_first_thread.
14607         (thread_db_get_tls_address): Likewise.
14608
14609 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
14610
14611         * thread-db.c (thread_db_find_new_threads): Add prototype.
14612         (thread_db_create_event): Check for the main thread before adding
14613         a new thread.
14614         (maybe_attach_thread): Only enable event reporting if TID == 0.
14615         (thread_db_get_tls_address): Check for new threads.
14616
14617 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
14618
14619         * linux-low.c (linux_create_inferior): Try execv before execvp.
14620         * spu-low.c (spu_create_inferior): Likewise.
14621
14622 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
14623
14624         * linux-low.c (linux_create_inferior): Change execv to execvp.
14625         * spu-low.c (spu_create_inferior): Likewies.
14626
14627 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
14628
14629         * Makefile.in (clean): Clean new files instead of deleted ones.
14630         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14631         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14632         rules.
14633         * configure.srv: Specify XML files and new regformats for MIPS and
14634         MIPS64 GNU/Linux.
14635         * linux-mips-low.c (mips_num_regs): Set to only used registers.
14636         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
14637         an entry for the restart register.
14638         (mips_cannot_fetch_register, mips_cannot_store_register)
14639         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14640         register names to match the XML descriptions.
14641         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
14642         restart register instead of $0.
14643
14644 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
14645             Markus Deuling  <deuling@de.ibm.com>
14646
14647         * remote-utils.c (decode_xfer_write): New function.
14648         * server.h (decode_xfer_write): Add prototype.
14649         * server.c (handle_query): Add PACKET_LEN argument.  Support
14650         qXfer:spu:read and qXfer:spu:write packets.
14651         (main): Pass packet_len to handle_query.
14652         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14653         * target.h (target_ops): Add qxfer_spu.
14654
14655 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
14656
14657         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14658         accessing non-seekable spufs files.
14659
14660 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
14661
14662         * server.c (handle_query): Add reply for qC packet.
14663
14664 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14665             Leo Zayas  <lerele@champenstudios@com>
14666
14667         * server.h (check_remote_input_interrupt_request): New function.
14668         * remote_utils.c (INVALID_DESCRIPTOR): New define.
14669         (remote_desc): Initialize with INVALID_DESCRIPTOR.
14670         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
14671         (check_remote_input_interrupt_request): New function.
14672         * server.h (check_remote_input_interrupt_request): Declare.
14673         * win32-low.c (winapi_DebugBreakProcess,
14674         winapi_GenerateConsoleCtrlEvent): New typedefs.
14675         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14676         to 250 ms.
14677         (win32_wait): Check for remote interrupt request
14678         with check_remote_input_interrupt_request.
14679         (win32_request_interrupt): New function.
14680         (win32_target_op): Set request_interrupt to win32_request_interrupt.
14681
14682 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14683
14684         * win32-low.c (debug_registers_changed,
14685         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14686         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14687         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14688         (thread_rec): Get context using the low target.
14689         (child_add_thread): Call thread_added on the low target,
14690         which does the same thing.
14691         (regptr): Delete.
14692         (do_initial_child_stuff): Remove debug registers references.
14693         Set context using the low target.  Resume threads after
14694         setting the contexts.
14695         (child_continue): Remove dead variable.  Remove debug
14696         registers references.
14697         (child_fetch_inferior_registers): Go through the low target.
14698         (do_child_store_inferior_registers): Remove.
14699         (child_store_inferior_registers): Go through the low target.
14700         (win32_resume): Remove debug registers references.
14701         Set context using the low target.
14702         (handle_exception): Change return type to void.  Don't record
14703         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
14704         first chance exception.
14705         (get_child_debug_event): Change return type to void.  Remove
14706         goto loop.  Always return after waiting for debug event.
14707         (win32_wait): Convert to switch statement.  Handle spurious
14708         events.
14709
14710         * win32-i386-low.c (debug_registers_changed,
14711         debug_registers_used): New.
14712         (initial_stuff): Rename to ...
14713         (i386_initial_stuff): ... this.  Clear debug registers
14714         state variables.
14715         (store_debug_registers): Delete.
14716         (i386_get_thread_context): New.
14717         (load_debug_registers): Delete.
14718         (i386_set_thread_context): New.
14719         (i386_thread_added): New.
14720         (single_step): Rename to ...
14721         (i386_single_step): ... this.
14722         (do_fetch_inferior_registers): Rename to ...
14723         (i386_fetch_inferior_register): ... this.
14724         (i386_store_inferior_register): New.
14725         (the_low_target): Adapt to new interface.
14726
14727         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14728         (arm_get_thread_context): New.
14729         (arm_set_thread_context): New.
14730         (regptr): New.
14731         (do_fetch_inferior_registers): Rename to ...
14732         (arm_fetch_inferior_register): ... this.
14733         (arm_store_inferior_register): New.
14734         (arm_wince_breakpoint): Reimplement as unsigned long.
14735         (arm_wince_breakpoint_len): Define.
14736         (the_low_target): Adapt to new interface.
14737
14738         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14739         load_debug_registers.  Add get_thread_context, set_thread_context,
14740         thread_added and store_inferior_register.  Rename
14741         fetch_inferior_registers to fetch_inferior_register.
14742         (regptr): Remove declaration.
14743
14744 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14745
14746         * linux-low.c (linux_detach): Change return type to int.  Return 0.
14747         * spu-low.c (spu_detach): Likewise.
14748
14749 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14750
14751         * target.h (target_ops): Change return type of detach to int.
14752         Add join.
14753         (join_inferior): New.
14754         * server.c (main): Don't skip detach support on mingw32.
14755         If the inferior doesn't support detaching return error.
14756         Call join_inferior instead of using waitpid.
14757         * linux-low.c (linux_join): New.
14758         (linux_target_op): Add linux_join.
14759         * spu-low.c (spu_join): New.
14760         (spu_target_ops): Add spu_join.
14761         * win32-low.c (win32_detach): Adapt to new interface.
14762         Reopen current_process_handle before detaching.  Issue a child
14763         resume before detaching.
14764         (win32_join): New.
14765         (win32_target_op): Add win32_join.
14766
14767 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14768
14769         * win32-low.c (win32-attach): Fix return value.
14770         * target.h (target_ops): Describe ATTACH return values.
14771
14772 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14773
14774         * win32-low.c (GETPROCADDRESS): Define.
14775         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
14776         (winapi_DebugSetProcessKillOnExit): Likewise.
14777         (win32_create_inferior): Force usage of ansi CreateProcessA.
14778         (win32_attach): Use GETPROCADDRESS.
14779         (win32_detach): Likewise.
14780
14781 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14782
14783         * win32-low.c (win32_wait): Don't use WSTOPSIG.
14784
14785 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
14786
14787         * win32-low.c: Commit leftover changes from 2007-03-29.
14788
14789 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
14790
14791         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14792         fields short instead of int.  Add explicit padding.
14793         (i387_cache_to_fsave): Remove unnecessary casts.
14794         (i387_fsave_to_cache): Doc fix.
14795         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14796
14797 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
14798
14799         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14800         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14801
14802 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
14803
14804         * configure.srv (arm*-*-mingw32ce*): Move near the other
14805         arm targets.
14806
14807 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
14808
14809         * configure.ac: Add errno checking.
14810         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14811         sys/file.h and malloc.h.
14812         (AC_CHECK_DECLS): Add perror.
14813         (srv_mingwce): Handle.
14814         * configure.srv (i[34567]86-*-cygwin*): Add
14815         win32-i386-low.o to srv_tgtobj.
14816         (i[34567]86-*-mingw*): Likewise.
14817         (arm*-*-mingw32ce*): Add case.
14818         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14819         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14820         [__MINGW32CE__] (strerror): New function.
14821         [__MINGW32CE__] (errno): Define to GetLastError.
14822         [__MINGW32CE__] (COUNTOF): New macro.
14823         (remote_open): Remove extra close call.
14824         * mem-break.c (delete_breakpoint_at): New function.
14825         * mem-break.h (delete_breakpoint_at): Declare.
14826         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14827         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14828         [USE_WIN32API] (read, write): Add char* casts.
14829         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14830         * server.h: Include wincecompat.h on Windows CE.
14831         [HAVE_ERRNO_H]: Check.
14832         (perror): Declare if not declared.
14833         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14834         (perror_with_name): Remove errno declaration.
14835         * wincecompat.h: New.
14836         * wincecompat.c: New.
14837         * win32-low.h: New.
14838         * win32-arm-low.c: New.
14839         * win32-i386-low.c: New.
14840         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14841         (OUTMSG2): Make it safe.
14842         (_T): New macro.
14843         (COUNTOF): New macro.
14844         (NUM_REGS): Get it from the low target.
14845         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14846         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14847         (thread_rec): Let low target handle debug registers.
14848         (child_add_thread): Likewise.
14849         (child_init_thread_list): Likewise.
14850         (continue_one_thread): Likewise.
14851         (regptr): New.
14852         (do_child_fetch_inferior_registers): Move to ...
14853         * win32-i386-low.c: ... here, and rename to ...
14854         (do_fetch_inferior_registers): ... this.
14855         * win32-low.c (child_fetch_inferior_registers):
14856         Go through the low target.
14857         (do_child_store_inferior_registers): Use regptr.
14858         (strwinerror): New function.
14859         (win32_create_inferior): Handle Windows CE.
14860         Use strwinerror instead of strerror on Windows error
14861         codes.  Add program to the error output.
14862         Don't close the main thread handle on Windows CE.
14863         (win32_attach): Use coredll.dll on Windows CE.
14864         (win32_kill): Close current process and current
14865         thread handles.
14866         (win32_detach): Use coredll.dll on Windows CE.
14867         (win32_resume): Let low target handle debug registers, and
14868         step request.
14869         (handle_exception): Add/Remove initial breakpoint.  Avoid
14870         non-existant WSTOPSIG on Windows CE.
14871         (win32_read_inferior_memory): Cast to remove warning.
14872         (win32_arch_string): Go through the low target.
14873         (initialize_low): Call set_breakpoint_data with the low
14874         target's breakpoint.
14875         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14876         FOP_REGNUM, mappings): Move to ...
14877         * win32-i386-low.c: ... here.
14878         * win32-low.c (win32_thread_info): Move to ...
14879         * win32-low.h: ... here.
14880         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14881         win32-arm-low.c and wincecompat.c.
14882         (all:): Add $EXEEXT.
14883         (install-only:): Likewise.
14884         (gdbserver:): Likewise.
14885         (gdbreplay:): Likewise.
14886         * config.in: Regenerate.
14887         * configure: Regenerate.
14888
14889 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
14890
14891         * win32-low.c: Rename typedef thread_info to
14892         win32_thread_info throughout.
14893
14894 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
14895
14896         * win32-i386-low.c: Rename to ...
14897         * win32-low.c: ... this.
14898         * configure.srv: Replace win32-i386-low.o with win32-low.o.
14899         * Makefile.in: Likewise.
14900
14901 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
14902
14903         * remote-utils.c (monitor_output): Constify msg parameter.
14904         * server.h (monitor_output): Likewise.
14905         * win32-i386-low.c (handle_output_debug_string): New.
14906         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14907         handle_output_debug_string.
14908         (get_child_debug_event): Likewise.
14909
14910 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
14911
14912         * server.c (main): Correct strtoul check.
14913
14914 2007-03-27  Jon Ringle  <jon@ringle.org>
14915
14916         * linux-low.c: Check __ARCH_HAS_MMU__ also.
14917
14918 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
14919
14920         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14921
14922 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
14923
14924         * terminal.h: Check HAVE_SGTTY_H.
14925
14926 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
14927
14928         * remote-utils.c (remote_open): Print out the assigned port number.
14929
14930 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
14931
14932         * remote-utils.c (monitor_output): New function.
14933         * server.c (debug_threads): Define here.
14934         (monitor_show_help): New function.
14935         (handle_query): Handle qRcmd.
14936         (main): Do not handle 'd' packet.
14937         * server.h (debug_threads, remote_debug, monitor_output): Declare.
14938         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14939         of debug_threads.
14940
14941 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
14942
14943         * Makefile.in (EXEEXT): New.
14944         (clean): Use $(EXEEXT).
14945
14946 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
14947
14948         * target.h (target_ops): Rename send_signal to request_interrupt,
14949         and remove enum target_signal parameter.
14950         * linux-low.c (linux_request_interrupt): Rename from
14951         linux_send_signal, and always send SIGINT.
14952         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14953         and always send SIGINT.
14954         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14955         of send_signal.
14956         (input_interrupt): Likewise.
14957
14958 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
14959
14960         * server.c (get_features_xml): Check if target implemented
14961         arch_string.
14962         * win32-i386-low.c (win32_arch_string): New.
14963         (win32_target_ops): Add win32_arch_string as arch_string member.
14964
14965 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
14966
14967         * spu-low.c (spu_arch_string): New.
14968         (spu_target_ops): Add spu_arch_string.
14969
14970 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
14971
14972         * remote-utils.c: Remove HAVE_TERMINAL_H check.
14973         * configure.ac: Do not check for terminal.h.
14974         * configure, config.in: Regenerated.
14975
14976 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
14977
14978         * Makefile.in (OBS): Add $(XML_BUILTIN).
14979         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14980         (clean): Update.
14981         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14982         (arm-with-iwmmxt.c): New.
14983         * config.in, configure: Regenerate.
14984         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
14985         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
14986         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14987         (arm*-*-linux*): Add iWMMXt and regset support.
14988         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14989         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14990         (arm_store_wmmxregset, target_regsets): New.
14991         * server.c (get_features_xml): Take annex argument.  Check builtin
14992         XML documents.
14993         (handle_query): Handle multiple annexes.
14994
14995 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
14996
14997         * remote-utils.c [USE_WIN32API] (read, write): Define.
14998         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14999         write.
15000
15001 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
15002
15003         * linux-i386-low.c (the_low_target): Set arch_string.
15004         * linux-x86-64-low.c (the_low_target): Likewise.
15005         * linux-low.c (linux_arch_string): New.
15006         (linux_target_ops): Add it.
15007         * linux-low.h (struct linux_target_ops): Add arch_string.
15008         * server.c (write_qxfer_response): Use const void * for DATA.
15009         (get_features_xml): New.
15010         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
15011         * target.h (struct target_ops): Add arch_string method.
15012
15013 2007-01-03  Denis Pilat  <denis.pilat@st.com>
15014             Daniel Jacobowitz  <dan@codesourcery.com>
15015
15016         * linux-low.c (linux_kill): Handle being called with no threads.
15017         * win32-i386-low.c (win32_kill): Likewise.
15018         (get_child_debug_event): Clear current_process_handle.
15019
15020 2006-12-30  Denis PILAT  <denis.pilat@st.com>
15021             Daniel Jacobowitz  <dan@codesourcery.com>
15022
15023         * remote-utils.c (remote_open): Check the type of specified
15024         serial port devices before opening them.
15025         * server.c (main): Kill the inferior if an error occurs during
15026         the first remote_open.
15027
15028 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
15029
15030         * README: Update supported targets.
15031
15032 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
15033
15034         * Makefile.in (clean): Remove reg-mips64.c.
15035         (reg-mips64.c, reg-mips64.o): New rules.
15036         * configure.srv: Handle mips64.  Include regset support for mips.
15037         * linux-mips-low.c (union mips_register): New.
15038         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15039         (mips_breakpoint, mips_breakpoint_at): Use int.
15040         (mips_collect_register, mips_supply_register)
15041         (mips_collect_register_32bit, mips_supply_register_32bit)
15042         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15043         (mips_store_fpregset, target_regsets): New.
15044         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15045
15046 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
15047
15048         * configure.srv: Add target "spu*-*-*".
15049         * Makefile.in (clean): Remove reg-spu.c.
15050         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15051         * spu-low.c: New file.
15052
15053 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15054
15055         * configure.ac: Correct td_thr_tls_get_addr test.
15056         * configure: Regenerated.
15057
15058 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15059
15060         * linux-low.c (linux_wait_for_event): Reformat.  Use the
15061         pass_signals array.
15062         * remote-utils.c (decode_address_to_semicolon): New.
15063         * server.c (pass_signals, handle_general_set): New.
15064         (handle_query): Mention QPassSignals for qSupported.
15065         (main): Call handle_general_set.
15066         * server.h (pass_signals, decode_address_to_semicolon): New.
15067
15068 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
15069
15070         * server.c (handle_query): Correct error handling for read_auxv.
15071
15072 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
15073
15074         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15075         and srv_linux_thread_db to yes.
15076         * linux-s390-low.c (s390_fill_gregset): New function.
15077         (target_regsets): Define data structure.
15078
15079 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
15080
15081         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15082         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
15083         * config.in, configure: Regenerated.
15084         * inferiors.c (gdb_id_to_thread): New function.
15085         (gdb_id_to_thread_id): Use it.
15086         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15087         * linux-low.h (struct process_info): Add th member.
15088         (thread_db_get_tls_address): New prototype.
15089         * remote-utils.c (decode_address): Make non-static.
15090         * server.c (handle_query): Handle qGetTLSAddr.
15091         * server.h (gdb_id_to_thread, decode_address): New prototypes.
15092         * target.h (struct target_ops): Add get_tls_address.
15093         * thread-db.c (maybe_attach_thread): Save the thread handle.
15094         (thread_db_get_tls_address): New.
15095
15096 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
15097
15098         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15099         (linux_resume_one_process): Take a siginfo_t *.  Update all
15100         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
15101         (struct pending_signals): Add a siginfo_t.
15102         (linux_wait_for_process): Always set last_status.
15103         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15104         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15105         * linux-low.h (struct process_info): Add last_status.
15106
15107 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
15108
15109         * remote-utils.c (try_rle): New function.
15110         (putpkt_binary): Use it.
15111
15112 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
15113
15114         * Makefile.in (clean): Clean reg-x86-64-linux.c.
15115         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15116         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15117         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15118         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15119         point registers.
15120
15121 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
15122
15123         * server.c (terminal_fd): New variable.
15124         (old_foreground_pgrp): Likewise.
15125         (restore_old_foreground_pgrp): New function.
15126         (start_inferior): Record the terminal file descriptor in terminal_fd
15127         and its original foreground group in old_foreground_pgrp.  Register
15128         restore_old_foreground_pgrp with atexit().
15129
15130 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
15131
15132         * server.c (handle_query): Correct qPart to qXfer.
15133
15134 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
15135
15136         * configure.ac: Check for more headers which are missing on
15137         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
15138         * configure.srv: Add Cygwin and mingw32.
15139         * remote-utils.c: Don't include headers unconditionally which
15140         are missing on mingw32.  Include <winsock.h> for mingw32.
15141         (remote_open): Adjust for mingw32 support.  Flush
15142         standard error after writing to it.
15143         (remote_close, putpkt_binary, input_interrupt, block_async_io)
15144         (unblock_async_io, enable_async_io, disable_async_io)
15145         (readchar, getpkt): Update for Winsock support.
15146         (prepare_resume_reply): Expect a protocol signal number.
15147         * server.c: Disable <sys/wait.h> on mingw32.
15148         (start_inferior): Adjust for mingw32 support.  Flush
15149         standard error after writing to it.
15150         (attach_inferior): Likewise.  Use protocol signal
15151         numbers.
15152         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
15153         and names.
15154         * win32-i386-low.c: New file.
15155         * Makefile.in (XM_CLIBS): Set.
15156         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15157         (win32-i386-low.o): New dependency rule.
15158         * linux-low.c (linux_wait): Use target signal numbers.
15159         * target.h (struct target_ops): Doc fix.
15160         * server.h (target_signal_to_name): New prototype.
15161         * gdbreplay.c: Don't include headers unconditionally which
15162         are missing on mingw32.  Include <winsock.h> for mingw32.
15163         (remote_close, remote_open): Adjust for Winsock support.
15164         * configure, config.in: Regenerated.
15165
15166 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
15167
15168         * server.c (decode_xfer_read, write_qxfer_response): New.
15169         (handle_query): Take a packet length argument.  Handle
15170         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
15171         the qSupported response.
15172         (main): Update call to handle_query.
15173
15174 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
15175
15176         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15177         (putpkt_binary): Renamed from putpkt and adjusted for binary
15178         data.
15179         (putpkt): New wrapper for putpkt_binary.
15180         (readchar): Don't mask off the high bit.
15181         (decode_X_packet): New function.
15182         * server.c (main): Call putpkt_binary if a handler sets the packet
15183         length.  Save the length of the incoming packet.  Handle 'X'.
15184         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15185
15186 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
15187
15188         * server.c (handle_query): Handle qSupported.
15189
15190 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15191
15192         * remote-utils.c (all_symbols_looked_up): New variable.
15193         (look_up_one_symbol): Check it.
15194         * server.h (look_up_one_symbol): New declaration.
15195         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15196
15197 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15198
15199         * Makefile.in (linux-arm-low.o): Update dependencies.
15200         * linux-arm-low.c: Include "gdb_proc_service.h".
15201         (PTRACE_GET_THREAD_AREA): Define.
15202         (ps_get_thread_area): New function.
15203
15204 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
15205
15206         * configure.srv (m68k*-*-uclinux*): New target.
15207         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15208         (linux_resume_one_process): Remove extraneous cast.
15209         (linux_read_offsets): New.
15210         (linux_target_op): Add linux_read_offsets on mmuless systems.
15211         * server.c (handle_query): Add qOffsets logic.
15212         * target.h (struct target_ops): Add read_offsets.
15213
15214 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15215
15216         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15217         (PTRACE_GET_THREAD_AREA): Define.
15218         (ps_get_thread_area): New function.
15219         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15220         (linux-x86-64-low.o): Update.
15221
15222 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15223
15224         * configure.ac: Remove checks for prfpregset_t.
15225         * gdb_proc_service.h: New file.
15226         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15227         new "gdb_proc_service.h".
15228         * proc-service.c: Likewise.
15229         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15230         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15231         * Makefile.in (gdb_proc_service_h): Updated.
15232         * configure, config.in: Regenerated.
15233
15234 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
15235
15236         * remote-utils.c (prepare_resume_reply): Move declaration
15237         of gdb_id_from_wait to the top of the block.
15238
15239 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
15240
15241         * linux-low.c (regsets_store_inferior_registers): Read the regset
15242         from the target before filling it.
15243
15244 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15245
15246         * server.c (attach_inferior): Return SIGTRAP for a successful
15247         attach.
15248
15249 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
15250
15251         * Makefile.in (OBS): Add version.o.
15252         (STAGESTUFF): Delete.
15253         (version.o): Add dependencies.
15254         (version.c): Replace rule.
15255         (clean): Remove version.c.
15256         * server.c (gdbserver_version): New.
15257         (gdbserver_usage): Use printf.
15258         (main): Handle --version and --help.
15259         * server.h (version, host_name): Add declarations.
15260
15261 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
15262
15263         * linux-arm-low.c:
15264         * linux-arm-low.c:
15265         * inferiors.c:
15266         * i387-fp.h:
15267         * i387-fp.c:
15268         * gdbreplay.c:
15269         * regcache.c:
15270         * proc-service.c:
15271         * mem-break.h:
15272         * mem-break.c:
15273         * linux-x86-64-low.c:
15274         * linux-sh-low.c:
15275         * linux-s390-low.c:
15276         * linux-ppc64-low.c:
15277         * linux-ppc-low.c:
15278         * linux-mips-low.c:
15279         * linux-m68k-low.c:
15280         * linux-m32r-low.c:
15281         * linux-low.h:
15282         * linux-low.c:
15283         * linux-ia64-low.c:
15284         * linux-i386-low.c:
15285         * linux-crisv32-low.c:
15286         * thread-db.c:
15287         * terminal.h:
15288         * target.h:
15289         * target.c:
15290         * server.h:
15291         * server.c:
15292         * remote-utils.c:
15293         * regcache.h:
15294         * utils.c:
15295         * Makefile.in:
15296         * configure.ac:
15297         * gdbserver.1: Add (C) after Copyright.  Update the FSF
15298         address.
15299
15300 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
15301
15302         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15303         (arm_breakpoint_at): Recognize both breakpoints.
15304         (the_low_target): Use the correct breakpoint instruction.
15305
15306 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
15307
15308         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15309         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15310         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15311         (the_low_target): Update.
15312
15313 2005-10-25  Andreas Schwab  <schwab@suse.de>
15314
15315         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15316
15317         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15318         (ia64_num_regs): Reduce to 462.
15319
15320 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
15321
15322         * acinclude.m4: Correct quoting.
15323         * aclocal.m4: Regenerated.
15324
15325         Suggested by SZOKOVACS Robert <szo@ies.hu>:
15326         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15327         (thread_db_init): Call thread_db_err_str.
15328         * configure.ac: Check for TD_VERSION.
15329         * config.in, configure: Regenerated.
15330
15331 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15332
15333         * server.h (error, fatal, warning): Add ATTR_FORMAT.
15334
15335 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
15336
15337         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15338         is not available.  Define HAVE_PTRACE_GETREGS if it is.
15339         * config.in, configure: Regenerated.
15340         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15341         * linux-i386-low.c, linux-m68k-low.c: Update to use
15342         HAVE_PTRACE_GETREGS.
15343         * linux-low.c (regsets_fetch_inferior_registers)
15344         (regsets_store_inferior_registers): Only return 0 if we processed
15345         GENERAL_REGS.
15346         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15347         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15348
15349 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
15350
15351         * inferiors.c (struct thread_info): Add gdb_id.
15352         (add_thread): Add gdb_id argument.
15353         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15354         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15355         calls to add_thread.
15356         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15357         * server.c (handle_query): Use thread_to_gdb_id.
15358         (handle_v_cont, main): Use gdb_id_to_thread_id.
15359         * server.h (add_thread): Update prototype.
15360         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15361         prototypes.
15362
15363 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
15364
15365         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15366         left-padded registers.
15367         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15368         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15369
15370 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
15371
15372         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15373         * configure: Regenerate.
15374         * config.in: Regenerate.
15375         * server.h (NEED_DECLARATION_STRERROR):
15376         Replace with !HAVE_DECL_STRERROR.
15377
15378 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
15379
15380         * linux-low.c (linux_wait, linux_send_signal): Don't test
15381         an unsigned long variable for > 0 if it could be MAX_ULONG.
15382         * server.c (myresume): Likewise.
15383         * target.c (set_desired_inferior): Likewise.
15384
15385 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
15386
15387         * configure.ac: Simplify and improve check for socklen_t.
15388         * configure, config.in: Regenerate.
15389
15390 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
15391
15392         * acconfig.h: Remove.
15393         * configure.ac: Add a test for socklen_t.  Use three-argument
15394         AC_DEFINE throughout.
15395         * config.in: Regenerated using autoheader 2.59.
15396         * configure: Regenerated.
15397
15398         * gdbreplay.c (socklen_t): Provide a default.
15399         (remote_open): Use socklen_t.
15400         * remote-utils.c (socklen_t): Provide a default.
15401         (remote_open): Use socklen_t.
15402         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15403         unsigned char.
15404
15405         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15406         char for buffers.
15407         * linux-low.c (linux_read_memory, linux_write_memory)
15408         (linux_read_auxv): Likewise.
15409         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15410         (check_mem_write): Likewise.
15411         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15412         Likewise.
15413         * regcache.c (struct inferior_rgcache_data, registers_to_string)
15414         (registers_from_string, register_data): Likewise.
15415         * server.c (handle_query, main): Likewise.
15416         * server.h (convert_ascii_to_int, convert_int_to_ascii)
15417         (decode_M_packet): Likewise.
15418         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15419         * target.h (struct target_ops): Update read_memory, write_memory,
15420         and read_auxv.
15421         (read_inferior_memory, write_inferior_memory): Update.
15422         * linux-low.h (struct linux_target_ops): Change type of breakpoint
15423         to unsigned char *.
15424         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15425         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15426         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15427         linux-s390-low.c, linux-sh-low.c: Update for changes in
15428         read_inferior_memory and the_low_target->breakpoint.
15429
15430 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
15431
15432         * Makefile.in (SFILES): Add linux-ppc64-low.c.
15433         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15434         * configure.srv: Add powerpc64-*-linux*.
15435         * linux-ppc64-low.c: New file.
15436
15437 2005-05-23  Orjan Friberg  <orjanf@axis.com>
15438
15439         * linux-cris-low.c: New file with support for CRIS.
15440         * linux-crisv32-low.c: Ditto for CRISv32.
15441         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15442         (clean): Add reg-cris.c and reg-crisv32.c.
15443         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15444         reg-crisv32.o, and reg-crisv32.c to make rules.
15445         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15446         recognized targets.
15447
15448 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
15449
15450         * linux-low.c (fetch_register): Ensure buffer size is a multiple
15451         of sizeof (PTRACE_XFER_TYPE).
15452         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
15453
15454 2005-05-12  Orjan Friberg  <orjanf@axis.com>
15455
15456         * target.h (struct target_ops): Add insert_watchpoint,
15457         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15458         pointers for hardware watchpoint support.
15459         * linux-low.h (struct linux_target_ops): Ditto.
15460         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15461         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
15462         to linux_target_ops.
15463         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15464         reply packet.
15465         * server.c (main): Recognize 'Z' and 'z' packets.
15466
15467 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
15468
15469         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15470         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15471         (the_low_target): Add new members.
15472
15473 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
15474
15475         * proc-service.c (ps_lgetregs): Search all_processes instead of
15476         all_threads.
15477
15478 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
15479
15480         * server.c (start_inferior): Change return type to int.
15481         (attach_inferior): Change sigptr to int *.
15482         (handle_v_cont, handle_v_requests): Change signal to int *.
15483         (main): Change signal to int.
15484
15485 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
15486
15487         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15488         * configure.srv: Add m32r*-*-linux*.
15489         * linux-m32r-low.c: New file.
15490
15491 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
15492
15493         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15494
15495 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
15496
15497         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15498         Take unsigned long arguments for PIDs.
15499         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15500         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15501         (wait_for_sigstop, linux_resume_one_process)
15502         (regsets_fetch_inferior_registers, linux_send_signal)
15503         (linux_read_auxv): Likewise.  Update the types of variables holding
15504         PIDs.  Update format string specifiers.
15505         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15506         * remote-utils.c (prepare_resume_reply): Likewise.
15507         * server.c (cont_thread, general_thread, step_thread)
15508         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15509         unsigned long.
15510         (handle_query): Update format specifiers.
15511         (handle_v_cont, main): Use strtoul for thread IDs.
15512         * server.h (struct inferior_list_entry): Use unsigned long for ID.
15513         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15514         (general_thread, step_thread, thread_from_wait)
15515         (old_thread_from_wait): Update.
15516         * target.h (struct thread_resume): Use unsigned long for THREAD.
15517         (struct target_ops): Use unsigned long for arguments to attach and
15518         thread_alive.
15519
15520 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
15521
15522         * acinclude.m4: Include bfd/bfd.m4 directly.
15523         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
15524         <agriffis@toolchain.org>.
15525         * aclocal.m4, configure: Regenerated.
15526
15527 2005-01-07  Andrew Cagney  <cagney@gnu.org>
15528
15529         * configure.ac: Rename configure.in, require autoconf 2.59.
15530         * configure: Re-generate.
15531
15532 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
15533
15534         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
15535         LIBS when finished.
15536         * aclocal.m4: Regenerated.
15537         * configure: Regenerated.
15538
15539 2004-11-21  Andreas Schwab  <schwab@suse.de>
15540
15541         * linux-m68k-low.c (m68k_num_gregs): Define.
15542         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15543         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15544         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15545         (m68k_breakpoint_at): New.  Add to the_low_target.
15546
15547         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15548         srv_linux_thread_db to yes.
15549
15550 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
15551
15552         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15553         (ARCH_SET_FS): Likewise.
15554         (ARCH_GET_FS): Likewise.
15555         (ARCH_GET_GS): Likewise.
15556
15557 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
15558
15559         * linux-i386-low.c (ps_get_thread_area): New.
15560         * linux-x86-64-low.c (ps_get_thread_area): New.
15561         * linux-low.c: Include <sys/syscall.h>.
15562         (linux_kill_one_process): Don't kill the first thread here.
15563         (linux_kill): Kill the first thread here.
15564         (kill_lwp): New function.
15565         (send_sigstop, linux_send_signal): Use it.
15566         * proc-service.c: Clean up #ifdefs.
15567         (fpregset_info): Delete.
15568         (ps_lgetregs): Update and enable implementation.
15569         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15570         implementations.
15571         * remote-utils.c (struct sym_cache, symbol_cache): New.
15572         (input_interrupt): Print a clearer message.
15573         (async_io_enabled): New variable.
15574         (enable_async_io, disable_async_io): Use it.  Update comments.
15575         (look_up_one_symbol): Use the symbol cache.
15576         * thread-db.c (thread_db_look_up_symbols): New function.
15577         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
15578
15579 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
15580
15581         * configure.in: Test for -rdynamic.
15582         * configure: Regenerated.
15583         * Makefile (INTERNAL_LDFLAGS): New.
15584         (gdbserver, gdbreplay): Use it.
15585
15586 2004-09-02  Andrew Cagney  <cagney@gnu.org>
15587
15588         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15589
15590 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
15591
15592         * linux-low.c (linux_wait): Clear all_processes list also.
15593
15594 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
15595
15596         * linux-low.c: Include <errno.h>.  Remove extern declaration of
15597         errno.
15598
15599 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
15600
15601         * gdbreplay.c, server.h, utils.c: Update copyright years.
15602
15603 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
15604
15605         * server.c (main): Print child status or termination signal from
15606         variable 'signal', not 'sig'.
15607
15608 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
15609
15610         * linux-low.c (linux_read_memory): Change return type to
15611         int.  Check for and return error from ptrace().
15612         * target.c (read_inferior_memory): Change return type to int.  Pass
15613         back return status from the_target->read_memory().
15614         * target.h (struct target_ops): Adapt *read_memory() prototype.
15615         Update comment.
15616         (read_inferior_memory): Adapt prototype.
15617         * server.c (main): Return an error packet if
15618         read_inferior_memory() returns an error.
15619
15620 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
15621
15622         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15623         Unify with other clean targets.
15624
15625 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15626
15627         * server.c (handle_v_cont): Call set_desired_inferior.
15628
15629 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15630
15631         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15632
15633 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15634
15635         * linux-low.c (linux_wait): Unblock async I/O.
15636         (linux_resume): Block and enable async I/O.
15637         * remote-utils.c (block_async_io, unblock_async_io): New functions.
15638         * server.h (block_async_io, unblock_async_io): Add prototypes.
15639
15640 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15641
15642         * remote-utils.c (remote_open): Print a status notice after
15643         opening a TCP port.
15644         * server.c (attach_inferior): Print a status notice after
15645         attaching.
15646
15647 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15648
15649         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15650
15651 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
15652
15653         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15654         error packet.
15655         * server.c, target.h: Update copyright years.
15656
15657 2004-02-25  Roland McGrath  <roland@redhat.com>
15658
15659         * target.h (struct target_ops): New member `read_auxv'.
15660         * server.c (handle_query): Handle qPart:auxv:read: query using that.
15661         * linux-low.c (linux_read_auxv): New function.
15662         (linux_target_ops): Initialize `read_auxv' member to that.
15663
15664 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15665
15666         Committed by Jim Blandy  <jimb@redhat.com>.
15667
15668         * linux-s390-low.c (s390_num_regs): Update.
15669         (s390_regmap): Remove control registers.  Use __s390x__ predefine
15670         instead of GPR_SIZE to distiguish s390 and s390x targets.
15671
15672 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
15673
15674         * linux-low.c: Update copyright year.
15675         (check_removed_breakpoint): Clear pending_is_breakpoint.
15676         (linux_set_resume_request, linux_queue_one_thread)
15677         (resume_status_pending_p): New functions.
15678         (linux_continue_one_thread): Use process->resume.
15679         (linux_resume): Only resume threads if there are no pending events.
15680         * linux-low.h (struct process_info): Add resume request
15681         pointer.
15682
15683 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
15684
15685         * regcache.c (new_register_cache): Clear the allocated register
15686         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15687
15688 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
15689
15690         * linux-low.c (linux_resume): Take a struct thread_resume *
15691         argument.
15692         (linux_wait): Update call.
15693         (resume_ptr): New static variable.
15694         (linux_continue_one_thread): Renamed from
15695         linux_continue_one_process.  Use resume_ptr.
15696         (linux_resume): Use linux_continue_one_thread.
15697         * server.c (handle_v_cont, handle_v_requests): New functions.
15698         (myresume): New function.
15699         (main): Handle 'v' case.
15700         * target.h (struct thread_resume): New type.
15701         (struct target_ops): Change argument of "resume" to struct
15702         thread_resume *.
15703         (myresume): Delete macro.
15704
15705 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
15706
15707         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15708         (uninstall): Support DESTDIR.
15709
15710 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
15711
15712         * configure.srv: Add xscale*linux copy of arm*linux entry.
15713
15714 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
15715
15716         * linux-arm-low.c (arm_reinsert_addr): New function.
15717         (the_low_target): Add arm_reinsert_addr.
15718
15719 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
15720
15721         * mem-break.c: Remove whitespace at end of file.
15722
15723 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
15724
15725         * configure.in: Check whether we need to prototype strerror.
15726         * server.h: Optionally prototype strerror.
15727         * gdbreplay.c (perror_with_name): Use strerror.
15728         * linux-low.c (linux_attach_lwp): Use strerror.
15729         * utils.c (perror_with_name): Use strerror.
15730         * config.in, configure: Regenerated.
15731
15732 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
15733
15734         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15735         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15736
15737 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
15738
15739         * Makefile.in (SFILES): Update.
15740         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15741         low-sun3.c: Remove files.
15742
15743 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
15744
15745         * linux-low.c: Move comment to linux_thread_alive where it belonged.
15746         (linux_detach_one_process, linux_detach): New functions.
15747         (linux_target_ops): Add linux_detach.
15748         * server.c (main): Handle 'D' packet.
15749         * target.h (struct target_ops): Add "detach" member.
15750         (detach_inferior): Define.
15751
15752 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
15753
15754         From Kelley Cook  <kelleycook@wideopenwest.com>:
15755         * configure.srv: Accept i[34567]86 variants.
15756
15757 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
15758
15759         * linux-low.c (linux_wait_for_event): Correct comment typos.
15760         (linux_resume_one_process): Call check_removed_breakpoint.
15761         (linux_send_signal): New function.
15762         (linux_target_ops): Add linux_send_signal.
15763         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15764         of kill.
15765         * target.h (struct target_ops): Add send_signal.
15766
15767 2003-05-29  Jim Blandy  <jimb@redhat.com>
15768
15769         * linux-low.c (usr_store_inferior_registers): Transfer buf in
15770         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
15771         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15772         away part of the register's value.
15773
15774 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
15775
15776         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15777         (linux_wait_for_event, linux_init_signals): Likewise.
15778
15779 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
15780
15781         * configure.in: Check for stdlib.h.
15782         * configure: Regenerated.
15783         * config.in: Regenerated.
15784
15785 2003-01-04  Andreas Schwab  <schwab@suse.de>
15786
15787         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15788
15789 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
15790
15791         * Makefile.in: Remove obsolete code.
15792
15793 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
15794
15795         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15796         defined(PT_FPR0_HI).
15797
15798 2002-11-17  Stuart Hughes  <seh@zee2.com>
15799
15800         * linux-arm-low.c (arm_num_regs): Increase.
15801         (arm_regmap): Include status register.
15802
15803 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
15804
15805         * linux-low.c (register_addr): Remove incorrect -1 check.
15806
15807 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
15808
15809         * linux-low.c (linux_create_inferior): Call setpgid.  Return
15810         the new PID.
15811         (unstopped_p, linux_signal_pid): Remove.
15812         (linux_target_ops): Remove linux_signal_pid.
15813         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15814         global instead of target method.
15815         * target.h (struct target_ops): Remove signal_pid.  Update comment
15816         for create_inferior.
15817         * server.c (signal_pid): New variable.
15818         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
15819         gdbserver.  Set the child to be the foreground process group.
15820         (attach_inferior): Set signal_pid.
15821
15822 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
15823
15824         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15825
15826 2002-08-20  Jim Blandy  <jimb@redhat.com>
15827
15828         * Makefile.in (LDFLAGS): Allow the configure script to establish a
15829         default for this.
15830
15831 2002-08-01  Andrew Cagney  <cagney@redhat.com>
15832
15833         * Makefile.in: Make chill references obsolete.
15834
15835 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
15836
15837         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15838         * configure: Regenerate.
15839         * config.in: Regenerate.
15840
15841 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
15842
15843         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15844         (perror_with_name, remote_close, remote_open, expect, play): Static.
15845
15846 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
15847
15848         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15849         byte offsets instead of an array of indexes.
15850         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15851
15852 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
15853
15854         * regcache.c: Add comment.
15855
15856 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
15857
15858         * thread-db.c: New file.
15859         * proc-service.c: New file.
15860         * acinclude.m4: New file.
15861         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15862         proc-service.o, and thread-db.o.
15863         (linux-low.o): Add USE_THREAD_DB.
15864         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15865         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15866         * aclocal.m4: Regenerated.
15867         * config.in: Regenerated.
15868         * configure: Regenerated.
15869         * configure.in: Check for proc_service.h, sys/procfs.h,
15870         thread_db.h, and linux/elf.h headrs.
15871         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15872         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
15873         Check for -lthread_db and thread support.
15874         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15875         PowerPC, and SuperH.
15876         * i387-fp.c: Constify arguments.
15877         * i387-fp.h: Likewise.
15878         * inferiors.c: (struct thread_info): Renamed from
15879         `struct inferior_info'.  Remove PID member.  Use generic inferior
15880         list header.  All uses updated.
15881         (inferiors, signal_pid): Removed.
15882         (all_threads): New variable.
15883         (get_thread): Define.
15884         (add_inferior_to_list): New function.
15885         (for_each_inferior): New function.
15886         (change_inferior_id): New function.
15887         (add_inferior): Removed.
15888         (remove_inferior): New function.
15889         (add_thread): New function.
15890         (free_one_thread): New function.
15891         (remove_thread): New function.
15892         (clear_inferiors): Use for_each_inferior and free_one_thread.
15893         (find_inferior): New function.
15894         (find_inferior_id): New function.
15895         (inferior_target_data): Update argument type.
15896         (set_inferior_target_data): Likewise.
15897         (inferior_regcache_data): Likewise.
15898         (set_inferior_regcache_data): Likewise.
15899         * linux-low.c (linux_bp_reinsert): Remove.
15900         (all_processes, stopping_threads, using_thrads)
15901         (struct pending_signals, debug_threads, pid_of): New.
15902         (inferior_pid): Replace with macro.
15903         (struct inferior_linux_data): Remove.
15904         (get_stop_pc, add_process): New functions.
15905         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15906         Use add_process and add_thread.
15907         (linux_attach_lwp): New function, based on old linux_attach.  Use
15908         add_process and add_thread.  Set stop_expected for new threads.
15909         (linux_attach): New function.
15910         (linux_kill_one_process): New function.
15911         (linux_kill): Kill all LWPs.
15912         (linux_thread_alive): Use find_inferior_id.
15913         (check_removed_breakpoints, status_pending_p): New functions.
15914         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15915         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
15916         struct for the found process.
15917         (linux_wait_for_event): New function.
15918         (linux_wait): Use it.  Support LWPs.
15919         (send_sigstop, wait_for_sigstop, stop_all_processes)
15920         (linux_resume_one_process, linux_continue_one_process): New functions.
15921         (linux_resume): Support LWPs.
15922         (REGISTER_RAW_SIZE): Remove.
15923         (fetch_register): Use register_size instead.  Call supply_register.
15924         (usr_store_inferior_registers): Likewise.  Call collect_register.
15925         Fix recursive case.
15926         (regsets_fetch_inferior_registers): Improve error message.
15927         (regsets_store_inferior_registers): Add debugging.
15928         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15929         (unstopped_p, linux_signal_pid): New functions.
15930         (linux_target_ops): Add linux_signal_pid.
15931         (linux_init_signals): New function.
15932         (initialize_low): Call it.  Initialize using_threads.
15933         * regcache.c (inferior_regcache_data): Add valid
15934         flag.
15935         (get_regcache): Fetch registers lazily.  Add fetch argument
15936         and update all callers.
15937         (regcache_invalidate_one, regcache_invalidate): New
15938         functions.
15939         (new_register_cache): Renamed from create_register_cache.
15940         Return the new regcache.
15941         (free_register_cache): Change argument to a void *.
15942         (registers_to_string, registers_from_string): Call get_regcache
15943         with fetch flag set.
15944         (register_data): Make static.  Pass fetch flag to get_regcache.
15945         (supply_register): Call get_regcache with fetch flag clear.
15946         (collect_register): Call get_regcache with fetch flag set.
15947         (collect_register_as_string): New function.
15948         * regcache.h: Update.
15949         * remote-utils.c (putpkt): Flush after debug output and use
15950         stderr.
15951         Handle input interrupts while waiting for an ACK.
15952         (input_interrupt): Use signal_pid method.
15953         (getpkt): Flush after debug output and use stderr.
15954         (outreg): Use collect_register_as_string.
15955         (new_thread_notify, dead_thread_notify): New functions.
15956         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
15957         and general_thread.
15958         (look_up_one_symbol): Flush after debug output.
15959         * server.c (step_thread, server_waiting): New variables.
15960         (start_inferior): Don't use signal_pid.  Update call to mywait.
15961         (attach_inferior): Update call to mywait.
15962         (handle_query): Handle qfThreadInfo and qsThreadInfo.
15963         (main): Don't fetch/store registers explicitly.  Use
15964         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
15965         calls to mywait.
15966         * server.h: Update.
15967         (struct inferior_list, struct_inferior_list_entry): New.
15968         * target.c (set_desired_inferior): New.
15969         (write_inferior_memory): Constify.
15970         (mywait): New function.
15971         * target.h: Update.
15972         (struct target_ops): New signal_pid method.
15973         (mywait): Removed macro, added prototype.
15974
15975         * linux-low.h (regset_func): Removed.
15976         (regset_fill_func, regset_store_func): New.
15977         (enum regset_type): New.
15978         (struct regset_info): Add type field.  Use new operation types.
15979         (struct linux_target_ops): stop_pc renamed to get_pc.
15980         Add decr_pc_after_break and breakpoint_at.
15981         (get_process, get_thread_proess, get_process_thread)
15982         (strut process_info, all_processes, linux_attach_lwp)
15983         (thread_db_init): New.
15984
15985         * linux-arm-low.c (arm_get_pc, arm_set_pc,
15986         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15987         (the_low_target): Add new members.
15988         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15989         (i386_store_fpxregset): Constify.
15990         (target_regsets): Add new kind identifier.
15991         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
15992         (i386_set_pc): Add debugging.
15993         (i386_breakpoint_at): New function.
15994         (the_low_target): Add new members.
15995         * linux-mips-low.c (mips_get_pc, mips_set_pc)
15996         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15997         (mips_breakpoint_at): New.
15998         (the_low_target): Add new members.
15999         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16000         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16001         (the_low_target): Add new members.
16002         * linux-sh-low.c (sh_get_pc, sh_set_pc)
16003         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16004         (the_low_target): Add new members.
16005         * linux-x86-64-low.c (target_regsets): Add new kind
16006         identifier.
16007
16008 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
16009
16010         From Martin Pool <mbp@samba.org>:
16011         * server.c (gdbserver_usage): New function.
16012         (main): Call it.
16013
16014 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
16015
16016         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16017         stop_at -> stop_pc.
16018
16019 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
16020
16021         * Makefile.in: Remove obsolete code.
16022
16023 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
16024
16025         * linux-low.c (regsets_fetch_inferior_registers),
16026         (regsets_store_inferior_registers): Removed cast to int from
16027         ptrace() calls.
16028         * regcache.h: Added declaration of struct inferior_info.
16029
16030 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16031
16032         * inferiors.c (struct inferior_info): Add regcache_data.
16033         (add_inferior): Call create_register_cache.
16034         (clear_inferiors): Call free_register_cache.
16035         (inferior_regcache_data, set_inferior_regcache_data): New functions.
16036         * regcache.c (struct inferior_regcache_data): New.
16037         (registers): Remove.
16038         (get_regcache): New function.
16039         (create_register_cache, free_register_cache): New functions.
16040         (set_register_cache): Don't initialize the register cache here.
16041         (registers_to_string, registers_from_string, register_data): Call
16042         get_regcache.
16043         * regcache.h: Add prototypes.
16044         * server.h: Likewise.
16045
16046 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16047
16048         * mem-break.c: New file.
16049         * mem-break.h: New file.
16050         * Makefile.in: Add mem-break.o rule; update server.h
16051         dependencies.
16052         * inferiors.c (struct inferior_info): Add target_data
16053         member.
16054         (clear_inferiors): Free target_data member if set.
16055         (inferior_target_data, set_inferior_target_data): New functions.
16056         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16057         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
16058         * linux-low.c (linux_bp_reinsert): New variable.
16059         (struct inferior_linux_data): New.
16060         (linux_create_inferior): Use set_inferior_target_data.
16061         (linux_attach): Likewise.  Call add_inferior.
16062         (linux_wait_for_one_inferior): New function.
16063         (linux_wait): Call it.
16064         (linux_write_memory): Add const.
16065         (initialize_low): Call set_breakpoint_data.
16066         * linux-low.h (struct linux_target_ops): Add breakpoint
16067         handling members.
16068         * server.c (attach_inferior): Remove extra add_inferior
16069         call.
16070         * server.h: Include mem-break.h.  Update inferior.c
16071         prototypes.
16072         * target.c (read_inferior_memory)
16073         (write_inferior_memory): New functions.
16074         * target.h (read_inferior_memory)
16075         (write_inferior_memory): Change macros to prototypes.
16076         (struct target_ops): Update comments.  Add const to write_memory
16077         definition.
16078
16079 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
16080
16081         * linux-low.c (usr_store_inferior_registers): Support
16082         registers which are allowed to fail to store.
16083         * linux-low.h (linux_target_ops): Likewise.
16084         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16085         (ppc_cannot_store_register): FPSCR may not be storable.
16086
16087 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16088
16089         * server.h: Include <string.h> if HAVE_STRING_H.
16090         * ChangeLog: Correct paths in last ChangeLog entry.
16091
16092 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16093
16094         * linux-low.h: Remove obsolete prototypes.
16095         (struct linux_target_ops): New.
16096         (extern the_low_target): New.
16097         * linux-low.c (num_regs, regmap): Remove declarations.
16098         (register_addr): Use the_low_target explicitly.
16099         (fetch_register): Likewise.
16100         (usr_fetch_inferior_registers): Likewise.
16101         (usr_store_inferior_registers): Likewise.
16102         * linux-arm-low.c (num_regs): Remove.
16103         (arm_num_regs): Define.
16104         (arm_regmap): Renamed from regmap, made static.
16105         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16106         made static.
16107         (arm_cannot_store_register): Renamed from cannot_store_register,
16108         made static.
16109         (the_low_target): New.
16110         * linux-i386-low.c (num_regs): Remove.
16111         (i386_num_regs): Define.
16112         (i386_regmap): Renamed from regmap, made static.
16113         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16114         made static.
16115         (i386_cannot_store_register): Renamed from cannot_store_register,
16116         made static.
16117         (the_low_target): New.
16118         * linux-ia64-low.c (num_regs): Remove.
16119         (ia64_num_regs): Define.
16120         (ia64_regmap): Renamed from regmap, made static.
16121         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16122         made static.
16123         (ia64_cannot_store_register): Renamed from cannot_store_register,
16124         made static.
16125         (the_low_target): New.
16126         * linux-m68k-low.c (num_regs): Remove.
16127         (m68k_num_regs): Define.
16128         (m68k_regmap): Renamed from regmap, made static.
16129         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16130         made static.
16131         (m68k_cannot_store_register): Renamed from cannot_store_register,
16132         made static.
16133         (the_low_target): New.
16134         * linux-mips-low.c (num_regs): Remove.
16135         (mips_num_regs): Define.
16136         (mips_regmap): Renamed from regmap, made static.
16137         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16138         made static.
16139         (mips_cannot_store_register): Renamed from cannot_store_register,
16140         made static.
16141         (the_low_target): New.
16142         * linux-ppc-low.c (num_regs): Remove.
16143         (ppc_num_regs): Define.
16144         (ppc_regmap): Renamed from regmap, made static.
16145         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16146         made static.
16147         (ppc_cannot_store_register): Renamed from cannot_store_register,
16148         made static.
16149         (the_low_target): New.
16150         * linux-s390-low.c (num_regs): Remove.
16151         (s390_num_regs): Define.
16152         (s390_regmap): Renamed from regmap, made static.
16153         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16154         made static.
16155         (s390_cannot_store_register): Renamed from cannot_store_register,
16156         made static.
16157         (the_low_target): New.
16158         * linux-sh-low.c (num_regs): Remove.
16159         (sh_num_regs): Define.
16160         (sh_regmap): Renamed from regmap, made static.
16161         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16162         made static.
16163         (sh_cannot_store_register): Renamed from cannot_store_register,
16164         made static.
16165         (the_low_target): New.
16166         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16167         (the_low_target): New.
16168
16169 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16170
16171         * Makefile.in: Add stamp-h target.
16172         * configure.in: Create stamp-h.
16173         * configure: Regenerated.
16174
16175 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16176
16177         * inferiors.c: New file.
16178         * target.c: New file.
16179         * target.h: New file.
16180         * Makefile.in:  Add target.o and inferiors.o.  Update
16181         dependencies.
16182         * linux-low.c (inferior_pid): New static variable,
16183         moved from server.c.
16184         (linux_create_inferior): Renamed from create_inferior.
16185         Call add_inferior.  Return 0 on success instead of a PID.
16186         (linux_attach): Renamed from myattach.
16187         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
16188         (linux_thread_alive): Renamed from mythread_alive.
16189         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
16190         child dies.
16191         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
16192         (regsets_store_inferior_registers): Correct error message.
16193         Add missing ``return 0''.
16194         (linux_fetch_registers): Renamed from fetch_inferior_registers.
16195         (linux_store_registers): Renamed from store_inferior_registers.
16196         (linux_read_memory): Renamed from read_inferior_memory.
16197         (linux_write_memory): Renamed from write_inferior_memory.
16198         (linux_target_ops): New structure.
16199         (initialize_low): Call set_target_ops ().
16200         * remote-utils.c (unhexify): New function.
16201         (hexify): New function.
16202         (input_interrupt): Send signals to ``signal_pid''.
16203         * server.c (inferior_pid): Remove.
16204         (start_inferior): Update create_inferior call.
16205         (attach_inferior): Call add_inferior.
16206         (handle_query): New function.
16207         (main): Call handle_query for `q' packets.
16208         * server.h: Include "target.h".  Remove obsolete prototypes.
16209         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16210
16211 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16212
16213         * Makefile.in: Add WARN_CFLAGS.  Update configury
16214         dependencies.
16215         * configure.in: Check for <string.h>
16216         * configure: Regenerate.
16217         * config.in: Regenerate.
16218         * gdbreplay.c: Include needed system headers.
16219         (remote_open): Remove strchr prototype.
16220         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16221         * regcache.c (supply_register): Change buf argument to const void *.
16222         (supply_register_by_name): Likewise.
16223         (collect_register): Change buf argument to void *.
16224         (collect_register_by_name): Likewise.
16225         * regcache.h: Add missing prototypes.
16226         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16227         * server.c (handle_query): New function.
16228         (attached): New static variable, moved out of main.
16229         (main): Quiet longjmp clobber warnings.
16230         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
16231         * utils.c (error): Remove NORETURN.
16232         (fatal): Likewise.