Change order of error message printed when gdbserver can't find CWD
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
2
3         * server.c (captured_main): Change order of error message printed
4         when the current working directory cannot be found.
5
6 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
7
8         * server.c: Include "filenames.h" and "pathstuff.h".
9         (program_name): Delete variable.
10         (program_path): New anonymous class.
11         (get_exec_wrapper): Use "program_path" instead of
12         "program_name".
13         (handle_v_run): Likewise.
14         (captured_main): Likewise.
15         (process_serial_event): Likewise.
16
17 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
18
19         * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
20         (OBJS): Add "pathstuff.o".
21         * server.c (current_directory): New global variable.
22         (captured_main): Initialize "current_directory".
23
24 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
25
26         * tdesc.c: Use common/tdesc.h.
27         * tdesc.h: Likewise.
28
29 2018-02-20  Alan Hayward  <alan.hayward@arm.com>
30             Simon Marchi  <simon.marchi@ericsson.com>
31
32         * Makefile.in: Switch order of make rules.
33
34 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
35
36         * Makefile.in: Add common directory in build.
37         * configure.ac: Add common reference.
38         * configure: Regenerate.
39
40 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
41
42         * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
43         * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
44         * spu-low.c (spu_target_ops): Likewise.
45         * win32-low.c (win32_target_ops): Likewise.
46         * server.c (supported_btrace_packets): Report packets unconditionally.
47         * target.h (target_ops) <supports_btrace>: Remove.
48         (target_supports_btrace): Remove.
49
50 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
51
52         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
53         (handle_btrace_disable): Change return type to void.  Use exceptions
54         to report errors.
55         (handle_btrace_general_set): Catch exception and copy message to
56         return message.
57
58 2018-02-08  Tom Tromey  <tom@tromey.com>
59
60         * linux-low.c (install_software_single_step_breakpoints): Use
61         make_scoped_restore.
62         * inferiors.c (make_cleanup_restore_current_thread): Remove.
63         (do_restore_current_thread_cleanup): Remove.
64         * gdbthread.h (make_cleanup_restore_current_thread): Don't
65         declare.
66
67 2018-02-08  Tom Tromey  <tom@tromey.com>
68
69         * mem-break.c (set_raw_breakpoint_at): Use
70         gdb::unique_xmalloc_ptr.
71
72 2018-01-30  Pedro Alves  <palves@redhat.com>
73
74         PR gdb/13211
75         * target.c (target_terminal::terminal_state): Rename to ...
76         (target_terminal::m_terminal_state): ... this.
77
78 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
79
80         * linux-low.c (handle_extended_wait): Surround call to
81         thread_db_notice_clone with #ifdef USE_THREAD_DB.
82
83 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
84
85         * linux-low.c (attach_proc_task_lwp_callback): Adjust to
86         linux_ptrace_attach_fail_reason_string now returning an
87         std::string.
88         (linux_attach): Likewise.
89         * thread-db.c (attach_thread): Likewise.
90
91 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
92
93         PR gdb/21559
94         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
95         checking for fs_base/gs_base fields in struct user_regs_struct.
96         * configure: Regenerate.
97
98 2018-01-16  Yao Qi  <yao.qi@linaro.org>
99
100         PR gdb/18749
101         * linux-low.c (fetch_register): Call supply_register instead of
102         error.
103
104 2018-01-08  Yao Qi  <yao.qi@linaro.org>
105             Simon Marchi  <simon.marchi@ericsson.com>
106
107         * Makefile.in (OBS): Remove selftest.o.
108         * configure.ac: Set srv_selftest_objs if $development is true.
109         (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
110         * configure: Re-generated.
111         * server.c (captured_main): Wrap variable selftest_filter with
112         GDB_SELF_TEST.
113
114 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
115
116         * server.c (parse_debug_format_options): Return std::string.
117         (handle_monitor_command, captured_main): Adjust.
118
119 2018-01-05  Pedro Alves  <palves@redhat.com>
120
121         PR gdb/18653
122         * server.c (captured_main): Pass quiet=false to
123         save_original_signals_state.
124
125 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
126
127         * gdbreplay.c (gdbreplay_version): Update copyright year in
128         version message.
129         * server.c (gdbserver_version): Likewise.
130
131 2017-12-08  Tom Tromey  <tom@tromey.com>
132
133         * ax.c (ax_printf): Update.
134
135 2017-12-07  Yao Qi  <yao.qi@linaro.org>
136
137         * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
138         aarch64_linux_read_description.
139         * linux-amd64-ipa.c (idx2mask): New array.
140         (get_ipa_tdesc): Move idx2mask out.
141         (initialize_low_tracepoint): Initialize target descriptions.
142         * linux-i386-ipa.c (idx2mask): New array.
143         (get_ipa_tdesc): Move idx2mask out.
144         (initialize_low_tracepoint): Initialize target descriptions.
145
146 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
147
148         * tdesc.c (struct tdesc_type): Change return type.
149         (tdesc_add_flag): Change parameter type.
150         (tdesc_add_bitfield): Likewise.
151         (tdesc_add_field): Likewise.
152         (tdesc_set_struct_size): Likewise.
153
154 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
155
156         * regcache.c (registers_to_string): Remove unused variable.
157
158 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
159
160         * inferiors.c (for_each_inferior_with_data): Remove.
161         * inferiors.h (for_each_inferior_with_data): Remove.
162         * server.c (handle_qxfer_threads_worker): Change parameter type.
163         (handle_qxfer_threads_proper): Use for_each_thread.
164
165 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
166
167         * inferiors.c (for_each_inferior): Remove.
168         (clear_inferiors): Use for_each_thread.
169         * inferiors.h (for_each_inferior): Remove.
170         * linux-low.c (linux_wait_for_event_filtered): Use
171         for_each_thread.
172         (linux_stabilize_threads): Likewise.
173         * regcache.c (regcache_release): Likewise.
174         * server.c (gdb_wants_all_threads_stopped): Likewise.
175         (clear_pending_status_callback): Remove.
176         (handle_status): Use for_each_thread.
177         (captured_main): Likewise.
178         * win32-low.c (child_init_thread_list): Likewise.
179         (win32_clear_inferiors): Likewise.
180         (fake_breakpoint_event): Likewise.
181
182 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
183
184         * inferiors.h (find_inferior): Remove.
185         * inferiors.c (find_inferior): Remove.
186
187 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
188
189         * linux-low.c (resume_status_pending_p): Update comment.
190         (need_step_over_p): Update comment.
191
192 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
193
194         * linux-low.c (proceed_one_lwp): Return void, change parameter
195         type.
196         (unsuspend_and_proceed_one_lwp): Likewise.
197         (proceed_all_lwps): Use for_each_thread.
198         (unstop_all_lwps): Likewise.
199
200 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
201
202         * linux-low.c (linux_resume_one_thread): Return void, take
203         parameter directly.
204         (linux_resume): Use for_each_thread.
205
206 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
207
208         * linux-low.c (send_sigstop_callback): Return void, change
209         parameter type.  Rename to...
210         (send_sigstop): ... this.
211         (suspend_and_send_sigstop_callback): Return void, change parameter
212         type.  Rename to...
213         (suspend_and_send_sigstop): ... this.
214         (stop_all_lwps): Use for_each_thread.
215
216 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
217
218         * linux-low.c (lwp_running): Return bool, remove unused
219         argument.
220         (linux_stabilize_threads): Use find_thread.
221
222 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
223
224         * linux-low.c (select_singlestep_lwp_callback): Remove.
225         (count_events_callback): Remove.
226         (select_event_lwp_callback): Remove.
227         (select_event_lwp): Use find_thread/for_each_thread.
228
229 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
230
231         * linux-low.c (not_stopped_callback): Return bool, take filter
232         argument directly.
233         (linux_wait_for_event_filtered): Use find_thread.
234         (linux_wait_1): Likewise.
235
236 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
237
238         * linux-low.c (same_lwp): Remove.
239         (find_lwp_pid): Use find_thread.
240
241 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
242
243         * linux-low.c (delete_lwp_callback): Remove.
244         (linux_mourn): Use for_each_thread.
245
246 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
247
248         * linux-low.c (linux_detach_lwp_callback): Return void, remove
249         args parameter, don't check for pid.
250         (linux_detach): Use for_each_thread.
251
252 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
253
254         * linux-low.c (struct counter): Remove.
255         (second_thread_of_pid_p): Remove.
256         (last_thread_of_process_p): Use find_thread.
257
258 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
259
260         * inferiors.c (find_inferior_in_random): Remove.
261         * inferiors.h (find_inferior_in_random): Remove.
262         * linux-low.c (status_pending_p_callback): Return bool, accept
263         parameter ptid directly.
264         (linux_wait_for_event_filtered): Use find_thread_in_random.
265         (linux_wait_1): Likewise.
266
267 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
268
269         * inferiors.c (find_inferior_id): Remove.
270         (find_thread_ptid): Move implemention from find_inferior_id to
271         here.
272         * inferiors.h (find_inferior_id): Remove.
273         * server.c (handle_status): Use find_thread_ptid.
274         (process_serial_event): Likewise.
275         * thread-db.c (find_one_thread): Likewise.
276         (thread_db_thread_handle): Likewise.
277         * win32-low.c (thread_rec): Likewise.
278         (child_delete_thread): Likewise.
279         (win32_thread_alive): Likewise.
280         (get_child_debug_event): Likewise.
281
282 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
283
284         * linux-mips-low.c (update_watch_registers_callback): Return
285         void, remove pid_p parameter, don't check for pid.
286         (mips_insert_point, mips_remove_point): Use for_each_thread.
287
288 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
289
290         * lynx.low (lynx_delete_thread_callback): Remove.
291         (lynx_mourn): Use for_each_thread.
292
293 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
294
295         * regcache.c (regcache_invalidate_one): Remove.
296         (regcache_invalidate_pid): use for_each_thread.
297
298 2017-11-26  Tom Tromey  <tom@tromey.com>
299
300         * linux-low.c (linux_create_inferior): Update.
301
302 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
303
304         * spu-low.c (spu_create_inferior): Fix typo in argument name.
305
306 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
307
308         * configure.srv: Add linux-aarch64-tdesc-selftest.o.
309         * linux-aarch64-low.c (initialize_low_arch): Call init func.
310         * linux-aarch64-tdesc-selftest.c: New file.
311         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
312
313 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
314
315         * configure.srv: Add new file.
316         * linux-aarch64-low.c (initialize_low_arch): Call init func.
317         * linux-aarch64-tdesc-selftest.c: New file.
318         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
319
320 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
321
322         * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
323         * linux-aarch64-low.c (initialize_low_arch): Remove init.
324         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
325
326 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
327
328         * configure.srv: Add new files.
329         * linux-aarch64-ipa.c (get_ipa_tdesc): Call
330         aarch64_linux_read_description.
331         * linux-aarch64-low.c (aarch64_linux_read_description):
332         Merge with aarch64_arch_setup.
333         (aarch64_arch_setup): Call aarch64_linux_read_description.
334         * linux-aarch64-tdesc.c: New file.
335         * linux-aarch64-tdesc.h: New file.
336
337 2017-11-24  Yao Qi  <yao.qi@linaro.org>
338
339         * configure.srv: Set $srv_regobj for tic6x-linux.
340         * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
341         (tic6x_read_description): Move some code to tic6x_arch_setup.
342         (tic6x_tdesc_test): New function.
343         (initialize_low_arch): Call selftests::register_test.
344
345 2017-11-22  Yao Qi  <yao.qi@linaro.org>
346
347         * remote-utils.c (prepare_resume_reply): Use memcpy.
348
349 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
350
351         * linux-low.c (kill_one_lwp_callback): Return void, take
352         argument directly, don't filter on pid.
353         (linux_kill): Use for_each_thread.
354
355 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
356
357         * linux-low.c (need_step_over_p): Return bool, remove dummy
358         argument.
359         (linux_resume, proceed_all_lwps): Use find_thread.
360
361 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
362
363         * linux-low.c (resume_status_pending_p): Return bool, remove
364         flag_p argument.
365         (linux_resume): Use find_thread.
366
367 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
368
369         * linux-low.c (struct thread_resume_array): Remove.
370         (linux_set_resume_request): Return void, take arguments
371         directly.
372         (linux_resume): Use for_each_thread.
373
374 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
375
376         * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
377         return bool, remove data argument.
378         (linux_stabilize_threads): Use find_thread.
379
380 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
381
382         * linux-low.c (unsuspend_one_lwp): Remove.
383         (unsuspend_all_lwps): Use for_each_thread, inline code from
384         unsuspend_one_lwp.
385
386 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
387
388         * gdbthread.h (find_thread): Add overload with ptid_t filter.
389         * linux-low.c (struct iterate_over_lwps_args): Remove.
390         (iterate_over_lwps_filter): Remove.
391         (iterate_over_lwps): Use find_thread.
392
393 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
394
395         * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
396         (linux_handle_new_gdb_connection): Use for_each_thread, inline
397         code from reset_lwp_ptrace_options_callback.
398
399 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
400
401         * linux-arm-low.c (struct update_registers_data): Remove.
402         (update_registers_callback): Return void, take arguments
403         directly, don't check thread's pid.
404         (arm_insert_point, arm_remove_point): Use for_each_thread.
405
406 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
407
408         * win32-low.c (continue_one_thread): Return void, take argument
409         directly.
410         (child_continue): Use for_each_thread.
411
412 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
413
414         * win32-i386-low.c (update_debug_registers_callback): Rename
415         to ...
416         (update_debug_registers): ... this, return void, remove pid_p arg.
417         (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
418
419 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
420
421         * inferiors.h (struct process_info): Add constructor, initialize
422         fields..
423         <syscalls_to_catch>: Change type to std::vector<int>.
424         * inferiors.c (add_process): Allocate process_info with new.
425         (remove_process): Free process_info with delete.
426         * linux-low.c (handle_extended_wait): Adjust.
427         (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
428         * server.c (handle_general_set): Adjust.
429
430 2017-11-16  Pedro Alves  <palves@redhat.com>
431
432         * remote-utils.c (remote_close): Block SIGIO signals instead of
433         uninstalling the SIGIO handler.
434
435 2017-11-16  Alan Hayward  <alan.hayward@arm.com>
436
437         * tdesc.c (tdesc_get_features_xml): Allow null osabi.
438
439 2017-11-16  Yao Qi  <yao.qi@linaro.org>
440
441         * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
442         (tic6x_store_gregset): Likewise.
443         (tic6x_usrregs_info): Move it up.
444
445 2017-11-15  Alan Hayward  <alan.hayward@arm.com>
446
447         * Makefile.in: Update arch rules.
448         * configure.srv: Explicitly mark arch/ files.
449
450 2017-11-13  Andreas Schwab  <schwab@suse.de>
451
452         * linux-m68k-low.c (m68k_supports_hardware_single_step): New
453         function.
454         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
455
456 2017-11-06  Pedro Alves  <palves@redhat.com>
457
458         * config.in, configure: Regenerate.
459
460 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
461
462         * target.c (struct thread_search): Remove.
463         (thread_search_callback): Remove.
464         (prepare_to_access_memory): Use for_each_thread instead of
465         find_inferior.  Inline code from thread_search_callback.
466
467 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
468
469         * server.c (struct visit_actioned_threads_data): Remove.
470         (visit_actioned_threads): Change prototype to take arguments
471         directly.
472         (resume): Use find_thread instead of find_inferior.
473
474 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
475
476         * server.c (queue_stop_reply_callback): Change prototype, return
477         void.
478         (find_status_pending_thread_callback): Remove.
479         (handle_status): Replace find_inferior with find_thread and
480         for_each_thread.
481
482 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
483
484         * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
485         with REGNO.
486         (aarch64_store_gregset): Likewise.
487         (aarch64_fill_fpregset): Likewise.
488         (aarch64_store_fpregset): Likewise.
489
490 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
491
492         * gdbthread.h (find_thread, for_each_thread): New functions.
493         * inferiors.c (thread_of_pid): Remove.
494         (find_any_thread_of_pid): Use find_thread.
495         * linux-low.c (num_lwps): Use for_each_thread.
496
497 2017-10-17  Yao Qi  <yao.qi@linaro.org>
498
499         * Makefile.in: Remove one rule.
500         * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
501
502 2017-10-17  Yao Qi  <yao.qi@linaro.org>
503
504         * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
505         Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
506
507 2017-10-17  Yao Qi  <yao.qi@linaro.org>
508
509         * configure.srv: Rename arm.o with arch/arm.o.
510
511 2017-10-17  Yao Qi  <yao.qi@linaro.org>
512
513         * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
514         (clean): Remove .o files in CONFIG_SRC_SUBDIR.
515         (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
516         (arch-i386.o, arch-amd64.o): Remove rules.
517         (arch/%.o): New rule.
518         Update POSTCOMPILE and COMPILE.pre.
519         * configure.ac: Invoke AC_CONFIG_COMMANDS.
520         * configure: Re-generated.
521         * configure.srv: Replace arch-i386.o with arch/i386.o.
522         Replace arch-amd64.o with arch/amd64.o.
523
524 2017-10-16  Yao Qi  <yao.qi@linaro.org>
525
526         * configure: Regenerated.
527
528 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
529
530         * inferiors.h: (struct inferior_list): Remove.
531         (struct inferior_list_entry); Remove.
532         (add_inferior_to_list, clear_inferior_list, one_inferior_p,
533         A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
534         get_first_inferior): Remove.
535         (for_each_inferior, for_each_inferior_with_data, find_inferior,
536         find_inferior_id, find_inferior_in_random): Change signature.
537         * inferiors.c (all_threads): Change type to
538         std::list<thread_info *>.
539         (get_thread): Remove macro.
540         (find_inferior, find_inferior_id): Change signature, implement
541         using find_thread.
542         (find_inferior_in_random): Change signature, implement using
543         find_thread_in_random.
544         (for_each_inferior, for_each_inferior_with_data): Change
545         signature, implement using for_each_thread.
546         (add_inferior_to_list, remove_inferior): Remove.
547         (add_thread, get_first_thread, thread_of_pid,
548         find_any_thread_of_pid, free_one_thread, remove_thread): Update.
549         (get_first_inferior, one_inferior_p, clear_inferior_list):
550         Remove.
551         (clear_inferiors, get_thread_process): Update.
552         * gdbthread.h: Include <list>.
553         (struct thread_info) <entry>: Remove field.
554         <id>: New field.
555         (all_threads): Change type to std::list<thread_info *>.
556         (get_first_inferior): Add doc.
557         (find_thread, for_each_thread, find_thread_in_random): New
558         functions.
559         (current_ptid, pid_of, ptid_of, lwpid_of): Update.
560         * linux-arm-low.c (update_registers_callback): Update.
561         * linux-low.c (second_thread_of_pid_p): Update.
562         (kill_one_lwp_callback, linux_detach_lwp_callback,
563         delete_lwp_callback, status_pending_p_callback, same_lwp,
564         find_lwp_pid, num_lwps, iterate_over_lwps_filter,
565         iterate_over_lwps, not_stopped_callback,
566         resume_stopped_resumed_lwps, count_events_callback,
567         select_singlestep_lwp_callback, select_event_lwp_callback,
568         unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
569         suspend_and_send_sigstop_callback, wait_for_sigstop,
570         stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
571         lwp_running, linux_set_resume_request, resume_status_pending_p,
572         need_step_over_p, start_step_over, linux_resume_one_thread,
573         proceed_one_lwp, unsuspend_and_proceed_one_lwp,
574         reset_lwp_ptrace_options_callback): Update.
575         * linux-mips-low.c (update_watch_registers_callback): Update.
576         * regcache.c (regcache_invalidate_one, regcache_invalidate):
577         Update.
578         (free_register_cache_thread_one): Remove.
579         (regcache_release): Update.
580         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
581         handle_qxfer_threads_worker): Update.
582         (handle_query): Update, use list iterator.
583         (visit_actioned_threads, handle_pending_status,
584         queue_stop_reply_callback, gdb_wants_all_threads_stopped,
585         clear_pending_status_callback, set_pending_status_callback,
586         find_status_pending_thread_callback, handle_status,
587         process_serial_event): Update.
588         * target.c (thread_search_callback): Update.
589         * thread-db.c (thread_db_get_tls_address): Update.
590         * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
591         Update.
592         * win32-i386-low.c (update_debug_registers_callback): Update.
593         * win32-low.c (delete_thread_info, child_delete_thread,
594         continue_one_thread, suspend_one_thread,
595         get_child_debug_event): Adjust.
596
597 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
598
599         * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
600         * inferiors.h: Include <list>.
601         (struct process_info) <entry>: Remove field.
602         <pid>: New field.
603         (pid_of): Change macro to function.
604         (ptid_of, lwpid_of): Remove macro.
605         (all_processes): Change type to std::list<process_info *>.
606         (ALL_PROCESSES): Remove macro.
607         (for_each_process, find_process): New function.
608         * inferiors.c (all_processes): Change type to
609         std::list<process_info *>.
610         (find_thread_process): Adjust.
611         (add_process): Likewise.
612         (remove_process): Likewise.
613         (find_process_pid): Likewise.
614         (get_first_process): Likewise.
615         (started_inferior_callback): Remove.
616         (have_started_inferiors_p): Adjust.
617         (attached_inferior_callback): Remove.
618         (have_attached_inferiors_p): Adjust.
619         * linux-low.c (check_zombie_leaders): Likewise.
620         * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
621         (x86_linux_update_xmltarget): Adjust.
622         * server.c (handle_query): Likewise.
623         (gdb_reattached_process): Remove.
624         (handle_status): Adjust.
625         (kill_inferior_callback): Likewise.
626         (detach_or_kill_inferior): Remove.
627         (print_started_pid): Likewise.
628         (print_attached_pid): Likewise.
629         (detach_or_kill_for_exit): Update.
630         (process_serial_event): Likewise.
631         * linux-arm-low.c (arm_new_fork): Likewise.
632
633 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
634
635         * dll.h: Include <list>.
636         (struct dll_info): Add constructor.
637         <entry>: Remove field.
638         (all_dlls): Change type to std::list<dll_info>.
639         * dll.c: Include <algorithm>.
640         (get_dll): Remove macro.
641         (all_dlls): Change type to std::list<dll_info *>.
642         (free_one_dll): Remove.
643         (match_dll): Likewise.
644         (loaded_dll): Adjust.
645         (unloaded_dll): Adjust to all_dlls type change, use
646         std::find_if.  Inline code from match_dll.
647         (clear_dlls): Adjust to all_dlls type change.
648         * server.c (emit_dll_description): Remove.
649         (handle_qxfer_libraries): Adjust to all_dlls type change,
650         integrate emit_dll_description's functionality.
651
652 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
653
654         * linux-low.h (struct linux_target_ops) <delete_process>: New
655         field.
656         * linux-low.c (linux_mourn): Call the_low_target.delete_process.
657         * linux-aarch64-low.c (aarch64_linux_delete_process): New.
658         (struct linux_target_ops): Add delete_process callback.
659         * linux-arm-low.c (arm_delete_process): New.
660         (struct linux_target_ops): Add delete_process callback.
661         * linux-bfin-low.c (struct linux_target_ops): Likewise.
662         * linux-crisv32-low.c (struct linux_target_ops): Likewise.
663         * linux-m32r-low.c (struct linux_target_ops): Likewise.
664         * linux-mips-low.c (mips_linux_delete_process): New.
665         (struct linux_target_ops): Add delete_process callback.
666         * linux-ppc-low.c (struct linux_target_ops): Likewise.
667         * linux-s390-low.c (struct linux_target_ops): Likewise.
668         * linux-sh-low.c (struct linux_target_ops): Likewise.
669         * linux-tic6x-low.c (struct linux_target_ops): Likewise.
670         * linux-tile-low.c (struct linux_target_ops): Likewise.
671         * linux-x86-low.c (x86_linux_delete_process): New.
672         (struct linux_target_ops): Add delete_process callback.
673         * linux-xtensa-low.c (struct linux_target_ops): Likewise.
674
675 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
676
677         * linux-aarch64-low.c (the_low_target): Add thread delete
678         callback.
679         * linux-arm-low.c (arm_delete_thread): New function.
680         (the_low_target): Add thread delete callback.
681         * linux-bfin-low.c (the_low_target): Likewise.
682         * linux-crisv32-low.c (the_low_target): Likewise.
683         * linux-low.c (delete_lwp): Invoke delete_thread callback if
684         set.
685         * linux-low.h (struct linux_target_ops) <delete_thread>: New
686         field.
687         * linux-m32r-low.c (the_low_target): Add thread delete callback.
688         * linux-mips-low.c (mips_linux_delete_thread): New function.
689         (the_low_target): Add thread delete callback.
690         * linux-ppc-low.c (the_low_target): Likewise.
691         * linux-s390-low.c (the_low_target): Likewise.
692         * linux-sh-low.c (the_low_target): Likewise.
693         * linux-tic6x-low.c (the_low_target): Likewise.
694         * linux-tile-low.c (the_low_target): Likewise.
695         * linux-x86-low.c (the_low_target): Likewise.
696         * linux-xtensa-low.c (the_low_target): Likewise.
697
698 2017-10-06  Yuanhui Zhang  <asmwarrior@gmail.com>
699
700         * win32-low.c: Include "common-inferior.h".
701
702 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
703
704         * inferiors.c (set_inferior_cwd): New function.
705         * server.c (handle_general_set): Handle QSetWorkingDir packet.
706         (handle_query): Inform that QSetWorkingDir is supported.
707         * win32-low.c (create_process): Pass the inferior's cwd to
708         CreateProcess.
709
710 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
711
712         * inferiors.c (current_inferior_cwd): New global variable.
713         (get_inferior_cwd): New function.
714         * inferiors.h (struct process_info) <cwd>: New field.
715
716 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
717
718         * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
719         (OBS): Add gdb_tilde_expand.o.
720
721 2017-10-02  Simon Marchi  <simon.marchi@ericsson.com>
722
723         * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
724         * nto-x86-low.c (nto_x86_arch_setup): Likewise.
725
726 2017-09-29  Pedro Alves  <palves@redhat.com>
727
728         * ax.c (gdb_parse_agent_expr): Constify.
729         * ax.h (gdb_parse_agent_expr): Constify.
730         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
731         Constify.
732         * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
733         * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
734         * remote-utils.h (read_ptid): Constify.
735         * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
736         (process_point_options, process_serial_event): Constify.
737         * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
738         (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
739         (cmd_qtbuffer): Constify.
740
741 2017-09-29  Pedro Alves  <palves@redhat.com>
742
743         * proc-service.c (ps_pdread): Return PS_ERR if reading memory
744         fails.
745
746 2017-09-29  Pedro Alves  <palves@redhat.com>
747
748         * linux-low.c (handle_extended_wait): Pass parent thread instead
749         of process to thread_db_notice_clone.
750         * linux-low.h (thread_db_notice_clone): Replace parent process
751         parameter with parent thread parameter.
752         * thread-db.c (find_one_thread): Add comment.
753         (thread_db_notice_clone): Replace parent process parameter with
754         parent thread parameter.  Temporarily switch to the parent thread.
755
756 2017-09-26  Sergio Durigan Junior  <sergiodj@redhat.com>
757
758         * gdbthread.h: Include "common-gdbthread.h".
759         * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
760         "if" when validating the ptid.
761         * remote-utils.c: Include "gdbthread.h".
762         (prepare_resume_reply): Use "switch_to_thread".
763         * target.c (done_accessing_memory): Likewise.
764
765 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
766
767         * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
768         s390x-gs-linux64.o to srv_regobj.  Add s390-gs-linux64.xml,
769         s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
770         srv_xmlfiles.  Add s390-gs-linux64-ipa.o and
771         s390x-gs-linux64-ipa.o to ipa_obj.
772         * linux-s390-low.c (HWCAP_S390_GS): New define.
773         (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
774         New functions.
775         (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
776         (s390_arch_setup): Check for guarded-storage support and choose
777         appropriate tdesc.
778         (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
779         init_registers_s390x_gs_linux64.
780         * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
781         enum value.
782         (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
783         (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
784
785 2017-09-22  Simon Marchi  <simon.marchi@ericsson.com>
786
787         * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
788
789 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
790
791         * linux-low.h (struct lwp_info): Add new field, thread_handle.
792         (thread_db_thread_handle): Declare.
793         * linux-low.c (linux_target_ops): Initialize thread_handle.
794         * server.c (handle_qxfer_threads_worker): Add support for
795         "handle" attribute.
796         * target.h (struct target_ops): Add new function pointer,
797         thread_handle.
798         (target_thread_handle): Define.
799         * thread-db.c (find_one_thread, attach_thread): Set thread_handle
800         field in lwp.
801         (thread_db_thread_handle): New function.
802
803 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
804
805         * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
806         * linux-low.h (thread_db_notice_clone): Declare.
807         * thread-db.c (thread_db_notice_clone): New function.
808
809 2017-09-21  Pedro Alves  <palves@redhat.com>
810
811         * server.c (gdb_read_memory, handle_status, process_serial_event)
812         (handle_serial_event, handle_target_event): Adjust to
813         set_desired_thread prototype change.
814         * target.c (set_desired_thread): Remove 'use_general' parameter
815         and adjust.
816         * target.h (set_desired_thread): Remove 'use_general' parameter.
817
818 2017-09-20  Tom Tromey  <tom@tromey.com>
819
820         * target.c (target_terminal::terminal_state): Define.
821         (target_terminal::init): Rename from target_terminal_init.
822         (target_terminal::inferior): Rename from
823         target_terminal_inferior.
824         (target_terminal::ours): Rename from target_terminal_ours.
825         (target_terminal::ours_for_output, target_terminal::info): New.
826
827 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
828
829         * server.c (accumulate_file_name_length): Remove.
830         (emit_dll_description): Adjust to std::string change.
831         (handle_qxfer_libraries): Use std::string to hold document.
832
833 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
834
835         * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
836         return type of xml_escape_text.
837         * server.c (emit_dll_description): Likewise.
838
839 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
840
841         * server.c (captured_main): Accept argument for --selftest.
842         Update run_tests call.
843         * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
844         when registering selftests.
845
846 2017-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>
847
848         * regcache.c (get_thread_regcache): Update code to use "std::vector"
849         instead of "VEC" for "target_desc.reg_defs".
850         (regcache_cpy): Likewise.
851         (registers_to_string): Likewise.
852         (registers_from_string): Likewise.
853         (find_regno): Likewise.
854         (supply_regblock): Likewise.
855         (regcache_raw_read_unsigned): Likewise.
856         * tdesc.c (init_target_desc): Likewise.
857         (tdesc_create_reg): Likewise.
858         * tdesc.h: Remove declaration of "tdesc_reg_p".  Include <vector>.
859         (struct target_desc) <reg_defs>: Convert to "std::vector".
860         (target_desc): Do not initialize "reg_defs".
861         (~target_desc): Update code to use "std::vector" instead of "VEC"
862         for "target_desc.reg_defs".
863         (operator==): Likewise.
864
865 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
866
867         * inferiors.h (thread_to_gdb_id): Remove.
868         * inferiors.c (thread_to_gdb_id): Remove.
869         * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
870         * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
871         lynx_store_registers, lynx_read_memory, lynx_write_memory):
872         Likewise.
873         * nto-low.c (nto_fetch_registers, nto_store_registers,
874         nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
875
876 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
877
878         * inferiors.h (gdb_id_to_thread_id): Remove.
879         * inferiors.c (gdb_id_to_thread_id): Remove.
880         * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
881         removal.  Move pid declaration closer to where it's used.
882
883 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
884
885         * server.c (handle_detach): New function.
886         (process_serial_event): Move code out, call handle_detach.
887
888 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
889
890         * server.c (require_running): Rename to ...
891         (require_running_or_return): ... this ...
892         (require_running_or_break): ... and this.
893         (handle_query, process_serial_event): Adjust.
894
895 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
896
897         * linux-low.c (linux_set_resume_request): Remove unused
898         variables.
899
900 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
901
902         * server.c (first_thread_of): Remove.
903         (process_serial_event): Replace usage of first_thread_of with
904         find_any_thread_of_pid.
905         * tracepoint.c (same_process_p): Remove.
906         (gdb_agent_about_to_close): Replace usage of same_process_p with
907         find_any_thread_of_pid.
908         * linux-x86-low.c (same_process_callback): Remove.
909         (x86_arch_setup_process_callback): Replace usage of
910         same_process_callback with find_any_thread_of_pid.
911         * thread-db.c (any_thread_of): Remove.
912         (switch_to_process): Replace usage of any_thread_of with
913         find_any_thread_of_pid.
914         * inferiors.c (thread_pid_matches_callback): Remove.
915         (find_thread_process): Adjust to use find_any_thread_of_pid.
916
917 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
918
919         * regcache.c (get_thread_regcache): Guard calls to "memset"
920           with "!VEC_empty".
921
922 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
923
924         * linux-low.c (handle_extended_wait): Use
925         "allocate_target_description" instead of "XNEW".
926         * linux-x86-low.c (initialize_low_arch): Likewise.
927
928 2017-09-05  Yao Qi  <yao.qi@linaro.org>
929
930         * configure.srv (srv_i386_regobj): Remove.
931         (srv_amd64_regobj): Remove.
932         (srv_regobj): Set it to "" for x86 non-linux targets.
933         * linux-x86-tdesc.c (i386_linux_read_description):
934         * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
935         (init_registers_i386): Remove the declaration.
936         (tdesc_i386): Remove the declaration.
937         (lynx_i386_arch_setup): Call i386_create_target_description.
938         * nto-x86-low.c: Likewise.
939         * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
940         [!__x86_64__]: include arch/i386.h.
941         (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
942
943 2017-09-05  Yao Qi  <yao.qi@linaro.org>
944
945         * configure.srv (srv_amd64_linux_xmlfiles): Remove
946         i386/amd64-XXX-linux from it.
947
948 2017-09-05  Yao Qi  <yao.qi@linaro.org>
949
950         * configure.srv: Empty srv_amd64_linux_regobj if $development is
951         false.
952         (ipa_amd64_linux_regobj): Remove.
953         (ipa_x32_linux_regobj): Remove.
954
955 2017-09-05  Yao Qi  <yao.qi@linaro.org>
956
957         * Makefile.in (arch-amd64.o): New rule.
958         * configure.srv: Append arch-amd64.o.
959         * linux-amd64-ipa.c: Include common/x86-xstate.h.
960         (get_ipa_tdesc): Call amd64_linux_read_description.
961         (initialize_low_tracepoint): Don't call init_registers_x32_XXX
962         and init_registers_amd64_XXX.
963         * linux-x86-low.c (x86_linux_read_description): Call
964         amd64_linux_read_description.
965         (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
966         (initialize_low_arch): Don't call init_registers_x32_XXX and
967         init_registers_amd64_XXX.
968         * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
969         and tdesc_amd64_XXX.
970         [__x86_64__] (amd64_tdesc_test): New function.
971         (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
972         and init_registers_amd64_XXX.
973         * linux-x86-tdesc.c: Include arch/amd64.h.
974         (xcr0_to_tdesc_idx): New function.
975         (i386_linux_read_description): New function.
976         (amd64_get_ipa_tdesc_idx): New function.
977         * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
978         (amd64_get_ipa_tdesc): Declare.
979
980 2017-09-05  Yao Qi  <yao.qi@linaro.org>
981
982         * configure.srv (srv_i386_linux_xmlfiles): Remove
983         i386/i386-XXX-linux.xml from it.
984
985 2017-09-05  Yao Qi  <yao.qi@linaro.org>
986
987         * configure.srv: Set srv_i386_linux_regobj empty if $development
988         is false.
989         * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
990         initialize_low_tdesc.
991         * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
992         with #if initialize_low_tdesc.
993         * linux-x86-tdesc-selftest.c: New file.
994         * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
995
996 2017-09-05  Yao Qi  <yao.qi@linaro.org>
997
998         * Makefile.in (arch-i386.o): New rule.
999         * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1000         (x86_64-*-linux*): Likewise.
1001         * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1002         include arch/i386.h.
1003         (i386_linux_read_description): Remove code and call
1004         i386_create_target_description.
1005         * tdesc.c (allocate_target_description): New function.
1006         * tdesc.h (set_tdesc_architecture): Remove declaration.
1007         (set_tdesc_osabi): Likewise.
1008
1009 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1010
1011         * linux-x86-tdesc.c: Don't include <inttypes.h>.
1012         (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1013         set_tdesc_architecture and set_tdesc_osabi.  Remove code setting
1014         .xmltarget.
1015         * server.c (get_features_xml): Call tdesc_get_features_xml.
1016         * tdesc.c (set_tdesc_architecture): New function.
1017         (set_tdesc_osabi): New function.
1018         (tdesc_get_features_xml): New function.
1019         (tdesc_create_feature): Add an argument.
1020         * tdesc.h (struct target_desc) <features>: New field.
1021         <arch, osabi>: New field.
1022         (~target_desc): xfree features, arch, and osabi.
1023         (target_desc::oerator==): Don't compare .xmltarget.
1024         [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1025         (set_tdesc_osabi): Likewise.
1026         (tdesc_get_features_xml): Likewise.
1027
1028 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1029
1030         * linux-x86-tdesc.c: Include selftest.h.
1031         (i386_tdesc_test): New function.
1032         (initialize_low_tdesc): Call selftests::register_test.
1033         * tdesc.h: Include regdef.h.
1034         (target_desc): Override operator == and !=.
1035
1036 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1037
1038         * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1039         (ipa_obj): Likewise.
1040         * linux-i386-ipa.c: Include common/x86-xstate.h
1041         (get_ipa_tdesc): Call i386_linux_read_description.
1042         (initialize_low_tracepoint): Don't call  init_registers_XXX
1043         functions, call initialize_low_tdesc instead.
1044         * linux-x86-low.c (x86_linux_read_description): Call
1045         i386_linux_read_description.
1046         (initialize_low_arch): Don't call init_registers_i386_XXX
1047         functions, call initialize_low_tdesc.
1048         * linux-x86-tdesc.c: New file.
1049         * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1050         (i386_get_ipa_tdesc_idx): Declare.
1051         (i386_get_ipa_tdesc): Declare.
1052         (initialize_low_tdesc): Declare.
1053
1054 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1055
1056         * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1057         instead of 0.
1058
1059 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1060
1061         * Makefile.in (IPA_OBJS): Add vec-ipa.o
1062         * regcache.c (get_thread_regcache): Use VEC_length.
1063         (init_register_cache): Likewise.
1064         (regcache_cpy): Likewise.
1065         (registers_to_string): Iterate reg_defs via VEC_iterate.
1066         (find_regno): Likewise.
1067         (find_register_by_number): Use VEC_index.
1068         (register_size): Call find_register_by_number.
1069         (register_data): Call find_register_by_number.
1070         (supply_regblock): Use VEC_length.
1071         (regcache_raw_read_unsigned): Likewise.
1072         * tdesc.c (init_target_desc): Iterate reg_defs via
1073         VEC_iterate.
1074         (default_description): Update initializer.
1075         (copy_target_description): Don't update field num_registers.
1076         * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1077         <num_registers>: Remove.
1078
1079 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1080
1081         * Makefile.in (.SECONDARY): Define target.
1082
1083 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
1084
1085         * linux-low.c (linux_wait_1): Adjust.
1086         * server.c (queue_stop_reply_callback): Adjust.
1087
1088 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1089
1090         * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1091         QEnvironmentUnset and QEnvironmentReset packets.
1092         (handle_query): Inform remote that QEnvironmentHexEncoded,
1093         QEnvironmentUnset and QEnvironmentReset are supported.
1094
1095 2017-08-25  Simon Marchi  <simon.marchi@ericsson.com>
1096
1097         * inferiors.h (inferior_target_data): Rename to ...
1098         (thread_target_data): ... this.
1099         (inferior_regcache_data): Rename to ...
1100         (thread_regcache_data): ... this.
1101         (set_inferior_regcache_data): Rename to ...
1102         (set_thread_regcache_data): ... this.
1103         * inferiors.c (inferior_target_data): Rename to ...
1104         (thread_target_data): ... this.
1105         (inferior_regcache_data): Rename to ...
1106         (thread_regcache_data): ... this.
1107         (set_inferior_regcache_data): Rename to ...
1108         (set_thread_regcache_data): ... this.
1109         (free_one_thread): Update.
1110         * linux-low.h (get_thread_lwp): Update.
1111         * regcache.c (get_thread_regcache): Update.
1112         (regcache_invalidate_thread): Update.
1113         (free_register_cache_thread): Update.
1114         * win32-i386-low.c (update_debug_registers_callback): Update.
1115         (win32_get_current_dr): Update.
1116         * win32-low.c (thread_rec): Update.
1117         (delete_thread_info): Update.
1118         (continue_one_thread): Update.
1119         (suspend_one_thread): Update.
1120
1121 2017-08-24  Simon Marchi  <simon.marchi@ericsson.com>
1122
1123         * inferiors.c (set_inferior_target_data): Remove.
1124         * inferiors.h (set_inferior_target_data): Remove.
1125
1126 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1127
1128         * Makefile.in (OBS): Add selftest.o.
1129         * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1130         * configure, config.in: Re-generated.
1131         * server.c: Include common/sefltest.h.
1132         (captured_main): Handle option --selftest.
1133
1134 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1135
1136         * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1137         i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1138         i386-avx-mpx.o and i386-mmx.o.
1139         (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1140         amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1141         (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1142         i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1143         i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1144         (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1145         i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1146         i386/amd64-avx-mpx.xml.
1147
1148 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1149
1150         * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1151         and x32-avx-avx512.o.
1152         (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1153         i386/x32-avx-avx512.xml.
1154
1155 2017-07-26  Simon Marchi  <simon.marchi@ericsson.com>
1156
1157         * tracepoint.h (enum class fast_tpoint_collect_result): New
1158         enumeration.
1159         (fast_tracepoint_collecting): Change return type to
1160         fast_tpoint_collect_result.
1161         * tracepoint.c (fast_tracepoint_collecting): Likewise.
1162         * linux-low.h: Include tracepoint.h.
1163         (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1164         fast_tpoint_collect_result.
1165         * linux-low.c (handle_tracepoints): Adjust.
1166         (linux_fast_tracepoint_collecting): Change return type to
1167         fast_tpoint_collect_result.
1168         (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1169         linux_wait_1, stuck_in_jump_pad_callback,
1170         lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1171         proceed_one_lwp): Adjust to type change.
1172
1173 2017-07-10  Yao Qi  <yao.qi@linaro.org>
1174
1175         * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1176
1177 2017-06-29  Yao Qi  <yao.qi@linaro.org>
1178
1179         * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1180         Remove.
1181         [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1182
1183 2017-06-20  Simon Marchi  <simon.marchi@ericsson.com>
1184
1185         * Makefile.in (IPA_OBJS): Sort and format one item per line.
1186
1187 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1188
1189         * linux-low.c (linux_create_inferior): Adjust code to access the
1190         environment information via 'gdb_environ' class.
1191         * lynx-low.c (lynx_create_inferior): Likewise.
1192         * server.c (our_environ): Make it an instance of 'gdb_environ'.
1193         (get_environ): Return a pointer to 'our_environ'.
1194         (captured_main): Initialize 'our_environ'.
1195         * server.h (get_environ): Adjust prototype.
1196         * spu-low.c (spu_create_inferior): Adjust code to access the
1197         environment information via 'gdb_environ' class.
1198
1199 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1200
1201         * linux-low.c (linux_read_memory, linux_write_memory): Remove
1202         usage of "register" keyword.
1203
1204 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1205
1206         * configure: Re-generate.
1207
1208 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1209
1210         * configure: Re-generate.
1211
1212 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1213
1214         * Makefile.in (COMPILE.pre): Add "-x c++".
1215
1216 2017-06-09  Sergio Durigan Junior  <sergiodj@redhat.com>
1217
1218         * fork-child.c: Conditionally include <signal.h>.
1219
1220 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1221
1222         * server.c (handle_general_set): Handle new packet
1223         "QStartupWithShell".
1224         (handle_query): Add "QStartupWithShell" to the list of supported
1225         packets.
1226         (gdbserver_usage): Add help text explaining the
1227         new "--startup-with-shell" and "--no-startup-with-shell" CLI
1228         options.
1229         (captured_main): Recognize and act upon the presence of the new
1230         CLI options.
1231
1232 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1233             Pedro Alves  <palves@redhat.com>
1234
1235         * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1236         * configure: Regenerate.
1237         * configure.srv (srv_linux_obj): Add "fork-child.o" and
1238         "fork-inferior.o".
1239         (i[34567]86-*-lynxos*): Likewise.
1240         (spu*-*-*): Likewise.
1241         * fork-child.c: New file.
1242         * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1243         and "environ.h".
1244         (linux_ptrace_fun): New function.
1245         (linux_create_inferior): Adjust function prototype to reflect
1246         change on "target.h".  Adjust function code to use
1247         "fork_inferior".
1248         (linux_request_interrupt): Delete "signal_pid".
1249         * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1250         (lynx_ptrace_fun): New function.
1251         (lynx_create_inferior): Adjust function prototype to reflect
1252         change on "target.h".  Adjust function code to use
1253         "fork_inferior".
1254         * nto-low.c (nto_create_inferior): Adjust function prototype and
1255         code to reflect change on "target.h".  Update comments.
1256         * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1257         "common-terminal.h" and "environ.h".
1258         (terminal_fd): Moved to fork-child.c.
1259         (old_foreground_pgrp): Likewise.
1260         (restore_old_foreground_pgrp): Likewise.
1261         (last_status): Make it global.
1262         (last_ptid): Likewise.
1263         (our_environ): New variable.
1264         (startup_with_shell): Likewise.
1265         (program_name): Likewise.
1266         (program_argv): Rename to...
1267         (program_args): ...this.
1268         (wrapper_argv): New variable.
1269         (start_inferior): Delete function.
1270         (get_exec_wrapper): New function.
1271         (get_exec_file): Likewise.
1272         (get_environ): Likewise.
1273         (prefork_hook): Likewise.
1274         (post_fork_inferior): Likewise.
1275         (postfork_hook): Likewise.
1276         (postfork_child_hook): Likewise.
1277         (handle_v_run): Update code to deal with arguments coming from the
1278         remote host.  Update calls from "start_inferior" to
1279         "create_inferior".
1280         (captured_main): Likewise.  Initialize environment variable.  Call
1281         "have_job_control".
1282         * server.h (post_fork_inferior): New prototype.
1283         (get_environ): Likewise.
1284         (last_status): Declare.
1285         (last_ptid): Likewise.
1286         (signal_pid): Likewise.
1287         * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1288         (spu_ptrace_fun): New function.
1289         (spu_create_inferior): Adjust function prototype to reflect change
1290         on "target.h".  Adjust function code to use "fork_inferior".
1291         * target.c (target_terminal_init): New function.
1292         (target_terminal_inferior): Likewise.
1293         (target_terminal_ours): Likewise.
1294         * target.h: Include <vector>.
1295         (struct target_ops) <create_inferior>: Update prototype.
1296         (create_inferior): Update macro.
1297         * utils.c (gdb_flush_out_err): New function.
1298         * win32-low.c (win32_create_inferior): Adjust function prototype
1299         and code to reflect change on "target.h".
1300
1301 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1302
1303         * inferiors.c (switch_to_thread): New function.
1304
1305 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1306
1307         * Makefile.in (SFILE): Add "common/job-control.c".
1308         (OBS): Add "job-control.o".
1309
1310 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1311
1312         * Makefile: Remove "@host_makefile_frag@".
1313
1314 2017-05-05  Pedro Alves  <palves@redhat.com>
1315
1316         * configure: Regenerate.
1317
1318 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1319
1320         * configure: Regenerate.
1321
1322 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
1323
1324         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1325         software_single_step change of return type to
1326         std::vector<CORE_ADDR>.
1327         * linux-low.c (install_software_single_step_breakpoints):
1328         Likewise.
1329         * linux-low.h (install_software_single_step_breakpoints):
1330         Likewise.
1331
1332 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1333
1334         * remote-utils.c: Include "gdb_termios.h" instead of
1335         "terminal.h".
1336         * terminal.h: Delete file.
1337
1338 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1339
1340         * server.c: Include <vector>.
1341         <program_argv, wrapper_argv>: Convert to std::vector.
1342         (start_inferior): Rewrite function to use C++.
1343         (handle_v_run): Likewise.  Update code that calculates the argv
1344         based on the vRun packet; use C++.
1345         (captured_main): Likewise.
1346
1347 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
1348
1349         * server.c (handle_v_cont): Initialize thread_resume::thread
1350         with null_ptid.
1351
1352 2017-04-05  Pedro Alves  <palves@redhat.com>
1353
1354         * configure: Regenerate.
1355
1356 2017-04-05  Pedro Alves  <palves@redhat.com>
1357
1358         * gdbreplay.c (sync_error): Constify.
1359         * linux-x86-low.c (push_opcode): Constify.
1360
1361 2017-04-05  Pedro Alves  <palves@redhat.com>
1362
1363         * win32-low.c (get_child_debug_event)
1364         <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1365         Report TARGET_WAITKIND_SPURIOUS instead.
1366
1367 2017-04-05  Pedro Alves  <palves@redhat.com>
1368
1369         * remote-utils.c (remote_prepare, remote_open): Constify.
1370         * remote-utils.h (remote_prepare, remote_open): Constify.
1371         * server.c (captured_main): Constify 'port' handling.
1372
1373 2017-04-04  Simon Marchi  <simon.marchi@ericsson.com>
1374
1375         * Makefile.in (clean): Clear .deps.
1376
1377 2017-03-31  Simon Marchi  <simon.marchi@polymtl.ca>
1378
1379         * .gitignore: Remove generated files, replace with wildcard.
1380         * (clean): Replace removal of generated files with wildcard.
1381         (version.c): Replace with...
1382         (version-generated.c): ...this.
1383         (xml-builtin.c): Replace with...
1384         (xml-builtin-generated.c): ...this.
1385         (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1386         (%.c: *regformats*): Replace with...
1387         (%-generated.c: *regformats*): ...this.
1388
1389 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1390
1391         * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1392         (xtensa_fill_gregset): Call collect_register_by_name for
1393         threadptr register.
1394         (xtensa_store_gregset): Call supply_register_by_name for
1395         threadptr register.
1396
1397 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1398
1399         * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1400         for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1401         (xtensa_store_gregset): Call supply_register for all registers in
1402         a0_regnum..a0_regnum + C0_NREGS range.
1403
1404 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1405
1406         * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1407         (ax-ipa.o: ax.c): Remove.
1408         (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1409         (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1410         (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1411         (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1412         (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1413
1414 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1415
1416         * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1417         (print-utils-ipa.o: ../common/print-utils.c): Remove.
1418         (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1419         (errors-ipa.o: ../common/errors.c): Remove.
1420         (format-ipa.o: ../common/format.c): Remove.
1421         (common-utils-ipa.o: ../common/common-utils.c): Remove.
1422
1423 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1424
1425         * Makefile.in (%-ipa.o: %.c): New rule.
1426         (tracepoint-ipa.o: tracepoint.c): Remove.
1427         (utils-ipa.o: utils.c): Remove.
1428         (remote-utils-ipa.o: remote-utils.c): Remove.
1429         (regcache-ipa.o: regcache.c): Remove.
1430         (i386-linux-ipa.o: i386-linux.c): Remove.
1431         (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1432         (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1433         (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1434         (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1435         (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1436         (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1437         (amd64-linux-ipa.o: amd64-linux.c): Remove.
1438         (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1439         (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1440         (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1441         (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1442         (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1443         (aarch64-ipa.o: aarch64.c): Remove.
1444         (s390-linux32-ipa.o: s390-linux32.c): Remove.
1445         (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1446         (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1447         (s390-linux64-ipa.o: s390-linux64.c): Remove.
1448         (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1449         (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1450         (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1451         (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1452         (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1453         (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1454         (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1455         (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1456         (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1457         (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1458         (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1459         (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1460         (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1461         (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1462         (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1463         (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1464         (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1465         (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1466         (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1467         (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1468         (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1469         (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1470         (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1471         (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1472         (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1473         (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1474         (tdesc-ipa.o: tdesc.c): Remove.
1475         (x32-linux-ipa.o: x32-linux.c): Remove.
1476         (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1477         (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1478
1479 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1480
1481         * Makefile.in (%.o: ../arch/%.c): New rule.
1482         (arm.o: ../arch/arm.c): Remove.
1483         (arm-linux.o: ../arch/arm-linux.c): Remove.
1484         (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1485         (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1486
1487 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1488
1489         * Makefile.in (%.o: ../nat/%.c): New rule.
1490         (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1491         (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1492         (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1493         (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1494         (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1495         (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1496         (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1497         (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1498         (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1499         (linux-personality.o: ../nat/linux-personality.c): Remove.
1500         (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1501         (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1502         (x86-linux.o: ../nat/x86-linux.c): Remove.
1503         (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1504         (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1505
1506 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1507
1508         * Makefile.in (%.o: ../common/%.c): New rule.
1509         (signals.o: ../common/signals.c): Remove.
1510         (print-utils.o: ../common/print-utils.c): Remove.
1511         (rsp-low.o: ../common/rsp-low.c): Remove.
1512         (common-utils.o: ../common/common-utils.c): Remove.
1513         (posix-strerror.o: ../common/posix-strerror.c): Remove.
1514         (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1515         (vec.o: ../common/vec.c): Remove.
1516         (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1517         (xml-utils.o: ../common/xml-utils.c): Remove.
1518         (ptid.o: ../common/ptid.c): Remove.
1519         (buffer.o: ../common/buffer.c): Remove.
1520         (format.o: ../common/format.c): Remove.
1521         (filestuff.o: ../common/filestuff.c): Remove.
1522         (agent.o: ../common/agent.c): Remove.
1523         (errors.o: ../common/errors.c): Remove.
1524         (environ.o: ../common/environ.c): Remove.
1525         (common-debug.o: ../common/common-debug.c): Remove.
1526         (cleanups.o: ../common/cleanups.c): Remove.
1527         (common-exceptions.o: ../common/common-exceptions.c): Remove.
1528         (fileio.o: ../common/fileio.c): Remove.
1529         (common-regcache.o: ../common/common-regcache.c): Remove.
1530         (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1531         (new-op.o: ../common/new-op.c): Remove.
1532         (btrace-common.o: ../common/btrace-common.c): Remove.
1533
1534 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1535
1536         * Makefile.in (%.o: ../target/%.c): New rule.
1537         (waitstatus.o: ../target/waitstatus.c): Remove.
1538
1539 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1540
1541         * Makefile.in
1542         (%.c: ../regformats/%.dat,
1543         (%.c: ../regformats/arm/%.dat,
1544         (%.c: ../regformats/i386/%.dat,
1545         (%.c: ../regformats/rs6000/%.dat): New rules.
1546         (aarch64.c): Remove.
1547         (reg-arm.c): Remove.
1548         (arm-with-iwmmxt.c): Remove.
1549         (arm-with-vfpv2.c): Remove.
1550         (arm-with-vfpv3.c): Remove.
1551         (arm-with-neon.c): Remove.
1552         (reg-bfin.c): Remove.
1553         (reg-cris.c): Remove.
1554         (reg-crisv32.c): Remove.
1555         (i386.c): Remove.
1556         (i386-linux.c): Remove.
1557         (i386-avx.c): Remove.
1558         (i386-avx-linux.c): Remove.
1559         (i386-avx-avx512.c): Remove.
1560         (i386-avx-avx512-linux.c): Remove.
1561         (i386-mpx.c): Remove.
1562         (i386-mpx-linux.c): Remove.
1563         (i386-avx-mpx-avx512-pku.c): Remove.
1564         (i386-avx-mpx-avx512-pku-linux.c): Remove.
1565         (i386-avx-mpx.c): Remove.
1566         (i386-avx-mpx-linux.c): Remove.
1567         (i386-mmx.c): Remove.
1568         (i386-mmx-linux.c): Remove.
1569         (reg-ia64.c): Remove.
1570         (reg-m32r.c): Remove.
1571         (reg-m68k.c): Remove.
1572         (reg-cf.c): Remove.
1573         (mips-linux.c): Remove.
1574         (mips-dsp-linux.c): Remove.
1575         (mips64-linux.c): Remove.
1576         (mips64-dsp-linux.c): Remove.
1577         (nios2-linux.c): Remove.
1578         (powerpc-32.c): Remove.
1579         (powerpc-32l.c): Remove.
1580         (powerpc-altivec32l.c): Remove.
1581         (powerpc-cell32l.c): Remove.
1582         (powerpc-vsx32l.c): Remove.
1583         (powerpc-isa205-32l.c): Remove.
1584         (powerpc-isa205-altivec32l.c): Remove.
1585         (powerpc-isa205-vsx32l.c): Remove.
1586         (powerpc-e500l.c): Remove.
1587         (powerpc-64l.c): Remove.
1588         (powerpc-altivec64l.c): Remove.
1589         (powerpc-cell64l.c): Remove.
1590         (powerpc-vsx64l.c): Remove.
1591         (powerpc-isa205-64l.c): Remove.
1592         (powerpc-isa205-altivec64l.c): Remove.
1593         (powerpc-isa205-vsx64l.c): Remove.
1594         (s390-linux32.c): Remove.
1595         (s390-linux32v1.c): Remove.
1596         (s390-linux32v2.c): Remove.
1597         (s390-linux64.c): Remove.
1598         (s390-linux64v1.c): Remove.
1599         (s390-linux64v2.c): Remove.
1600         (s390-te-linux64.c): Remove.
1601         (s390-vx-linux64.c): Remove.
1602         (s390-tevx-linux64.c): Remove.
1603         (s390x-linux64.c): Remove.
1604         (s390x-linux64v1.c): Remove.
1605         (s390x-linux64v2.c): Remove.
1606         (s390x-te-linux64.c): Remove.
1607         (s390x-vx-linux64.c): Remove.
1608         (s390x-tevx-linux64.c): Remove.
1609         (tic6x-c64xp-linux.c): Remove.
1610         (tic6x-c64x-linux.c): Remove.
1611         (tic6x-c62x-linux.c): Remove.
1612         (reg-sh.c): Remove.
1613         (reg-sparc64.c): Remove.
1614         (reg-spu.c): Remove.
1615         (amd64.c): Remove.
1616         (amd64-linux.c): Remove.
1617         (amd64-avx.c): Remove.
1618         (amd64-avx-linux.c): Remove.
1619         (amd64-avx-avx512.c): Remove.
1620         (amd64-avx-avx512-linux.c): Remove.
1621         (amd64-mpx.c): Remove.
1622         (amd64-mpx-linux.c): Remove.
1623         (amd64-avx-mpx-avx512-pku.c): Remove.
1624         (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1625         (amd64-avx-mpx.c): Remove.
1626         (amd64-avx-mpx-linux.c): Remove.
1627         (x32.c): Remove.
1628         (x32-linux.c): Remove.
1629         (x32-avx.c): Remove.
1630         (x32-avx-linux.c): Remove.
1631         (x32-avx-avx512.c): Remove.
1632         (x32-avx-avx512-linux.c): Remove.
1633         (reg-xtensa.c): Remove.
1634         (reg-tilegx.c): Remove.
1635         (reg-tilegx32.c): Remove.
1636
1637 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1638
1639         * Makefile.in (SFILES): Add "common/environ.c".
1640         (OBJS): Add "common/environ.h".
1641
1642 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1643
1644         * configure.ac: Check if the fs_base and gs_base members of
1645         `struct user_regs_struct' exist.
1646         * config.in: Regenerated.
1647         * configure: Likewise.
1648
1649 2017-01-09  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1650
1651         * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1652         target_read_memory.
1653         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1654         (get_next_pcs_syscall_next_pc): Likewise.
1655
1656 2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
1657
1658         * win32-i386-low.c: Fix incorrect reference to a couple source files.
1659         * nto-x86-low.c: Likewise.
1660
1661 2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
1662
1663         * Makefile.in: Include disable-implicit-rules.mk.
1664
1665 2016-11-23  Pedro Alves  <palves@redhat.com>
1666
1667         * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1668         (debug_vprintf): Use std::chrono::steady_clock instead of
1669         gettimeofday.  Use '.' instead of ':'.
1670         * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1671         (get_timestamp): Use std::chrono::steady_clock instead of
1672         gettimeofday.
1673
1674 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1675
1676         * Makefile.in: Fix whitespace formatting.
1677
1678 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1679
1680         * Makefile.in (SFILES, OBS): Flatten list and order
1681         alphabetically.
1682
1683 2016-11-23  Pedro Alves  <palves@redhat.com>
1684
1685         * event-loop.c (handle_file_event): Use warning.
1686         * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1687         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1688         Use warning.
1689
1690 2016-11-23  Pedro Alves  <palves@redhat.com>
1691
1692         * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1693         output.
1694         * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1695         * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1696         debug_printf and debug_flush for debug output.
1697         * server.c (handle_general_set): Likewise.
1698         * thread-db.c (try_thread_db_load): Use debug_printf for debug
1699         output.
1700
1701 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1702
1703         * Makefile.in (.c.o): Replace rule with ...
1704         (%.o: %.c): ... this one.
1705
1706 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1707
1708         * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1709         prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
1710         make.
1711         * configure.ac: Remove checks for the make program.
1712         * configure: Re-generate.
1713
1714 2016-10-28  Pedro Alves  <palves@redhat.com>
1715
1716         * Makefile.in (CXX_DIALECT): Get from configure.
1717         (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1718         * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1719         * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1720         * config.in: Regenerate.
1721         * configure: Regenerate.
1722
1723 2016-10-27  Yao Qi  <yao.qi@linaro.org>
1724
1725         * linux-low.c (linux_supports_range_stepping): Return true if
1726         can_software_single_step return true.
1727
1728 2016-10-27  Yao Qi  <yao.qi@linaro.org>
1729
1730         * inferiors.c (find_inferior_in_random): New function.
1731         * inferiors.h (find_inferior_in_random): Declare.
1732         * linux-low.c (linux_wait_for_event_filtered): Call
1733         find_inferior_in_random instead of find_inferior.
1734
1735 2016-10-27  Yao Qi  <yao.qi@linaro.org>
1736
1737         * linux-low.c (linux_wait_1): If single-step breakpoints are
1738         inserted, remove them.
1739
1740 2016-10-26  Pedro Alves  <palves@redhat.com>
1741
1742         * linux-low.c (handle_extended_wait): Link parent/child fork
1743         threads.
1744         (linux_wait_1): Unlink them.
1745         (linux_set_resume_request): Ignore resume requests for
1746         already-resumed and unhandled fork child threads.
1747         * linux-low.h (struct lwp_info) <fork_relative>: New field.
1748         * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1749         New functions.
1750         (handle_v_requests) <vCont>: Don't call require_running.
1751         * server.h (in_queued_stop_replies): New declaration.
1752
1753 2016-10-24  Yao Qi  <yao.qi@linaro.org>
1754
1755         PR server/20733
1756         * linux-aarch64-low.c (append_insns): Cast the return value to
1757         'uint32_t *'.
1758
1759 2016-10-10  Yao Qi  <yao.qi@linaro.org>
1760
1761         * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1762
1763 2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1764
1765         * target.c (target_supports_multi_process): New function, moved
1766         from...
1767         * target.h (target_supports_multi_process): ... here.  Remove
1768         macro.
1769
1770 2016-10-05  Tom Tromey  <tom@tromey.com>
1771
1772         PR remote/20655:
1773         * tracepoint.c (handle_tracepoint_bkpts): Check
1774         ipa_error_tracepoint, not ipa_stopping_tracepoint.
1775
1776 2016-10-05  Yao Qi  <yao.qi@linaro.org>
1777
1778         * configure.srv: Update the path of arm-*.xml files.
1779
1780 2016-10-05  Terry Guo  <terry.guo@arm.com>
1781             Yao Qi  <yao.qi@linaro.org>
1782
1783         * Makefile.in: Adjust the path of rules.
1784         * configure.srv: Update the path of xml files.
1785         * regformats/arm-with-iwmmxt.dat: Regenerated.
1786         * regformats/arm-with-neon.dat: Likewise.
1787         * regformats/arm-with-vfpv2.dat: Likewise.
1788         * regformats/arm-with-vfpv3.dat Likewise.
1789
1790 2016-09-30  Yao Qi  <yao.qi@linaro.org>
1791
1792         PR gdbserver/20627
1793         * target.c (target_stop_and_wait): Don't call
1794         target_continue_no_signal, use resume_stop instead.
1795
1796 2016-09-26  Yao Qi  <yao.qi@linaro.org>
1797
1798         * linux-low.c (linux_wait_1): Call debug_exit.
1799
1800 2016-09-23  Pedro Alves  <palves@redhat.com>
1801
1802         * Makefile.in (SFILES): Add common/new-op.c.
1803         (OBS): Add common/new-op.o.
1804         (new-op.o): New rule.
1805
1806 2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1807
1808         * .gitinore: Ignore more files.
1809
1810 2016-09-21  Yao Qi  <yao.qi@linaro.org>
1811
1812         * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1813         23.
1814
1815 2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
1816
1817         * server.c (start_inferior): Call target_mourn_inferior instead of
1818         mourn_inferior; pass ptid_t argument to it.
1819         (resume): Likewise.
1820         (handle_target_event): Likewise.
1821         * target.c (target_mourn_inferior): New function.
1822         * target.h (mourn_inferior): Delete macro.
1823
1824 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1825
1826         * linux-low.c (lwp_is_stepping): New function.
1827
1828 2016-09-06  Carl Love  <cel@us.ibm.com>
1829
1830         * server.c (start_inferior):  Fixed comment, requested comment change
1831         didn't get updated correctly.  Removed reference to ptrace () call as
1832         it is only true on Linux systems.
1833
1834 2016-09-06  Carl Love  <cel@us.ibm.com>
1835
1836         * server.c (start_inferior):  Do not call
1837         function target_post_create_inferior () if the
1838         inferior process has already exited.
1839
1840 2016-09-05  Pedro Alves  <palves@redhat.com>
1841
1842         * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1843         (COMPILE.pre, CC_LD): Use CXX directly.
1844         (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1845         * acinclude.m4: Don't include build-with-cxx.m4.
1846         * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1847         * configure: Regenerate.
1848
1849 2016-09-02  Akash Trehan  <akash.trehan123@gmail.com>
1850
1851         PR gdb/19495
1852         * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1853         call writing data to own_buf.
1854
1855 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
1856
1857         * target.c (mywait): Call target_wait instead of
1858         the_target->wait.
1859         (target_wait): New function.
1860
1861 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
1862
1863         * server.c (start_inferior): New variable 'ptid'.  Replace calls
1864         to the_target->resume by target_continue{,_no_signal}, depending
1865         on the case.
1866         * target.c (target_stop_and_wait): Call target_continue_no_signal
1867         instead of the_target->resume.
1868         (target_continue): New function.
1869
1870 2016-08-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1871
1872         * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1873
1874 2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
1875
1876         PR server/20491
1877         * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1878         ps_prochandle.
1879         * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1880         * linux-arm-low.c (ps_get_thread_area): Likewise.
1881         * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1882         * linux-m68k-low.c (ps_get_thread_area): Likewise.
1883         * linux-mips-low.c (ps_get_thread_area): Likewise.
1884         * linux-nios2-low.c (ps_get_thread_area): Likewise.
1885         * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1886         * linux-x86-low.c (ps_get_thread_area): Likewise.
1887         * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1888
1889 2016-08-19  Pedro Alves  <palves@redhat.com>
1890
1891         * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1892
1893 2016-08-19  Pedro Alves  <palves@redhat.com>
1894
1895         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1896         comment.  Use memcpy instead of casting through unsigned long.
1897
1898 2016-08-19  Pedro Alves  <palves@redhat.com>
1899
1900         * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1901         allocating around 0x80000000.
1902
1903 2016-08-19  Pedro Alves  <palves@redhat.com>
1904
1905         PR gdb/20415
1906         * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1907         (x32-avx512-linux-ipa.o): New rules.
1908         * configure.ac (x86_64-*-linux*): New x32 check.
1909         * configure.srv (ipa_x32_linux_regobj): New.
1910         (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1911         * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1912         descriptions.
1913         (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1914         descriptions.
1915         * configure: Regenerate.
1916
1917 2016-08-09  Pedro Alves  <palves@redhat.com>
1918
1919         PR gdb/18653
1920         * Makefile.in (OBS): Add signals-state-save-restore.o.
1921         (signals-state-save-restore.o): New rule.
1922         * config.in: Regenerate.
1923         * configure: Regenerate.
1924         * linux-low.c: Include "signals-state-save-restore.h".
1925         (linux_create_inferior): Call
1926         restore_original_signals_state.
1927         * server.c: Include "dispositions-save-restore.h".
1928         (captured_main): Call save_original_signals_state.
1929
1930 2016-08-05  Pedro Alves  <palves@redhat.com>
1931
1932         * configure: Regenerate.
1933
1934 2016-08-04  Yao Qi  <yao.qi@linaro.org>
1935
1936         * linux-low.c (regsets_fetch_inferior_registers): Check
1937         errno is ESRCH or not.
1938
1939 2016-08-02  Yao Qi  <yao.qi@linaro.org>
1940
1941         * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1942         <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1943         (thread_db_load_search): Update.
1944         (try_thread_db_load_1): Don't look for td_ta_event_addr,
1945         td_ta_set_event and td_ta_event_getmsg.
1946
1947 2016-07-26  Pedro Alves  <palves@redhat.com>
1948
1949         PR server/20414
1950         * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1951         of unsigned long for 64-bit registers and use uint32_t instead of
1952         unsigned int for 32-bit registers.
1953
1954 2016-07-26  Pedro Alves  <palves@redhat.com>
1955
1956         * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1957         to 'ptrace'.
1958
1959 2016-07-21  Tom Tromey  <tom@tromey.com>
1960
1961         * configure: Rebuild.
1962
1963 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1964
1965         * mem-break.c (find_gdb_breakpoint): Cast bp to
1966         'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1967
1968 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1969
1970         * server.c (handle_v_requests): Support s and S actions
1971         if target_supports_software_single_step return true.
1972
1973 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1974
1975         * linux-low.c (resume_stopped_resumed_lwps): If resume request
1976         is resume_step, call maybe_hw_step.
1977         (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1978         and unstop them.
1979         (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1980         breakpoints or not.
1981         (proceed_one_lwp): If resume request is resume_step, install
1982         reinsert breakpoints and call maybe_hw_step.
1983
1984 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1985
1986         * linux-low.c (proceed_one_lwp): Declare.
1987         (linux_resume_one_thread): Remove local variable 'step'.
1988         Lift code enqueue signal.  Call proceed_one_lwp instead of
1989         linux_resume_one_lwp.
1990
1991 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1992
1993         * linux-low.c (linux_resume_one_thread): Call
1994         enqueue_pending_signal.
1995
1996 2016-07-21  Yao Qi  <yao.qi@linaro.org>
1997
1998         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1999         * inferiors.c (do_restore_current_thread_cleanup): New function.
2000         (make_cleanup_restore_current_thread): Likewise.
2001         * linux-low.c (install_software_single_step_breakpoints): Call
2002         make_cleanup_restore_current_thread.  Switch current_thread to
2003         thread.
2004
2005 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2006
2007         * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2008         (set_reinsert_breakpoint): New parameter ptid.  Callers updated.
2009         (clone_one_breakpoint): Likewise.
2010         (delete_reinsert_breakpoints): Change parameter to thread.
2011         Callers updated.
2012         (has_reinsert_breakpoints): Likewise.
2013         (uninsert_reinsert_breakpoints): Likewise.
2014         (reinsert_reinsert_breakpoints): Likewise.
2015         * mem-break.h (set_reinsert_breakpoint): Update declaration.
2016         (delete_reinsert_breakpoints): Likewise.
2017         (reinsert_reinsert_breakpoints): Likewise.
2018         (uninsert_reinsert_breakpoints): Likewise.
2019         (has_reinsert_breakpoints): Likewise.
2020
2021 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2022
2023         * inferiors.c (get_thread_process): Make parameter const.
2024         * inferiors.h (get_thread_process): Update declaration.
2025         * mem-break.c (clone_all_breakpoints): Remove all parameters.
2026         Add new parameters child_thread and parent_thread.  Callers
2027         updated.
2028         * mem-break.h (clone_all_breakpoints): Update declaration.
2029
2030 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2031
2032         * mem-break.c (struct breakpoint) <cond_list>: Remove.
2033         <command_list, handler>: Remove.
2034         (struct gdb_breakpoint): New.
2035         (struct other_breakpoint): New.
2036         (struct reinsert_breakpoint): New.
2037         (is_gdb_breakpoint): New function.
2038         (any_persistent_commands): Update command_list if
2039         is_gdb_breakpoint returns true.
2040         (set_breakpoint): Create breakpoints according to their types.
2041         (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2042         (set_gdb_breakpoint_1): Likewise.
2043         (set_gdb_breakpoint): Likewise.
2044         (clear_breakpoint_conditions): Change parameter type to
2045         'struct gdb_breakpoint *'.
2046         (clear_breakpoint_commands): Likewise.
2047         (clear_breakpoint_conditions_and_commands): Likewise.
2048         (add_condition_to_breakpoint): Likewise.
2049         (add_breakpoint_condition): Likewise.
2050         (add_commands_to_breakpoint): Likewise.
2051         (check_breakpoints): Check other_breakpoint.
2052         (clone_one_breakpoint): Clone breakpopint according to its type.
2053         * mem-break.h (struct gdb_breakpoint): Declare.
2054         (set_gdb_breakpoint): Update declaration.
2055         (clear_breakpoint_conditions_and_commands): Likewise.
2056         (add_breakpoint_condition): Likewise.
2057         (add_breakpoint_commands): Likewise.
2058         * server.c (process_point_options): Change parameter type to
2059         'struct gdb_breakpoint *'.
2060
2061 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2062
2063         * mem-break.c (set_breakpoint_at): Rename it to ...
2064         (set_breakpoint_type_at): ... it.
2065         (set_breakpoint_at): Call set_breakpoint_type_at.
2066         (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2067         * mem-break.h (set_breakpoint_at): Update comments.
2068
2069 2016-07-12  Chung-Lin Tang  <cltang@codesourcery.com>
2070
2071         * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2072         to buf parameter.
2073         (nios2_store_gregset): Likewise.
2074
2075 2016-07-01  Pedro Alves  <palves@redhat.com>
2076             Antoine Tremblay  <antoine.tremblay@ericsson.com>
2077
2078         * linux-low.c: Change interface to take the target lwp_info
2079         pointer directly and return void.  Handle detaching from a zombie
2080         thread.
2081         (linux_detach_lwp_callback): New function.
2082         (linux_detach): Detach from the leader thread after detaching from
2083         the clone threads.
2084
2085 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2086
2087         * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2088         for variable new_offset.
2089         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2090         (aarch64_ftrace_insn_reloc_cb): Likewise.
2091         (aarch64_ftrace_insn_reloc_tb): Likewise.
2092         (aarch64_install_fast_tracepoint_jump_pad): Likewise.  Use
2093         PRIx64 instead of PRIx32.
2094
2095 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2096
2097         * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2098         (the_low_target): Install arm_get_syscall_trapinfo.
2099
2100 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2101
2102         * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2103         function.
2104         (the_low_target): Install aarch64_get_syscall_trapinfo.
2105
2106 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2107
2108         * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2109         Callers updated.
2110         * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2111         Remove parameter sysno.
2112         * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2113         sysret.
2114
2115 2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2116
2117         * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2118         (s390_emit_ne_goto): Likewise.
2119         (s390_emit_lt_goto): Likewise.
2120         (s390_emit_le_goto): Likewise.
2121         (s390_emit_gt_goto): Likewise.
2122         (s390_emit_ge_goto): Likewise.
2123         (s390x_emit_eq_goto): Likewise.
2124         (s390x_emit_ne_goto): Likewise.
2125         (s390x_emit_lt_goto): Likewise.
2126         (s390x_emit_le_goto): Likewise.
2127         (s390x_emit_gt_goto): Likewise.
2128         (s390x_emit_ge_goto): Likewise.
2129         (s390_emit_ops_impl): Mark variable static.
2130         (s390x_emit_ops): Likewise.
2131
2132 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2133
2134         * linux-low.c (handle_extended_wait): Call
2135         uninsert_reinsert_breakpoints for the parent process.  Remove
2136         reinsert breakpoints from the child process.  Reinsert them to
2137         the parent process when vfork is done.
2138         * mem-break.c (uninsert_reinsert_breakpoints): New function.
2139         (reinsert_reinsert_breakpoints): New function.
2140         * mem-break.h (uninsert_reinsert_breakpoints): Declare
2141         (reinsert_reinsert_breakpoints): Declare.
2142
2143 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2144
2145         * linux-low.c (handle_extended_wait): If the parent is doing
2146         step-over, remove the reinsert breakpoints from the forked child.
2147
2148 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2149
2150         * linux-low.c (unsuspend_all_lwps): Declare.
2151         (linux_low_filter_event): If thread exited, call finish_step_over.
2152         If step-over is finished, unsuspend other threads.
2153
2154 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2155
2156         * linux-low.c (linux_resume_one_lwp_throw): Assert
2157         has_reinsert_breakpoints returns false.
2158         * mem-break.c (delete_disabled_breakpoints): Assert
2159         bp type isn't reinsert_breakpoint.
2160
2161 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2162
2163         * linux-low.c (maybe_hw_step): New function.
2164         (linux_resume_one_lwp_throw): Call maybe_hw_step.
2165         (finish_step_over): Switch current_thread to lwp temporarily,
2166         and assert has_reinsert_breakpoints returns true.
2167         (proceed_one_lwp): Call maybe_hw_step.
2168         * mem-break.c (has_reinsert_breakpoints): New function.
2169         * mem-break.h (has_reinsert_breakpoints): Declare.
2170
2171 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
2172
2173         * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2174
2175 2016-05-17  Yao Qi  <yao.qi@linaro.org>
2176
2177         * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2178         instead of find_inferior.
2179
2180 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2181
2182         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2183         Initialize res to zero.
2184
2185 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2186
2187         * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2188         to uint32_t.
2189
2190 2016-05-04  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2191
2192         * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2193         used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2194         (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2195
2196 2016-04-28  Par Olsson  <par.olsson@windriver.com>
2197             Simon Marchi  <simon.marchi@ericsson.com>
2198
2199         * tracepoint.c (write_inferior_int8): New function.
2200         (cmd_qtenable_disable): Write enable flag using
2201         write_inferior_int8.
2202
2203 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2204
2205         * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2206         (need_step_over_p): Return zero if the LWP has pending signals
2207         can be delivered on software single step target.
2208
2209 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2210
2211         * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2212         return instead of error.
2213
2214 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2215
2216         * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2217         to 23.
2218
2219 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2220
2221         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2222         signal when stepping over breakpoint with software single
2223         step.
2224
2225 2016-04-21  Pedro Alves  <palves@redhat.com>
2226
2227         * linux-s390-low.c (s390_collect_ptrace_register)
2228         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2229         add casts.
2230         (s390_check_regset): Use void * instead of gdb_byte *.
2231
2232 2016-04-20  Pedro Alves  <palves@redhat.com>
2233
2234         * configure: Renegerate.
2235
2236 2016-04-20  Yao Qi  <yao.qi@linaro.org>
2237
2238         * linux-aarch32-low.c: Include "arch/arm-linux.h".
2239         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2240         number 16.
2241         (arm_store_gregset): Likewise.
2242
2243 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2244
2245         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2246         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2247         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2248         (amd64-avx-mpx-linux.c): New rules.
2249         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2250         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2251         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2252         (srv_amd64_regobj): Add amd64-avx-mpx.o.
2253         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2254         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2255         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2256         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2257         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2258         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2259         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2260         * linux-x86-low.c (x86_linux_read_description): Add case for
2261         X86_XSTATE_AVX_MPX_MASK.
2262         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2263         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2264         init_registers_i386_avx_mpx_linux.
2265         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2266         (initialize_low_tracepoint): Call
2267         init_registers_i386_avx_mpx_linux.
2268         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
2269         (initialize_low_tracepoint): Call
2270         init_registers_amd64_avx_mpx_linux.
2271         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2272         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2273         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2274         declarations.
2275
2276 2016-04-18  Pedro Alves  <palves@redhat.com>
2277
2278         * configure: Regenerate.
2279
2280 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2281
2282         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2283         (aarch64_emit_sub): Likewise.
2284
2285 2016-04-12  Pedro Alves  <palves@redhat.com>
2286
2287         * utils.c (prepare_to_throw_exception): Delete.
2288
2289 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
2290
2291         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2292
2293 2016-04-05  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2294
2295         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2296
2297 2016-04-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2298
2299         * linux-aarch64-ipa.c: Add <elf.h> include.
2300         * linux-ppc-ipa.c: Add <elf.h> include.
2301         * linux-s390-ipa.c: Add <elf.h> include.
2302
2303 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2304
2305         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2306         (get_raw_reg_ptr): Likewise.
2307         (get_trace_state_variable_value_ptr): Likewise.
2308         (set_trace_state_variable_value_ptr): Likewise.
2309         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2310         char *.
2311
2312 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
2313             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2314
2315         PR/17221
2316         * linux-ppc-low.c (emit_insns): New function.
2317         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2318         (ppc_emit_prologue): New function.
2319         (ppc_emit_epilogue): New function.
2320         (ppc_emit_add): New function.
2321         (ppc_emit_sub): New function.
2322         (ppc_emit_mul): New function.
2323         (ppc_emit_lsh): New function.
2324         (ppc_emit_rsh_signed): New function.
2325         (ppc_emit_rsh_unsigned): New function.
2326         (ppc_emit_ext): New function.
2327         (ppc_emit_zero_ext): New function.
2328         (ppc_emit_log_not): New function.
2329         (ppc_emit_bit_and): New function.
2330         (ppc_emit_bit_or): New function.
2331         (ppc_emit_bit_xor): New function.
2332         (ppc_emit_bit_not): New function.
2333         (ppc_emit_equal): New function.
2334         (ppc_emit_less_signed): New function.
2335         (ppc_emit_less_unsigned): New function.
2336         (ppc_emit_ref): New function.
2337         (ppc_emit_const): New function.
2338         (ppc_emit_reg): New function.
2339         (ppc_emit_pop): New function.
2340         (ppc_emit_stack_flush): New function.
2341         (ppc_emit_swap): New function.
2342         (ppc_emit_stack_adjust): New function.
2343         (ppc_emit_call): New function.
2344         (ppc_emit_int_call_1): New function.
2345         (ppc_emit_void_call_2): New function.
2346         (ppc_emit_if_goto): New function.
2347         (ppc_emit_goto): New function.
2348         (ppc_emit_eq_goto): New function.
2349         (ppc_emit_ne_goto): New function.
2350         (ppc_emit_lt_goto): New function.
2351         (ppc_emit_le_goto): New function.
2352         (ppc_emit_gt_goto): New function.
2353         (ppc_emit_ge_goto): New function.
2354         (ppc_write_goto_address): New function.
2355         (ppc_emit_ops_impl): New static variable.
2356         (ppc64v1_emit_prologue): New function.
2357         (ppc64v2_emit_prologue): New function.
2358         (ppc64_emit_epilogue): New function.
2359         (ppc64_emit_add): New function.
2360         (ppc64_emit_sub): New function.
2361         (ppc64_emit_mul): New function.
2362         (ppc64_emit_lsh): New function.
2363         (ppc64_emit_rsh_signed): New function.
2364         (ppc64_emit_rsh_unsigned): New function.
2365         (ppc64_emit_ext): New function.
2366         (ppc64_emit_zero_ext): New function.
2367         (ppc64_emit_log_not): New function.
2368         (ppc64_emit_bit_and): New function.
2369         (ppc64_emit_bit_or): New function.
2370         (ppc64_emit_bit_xor): New function.
2371         (ppc64_emit_bit_not): New function.
2372         (ppc64_emit_equal): New function.
2373         (ppc64_emit_less_signed): New function.
2374         (ppc64_emit_less_unsigned): New function.
2375         (ppc64_emit_ref): New function.
2376         (ppc64_emit_const): New function.
2377         (ppc64v1_emit_reg): New function.
2378         (ppc64v2_emit_reg): New function.
2379         (ppc64_emit_pop): New function.
2380         (ppc64_emit_stack_flush): New function.
2381         (ppc64_emit_swap): New function.
2382         (ppc64v1_emit_call): New function.
2383         (ppc64v2_emit_call): New function.
2384         (ppc64v1_emit_int_call_1): New function.
2385         (ppc64v2_emit_int_call_1): New function.
2386         (ppc64v1_emit_void_call_2): New function.
2387         (ppc64v2_emit_void_call_2): New function.
2388         (ppc64_emit_if_goto): New function.
2389         (ppc64_emit_eq_goto): New function.
2390         (ppc64_emit_ne_goto): New function.
2391         (ppc64_emit_lt_goto): New function.
2392         (ppc64_emit_le_goto): New function.
2393         (ppc64_emit_gt_goto): New function.
2394         (ppc64_emit_ge_goto): New function.
2395         (ppc64v1_emit_ops_impl): New static variable.
2396         (ppc64v2_emit_ops_impl): New static variable.
2397         (ppc_emit_ops): New function.
2398         (linux_low_target): Wire in ppc_emit_ops.
2399
2400 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
2401             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2402
2403         PR/17221
2404         * Makefile.in: Add powerpc-*-ipa.o
2405         * configure.srv: Add ipa_obj for powerpc*-linux.
2406         * linux-ppc-ipa.c: New file.
2407         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2408         includes.
2409         (PPC_FIELD): New macro.
2410         (PPC_SEXT): New macro.
2411         (PPC_OP6): New macro.
2412         (PPC_BO): New macro.
2413         (PPC_LI): New macro.
2414         (PPC_BD): New macro.
2415         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2416         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2417         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2418         (ppc_get_thread_area): New function.
2419         (is_elfv2_inferior): New function.
2420         (gen_ds_form): New function.
2421         (GEN_STD): New macro.
2422         (GEN_STDU): New macro.
2423         (GEN_LD): New macro.
2424         (GEN_LDU): New macro.
2425         (gen_d_form): New function.
2426         (GEN_ADDI): New macro.
2427         (GEN_ADDIS): New macro.
2428         (GEN_LI): New macro.
2429         (GEN_LIS): New macro.
2430         (GEN_ORI): New macro.
2431         (GEN_ORIS): New macro.
2432         (GEN_LWZ): New macro.
2433         (GEN_STW): New macro.
2434         (GEN_STWU): New macro.
2435         (gen_xfx_form): New function.
2436         (GEN_MFSPR): New macro.
2437         (GEN_MTSPR): New macro.
2438         (GEN_MFCR): New macro.
2439         (GEN_MTCR): New macro.
2440         (GEN_SYNC): New macro.
2441         (GEN_LWSYNC): New macro.
2442         (gen_x_form): New function.
2443         (GEN_OR): New macro.
2444         (GEN_MR): New macro.
2445         (GEN_LWARX): New macro.
2446         (GEN_STWCX): New macro.
2447         (GEN_CMPW): New macro.
2448         (gen_md_form): New function.
2449         (GEN_RLDICL): New macro.
2450         (GEN_RLDICR): New macro.
2451         (gen_i_form): New function.
2452         (GEN_B): New macro.
2453         (GEN_BL): New macro.
2454         (gen_b_form): New function.
2455         (GEN_BNE): New macro.
2456         (GEN_LOAD): New macro.
2457         (GEN_STORE): New macro.
2458         (gen_limm): New function.
2459         (gen_atomic_xchg): New function.
2460         (gen_call): New function.
2461         (ppc_relocate_instruction): New function.
2462         (ppc_install_fast_tracepoint_jump_pad): New function.
2463         (ppc_get_min_fast_tracepoint_insn_len): New function.
2464         (ppc_get_ipa_tdesc_idx): New function.
2465         (the_low_target): Wire in the new functions.
2466         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2467         tdescs.
2468         * linux-ppc-tdesc.h: New file.
2469
2470 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2471
2472         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2473         (alloc_jump_pad_buffer): New function.
2474         * linux-amd64-ipa.c: Add <sys/mman.h> include.
2475         (alloc_jump_pad_buffer): New function.
2476         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2477         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2478         (alloc_jump_pad_buffer): New function.
2479         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2480         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2481         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2482         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2483
2484 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2485
2486         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2487         * linux-amd64-ipa.c: Likewise.
2488         * linux-i386-ipa.c: Likewise.
2489         * linux-s390-ipa.c: Likewise.
2490         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2491         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2492         set_trace_state_variable_value_ptr.
2493         (struct ipa_sym_addresses): Likewise.
2494         (symbol_list): Likewise.
2495         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2496         accessing gdb_collect directly.
2497         (gdb_collect_ptr_type): New typedef.
2498         (get_raw_reg_ptr_type): New typedef.
2499         (get_trace_state_variable_value_ptr_type): New typedef.
2500         (set_trace_state_variable_value_ptr_type): New typedef.
2501         (gdb_collect_ptr): New global.
2502         (get_raw_reg_ptr): New global.
2503         (get_trace_state_variable_value_ptr): New global.
2504         (set_trace_state_variable_value_ptr): New global.
2505         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2506         accessing get_raw_reg directly.
2507         (get_get_tsv_func_addr): Likewise for
2508         get_trace_state_variable_value_ptr.
2509         (get_set_tsv_func_addr): Likewise for
2510         set_trace_state_variable_value_ptr.
2511         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2512
2513 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
2514
2515         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2516
2517 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2518
2519         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2520         packets.
2521         (relocate_instruction): Remove own_buf.
2522         * server.c (own_buf): Make global.
2523         (handle_v_requests): Make global.
2524         * server.h (own_buf): New declaration.
2525         (handle_v_requests): New prototype.
2526
2527 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2528
2529         PR 18377
2530         * linux-s390-low.c (add_insns): New function.
2531         (s390_emit_prologue): New function.
2532         (s390_emit_epilogue): New function.
2533         (s390_emit_add): New function.
2534         (s390_emit_sub): New function.
2535         (s390_emit_mul): New function.
2536         (s390_emit_lsh): New function.
2537         (s390_emit_rsh_signed): New function.
2538         (s390_emit_rsh_unsigned): New function.
2539         (s390_emit_ext): New function.
2540         (s390_emit_log_not): New function.
2541         (s390_emit_bit_and): New function.
2542         (s390_emit_bit_or): New function.
2543         (s390_emit_bit_xor): New function.
2544         (s390_emit_bit_not): New function.
2545         (s390_emit_equal): New function.
2546         (s390_emit_less_signed): New function.
2547         (s390_emit_less_unsigned): New function.
2548         (s390_emit_ref): New function.
2549         (s390_emit_if_goto): New function.
2550         (s390_emit_goto): New function.
2551         (s390_write_goto_address): New function.
2552         (s390_emit_litpool): New function.
2553         (s390_emit_const): New function.
2554         (s390_emit_call): New function.
2555         (s390_emit_reg): New function.
2556         (s390_emit_pop): New function.
2557         (s390_emit_stack_flush): New function.
2558         (s390_emit_zero_ext): New function.
2559         (s390_emit_swap): New function.
2560         (s390_emit_stack_adjust): New function.
2561         (s390_emit_set_r2): New function.
2562         (s390_emit_int_call_1): New function.
2563         (s390_emit_void_call_2): New function.
2564         (s390_emit_eq_goto): New function.
2565         (s390_emit_ne_goto): New function.
2566         (s390_emit_lt_goto): New function.
2567         (s390_emit_le_goto): New function.
2568         (s390_emit_gt_goto): New function.
2569         (s390_emit_ge_goto): New function.
2570         (s390x_emit_prologue): New function.
2571         (s390x_emit_epilogue): New function.
2572         (s390x_emit_add): New function.
2573         (s390x_emit_sub): New function.
2574         (s390x_emit_mul): New function.
2575         (s390x_emit_lsh): New function.
2576         (s390x_emit_rsh_signed): New function.
2577         (s390x_emit_rsh_unsigned): New function.
2578         (s390x_emit_ext): New function.
2579         (s390x_emit_log_not): New function.
2580         (s390x_emit_bit_and): New function.
2581         (s390x_emit_bit_or): New function.
2582         (s390x_emit_bit_xor): New function.
2583         (s390x_emit_bit_not): New function.
2584         (s390x_emit_equal): New function.
2585         (s390x_emit_less_signed): New function.
2586         (s390x_emit_less_unsigned): New function.
2587         (s390x_emit_ref): New function.
2588         (s390x_emit_if_goto): New function.
2589         (s390x_emit_const): New function.
2590         (s390x_emit_call): New function.
2591         (s390x_emit_reg): New function.
2592         (s390x_emit_pop): New function.
2593         (s390x_emit_stack_flush): New function.
2594         (s390x_emit_zero_ext): New function.
2595         (s390x_emit_swap): New function.
2596         (s390x_emit_stack_adjust): New function.
2597         (s390x_emit_int_call_1): New function.
2598         (s390x_emit_void_call_2): New function.
2599         (s390x_emit_eq_goto): New function.
2600         (s390x_emit_ne_goto): New function.
2601         (s390x_emit_lt_goto): New function.
2602         (s390x_emit_le_goto): New function.
2603         (s390x_emit_gt_goto): New function.
2604         (s390x_emit_ge_goto): New function.
2605         (s390_emit_ops): New function.
2606         (struct linux_target_ops): Fill in emit_ops hook.
2607
2608 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2609
2610         PR 18377
2611         * Makefile.in: Add s390 IPA files.
2612         * configure.srv: Build IPA for s390.
2613         * linux-s390-ipa.c: New file.
2614         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2615         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2616         (tdesc_s390_linux32): Likewise.
2617         (init_registers_s390_linux32v1): Likewise.
2618         (tdesc_s390_linux32v1): Likewise.
2619         (init_registers_s390_linux32v2): Likewise.
2620         (tdesc_s390_linux32v2): Likewise.
2621         (init_registers_s390_linux64): Likewise.
2622         (tdesc_s390_linux64): Likewise.
2623         (init_registers_s390_linux64v1): Likewise.
2624         (tdesc_s390_linux64v1): Likewise.
2625         (init_registers_s390_linux64v2): Likewise.
2626         (tdesc_s390_linux64v2): Likewise.
2627         (init_registers_s390_te_linux64): Likewise.
2628         (tdesc_s390_te_linux64): Likewise.
2629         (init_registers_s390_vx_linux64): Likewise.
2630         (tdesc_s390_vx_linux64): Likewise.
2631         (init_registers_s390_tevx_linux64): Likewise.
2632         (tdesc_s390_tevx_linux64): Likewise.
2633         (init_registers_s390x_linux64): Likewise.
2634         (tdesc_s390x_linux64): Likewise.
2635         (init_registers_s390x_linux64v1): Likewise.
2636         (tdesc_s390x_linux64v1): Likewise.
2637         (init_registers_s390x_linux64v2): Likewise.
2638         (tdesc_s390x_linux64v2): Likewise.
2639         (init_registers_s390x_te_linux64): Likewise.
2640         (tdesc_s390x_te_linux64): Likewise.
2641         (init_registers_s390x_vx_linux64): Likewise.
2642         (tdesc_s390x_vx_linux64): Likewise.
2643         (init_registers_s390x_tevx_linux64): Likewise.
2644         (tdesc_s390x_tevx_linux64): Likewise.
2645         (have_hwcap_s390_vx): New static variable.
2646         (s390_arch_setup): Fill have_hwcap_s390_vx.
2647         (s390_get_thread_area): New function.
2648         (s390_ft_entry_gpr_esa): New const.
2649         (s390_ft_entry_gpr_zarch): New const.
2650         (s390_ft_entry_misc): New const.
2651         (s390_ft_entry_fr): New const.
2652         (s390_ft_entry_vr): New const.
2653         (s390_ft_main_31): New const.
2654         (s390_ft_main_64): New const.
2655         (s390_ft_exit_fr): New const.
2656         (s390_ft_exit_vr): New const.
2657         (s390_ft_exit_misc): New const.
2658         (s390_ft_exit_gpr_esa): New const.
2659         (s390_ft_exit_gpr_zarch): New const.
2660         (append_insns): New function.
2661         (s390_relocate_instruction): New function.
2662         (s390_install_fast_tracepoint_jump_pad): New function.
2663         (s390_get_min_fast_tracepoint_insn_len): New function.
2664         (s390_get_ipa_tdesc_idx): New function.
2665         (struct linux_target_ops): Wire in the above functions.
2666         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2667         * linux-s390-tdesc.h: New file.
2668
2669 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2670
2671         * linux-s390-low.c (s390_supports_tracepoints): New function.
2672         (struct linux_target_ops): Fill supports_tracepoints hook.
2673
2674 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2675
2676         * linux-low.c (lwp_signal_can_be_delivered): New function.
2677         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2678
2679 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2680
2681         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2682         0 if signal is enqueued.  Remove 'signal' from one debugging
2683         message.  Move one debugging message to some lines below.
2684         Remove code setting 'signal' to 0.
2685
2686 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2687
2688         * linux-low.c (linux_low_filter_event): Remove redundant
2689         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2690
2691 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2692
2693         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2694         (struct linux_target_ops): Wire in the above.
2695
2696 2016-03-03  Yao Qi  <yao.qi@linaro.org>
2697
2698         * linux-low.c: Update comments to start_step_over.
2699
2700 2016-03-03  Yao Qi  <yao.qi@linaro.org>
2701
2702         PR server/19736
2703         * linux-low.c (handle_extended_wait): Set child suspended
2704         if event_lwp->bp_reinsert isn't zero.
2705
2706 2016-03-02  Yao Qi  <yao.qi@linaro.org>
2707
2708         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2709         enqueue_pending_signal.
2710
2711 2016-03-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2712
2713         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2714         is actually loaded.
2715
2716 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2717
2718         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2719         (s390_regmap_3264) [!__s390x__]: New global.
2720         (s390_collect_ptrace_register): Skip map entries containing -1.
2721         (s390_supply_ptrace_register): Ditto.
2722         (s390_fill_gprs_high): New function.
2723         (s390_store_gprs_high): New function.
2724         (s390_regsets): Add NT_S390_HIGH_GPRS.
2725         (s390_get_hwcap): Enable on 31-bit.
2726         (have_hwcap_s390_high_gprs): Enable on 31-bit.
2727         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2728         Detect NT_S390_HIGH_GPRS.
2729         (s390_usrregs_info_3264): Enable on 31-bit.
2730         (s390_regs_info): Enable regs_info_3264 on 31-bit.
2731         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2732
2733 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2734
2735         PR gdb/13808
2736         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2737         * configure.srv: Ditto.
2738         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2739         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2740         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2741         (init_registers_amd64_linux): Remove prototype.
2742         (tdesc_amd64_linux): Remove declaration.
2743         (get_ipa_tdesc): New function.
2744         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2745         initialize remaining tdescs.
2746         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2747         (init_registers_i386_linux): Remove prototype.
2748         (tdesc_i386_linux): Remove declaration.
2749         (get_ipa_tdesc): New function.
2750         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2751         initialize remaining tdescs.
2752         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2753         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2754         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2755         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2756         (x86_get_ipa_tdesc_idx): New function.
2757         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2758         * linux-x86-tdesc.h: New file.
2759         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2760         (target_get_ipa_tdesc_idx): New macro.
2761         * tracepoint.c (ipa_tdesc_idx): New macro.
2762         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2763         (symbol_list): Add ipa_tdesc_idx.
2764         (cmd_qtstart): Write ipa_tdesc_idx in the target.
2765         (ipa_tdesc): Remove.
2766         (ipa_tdesc_idx): New variable.
2767         (get_context_regcache): Use get_ipa_tdesc.
2768         (gdb_collect): Ditto.
2769         (gdb_probe): Ditto.
2770         * tracepoint.h (get_ipa_tdesc): New prototype.
2771         (ipa_tdesc): Remove.
2772
2773 2016-02-24  Pedro Alves  <palves@redhat.com>
2774
2775         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2776         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
2777         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2778         Factor out common code between the USE_SIGTRAP_SIGINFO and
2779         !USE_SIGTRAP_SIGINFO blocks.
2780         (linux_low_filter_event): Call save_stop_reason instead of
2781         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2782         Update comments.
2783         (linux_wait_1): Update comments.
2784
2785 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
2786
2787         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2788         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2789         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2790         ppc_insert_point, ppc_remove_point.
2791
2792 2016-02-17  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2793
2794         * linux-s390-low.c (s390_supports_z_point_type): New function.
2795         (struct linux_target_ops): Wire s390_supports_z_point_type in.
2796
2797 2016-02-16  Yao Qi  <yao.qi@linaro.org>
2798
2799         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2800         PC.  Get pc from regcache_read_pc.
2801
2802 2016-02-12  Yao Qi  <yao.qi@linaro.org>
2803
2804         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2805         or linux_get_pc_32bit.
2806         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2807
2808 2016-02-12  Yao Qi  <yao.qi@linaro.org>
2809
2810         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2811         arm_linux_get_next_pcs_fixup.
2812
2813 2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2814
2815         * tracepoint.c (x_tracepoint_action_download): Change
2816         write_inferior_data_ptr to write_inferior_data_pointer.
2817         (cmd_qtstart): Likewise.
2818         (write_inferior_data_ptr): Remove.
2819         (download_agent_expr): Change write_inferior_data_ptr to
2820         write_inferior_data_pointer.
2821         (download_tracepoint_1): Likewise.
2822         (download_tracepoint): Likewise.
2823         (download_trace_state_variables): Likewise.
2824
2825 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
2826             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2827
2828         * tracepoint.c (struct tracepoint_action_ops): Remove.
2829         (struct tracepoint_action): Remove ops.
2830         (m_tracepoint_action_download, r_tracepoint_action_download)
2831         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2832         size and offset accordingly.
2833         (m_tracepoint_action_ops, r_tracepoint_action_ops)
2834         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2835         (tracepoint_action_send, tracepoint_action_download): New functions.
2836         Helpers for trace action handlers.
2837         (add_tracepoint_action): Remove setup actions ops.
2838         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2839
2840 2016-02-10  Yao Qi  <yao.qi@linaro.org>
2841
2842         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2843
2844 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
2845
2846         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2847         to AC_OUTPUT.
2848         * configure: Regenerate.
2849
2850 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
2851
2852         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2853         void * to gdb_byte *.
2854         * linux-low.c (siginfo_fixup): Likewise.
2855         (linux_xfer_siginfo): Likewise.
2856         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2857         Likewise.
2858         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2859
2860 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2861
2862         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2863         to srv_tgtobj.
2864         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2865         to srv_tgtobj.
2866         * linux-x86-low.c [__x86_64__]: Include
2867         "nat/amd64-linux-siginfo.h".
2868         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2869         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2870         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2871         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2872         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2873         (cpt_si_fd, si_timerid, si_overrun): Move from
2874         nat/amd64-linux-siginfo.c.
2875         * Makefile.in (amd64-linux-siginfo.o:): New rule.
2876
2877 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
2878
2879         * server.c (skip_to_semicolon):  Remove.
2880         (process_point_options): Use strchrnul instead of
2881         skip_to_semicolon.
2882
2883 2016-01-26  Yao Qi  <yao.qi@linaro.org>
2884
2885         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2886         * linux-low.c (install_software_single_step_breakpoints): Don't
2887         call regcache_read_pc.
2888         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2889         argument pc.
2890
2891 2016-01-26  Yao Qi  <yao.qi@linaro.org>
2892
2893         * linux-low.c (install_software_single_step_breakpoints): Call
2894         regcache_read_pc instead of get_pc.
2895
2896 2016-01-26  Yao Qi  <yao.qi@linaro.org>
2897
2898         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2899         (unblock_async_io): Rename to ...
2900         (block_unblock_async_io): ... it.  New function.
2901         (enable_async_io): Don't install SIGIO handler.  Unblock it
2902         instead.
2903         (disable_async_io): Don't ignore SIGIO.  Block it instead.
2904         (initialize_async_io): Install SIGIO handler.  Don't call
2905         unblock_async_io.
2906
2907 2016-01-26  Yao Qi  <yao.qi@linaro.org>
2908
2909         * remote-utils.c (getpkt): If the buffer isn't empty, and the
2910         first character is '\003', call *the_target->request_interrupt.
2911
2912 2016-01-25  Yao Qi  <yao.qi@linaro.org>
2913
2914         * remote-utils.c (new_thread_notify): Remove.
2915         (dead_thread_notify): Likewise.
2916         * remote-utils.h (new_thread_notify): Remove declaration.
2917         (dead_thread_notify): Likewise.
2918
2919 2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2920
2921         * gdb.trace/pending.exp: Fix expected message on continue.
2922
2923 2016-01-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2924
2925         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2926         it works properly on big-endian machines where sizeof (CORE_ADDR)
2927         != sizeof (void *).
2928
2929 2016-01-21  Pedro Alves  <palves@redhat.com>
2930
2931         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2932         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2933         * configure: Regenerate.
2934
2935 2016-01-21  Yao Qi  <yao.qi@linaro.org>
2936
2937         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2938         is_thumb and set it according to CPSR saved on the stack.
2939         (get_next_pcs_syscall_next_pc): Pass is_thumb to
2940         arm_sigreturn_next_pc.
2941
2942 2016-01-18  Yao Qi  <yao.qi@linaro.org>
2943
2944         * linux-low.c (linux_set_pc_64bit): New function.
2945         (linux_get_pc_64bit): New function.
2946         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2947         Declare.
2948         * linux-sparc-low.c (debug_threads): Remove declaration.
2949         (sparc_get_pc): Remove.
2950         (the_low_target): Use linux_get_pc_64bit instead of
2951         sparc_get_pc.
2952         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2953         (the_low_target): Use linux_get_pc_64bit and
2954         linux_set_pc_64bit.
2955
2956 2016-01-18  Yao Qi  <yao.qi@linaro.org>
2957
2958         * linux-arm-low.c (debug_threads): Remove declaration.
2959         (arm_get_pc, arm_set_pc): Remove.
2960         (the_low_target): Use linux_get_pc_32bit and
2961         linux_set_pc_32bit.
2962         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2963         (the_low_target): Use linux_get_pc_32bit and
2964         linux_set_pc_32bit.
2965         * linux-cris-low.c (debug_threads): Remove declaration.
2966         (cris_get_pc, cris_set_pc,): Remove.
2967         (the_low_target): Use linux_get_pc_32bit and
2968         linux_set_pc_32bit.
2969         * linux-crisv32-low.c (debug_threads): Remove declaration.
2970         (cris_get_pc, cris_set_pc): Remove.
2971         (the_low_target): Use linux_get_pc_32bit and
2972         linux_set_pc_32bit.
2973         * linux-low.c: Include inttypes.h.
2974         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2975         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2976         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2977         (the_low_target): Use linux_get_pc_32bit and
2978         linux_set_pc_32bit.
2979         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2980         (the_low_target): Use linux_get_pc_32bit and
2981         linux_set_pc_32bit.
2982         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2983         (the_low_target): Use linux_get_pc_32bit and
2984         linux_set_pc_32bit.
2985         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2986         (the_low_target): Use linux_get_pc_32bit and
2987         linux_set_pc_32bit.
2988         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2989         (the_low_target): Use linux_get_pc_32bit and
2990         linux_set_pc_32bit.
2991
2992 2016-01-18  Gary Benson  <gbenson@redhat.com>
2993
2994         * configure.ac (AC_FUNC_FORK): New check.
2995         * config.in: Regenerate.
2996         * configure: Likewise.
2997
2998 2016-01-14  Yao Qi  <yao.qi@linaro.org>
2999
3000         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3001         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3002         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3003         arm_get_next_pcs_ctor.
3004
3005 2016-01-12  Josh Stone  <jistone@redhat.com>
3006             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3007
3008         * inferiors.h: Include "gdb_vecs.h".
3009         (struct process_info): Add syscalls_to_catch.
3010         * inferiors.c (remove_process): Free syscalls_to_catch.
3011         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3012         syscall_return stops.
3013         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3014         * server.c (handle_general_set): Handle QCatchSyscalls.
3015         (handle_query): Report support for QCatchSyscalls.
3016         * target.h (struct target_ops): Add supports_catch_syscall.
3017         (target_supports_catch_syscall): New macro.
3018         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3019         (struct lwp_info): Add syscall_state.
3020         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3021         Maintain syscall_state and syscalls_to_catch across exec.
3022         (get_syscall_trapinfo): New function, proxy to the_low_target.
3023         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3024         (linux_low_filter_event): Toggle syscall_state entry/return for
3025         syscall traps, and set it ignored for all others.
3026         (gdb_catching_syscalls_p): New function.
3027         (gdb_catch_this_syscall_p): New function.
3028         (linux_wait_1): Handle SYSCALL_SIGTRAP.
3029         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3030         (linux_supports_catch_syscall): New function.
3031         (linux_target_ops): Install it.
3032         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3033         (the_low_target): Install it.
3034
3035 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3036
3037         * acinclude.m4: Include new ../warning.m4 file.
3038         * configure: Regenerated.
3039         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3040
3041 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3042
3043         * ax.c (is_goto_target): Mark static.
3044         * linux-low.c (register_addr): Likewise.
3045         (linux_fetch_registers, linux_store_registers): Likewise.
3046         * mem-break.c (any_persistent_commands): Fix old prototype.
3047         (add_commands_to_breakpoint): Mark static.
3048         * regcache.c (find_register_by_name): Delete unused func.
3049         * remote-utils.c (hex_or_minus_one): Mark static.
3050         * server.c (monitor_show_help): Mark static.
3051         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3052         handle_v_requests): Likewise.
3053
3054 2016-01-12  Pedro Alves  <palves@redhat.com>
3055
3056         Remove use of the registered trademark symbol throughout.
3057
3058 2016-01-08  Yao Qi  <yao.qi@linaro.org>
3059
3060         * remote-utils.c (getpkt): If c is '\003', call target hook
3061         request_interrupt.
3062
3063 2016-01-06  Yao Qi  <yao.qi@linaro.org>
3064
3065         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3066         linux-aarch32-low.c.
3067         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3068         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3069         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3070         (thumb2_breakpoint): Declare.
3071         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3072         linux-aarch32-low.h.
3073         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3074         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3075         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3076
3077 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
3078
3079         * gdbreplay.c (gdbreplay_version): Change copyright year in
3080         version message.
3081         * server.c (gdbserver_version): Likewise.
3082
3083 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
3084
3085         * server.c (crc32_table): Delete.
3086         (crc32): Use libiberty's xcrc32 function.
3087
3088 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3089
3090         * lynx-low.c (lynx_delete_thread_callback): New function.
3091         (lynx_mourn): Properly delete our process and all of its
3092         threads.  Remove call to clear_inferiors.
3093
3094 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3095
3096         * target.c (thread_search_callback): Add check that
3097         the thread_stopped target callback is not NULL before
3098         calling it.
3099
3100 2015-12-21  Yao Qi  <yao.qi@linaro.org>
3101
3102         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3103         arm breakpoint.
3104
3105 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3106
3107         * server.c (handle_query): Call target_supports_software_single_step.
3108
3109 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3110
3111         * linux-low.c (single_step): New function.
3112         (linux_resume_one_lwp_throw): Call single_step.
3113         (start_step_over): Likewise.
3114
3115 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3116
3117         * Makefile.in (SFILES): Append arch/arm-linux.c,
3118         arch/arm-get-next-pcs.c.
3119         (arm-linux.o): New rule.
3120         (arm-get-next-pcs.o): New rule.
3121         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3122         arm-linux.o.
3123         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
3124         to linux-aarch32-low.c.
3125         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3126         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3127         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3128         (thumb2_breakpoint_len): Likewise.
3129         (arm_is_thumb_mode): Make non-static.
3130         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
3131         from linux-aarch32-low.c.
3132         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3133         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3134         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3135         (thumb2_breakpoint_len): Likewise.
3136         (arm_is_thumb_mode): New declaration.
3137         * linux-arm-low.c: Include arch/arm-linux.h
3138         aarch/arm-get-next-pcs.h, sys/syscall.h.
3139         (get_next_pcs_ops): New struct.
3140         (get_next_pcs_addr_bits_remove): New function.
3141         (get_next_pcs_is_thumb): New function.
3142         (get_next_pcs_read_memory_unsigned_integer): Likewise.
3143         (arm_sigreturn_next_pc): Likewise.
3144         (get_next_pcs_syscall_next_pc): Likewise.
3145         (arm_gdbserver_get_next_pcs): Likewise.
3146         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3147         Initialize.
3148         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3149         * server.h: Include gdb_vecs.h.
3150
3151 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3152
3153         * Makefile.in (SFILES): Append common/common-regcache.c.
3154         (OBS): Append common-regcache.o.
3155         (common-regcache.o): New rule.
3156         * regcache.c (init_register_cache): Initialize cache to
3157         REG_UNAVAILABLE.
3158         (regcache_raw_read_unsigned): New function.
3159         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3160         register_status enum.
3161
3162 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3163
3164         * linux-aarch64-low.c (the_low_targets): Rename
3165         breakpoint_reinsert_addr to get_next_pcs.
3166         * linux-arm-low.c (the_low_targets): Likewise.
3167         * linux-bfin-low.c (the_low_targets): Likewise.
3168         * linux-cris-low.c (the_low_targets): Likewise.
3169         * linux-crisv32-low.c (the_low_targets): Likewise.
3170         * linux-low.c (can_software_single_step): Likewise.
3171         (install_software_single_step_breakpoints): New function.
3172         (start_step_over): Use install_software_single_step_breakpoints.
3173         * linux-low.h: New CORE_ADDR vector.
3174         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3175         get_next_pcs.
3176         * linux-mips-low.c (the_low_targets): Likewise.
3177         * linux-nios2-low.c (the_low_targets): Likewise.
3178         * linux-sparc-low.c (the_low_targets): Likewise.
3179
3180 2015-12-17  Pedro Alves  <palves@redhat.com>
3181
3182         * linux-low.c (linux_kill_one_lwp): Remove references to
3183         LinuxThreads.
3184         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
3185         to 'kill'.
3186         (linux_init_signals): Delete.
3187         (initialize_low): Adjust.
3188         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3189
3190 2015-12-16  Pedro Alves  <palves@redhat.com>
3191
3192         * configure.ac (compiler warning flags): When testing a
3193         -Wno-foo option, check whether -Wfoo works instead.
3194         * configure: Regenerate.
3195
3196 2015-12-11  Don Breazeal  <donb@codesourcery.com>
3197
3198         * server.c (process_serial_event): Don't exit from gdbserver
3199         in remote mode if there are still active inferiors.
3200
3201 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3202
3203         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3204         arm_breakpoint_at if the process is 32-bit.
3205
3206 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3207
3208         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3209         arm breakpoint.
3210
3211 2015-12-07  Yao Qi  <yao.qi@linaro.org>
3212
3213         * configure.srv: Append arm.o to srv_tgtobj for
3214         aarch64*-*-linux* target.
3215         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
3216         from linux-arm-low.c.
3217         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3218         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3219         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3220         (thumb2_breakpoint_len): Likewise.
3221         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3222         (arm_breakpoint_kinds): Likewise.
3223         (arm_breakpoint_kind_from_pc): Likewise.
3224         (arm_sw_breakpoint_from_kind): Likewise.
3225         (arm_breakpoint_kind_from_current_state): Likewise.
3226         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3227         (arm_sw_breakpoint_from_kind): Declare.
3228         (arm_breakpoint_kind_from_current_state): Declare.
3229         (arm_breakpoint_at): Declare.
3230         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3231         arm_sw_breakpoint_from_kind if process is 32-bit.
3232         (aarch64_breakpoint_kind_from_pc): New function.
3233         (aarch64_breakpoint_kind_from_current_state): New function.
3234         (the_low_target): Initialize fields breakpoint_kind_from_pc
3235         and breakpoint_kind_from_current_state.
3236         * linux-arm-low.c (arm_breakpoint_kinds): Move to
3237         linux-aarch32-low.c.
3238         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3239         (arm_breakpoint, arm_breakpoint_len): Likewise.
3240         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3241         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3242         (arm_is_thumb_mode): Likewise.
3243         (arm_breakpoint_at): Likewise.
3244         (arm_breakpoint_kind_from_pc): Likewise.
3245         (arm_sw_breakpoint_from_kind): Likewise.
3246         (arm_breakpoint_kind_from_current_state): Likewise.
3247
3248         Revert:
3249         2015-08-04  Yao Qi  <yao.qi@linaro.org>
3250
3251         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3252         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3253         * server.c (extended_protocol): Remove "static".
3254         * server.h (extended_protocol): Declare it.
3255
3256 2015-12-04  Josh Stone  <jistone@redhat.com>
3257
3258         * target.h (struct target_ops) <arch_setup>: Rename to ...
3259         (struct target_ops) <post_create_inferior>: ... this.
3260         (target_arch_setup): Rename to ...
3261         (target_post_create_inferior): ... this, calling post_create_inferior.
3262         * server.c (start_inferior): Update target_arch_setup calls to
3263         target_post_create_inferior.
3264         * linux-low.c (linux_low_ptrace_options): Forward declare.
3265         (linux_arch_setup): Update its comment for general use.
3266         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3267         (struct linux_target_ops): Use linux_post_create_inferior.
3268         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3269         to post_create_inferior.
3270         * nto-low.c (struct nto_target_ops): Likewise.
3271         * spu-low.c (struct spu_target_ops): Likewise.
3272         * win32-low.c (struct win32_target_ops): Likewise.
3273
3274 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3275
3276         * linux-arm-low.c: Remove duplicate arch/arm.h include.
3277
3278 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3279
3280         * linux-arm-low.c (arm_reinsert_addr): Remove function.
3281         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3282         * linux-cris-low.c (cris_reinsert_addr> Remove function.
3283         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3284         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3285         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3286         * linux-mips-low.c (mips_reinsert_addr): Remove function.
3287         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3288         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3289         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3290         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3291         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3292
3293 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3294
3295         * linux-low.c (linux_look_up_symbols): Don't call
3296         linux_supports_traceclone.
3297         * linux-low.h (thread_db_init): Remove use_events argument.
3298         * thread-db.c (thread_db_use_event): Remove global variable.
3299         (struct thread_db) <td_thr_event_enable_p>: Remove field.
3300         (struct thread_db) <td_create_bp>: Remove field.
3301         (thread_db_create_event): Remove function.
3302         (thread_db_enable_reporting): Likewise.
3303         (find_one_thread): Don't check for thread_db_use_events.
3304         (attach_thread): Likewise.
3305         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3306         (try_thread_db_load_1): Don't check for thread_db_use_events.
3307         (thread_db_init): Remove use_events argument and thread events
3308         handling.
3309         (remove_thread_event_breakpoints): Remove function.
3310         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3311
3312 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3313
3314         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3315         New function.
3316         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3317         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3318         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3319         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3320         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3321         Initialize.
3322         * linux-crisv32-low.c (cris_supports_hardware_single_step):
3323         New function.
3324         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3325         * linux-low.c (can_hardware_single_step): Use
3326         supports_hardware_single_step.
3327         (can_software_single_step): New function.
3328         (start_step_over): Call can_software_single_step.
3329         (linux_supports_hardware_single_step): New function.
3330         (struct target_ops) <supports_software_single_step>: Initialize.
3331         * linux-low.h (struct linux_target_ops)
3332         <supports_hardware_single_step>: Initialize.
3333         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3334         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3335         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3336         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3337         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3338         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3339         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3340         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3341         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3342         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3343         Initialize.
3344         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3345         (struct linux_target_ops) <tile_supports_hardware_single_step>:
3346         Initialize.
3347         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3348         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3349         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3350         New function.
3351         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3352         * target.h (struct target_ops): <supports_software_single_step>:
3353         New field.
3354         (target_supports_software_single_step): New macro.
3355
3356 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3357
3358         * linux-low.c (linux_wait_1): Fix pc advance condition.
3359         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3360         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3361
3362 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3363
3364         * linux-arm-low.c (arm_is_thumb_mode): New function.
3365         (arm_breakpoint_at): Use arm_is_thumb_mode.
3366         (arm_breakpoint_kind_from_current_state): New function.
3367         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3368         Initialize.
3369         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3370         (linux_breakpoint_kind_from_current_state): New function.
3371         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3372         * linux-low.h (struct linux_target_ops)
3373         <breakpoint_kind_from_current_state>: New field.
3374         * target.h (struct target_ops): Likewise.
3375         (target_breakpoint_kind_from_current_state): New macro.
3376
3377 2015-11-30  Pedro Alves  <palves@redhat.com>
3378
3379         * linux-low.c (linux_resume): Wake up the event loop before
3380         returning.
3381
3382 2015-11-30  Pedro Alves  <palves@redhat.com>
3383
3384         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3385         check.
3386         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3387         to -1.
3388         * target.c (struct thread_search): New structure.
3389         (thread_search_callback): New function.
3390         (prev_general_thread): New global.
3391         (prepare_to_access_memory, done_accessing_memory): New functions.
3392         * target.h (prepare_to_access_memory, done_accessing_memory):
3393         Replace macros with function declarations.
3394
3395 2015-11-30  Pedro Alves  <palves@redhat.com>
3396
3397         PR 14618
3398         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3399         report TARGET_WAITKIND_NO_RESUMED.
3400         * remote-utils.c (prepare_resume_reply): Handle
3401         TARGET_WAITKIND_NO_RESUMED.
3402         * server.c (report_no_resumed): New global.
3403         (handle_query) <qSupported>: Handle "no-resumed+".  Report
3404         "no-resumed+" support.
3405         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3406         return error if the client doesn't support no-resumed events.
3407         (push_stop_notification): New function.
3408         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
3409         events if the client supports them.
3410
3411 2015-11-30  Pedro Alves  <palves@redhat.com>
3412
3413         * linux-low.c (thread_still_has_status_pending_p): Don't check
3414         vCont;t here.
3415         (lwp_resumed): New function.
3416         (status_pending_p_callback): Return early if the LWP is not
3417         supposed to be resumed.
3418
3419 2015-11-30  Pedro Alves  <palves@redhat.com>
3420
3421         * linux-low.c (handle_extended_wait): Assert that the LWP's
3422         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
3423         thread create events, leave the new child's status pending.
3424         (linux_low_filter_event): If GDB wants to hear about thread exit
3425         events, leave the LWP marked dead and don't delete it.
3426         (linux_wait_for_event_filtered): Don't check for thread exit.
3427         (filter_exit_event): New function.
3428         (linux_wait_1): Use it, when returning an exit event.
3429         (linux_resume_one_lwp_throw): Assert that the LWP's
3430         waitstatus is TARGET_WAITKIND_IGNORE.
3431         * remote-utils.c (prepare_resume_reply): Handle
3432         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3433         * server.c (report_thread_events): New global.
3434         (handle_general_set): Handle QThreadEvents.
3435         (handle_query) <qSupported>: Handle and report QThreadEvents+;
3436         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3437         TARGET_WAITKIND_THREAD_EXITED.
3438         * server.h (report_thread_events): Declare.
3439
3440 2015-11-30  Pedro Alves  <palves@redhat.com>
3441
3442         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3443         the thread's last_resume_kind was resume_stop.
3444
3445 2015-11-30  Pedro Alves  <palves@redhat.com>
3446
3447         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3448         before returning.
3449
3450 2015-11-30  Pedro Alves  <palves@redhat.com>
3451
3452         * server.c (handle_v_requests): Handle vCtrlC.
3453
3454 2015-11-30  Pedro Alves  <palves@redhat.com>
3455
3456         * gdbthread.h (find_any_thread_of_pid): Declare.
3457         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3458         functions.
3459         * server.c (handle_query): If current_thread is NULL, look for
3460         another thread of the selected process.
3461
3462 2015-11-26  Daniel Colascione  <dancol@dancol.org>
3463             Simon Marchi  <simon.marchi@ericsson.com>
3464
3465         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3466         * server.c (handle_qxfer_threads_worker): Refactor to include thread
3467         name in reply.
3468         * target.h (struct target_ops) <thread_name>: New field.
3469         (target_thread_name): New macro.
3470
3471 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
3472
3473         * regcache.h (regcache_invalidate_pid): Add declaration.
3474         * regcache.c (regcache_invalidate_pid): New function, extracted
3475         from regcache_invalidate.
3476         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3477         Add trivial documentation comment.
3478         * lynx-low.c: Use regcache_invalidate_pid instead of
3479         regcache_invalidate.
3480
3481 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
3482
3483         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3484         and Elf64_auxv_t if the target is Android.
3485
3486 2015-11-22  Doug Evans  <xdje42@gmail.com>
3487
3488         * target.h: #include <sys/types.h>.
3489
3490 2015-11-19  Pedro Alves  <palves@redhat.com>
3491
3492         * linux-low.c (linux_process_qsupported): Change prototype.
3493         Adjust.
3494         * linux-low.h (struct linux_target_ops) <process_qsupported>:
3495         Change prototype.
3496         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3497         and adjust to loop over all features.
3498         * server.c (handle_query) <qSupported>: Adjust to call
3499         target_process_qsupported once, passing it a vector of unprocessed
3500         features.
3501         * target.h (struct target_ops) <process_qsupported>: Change
3502         prototype.
3503         (target_process_qsupported): Adjust.
3504
3505 2015-11-19  Pedro Alves  <palves@redhat.com>
3506
3507         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3508         mode.
3509         * configure: Regenerate.
3510
3511 2015-11-19  Pedro Alves  <palves@redhat.com>
3512
3513         * configure: Regenerate.
3514
3515 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3516
3517         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3518         type to uint32_t.
3519
3520 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3521
3522         * linux-aarch64-low.c (enum aarch64_operand_type): New.
3523         (struct aarch64_operand): Move enum out.
3524
3525 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3526
3527         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3528         struct user_fpsimd_state *.
3529         (aarch64_store_fpregset): Likewise.
3530
3531 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3532
3533         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3534         struct user_pt_regs *.
3535         (aarch64_store_gregset): Likewise.
3536
3537 2015-11-18  Pedro Alves  <palves@redhat.com>
3538
3539         * Makefile.in (all_object_files): Add $IPA_OBJS.
3540
3541 2015-11-17  Pedro Alves  <palves@redhat.com>
3542
3543         * win32-low.c (win32_resume): Use gdb_signal_from_host,
3544         GDB_SIGNAL_0 and gdb_signal_to_string.
3545
3546 2015-11-17  Pedro Alves  <palves@redhat.com>
3547
3548         * win32-low.c (handle_output_debug_string): Remove parameter.
3549         (win32_kill): Remove our_status local and adjust call to
3550         handle_output_debug_string.
3551         (get_child_debug_event): Adjust call to
3552         handle_output_debug_string.
3553
3554 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3555
3556         * linux-mips-low.c (mips_fill_gregset): Add cast.
3557         (mips_store_gregset): Likewise.
3558         (mips_fill_fpregset): Likewise.
3559         (mips_store_fpregset): Likewise.
3560
3561 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3562
3563         * linux-mips-low.c (mips_add_watchpoint): Rename private to
3564         priv.
3565
3566 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3567
3568         * linux-mips-low.c (mips_linux_new_thread): Change type of
3569         watch_type to enum target_hw_bp_type.
3570
3571 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3572
3573                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3574                 Change return type to arm_hwbp_type.
3575
3576 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3577
3578         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3579         (arm_store_gregset): Likewise.
3580         * linux-arm-low.c (arm_get_hwcap): Likewise.
3581         (arm_read_description): Likewise.
3582
3583 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3584
3585         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3586
3587 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3588
3589         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3590         (ppc_fill_vsxregset): Likewise.
3591         (ppc_store_vsxregset): Likewise.
3592         (ppc_fill_vrregset): Likewise.
3593         (ppc_store_vrregset): Likewise.
3594         (ppc_fill_evrregset): Likewise.
3595         (ppc_store_evrregset): Likewise.
3596
3597 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3598
3599         * linux-ppc-low.c (ppc_usrregs_info): Remove
3600         forward-declaration.
3601         (ppc_arch_setup): Move lower in file.
3602
3603 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
3604
3605         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3606         (ps_pdwrite): Likewise.
3607
3608 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3609
3610         * linux-arm-low.c (arm_new_thread): Move pointer dereference
3611         to after assert checks.
3612
3613 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3614
3615         * proc-service.c (ps_pdread): Add/adjust casts.
3616         (ps_pdwrite): Add/adjust casts.
3617
3618 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
3619
3620         * server.c (handle_search_memory_1): Cast return value of
3621         memmem.
3622
3623 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
3624
3625         * server.c (write_qxfer_response): Change type of data to
3626         gdb_byte *.
3627
3628 2015-10-29  Pedro Alves  <palves@redhat.com>
3629
3630         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3631
3632 2015-10-29  Pedro Alves  <palves@redhat.com>
3633
3634         * tracepoint.c (clear_installed_tracepoints): Add casts.
3635
3636 2015-10-29  Pedro Alves  <palves@redhat.com>
3637
3638         * server.c (handle_v_cont, process_serial_event): Add enum
3639         gdb_signal casts to signal parsing code.
3640
3641 2015-10-29  Pedro Alves  <palves@redhat.com>
3642
3643         * linux-low.h (NULL_REGSET): Define.
3644         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3645         * linux-arm-low.c (arm_regsets): Likewise.
3646         * linux-crisv32-low.c (cris_regsets): Likewise.
3647         * linux-m68k-low.c (m68k_regsets): Likewise.
3648         * linux-mips-low.c (mips_regsets): Likewise.
3649         * linux-nios2-low.c (nios2_regsets): Likewise.
3650         * linux-ppc-low.c (ppc_regsets): Likewise.
3651         * linux-s390-low.c (s390_regsets): Likewise.
3652         * linux-sh-low.c (sh_regsets): Likewise.
3653         * linux-sparc-low.c (sparc_regsets): Likewise.
3654         * linux-tic6x-low.c (tic6x_regsets): Likewise.
3655         * linux-tile-low.c (tile_regsets): Likewise.
3656         * linux-x86-low.c (x86_regsets): Likewise.
3657         * linux-xtensa-low.c (xtensa_regsets): Likewise.
3658
3659 2015-10-29  Pedro Alves  <palves@redhat.com>
3660
3661         * linux-low.h (NULL_REGSET): Define.
3662         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3663         * linux-arm-low.c (arm_regsets): Likewise.
3664         * linux-crisv32-low.c (cris_regsets): Likewise.
3665         * linux-m68k-low.c (m68k_regsets): Likewise.
3666         * linux-mips-low.c (mips_regsets): Likewise.
3667         * linux-nios2-low.c (nios2_regsets): Likewise.
3668         * linux-ppc-low.c (ppc_regsets): Likewise.
3669         * linux-s390-low.c (s390_regsets): Likewise.
3670         * linux-sh-low.c (sh_regsets): Likewise.
3671         * linux-sparc-low.c (sparc_regsets): Likewise.
3672         * linux-tic6x-low.c (tic6x_regsets): Likewise.
3673         * linux-tile-low.c (tile_regsets): Likewise.
3674         * linux-x86-low.c (x86_regsets): Likewise.
3675         * linux-xtensa-low.c (xtensa_regsets): Likewise.
3676
3677 2015-10-26  Doug Evans  <dje@google.com>
3678
3679         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3680
3681 2015-10-26  Doug Evans  <dje@google.com>
3682
3683         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3684
3685 2015-10-26  Doug Evans  <dje@google.com>
3686
3687         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3688         for debug_printf.
3689         (attach_thread, find_new_threads_callback): Ditto.
3690
3691 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3692
3693         * mem-break.h (set_breakpoint_data): Remove.
3694
3695 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3696
3697         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3698         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3699         (initialize_low): Remove set_breakpoint_data call.
3700         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3701         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3702         (initialize_low): Remove set_breakpoint_data call.
3703         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3704         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3705         (initialize_low): Remove set_breakpoint_data call.
3706
3707 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3708
3709         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3710         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3711         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3712         * target.h (target_breakpoint_kind_from_pc): New macro.
3713
3714 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3715
3716         * linux-low.c (default_breakpoint_kind_from_pc): New function.
3717         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3718         the default breakpoint kind.
3719
3720 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3721
3722         * linux-arm-low.c (arm_supports_z_point_type): Add software
3723         breakpoint support.
3724
3725 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3726
3727         * linux-arm-low.c: Refactor breakpoint definitions.
3728         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3729         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3730
3731 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3732
3733         * Makefile.in: Add arm.c/o.
3734         * configure.srv: Likewise.
3735         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3736         (arm_breakpoint_kind_from_pc): New function.
3737         (arm_sw_breakpoint_from_kind): Return proper kind.
3738         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3739
3740 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3741
3742         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3743         removal.
3744         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3745         (struct raw_breakpoint) <size>: Remove.
3746         (struct raw_breakpoint) <kind>: Add.
3747         (bp_size): New function.
3748         (bp_opcode): Likewise.
3749         (find_raw_breakpoint_at): Adjust for kind.
3750         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3751         (remove_memory_breakpoint): Adjust for kind call bp_size.
3752         (set_raw_breakpoint_at): Adjust for kind.
3753         (set_breakpoint): Likewise.
3754         (set_breakpoint_at): Call breakpoint_kind_from_pc.
3755         (delete_raw_breakpoint): Adjust for kind.
3756         (delete_breakpoint): Likewise.
3757         (find_gdb_breakpoint): Likewise.
3758         (set_gdb_breakpoint_1): Likewise.
3759         (set_gdb_breakpoint): Likewise.
3760         (delete_gdb_breakpoint_1): Likewise.
3761         (delete_gdb_breakpoint): Likewise.
3762         (uninsert_raw_breakpoint): Likewise.
3763         (reinsert_raw_breakpoint): Likewise.
3764         (set_breakpoint_data): Remove.
3765         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3766         (check_mem_read): Adjust for kind call bp_size.
3767         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3768         (clone_one_breakpoint): Adjust for kind.
3769         * mem-break.h (set_gdb_breakpoint): Likewise.
3770         (delete_gdb_breakpoint): Likewise.
3771         * server.c (process_serial_event): Likewise.
3772
3773 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3774
3775         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3776         (struct linux_target_ops) <breakpoint>: Remove.
3777         (struct linux_target_ops) <breakpoint_len>: Remove.
3778         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3779         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3780         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3781         (arm_sw_breakpoint_from_kind): New function.
3782         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3783         (struct linux_target_ops) <breakpoint>: Remove.
3784         (struct linux_target_ops) <breakpoint_len>: Remove.
3785         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3786         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3787         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3788         (struct linux_target_ops) <breakpoint>: Remove.
3789         (struct linux_target_ops) <breakpoint_len>: Remove.
3790         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3791         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3792         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3793         (struct linux_target_ops) <breakpoint>: Remove.
3794         (struct linux_target_ops) <breakpoint_len>: Remove.
3795         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3796         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3797         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3798         and sw_breakpoint_from_kind to increment the pc.
3799         (linux_breakpoint_kind_from_pc): New function.
3800         (linux_sw_breakpoint_from_kind): New function.
3801         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3802         (initialize_low): Call breakpoint_kind_from_pc and
3803         sw_breakpoint_from_kind to replace breakpoint_data/len.
3804         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3805         New field.
3806         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3807         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3808         (struct linux_target_ops) <breakpoint>: Remove.
3809         (struct linux_target_ops) <breakpoint_len>: Remove.
3810         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3811         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3812         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3813         (struct linux_target_ops) <breakpoint>: Remove.
3814         (struct linux_target_ops) <breakpoint_len>: Remove.
3815         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3816         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3817         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3818         (struct linux_target_ops) <breakpoint>: Remove.
3819         (struct linux_target_ops) <breakpoint_len>: Remove.
3820         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3821         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3822         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3823         (struct linux_target_ops) <breakpoint>: Remove.
3824         (struct linux_target_ops) <breakpoint_len>: Remove.
3825         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3826         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3827         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3828         (struct linux_target_ops) <breakpoint>: Remove.
3829         (struct linux_target_ops) <breakpoint_len>: Remove.
3830         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3831         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3832         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3833         (struct linux_target_ops) <breakpoint>: Remove.
3834         (struct linux_target_ops) <breakpoint_len>: Remove.
3835         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3836         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3837         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3838         (struct linux_target_ops) <breakpoint>: Remove.
3839         (struct linux_target_ops) <breakpoint_len>: Remove.
3840         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3841         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3842         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3843         (struct linux_target_ops) <breakpoint>: Remove.
3844         (struct linux_target_ops) <breakpoint_len>: Remove.
3845         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3846         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3847         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3848         (struct linux_target_ops) <breakpoint>: Remove.
3849         (struct linux_target_ops) <breakpoint_len>: Remove.
3850         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3851         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3852         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3853         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3854         (struct linux_target_ops) <breakpoint>: Remove.
3855         (struct linux_target_ops) <breakpoint_len>: Remove.
3856         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3857         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3858         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3859         (struct linux_target_ops) <breakpoint>: Remove.
3860         (struct linux_target_ops) <breakpoint_len>: Remove.
3861         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3862         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3863
3864 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3865
3866         * linux-cris-low.c (cris_get_pc): Remove void arg.
3867
3868 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
3869
3870         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3871         variable name.
3872
3873 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
3874
3875         * inferiors.c (thread_pid_matches_callback): New function.
3876         (find_thread_process): New function.
3877         (remove_thread): Reset current_thread.
3878         (remove_process): Assert threads have been removed first.
3879
3880 2015-10-15  Yao Qi  <yao.qi@linaro.org>
3881
3882         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3883         if it is 3.
3884         (aarch64_remove_point): Likewise.
3885         * regcache.c (regcache_register_size): New function.
3886
3887 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3888
3889         * linux-aarch64-low.c: Update all callers as emit_load_store
3890         is renamed to aarch64_emit_load_store.
3891
3892 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3893
3894         * linux-aarch64-low.c: Update all callers of function renaming
3895         from emit_insn to aarch64_emit_insn.
3896
3897 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3898
3899         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3900         arch/aarch64-insn.h.
3901         (struct aarch64_memory_operand): Likewise.
3902         (ENCODE): Likewise.
3903         (emit_insn): Move to arch/aarch64-insn.c.
3904         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3905         (emit_load_store): Move to arch/aarch64-insn.c.
3906         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3907         (can_encode_int32): Remove.
3908
3909 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3910
3911         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3912         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3913         (aarch64_relocate_instruction): Likewise.
3914         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3915         (struct aarch64_insn_visitor): Likewise.
3916
3917 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3918
3919         * linux-aarch64-low.c (struct aarch64_insn_data): New.
3920         (struct aarch64_insn_visitor): New.
3921         (struct aarch64_insn_relocation_data): New.
3922         (aarch64_ftrace_insn_reloc_b): New function.
3923         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3924         (aarch64_ftrace_insn_reloc_cb): Likewise.
3925         (aarch64_ftrace_insn_reloc_tb): Likewise.
3926         (aarch64_ftrace_insn_reloc_adr): Likewise.
3927         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3928         (aarch64_ftrace_insn_reloc_others): Likewise.
3929         (visitor): New.
3930         (aarch64_relocate_instruction): Use visitor.
3931
3932 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3933
3934         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3935         int.  Add argument buf.
3936         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3937         aarch64_relocate_instruction.
3938
3939 2015-10-12  Yao Qi  <yao.qi@linaro.org>
3940
3941         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3942         argument insn.  Remove local variable insn.  Don't call
3943         target_read_uint32.
3944         (aarch64_install_fast_tracepoint_jump_pad): Call
3945         target_read_uint32.
3946
3947 2015-09-30  Yao Qi  <yao.qi@linaro.org>
3948
3949         * linux-aarch64-low.c (emit_movk): Shorten a long line.
3950         (emit_load_store_pair): Likewise.
3951
3952 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
3953
3954         * dll.c (match_dll): Add cast(s).
3955         (unloaded_dll): Likewise.
3956         * linux-low.c (second_thread_of_pid_p): Likewise.
3957         (delete_lwp_callback): Likewise.
3958         (count_events_callback): Likewise.
3959         (select_event_lwp_callback): Likewise.
3960         (linux_set_resume_request): Likewise.
3961         * server.c (accumulate_file_name_length): Likewise.
3962         (emit_dll_description): Likewise.
3963         (handle_qxfer_threads_worker): Likewise.
3964         (visit_actioned_threads): Likewise.
3965         * thread-db.c (any_thread_of): Likewise.
3966         * tracepoint.c (same_process_p): Likewise.
3967         (match_blocktype): Likewise.
3968         (build_traceframe_info_xml): Likewise.
3969
3970 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
3971
3972         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3973         assignment.
3974         (gdb_unparse_agent_expr): Likewise.
3975         * hostio.c (require_data): Likewise.
3976         (handle_pread): Likewise.
3977         * linux-low.c (disable_regset): Likewise.
3978         (fetch_register): Likewise.
3979         (store_register): Likewise.
3980         (get_dynamic): Likewise.
3981         (linux_qxfer_libraries_svr4): Likewise.
3982         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3983         (set_fast_tracepoint_jump): Likewise.
3984         (uninsert_fast_tracepoint_jumps_at): Likewise.
3985         (reinsert_fast_tracepoint_jumps_at): Likewise.
3986         (validate_inserted_breakpoint): Likewise.
3987         (clone_agent_expr): Likewise.
3988         * regcache.c (init_register_cache): Likewise.
3989         * remote-utils.c (putpkt_binary_1): Likewise.
3990         (decode_M_packet): Likewise.
3991         (decode_X_packet): Likewise.
3992         (look_up_one_symbol): Likewise.
3993         (relocate_instruction): Likewise.
3994         (monitor_output): Likewise.
3995         * server.c (handle_search_memory): Likewise.
3996         (handle_qxfer_exec_file): Likewise.
3997         (handle_qxfer_libraries): Likewise.
3998         (handle_qxfer): Likewise.
3999         (handle_query): Likewise.
4000         (handle_v_cont): Likewise.
4001         (handle_v_run): Likewise.
4002         (captured_main): Likewise.
4003         * target.c (write_inferior_memory): Likewise.
4004         * thread-db.c (try_thread_db_load_from_dir): Likewise.
4005         * tracepoint.c (init_trace_buffer): Likewise.
4006         (add_tracepoint_action): Likewise.
4007         (add_traceframe): Likewise.
4008         (add_traceframe_block): Likewise.
4009         (cmd_qtdpsrc): Likewise.
4010         (cmd_qtdv): Likewise.
4011         (cmd_qtstatus): Likewise.
4012         (response_source): Likewise.
4013         (response_tsv): Likewise.
4014         (cmd_qtnotes): Likewise.
4015         (gdb_collect): Likewise.
4016         (initialize_tracepoint): Likewise.
4017
4018 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4019
4020         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4021         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4022         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4023         <NOP>: New.
4024         (enum aarch64_condition_codes): New enum.
4025         (w0): New static global.
4026         (fp): Likewise.
4027         (lr): Likewise.
4028         (struct aarch64_memory_operand) <type>: New
4029         MEMORY_OPERAND_POSTINDEX type.
4030         (postindex_memory_operand): New helper function.
4031         (emit_ret): New function.
4032         (emit_load_store_pair): New function, factored out of emit_stp
4033         with support for MEMORY_OPERAND_POSTINDEX.
4034         (emit_stp): Rewrite using emit_load_store_pair.
4035         (emit_ldp): New function.
4036         (emit_load_store): Likewise.
4037         (emit_ldr): Mention post-index instruction in comment.
4038         (emit_ldrh): New function.
4039         (emit_ldrb): New function.
4040         (emit_ldrsw): Mention post-index instruction in comment.
4041         (emit_str): Likewise.
4042         (emit_subs): New function.
4043         (emit_cmp): Likewise.
4044         (emit_and): Likewise.
4045         (emit_orr): Likewise.
4046         (emit_orn): Likewise.
4047         (emit_eor): Likewise.
4048         (emit_mvn): Likewise.
4049         (emit_lslv): Likewise.
4050         (emit_lsrv): Likewise.
4051         (emit_asrv): Likewise.
4052         (emit_mul): Likewise.
4053         (emit_sbfm): Likewise.
4054         (emit_sbfx): Likewise.
4055         (emit_ubfm): Likewise.
4056         (emit_ubfx): Likewise.
4057         (emit_csinc): Likewise.
4058         (emit_cset): Likewise.
4059         (emit_nop): Likewise.
4060         (emit_ops_insns): New helper function.
4061         (emit_pop): Likewise.
4062         (emit_push): Likewise.
4063         (aarch64_emit_prologue): New function.
4064         (aarch64_emit_epilogue): Likewise.
4065         (aarch64_emit_add): Likewise.
4066         (aarch64_emit_sub): Likewise.
4067         (aarch64_emit_mul): Likewise.
4068         (aarch64_emit_lsh): Likewise.
4069         (aarch64_emit_rsh_signed): Likewise.
4070         (aarch64_emit_rsh_unsigned): Likewise.
4071         (aarch64_emit_ext): Likewise.
4072         (aarch64_emit_log_not): Likewise.
4073         (aarch64_emit_bit_and): Likewise.
4074         (aarch64_emit_bit_or): Likewise.
4075         (aarch64_emit_bit_xor): Likewise.
4076         (aarch64_emit_bit_not): Likewise.
4077         (aarch64_emit_equal): Likewise.
4078         (aarch64_emit_less_signed): Likewise.
4079         (aarch64_emit_less_unsigned): Likewise.
4080         (aarch64_emit_ref): Likewise.
4081         (aarch64_emit_if_goto): Likewise.
4082         (aarch64_emit_goto): Likewise.
4083         (aarch64_write_goto_address): Likewise.
4084         (aarch64_emit_const): Likewise.
4085         (aarch64_emit_call): Likewise.
4086         (aarch64_emit_reg): Likewise.
4087         (aarch64_emit_pop): Likewise.
4088         (aarch64_emit_stack_flush): Likewise.
4089         (aarch64_emit_zero_ext): Likewise.
4090         (aarch64_emit_swap): Likewise.
4091         (aarch64_emit_stack_adjust): Likewise.
4092         (aarch64_emit_int_call_1): Likewise.
4093         (aarch64_emit_void_call_2): Likewise.
4094         (aarch64_emit_eq_goto): Likewise.
4095         (aarch64_emit_ne_goto): Likewise.
4096         (aarch64_emit_lt_goto): Likewise.
4097         (aarch64_emit_le_goto): Likewise.
4098         (aarch64_emit_gt_goto): Likewise.
4099         (aarch64_emit_ge_got): Likewise.
4100         (aarch64_emit_ops_impl): New static global variable.
4101         (aarch64_emit_ops): New target function, return
4102         &aarch64_emit_ops_impl.
4103         (struct linux_target_ops): Install it.
4104
4105 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4106
4107         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4108         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4109         aarch64-ipa.o.
4110         * linux-aarch64-ipa.c: New file.
4111         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4112         and endian.h.
4113         (aarch64_get_thread_area): New target method.
4114         (extract_signed_bitfield): New helper function.
4115         (aarch64_decode_ldr_literal): New function.
4116         (enum aarch64_opcodes): New enum.
4117         (struct aarch64_register): New struct.
4118         (struct aarch64_operand): New struct.
4119         (x0): New static global.
4120         (x1): Likewise.
4121         (x2): Likewise.
4122         (x3): Likewise.
4123         (x4): Likewise.
4124         (w2): Likewise.
4125         (ip0): Likewise.
4126         (sp): Likewise.
4127         (xzr): Likewise.
4128         (aarch64_register): New helper function.
4129         (register_operand): Likewise.
4130         (immediate_operand): Likewise.
4131         (struct aarch64_memory_operand): New struct.
4132         (offset_memory_operand): New helper function.
4133         (preindex_memory_operand): Likewise.
4134         (enum aarch64_system_control_registers): New enum.
4135         (ENCODE): New macro.
4136         (emit_insn): New helper function.
4137         (emit_b): New function.
4138         (emit_bcond): Likewise.
4139         (emit_cb): Likewise.
4140         (emit_tb): Likewise.
4141         (emit_blr): Likewise.
4142         (emit_stp): Likewise.
4143         (emit_ldp_q_offset): Likewise.
4144         (emit_stp_q_offset): Likewise.
4145         (emit_load_store): Likewise.
4146         (emit_ldr): Likewise.
4147         (emit_ldrsw): Likewise.
4148         (emit_str): Likewise.
4149         (emit_ldaxr): Likewise.
4150         (emit_stxr): Likewise.
4151         (emit_stlr): Likewise.
4152         (emit_data_processing_reg): Likewise.
4153         (emit_data_processing): Likewise.
4154         (emit_add): Likewise.
4155         (emit_sub): Likewise.
4156         (emit_mov): Likewise.
4157         (emit_movk): Likewise.
4158         (emit_mov_addr): Likewise.
4159         (emit_mrs): Likewise.
4160         (emit_msr): Likewise.
4161         (emit_sevl): Likewise.
4162         (emit_wfe): Likewise.
4163         (append_insns): Likewise.
4164         (can_encode_int32_in): New helper function.
4165         (aarch64_relocate_instruction): New function.
4166         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4167         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4168         (struct linux_target_ops): Install aarch64_get_thread_area,
4169         aarch64_install_fast_tracepoint_jump_pad and
4170         aarch64_get_min_fast_tracepoint_insn_len.
4171
4172 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4173
4174         * Makefile.in (aarch64-insn.o): New rule.
4175         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4176
4177 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4178
4179         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4180
4181 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4182
4183         * tracepoint.c (max_jump_pad_size): Remove.
4184
4185 2015-09-18  Yao Qi  <yao.qi@linaro.org>
4186
4187         * linux-aarch64-low.c: Don't include sys/uio.h.
4188         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4189
4190 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
4191
4192         * tracepoint.c (eval_result_type): Change prototype.
4193         (condition_true_at_tracepoint): Fix argument to compiled_cond.
4194
4195 2015-09-15  Pedro Alves  <palves@redhat.com>
4196
4197         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4198         Check whether to report exec events instead of checking whether
4199         multiprocess is enabled.
4200
4201 2015-09-15  Pedro Alves  <palves@redhat.com>
4202
4203         PR remote/18965
4204         * remote-utils.c (prepare_resume_reply): Merge
4205         TARGET_WAITKIND_VFORK_DONE switch case with the
4206         TARGET_WAITKIND_FORKED case.
4207
4208 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4209
4210         * server.c (handle_query): Check string comparison using
4211         "else if" instead of "if".
4212
4213 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4214
4215         * server.c (vCont_supported): New global variable.
4216         (handle_query): Set vCont_supported to 1 if "vContSupported+"
4217         matches.  Append ";vContSupported+" to own_buf.
4218         (handle_v_requests): Append ";s;S" to own_buf if target supports
4219         hardware single step or vCont_supported is false.
4220         (capture_main): Set vCont_supported to zero.
4221
4222 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4223
4224         * linux-low.c (linux_supports_conditional_breakpoints): Rename
4225         it to ...
4226         (linux_supports_hardware_single_step): ... New function.
4227         (linux_target_ops): Update.
4228         * lynx-low.c (lynx_target_ops): Set field
4229         supports_hardware_single_step to target_can_do_hardware_single_step.
4230         * nto-low.c (nto_target_ops): Likewise.
4231         * spu-low.c (spu_target_ops): Likewise.
4232         * win32-low.c (win32_target_ops): Likewise.
4233         * target.c (target_can_do_hardware_single_step): New function.
4234         * target.h (struct target_ops) <supports_conditional_breakpoints>:
4235         Remove.  <supports_hardware_single_step>: New field.
4236         (target_supports_conditional_breakpoints): Remove.
4237         (target_supports_hardware_single_step): New macro.
4238         (target_can_do_hardware_single_step): Declare.
4239         * server.c (handle_query): Use target_supports_hardware_single_step
4240         instead of target_supports_conditional_breakpoints.
4241
4242 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4243
4244         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4245         function.
4246         (struct linux_target_ops the_low_target): Install
4247         aarch64_linux_siginfo_fixup.
4248
4249 2015-09-11  Don Breazeal  <donb@codesourcery.com>
4250             Luis Machado  <lgustavo@codesourcery.com>
4251
4252         * linux-low.c (linux_mourn): Static declaration.
4253         (linux_arch_setup): Move in front of
4254         handle_extended_wait.
4255         (linux_arch_setup_thread): New function.
4256         (handle_extended_wait): Handle exec events.  Call
4257         linux_arch_setup_thread.  Make event_lwp argument a
4258         pointer-to-a-pointer.
4259         (check_zombie_leaders): Do not check stopped threads.
4260         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4261         (linux_low_filter_event): Add lwp and thread for exec'ing
4262         non-leader thread if leader thread has been deleted.
4263         Refactor code into linux_arch_setup_thread and call it.
4264         Pass child lwp pointer by reference to handle_extended_wait.
4265         (linux_wait_for_event_filtered): Update comment.
4266         (linux_wait_1): Prevent clobbering exec event status.
4267         (linux_supports_exec_events): New function.
4268         (linux_target_ops) <supports_exec_events>: Initialize new member.
4269         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4270         new member.
4271         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4272         * server.c (report_exec_events): New global variable.
4273         (handle_query): Handle qSupported query for exec-events feature.
4274         (captured_main): Initialize report_exec_events.
4275         * server.h (report_exec_events): Declare new global variable.
4276         * target.h (struct target_ops) <supports_exec_events>: New
4277         member.
4278         (target_supports_exec_events): New macro.
4279         * win32-low.c (win32_target_ops) <supports_exec_events>:
4280         Initialize new member.
4281
4282 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
4283
4284         * linux-low.c (linux_low_enable_btrace): Remove.
4285         (linux_target_ops): Replace linux_low_enable_btrace with
4286         linux_enable_btrace.
4287
4288 2015-09-03  Yao Qi  <yao.qi@linaro.org>
4289
4290         * linux-aarch64-low.c (aarch64_insert_point): Call
4291         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4292         returns true.
4293
4294 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4295
4296         * linux-low.c (check_stopped_by_breakpoint): Use
4297         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4298
4299 2015-08-27  Pedro Alves  <palves@redhat.com>
4300
4301         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4302
4303 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
4304
4305         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4306         the XNEW-family equivalent.
4307         (compile_bytecodes): Likewise.
4308         * dll.c (loaded_dll): Likewise.
4309         * event-loop.c (append_callback_event): Likewise.
4310         (create_file_handler): Likewise.
4311         (create_file_event): Likewise.
4312         * hostio.c (handle_open): Likewise.
4313         * inferiors.c (add_thread): Likewise.
4314         (add_process): Likewise.
4315         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4316         * linux-arm-low.c (arm_new_process): Likewise.
4317         (arm_new_thread): Likewise.
4318         * linux-low.c (add_to_pid_list): Likewise.
4319         (linux_add_process): Likewise.
4320         (handle_extended_wait): Likewise.
4321         (add_lwp): Likewise.
4322         (enqueue_one_deferred_signal): Likewise.
4323         (enqueue_pending_signal): Likewise.
4324         (linux_resume_one_lwp_throw): Likewise.
4325         (linux_resume_one_thread): Likewise.
4326         (linux_read_memory): Likewise.
4327         (linux_write_memory): Likewise.
4328         * linux-mips-low.c (mips_linux_new_process): Likewise.
4329         (mips_linux_new_thread): Likewise.
4330         (mips_add_watchpoint): Likewise.
4331         * linux-x86-low.c (initialize_low_arch): Likewise.
4332         * lynx-low.c (lynx_add_process): Likewise.
4333         * mem-break.c (set_raw_breakpoint_at): Likewise.
4334         (set_breakpoint): Likewise.
4335         (add_condition_to_breakpoint): Likewise.
4336         (add_commands_to_breakpoint): Likewise.
4337         (clone_agent_expr): Likewise.
4338         (clone_one_breakpoint): Likewise.
4339         * regcache.c (new_register_cache): Likewise.
4340         * remote-utils.c (look_up_one_symbol): Likewise.
4341         * server.c (queue_stop_reply): Likewise.
4342         (start_inferior): Likewise.
4343         (queue_stop_reply_callback): Likewise.
4344         (handle_target_event): Likewise.
4345         * spu-low.c (fetch_ppc_memory): Likewise.
4346         (store_ppc_memory): Likewise.
4347         * target.c (set_target_ops): Likewise.
4348         * thread-db.c (thread_db_load_search): Likewise.
4349         (try_thread_db_load_1): Likewise.
4350         * tracepoint.c (add_tracepoint): Likewise.
4351         (add_tracepoint_action): Likewise.
4352         (create_trace_state_variable): Likewise.
4353         (cmd_qtdpsrc): Likewise.
4354         (cmd_qtro): Likewise.
4355         (add_while_stepping_state): Likewise.
4356         * win32-low.c (child_add_thread): Likewise.
4357         (get_image_name): Likewise.
4358
4359 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4360
4361         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4362
4363 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4364
4365         * Makefile.in (aarch64-linux.o): New rule.
4366         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4367         srv_tgtobj.
4368         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4369         (aarch64_init_debug_reg_state): Make it extern.
4370         (aarch64_linux_prepare_to_resume): Remove.
4371
4372 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4373
4374         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4375         lwp_arch_private_info and ptid_of_lwp.
4376
4377 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4378
4379         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4380         Find proc_info by find_process_pid.  All callers updated.
4381
4382 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4383
4384         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4385         Remove.
4386         (debug_reg_change_callback): Remove.
4387         (aarch64_notify_debug_reg_change): Remove.
4388
4389 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4390
4391         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4392         Call current_lwp_ptid.
4393
4394 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4395
4396         * linux-aarch64-low.c (debug_reg_change_callback): Use
4397         debug_printf.
4398
4399 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4400
4401         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4402
4403 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4404
4405         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4406
4407 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4408
4409         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4410         the code.
4411
4412 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4413
4414         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4415         Remove.
4416         (debug_reg_change_callback): Remove argument entry and add argument
4417         lwp.  Remove local variable thread.  Don't print thread id in the
4418         debugging output.  Don't check whether pid of thread equals to pid.
4419         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
4420         iterate_over_lwps instead find_inferior.
4421
4422 2015-08-24  Pedro Alves  <palves@redhat.com>
4423
4424         * inferiors.c (get_first_process): New function.
4425         * inferiors.h (get_first_process): New declaration.
4426         * remote-utils.c (read_ptid): Default to the first process in the
4427         list, instead of to the current thread's process.
4428
4429 2015-08-24  Pedro Alves  <palves@redhat.com>
4430
4431         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4432         * event-loop.c: Likewise.
4433         * remote-utils.c: Likewise.
4434         * tracepoint.c: Likewise.
4435
4436 2015-08-24  Pedro Alves  <palves@redhat.com>
4437
4438         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4439         ptid_get_lwp.
4440
4441 2015-08-21  Pedro Alves  <palves@redhat.com>
4442
4443         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4444         instead of literal 1.
4445
4446 2015-08-21  Pedro Alves  <palves@redhat.com>
4447
4448         * tdesc.c (default_description): Explicitly zero-initialize.
4449
4450 2015-08-21  Pedro Alves  <palves@redhat.com>
4451
4452         PR gdb/18749
4453         * inferiors.c (remove_thread): Discard any pending stop reply for
4454         this thread.
4455         * server.c (remove_all_on_match_pid): Rename to ...
4456         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
4457         instead of a pid.
4458         (discard_queued_stop_replies): Change parameter to a ptid.  Now
4459         extern.
4460         (handle_v_kill, kill_inferior_callback, captured_main)
4461         (process_serial_event): Adjust.
4462         * server.h (discard_queued_stop_replies): Declare.
4463
4464 2015-08-21  Pedro Alves  <palves@redhat.com>
4465
4466         * linux-low.c (wait_for_sigstop): Always switch to no thread
4467         selected if the previously current thread dies.
4468         * lynx-low.c (lynx_request_interrupt): Use the first thread's
4469         process instead of the current thread's.
4470         * remote-utils.c (input_interrupt): Don't check if there's no
4471         current thread.
4472         * server.c (gdb_read_memory, gdb_write_memory): If setting the
4473         current thread to the general thread fails, error out.
4474         (handle_qxfer_auxv, handle_qxfer_libraries)
4475         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4476         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4477         (handle_query): Check if there's a thread selected instead of
4478         checking whether there's any thread in the thread list.
4479         (handle_qxfer_threads, handle_qxfer_btrace)
4480         (handle_qxfer_btrace_conf): Don't error out early if there's no
4481         thread in the thread list.
4482         (handle_v_cont, myresume): Don't set the current thread to the
4483         continue thread.
4484         (process_serial_event) <Hg handling>: Also set thread_id if the
4485         previous general thread is still alive.
4486         (process_serial_event) <g/G handling>: If setting the current
4487         thread to the general thread fails, error out.
4488         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4489         thread's lwp instead of the current thread's.
4490         * target.c (set_desired_thread): If the desired thread was not
4491         found, leave the current thread pointing to NULL.  Return an int
4492         (boolean) indicating success.
4493         * target.h (set_desired_thread): Change return type to int.
4494
4495 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
4496
4497         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4498         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4499         #includes.
4500         (ps_get_thread_area): New function.
4501
4502 2015-08-19  Gary Benson  <gbenson@redhat.com>
4503
4504         * hostio.c (handle_pread): Do not attempt to read more data
4505         than hostio_reply_with_data can fit in a packet.
4506
4507 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
4508
4509         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4510
4511 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
4512
4513         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4514
4515 2015-08-06  Pedro Alves  <palves@redhat.com>
4516
4517         * tracepoint.c (expr_eval_result): Now an int.
4518
4519 2015-08-06  Pedro Alves  <palves@redhat.com>
4520
4521         * gdbthread.h (struct regcache): Forward declare.
4522         (struct thread_info) <regcache_data>: Now a struct regcache
4523         pointer.
4524         * inferiors.c (inferior_regcache_data)
4525         (set_inferior_regcache_data): Now work with struct regcache
4526         pointers.
4527         * inferiors.h (struct regcache): Forward declare.
4528         (inferior_regcache_data, set_inferior_regcache_data): Now work
4529         with struct regcache pointers.
4530         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4531         (free_register_cache_thread): Remove struct regcache pointer
4532         casts.
4533
4534 2015-08-06  Pedro Alves  <palves@redhat.com>
4535
4536         * server.c (captured_main): On error, print the exception message
4537         to stderr, and if run_once is set, throw a quit.
4538
4539 2015-08-06  Pedro Alves  <palves@redhat.com>
4540
4541         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4542         the current thread.
4543
4544 2015-08-06  Pedro Alves  <palves@redhat.com>
4545
4546         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4547         reading beyond the passed in buffer length.
4548
4549 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
4550
4551         * tracepoint.c (symbol_list) <required>: Remove.
4552
4553 2015-08-06  Pedro Alves  <palves@redhat.com>
4554
4555         * linux-low.c (handle_extended_wait): Set the fork child's suspend
4556         count if stopping and suspending threads.
4557         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4558         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4559         (linux_detach): Complete an ongoing step-over.
4560         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
4561         throughout.
4562         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4563         (linux_wait_1): If passing a signal to the inferior after
4564         finishing a step-over, unsuspend and re-resume all lwps.  If we
4565         see a single-step event but the thread should be continuing, don't
4566         pass the trap to gdb.
4567         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4568         internal_error instead of gdb_assert.
4569         (enqueue_pending_signal): New function.
4570         (check_ptrace_stopped_lwp_gone): Add debug output.
4571         (start_step_over): Use internal_error instead of gdb_assert.
4572         (complete_ongoing_step_over): New function.
4573         (linux_resume_one_thread): Don't resume a suspended thread.
4574         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4575         it stepping.
4576
4577 2015-08-06  Pedro Alves  <palves@redhat.com>
4578
4579         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4580         (linux_thread_alive): Use lwp_is_marked_dead.
4581         (extended_event_reported): Delete.
4582         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4583         instead of extended_event_reported.
4584         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
4585         as well.
4586         (lwp_is_marked_dead): New function.
4587         (lwp_running): Use lwp_is_marked_dead.
4588         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4589         comment.
4590
4591 2015-08-06  Pedro Alves  <palves@redhat.com>
4592
4593         * linux-low.c (linux_wait_1): Move fork event output out of the
4594         !report_to_gdb check.  Pass event_child->waitstatus to
4595         target_waitstatus_to_string instead of ourstatus.
4596
4597 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4598
4599         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4600         if current_thread is 32 bit.
4601
4602 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4603
4604         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4605         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4606         * server.c (extended_protocol): Remove "static".
4607         * server.h (extended_protocol): Declare it.
4608
4609 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4610
4611         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4612         both aarch64 and aarch32.
4613         (aarch64_set_pc): Likewise.
4614
4615 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4616
4617         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4618         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4619         arm-with-neon.xml to srv_xmlfiles.
4620         * linux-aarch64-low.c: Include linux-aarch32-low.h.
4621         (is_64bit_tdesc): New function.
4622         (aarch64_linux_read_description): New function.
4623         (aarch64_arch_setup): Call aarch64_linux_read_description.
4624         (regs_info): Rename to regs_info_aarch64.
4625         (aarch64_regs_info): Return right regs_info.
4626         (initialize_low_arch): Call initialize_low_arch_aarch32.
4627
4628 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4629
4630         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4631         * linux-aarch32-low.c: New file.
4632         * linux-aarch32-low.h: New file.
4633         * linux-arm-low.c (arm_fill_gregset): Move it to
4634         linux-aarch32-low.c.
4635         (arm_store_gregset): Likewise.
4636         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4637         (arm_store_vfpregset): Call arm_store_vfpregset_num.
4638         (arm_arch_setup): Check if PTRACE_GETREGSET works.
4639         (regs_info): Rename to regs_info_arm.
4640         (arm_regs_info): Return regs_info_aarch32 if
4641         have_ptrace_getregset is 1 and target description is
4642         arm_with_neon or arm_with_vfpv3.
4643         (initialize_low_arch): Don't call init_registers_arm_with_neon.
4644         Call initialize_low_arch_aarch32 instead.
4645
4646 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4647
4648         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4649         * linux-low.c: ... here.
4650         * linux-low.h (have_ptrace_getregset): Declare it.
4651
4652 2015-08-04  Pedro Alves  <palves@redhat.com>
4653
4654         * thread-db.c (struct thread_db): Use new typedefs.
4655         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4656         CHK calls.
4657         (disable_thread_event_reporting): Cast result of dlsym to
4658         destination function pointer type.
4659         (thread_db_mourn): Use td_ta_delete_ftype.
4660
4661 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
4662
4663         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4664         arch variant.
4665         (CDX_BREAKPOINT): Define for R2.
4666         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4667         (the_low_target): Add comments.
4668
4669 2015-07-30  Yao Qi  <yao.qi@linaro.org>
4670
4671         * linux-arm-low.c (arm_hwcap): Remove it.
4672         (arm_read_description): New local variable arm_hwcap.  Don't
4673         set arm_hwcap to zero.
4674
4675 2015-07-30  Yao Qi  <yao.qi@linaro.org>
4676
4677         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4678         Use regcache->tdesc instead.
4679         (arm_store_wmmxregset): Likewise.
4680         (arm_fill_vfpregset): Likewise.
4681         (arm_store_vfpregset): Likewise.
4682
4683 2015-07-30  Yao Qi  <yao.qi@linaro.org>
4684
4685         * linux-arm-low.c: Include arch/arm.h.
4686         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4687         (arm_store_gregset): Likewise.
4688
4689 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
4690
4691         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4692         ptrace's 4th parameter.
4693
4694 2015-07-27  Yao Qi  <yao.qi@linaro.org>
4695
4696         * configure.srv (case aarch64*-*-linux*): Don't set
4697         srv_linux_usrregs.
4698
4699 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
4700
4701         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4702         sys/ptrace.h.
4703         * linux-arm-low.c: Likewise.
4704         * linux-cris-low.c: Likewise.
4705         * linux-crisv32-low.c: Likewise.
4706         * linux-low.c: Likewise.
4707         * linux-m68k-low.c: Likewise.
4708         * linux-mips-low.c: Likewise.
4709         * linux-nios2-low.c: Likewise.
4710         * linux-s390-low.c: Likewise.
4711         * linux-sparc-low.c: Likewise.
4712         * linux-tic6x-low.c: Likewise.
4713         * linux-tile-low.c: Likewise.
4714         * linux-x86-low.c: Likewise.
4715
4716 2015-07-24  Pedro Alves  <palves@redhat.com>
4717
4718         * config.in: Regenerate.
4719         * configure: Regenerate.
4720
4721 2015-07-24  Pedro Alves  <palves@redhat.com>
4722
4723         * acinclude.m4: Include ../ptrace.m4.
4724         * configure.ac: Call GDB_AC_PTRACE.
4725         * config.in, configure: Regenerate.
4726
4727 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4728
4729         * linux-low.c (linux_create_inferior): Remove setting to
4730         proc->priv->new_inferior.
4731         (linux_attach): Likewise.
4732         (linux_low_filter_event): Likewise.
4733         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4734
4735 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4736
4737         * linux-low.c (linux_arch_setup): New function.
4738         (linux_low_filter_event): If proc->tdesc is NULL and
4739         proc->attached is true, call the_low_target.arch_setup.
4740         Otherwise, keep status pending, and return.
4741         (linux_resume_one_lwp_throw): Don't call get_pc if
4742         thread->while_stepping isn't NULL.  Don't call
4743         get_thread_regcache if proc->tdesc is NULL.
4744         (need_step_over_p): Return 0 if proc->tdesc is NULL.
4745         (linux_target_ops): Install arch_setup.
4746         * server.c (start_inferior): Call the_target->arch_setup.
4747         * target.h (struct target_ops) <arch_setup>: New field.
4748         (target_arch_setup): New marco.
4749         * lynx-low.c (lynx_target_ops): Update.
4750         * nto-low.c (nto_target_ops): Update.
4751         * spu-low.c (spu_target_ops): Update.
4752         * win32-low.c (win32_target_ops): Update.
4753
4754 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4755
4756         * linux-low.c (linux_add_process): Don't set
4757         proc->priv->new_inferior.
4758         (linux_create_inferior): Set proc->priv->new_inferior to 1.
4759         (linux_attach): Likewise.
4760
4761 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4762
4763         * server.c (start_inferior): Code refactor.
4764
4765 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4766
4767         * server.c (process_serial_event): Set general_thread.
4768
4769 2015-07-21  Yao Qi  <yao.qi@linaro.org>
4770
4771         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4772         aarch64_linux_get_debug_reg_capacity.
4773
4774 2015-07-17  Yao Qi  <yao.qi@linaro.org>
4775
4776         * Makefile.in (aarch64-linux-hw-point.o): New rule.
4777         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4778         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4779         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4780         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4781         (AARCH64_HWP_ALIGNMENT): Likewise.
4782         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4783         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4784         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4785         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4786         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4787         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4788         (struct aarch64_debug_reg_state): Likewise.
4789         (struct arch_lwp_info): Likewise.
4790         (aarch64_align_watchpoint): Likewise.
4791         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4792         (aarch64_watchpoint_length): Likewise.
4793         (aarch64_point_encode_ctrl_reg): Likewise
4794         (aarch64_point_is_aligned): Likewise.
4795         (aarch64_align_watchpoint): Likewise.
4796         (aarch64_linux_set_debug_regs):
4797         (aarch64_dr_state_insert_one_point): Likewise.
4798         (aarch64_dr_state_remove_one_point): Likewise.
4799         (aarch64_handle_breakpoint): Likewise.
4800         (aarch64_handle_aligned_watchpoint): Likewise.
4801         (aarch64_handle_unaligned_watchpoint): Likewise.
4802         (aarch64_handle_watchpoint): Likewise.
4803
4804 2015-07-17  Yao Qi  <yao.qi@linaro.org>
4805
4806         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4807         and don't aarch64_get_debug_reg_state.  All callers update.
4808         (aarch64_handle_aligned_watchpoint): Likewise.
4809         (aarch64_handle_unaligned_watchpoint): Likewise.
4810         (aarch64_handle_watchpoint): Likewise.
4811         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4812         (aarch64_remove_point): Likewise.
4813
4814 2015-07-17  Yao Qi  <yao.qi@linaro.org>
4815
4816         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4817         debug_printf.
4818         (aarch64_handle_unaligned_watchpoint): Likewise.
4819
4820 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
4821
4822         Revert the previous 3 commits:
4823         Move gdb_regex* to common/
4824         Move linux_find_memory_regions_full & co.
4825         gdbserver build-id attribute generator
4826
4827 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
4828             Jan Kratochvil  <jan.kratochvil@redhat.com>
4829
4830         gdbserver build-id attribute generator.
4831         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4832         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4833         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4834         (find_phdr): New.
4835         (get_dynamic): Use find_pdhr to traverse program headers.
4836         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4837         (compare_mapping_entry_range, struct find_memory_region_callback_data)
4838         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4839         (get_hex_build_id): New.
4840         (linux_qxfer_libraries_svr4): Add optional build-id attribute
4841         to reply XML document.
4842
4843 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
4844             Jan Kratochvil  <jan.kratochvil@redhat.com>
4845
4846         * target.c: Include target/target-utils.h and fcntl.h.
4847         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4848         (target_fileio_read_stralloc): New functions.
4849
4850 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
4851
4852         * Makefile.in (OBS): Add gdb_regex.o.
4853         (gdb_regex.o): New.
4854         * config.in: Rebuilt.
4855         * configure: Rebuilt.
4856
4857 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
4858             Jan Kratochvil  <jan.kratochvil@redhat.com>
4859
4860         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4861         * Makefile.in (OBS): Add target-utils.o.
4862         (linux-maps.o, target-utils.o): New.
4863         * configure.srv (srv_linux_obj): Add linux-maps.o.
4864
4865 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
4866
4867         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4868         function, return 1.
4869         (the_low_target): Install it.
4870
4871 2015-07-14  Pedro Alves  <palves@redhat.com>
4872
4873         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4874         Instead, ignore ECHILD, and throw an error for other errnos.
4875
4876 2015-07-10  Pedro Alves  <palves@redhat.com>
4877
4878         * event-loop.c (struct callback_event) <data>: Change type to
4879         gdb_client_data instance instead of gdb_client_data pointer.
4880         (append_callback_event): Adjust.
4881
4882 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
4883
4884         * linux-aarch64-low.c: Add comments for each linux_target_ops
4885         method.  Remove comments already covered in target_ops and
4886         linux_target_ops definitions.
4887         (the_low_target): Add comments for each unimplemented method.
4888
4889 2015-07-09  Yao Qi  <yao.qi@linaro.org>
4890
4891         * linux-aarch64-low.c (aarch64_regmap): Remove.
4892         (aarch64_usrregs_info): Remove.
4893         (regs_info): Set field usrregs to NULL.
4894
4895 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
4896
4897         * linux-low.c: Include "rsp-low.h"
4898         (linux_low_encode_pt_config, linux_low_encode_raw): New.
4899         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4900         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4901         (handle_btrace_enable_pt): New.
4902         (handle_btrace_general_set): Support "pt".
4903         (handle_btrace_conf_general_set): Support "pt:size".
4904
4905 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
4906
4907         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4908         Z_PACKET_SW_BP.
4909
4910 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
4911
4912         * linux-aarch64-low.c: Remove comment about endianness.
4913         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
4914         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
4915         memcmp.
4916
4917 2015-06-24  Gary Benson  <gbenson@redhat.com>
4918
4919         * linux-i386-ipa.c (stdint.h): Do not include.
4920         * lynx-i386-low.c (stdint.h): Likewise.
4921         * lynx-ppc-low.c (stdint.h): Likewise.
4922         * mem-break.c (stdint.h): Likewise.
4923         * thread-db.c (stdint.h): Likewise.
4924         * tracepoint.c (stdint.h): Likewise.
4925         * win32-low.c (stdint.h): Likewise.
4926
4927 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
4928
4929         * server.c (write_qxfer_response): Update call to
4930         remote_escape_output.
4931
4932 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
4933             Jan Kratochvil  <jan.kratochvil@redhat.com>
4934
4935         Merge multiple hex conversions.
4936         * gdbreplay.c (tohex): Rename to 'fromhex'.
4937         (logchar): Use fromhex.
4938
4939 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
4940
4941         * server.c (handle_qxfer_libraries): Set `version' attribute for
4942         <library-list>.
4943
4944 2015-06-10  Gary Benson  <gbenson@redhat.com>
4945
4946         * target.h (struct target_ops) <multifs_open>: New field.
4947         <multifs_unlink>: Likewise.
4948         <multifs_readlink>: Likewise.
4949         * linux-low.c (nat/linux-namespaces.h): New include.
4950         (linux_target_ops): Initialize the_target->multifs_open,
4951         the_target->multifs_unlink and the_target->multifs_readlink.
4952         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4953         * hostio.c (hostio_fs_pid): New static variable.
4954         (hostio_handle_new_gdb_connection): New function.
4955         (handle_setfs): Likewise.
4956         (handle_open): Use the_target->multifs_open as appropriate.
4957         (handle_unlink): Use the_target->multifs_unlink as appropriate.
4958         (handle_readlink): Use the_target->multifs_readlink as
4959         appropriate.
4960         (handle_vFile): Handle vFile:setfs packets.
4961         * server.c (handle_query): Call hostio_handle_new_gdb_connection
4962         after target_handle_new_gdb_connection.
4963
4964 2015-06-10  Gary Benson  <gbenson@redhat.com>
4965
4966         * configure.ac (AC_CHECK_FUNCS): Add setns.
4967         * config.in: Regenerate.
4968         * configure: Likewise.
4969         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4970         (linux-namespaces.o): New rule.
4971         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4972
4973 2015-06-09  Gary Benson <gbenson@redhat.com>
4974
4975         * hostio.c (handle_open): Process mode argument with
4976         fileio_to_host_mode.
4977
4978 2015-06-01  Yao Qi  <yao.qi@linaro.org>
4979
4980         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4981         * linux-x86-low.c: Likewise.
4982
4983 2015-05-28  Don Breazeal  <donb@codesourcery.com>
4984
4985         * linux-low.c (handle_extended_wait): Initialize
4986         thread_info.last_resume_kind for new fork children.
4987
4988 2015-05-15  Pedro Alves  <palves@redhat.com>
4989
4990         * target.h (target_handle_new_gdb_connection): Rewrite using if
4991         wrapped in do/while.
4992
4993 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
4994
4995         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4996         * configure, config.in: Regenerate.
4997         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4998         Declare typedef.
4999
5000 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5001
5002         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5003         PTRACE_EVENT_VFORK_DONE.
5004         (linux_low_ptrace_options, extended_event_reported): Add vfork
5005         events.
5006         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5007         and "vforkdone" for RSP 'T' Stop Reply Packet.
5008         * server.h (report_vfork_events): Declare
5009         global variable.
5010
5011 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5012
5013         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5014         (the_low_target) <new_fork>: Initialize new member.
5015         * linux-arm-low.c (arm_new_fork): New function.
5016         (the_low_target) <new_fork>: Initialize new member.
5017         * linux-low.c (handle_extended_wait): Call new target function
5018         new_fork.
5019         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5020         * linux-mips-low.c (mips_add_watchpoint): New function
5021         extracted from mips_insert_point.
5022         (the_low_target) <new_fork>: Initialize new member.
5023         (mips_linux_new_fork): New function.
5024         (mips_insert_point): Call mips_add_watchpoint.
5025         * linux-x86-low.c (x86_linux_new_fork): New function.
5026         (the_low_target) <new_fork>: Initialize new member.
5027
5028 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5029
5030         * linux-low.c (handle_extended_wait): Implement return value,
5031         rename argument 'event_child' to 'event_lwp', handle
5032         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5033         (linux_low_ptrace_options): New function.
5034         (linux_low_filter_event): Call linux_low_ptrace_options,
5035         use different argument fo linux_enable_event_reporting,
5036         use return value from handle_extended_wait.
5037         (extended_event_reported): New function.
5038         (linux_wait_1): Call extended_event_reported and set
5039         status to report fork events.
5040         (linux_write_memory): Add pid to debug message.
5041         (reset_lwp_ptrace_options_callback): New function.
5042         (linux_handle_new_gdb_connection): New function.
5043         (linux_target_ops): Initialize new structure member.
5044         * linux-low.h (struct lwp_info) <waitstatus>: New member.
5045         * lynx-low.c: Initialize new structure member.
5046         * remote-utils.c (prepare_resume_reply): Implement stop reason
5047         "fork" for "T" stop message.
5048         * server.c (handle_query): Call handle_new_gdb_connection.
5049         * server.h (report_fork_events): Declare global flag.
5050         * target.h (struct target_ops) <handle_new_gdb_connection>:
5051         New member.
5052         (target_handle_new_gdb_connection): New macro.
5053         * win32-low.c: Initialize new structure member.
5054
5055 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5056
5057         * mem-break.c (APPEND_TO_LIST): Define macro.
5058         (clone_agent_expr): New function.
5059         (clone_one_breakpoint): New function.
5060         (clone_all_breakpoints): New function.
5061         * mem-break.h: Declare new functions.
5062
5063 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5064
5065         * linux-low.c (linux_supports_fork_events): New function.
5066         (linux_supports_vfork_events): New function.
5067         (linux_target_ops): Initialize new structure members.
5068         (initialize_low): Call linux_check_ptrace_features.
5069         * lynx-low.c (lynx_target_ops): Initialize new structure
5070         members.
5071         * server.c (report_fork_events, report_vfork_events):
5072         New global flags.
5073         (handle_query): Add new features to qSupported packet and
5074         response.
5075         (captured_main): Initialize new global variables.
5076         * target.h (struct target_ops) <supports_fork_events>:
5077         New member.
5078         <supports_vfork_events>: New member.
5079         (target_supports_fork_events): New macro.
5080         (target_supports_vfork_events): New macro.
5081         * win32-low.c (win32_target_ops): Initialize new structure
5082         members.
5083
5084 2015-05-12  Gary Benson <gbenson@redhat.com>
5085
5086         * server.c (handle_qxfer_exec_file): Use current process
5087         if annex is empty.
5088
5089 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
5090
5091         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
5092         Remove HAVE_PTRACE_GETREGS conditionals.
5093         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5094         instead of PTRACE_GETREGS and PTRACE_SETREGS.
5095
5096 2015-05-08  Yao Qi  <yao.qi@linaro.org>
5097
5098         * linux-low.c (linux_supports_conditional_breakpoints): New
5099         function.
5100         (linux_target_ops): Install new target method.
5101         * lynx-low.c (lynx_target_ops): Install NULL hook for
5102         supports_conditional_breakpoints.
5103         * nto-low.c (nto_target_ops): Likewise.
5104         * spu-low.c (spu_target_ops): Likewise.
5105         * win32-low.c (win32_target_ops): Likewise.
5106         * server.c (handle_query): Check
5107         target_supports_conditional_breakpoints.
5108         * target.h (struct target_ops) <supports_conditional_breakpoints>:
5109         New field.
5110         (target_supports_conditional_breakpoints): New macro.
5111
5112 2015-05-06  Pedro Alves  <palves@redhat.com>
5113
5114         PR server/18081
5115         * server.c (start_inferior): If the process exits, mourn it.
5116
5117 2015-04-21  Gary Benson <gbenson@redhat.com>
5118
5119         * hostio.c (fileio_open_flags_to_host): Factored out to
5120         fileio_to_host_openflags in common/fileio.c.  Single use
5121         updated.
5122
5123 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5124
5125         * linux-xtensa-low.c (xtensa_fill_gregset)
5126         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5127         XCHAL_HAVE_LOOP.
5128
5129 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5130
5131         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5132         (regs_info): Replace usrregs pointer with NULL.
5133
5134 2015-04-17  Gary Benson  <gbenson@redhat.com>
5135
5136         * target.h (struct target_ops) <pid_to_exec_file>: New field.
5137         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5138         * server.c (handle_qxfer_exec_file): New function.
5139         (qxfer_packets): Add exec-file entry.
5140         (handle_query): Report qXfer:exec-file:read as supported packet.
5141
5142 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
5143
5144         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5145
5146 2015-04-09  Gary Benson <gbenson@redhat.com>
5147
5148         * hostio-errno.c (errno_to_fileio_error): Remove function.
5149         Update caller to use remote_fileio_to_fio_error.
5150
5151 2015-04-09  Yao Qi  <yao.qi@linaro.org>
5152
5153         * linux-low.c (linux_insert_point): Call
5154         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5155         (linux_remove_point): Call remove_memory_breakpoint if type is
5156         raw_bkpt_type_sw.
5157         * linux-x86-low.c (x86_insert_point): Don't call
5158         insert_memory_breakpoint.
5159         (x86_remove_point): Don't call remove_memory_breakpoint.
5160
5161 2015-04-01  Pedro Alves  <palves@redhat.com>
5162             Cleber Rosa  <crosa@redhat.com>
5163
5164         * server.c (gdbserver_usage): Reorganize and extend the usage
5165         message.
5166
5167 2015-03-24  Pedro Alves  <palves@redhat.com>
5168
5169         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5170         output.  Also dump TRAP_TRACE.
5171         (linux_low_filter_event): In debug output, distinguish a
5172         resume_stop SIGSTOP from a delayed SIGSTOP.
5173
5174 2015-03-24  Gary Benson  <gbenson@redhat.com>
5175
5176         * linux-x86-low.c (x86_linux_new_thread): Moved to
5177         nat/x86-linux.c.
5178         (x86_linux_prepare_to_resume): Likewise.
5179
5180 2015-03-24  Gary Benson  <gbenson@redhat.com>
5181
5182         * Makefile.in (x86-linux-dregs.o): New rule.
5183         * configure.srv: Add x86-linux-dregs.o to relevant targets.
5184         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5185         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5186         (x86_linux_dr_get): Likewise.
5187         (x86_linux_dr_set): Likewise.
5188         (update_debug_registers_callback): Likewise.
5189         (x86_linux_dr_set_addr): Likewise.
5190         (x86_linux_dr_get_addr): Likewise.
5191         (x86_linux_dr_set_control): Likewise.
5192         (x86_linux_dr_get_control): Likewise.
5193         (x86_linux_dr_get_status): Likewise.
5194         (x86_linux_update_debug_registers): Likewise.
5195
5196 2015-03-24  Gary Benson  <gbenson@redhat.com>
5197
5198         * linux-x86-low.c (x86_linux_update_debug_registers):
5199         New function, factored out from...
5200         (x86_linux_prepare_to_resume): ...this.
5201
5202 2015-03-24  Gary Benson  <gbenson@redhat.com>
5203
5204         * linux-x86-low.c (x86_linux_dr_get): Update comments.
5205         (x86_linux_dr_set): Likewise.
5206         (update_debug_registers_callback): Likewise.
5207         (x86_linux_dr_set_addr): Likewise.
5208         (x86_linux_dr_get_addr): Likewise.
5209         (x86_linux_dr_set_control): Likewise.
5210         (x86_linux_dr_get_control): Likewise.
5211         (x86_linux_dr_get_status): Likewise.
5212         (x86_linux_prepare_to_resume): Likewise.
5213
5214 2015-03-24  Gary Benson  <gbenson@redhat.com>
5215
5216         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5217         Use perror_with_name.  Pass string through gettext.
5218         (x86_linux_dr_set): Likewise.
5219
5220 2015-03-24  Gary Benson  <gbenson@redhat.com>
5221
5222         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5223         (x86_linux_dr_set_addr): ...this.
5224         (x86_dr_low_get_addr): Rename to...
5225         (x86_linux_dr_get_addr): ...this.
5226         (x86_dr_low_set_control): Rename to...
5227         (x86_linux_dr_set_control): ...this.
5228         (x86_dr_low_get_control): Rename to...
5229         (x86_linux_dr_get_control): ...this.
5230         (x86_dr_low_get_status): Rename to...
5231         (x86_linux_dr_get_status): ...this.
5232         (x86_dr_low): Update with new function names.
5233
5234 2015-03-24  Gary Benson  <gbenson@redhat.com>
5235
5236         * Makefile.in (x86-linux.o): New rule.
5237         * configure.srv: Add x86-linux.o to relevant targets.
5238         * linux-low.c (lwp_set_arch_private_info): New function.
5239         (lwp_arch_private_info): Likewise.
5240         * linux-x86-low.c: Include nat/x86-linux.h.
5241         (arch_lwp_info): Removed structure.
5242         (update_debug_registers_callback):
5243         Use lwp_set_debug_registers_changed.
5244         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5245         and lwp_set_debug_registers_changed.
5246         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5247
5248 2015-03-24  Gary Benson  <gbenson@redhat.com>
5249
5250         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5251         * linux-arm-low.c (arm_new_thread): Likewise.
5252         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5253         * linux-mips-low.c (mips_linux_new_thread): Likewise.
5254         * linux-x86-low.c (x86_linux_new_thread): Likewise.
5255         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5256
5257 2015-03-24  Gary Benson  <gbenson@redhat.com>
5258
5259         * linux-low.c (ptid_of_lwp): New function.
5260         (lwp_is_stopped): Likewise.
5261         (lwp_stop_reason): Likewise.
5262         * linux-x86-low.c (update_debug_registers_callback):
5263         Use lwp_is_stopped.
5264         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5265         lwp_stop_reason.
5266
5267 2015-03-24  Gary Benson  <gbenson@redhat.com>
5268
5269         * linux-low.h (linux_stop_lwp): Remove declaration.
5270
5271 2015-03-24  Gary Benson  <gbenson@redhat.com>
5272
5273         * linux-low.h: Include nat/linux-nat.h.
5274         * linux-low.c (iterate_over_lwps_args): New structure.
5275         (iterate_over_lwps_filter): New function.
5276         (iterate_over_lwps): Likewise.
5277         * linux-x86-low.c (update_debug_registers_callback):
5278         Update signature to what iterate_over_lwps expects.
5279         Remove PID check that iterate_over_lwps now performs.
5280         (x86_dr_low_set_addr): Use iterate_over_lwps.
5281         (x86_dr_low_set_control): Likewise.
5282
5283 2015-03-24  Gary Benson  <gbenson@redhat.com>
5284
5285         * linux-x86-low.c (x86_debug_reg_state): New function.
5286         (x86_linux_prepare_to_resume): Use the above.
5287
5288 2015-03-24  Gary Benson  <gbenson@redhat.com>
5289
5290         * linux-low.c (current_lwp_ptid): New function.
5291         * linux-x86-low.c: Include nat/linux-nat.h.
5292         (x86_dr_low_get_addr): Use current_lwp_ptid.
5293         (x86_dr_low_get_control): Likewise.
5294         (x86_dr_low_get_status): Likewise.
5295
5296 2015-03-20  Pedro Alves  <palves@redhat.com>
5297
5298         * tracepoint.c (cmd_qtstatus): Make "str" const.
5299
5300 2015-03-20  Pedro Alves  <palves@redhat.com>
5301
5302         * server.c (handle_general_set): Make "req_str" const.
5303
5304 2015-03-19  Pedro Alves  <palves@redhat.com>
5305
5306         * linux-low.c (linux_resume_one_lwp): Rename to ...
5307         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
5308         instead call perror_with_name.
5309         (check_ptrace_stopped_lwp_gone): New function.
5310         (linux_resume_one_lwp): Reimplement as wrapper around
5311         linux_resume_one_lwp_throw that swallows errors if the LWP is
5312         gone.
5313
5314 2015-03-19  Pedro Alves  <palves@redhat.com>
5315
5316         * linux-low.c (count_events_callback, select_event_lwp_callback):
5317         No longer check whether the thread has resume_stop as last resume
5318         kind.
5319
5320 2015-03-19 Pedro Alves  <palves@redhat.com>
5321
5322         * linux-low.c (count_events_callback, select_event_lwp_callback):
5323         Use the lwp's status_pending_p field, not the thread's.
5324
5325 2015-03-19  Pedro Alves  <palves@redhat.com>
5326
5327         * linux-low.c (select_event_lwp_callback): Update comments to
5328         no longer mention SIGTRAP.
5329
5330 2015-03-18  Gary Benson  <gbenson@redhat.com>
5331
5332         * server.c (handle_query): Do not report vFile:fstat as supported.
5333
5334 2015-03-11  Gary Benson  <gbenson@redhat.com>
5335
5336         * hostio.c (sys/types.h): New include.
5337         (sys/stat.h): Likewise.
5338         (common-remote-fileio.h): Likewise.
5339         (handle_fstat): New function.
5340         (handle_vFile): Handle vFile:fstat packets.
5341
5342 2015-03-11  Gary Benson  <gbenson@redhat.com>
5343
5344         * configure.ac (AC_CHECK_MEMBERS): Add checks for
5345         struct stat.st_blocks and struct stat.st_blksize.
5346         * configure: Regenerate.
5347         * config.in: Likewise.
5348         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5349         (OBS): Add common-remote-fileio.o.
5350         (common-remote-fileio.o): New rule.
5351
5352 2015-03-09  Pedro Alves  <palves@redhat.com>
5353
5354         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5355         'struct sockaddr' pointer in 'accept' call.
5356
5357 2015-03-09  Pedro Alves  <palves@redhat.com>
5358
5359         Revert:
5360         2015-03-07  Pedro Alves  <palves@redhat.com>
5361         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5362         or <winsock2.h> here.  Instead include "gdb_socket.h".
5363         (remote_open): Use union gdb_sockaddr_u.
5364         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5365         or <winsock2.h> here.  Instead include "gdb_socket.h".
5366         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5367         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5368         or <sys/un.h>.
5369         (init_named_socket, gdb_agent_helper_thread): Use union
5370         gdb_sockaddr_u.
5371
5372 2015-03-07  Pedro Alves  <palves@redhat.com>
5373
5374         * configure.ac (build_warnings): Move
5375         -Wdeclaration-after-statement to the C-specific set.
5376         * configure: Regenerate.
5377
5378 2015-03-07  Pedro Alves  <palves@redhat.com>
5379
5380         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5381         or <winsock2.h> here.  Instead include "gdb_socket.h".
5382         (remote_open): Use union gdb_sockaddr_u.
5383         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5384         or <winsock2.h> here.  Instead include "gdb_socket.h".
5385         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5386         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5387         or <sys/un.h>.
5388         (init_named_socket, gdb_agent_helper_thread): Use union
5389         gdb_sockaddr_u.
5390
5391 2015-03-07  Pedro Alves  <palves@redhat.com>
5392
5393         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5394         instead.
5395
5396 2015-03-06  Yao Qi  <yao.qi@linaro.org>
5397
5398         * linux-aarch64-low.c (aarch64_insert_point): Use
5399         show_debug_regs as a boolean.
5400         (aarch64_remove_point): Likewise.
5401
5402 2015-03-05  Pedro Alves  <palves@redhat.com>
5403
5404         * lynx-low.c (lynx_target_ops): Install NULL hooks for
5405         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5406         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5407         * nto-low.c (nto_target_ops): Likewise.
5408         * spu-low.c (spu_target_ops): Likewise.
5409         * win32-low.c (win32_target_ops): Likewise.
5410
5411 2015-03-04  Pedro Alves  <palves@redhat.com>
5412
5413         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5414         Decide whether a breakpoint triggered based on the SIGTRAP's
5415         siginfo.si_code.
5416         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5417         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5418         (linux_low_filter_event): Check for breakpoints before checking
5419         watchpoints.
5420         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5421         siginfo.si_code.
5422         (linux_stopped_by_sw_breakpoint)
5423         (linux_supports_stopped_by_sw_breakpoint)
5424         (linux_stopped_by_hw_breakpoint)
5425         (linux_supports_stopped_by_hw_breakpoint): New functions.
5426         (linux_target_ops): Install new target methods.
5427
5428 2015-03-04  Pedro Alves  <palves@redhat.com>
5429
5430         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5431         * server.c (swbreak_feature, hwbreak_feature): New globals.
5432         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5433         (captured_main): Clear swbreak_feature and hwbreak_feature.
5434         * server.h (swbreak_feature, hwbreak_feature): Declare.
5435         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5436         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5437         supports_stopped_by_hw_breakpoint>: New fields.
5438         (target_supports_stopped_by_sw_breakpoint)
5439         (target_stopped_by_sw_breakpoint)
5440         (target_supports_stopped_by_hw_breakpoint)
5441         (target_stopped_by_hw_breakpoint): Declare.
5442
5443 2015-03-04  Pedro Alves  <palves@redhat.com>
5444
5445         enum lwp_stop_reason -> enum target_stop_reason
5446         * linux-low.c (check_stopped_by_breakpoint): Adjust.
5447         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5448         (linux_wait_1, stuck_in_jump_pad_callback)
5449         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5450         (linux_stopped_by_watchpoint):
5451         * linux-low.h (enum lwp_stop_reason): Delete.
5452         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5453         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5454
5455 2015-03-04  Yao Qi  <yao.qi@linaro.org>
5456
5457         * Makefile.in (SFILES): Add linux-aarch64-low.c.
5458
5459 2015-03-03  Gary Benson  <gbenson@redhat.com>
5460
5461         * hostio.c (handle_vFile): Fix prefix lengths.
5462
5463 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
5464
5465         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5466         ptr_bits.
5467
5468 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5469
5470         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5471         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5472         (clean): Add "rm -f" for above C files.
5473         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5474         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5475         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5476         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5477         * linux-s390-low.c (HWCAP_S390_VX): New macro.
5478         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5479         (init_registers_s390x_vx_linux64)
5480         (init_registers_s390x_tevx_linux64)
5481         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5482         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5483         declarations.
5484         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5485         (s390_store_vxrs_high): New functions.
5486         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5487         NT_S390_VXRS_HIGH.
5488         (s390_arch_setup): Add logic for selecting one of the new target
5489         descriptions.  Activate the new vector regsets if applicable.
5490         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5491         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5492         and init_registers_s390x_tevx_linux64.
5493
5494 2015-03-01  Pedro Alves  <palves@redhat.com>
5495
5496         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5497         parameter.
5498
5499 2015-02-27  Pedro Alves  <palves@redhat.com>
5500
5501         * linux-x86-low.c (u_debugreg_offset): New function.
5502         (x86_linux_dr_get, x86_linux_dr_set): Use it.
5503
5504 2015-02-27  Pedro Alves  <palves@redhat.com>
5505
5506         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5507         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5508         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5509         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5510         (ps_lsetfpregs, ps_getpid)
5511         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5512         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5513         (ps_lsetxregs, ps_plog): Declare.
5514
5515 2015-02-27  Pedro Alves  <palves@redhat.com>
5516
5517         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5518         IP_AGENT_EXPORT_FUNC.
5519         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5520         IP_AGENT_EXPORT_FUNC.
5521         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5522         (IP_AGENT_EXPORT): Delete.
5523         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5524         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5525         (gdb_trampoline_buffer_error, collecting, gdb_collect)
5526         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5527         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5528         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5529         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5530         (traceframe_read_count, traceframe_write_count)
5531         (traceframes_created, trace_state_variables, get_raw_reg)
5532         (get_trace_state_variable_value, set_trace_state_variable_value)
5533         (ust_loaded, helper_thread_id, cmd_buf): Use
5534         IPA_SYM_EXPORTED_NAME.
5535         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5536         (tracepoints) Use IP_AGENT_EXPORT_VAR.
5537         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5538         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5539         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5540         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5541         EXTERN_C_PUSH/EXTERN_C_POP.
5542         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5543         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5544         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5545         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5546         (traceframe_write_count, traceframe_read_count)
5547         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5548         (about_to_request_buffer_space, get_trace_state_variable_value)
5549         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5550         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5551         EXTERN_C_PUSH/EXTERN_C_POP.
5552         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5553         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5554         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5555         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5556         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5557         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5558         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5559         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5560         Define.
5561         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5562         (IP_AGENT_EXPORT_VAR_DECL): Define.
5563         (tracing): Declare.
5564         (gdb_agent_get_raw_reg): Declare.
5565
5566 2015-02-27  Tom Tromey  <tromey@redhat.com>
5567             Pedro Alves  <palves@redhat.com>
5568
5569         Rename symbols whose names are reserved C++ keywords throughout.
5570
5571 2015-02-27  Pedro Alves  <palves@redhat.com>
5572
5573         * Makefile.in (COMPILER): New, get it from autoconf.
5574         (CXX): Get from autoconf instead.
5575         (COMPILE.pre): Use COMPILER.
5576         (CC-LD): Rename to ...
5577         (CC_LD): ... this.  Use COMPILER.
5578         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5579         (CXX_FOR_TARGET): Default to g++ instead of gcc.
5580         * acinclude.m4: Include build-with-cxx.m4.
5581         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5582         Disable -Werror by default if building in C++ mode.
5583         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5584         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5585         the C++ compiler.  Save/restore CXXFLAGS too.
5586         * configure: Regenerate.
5587
5588 2015-02-27  Pedro Alves  <palves@redhat.com>
5589
5590         * acinclude.m4: Include libiberty.m4.
5591         * configure.ac: Call libiberty_INIT.
5592         * config.in, configure: Regenerate.
5593
5594 2015-02-26  Pedro Alves  <palves@redhat.com>
5595
5596         * linux-low.c (linux_wait_1): When incrementing the PC past a
5597         program breakpoint always use the_low_target.breakpoint_len as
5598         increment, rather than the maximum between that and
5599         the_low_target.decr_pc_after_break.
5600
5601 2015-02-23  Pedro Alves  <palves@redhat.com>
5602
5603         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5604         thread was doing a step-over; always adjust the PC if
5605         we stepped over a permanent breakpoint.
5606         (linux_wait_1): If we stepped over breakpoint that was on top of a
5607         permanent breakpoint, manually advance the PC past it.
5608
5609 2015-02-23  Pedro Alves  <palves@redhat.com>
5610
5611         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5612         modes.
5613         (x86_fill_gregset, x86_store_gregset): Use it when handling
5614         $orig_eax.
5615
5616 2015-02-20  Pedro Alves  <palves@redhat.com>
5617
5618         * thread-db.c: Include "nat/linux-procfs.h".
5619         (thread_db_init): Skip listing new threads if the kernel supports
5620         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5621
5622 2015-02-20  Pedro Alves  <palves@redhat.com>
5623
5624         * linux-low.c (status_pending_p_callback): Use ptid_match.
5625
5626 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
5627
5628         PR breakpoints/16812
5629         * linux-low.c (wstatus_maybe_breakpoint): Remove.
5630         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5631         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5632
5633 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
5634
5635         PR breakpoints/15956
5636         * tracepoint.c (cmd_qtinit): Add check for current_thread.
5637
5638 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5639
5640         * linux-low.c (linux_low_btrace_conf): Print size.
5641         * server.c (handle_btrace_conf_general_set): New.
5642         (hanle_general_set): Call handle_btrace_conf_general_set.
5643         (handle_query): Report Qbtrace-conf:bts:size as supported.
5644
5645 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5646
5647         * linux-low.c (linux_low_enable_btrace): Update parameters.
5648         (linux_low_btrace_conf): New.
5649         (linux_target_ops)<to_btrace_conf>: Initialize.
5650         * server.c (current_btrace_conf): New.
5651         (handle_btrace_enable): Rename to ...
5652         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
5653         to target_enable_btrace.  Update comment.  Update users.
5654         (handle_qxfer_btrace_conf): New.
5655         (qxfer_packets): Add btrace-conf entry.
5656         (handle_query): Report qXfer:btrace-conf:read as supported packet.
5657         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5658         (target_ops)<read_btrace_conf>: New.
5659         (target_enable_btrace): Update parameters.
5660         (target_read_btrace_conf): New.
5661
5662 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5663
5664         * server.c (handle_btrace_general_set): Remove call to
5665         target_supports_btrace.
5666         (supported_btrace_packets): New.
5667         (handle_query): Call supported_btrace_packets.
5668         * target.h: include btrace-common.h.
5669         (btrace_target_info): Removed.
5670         (supports_btrace, target_supports_btrace): Update parameters.
5671
5672 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5673
5674         * Makefile.in (SFILES): Add common/btrace-common.c.
5675         (OBS): Add common/btrace-common.o.
5676         (btrace-common.o): Add build rules.
5677         * linux-low: Include btrace-common.h.
5678         (linux_low_read_btrace): Use struct btrace_data.  Call
5679         btrace_data_init and btrace_data_fini.
5680
5681 2015-02-06  Pedro Alves  <palves@redhat.com>
5682
5683         * thread-db.c (find_new_threads_callback): Add debug output.
5684
5685 2015-02-04  Pedro Alves  <palves@redhat.com>
5686
5687         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5688         (resume_stopped_resumed_lwps): New function.
5689         (linux_wait_for_event_filtered): Use it.
5690
5691 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5692
5693         * Makefile.in (SFILES): Add linux-personality.c.
5694         (linux-personality.o): New rule.
5695         * configure.srv (srv_linux_obj): Add linux-personality.o to the
5696         list of objects to be built.
5697         * linux-low.c: Include nat/linux-personality.h.
5698         (linux_create_inferior): Remove code to disable address space
5699         randomization (moved to ../nat/linux-personality.c).  Create
5700         cleanup to disable address space randomization.
5701
5702 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5703
5704         * Makefile.in (posix-strerror.o): New rule.
5705         (mingw-strerror.o): Likewise.
5706         * configure: Regenerated.
5707         * configure.ac: Source file ../common/common.host.  Initialize new
5708         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
5709
5710 2015-01-14  Yao Qi  <yao@codesourcery.com>
5711
5712         * Makefile.in (SFILES): Add nat/ppc-linux.c.
5713         (ppc-linux.o): New rule.
5714         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5715         * configure.ac: AC_CHECK_FUNCS(getauxval).
5716         * config.in: Re-generated.
5717         * configure: Re-generated.
5718         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5719         ppc64_64bit_inferior_p
5720
5721 2015-01-14  Yao Qi  <yao@codesourcery.com>
5722
5723         * linux-ppc-low.c: Include "nat/ppc-linux.h".
5724          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5725         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
5726         (PT_ORIG_R3, PT_TRAP): Likewise.
5727         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5728         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5729         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5730
5731 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
5732
5733         * i387-fp.c (i387_cache_to_xsave): In look over
5734         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5735         zmmh_low_space field by use of zmmh_high_space.
5736
5737 2015-01-09  Pedro Alves  <palves@redhat.com>
5738
5739         * linux-low.c (step_over_bkpt): Move higher up in the file.
5740         (handle_extended_wait): Don't store the stop_pc here.
5741         (get_stop_pc): Adjust comments and rename to ...
5742         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
5743         stopped for a software breakpoint or hardware breakpoint.
5744         (thread_still_has_status_pending_p): New function.
5745         (status_pending_p_callback): Use
5746         thread_still_has_status_pending_p.  If the event is no longer
5747         interesting, resume the LWP.
5748         (handle_tracepoints): Add assert.
5749         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5750         (wstatus_maybe_breakpoint): New function.
5751         (cancel_breakpoint): Delete function.
5752         (check_stopped_by_watchpoint): New function, factored out from
5753         linux_low_filter_event.
5754         (lp_status_maybe_breakpoint): Delete function.
5755         (linux_low_filter_event): Remove filter_ptid argument.
5756         Leave thread group exits pending here.  Store the LWP's stop PC.
5757         Always leave events pending.
5758         (linux_wait_for_event_filtered): Pull all events out of the
5759         kernel, and leave them all pending.
5760         (count_events_callback, select_event_lwp_callback): Consider all
5761         events.
5762         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5763         (select_event_lwp): Only give preference to the stepping LWP in
5764         all-stop mode.  Adjust comments.
5765         (ignore_event): New function.
5766         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
5767         references to cancel_breakpoints.  Adjust to renames.  Also give
5768         equal priority to all LWPs that have had events in non-stop mode.
5769         If reporting a software breakpoint event, unadjust the LWP's PC.
5770         (linux_wait): If linux_wait_1 returned an ignored event, retry.
5771         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5772         Adjust.
5773         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
5774         (resume_status_pending_p): Use thread_still_has_status_pending_p.
5775         (linux_stopped_by_watchpoint): Adjust.
5776         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5777         * linux-low.h (enum lwp_stop_reason): New.
5778         (struct lwp_info) <stop_pc>: Adjust comment.
5779         <stopped_by_watchpoint>: Delete field.
5780         <stop_reason>: New field.
5781         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5782         * mem-break.c (software_breakpoint_inserted_here)
5783         (hardware_breakpoint_inserted_here): New function.
5784         * mem-break.h (software_breakpoint_inserted_here)
5785         (hardware_breakpoint_inserted_here): Declare.
5786         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5787         (cancel_breakpoints): Delete.
5788         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5789         (upload_fast_traceframes): Remove references to
5790         cancel_breakpoints.
5791
5792 2015-01-09  Pedro Alves  <palves@redhat.com>
5793
5794         * thread-db.c (find_new_threads_callback): Ignore thread if the
5795         kernel thread ID is -1.
5796
5797 2015-01-09  Pedro Alves  <palves@redhat.com>
5798
5799         * linux-low.c (linux_attach_fail_reason_string): Move to
5800         nat/linux-ptrace.c, and rename.
5801         (linux_attach_lwp): Update comment.
5802         (attach_proc_task_lwp_callback): New function.
5803         (linux_attach): Adjust to rename and use
5804         linux_proc_attach_tgid_threads.
5805         (linux_attach_fail_reason_string): Delete declaration.
5806
5807 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
5808
5809         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5810         * server.c (gdbserver_version): Likewise.
5811
5812 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
5813
5814         * remote-utils.c: Include ctype.h.
5815         (input_interrupt): Explicitly handle the case when the char
5816         received is the NUL byte.  Improve the printing of non-ASCII
5817         characters.
5818
5819 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
5820
5821         * linux-low.c (linux_low_filter_event): Update call to
5822         linux_enable_event_reporting following the addition of
5823         a new parameter to that function.
5824
5825 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
5826
5827         PR server/17457
5828         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5829         (AARCH64_FPCR_REGNO): Likewise.
5830         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5831         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5832         (aarch64_store_fpregset): Likewise.
5833
5834 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
5835
5836         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5837         Remove FIXME comment about assumption about N.
5838
5839 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
5840
5841         * configure.ac: If large-file support is disabled in GDBserver,
5842         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5843         * configure: Regenerate.
5844
5845 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5846
5847         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5848         warning upon ENODATA from ptrace.
5849         * linux-s390-low.c (s390_store_tdb): New.
5850         (s390_regsets): Add regset for NT_S390_TDB.
5851
5852 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5853
5854         * linux-low.c (regsets_store_inferior_registers): Skip regsets
5855         without a fill_function.
5856         * linux-s390-low.c (s390_fill_last_break): Remove.
5857         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5858         (s390_arch_setup): Use regset's size instead of fill_function for
5859         loop end condition.
5860
5861 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5862
5863         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5864         the regset's store function when ptrace returned an error.
5865         * regcache.c (get_thread_regcache): Invalidate register cache
5866         before fetching inferior's registers.
5867
5868 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5869
5870         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5871         while-loop as for-loop.
5872         (regsets_store_inferior_registers): Likewise.
5873
5874 2014-11-28  Yao Qi  <yao@codesourcery.com>
5875
5876         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5877         * config.in, configure: Re-generate.
5878         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5879         is defined.
5880
5881 2014-11-21  Yao Qi  <yao@codesourcery.com>
5882
5883         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5884         (AC_CHECK_HEADERS): Remove malloc.h.
5885         * configure: Re-generated.
5886         * config.in: Re-generated.
5887         * server.h: Don't include alloca.h and malloc.h.
5888         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5889         Don't include malloc.h.
5890
5891 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
5892
5893         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5894         corresponding ERRNO check in same block.
5895
5896 2014-11-12  Pedro Alves  <palves@redhat.com>
5897
5898         * server.c (cont_thread): Update comment.
5899         (start_inferior, attach_inferior): No longer clear cont_thread.
5900         (handle_v_cont): No longer set cont_thread.
5901         (captured_main): Clear cont_thread each time a GDB connects.
5902
5903 2014-11-12  Pedro Alves  <palves@redhat.com>
5904
5905         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5906         thread, and don't resume all threads if the Hc thread has exited.
5907
5908 2014-11-12  Pedro Alves  <palves@redhat.com>
5909
5910         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5911         the process group instead of to a specific LWP.
5912
5913 2014-10-15  Pedro Alves  <palves@redhat.com>
5914
5915         PR server/17487
5916         * win32-arm-low.c (arm_set_thread_context): Remove current_event
5917         parameter.
5918         (arm_set_thread_context): Delete.
5919         (the_low_target): Adjust.
5920         * win32-i386-low.c (debug_registers_changed)
5921         (debug_registers_used): Delete.
5922         (update_debug_registers_callback): New function.
5923         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5924         needing to update their debug registers.
5925         (win32_get_current_dr): New function.
5926         (x86_dr_low_get_addr, x86_dr_low_get_control)
5927         (x86_dr_low_get_status): Fetch the debug register from the thread
5928         record's context.
5929         (i386_initial_stuff): Adjust.
5930         (i386_get_thread_context): Remove current_event parameter.  Don't
5931         clear debug_registers_changed nor copy DR values to
5932         debug_reg_state.
5933         (i386_set_thread_context): Delete.
5934         (i386_prepare_to_resume): New function.
5935         (i386_thread_added): Mark the thread as needing to update irs
5936         debug registers.
5937         (the_low_target): Remove i386_set_thread_context and install
5938         i386_prepare_to_resume.
5939         * win32-low.c (win32_get_thread_context): Adjust.
5940         (win32_set_thread_context): Use SetThreadContext
5941         directly.
5942         (win32_prepare_to_resume): New function.
5943         (win32_require_context): New function, factored out from ...
5944         (thread_rec): ... this.
5945         (continue_one_thread): Call win32_prepare_to_resume on each thread
5946         we're about to continue.
5947         (win32_resume): Call win32_prepare_to_resume on the event thread.
5948         * win32-low.h (struct win32_thread_info)
5949         <debug_registers_changed>: New field.
5950         (struct win32_target_ops): Change prototype of set_thread_context,
5951         delete set_thread_context and add prepare_to_resume.
5952         (win32_require_context): New declaration.
5953
5954 2014-10-08  Gary Benson  <gbenson@redhat.com>
5955
5956         * server.h: Do not include common-exceptions.h.
5957
5958 2014-10-08  Gary Benson  <gbenson@redhat.com>
5959
5960         * server.h: Do not include cleanups.h.
5961
5962 2014-09-30  James Hogan  <james.hogan@imgtec.com>
5963
5964         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5965         mips64-dsp-linux.c.
5966
5967 2014-09-23  Yao Qi  <yao@codesourcery.com>
5968
5969         * linux-low.c (lp_status_maybe_breakpoint): New function.
5970         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5971         (count_events_callback): Likewise.
5972         (select_event_lwp_callback): Likewise.
5973         (cancel_breakpoints_callback): Likewise.
5974
5975 2014-09-19  Don Breazeal  <donb@codesourcery.com>
5976
5977         * linux-low.c (handle_extended_wait): Call
5978         linux_ptrace_get_extended_event.
5979         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5980         linux_is_extended_waitstatus.
5981
5982 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
5983
5984         * Makefile.in (CPPFLAGS): Define.
5985         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5986         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5987
5988 2014-09-16  Gary Benson  <gbenson@redhat.com>
5989
5990         * inferiors.h (current_inferior): Renamed as...
5991         (current_thread): New variable.  All uses updated.
5992         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5993         (maybe_move_out_of_jump_pad): Likewise.
5994         (cancel_breakpoint): Likewise.
5995         (linux_low_filter_event): Likewise.
5996         (wait_for_sigstop): Likewise.
5997         (linux_resume_one_lwp): Likewise.
5998         (need_step_over_p): Likewise.
5999         (start_step_over): Likewise.
6000         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6001         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6002         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6003         and save_inferior as saved_thread.
6004         * regcache.c (get_thread_regcache): Renamed saved_inferior as
6005         saved_thread.
6006         (regcache_invalidate_thread): Likewise.
6007         * remote-utils.c (prepare_resume_reply): Likewise.
6008         * thread-db.c (thread_db_get_tls_address): Likewise.
6009         (disable_thread_event_reporting): Likewise.
6010         (remove_thread_event_breakpoints): Likewise.
6011         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6012         as saved_thread.
6013         * target.h (set_desired_inferior): Renamed as...
6014         (set_desired_thread): New declaration.  All uses updated.
6015         * server.c (myresume): Updated comment to reference thread instead
6016         of inferior.
6017         (handle_serial_event): Likewise.
6018         (handle_target_event): Likewise.
6019
6020 2014-09-12  Tom Tromey  <tromey@redhat.com>
6021             Gary Benson  <gbenson@redhat.com>
6022
6023         * regcache.h: Include common-regcache.h.
6024         (regcache_read_pc): Don't declare.
6025         * regcache.c (get_thread_regcache_for_ptid): New function.
6026
6027 2014-09-11  Tom Tromey  <tromey@redhat.com>
6028             Gary Benson  <gbenson@redhat.com>
6029
6030         * symbol.c: New file.
6031         * Makefile.in (SFILES): Add symbol.c.
6032         (OBS): Add symbol.o.
6033
6034 2014-09-11  Gary Benson  <gbenson@redhat.com>
6035
6036         * target.c (target_stop_ptid, target_continue_ptid): New
6037         functions.
6038
6039 2014-09-11  Tom Tromey  <tromey@redhat.com>
6040             Gary Benson  <gbenson@redhat.com>
6041
6042         * target.h: Include target/target.h.
6043         * target.c (target_read_memory, target_read_uint32)
6044         (target_write_memory): New functions.
6045
6046 2014-09-11  Gary Benson  <gbenson@redhat.com>
6047
6048         * server.h (debug_hw_points): Don't declare.
6049         * server.c (debug_hw_points): Don't define.  Replace all uses
6050         with show_debug_regs.
6051         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
6052         all uses with show_debug_regs.
6053
6054 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
6055
6056         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6057         endianness into account.
6058         (ppc_supply_ptrace_register): Likewise.
6059
6060 2014-09-03  James Hogan  <james.hogan@imgtec.com>
6061
6062         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6063         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6064
6065 2014-09-03  Gary Benson  <gbenson@redhat.com>
6066
6067         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6068         ALL_DEBUG_ADDRESS_REGISTERS.
6069
6070 2014-09-02  Gary Benson  <gbenson@redhat.com>
6071
6072         * i386-low.h: Renamed as...
6073         * x86-low.h: New file.  All type, function and variable name
6074         prefixes changed from "i386_" to "x86_".  All references updated.
6075         * i386-low.c: Renamed as...
6076         * x86-low.c: New file.  All type, function and variable name
6077         prefixes changed from "i386_" to "x86_".  All references updated.
6078
6079 2014-09-02  Gary Benson  <gbenson@redhat.com>
6080
6081         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6082         (x86_linux_new_thread): Likewise.
6083
6084 2014-08-29  Gary Benson  <gbenson@redhat.com>
6085
6086         * server.h (setjmp.h): Do not include.
6087         (toplevel): Do not declare.
6088         (common-exceptions.h): Include.
6089         (cleanups.h): Likewise.
6090         * server.c (toplevel): Do not define.
6091         (exit_code): New static global.
6092         (detach_or_kill_for_exit_cleanup): New function.
6093         (main): New function.  Original main renamed to...
6094         (captured_main): New function.
6095         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6096
6097 2014-08-29  Gary Benson  <gbenson@redhat.com>
6098
6099         * Makefile.in (SFILES): Add common/common-exceptions.c.
6100         (OBS): Add common-exceptions.o.
6101         (common-exceptions.o): New rule.
6102         * utils.c (prepare_to_throw_exception): New function.
6103
6104 2014-08-29  Gary Benson  <gbenson@redhat.com>
6105
6106         * config.in: Regenerate.
6107         * configure: Likewise.
6108
6109 2014-08-29  Gary Benson  <gbenson@redhat.com>
6110
6111         * Makefile.in (SFILES): Add common/cleanups.c.
6112         (OBS): cleanups.o.
6113         (cleanups.o): New rule.
6114
6115 2014-08-29  Gary Benson  <gbenson@redhat.com>
6116
6117         * utils.c (internal_vwarning): New function.
6118
6119 2014-08-28  Gary Benson  <gbenson@redhat.com>
6120
6121         * utils.h (fatal): Remove declaration.
6122         * utils.c (fatal): Remove function.
6123
6124 2014-08-28  Gary Benson  <gbenson@redhat.com>
6125
6126         * tracepoint.c (gdb_agent_init): Replace fatal with
6127         perror_with_name.
6128         (initialize_tracepoint): Likewise.
6129
6130 2014-08-28  Gary Benson  <gbenson@redhat.com>
6131
6132         * remote-utils.c (remote_prepare): Replace fatal with error.
6133
6134 2014-08-28  Gary Benson  <gbenson@redhat.com>
6135
6136         * linux-low.c (linux_async): Replace fatal with warning.
6137         Tidy up and return.
6138         (linux_start_non_stop): Return -1 if linux_async failed.
6139
6140 2014-08-28  Gary Benson  <gbenson@redhat.com>
6141
6142         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6143         gdb_assert.
6144         (i386_dr_low_get_addr): Remove vague comment.
6145         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6146         gdb_assert.
6147
6148 2014-08-28  Gary Benson  <gbenson@redhat.com>
6149
6150         * inferiors.c (get_thread_process): Replace check with gdb_assert.
6151         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6152         internal_error.
6153         (linux_resume_one_lwp): Likewise.
6154         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6155         gdb_assert.
6156         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6157         with internal_error.
6158         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6159         (init_register_cache): Replace fatal with gdb_assert_not_reached.
6160         (find_register_by_name): Replace fatal with internal_error.
6161         (find_regno): Likewise.
6162         * tdesc.c (init_target_desc): Replace check with gdb_assert.
6163         * thread-db.c (thread_db_create_event): Likewise.
6164         (thread_db_load_search): Likewise.
6165         (try_thread_db_load_1): Likewise.
6166         * tracepoint.c (get_jump_space_head): Replace fatal with
6167         internal_error.
6168         (claim_trampoline_space): Likewise.
6169         (have_fast_tracepoint_trampoline_buffer): Likewise.
6170         (cmd_qtstart): Likewise.
6171         (stop_tracing): Likewise.
6172         (fast_tracepoint_collecting): Likewise.
6173         (target_malloc): Likewise.
6174         (download_tracepoint): Likewise.
6175         (download_trace_state_variables): Replace check with gdb_assert.
6176         (upload_fast_traceframes): Replace fatal with internal_error.
6177
6178 2014-08-19  Tom Tromey  <tromey@redhat.com>
6179             Gary Benson  <gbenson@redhat.com>
6180
6181         * Makefile.in (SFILES): Add common/common-debug.c.
6182         (OBS): Add common-debug.o.
6183         (common-debug.o): New rule.
6184         * debug.h (debug_printf): Don't declare.
6185         * debug.c (debug_printf): Renamed and rewritten as...
6186         (debug_vprintf): New function.
6187
6188 2014-08-19  Gary Benson  <gbenson@redhat.com>
6189
6190         * utils.h: Do not include print-utils.h.
6191
6192 2014-08-19  Tom Tromey  <tromey@redhat.com>
6193             Gary Benson  <gbenson@redhat.com>
6194
6195         * server.h: Add static assertion.
6196         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6197
6198 2014-08-19  Tom Tromey  <tromey@redhat.com>
6199             Gary Benson  <gbenson@redhat.com>
6200
6201         * Makefile.in (SFILES): Add common/errors.c.
6202         (OBS): Add errors.o.
6203         (IPA_OBS): Add errors-ipa.o.
6204         (errors.o): New rule.
6205         (errors-ipa.o): Likewise.
6206         * utils.h (perror_with_name, error, warning): Don't declare.
6207         * utils.c (warning): Renamed and rewritten as...
6208         (vwarning): New function.
6209         (error): Renamed and rewritten as...
6210         (verror): New function.
6211         (internal_error): Renamed and rewritten as...
6212         (internal_verror): New function.
6213
6214 2014-08-07  Gary Benson  <gbenson@redhat.com>
6215
6216         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6217         * configure: Regenerate.
6218         * config.in: Likewise.
6219         * server.h: Do not include errno.h.
6220         * event-loop.c: Likewise.
6221         * hostio-errno.c: Likewise.
6222         * linux-low.c: Likewise.
6223         * remote-utils.c: Likewise.
6224         * spu-low.c: Likewise.
6225         * utils.c: Likewise.
6226         * gdbreplay.c: Unconditionally include errno.h.
6227
6228 2014-08-07  Gary Benson  <gbenson@redhat.com>
6229
6230         * server.h: Do not include string.h.
6231         * event-loop.c: Likewise.
6232         * linux-low.c: Likewise.
6233         * regcache.c: Likewise.
6234         * remote-utils.c: Likewise.
6235         * spu-low.c: Likewise.
6236         * utils.c: Likewise.
6237
6238 2014-08-07  Gary Benson  <gbenson@redhat.com>
6239
6240         * server.h: Do not include gdb_assert.h.
6241
6242 2014-08-07  Gary Benson  <gbenson@redhat.com>
6243
6244         * server.h: Do not include common-utils.h.
6245
6246 2014-08-07  Gary Benson  <gbenson@redhat.com>
6247
6248         * server.h: Do not include ptid.h.
6249         * notif.h: Likewise.
6250
6251 2014-08-07  Gary Benson  <gbenson@redhat.com>
6252
6253         * server.h: Do not include gdb_locale.h.
6254
6255 2014-08-07  Gary Benson  <gbenson@redhat.com>
6256
6257         * server.h: Do not include gdb/signals.h.
6258         * win32-low.c: Likewise.
6259
6260 2014-08-07  Gary Benson  <gbenson@redhat.com>
6261
6262         * server.h: Do not include pathmax.h.
6263
6264 2014-08-07  Gary Benson  <gbenson@redhat.com>
6265
6266         * server.h: Do not include libiberty.h.
6267         * linux-bfin-low.c: Likewise.
6268
6269 2014-08-07  Gary Benson  <gbenson@redhat.com>
6270
6271         * server.h: Do not include ansidecl.h.
6272
6273 2014-08-07  Gary Benson  <gbenson@redhat.com>
6274
6275         * linux-x86-low.c: Do not include stddef.h.
6276         * lynx-ppc-low.c: Likewise.
6277         * tracepoint.c: Likewise.
6278
6279 2014-08-07  Gary Benson  <gbenson@redhat.com>
6280
6281         * server.h: Do not include stdarg.h.
6282         * nto-low.c: Likewise.
6283
6284 2014-08-07  Gary Benson  <gbenson@redhat.com>
6285
6286         * server.h: Do not include stdlib.h.
6287         * inferiors.c: Likewise.
6288         * linux-low.c: Likewise.
6289         * regcache.c: Likewise.
6290         * spu-low.c: Likewise.
6291         * tracepoint.c: Likewise.
6292         * utils.c: Likewise.
6293
6294 2014-08-07  Gary Benson  <gbenson@redhat.com>
6295
6296         * server.h: Do not include stdio.h.
6297         * linux-low.c: Likewise.
6298         * remote-utils.c: Likewise.
6299         * spu-low.c: Likewise.
6300         * utils.c: Likewise.
6301         * wincecompat.c: Likewise.
6302
6303 2014-08-06  Gary Benson  <gbenson@redhat.com>
6304
6305         * regcache.c (init_register_cache): Move conditionals inside if.
6306
6307 2014-08-06  Gary Benson  <gbenson@redhat.com>
6308
6309         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6310
6311 2014-07-31  Gary Benson  <gbenson@redhat.com>
6312
6313         * ax.h: Do not include server.h.
6314         * gdbthread.h: Likewise.
6315         * lynx-low.h: Likewise.
6316         * notif.h: Likewise.
6317
6318 2014-07-30  Gary Benson  <gbenson@redhat.com>
6319
6320         * server.h: Include common-defs.h.
6321         Do not include config.h or build-gnulib-gdbserver/config.h.
6322
6323 2014-07-30  Gary Benson  <gbenson@redhat.com>
6324
6325         * hostio-errno.c: Move server.h to top of includes list.
6326         * inferiors.c: Likewise.
6327         * linux-x86-low.c: Likewise.
6328         * notif.c: Include server.h.
6329
6330 2014-07-24  Tom Tromey  <tromey@redhat.com>
6331             Gary Benson  <gbenson@redhat.com>
6332
6333         * server.h (CORE_ADDR): Now unsigned.
6334
6335 2014-07-16  Pedro Alves  <palves@redhat.com>
6336
6337         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6338
6339 2014-07-15  Pedro Alves  <palves@redhat.com>
6340
6341         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6342         copy.
6343
6344 2014-07-11  Pedro Alves  <palves@redhat.com>
6345
6346         * linux-low.c (kill_wait_lwp): New function, based on
6347         kill_one_lwp_callback, but use my_waitpid directly.
6348         (kill_one_lwp_callback, linux_kill): Use it.
6349
6350 2014-06-23  Pedro Alves  <palves@redhat.com>
6351
6352         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6353         before setting DR0..DR3.
6354
6355 2014-06-20  Gary Benson  <gbenson@redhat.com>
6356
6357         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6358         * configure: Regenerated.
6359         * config.in: Likewise.
6360
6361 2014-06-20  Gary Benson  <gbenson@redhat.com>
6362
6363         * Makefile.in (SFILES): Update locations for files moved
6364         from common to nat.
6365         (object file files): Reordered.
6366
6367 2014-06-20  Gary Benson  <gbenson@redhat.com>
6368
6369         * i386-low.h (i386_dr_low_can_set_addr): Removed.
6370         (i386_dr_low_set_addr): Likewise.
6371         (i386_dr_low_get_addr): Likewise.
6372         (i386_dr_low_can_set_control): Likewise.
6373         (i386_dr_low_set_control): Likewise.
6374         (i386_dr_low_get_control): Likewise.
6375         (i386_dr_low_get_status): Likewise.
6376         (i386_get_debug_register_length): Likewise.
6377         * linux-x86-low.c (i386_dr_low_set_addr):
6378         Changed signature.  Made static.
6379         (i386_dr_low_get_addr): Likewise.
6380         (i386_dr_low_set_control): Likewise.
6381         (i386_dr_low_get_control): Likewise.
6382         (i386_dr_low_get_status): Likewise.
6383         (i386_dr_low): New global variable.
6384         * win32-i386-low.c (i386_dr_low_set_addr):
6385         Changed signature.  Made static.
6386         (i386_dr_low_get_addr): Likewise.
6387         (i386_dr_low_set_control): Likewise.
6388         (i386_dr_low_get_control): Likewise.
6389         (i386_dr_low_get_status): Likewise.
6390         (i386_dr_low): New global variable.
6391
6392 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6393
6394         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6395         * Makefile.in (AR, AR_FLAGS): Define.
6396         * configure: Regenerate.
6397
6398 2014-06-19  Gary Benson  <gbenson@redhat.com>
6399
6400         * Makefile.in (i386-dregs.o): New rule.
6401         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6402         * i386-low.c (target.h): Remove include.
6403         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6404         (DR_CONTROL_SHIFT): Likewise.
6405         (DR_CONTROL_SIZE): Likewise.
6406         (DR_RW_EXECUTE): Likewise.
6407         (DR_RW_WRITE): Likewise.
6408         (DR_RW_READ): Likewise.
6409         (DR_RW_IORW): Likewise.
6410         (DR_LEN_1): Likewise.
6411         (DR_LEN_2): Likewise.
6412         (DR_LEN_4): Likewise.
6413         (DR_LEN_8): Likewise.
6414         (DR_LOCAL_ENABLE_SHIFT): Likewise.
6415         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6416         (DR_ENABLE_SIZE): Likewise.
6417         (DR_LOCAL_SLOWDOWN): Likewise.
6418         (DR_GLOBAL_SLOWDOWN): Likewise.
6419         (DR_CONTROL_RESERVED): Likewise.
6420         (I386_DR_CONTROL_MASK): Likewise.
6421         (I386_DR_VACANT): Likewise.
6422         (I386_DR_LOCAL_ENABLE): Likewise.
6423         (I386_DR_GLOBAL_ENABLE): Likewise.
6424         (I386_DR_DISABLE): Likewise.
6425         (I386_DR_SET_RW_LEN): Likewise.
6426         (I386_DR_GET_RW_LEN): Likewise.
6427         (I386_DR_WATCH_HIT): Likewise.
6428         (i386_wp_op_t): Likewise.
6429         (i386_show_dr): Likewise.
6430         (i386_length_and_rw_bits): Likewise.
6431         (i386_insert_aligned_watchpoint): Likewise.
6432         (i386_remove_aligned_watchpoint): Likewise.
6433         (i386_handle_nonaligned_watchpoint): Likewise.
6434         i386_update_inferior_debug_regs(): Likewise.
6435         (i386_dr_insert_watchpoint): Likewise.
6436         (i386_dr_remove_watchpoint): Likewise.
6437         (i386_dr_region_ok_for_watchpoint): Likewise.
6438         (i386_dr_stopped_data_address): Likewise.
6439         (i386_dr_stopped_by_watchpoint): Likewise.
6440
6441 2014-06-19  Gary Benson  <gbenson@redhat.com>
6442
6443         * i386-low.c (i386_dr_show): Renamed to
6444         i386_show_dr and made static.  All uses updated.
6445         (i386_dr_length_and_rw_bits): Renamed to
6446         i386_length_and_rw_bits and made static.
6447         All uses updated.
6448         (i386_dr_insert_aligned_watchpoint): Renamed to
6449         i386_insert_aligned_watchpoint and made static.
6450         All uses updated.
6451         (i386_dr_remove_aligned_watchpoint): Renamed to
6452         i386_remove_aligned_watchpoint and made static.
6453         All uses updated.
6454         (i386_dr_update_inferior_debug_regs): Renamed to
6455         i386_update_inferior_debug_regs and made static.
6456         All uses updated.
6457
6458 2014-06-18  Gary Benson  <gbenson@redhat.com>
6459
6460         * i386-low.h (i386_dr_low_can_set_addr): New macro.
6461         (i386_dr_low_can_set_control): Likewise.
6462         (i386_get_debug_register_length): Likewise.
6463         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6464         (i386_dr_low_can_set_control): Likewise.
6465         (i386_get_debug_register_length): Likewise.
6466
6467 2014-06-17  Gary Benson  <gbenson@redhat.com>
6468
6469         * i386-low.h (i386-dregs.h): New include.
6470         (DR_FIRSTADDR): Now in i386-dregs.h.
6471         (DR_LASTADDR): Likewise.
6472         (DR_NADDR): Likewise.
6473         (DR_STATUS): Likewise.
6474         (DR_CONTROL): Likewise.
6475         (i386_debug_reg_state): Likewise.
6476         (i386_dr_insert_watchpoint): Likewise.
6477         (i386_dr_remove_watchpoint): Likewise.
6478         (i386_dr_region_ok_for_watchpoint): Likewise.
6479         (i386_dr_stopped_data_address): Likewise.
6480         (i386_dr_stopped_by_watchpoint): Likewise.
6481         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6482
6483 2014-06-18  Gary Benson  <gbenson@redhat.com>
6484
6485         * i386-low.h (i386_low_insert_watchpoint): Renamed to
6486         i386_dr_insert_watchpoint.
6487         (i386_low_remove_watchpoint): Renamed to
6488         i386_dr_remove_watchpoint.
6489         (i386_low_region_ok_for_watchpoint): Renamed to
6490         i386_dr_region_ok_for_watchpoint.
6491         (i386_low_stopped_data_address): Renamed to
6492         i386_dr_stopped_data_address.
6493         (i386_low_stopped_by_watchpoint): Renamed to
6494         i386_dr_stopped_by_watchpoint.
6495         * i386-low.c (i386_show_dr): Renamed to
6496         i386_dr_show and made nonstatic.  All uses updated.
6497         (i386_length_and_rw_bits): Renamed to
6498         i386_dr_length_and_rw_bits and made nonstatic.
6499         All uses updated.
6500         (i386_insert_aligned_watchpoint): Renamed to
6501         i386_dr_insert_aligned_watchpoint and made nonstatic.
6502         All uses updated.
6503         (i386_remove_aligned_watchpoint): Renamed to
6504         i386_dr_remove_aligned_watchpoint and made nonstatic.
6505         All uses updated.
6506         (i386_update_inferior_debug_regs): Renamed to
6507         i386_dr_update_inferior_debug_regs and made nonstatic.
6508         All uses updated.
6509         (i386_low_insert_watchpoint): Renamed to
6510         i386_dr_insert_watchpoint.  All uses updated.
6511         (i386_low_remove_watchpoint): Renamed to
6512         i386_dr_remove_watchpoint.  All uses updated.
6513         (i386_low_region_ok_for_watchpoint): Renamed to
6514         i386_dr_region_ok_for_watchpoint.  All uses updated.
6515         (i386_low_stopped_data_address): Renamed to
6516         i386_dr_stopped_data_address.  All uses updated.
6517         (i386_low_stopped_by_watchpoint): Renamed to
6518         i386_dr_stopped_by_watchpoint.  All uses updated.
6519
6520 2014-06-18  Gary Benson  <gbenson@redhat.com>
6521
6522         * i386-low.c (i386_dr_low_can_set_addr): New macro.
6523         (i386_dr_low_can_set_control): Likewise.
6524         (i386_insert_aligned_watchpoint): New check.
6525
6526 2014-06-18  Gary Benson  <gbenson@redhat.com>
6527
6528         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6529         Renamed to state.
6530
6531 2014-06-18  Gary Benson  <gbenson@redhat.com>
6532
6533         * i386-low.c (i386_length_and_rw_bits): Use internal_error
6534         instead of fatal and error.
6535         (i386_handle_nonaligned_watchpoint): Likewise.
6536
6537 2014-06-18  Gary Benson  <gbenson@redhat.com>
6538
6539         * i386-low.c (i386_get_debug_register_length): New macro.
6540         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
6541         (i386_show_dr): Use debug_printf instead of fprintf.  Use
6542         phex to format values.
6543
6544 2014-06-18  Gary Benson  <gbenson@redhat.com>
6545
6546         * i386-low.h: Comment changes.
6547         * i386-low.c: Likewise.
6548
6549 2014-06-18  Gary Benson  <gbenson@redhat.com>
6550
6551         * i386-low.c: Whitespace changes.
6552
6553 2014-06-12  Tom Tromey  <tromey@redhat.com>
6554
6555         * utils.c (freeargv): Remove.
6556
6557 2014-06-12  Tom Tromey  <tromey@redhat.com>
6558
6559         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6560         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6561         (parse_debug_format_options): Likewise.
6562         (gdbserver_usage): Likewise.
6563         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6564         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6565         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6566         against libiberty.
6567         ($(LIBGNU)): Depend on libiberty.
6568         (all-lib): Recurse into all subdirs.
6569         (install-only): Invoke "install" target in subdirs.
6570         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6571         targets.
6572         * configure: Rebuild.
6573         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
6574         for vasprintf, vsnprintf, or gettimeofday.
6575         * configure.srv: Don't add safe-ctype.o or lbasename.o to
6576         srv_tgtobj.
6577
6578 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
6579
6580         * development.sh: Delete.
6581         * Makefile.in (config.status): Adjust dependency on development.sh.
6582         * configure.ac: Adjust development.sh source call.
6583         * configure: Regenerate.
6584
6585 2014-06-02  Pedro Alves  <palves@redhat.com>
6586
6587         * ax.c (gdb_free_agent_expr): New function.
6588         * ax.h (gdb_free_agent_expr): New declaration.
6589         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6590         list.
6591         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6592         static.
6593         (clear_breakpoint_conditions_and_commands): New function.
6594         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6595         (clear_breakpoint_conditions_and_commands): New declaration.
6596
6597 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6598
6599         * linux-aarch64-low.c (asm/ptrace.h): Include.
6600
6601 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
6602
6603         Fix TLS access for -static -pthread.
6604         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6605         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6606         (thread_db_load_search, try_thread_db_load_1): Initialize it.
6607
6608 2014-05-20  Pedro Alves  <palves@redhat.com>
6609
6610         * linux-aarch64-low.c (aarch64_insert_point)
6611         (aarch64_remove_point): No longer check whether the type is
6612         supported here.  Adjust to new interface.
6613         (the_low_target): Install aarch64_supports_z_point_type as
6614         supports_z_point_type method.
6615         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6616         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6617         instead of a Z packet char.  Adjust.
6618         (arm_supports_z_point_type): New function.
6619         (arm_insert_point, arm_remove_point): Adjust to new interface.
6620         (the_low_target): Install arm_supports_z_point_type.
6621         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6622         (cris_insert_point, cris_remove_point): Adjust to new interface.
6623         Don't check whether the type is supported here.
6624         (the_low_target): Install cris_supports_z_point_type.
6625         * linux-low.c (linux_supports_z_point_type): New function.
6626         (linux_insert_point, linux_remove_point): Adjust to new interface.
6627         * linux-low.h (struct linux_target_ops) <insert_point,
6628         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
6629         raw_breakpoint pointer parameter.
6630         <supports_z_point_type>: New method.
6631         * linux-mips-low.c (mips_supports_z_point_type): New function.
6632         (mips_insert_point, mips_remove_point): Adjust to new interface.
6633         Use mips_supports_z_point_type.
6634         (the_low_target): Install mips_supports_z_point_type.
6635         * linux-ppc-low.c (the_low_target): Install NULL as
6636         supports_z_point_type method.
6637         * linux-s390-low.c (the_low_target): Install NULL as
6638         supports_z_point_type method.
6639         * linux-sparc-low.c (the_low_target): Install NULL as
6640         supports_z_point_type method.
6641         * linux-x86-low.c (x86_supports_z_point_type): New function.
6642         (x86_insert_point): Adjust to new insert_point interface.  Use
6643         insert_memory_breakpoint.  Adjust to new
6644         i386_low_insert_watchpoint interface.
6645         (x86_remove_point): Adjust to remove_point interface.  Use
6646         remove_memory_breakpoint.  Adjust to new
6647         i386_low_remove_watchpoint interface.
6648         (the_low_target): Install x86_supports_z_point_type.
6649         * lynx-low.c (lynx_target_ops): Install NULL as
6650         supports_z_point_type callback.
6651         * nto-low.c (nto_supports_z_point_type): New.
6652         (nto_insert_point, nto_remove_point): Adjust to new interface.
6653         (nto_target_ops): Install nto_supports_z_point_type.
6654         * mem-break.c: Adjust intro comment.
6655         (struct raw_breakpoint) <raw_type, size>: New fields.
6656         <inserted>: Update comment.
6657         <shlib_disabled>: Delete field.
6658         (enum bkpt_type) <gdb_breakpoint>: Delete value.
6659         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6660         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6661         (raw_bkpt_type_to_target_hw_bp_type): New function.
6662         (find_enabled_raw_code_breakpoint_at): New function.
6663         (find_raw_breakpoint_at): New type and size parameters.  Use them.
6664         (insert_memory_breakpoint): New function, based off
6665         set_raw_breakpoint_at.
6666         (remove_memory_breakpoint): New function.
6667         (set_raw_breakpoint_at): Reimplement.
6668         (set_breakpoint): New, based on set_breakpoint_at.
6669         (set_breakpoint_at): Reimplement.
6670         (delete_raw_breakpoint): Go through the_target->remove_point
6671         instead of assuming memory breakpoints.
6672         (find_gdb_breakpoint_at): Delete.
6673         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6674         (find_gdb_breakpoint): New function.
6675         (set_gdb_breakpoint_at): Delete.
6676         (z_type_supported): New function.
6677         (set_gdb_breakpoint_1): New function, loosely based off
6678         set_gdb_breakpoint_at.
6679         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6680         (delete_gdb_breakpoint_at): Delete.
6681         (delete_gdb_breakpoint_1): New function, loosely based off
6682         delete_gdb_breakpoint_at.
6683         (delete_gdb_breakpoint): New function.
6684         (clear_gdb_breakpoint_conditions): Rename to ...
6685         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
6686         breakpoint.
6687         (add_condition_to_breakpoint): Make static.
6688         (add_breakpoint_condition): Take a struct breakpoint pointer
6689         instead of an address.  Adjust.
6690         (gdb_condition_true_at_breakpoint): Rename to ...
6691         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6692         z_type parameter.
6693         (gdb_condition_true_at_breakpoint): Reimplement.
6694         (add_breakpoint_commands): Take a struct breakpoint pointer
6695         instead of an address.  Adjust.
6696         (gdb_no_commands_at_breakpoint): Rename to ...
6697         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
6698         parameter.  Return true if no breakpoint was found.  Change debug
6699         output.
6700         (gdb_no_commands_at_breakpoint): Reimplement.
6701         (run_breakpoint_commands): Rename to ...
6702         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
6703         and change return type to boolean.
6704         (run_breakpoint_commands): New function.
6705         (gdb_breakpoint_here): Also check for Z1 breakpoints.
6706         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6707         breakpoint.  Go through the_target->remove_point instead of
6708         assuming memory breakpoint.
6709         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6710         software and hardware breakpoints.
6711         (reinsert_raw_breakpoint): Go through the_target->insert_point
6712         instead of assuming memory breakpoint.
6713         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6714         software and hardware breakpoints.
6715         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6716         Check both software and hardware breakpoints.
6717         (validate_inserted_breakpoint): Assert the breakpoint is a
6718         software breakpoint.  Set the inserted flag to -1 instead of
6719         setting shlib_disabled.
6720         (delete_disabled_breakpoints): Adjust.
6721         (validate_breakpoints): Only validate software breakpoints.
6722         Adjust to inserted flag change.
6723         (check_mem_read, check_mem_write): Skip breakpoint types other
6724         than software breakpoints.  Adjust to inserted flag change.
6725         * mem-break.h (enum raw_bkpt_type): New enum.
6726         (raw_breakpoint, struct process_info): Forward declare.
6727         (Z_packet_to_target_hw_bp_type): Delete declaration.
6728         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6729         (set_gdb_breakpoint, delete_gdb_breakpoint)
6730         (clear_breakpoint_conditions): New declarations.
6731         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6732         (breakpoint_inserted_here): Update comment.
6733         (add_breakpoint_condition, add_breakpoint_commands): Replace
6734         address parameter with a breakpoint pointer parameter.
6735         (gdb_breakpoint_here): Update comment.
6736         (delete_gdb_breakpoint_at): Delete.
6737         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6738         * server.c (process_point_options): Take a struct breakpoint
6739         pointer instead of an address.  Adjust.
6740         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6741         delete_gdb_breakpoint.
6742         * spu-low.c (spu_target_ops): Install NULL as
6743         supports_z_point_type method.
6744         * target.h: Include mem-break.h.
6745         (struct target_ops) <prepare_to_access_memory>: Update comment.
6746         <supports_z_point_type>: New field.
6747         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6748         instead of a char.  Also take a raw breakpoint pointer.
6749         * win32-arm-low.c (the_low_target): Install NULL as
6750         supports_z_point_type.
6751         * win32-i386-low.c (i386_supports_z_point_type): New function.
6752         (i386_insert_point, i386_remove_point): Adjust to new interface.
6753         (the_low_target): Install i386_supports_z_point_type.
6754         * win32-low.c (win32_supports_z_point_type): New function.
6755         (win32_insert_point, win32_remove_point): Adjust to new interface.
6756         (win32_target_ops): Install win32_supports_z_point_type.
6757         * win32-low.h (struct win32_target_ops):
6758         <supports_z_point_type>: New method.
6759         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6760         instead of a char.  Also take a raw breakpoint pointer.
6761
6762 2014-05-20  Pedro Alves  <palves@redhat.com>
6763
6764         * mem-break.h: Include break-common.h.
6765         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6766         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6767         (Z_packet_to_target_hw_bp_type): New declaration.
6768         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6769         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6770         (Z_PACKET_ACCESS_WP): Delete macros.
6771         (Z_packet_to_hw_type): Delete function.
6772         * i386-low.h: Don't include break-common.h here.
6773         (Z_packet_to_hw_type): Delete declaration.
6774         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6775         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6776         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6777         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6778         * linux-aarch64-low.c: Don't include break-common.h here.
6779         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6780         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6781         (Z_packet_to_target_hw_bp_type): Delete function.
6782         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6783         function.
6784         (mips_insert_point, mips_remove_point): Use
6785         Z_packet_to_target_hw_bp_type.
6786
6787 2014-05-20  Pedro Alves  <palves@redhat.com>
6788
6789         * linux-aarch64-low.c: Include break-common.h.
6790         (enum target_point_type): Delete.
6791         (Z_packet_to_point_type): Rename to ...
6792         (Z_packet_to_target_hw_bp_type): ... this, and return a
6793         target_hw_bp_type instead.
6794         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6795         instead of an enum target_point_type.
6796         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
6797         breakpoint type.
6798         (aarch64_dr_state_insert_one_point)
6799         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6800         (aarch64_handle_aligned_watchpoint)
6801         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6802         Take an enum target_hw_bp_type instead of an enum
6803         target_point_type.
6804         (aarch64_supports_z_point_type): New function.
6805         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
6806         use Z_packet_to_target_hw_bp_type.
6807
6808 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
6809
6810         * configure.ac: Only use -Werror by default when DEVELOPMENT
6811         is true.
6812         * configure: Regenerate.
6813
6814 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
6815
6816         Fix gdbserver qGetTLSAddr for x86_64 -m32.
6817         * linux-x86-low.c (X86_64_USER_REGS): New.
6818         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6819
6820 2014-04-28  Yao Qi  <yao@codesourcery.com>
6821
6822         * Makefile.in (i386-avx512.c): Fix the typo of generated file
6823         name.
6824
6825 2014-04-25  Pedro Alves  <palves@redhat.com>
6826
6827         PR server/16255
6828         * linux-low.c (linux_attach_fail_reason_string): New function.
6829         (linux_attach_lwp): Delete.
6830         (linux_attach_lwp_1): Rename to ...
6831         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
6832         argument.  Remove "initial" parameter.  Return int instead of
6833         void.  Don't error or warn here.
6834         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
6835         failure to attach to the tgid.  Call warning when failing to
6836         attach to an lwp.
6837         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6838         argument.  Remove "initial" parameter.  Return int instead of
6839         void.  Don't error or warn here.
6840         (linux_attach_fail_reason_string): New declaration.
6841         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6842         interface change.  Use linux_attach_fail_reason_string.
6843
6844 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
6845             Walfred Tedeschi  <walfred.tedeschi@intel.com>
6846
6847         * Makefile.in: Added rules to handle new files
6848         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6849         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6850         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6851         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6852         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6853         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6854         x32-avx512-linux.o.
6855         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6856         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6857         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6858         i386/x32-avx512.xml.
6859         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6860         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6861         i386/x32-avx512-linux.xml.
6862         * i387-fp.c (num_avx512_k_registers): New constant for number
6863         of K registers.
6864         (num_avx512_zmmh_low_registers): New constant for number of
6865         lower ZMM registers (0-15).
6866         (num_avx512_zmmh_high_registers): New constant for number of
6867         higher ZMM registers (16-31).
6868         (num_avx512_ymmh_registers): New contant for number of higher
6869         YMM registers (ymm16-31 added by avx521 on x86_64).
6870         (num_avx512_xmm_registers): New constant for number of higher
6871         XMM registers (xmm16-31 added by AVX512 on x86_64).
6872         (struct i387_xsave): Add space for AVX512 registers.
6873         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6874         Add code to handle AVX512 registers.
6875         (i387_xsave_to_cache): Add code to handle AVX512 registers.
6876         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6877         prototypei from generated file.
6878         (tdesc_amd64_avx512_linux): Likewise.
6879         (init_registers_x32_avx512_linux): Likewise.
6880         (tdesc_x32_avx512_linux): Likewise.
6881         (init_registers_i386_avx512_linux): Likewise.
6882         (tdesc_i386_avx512_linux): Likewise.
6883         (x86_64_regmap): Add AVX512 registers.
6884         (x86_linux_read_description): Add code to handle AVX512 XSTATE
6885         mask.
6886         (initialize_low_arch): Add code to initialize AVX512 registers.
6887
6888 2014-04-23  Pedro Alves  <palves@redhat.com>
6889
6890         * mem-break.c (find_gdb_breakpoint_at): Make static.
6891         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6892
6893 2014-04-23  Pedro Alves  <palves@redhat.com>
6894
6895         * i386-low.c: Don't include break-common.h here.
6896         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6897         prototype to take target_hw_bp_type as argument instead of a Z
6898         packet char.
6899         * i386-low.h: Include break-common.h here.
6900         (Z_packet_to_hw_type): Declare.
6901         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6902         prototypes.
6903         * linux-x86-low.c (x86_insert_point): Convert the packet number to
6904         a target_hw_bp_type before calling i386_low_insert_watchpoint.
6905         (x86_remove_point): Convert the packet number to a
6906         target_hw_bp_type before calling i386_low_remove_watchpoint.
6907         * win32-i386-low.c (i386_insert_point): Convert the packet number
6908         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6909         (i386_remove_point): Convert the packet number to a
6910         target_hw_bp_type before calling i386_low_remove_watchpoint.
6911
6912 2014-04-23  Pedro Alves  <palves@redhat.com>
6913
6914         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6915
6916 2014-04-10  Pedro Alves  <palves@redhat.com>
6917
6918         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6919         Check if the condition or command is NULL before checking if the
6920         breakpoint is known.  On success, return true.
6921         * mem-break.h (add_breakpoint_condition): Document return.
6922         (add_breakpoint_commands): Add describing comment.
6923         * server.c (skip_to_semicolon): New function.
6924         (process_point_options): Use it.
6925
6926 2014-04-09  Pedro Alves  <palves@redhat.com>
6927
6928         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6929         to lwpid_of.
6930
6931 2014-02-27  Pedro Alves  <palves@redhat.com>
6932
6933         PR 12702
6934         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6935         macros.
6936         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6937         output.
6938         (last_thread_of_process_p): Take a PID argument instead of a
6939         thread pointer.
6940         (linux_wait_for_lwp): Delete.
6941         (num_lwps, check_zombie_leaders, not_stopped_callback): New
6942         functions.
6943         (linux_low_filter_event): New function, party factored out from
6944         linux_wait_for_event.
6945         (linux_wait_for_event): Rename to ...
6946         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
6947         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
6948         sigsuspend.  Check for zombie leaders.
6949         (linux_wait_for_event): Reimplement as wrapper around
6950         linux_wait_for_event_filtered.
6951         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
6952         a normal or signal exit is seen, it's the whole process exiting.
6953         (wait_for_sigstop): No longer a for_each_inferior callback.
6954         Rewrite on top of linux_wait_for_event_filtered.
6955         (stop_all_lwps): Call wait_for_sigstop directly.
6956         * server.c (resume, handle_target_event): Handle
6957         TARGET_WAITKIND_NO_RESUMED.
6958
6959 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
6960
6961         * win32-low.c (psapi_get_dll_name,
6962         * win32_CreateToolhelp32Snapshot): Delete.
6963         (win32_CreateToolhelp32Snapshot, win32_Module32First)
6964         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6965         Delete.
6966         (handle_load_dll): Add function description.
6967         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6968
6969 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
6970
6971         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6972         Add comment.
6973         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6974         base address when calling win32_add_one_solib.
6975         (handle_load_dll): Delete local variable load_addr.
6976         Remove 0x1000 offset applied to DLL base address when calling
6977         win32_add_one_solib.
6978         (handle_unload_dll): Add comment.
6979
6980 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
6981
6982         * win32-low.c (win32_add_all_dlls): Renames
6983         win32_ensure_ntdll_loaded.  Rewrite function documentation.
6984         Adjust implementation to always load all DLLs.
6985         Add 0x1000 offset to DLL base address when calling
6986         win32_add_one_solib.
6987         (child_initialization_done): New static global.
6988         (do_initial_child_stuff): Set child_initialization_done to
6989         zero during child initialization, and 1 after.  Replace call
6990         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6991         Add comment.
6992         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6993         (handle_unload_dll): Add function documentation.
6994         (get_child_debug_event): Ignore load and unload DLL events
6995         during child initialization.
6996
6997 2014-02-20  Doug Evans  <dje@google.com>
6998
6999         Remove global all_lwps.
7000         * inferiors.h (ptid_of): Move here from linux-low.h.
7001         (pid_of, lwpid_of): Ditto.
7002         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7003         parameter is a struct thread_info * now.
7004         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7005         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
7006         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7007         directly.
7008         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7009         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7010         * linux-arm-low.c (update_registers_callback): Update, "entry"
7011         parameter is a struct thread_info * now.
7012         Fetch lwpid from current_inferior directly.
7013         (arm_insert_point): Pass &all_threads to find_inferior instead of
7014         &all_lwps.
7015         (arm_remove_point): Ditto.
7016         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7017         (arm_prepare_to_resume): Fetch pid from thread.
7018         (arm_read_description): Fetch lwpid from current_inferior directly.
7019         * linux-low.c (all_lwps): Delete.
7020         (delete_lwp): Delete call to remove_inferior.
7021         (handle_extended_wait): Fetch lwpid from thread.
7022         (add_lwp): Don't set lwp->entry.id.  Remove call to
7023         add_inferior_to_list.
7024         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7025         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7026         (kill_one_lwp_callback): Ditto.
7027         (linux_kill): Don't dereference NULL pointer.
7028         Fetch ptid,lwpid from thread.
7029         (get_detach_signal): Fetch ptid from thread.
7030         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7031         Simplify call to regcache_invalidate_thread.
7032         (delete_lwp_callback): Update, "entry" parameter is a
7033         struct thread_info * now.  Fetch pid from thread.
7034         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7035         (status_pending_p_callback): Update, "entry" parameter is a
7036         struct thread_info * now.  Fetch ptid from thread.
7037         (find_lwp_pid): Update, "entry" parameter is a
7038         struct thread_info * now.
7039         (linux_wait_for_lwp): Fetch pid from thread.
7040         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7041         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7042         (enqueue_one_deferred_signal): Fetch lwpid from thread.
7043         (dequeue_one_deferred_signal): Ditto.
7044         (cancel_breakpoint): Fetch ptid from current_inferior.
7045         (linux_wait_for_event): Pass &all_threads to find_inferior,
7046         not &all_lwps.  Fetch ptid, lwpid from thread.
7047         (count_events_callback): Update, "entry" parameter is a
7048         struct thread_info * now.
7049         (select_singlestep_lwp_callback): Ditto.
7050         (select_event_lwp_callback): Ditto.
7051         (cancel_breakpoints_callback): Ditto.
7052         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7053         not &all_lwps.
7054         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
7055         (unsuspend_one_lwp): Update, "entry" parameter is a
7056         struct thread_info * now.
7057         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7058         not &all_lwps.
7059         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
7060         Fetch lwpid from thread, not lwp.
7061         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7062         Pass &all_threads to find_inferior, not &all_lwps.
7063         (send_sigstop): Fetch lwpid from thread, not lwp.
7064         (send_sigstop_callback): Update, "entry" parameter is a
7065         struct thread_info * now.
7066         (suspend_and_send_sigstop_callback): Ditto.
7067         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
7068         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7069         struct thread_info * now.
7070         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
7071         from thread, lwp.
7072         (lwp_running): Update, "entry" parameter is a
7073         struct thread_info * now.
7074         (stop_all_lwps): Fetch ptid from thread.
7075         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7076         (linux_resume_one_lwp): Fetch lwpid from thread.
7077         (linux_set_resume_request): Update, "entry" parameter is a
7078         struct thread_info * now.  Fetch pid, lwpid from thread.
7079         (resume_status_pending_p): Update, "entry" parameter is a
7080         struct thread_info * now.
7081         (need_step_over_p): Ditto.  Fetch lwpid from thread.
7082         (start_step_over): Fetch lwpid from thread.
7083         (linux_resume_one_thread): Update, "entry" parameter is a
7084         struct thread_info * now.  Fetch lwpid from thread.
7085         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7086         (proceed_one_lwp): Update, "entry" parameter is a
7087         struct thread_info * now.  Fetch lwpid from thread.
7088         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7089         struct thread_info * now.
7090         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7091         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
7092         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7093         directly.
7094         (regsets_store_inferior_registers): Ditto.
7095         (fetch_register, store_register): Ditto.
7096         (linux_read_memory, linux_write_memory): Ditto.
7097         (linux_request_interrupt): Ditto.
7098         (linux_read_auxv): Ditto.
7099         (linux_xfer_siginfo): Ditto.
7100         (linux_qxfer_spu): Ditto.
7101         (linux_qxfer_libraries_svr4): Ditto.
7102         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7103         moved to inferiors.h.
7104         (get_lwp): Delete.
7105         (get_thread_lwp): Update.
7106         (struct lwp_info): Delete member "entry".  Simplify comment for
7107         member "thread".
7108         (all_lwps): Delete.
7109         * linux-mips-low.c (mips_read_description): Fetch lwpid from
7110         current_inferior directly.
7111         (update_watch_registers_callback): Update, "entry" parameter is a
7112         struct thread_info * now.  Fetch pid from thread.
7113         (mips_linux_prepare_to_resume): Fetch ptid from thread.
7114         (mips_insert_point): Fetch lwpid from current_inferior.
7115         Pass &all_threads to find_inferior, not &all_lwps.
7116         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7117         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7118         directly.
7119         (mips_stopped_data_address): Ditto.
7120         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7121         directly.
7122         * linux-tile-low.c (tile_arch_setup): Ditto.
7123         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7124         (update_debug_registers_callback): Update, "entry" parameter is a
7125         struct thread_info * now.  Fetch pid from thread.
7126         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7127         Pass &all_threads to find_inferior, not &all_lwps.
7128         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7129         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7130         Pass &all_threads to find_inferior, not &all_lwps.
7131         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7132         (i386_dr_low_get_status): Ditto.
7133         (x86_linux_prepare_to_resume): Fetch ptid from thread.
7134         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7135         (x86_linux_read_description): Ditto.
7136         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7137
7138 2014-02-20  Doug Evans  <dje@google.com>
7139
7140         * inferiors.c (get_first_inferior): Fix buglet.
7141
7142 2014-02-19  Doug Evans  <dje@google.com>
7143
7144         * gdbthread.h (add_thread): Change result type to struct thread_info *.
7145         * inferiors.c (add_thread): Change result type to struct thread_info *.
7146         All callers updated.
7147         (add_lwp): Call add_thread here instead of in callers.
7148         All callers updated.
7149         * linux-low.h (get_lwp_thread): Rewrite.
7150         (struct lwp_info): New member "thread".
7151
7152 2014-02-19  Doug Evans  <dje@google.com>
7153
7154         * linux-low.c (add_lwp): Change result to struct lwp_info *.
7155         All callers updated.
7156
7157 2014-02-19  Doug Evans  <dje@google.com>
7158
7159         * inferiors.c (add_thread): Fix whitespace.
7160
7161 2014-02-19  Doug Evans  <dje@google.com>
7162
7163         * dll.c (clear_dlls): Replace accessing list implemention details
7164         with API function.
7165         * gdbthread.h (get_first_thread): Declare.
7166         * inferiors.c (for_each_inferior_with_data): New function.
7167         (get_first_thread): New function.
7168         (find_thread_ptid): Simplify.
7169         (get_first_inferior): New function.
7170         (clear_list): Delete.
7171         (one_inferior_p): New function.
7172         (clear_inferior_list): New function.
7173         (clear_inferiors): Update.
7174         * inferiors.h (for_each_inferior_with_data): Declare.
7175         (clear_inferior_list): Declare.
7176         (one_inferior_p): Declare.
7177         (get_first_inferior): Declare.
7178         * linux-low.c (linux_wait_for_event): Replace accessing list
7179         implemention details with API function.
7180         * server.c (target_running): Ditto.
7181         (accumulate_file_name_length): New function.
7182         (emit_dll_description): New function.
7183         (handle_qxfer_libraries): Replace accessing list implemention
7184         details with API function.
7185         (handle_qxfer_threads_worker): New function.
7186         (handle_qxfer_threads_proper): Replace accessing list implemention
7187         details with API function.
7188         (handle_query): Ditto.
7189         (visit_actioned_threads_callback_ftype): New typedef.
7190         (visit_actioned_threads_data): New struct.
7191         (visit_actioned_threads): Rewrite to be find_inferior callback.
7192         (resume): Call find_inferior.
7193         (handle_status): Replace accessing list implemention
7194         details with API function.
7195         (process_serial_event): Replace accessing list implemention details
7196         with API function.
7197         * target.c (set_desired_inferior): Replace accessing list implemention
7198         details with API function.
7199         * tracepoint.c (same_process_p): New function.
7200         (gdb_agent_about_to_close): Replace accessing list implemention
7201         details with API function.
7202         * win32-low.c (child_delete_thread): Replace accessing list
7203         implemention details with API function.
7204         (match_dll_by_basename): New function.
7205         (dll_is_loaded_by_basename): New function.
7206         (win32_ensure_ntdll_loaded): Replace accessing list implemention
7207         details call to dll_is_loaded_by_basename.
7208
7209 2014-02-19  Doug Evans  <dje@google.com>
7210
7211         * dll.h (struct dll_info): Add comment.
7212         * gdbthread.h (struct thread_info): Add comment.
7213         (current_ptid): Simplify.
7214         * inferiors.c (add_process): Update.
7215         (remove_process): Update.
7216         * inferiors.h (struct process_info): Rename member "head" to "entry".
7217         * linux-low.c (delete_lwp): Update.
7218         (add_lwp): Update.
7219         (last_thread_of_process_p): Update.
7220         (kill_one_lwp_callback, linux_kill): Update.
7221         (status_pending_p_callback): Update.
7222         (wait_for_sigstop): Update.  Simplify read of ptid.
7223         (start_step_over): Update.
7224         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7225         (get_lwp_thread): Update.
7226         (struct lwp_info): Rename member "head" to "entry".
7227         * regcache.h (inferior_list_entry): Delete.
7228         * server.c (kill_inferior_callback): Update.
7229         (detach_or_kill_inferior_callback): Update.
7230         (print_started_pid): Update.
7231         (print_attached_pid): Update.
7232         (process_serial_event): Simplify read of ptid.
7233         * thread-db.c (thread_db_create_event): Update.
7234         (thread_db_get_tls_address): Update.
7235         * win32-low.c (current_inferior_ptid): Simplify.
7236
7237 2014-02-19  Tom Tromey  <tromey@redhat.com>
7238
7239         * target.h (struct target_ops) <supports_btrace>: Add target_ops
7240         argument.
7241         (target_supports_btrace): Update.
7242
7243 2014-02-14  Yao Qi  <yao@codesourcery.com>
7244
7245         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7246         (rsp-low-ipa.o): New target.
7247
7248 2014-02-12  Tom Tromey  <tromey@redhat.com>
7249
7250         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7251         convert_ascii_to_int.
7252         * regcache.c (registers_to_string): Likewise.
7253         * remote-utils.c (decode_M_packet): Likewise.
7254         * server.c (process_serial_event): Likewise.
7255
7256 2014-02-12  Tom Tromey  <tromey@redhat.com>
7257
7258         * server.c (handle_query, handle_v_run): Use hex2bin, not
7259         unhexify.
7260         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7261
7262 2014-02-12  Tom Tromey  <tromey@redhat.com>
7263
7264         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7265         convert_int_to_ascii.
7266         * regcache.c (registers_to_string, collect_register_as_string):
7267         Likewise.
7268         * remote-utils.c (look_up_one_symbol, relocate_instruction):
7269         Likewise.
7270         * server.c (process_serial_event): Likewise.
7271         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7272         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7273
7274 2014-02-12  Tom Tromey  <tromey@redhat.com>
7275
7276         * remote-utils.c (look_up_one_symbol, monitor_output): Use
7277         bin2hex, not hexify.
7278         * tracepoint.c (cmd_qtstatus): Likewise.
7279
7280 2014-02-12  Tom Tromey  <tromey@redhat.com>
7281
7282         * remote-utils.c (monitor_output): Pass explicit length to
7283         hexify.
7284
7285 2014-02-12  Tom Tromey  <tromey@redhat.com>
7286
7287         * tracepoint.c: Include rsp-low.h.
7288         * server.c: Include rsp-low.h.
7289         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7290         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7291         declare.
7292         * remote-utils.c: Include rsp-low.h.
7293         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7294         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7295         (convert_int_to_ascii, convert_ascii_to_int): Move to
7296         common/rsp-low.c.
7297         * regcache.c: Include rsp-low.h.
7298         * ax.c: Include rsp-low.h.
7299         * Makefile.in (SFILES): Add common/rsp-low.c.
7300         (OBS): Add rsp-low.o.
7301         (rsp-low.o): New target.
7302
7303 2014-02-12  Tom Tromey  <tromey@redhat.com>
7304
7305         * utils.h (pulongest, plongest, phex_nz): Don't declare.
7306         Include print-utils.h.
7307         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7308         (plongest, thirty_two, phex_nz): Remove.
7309         * Makefile.in (SFILES): Add common/print-utils.c.
7310         (OBS): Add print-utils.o.
7311         (print-utils-ipa.o): New target.
7312         (print-utils.o): New target.
7313         (IPA_OBJS): Add print-utils-ipa.o.
7314
7315 2014-02-06  Tom Tromey  <tromey@redhat.com>
7316
7317         * Makefile.in (SFILES): Fix indentation.
7318
7319 2014-02-05  Doug Evans  <dje@google.com>
7320
7321         * linux-low.c (linux_wait_for_event): Improve comment.
7322         (linux_wait_1): Keep current_inferior in sync with event_child.
7323
7324 2014-01-22  Doug Evans  <dje@google.com>
7325
7326         * gdbthread.h (gdb_id_to_thread): Delete, unused.
7327
7328 2014-01-22  Doug Evans  <dje@google.com>
7329
7330         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7331         * configure: Regenerate.
7332         * config.in: Regenerate.
7333         * Makefile.in (SFILES): Add debug.c.
7334         (OBS): Add debug.o.
7335         * debug.c: New file.
7336         * debug.h: New file.
7337         * linux-aarch64-low.c (*): Update all debugging printfs to use
7338         debug_printf instead of fprintf.
7339         * linux-arm-low.c (*): Ditto.
7340         * linux-cris-low.c (*): Ditto.
7341         * linux-crisv32-low.c (*): Ditto.
7342         * linux-m32r-low.c (*): Ditto.
7343         * linux-sparc-low.c (*): Ditto.
7344         * linux-x86.c (*): Ditto.
7345         * linux-low.c (*): Ditto.
7346         (linux_wait_1): Add calls to debug_enter, debug_exit.
7347         (linux_wait): Remove redundant debugging printf.
7348         (stop_all_lwps): Add calls to debug_enter, debug_exit.
7349         (linux_resume, unstop_all_lwps): Ditto.
7350         * mem-break.c (*): Update all debugging printfs to use
7351         debug_printf instead of fprintf.
7352         * remote-utils.c (*): Ditto.
7353         * thread-db.c (*): Ditto.
7354         * server.c #include <ctype.h>, "gdb_vecs.h".
7355         (debug_threads): Moved to debug.c.
7356         (*): Update all debugging printfs to use debug_printf instead of
7357         fprintf.
7358         (start_inferior): Replace call to fflush with call to debug_flush.
7359         (monitor_show_help): Mention set debug-format.
7360         (parse_debug_format_options): New function.
7361         (handle_monitor_command): Handle "monitor set debug-format".
7362         (gdbserver_usage): Mention --debug-format.
7363         (main): Parse --debug-format.
7364         * server.h (debug_threads): Declaration moved to debug.h.
7365         #include "debug.h".
7366         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7367         trace_debug_1 that uses debug_printf.
7368         (tracepoint_look_up_symbols): Update all debugging printfs to use
7369         debug_printf instead of fprintf.
7370
7371 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
7372
7373         * linux-xtensa-low.c: Include asm/ptrace.h instead of
7374         sys/ptrace.h.
7375
7376 2014-01-17  Pedro Alves  <palves@redhat.com>
7377
7378         PR build/16445
7379         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7380         defined after including gdb_proc_service.h.
7381
7382 2014-01-16  Doug Evans  <dje@google.com>
7383
7384         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7385         (match_dll): Use it.
7386
7387 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
7388
7389         * target.h (target_ops) <read_btrace>: Change parameters and
7390         return type to allow error reporting.
7391         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
7392         trace reading errors on.
7393         * linux-low.c (linux_low_read_btrace): Pass trace reading
7394         errors on.
7395         (linux_low_disable_btrace): New.
7396
7397 2014-01-15  Doug Evans  <dje@google.com>
7398
7399         * inferiors.c (thread_id_to_gdb_id): Delete.
7400         * inferiors.h (thread_id_to_gdb_id): Delete.
7401
7402 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
7403
7404         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7405         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
7406         versions.
7407
7408 2014-01-08  Pedro Alves  <palves@redhat.com>
7409
7410         * server.c (handle_status): Don't discard previous queued stop
7411         replies or thread's pending status here.
7412         (main) <disconnection>: Do it here instead.
7413
7414 2014-01-08  Pedro Alves  <palves@redhat.com>
7415
7416         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7417         * server.c (visit_actioned_threads, handle_pending_status): New
7418         function.
7419         (handle_v_cont): Factor out parts to ...
7420         (resume): ... this new function.  If in all-stop, and a thread
7421         being resumed has a pending status, report it without actually
7422         resuming.
7423         (myresume): Adjust to use the new 'resume' function.
7424         (clear_pending_status_callback, set_pending_status_callback)
7425         (find_status_pending_thread_callback): New functions.
7426         (handle_status): Handle the case of multiple threads having
7427         interesting statuses to report.  Report threads' real last signal
7428         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
7429         with an interesting thread to report the status for, instead of
7430         always reporting the status of the first thread.
7431
7432 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
7433
7434         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7435         * gdbreplay.c (gdbreplay_version): Likewise.
7436
7437 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
7438
7439         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7440         iov.iov_len with the real length in use.
7441
7442 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
7443
7444         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7445         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7446         for all targets that use win32-low.c.
7447         * win32-low.c (win32_ensure_ntdll_loaded): New function.
7448         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7449
7450 2013-12-13  Pedro Alves  <palves@redhat.com>
7451
7452         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7453         if equal to TARGET_WAITKIND_LOADED.
7454         * win32-low.c (cached_status): New static global.
7455         (win32_wait): Add declaration.
7456         (do_initial_child_stuff): Flush all initial pending debug events
7457         up to the initial breakpoint.
7458         (win32_wait): If CACHED_STATUS was set, return that instead
7459         of doing a real wait.  Remove the code resuming the execution
7460         of the inferior after receiving a TARGET_WAITKIND_LOADED event
7461         during the initial phase.  Also remove the code changing
7462         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7463         TARGET_WAITKIND_STOPPED.
7464
7465 2013-12-11  Yao Qi  <yao@codesourcery.com>
7466
7467         * notif.c (handle_notif_ack): Return 0 if no notification
7468         matches.
7469
7470 2013-11-20  Doug Evans  <dje@google.com>
7471
7472         * linux-low.c (linux_set_resume_request): Fix comment.
7473
7474 2013-11-20  Doug Evans  <dje@google.com>
7475
7476         * linux-low.c (resume_status_pending_p): Tweak comment.
7477
7478 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7479
7480         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7481         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7482         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7483         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7484         (srv_amd64_regobj): Add amd64-mpx.o.
7485         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7486         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7487         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7488         * i387-fp.c (num_pl_bnd_register) Added constant.
7489         (num_pl_bnd_cfg_registers) Added constant.
7490         (struct i387_xsave) Added reserved area and MPX fields.
7491         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7492         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7493         function.
7494         (tdesc_i386_mpx_linux): Add MPX amd64 target.
7495         (init_registers_amd64_mpx_linux): Declare new function.
7496         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7497         (x86_64_regmap): Add MPX registers.
7498         (x86_linux_read_description): Add MPX case.
7499         (initialize_low_arch): Initialize MPX targets.
7500
7501 2013-11-18  Tom Tromey  <tromey@redhat.com>
7502
7503         * configure: Rebuild.
7504         * configure.ac: Don't check for stdlib.h.
7505         * gdbreplay.c: Unconditionally include stdlib.h.
7506
7507 2013-11-18  Tom Tromey  <tromey@redhat.com>
7508
7509         * config.in: Rebuild.
7510         * configure: Rebuild.
7511         * configure.ac: Don't use AC_HEADER_DIRENT.
7512
7513 2013-11-18  Tom Tromey  <tromey@redhat.com>
7514
7515         * server.h: Don't check HAVE_STRING_H.
7516         * gdbreplay.c: Don't check HAVE_STRING_H.
7517         * configure: Rebuild.
7518
7519 2013-11-18  Tom Tromey  <tromey@redhat.com>
7520
7521         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7522         LIBGNU.
7523
7524 2013-11-08  Tom Tromey  <tromey@redhat.com>
7525
7526         * configure, config.in: Rebuild.
7527         * configure.ac: Remove unused configury.
7528
7529 2013-11-08  Tom Tromey  <tromey@redhat.com>
7530
7531         * acinclude.m4: Include common.m4, codeset.m4.
7532         * configure, config.in: Rebuild.
7533         * configure.ac: Use GDB_AC_COMMON.
7534
7535 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7536
7537         * linux-s390-low.c (HWCAP_S390_TE): New define.
7538         (s390_arch_setup): Consider the TE field in the HWCAP for
7539         determining 'have_regset_tdb'.
7540
7541 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
7542
7543         PR gdb/16014
7544         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7545         call to sizeof.
7546
7547 2013-10-02  Pedro Alves  <palves@redhat.com>
7548
7549         * server.c (process_serial_event): Don't output "GDBserver
7550         exiting" if GDB is connected through stdio.
7551         * target.c (mywait): Likewise, be silent if GDB is connected
7552         through stdio.
7553
7554 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
7555
7556         * lynx-low.c (lynx_add_threads_after_attach): New function.
7557         (lynx_attach): Remove call to add_thread.  Add call to
7558         lynx_add_threads_after_attach instead.
7559
7560 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
7561
7562         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7563         * config.in, configure: Regenerated.
7564
7565 2013-09-18  Yao Qi  <yao@codesourcery.com>
7566
7567         PR server/15959
7568         * server.c (start_inferior): Clear 'resume_info'.
7569
7570 2013-09-16  Jiong Wang  <jiwang@tilera.com>
7571
7572         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7573         for each register.
7574
7575 2013-09-16  Jiong Wang  <jiwang@tilera.com>
7576
7577         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7578         linux-tile-low.o to srv_tgtobj.
7579
7580 2013-09-16  Will Newton  <will.newton@linaro.org>
7581
7582         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7583         out regs.
7584
7585 2013-09-06  Pedro Alves  <palves@redhat.com>
7586
7587         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7588         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7589         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7590         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7591         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7592         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7593
7594 2013-09-06  Pedro Alves  <palves@redhat.com>
7595
7596         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7597         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7598
7599 2013-09-06  Pedro Alves  <palves@redhat.com>
7600
7601         * linux-amd64-ipa.c: Include tracepoint.h.
7602         * linux-i386-ipa.c: Include tracepoint.h.
7603
7604 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
7605
7606         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7607         (ps_get_thread_area): New function.
7608
7609 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
7610
7611         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7612         (initialize_low_arch): Call init_registers_crisv32 rather than
7613         init_register_crisv32.
7614
7615 2013-09-05  Pedro Alves  <palves@redhat.com>
7616
7617         * server.h (handle_vFile, hostio_last_error_from_errno): Move
7618         to ...
7619         * hostio.h: ... this new file.
7620         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7621         win32-low.c: Include hostio.h.
7622
7623 2013-09-05  Pedro Alves  <palves@redhat.com>
7624
7625         * server.h (gdb_client_data, handler_func, callback_handler_func)
7626         (delete_file_handler, add_file_handler, append_callback_event)
7627         (delete_callback_event, start_event_loop, initialize_event_loop):
7628         Move to event-loop.h and include it.
7629         * event-loop.h: New file.
7630
7631 2013-09-05  Pedro Alves  <palves@redhat.com>
7632
7633         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7634         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7635         (loaded_dll, unloaded_dll): Move to ...
7636         * dll.h: ... this new file.
7637         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7638
7639 2013-09-05  Pedro Alves  <palves@redhat.com>
7640
7641         * server.h (current_process, get_thread_process, all_processes)
7642         (add_inferior_to_list, for_each_inferior, current_inferior)
7643         (remove_inferior, add_process, remove_process, find_process_pid)
7644         (have_started_inferiors_p, have_attached_inferiors_p)
7645         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7646         (clear_inferiors, find_inferior, find_inferior_id)
7647         (inferior_target_data, set_inferior_target_data)
7648         (inferior_regcache_data, set_inferior_regcache_data): Move to
7649         inferiors.h, and include it.
7650         * inferiors.h: New file.
7651
7652 2013-09-05  Pedro Alves  <palves@redhat.com>
7653
7654         * server.h (struct emit_ops, current_insn_ptr, emit_error):
7655         Move ...
7656         * ax.h: ... here.
7657
7658 2013-09-05  Pedro Alves  <palves@redhat.com>
7659
7660         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7661         tracepoint.h.
7662         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7663         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7664         (handle_tracepoint_general_set, handle_tracepoint_query)
7665         (tracepoint_finished_step, tracepoint_was_hit)
7666         (release_while_stepping_state_list, current_traceframe)
7667         (in_readonly_region, traceframe_read_mem)
7668         (fetch_traceframe_registers, traceframe_read_sdata)
7669         (traceframe_read_info, struct fast_tpoint_collect_status)
7670         (fast_tracepoint_collecting, force_unlock_trace_buffer)
7671         (handle_tracepoit_bkpts, initialize_low_tracepoint)
7672         (supply_fast_tracepoint_registers)
7673         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7674         (ipa_tdesc, claim_trampoline_space)
7675         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7676         (agent_mem_read, agent_get_trace_state_variable_value)
7677         (agent_set_trace_state_variable_value, agent_tsv_read)
7678         (agent_mem_read_string, get_raw_reg_func_addr)
7679         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7680         * tracepoint.h: ... this new file.
7681
7682 2013-09-05  Pedro Alves  <palves@redhat.com>
7683
7684         * server.h (perror_with_name, error, fatal, warning, paddress)
7685         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7686         include it.
7687         * utils.h: New file.
7688
7689 2013-09-05  Pedro Alves  <palves@redhat.com>
7690
7691         * server.h (remote_debug, noack_mode, transport_is_reliable)
7692         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7693         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7694         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7695         (write_enn, initialize_async_io, enable_async_io)
7696         (disable_async_io, check_remote_input_interrupt_request)
7697         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7698         (dead_thread_notify, prepare_resume_reply)
7699         (decode_address_to_semicolon, decode_address, decode_m_packet)
7700         (decode_M_packet, decode_X_packet, decode_xfer_write)
7701         (decode_search_memory_packet, unhexify, hexify)
7702         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7703         (look_up_one_symbol, relocate_instruction)
7704         (monitor_output): Move to remote-utils.h, and include it.
7705         * remote-utils.h: New file.
7706
7707 2013-09-05  Pedro Alves  <palves@redhat.com>
7708
7709         * server.h (_): Delete.
7710
7711 2013-09-02  Pedro Alves  <palves@redhat.com>
7712
7713         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7714         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7715         allocated.
7716         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7717
7718 2013-09-02  Pierre Muller  <muller@sourceware.org>
7719
7720         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7721         or WriteProcessMemory complete successfully and handle
7722         ERROR_PARTIAL_COPY error.
7723
7724 2013-09-02  Pedro Alves  <palves@redhat.com>
7725
7726         * server.c (gdb_read_memory): Return -1 on traceframe memory read
7727         error instead of EIO.
7728
7729 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7730
7731         PR server/15604
7732         * linux-low.c: Include filestuff.h.
7733         (linux_create_inferior) <pid == 0>: Call close_most_fds.
7734         * lynx-low.c: Include filestuff.h.
7735         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7736         * server.c: Include filestuff.h.
7737         (main): Call notice_open_fds.
7738         * spu-low.c: Include filestuff.h.
7739         (spu_create_inferior) <pid == 0>: Call close_most_fds.
7740
7741 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
7742
7743         * Makefile.in: Explain why ../target and ../nat are not
7744         listed as include file search paths.
7745         (linux-waitpid.o): New object file rule.
7746         * configure.srv (srv_native_linux_obj): New variable.
7747         Replace all occurrences of linux native object files with
7748         $srv_native_linux_obj.
7749         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7750         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7751         (linux_enable_event_reporting): Remove declaration.
7752         (my_waitpid): Moved to common/linux-waitpid.c.
7753         (linux_wait_for_event): Pass ptid when calling
7754         linux_enable_event_reporting.
7755         (linux_supports_tracefork_flag): Remove.
7756         (linux_enable_event_reporting): Likewise.
7757         (linux_tracefork_grandchild): Remove.
7758         (STACK_SIZE): Moved to common/linux-ptrace.c.
7759         (linux_tracefork_child): Remove.
7760         (linux_test_for_tracefork): Remove.
7761         (linux_look_up_symbols): Call linux_supports_traceclone.
7762         (initialize_low): Remove call to linux_test_for_tracefork.
7763         * linux-low.h (PTRACE_TYPE_ARG3): Move to
7764         common/linux-ptrace.h.
7765         (PTRACE_TYPE_ARG4): Likewise.
7766         Include linux-ptrace.h.
7767
7768 2013-08-21  Pedro Alves  <palves@redhat.com>
7769
7770         * config.in: Renegerate.
7771
7772 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
7773
7774         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7775         (SFILES): Remove $(srcdir)/common/target-common.c and
7776         add $(srcdir)/target/waitstatus.c.
7777         (OBS): Remove target-common.o and add waitstatus.o.
7778         (server_h): Remove $(srcdir)/../common/target-common.h and
7779         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7780         and $(srcdir)/../target/waitstatus.h.
7781         (target-common.o): Remove.
7782         (waitstatus.o): New target object file.
7783         * target.h: Do not include target-common.h and
7784         include target/resume.h, target/wait.h and
7785         target/waitstatus.h.
7786
7787 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
7788
7789         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7790         to PTRACE_TYPE_ARG3.
7791         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7792         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7793         PTRACE_TYPE_ARG4.
7794         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7795         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7796
7797 2013-07-27  Jie Zhang  <jie@codesourcery.com>
7798             Daniel Jacobowitz  <dan@codesourcery.com>
7799             Yao Qi  <yao@codesourcery.com>
7800
7801         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7802         (mips-linux-watch.o): New rule.
7803         (mips_linux_watch_h): New variable.
7804         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7805         srv_tgtobj.
7806         * linux-mips-low.c: Include mips-linux-watch.h.
7807         (struct arch_process_info, struct arch_lwp_info): New.
7808         (update_watch_registers_callback): New function.
7809         (mips_linux_new_process, mips_linux_new_thread) New functions.
7810         (mips_linux_prepare_to_resume, mips_insert_point): New
7811         functions.
7812         (mips_remove_point, mips_stopped_by_watchpoint): New
7813         functions.
7814         (rsp_bp_type_to_target_hw_bp_type): New function.
7815         (mips_stopped_data_address): New function.
7816         (the_low_target): Add watchpoint support functions.
7817
7818 2013-07-27  Yao Qi  <yao@codesourcery.com>
7819
7820         * i386-low.c: Include break-common.h.
7821         (enum target_hw_bp_type): Remove.
7822
7823 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
7824
7825         * Makefile.in (SFILES): /common/target-common.c.
7826         (OBS): Add target-common.o.
7827         (server_h): Add $(srcdir)/../common/target-common.h.
7828         (target-common.o): New target.
7829         * server.c (queue_stop_reply_callback): Free
7830         status string after use.
7831         * target.c (target_waitstatus_to_string): Remove.
7832         * target.h: Include target-common.h.
7833         (resume_kind): Likewise.
7834         (target_waitkind): Likewise.
7835         (target_waitstatus): Likewise.
7836         (TARGET_WNOHANG): Likewise.
7837
7838 2013-07-04  Yao Qi  <yao@codesourcery.com>
7839
7840         * Makefile.in (host_alias): Use @host_noncanonical@.
7841         (target_alias): Use @target_noncanonical@.
7842         * configure.ac: Use ACX_NONCANONICAL_TARGET and
7843         ACX_NONCANONICAL_HOST.
7844         * configure: Regenerated.
7845
7846         Revert:
7847         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
7848
7849         * configure.ac (version_host, version_target): Set and AC_SUBST them.
7850         * configure: Rebuild.
7851         * Makefile.in (version_host, version_target): Get from configure.
7852         (version.c): Use $(version_host) and $(version_target).
7853
7854 2013-07-03  Pedro Alves  <palves@redhat.com>
7855
7856         * Makefile.in (config.status): Depend on development.sh.
7857         * acinclude.m4: Include libmcheck.m4.
7858         * configure: Regenerate.
7859
7860 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
7861
7862         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7863         attribute inside the parentheses.
7864         (winapi_DebugSetProcessKillOnExit): Ditto.
7865         (winapi_DebugBreakProcess): Ditto.
7866         (winapi_GenerateConsoleCtrlEvent): Ditto.
7867
7868 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
7869
7870         * notif.h (notif_event): Add a dummy member to avoid compiler
7871         errors.
7872
7873 2013-07-01  Pedro Alves  <palves@redhat.com>
7874
7875         * hostio.c (HOSTIO_PATH_MAX): Define.
7876         (require_filename, handle_open, handle_unlink, handle_readlink):
7877         Use it.
7878
7879 2013-07-01  Pedro Alves  <palves@redhat.com>
7880
7881         * server.h: Include "pathmax.h".
7882         * linux-low.c: Don't include sys/param.h.
7883         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7884         MAXPATHLEN.
7885         * win32-low.c: Don't include sys/param.h.
7886         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7887
7888 2013-07-01  Pedro Alves  <palves@redhat.com>
7889
7890         * event-loop.c: Don't check HAVE_UNISTD_H before including
7891         <unistd.h>.
7892         * gdbreplay.c: Likewise.
7893         * remote-utils.c: Likewise.
7894         * server.c: Likewise.
7895         * configure.ac: Don't check for unistd.h.
7896         * configure: Regenerate.
7897
7898 2013-06-28  Tom Tromey  <tromey@redhat.com>
7899
7900         * Makefile.in (version.c): Use version.in, not
7901         common/version.in.
7902
7903 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
7904
7905         * configure.ac (version_host, version_target): Set and AC_SUBST them.
7906         * configure: Rebuild.
7907         * Makefile.in (version_host, version_target): Get from configure.
7908         (version.c): Use $(version_host) and $(version_target).
7909
7910 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
7911
7912         Fix trace-status to output user name without trailing colon.
7913         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7914
7915 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
7916
7917         Fix trace-status to output proper start-time and stop-time.
7918         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7919         output start time and stop time in hex as gdb expects.
7920
7921 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
7922
7923         * tracepoint.c (build_traceframe_info_xml): Output trace state
7924         variables present in the trace buffer.
7925
7926 2013-06-24  Tom Tromey  <tromey@redhat.com>
7927
7928         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7929         create-version.sh.
7930         (version.o): Remove.
7931         * gdbreplay.c: Include version.h.
7932         (version, host_name): Don't declare.
7933         * server.h: Include version.h.
7934         (version, host_name): Don't declare.
7935
7936 2013-06-12  Pedro Alves  <palves@redhat.com>
7937
7938         * linux-x86-low.c (linux_is_elf64): Delete global.
7939         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7940         with local linux_pid_exe_is_elf_64_file use.
7941
7942 2013-06-11  Pedro Alves  <palves@redhat.com>
7943
7944         * linux-low.c (regset_disabled, disable_regset): New functions.
7945         (regsets_fetch_inferior_registers)
7946         (regsets_store_inferior_registers): Use them.
7947         (initialize_regsets_info); Don't allocate the disabled_regsets
7948         array here.
7949         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7950         comment.
7951
7952 2013-06-11  Pedro Alves  <palves@redhat.com>
7953
7954         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7955         xmalloc.
7956
7957 2013-06-11  Pedro Alves  <palves@redhat.com>
7958
7959         * linux-x86-low.c (initialize_low_arch): Call
7960         init_registers_x32_avx_linux.
7961
7962 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
7963
7964         Fix compatibility with Android Bionic.
7965         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7966         it is not empty.
7967
7968 2013-06-07  Pedro Alves  <palves@redhat.com>
7969
7970         PR server/14823
7971         * Makefile.in (OBS): Add tdesc.o.
7972         (IPA_OBJS): Add tdesc-ipa.o.
7973         (tdesc-ipa.o): New rule.
7974         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7975         interface.
7976         * linux-low.c (new_inferior): Delete.
7977         (disabled_regsets, num_regsets): Delete.
7978         (linux_add_process): Adjust to set the new per-process
7979         new_inferior flag.
7980         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7981         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
7982         was a stop.  When calling arch_setup, switch the current inferior
7983         to the thread that got an event.
7984         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7985         (regsets_fetch_inferior_registers)
7986         (regsets_store_inferior_registers): New regsets_info parameter.
7987         Adjust to use it.
7988         (linux_register_in_regsets): New regs_info parameter.  Adjust to
7989         use it.
7990         (register_addr, fetch_register, store_register): New usrregs_info
7991         parameter.  Adjust to use it.
7992         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7993         parameter regs_info.  Adjust to use it.
7994         (linux_fetch_registers): Get the current inferior's regs_info, and
7995         adjust to use it.
7996         (linux_store_registers): Ditto.
7997         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7998         (initialize_low): Don't initialize the target_regsets here.  Call
7999         initialize_low_arch.
8000         * linux-low.h (target_regsets): Delete declaration.
8001         (struct regsets_info): New.
8002         (struct usrregs_info): New.
8003         (struct regs_info): New.
8004         (struct process_info_private) <new_inferior>: New field.
8005         (struct linux_target_ops): Delete the num_regs, regmap, and
8006         regset_bitmap fields.  New field regs_info.
8007         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8008         * i387-fp.c (num_xmm_registers): Delete.
8009         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8010         calls to new interface.
8011         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8012         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8013         Infer the number of xmm registers from the regcache's target
8014         description.
8015         * i387-fp.h (num_xmm_registers): Delete.
8016         * inferiors.c (add_thread): Don't install the thread's regcache
8017         here.
8018         * proc-service.c (gregset_info): Fetch the current inferior's
8019         regs_info.  Adjust to use it.
8020         * regcache.c: Include tdesc.h.
8021         (register_bytes, reg_defs, num_registers)
8022         (gdbserver_expedite_regs): Delete.
8023         (get_thread_regcache): If the thread doesn't have a regcache yet,
8024         create one, instead of aborting gdbserver.
8025         (regcache_invalidate_one): Rename to ...
8026         (regcache_invalidate_thread): ... this.
8027         (regcache_invalidate_one): New.
8028         (regcache_invalidate): Only invalidate registers of the current
8029         process.
8030         (init_register_cache): Add target_desc parameter, and use it.
8031         (new_register_cache): Ditto.  Assert the target description has a
8032         non zero registers_size.
8033         (regcache_cpy): Add assertions.  Adjust.
8034         (realloc_register_cache, set_register_cache): Delete.
8035         (registers_to_string, registers_from_string): Adjust.
8036         (find_register_by_name, find_regno, find_register_by_number)
8037         (register_cache_size): Add target_desc parameter, and use it.
8038         (free_register_cache_thread, free_register_cache_thread_one)
8039         (regcache_release, register_cache_size): New.
8040         (register_size): Add target_desc parameter, and use it.
8041         (register_data, supply_register, supply_register_zeroed)
8042         (supply_regblock, supply_register_by_name, collect_register)
8043         (collect_register_as_string, collect_register_by_name): Adjust.
8044         * regcache.h (struct target_desc): Forward declare.
8045         (struct regcache) <tdesc>: New field.
8046         (init_register_cache, new_register_cache): Add target_desc
8047         parameter.
8048         (regcache_invalidate_thread): Declare.
8049         (regcache_invalidate_one): Delete declaration.
8050         (regcache_release): Declare.
8051         (find_register_by_number, register_cache_size, register_size)
8052         (find_regno): Add target_desc parameter.
8053         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8054         declarations.
8055         * remote-utils.c: Include tdesc.h.
8056         (outreg, prepare_resume_reply): Adjust.
8057         * server.c: Include tdesc.h.
8058         (gdbserver_xmltarget): Delete declaration.
8059         (get_features_xml, process_serial_event): Adjust.
8060         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8061         declare.
8062         (struct process_info) <tdesc>: New field.
8063         (ipa_tdesc): Declare.
8064         * tdesc.c: New file.
8065         * tdesc.h: New file.
8066         * tracepoint.c: Include tdesc.h.
8067         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8068         (get_context_regcache): Adjust to pass ipa_tdesc down.
8069         (do_action_at_tracepoint): Adjust to get the register cache size
8070         from the context regcache's description.
8071         (traceframe_walk_blocks): Adjust to get the register cache size
8072         from the current trace frame's description.
8073         (traceframe_get_pc): Adjust to get current trace frame's
8074         description and pass it down.
8075         (gdb_collect): Adjust to get the register cache size from the
8076         IPA's description.
8077         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8078         (gdbserver_xmltarget): Delete.
8079         (initialize_low_tracepoint): Set the ipa's target description.
8080         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8081         (initialize_low_tracepoint): Set the ipa's target description.
8082         * linux-x86-low.c: Include tdesc.h.
8083         [__x86_64__] (is_64bit_tdesc): New.
8084         (ps_get_thread_area, x86_get_thread_area): Use it.
8085         (i386_cannot_store_register): Rename to ...
8086         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
8087         (i386_cannot_fetch_register): Rename to ...
8088         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
8089         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8090         to new interface.
8091         (target_regsets): Rename to ...
8092         (x86_regsets): ... this.
8093         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8094         interface.
8095         (x86_siginfo_fixup): Use is_64bit_tdesc.
8096         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8097         (tdesc_x32_avx_linux, tdesc_x32_linux)
8098         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8099         Declare.
8100         (x86_linux_update_xmltarget): Delete.
8101         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8102         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8103         (AMD64_LINUX_USER64_CS): New.
8104         (x86_linux_read_description): New, based on
8105         x86_linux_update_xmltarget.
8106         (same_process_callback): New.
8107         (x86_arch_setup_process_callback): New.
8108         (x86_linux_update_xmltarget): New.
8109         (x86_regsets_info): New.
8110         (amd64_linux_regs_info): New.
8111         (i386_linux_usrregs_info): New.
8112         (i386_linux_regs_info): New.
8113         (x86_linux_regs_info): New.
8114         (x86_arch_setup): Reimplement.
8115         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8116         (x86_emit_ops): Ditto.
8117         (the_low_target): Adjust.  Install x86_linux_regs_info,
8118         x86_cannot_fetch_register, and x86_cannot_store_register.
8119         (initialize_low_arch): New.
8120         * linux-ia64-low.c (tdesc_ia64): Declare.
8121         (ia64_fetch_register): Adjust.
8122         (ia64_usrregs_info, regs_info): New globals.
8123         (ia64_regs_info): New function.
8124         (the_low_target): Adjust.
8125         (initialize_low_arch): New function.
8126         * linux-sparc-low.c (tdesc_sparc64): Declare.
8127         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8128         Adjust.
8129         (sparc_arch_setup): New function.
8130         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8131         (the_low_target): Adjust.
8132         (initialize_low_arch): New function.
8133         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8134         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8135         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8136         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8137         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8138         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8139         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8140         (tdesc_powerpc_isa205_vsx64l): Declare.
8141         (ppc_cannot_store_register, ppc_collect_ptrace_register)
8142         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8143         (ppc_set_pc, ppc_get_hwcap): Adjust.
8144         (ppc_usrregs_info): Forward declare.
8145         (!__powerpc64__) ppc_regmap_adjusted: New global.
8146         (ppc_arch_setup): Adjust to the current process'es target
8147         description.
8148         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8149         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8150         (ppc_store_evrregset): Adjust.
8151         (target_regsets): Rename to ...
8152         (ppc_regsets): ... this, and make static.
8153         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8154         (ppc_regs_info): New function.
8155         (the_low_target): Adjust.
8156         (initialize_low_arch): New function.
8157         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8158         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8159         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8160         (tdesc_s390x_linux64v2): Declare.
8161         (s390_collect_ptrace_register, s390_supply_ptrace_register)
8162         (s390_fill_gregset, s390_store_last_break): Adjust.
8163         (target_regsets): Rename to ...
8164         (s390_regsets): ... this, and make static.
8165         (s390_get_pc, s390_set_pc): Adjust.
8166         (s390_get_hwcap): New target_desc parameter, and use it.
8167         [__s390x__] (have_hwcap_s390_high_gprs): New global.
8168         (s390_arch_setup): Adjust to set the current process'es target
8169         description.  Don't adjust the regmap.
8170         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8171         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8172         (regs_info_3264): New globals.
8173         (s390_regs_info): New function.
8174         (the_low_target): Adjust.
8175         (initialize_low_arch): New function.
8176         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8177         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8178         [__mips64] (init_registers_mips_linux)
8179         (init_registers_mips_dsp_linux): Delete defines.
8180         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8181         (have_dsp): New global.
8182         (mips_read_description): New, based on mips_arch_setup.
8183         (mips_arch_setup): Reimplement.
8184         (get_usrregs_info): New function.
8185         (mips_cannot_fetch_register, mips_cannot_store_register)
8186         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8187         (mips_fill_fpregset, mips_store_fpregset): Adjust.
8188         (target_regsets): Rename to ...
8189         (mips_regsets): ... this, and make static.
8190         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8191         (dsp_regs_info, regs_info): New globals.
8192         (mips_regs_info): New function.
8193         (the_low_target): Adjust.
8194         (initialize_low_arch): New function.
8195         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8196         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8197         Declare.
8198         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8199         (arm_read_description): New, with bits factored from
8200         arm_arch_setup.
8201         (arm_arch_setup): Reimplement.
8202         (target_regsets): Rename to ...
8203         (arm_regsets): ... this, and make static.
8204         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8205         (arm_regs_info): New function.
8206         (the_low_target): Adjust.
8207         (initialize_low_arch): New function.
8208         * linux-m68k-low.c (tdesc_m68k): Declare.
8209         (target_regsets): Rename to ...
8210         (m68k_regsets): ... this, and make static.
8211         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8212         (m68k_regs_info): New function.
8213         (m68k_arch_setup): New function.
8214         (the_low_target): Adjust.
8215         (initialize_low_arch): New function.
8216         * linux-sh-low.c (tdesc_sharch): Declare.
8217         (target_regsets): Rename to ...
8218         (sh_regsets): ... this, and make static.
8219         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8220         (sh_regs_info, sh_arch_setup): New functions.
8221         (the_low_target): Adjust.
8222         (initialize_low_arch): New function.
8223         * linux-bfin-low.c (tdesc_bfin): Declare.
8224         (bfin_arch_setup): New function.
8225         (bfin_usrregs_info, regs_info): New globals.
8226         (bfin_regs_info): New function.
8227         (the_low_target): Adjust.
8228         (initialize_low_arch): New function.
8229         * linux-cris-low.c (tdesc_cris): Declare.
8230         (cris_arch_setup): New function.
8231         (cris_usrregs_info, regs_info): New globals.
8232         (cris_regs_info): New function.
8233         (the_low_target): Adjust.
8234         (initialize_low_arch): New function.
8235         * linux-cris-low.c (tdesc_crisv32): Declare.
8236         (cris_arch_setup): New function.
8237         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8238         (cris_regs_info): New function.
8239         (the_low_target): Adjust.
8240         (initialize_low_arch): New function.
8241         * linux-m32r-low.c (tdesc_m32r): Declare.
8242         (m32r_arch_setup): New function.
8243         (m32r_usrregs_info, regs_info): New globals.
8244         (m32r_regs_info): Adjust.
8245         (initialize_low_arch): New function.
8246         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8247         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8248         (tic6x_usrregs_info): Forward declare.
8249         (tic6x_read_description): New function, based on ...
8250         (tic6x_arch_setup): ... this.  Reimplement.
8251         (target_regsets): Rename to ...
8252         (tic6x_regsets): ... this, and make static.
8253         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8254         (tic6x_regs_info): New function.
8255         (the_low_target): Adjust.
8256         (initialize_low_arch): New function.
8257         * linux-xtensa-low.c (tdesc_xtensa): Declare.
8258         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8259         (target_regsets): Rename to ...
8260         (xtensa_regsets): ... this, and make static.
8261         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8262         globals.
8263         (xtensa_arch_setup, xtensa_regs_info): New functions.
8264         (the_low_target): Adjust.
8265         (initialize_low_arch): New function.
8266         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8267         (nios2_arch_setup): Set the current process'es tdesc.
8268         (target_regsets): Rename to ...
8269         (nios2_regsets): ... this.
8270         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8271         (nios2_regs_info): New function.
8272         (the_low_target): Adjust.
8273         (initialize_low_arch): New function.
8274         * linux-aarch64-low.c (tdesc_aarch64): Declare.
8275         (aarch64_arch_setup): Set the current process'es tdesc.
8276         (target_regsets): Rename to ...
8277         (aarch64_regsets): ... this.
8278         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8279         (aarch64_regs_info): New function.
8280         (the_low_target): Adjust.
8281         (initialize_low_arch): New function.
8282         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8283         globals.
8284         (target_regsets): Rename to ...
8285         (tile_regsets): ... this.
8286         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8287         (tile_regs_info): New function.
8288         (tile_arch_setup): Set the current process'es tdesc.
8289         (the_low_target): Adjust.
8290         (initialize_low_arch): New function.
8291         * spu-low.c (tdesc_spu): Declare.
8292         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8293         * win32-arm-low.c (tdesc_arm): Declare.
8294         (arm_arch_setup): New function.
8295         (the_low_target): Install arm_arch_setup instead of
8296         init_registers_arm.
8297         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8298         (init_windows_x86): Rename to ...
8299         (i386_arch_setup): ... this.  Set `win32_tdesc'.
8300         (the_low_target): Adjust.
8301         * win32-low.c (win32_tdesc): New global.
8302         (child_add_thread): Don't create the thread cache here.
8303         (do_initial_child_stuff): Set the new process'es tdesc.
8304         * win32-low.h (struct target_desc): Forward declare.
8305         (win32_tdesc): Declare.
8306         * lynx-i386-low.c (tdesc_i386): Declare global.
8307         (lynx_i386_arch_setup): Set `lynx_tdesc'.
8308         * lynx-low.c (lynx_tdesc): New global.
8309         (lynx_add_process): Set the new process'es tdesc.
8310         * lynx-low.h (struct target_desc): Forward declare.
8311         (lynx_tdesc): Declare global.
8312         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8313         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8314         * nto-low.c (nto_tdesc): New global.
8315         (do_attach): Set the new process'es tdesc.
8316         * nto-low.h (struct target_desc): Forward declare.
8317         (nto_tdesc): Declare.
8318         * nto-x86-low.c (tdesc_i386): Declare.
8319         (nto_x86_arch_setup): Set `nto_tdesc'.
8320
8321 2013-06-04  Gary Benson  <gbenson@redhat.com>
8322
8323         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8324         to qSupported response when appropriate.
8325         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8326         with nonzero-length annex.
8327         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8328         arguments supplied in annex.
8329
8330 2013-05-31  Doug Evans  <dje@google.com>
8331
8332         PR server/15594
8333         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8334         64 bits in 64-cross-32 environment.
8335
8336 2013-05-28  Pedro Alves  <palves@redhat.com>
8337
8338         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8339         (aarch64-without-fpu.c): Delete rule.
8340         * configure.srv (aarch64*-*-linux*): Remove references to
8341         aarch64-without-fpu.o and aarch64-without-fpu.xml.
8342         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8343         declaration.
8344
8345 2013-05-24  Pedro Alves  <palves@redhat.com>
8346
8347         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8348         instead of strchr/decode_address.  Error if the range isn't split
8349         with a ','.  Don't assume there's be a ':' in the action.
8350
8351 2013-05-23  Yao Qi  <yao@codesourcery.com>
8352             Pedro Alves  <palves@redhat.com>
8353
8354         * linux-low.c (lwp_in_step_range): New function.
8355         (linux_wait_1): If the thread was range stepping and stopped
8356         outside the stepping range, report the stop to GDB.  Otherwise,
8357         continue stepping.  Add range stepping debug output.
8358         (linux_set_resume_request): Copy the step range from the resume
8359         request to the lwp.
8360         (linux_supports_range_stepping): New.
8361         (linux_target_ops) <supports_range_stepping>: Set to
8362         linux_supports_range_stepping.
8363         * linux-low.h (struct linux_target_ops)
8364         <supports_range_stepping>: New field.
8365         (struct lwp_info) <step_range_start, step_range_end>: New fields.
8366         * linux-x86-low.c (x86_supports_range_stepping): New.
8367         (the_low_target) <supports_range_stepping>: Set to
8368         x86_supports_range_stepping.
8369         * server.c (handle_v_cont): Handle 'r' action.
8370         (handle_v_requests): Append ";r" if the target supports range
8371         stepping.
8372         * target.h (struct thread_resume) <step_range_start,
8373         step_range_end>: New fields.
8374         (struct target_ops) <supports_range_stepping>:
8375         New field.
8376         (target_supports_range_stepping): New macro.
8377
8378 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
8379
8380         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8381         confusion in comment.
8382
8383 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
8384
8385         * lynx-low.c (struct process_info_private): New type.
8386         (lynx_add_process): New function.
8387         (lynx_create_inferior, lynx_attach): Replace calls to
8388         add_process by calls to lynx_add_process.
8389         (lynx_resume): If PTID is null, then try using
8390         current_process()->private->last_wait_event_ptid.
8391         Add comments.
8392         (lynx_clear_inferiors): Delete.  The contents of that function
8393         has been inlined in lynx_mourn;
8394         (lynx_wait_1): Save the ptid in the process's private data.
8395         (lynx_mourn): Free the process' private data.  Replace call
8396         to lynx_clear_inferiors by call to clear_inferiors.
8397
8398 2013-05-17  Yao Qi  <yao@codesourcery.com>
8399
8400         * i386-low.c (i386_length_and_rw_bits): Move the comment to
8401         the right place.
8402
8403 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
8404
8405         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8406         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
8407         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8408         PT_TEXT_END_ADDR guards.  Update comments.
8409         (linux_target_op) <read_offsets>: Conditionally define to
8410         linux_read_offsets if the target is UCLIBC and if it defines
8411         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8412
8413 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
8414             Andrew Jenner  <andrew@codesourcery.com>
8415
8416         * Makefile.in (SFILES): Add linux-nios2-low.c.
8417         (clean): Add action to delete nios2-linux.c.
8418         (nios2-linux.c): New rule.
8419         * configure.srv: Add nios2*-*-linux*.
8420         * linux-nios2-low.c: New.
8421
8422 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
8423
8424         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8425
8426 2013-04-25  Hui Zhu  <hui@codesourcery.com>
8427
8428         PR gdb/15186
8429         * ax.c (ax_printf): Add fflush.
8430
8431 2013-04-22  Tom Tromey  <tromey@redhat.com>
8432
8433         * Makefile.in (SFILES): Add filestuff.c.
8434         (OBS): Add filestuff.o.
8435         (filestuff.o): New target.
8436         * config.in, configure: Rebuild.
8437         * configure.ac: Check for fdwalk, pipe2.
8438
8439 2013-04-17  Pedro Alves  <palves@redhat.com>
8440
8441         * configure.ac (USE_THREAD_DB): Delete variable.
8442         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8443         Don't AC_SUBST USE_THREAD_DB.
8444         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8445         * config.in, configure: Regenerate.
8446
8447 2013-04-16  Pedro Alves  <palves@redhat.com>
8448
8449         * linux-low.h (struct lwp_info) <thread_known>: Move under
8450         the USE_THREAD_DB #ifdef.
8451
8452 2013-04-16  Pedro Alves  <palves@redhat.com>
8453
8454         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8455         (linux-low.o): Delete rule.
8456         * linux-low.h: Always include "gdb_thread_db.h" instead of
8457         conditionally including thread_db.h.
8458         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8459         HAVE_THREAD_DB_H.
8460
8461 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
8462
8463         * Makefile.in (install-only): Fix make install regression.
8464
8465 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
8466
8467         Convert man pages to texinfo, new gdbinit.5 texinfo page.
8468         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8469         installation.
8470         * gdbserver.1: Remove.
8471
8472 2013-03-22  Pedro Alves  <palves@redhat.com>
8473
8474         * linux-low.c (handle_extended_wait): Don't call
8475         linux_enable_event_reporting.
8476
8477 2013-03-15  Tony Theodore  <tonyt@logyst.com>
8478
8479         PR build/9098:
8480         * Makefile.in (SHELL): Use @SHELL@.
8481
8482 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8483
8484         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8485         compiler warning.
8486
8487 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
8488
8489         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8490         Remove extraneous NULL element.
8491
8492 2013-03-13  Yao Qi  <yao@codesourcery.com>
8493
8494         * tracepoint.c (traceframe_read_tsv): Look for the last matched
8495         'V' block in trace frame.
8496
8497 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
8498
8499         * target.h (struct target_ops): Add btrace ops.
8500         (target_supports_btrace): New macro.
8501         (target_enable_btrace): New macro.
8502         (target_disable_btrace): New macro.
8503         (target_read_btrace): New macro.
8504         * gdbthread.h (struct thread_info): Add btrace field.
8505         * server.c: Include btrace-common.h.
8506         (handle_btrace_general_set): New function.
8507         (handle_btrace_enable): New function.
8508         (handle_btrace_disable): New function.
8509         (handle_general_set): Call handle_btrace_general_set.
8510         (handle_qxfer_btrace): New function.
8511         (struct qxfer qxfer_packets[]): Add btrace entry.
8512         * inferiors.c (remove_thread): Disable btrace.
8513         * linux-low: Include linux-btrace.h.
8514         (linux_low_enable_btrace): New function.
8515         (linux_low_read_btrace): New function.
8516         (linux_target_ops): Add btrace ops.
8517         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8518         Add srv_linux_btrace=yes.
8519         (x86_64-*-linux*): Add linux-btrace.o.
8520         Add srv_linux_btrace=yes.
8521         * configure.ac: Define HAVE_LINUX_BTRACE.
8522         * config.in: Regenerated.
8523         * configure: Regenerated.
8524
8525 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
8526
8527         * server.c (handle_qxfer): Preserve error message if -3 is
8528         returned.
8529         (qxfer): Document the -3 return value.
8530
8531 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
8532
8533         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8534         (linux_btrace_h): New variable.
8535         (linux-btrace.o): New rule.
8536
8537 2013-03-08  Stan Shebs  <stan@codesourcery.com>
8538             Hafiz Abid Qadeer  <abidh@codesourcery.com>
8539
8540         * tracepoint.c (trace_buffer_size): New global.
8541         (DEFAULT_TRACE_BUFFER_SIZE): New define.
8542         (init_trace_buffer): Change to one-argument function. Allocate
8543         trace buffer memory.
8544         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8545         handle QTBuffer:size packet.
8546         (cmd_bigqtbuffer_size): New function.
8547         (initialize_tracepoint): Call init_trace_buffer with
8548         DEFAULT_TRACE_BUFFER_SIZE.
8549         * server.c (handle_query): Add QTBuffer:size in the
8550         supported packets.
8551
8552 2013-03-07  Yao Qi  <yao@codesourcery.com>
8553
8554         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8555         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8556         of -1.
8557         (cmd_qtsp): Adjust condition.  Do post increment.
8558         Set cur_action and cur_step_action back to 0.
8559
8560 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
8561
8562         PR server/15236
8563         * linux-low.c (linux_write_memory): Return early success if LEN is
8564         zero.
8565
8566 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
8567
8568         * configure.srv: Add x86_64-*-cygwin* as target.
8569
8570 2013-02-28  Tom Tromey  <tromey@redhat.com>
8571
8572         * configure.ac: Invoke AC_SYS_LARGEFILE.
8573         * configure, config.in: Rebuild.
8574
8575 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
8576
8577         * win32-low.c: Throughout, fix format strings and casts of
8578         printf-like functions to avoid type related warnings on all
8579         platforms.
8580         (get_child_debug_event): Print dwDebugEventCode as hex since
8581         that's how it's usually documented.
8582
8583 2013-02-28  Yao Qi  <yao@codesourcery.com>
8584
8585         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8586         pulongest.
8587
8588 2013-02-27  Jiong Wang  <jiwang@tilera.com>
8589
8590         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8591         (reg-tilegx32.c): New rule.
8592         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8593         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
8594         different register info initializer according to elf class.
8595         (init_registers_tilgx32): New function.  The tilegx32 register info
8596         initializer.
8597         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8598         (tile_store_gregset): Likewise.
8599
8600 2013-02-27  Yao Qi  <yao@codesourcery.com>
8601
8602         * server.c (process_point_options): Print debug message when
8603         debug_threads is true.
8604
8605 2013-02-26  Yao Qi  <yao@codesourcery.com>
8606
8607         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8608
8609 2013-02-19  Pedro Alves  <palves@redhat.com>
8610             Kai Tietz <ktietz@redhat.com>
8611
8612         PR gdb/15161
8613
8614         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8615         instead of strtoul to extract address from packet.
8616         (process_serial_event) <'z'>: Likewise.
8617
8618 2013-02-18  Yao Qi  <yao@codesourcery.com>
8619
8620         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8621
8622 2013-02-14  Pedro Alves  <palves@redhat.com>
8623
8624         Plug memory leak.
8625
8626         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8627         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8628
8629 2013-02-14  Pedro Alves  <palves@redhat.com>
8630
8631         * tracepoint.c (cmd_qtdpsrc): Use savestring.
8632
8633 2013-02-14  Pedro Alves  <palves@redhat.com>
8634
8635         * tracepoint.c (save_string): Delete.
8636         (add_tracepoint_action): Use savestring instead of save_string.
8637
8638 2013-02-12  Pedro Alves  <palves@redhat.com>
8639
8640         * linux-xtensa-low.c: Ditto.
8641         * xtensa-xtregs.c: Ditto.
8642
8643 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
8644
8645         * thread-db.c (thread_db_get_tls_address): NULL pointer check
8646         thread_db.
8647
8648 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
8649
8650         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8651         aarch64_num_wp_regs and aarch64_num_bp_regs to
8652         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8653
8654 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
8655
8656         * linux-aarch64-low.c (ps_get_thread_area): Replace
8657         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8658
8659 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
8660             Marcus Shawcroft  <marcus.shawcroft@arm.com>
8661             Nigel Stephens  <nigel.stephens@arm.com>
8662             Yufeng Zhang  <yufeng.zhang@arm.com>
8663
8664         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8665         (aarch64.c, aarch64-without-fpu.c): New targets.
8666         * configure.srv (aarch64*-*-linux*): New.
8667         * linux-aarch64-low.c: New file.
8668
8669 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
8670
8671         * linux-low.c (handle_extended_wait, linux_create_inferior)
8672         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8673         (dequeue_one_deferred_signal, linux_resume_one_thread)
8674         (fetch_register, linux_write_memory, linux_enable_event_reporting)
8675         (linux_tracefork_grandchild, linux_test_for_tracefork)
8676         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8677         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8678         where the argument is 0.
8679
8680 2013-01-25  Yao Qi  <yao@codesourcery.com>
8681
8682         * event-loop.c: Include "queue.h".
8683         (gdb_event_p): New typedef.
8684         (struct gdb_event) <next_event>: Remove.
8685         (event_queue): Change to QUEUE(gdb_event_p).
8686         (async_queue_event): Remove.
8687         (gdb_event_xfree): New.
8688         (initialize_event_loop): New.
8689         (process_event): Use API from QUEUE.
8690         (wait_for_event): Likewise.
8691         * server.c (main): Call initialize_event_loop.
8692         * server.h (initialize_event_loop): Declare.
8693
8694 2013-01-18  Yao Qi  <yao@codesourcery.com>
8695
8696         * ax.h (struct eval_agent_expr_context): New.
8697         (gdb_eval_agent_expr): Update declaration.
8698         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8699         TFRAME.  Add new argument CTX.
8700         * server.h (struct eval_agent_expr_context): Declare.
8701         (agent_mem_read, agent_tsv_read): Update declaration.
8702         (agent_mem_read_string): Likewise.
8703         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8704         (add_traceframe_block): Add new argument TPOINT.
8705         Increase TPOINT->traceframe_usage.
8706         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8707         eval_tracepoint_agent_expr.
8708         (condition_true_at_tracepoint): Likewise.
8709         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
8710         (agent_mem_read_string, agent_tsv_read): Likewise.
8711
8712 2013-01-16  Yao Qi  <yao@codesourcery.com>
8713
8714         * linux-low.c (linux_resume_one_lwp): Don't check
8715         'lwp->bp_reinsert != 0'.
8716
8717 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8718             Pedro Alves  <palves@redhat.com>
8719
8720         * lynx-low.c (ptrace_request_to_str): Define a temporary
8721         macro and use it to simplify this function's implementation.
8722
8723 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8724
8725         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8726         sets errno.
8727
8728 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8729
8730         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8731
8732 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8733
8734         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8735
8736 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8737
8738         * lynx-low.c (lynx_resume): Use the resume_info parameter
8739         to determine the ptid for the lynx_ptrace call, unless
8740         it is equal to minus_one_ptid, in which case we use the
8741         ptid of the current_inferior.
8742         (lynx_wait_1): After having received a thread create/exit
8743         event, resume the inferior's execution using the signaling
8744         thread's ptid, rather than the old ptid.
8745
8746 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8747
8748         * lynx-low.c (lynx_resume): Delete variable ret.
8749
8750 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
8751
8752         * gdbreplay.c (gdbreplay_version): Update copyright year.
8753         * server.c (gdbserver_version): Likewise.
8754
8755 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8756
8757         * lynx-low.c (lynx_wait_1): Add debug trace before adding
8758         new thread.
8759
8760 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8761
8762         * lynx-low.c (ptrace_request_to_str): Add handling for
8763         PTRACE_GETTRACESIG.
8764
8765 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8766
8767         * lynx-low.c (lynx_attach): Delete variable new_process.
8768
8769 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8770
8771         * lynx-low.c (lynx_create_inferior): Delete variable
8772         new_process.
8773
8774 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
8775
8776         * lynx-low.c (ptrace_request_to_str): Do not handle
8777         PTRACE_GETTHREADLIST if this macro does not exist.
8778
8779 2012-12-15  Yao Qi  <yao@codesourcery.com>
8780
8781         * Makefile.in (OBS): Add notif.o.
8782         * notif.c, notif.h: New.
8783         * server.c: Include "notif.h".
8784         (struct vstop_notif) <next>: Remove.
8785         <base>: New field.
8786         (queue_stop_reply): Update.
8787         (push_event, send_next_stop_reply): Remove.
8788         (discard_queued_stop_replies): Update.
8789         (notif_stop): New variable.
8790         (handle_v_stopped): Remove.
8791         (handle_v_requests): Don't call handle_v_stopped.  Call
8792         handle_ack_notif instead.
8793         (queue_stop_reply_callback): Call notif_event_enque instead
8794         of queue_stop_reply.
8795         (handle_status): Don't call send_next_stop_reply, call
8796         notif_write_event instead.
8797         (kill_inferior_callback): Likewise.
8798         (detach_or_kill_inferior_callback): Likewise.
8799         (main): Call initialize_notif.
8800         (process_serial_event): Call QUEUE_is_empty.
8801         (handle_target_event): Call notif_push instead of push event.
8802         * server.h (push_event): Remove declaration.
8803
8804 2012-12-10  Tom Tromey  <tromey@redhat.com>
8805
8806         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8807         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8808         macros.
8809         (.c.o): Rewrite.
8810         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8811         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8812         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8813         (amd64-linux-ipa.o, ax.o): Rewrite.
8814         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8815         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8816         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8817         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8818         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8819         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8820         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8821         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8822         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8823         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8824         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8825         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8826         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8827         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8828         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8829         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8830         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8831         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8832         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8833         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8834         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8835         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8836         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8837         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8838         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8839         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8840         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8841         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8842         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8843         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8844         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8845         (reg-tilegx.o): Remove.
8846         (all_object_files): New macro.
8847         Include .deps files.
8848         * aclocal.m4, configure: Rebuild.
8849         * acinclude.m4: Include depstand.m4, lead-dot.m4.
8850         * configure.ac: Invoke ZW_CREATE_DEPDIR,
8851         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
8852
8853 2012-12-05  Tom Tromey  <tromey@redhat.com>
8854
8855         PR gdb/14917:
8856         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8857
8858 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
8859
8860         * configure.ac: Check for linux/perf_event.h.
8861         * config.in: Regenerated.
8862         * configure: Regenerated.
8863
8864 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
8865
8866         * hostio.c (handle_readlink): Decrease buffer size
8867         parameter passed to readlink by one byte.
8868
8869 2012-11-26  Yao Qi  <yao@codesourcery.com>
8870
8871         * configure.ac (build_warnings): Append '-Wempty-body'.
8872         * configure: Regenerated.
8873         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8874         body.
8875
8876 2012-11-15  Pierre Muller  <muller@sourceware.org>
8877
8878         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8879         * config.in: Regenerate.
8880         * configure: Regenerate.
8881         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8882         Use "gdb_wait.h" header instead of <sys/wait.h> header.
8883         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8884         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8885         header.
8886         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
8887         instead of <sys/wait.h> header.
8888         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8889
8890 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
8891
8892         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8893         (various make rules): Remove -DGDBSERVER
8894
8895 2012-11-09  Yao Qi  <yao@codesourcery.com>
8896
8897         * spu-low.c (current_ptid): Move it to ..
8898         * gdbthread.h: ... here.  New.
8899         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8900         * server.c (myresume, process_serial_event): Likewise.
8901         * thread-db.c (thread_db_find_new_threads): Likewise.
8902         * tracepoint.c (run_inferior_command): Likewise.
8903
8904 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
8905
8906         * server.c (handle_search_memory_1): Include access length in
8907         warning message.
8908
8909 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
8910
8911         * linux-crisv32-low.c: Fix compile errors.
8912
8913 2012-09-04  Yao Qi  <yao@codesourcery.com>
8914
8915         * tracepoint.c (cmd_qtsv): Adjust debug message.
8916         Don't check CUR_TPOINT.
8917
8918 2012-08-28  Yao Qi  <yao@codesourcery.com>
8919
8920         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8921         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8922         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8923         Remove declarations of xmalloc, xreallloc, xstrdup and
8924         freeargv.
8925         * Makefile.in (libiberty_h): New.
8926         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8927         (linux-bfin-low.o): Append dependency 'libiberty.h'.
8928
8929 2012-08-23  Yao Qi  <yao@codesourcery.com>
8930
8931         * server.h: Remove declaration of 'xsnprintf'.
8932
8933 2012-08-22  Keith Seitz  <keiths@redhat.com>
8934
8935         * server.h: Include build-gnulib-gbserver/config.h.
8936         * gdbreplay.c: Likewise.
8937
8938 2012-08-08  Doug Evans  <dje@google.com>
8939
8940         * Makefile.in (SFILES): Add gdb_vecs.c.
8941         (OBS): Add gdb_vecs.o.
8942         (gdb_vecs_h, host_defs_h): New variables.
8943         (thread-db.o): Add $(gdb_vecs_h) dependency.
8944         (gdb_vecs.o): New rule.
8945         * thread-db.c: #include "gdb_vecs.h".
8946         (thread_db_load_search): Use a vector to iterate over path elements.
8947         Handle text appearing after "$pdir".
8948
8949         * configure.ac: Add check for strstr.
8950         * config.in: Regenerate.
8951         * configure: Regenerate.
8952
8953 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
8954
8955         * hostio.c (handle_pread): If pread fails, fall back to attempting
8956         lseek/read.
8957         (handle_pwrite): Likewise for pwrite.
8958
8959 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
8960
8961         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8962         between unsupported TYPE and unimplementable ADDR/LEN combination.
8963         (arm_insert_point): Act on new return value.
8964
8965 2012-07-31  Pedro Alves  <palves@redhat.com>
8966
8967         * server.c (process_point_options): Only skip tokens if we find
8968         one that is unrecognized.  Don't treat 'X' specially while
8969         skipping unrecognized tokens.
8970
8971 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
8972
8973         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8974         to 4-byte-align HW breakpoint addresses for Thumb.
8975
8976 2012-07-27  Yao Qi  <yao@codesourcery.com>
8977
8978         PR remote/14161.
8979
8980         * server.h: Declare gdb_agent_about_to_close.
8981         * target.c (kill_inferior): Include "agent.h".
8982         New.  Send command 'kill'.
8983         * target.h (kill_inferior): Removed macro.
8984         * tracepoint.c (gdb_agent_about_to_close): New.
8985         (gdb_agent_helper_thread): Handle command 'close'.
8986         Wait endlessly until the inferior stops.
8987         Install gdb_agent_remove_socket to atexit hook.
8988         (agent_socket_name): New static variable.
8989         (gdb_agent_socket_init): Replace local variable 'name' with
8990         'agent_socket_name'.
8991         (gdb_agent_remove_socket): New.
8992
8993 2012-07-27  Yao Qi  <yao@codesourcery.com>
8994
8995         * server.c (process_point_options): Stop at 'X' when parsing.
8996
8997 2012-07-19  Michael Eager  <eager@eagercon.com>
8998
8999         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9000         to hw_execute.
9001         * linux-x86-low.c (x86_insert_point, x86_remove_point):
9002         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9003         hardware breakpoint.
9004
9005 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9006
9007         * gdbserver/linux-low.c (initialize_low): Call
9008         linux_ptrace_init_warnings.
9009
9010 2012-07-02  Doug Evans  <dje@google.com>
9011
9012         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9013         pointer to int.
9014
9015 2012-07-02  Stan Shebs  <stan@codesourcery.com>
9016
9017         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9018         (ax.o): Add it to build rule.
9019         (ax-ipa.o): Ditto.
9020         (OBS): Add format.o.
9021         (IPA_OBS): Add format.o.
9022         * server.c (handle_query): Claim support for breakpoint commands.
9023         (process_point_options): Add command case.
9024         (process_serial_event): Leave running if there are printfs in
9025         effect.
9026         * mem-break.h (any_persistent_commands): Declare.
9027         (add_breakpoint_commands): Declare.
9028         (gdb_no_commands_at_breakpoint): Declare.
9029         (run_breakpoint_commands): Declare.
9030         * mem-break.c (struct point_command_list): New struct.
9031         (struct breakpoint): New field command_list.
9032         (any_persistent_commands): New function.
9033         (add_commands_to_breakpoint): New function.
9034         (add_breakpoint_commands): New function.
9035         (gdb_no_commands_at_breakpoint): New function.
9036         (run_breakpoint_commands): New function.
9037         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9038         locally.
9039         * ax.c: Include format.h.
9040         (ax_printf): New function.
9041         (gdb_eval_agent_expr): Add printf opcode.
9042
9043 2012-06-13  Yao Qi  <yao@codesourcery.com>
9044
9045         * server.c (start_inferior): Remove duplicated writes to fields
9046         'last_resume_kind' and 'last_status' of 'current_inferior'.
9047
9048 2012-06-12  Yao Qi  <yao@codesourcery.com>
9049             Pedro Alves  <palves@redhat.com>
9050
9051         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
9052         comment.
9053         * server.c (handle_v_cont): Extend comment.
9054
9055 2012-06-11  Yao Qi  <yao@codesourcery.com>
9056
9057         * linux-low.c (linux_attach): Add 'static'.
9058
9059 2012-06-06  Yao Qi  <yao@codesourcery.com>
9060
9061         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9062
9063 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
9064
9065         Fix gcc -flto compilation warning.
9066         * server.c (main): Make variable multi_mode and attach volatile.
9067
9068 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9069
9070         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9071         if the platform doesn't know about it.
9072
9073 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
9074
9075         * Makefile.in (SFILES): Add linux-tile-low.c.
9076         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9077         * configure.srv: Handle tilegx-*-linux*.
9078         * linux-tile-low.c: New file.
9079
9080 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9081
9082         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9083
9084 2012-05-24  Pedro Alves  <palves@redhat.com>
9085
9086         PR gdb/7205
9087
9088         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9089
9090 2012-05-24  Pedro Alves  <palves@redhat.com>
9091
9092         PR gdb/7205
9093
9094         Replace target_signal with gdb_signal throughout.
9095
9096 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
9097
9098         * linux-low.c (linux_store_registers): Avoid the copying sequence
9099         when no data has been retrieved by ptrace.
9100
9101 2012-05-22  Will Deacon  <will.deacon@arm.com>
9102
9103         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9104         Include asm/ptrace.h.
9105         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9106         already defined.
9107
9108 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
9109
9110         * linux-low.c (linux_store_registers): Don't re-retrieve data
9111         with ptrace that has already been obtained from /proc.  Always
9112         copy any data retrieved with ptrace to the buffer supplied.
9113
9114 2012-05-11  Yao Qi  <yao@codesourcery.com>
9115             Pedro Alves  <palves@redhat.com>
9116
9117         * linux-low.c (enum stopping_threads_kind): New.
9118         (stopping_threads): Change type to `enum stopping_threads_kind'.
9119         (handle_extended_wait): If stopping and suspending threads, leave
9120         the new_lwp suspended too.
9121         (linux_wait_for_event): Adjust.
9122         (stop_all_lwps): Set `stopping_threads' to
9123         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9124         whether we're suspending threads or just stopping them.  Assert no
9125         recursion happens.
9126
9127 2012-04-29  Yao Qi  <yao@codesourcery.com>
9128
9129         * server.h: Move some code to ...
9130         * gdbthread.h: ... here.  New.
9131         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9132         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9133         (nto-low.o, win32-low.o): Likewise.
9134         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9135         * regcache.c, remote-utils.c, server.c: Likewise.
9136         * target.c, tracepoint.c, win32-low.c: Likewise.
9137
9138 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9139
9140         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9141         (PTRACE_ARG4_TYPE): Likewise.
9142         (PTRACE_XFER_TYPE): Likewise.
9143         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9144         ptrace to PTRACE_ARG3_TYPE.
9145         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9146         (PTRACE_ARG4_TYPE): Likewise.
9147         (PTRACE_XFER_TYPE): Likewise.
9148         (linux_detach_one_lwp): Cast fourth argument of
9149         ptrace to long then PTRACE_ARG4_TYPE.
9150         (regsets_fetch_inferior_registers): Cast third argument of
9151         ptrace to long then PTRACE_ARG3_TYPE.
9152         (regsets_store_inferior_registers): Likewise.
9153
9154 2012-04-20  Pedro Alves  <palves@redhat.com>
9155
9156         * configure: Regenerate.
9157
9158 2012-04-19  Pedro Alves  <palves@redhat.com>
9159
9160         * Makefile.in (GNULIB_BUILDDIR): New.
9161         (LIBGNU, INCGNU, GNULIB_H): Adjust.
9162         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9163         (all, install-only, uninstall, clean-info, all-lib, clean): No
9164         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
9165         (maintainer-clean realclean distclean): Use subdir_do.
9166         (subdir_do): New.
9167         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
9168         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
9169         * acinclude.m4: Include acx_configure_dir.m4.
9170         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9171         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
9172         ACX_CONFIGURE_DIR.
9173         (GNULIB): New.
9174         (GNULIB_STDINT_H): Adjust.
9175         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9176         * gdbreplay.c: Include build-gnulib/config.h.
9177         * server.h: Likewise.
9178         * aclocal.m4: Regenerate.
9179         * config.in: Regenerate.
9180         * configure: Regenerate.
9181
9182 2012-04-19  Pedro Alves  <palves@redhat.com>
9183
9184         * Makefile.in (LIBGNU, INCGNU): Adjust.
9185         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9186         (all, install-only, uninstall, clean-info, all-lib, clean)
9187         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9188         * configure.ac: Adjust AC_OUTPUT output.
9189         * aclocal.m4: Regenerate.
9190         * configure: Regenerate.
9191
9192 2012-04-19  Pedro Alves  <palves@redhat.com>
9193
9194         * Makefile.in (generated_files): New.
9195         (server_h): Remove the explicit dependency on config.h, and depend
9196         on $generated_files.
9197
9198 2012-04-19  Pedro Alves  <palves@redhat.com>
9199
9200         * Makefile.in (INCGNU): Add -Ignulib.
9201
9202 2012-04-19  Pedro Alves  <palves@redhat.com>
9203
9204         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9205         (INCGNU): ... this, and spell out -I here.
9206         (GNULIB_LIB): Rename to ...
9207         (LIBGNU): ... this.
9208         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9209
9210 2012-04-19  Pedro Alves  <palves@redhat.com>
9211
9212         * config.in: Regenerate.
9213
9214 2012-04-19  Pedro Alves  <palves@redhat.com>
9215
9216         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9217         * server.h (memmem): Remove declaration.
9218         * config.in: Regenerate.
9219         * configure: Regenerate.
9220
9221 2012-04-19  Yao Qi  <yao@codesourcery.com>
9222
9223         * Makefile.in (SFILES): Add common/vec.c.
9224         (OBS): Add vec.o.
9225         (vec.o): New rule.
9226
9227 2012-04-19  Yao Qi  <yao@codesourcery.com>
9228
9229         * remote-utils.c (prepare_resume_reply): Replace with macro
9230         target_core_of_thread.
9231         * server.c (handle_qxfer_threads_proper): Likewise.
9232         * target.h (traget_core_of_thread): New macro.
9233
9234 2012-04-18  Pedro Alves  <palves@redhat.com>
9235
9236         * aclocal.m4: Regenerate.
9237         * configure: Regenerate.
9238
9239 2012-04-16  Yao Qi  <yao@codesourcery.com>
9240
9241         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9242         duplicated on address.
9243
9244 2012-04-16  Yao Qi  <yao@codesourcery.com>
9245
9246         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9247         (struct tracepoint_action_ops) <send>: New field.
9248         (m_tracepoint_action_send, r_tracepoint_action_send): New.
9249         (agent_expr_send, x_tracepoint_action_send): New.
9250         (l_tracepoint_action_send): New.
9251         (cmd_qtdp): Download and install tracepoint
9252         according to `use_agent'.
9253         (run_inferior_command): Add one more parameter `len'.
9254         Update callers.
9255         (tracepoint_send_agent): New.
9256         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9257
9258 2012-04-16  Yao Qi  <yao@codesourcery.com>
9259
9260         * tracepoint.c (download_tracepoints): Moved to ...
9261         (cmd_qtstart): ... here.
9262
9263 2012-04-14  Yao Qi  <yao@codesourcery.com>
9264
9265         * tracepoint.c: Include inttypes.h.
9266         (struct collect_memory_action): Use sized types.
9267         (struct tracepoint): Likewise.
9268         (cmd_qtdp, stop_tracing): Update print specifiers.
9269         (cmd_qtp, response_tracepoint): Likewise.
9270         (collect_data_at_tracepoint): Likewise.
9271         (collect_data_at_step): Likewise.
9272
9273 2012-04-14  Yao Qi  <yao@codesourcery.com>
9274
9275         Import gnulib module inttypes.
9276         * aclocal.m4, config.in, configure: Regenerated.
9277
9278 2012-04-14  Yao Qi  <yao@codesourcery.com>
9279
9280         * Makefile.in (maintainer-clean, realclean, distclean): Remove
9281         Makefile and config.status at last.
9282
9283 2012-04-13  Yao Qi  <yao@codesourcery.com>
9284
9285         * tracepoint.c: Include stdint.h unconditionally.
9286
9287 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9288
9289         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9290         on BFD_HAVE_SYS_PROCFS_TYPE.
9291         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9292         * configure: Regenerate.
9293         * config.in: Likewise.
9294
9295 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
9296
9297         * Makefile.in (clean): Also remove x32.c x32-linux.c
9298         x32-avx.c x32-avx-linux.c.
9299         (x32.o): New target.
9300         (x32.c): Likewise.
9301         (x32-linux.o): Likewise.
9302         (x32-linux.c): Likewise.
9303         (x32-avx.o): Likewise.
9304         (x32-avx.c): Likewise.
9305         (x32-avx-linux.o): Likewise.
9306         (x32-avx-linux.c): Likewise.
9307
9308         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9309         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9310         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9311         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9312         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9313         i386/x32-avx-linux.xml.
9314
9315         * linux-x86-low.c (init_registers_x32_linux): New prototype.
9316         (init_registers_x32_avx_linux): Likwise.
9317         (x86_linux_update_xmltarget): Call init_registers_x32_linux
9318         or init_registers_x32_avx_linux if linux_is_elf64 is false.
9319
9320 2012-04-13  Pedro Alves  <palves@redhat.com>
9321
9322         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9323         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9324         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9325         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9326         the sub-make.
9327
9328 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9329
9330         * linux-x86-low.c (compat_x32_clock_t): New.
9331         (compat_x32_siginfo_t): Likewise.
9332         (compat_x32_siginfo_from_siginfo): Likewise.
9333         (siginfo_from_compat_x32_siginfo): Likewise.
9334         (linux_is_elf64): Likewise.
9335         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9336         and siginfo_from_compat_x32_siginfo for x32.
9337         (x86_arch_setup): Set linux_is_elf64.
9338
9339 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9340
9341         PR gdb/13969
9342         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9343         e_machine field.
9344         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9345         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9346         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9347         compatible with process.
9348
9349 2012-04-12  Yao Qi  <yao@codesourcery.com>
9350
9351         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9352         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9353         (install-only, install-info, clean): Handle sub dir gnulib.
9354         (all-lib, am--refresh): New targets.
9355         (memmem.o): Remove target.
9356         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9357         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
9358         (AC_REPLACE_FUNCS): Remove memmem.
9359         Invoke gl_INIT and AM_INIT_AUTOMAKE.
9360         (AC_OUTPUT): Generate Makefile in gnulib/.
9361         * aclocal.m4, config.in, configure: Regenerated.
9362
9363 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
9364
9365         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9366
9367 2012-04-05  Pedro Alves  <palves@redhat.com>
9368
9369         -Werror=strict-aliasing
9370
9371         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9372         pointer.
9373
9374 2012-04-04  Pedro Alves  <palves@redhat.com>
9375
9376         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9377         (sparc_store_gregset_from_stack, sparc_store_gregset)
9378         (sparc_breakpoint_at): Fix formatting.
9379
9380 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9381
9382         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9383         are available.
9384         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9385         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9386         * config.in: Regenerate.
9387         * configure: Likewise.
9388
9389 2012-03-29  Pedro Alves  <palves@redhat.com>
9390
9391         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9392         Correct ptrace arguments.
9393
9394 2012-03-28  Pedro Alves  <palves@redhat.com>
9395
9396         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9397         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9398         (IA64_FR1_REGNUM): New defines.
9399         (ia64_fetch_register): New.
9400         (the_low_target): Install it.
9401         * linux-low.h (struct linux_target_ops) <fetch_register>: New
9402         field.
9403         * linux-low.c (linux_fetch_registers): Try the
9404         the_low_target.fetch_register hook first.
9405
9406         * linux-arm-low.c (the_low_target): Adjust.
9407         * linux-bfin-low.c (the_low_target): Adjust.
9408         * linux-cris-low.c (the_low_target): Adjust.
9409         * linux-crisv32-low.c (the_low_target): Adjust.
9410         * linux-m32r-low.c (the_low_target): Adjust.
9411         * linux-m68k-low.c (the_low_target): Adjust.
9412         * linux-mips-low.c (the_low_target): Adjust.
9413         * linux-ppc-low.c (the_low_target): Adjust.
9414         * linux-s390-low.c (the_low_target): Adjust.
9415         * linux-sh-low.c (the_low_target): Adjust.
9416         * linux-sparc-low.c (the_low_target): Adjust.
9417         * linux-tic6x-low.c (the_low_target): Adjust.
9418         * linux-x86-low.c (the_low_target): Adjust.
9419         * linux-xtensa-low.c (the_low_target): Adjust.
9420
9421 2012-03-26  Pedro Alves  <palves@redhat.com>
9422
9423         * server.c (handle_qxfer_libraries): Don't bail early if
9424         the_target->qxfer_libraries_svr4 is not NULL.
9425
9426 2012-03-26  Pedro Alves  <palves@redhat.com>
9427
9428         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9429
9430 2012-03-23  Pedro Alves  <palves@redhat.com>
9431
9432         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9433         "library-list-svr4" element's start tag when the the DSO list is
9434         empty.
9435
9436 2012-03-23  Pedro Alves  <palves@redhat.com>
9437
9438         * linux-low.c (read_one_ptr): Read the inferior's pointer through
9439         a variable whose type size is the same as the inferior's pointer
9440         size.
9441
9442 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
9443
9444         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9445         struct siginfo.
9446         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9447         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9448         * linux-low.h: Include <signal.h>.
9449         (struct siginfo): Remove forward declaration.
9450         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9451         struct siginfo.
9452
9453 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
9454
9455         * .gitignore: Ignore more files.
9456
9457 2012-03-19  Pedro Alves  <palves@redhat.com>
9458             Jan Kratochvil  <jan.kratochvil@redhat.com>
9459
9460         * server.c (cont_thread, general_thread): Add describing comments.
9461         (start_inferior): Clear `cont_thread'.
9462         (handle_v_cont): Don't set `cont_thread' if resuming all threads
9463         of a process.
9464
9465 2012-03-15  Yao Qi  <yao@codesourcery.com>
9466
9467         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9468         handling to ...
9469         (cmd_qtdp): ... here.
9470
9471 2012-03-15  Yao Qi  <yao@codesourcery.com>
9472
9473         * tracepoint.c (struct tracepoint_action_ops): New.
9474         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9475         (m_tracepoint_action_download): New.
9476         (r_tracepoint_action_download): New.
9477         (x_tracepoint_action_download): New.
9478         (l_tracepoint_action_download): New.
9479         (add_tracepoint_action): Install `action->ops' according type.
9480         (download_tracepoint_1): Move code `download' function pointer
9481         of various tracepoint_action_ops.
9482
9483 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
9484
9485         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
9486         linux_ptrace_attach_warnings.
9487
9488 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
9489
9490         * Makefile.in (linux-ptrace.o): New.
9491         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9492         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9493         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9494         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9495         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9496         of these targets.
9497         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9498
9499 2012-03-08  Yao Qi  <yao@codesourcery.com>
9500             Pedro Alves  <palves@redhat.com>
9501
9502         Fix PR server/13392.
9503         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9504         offset of JMP insn.
9505         * tracepoint.c (remove_tracepoint): New.
9506         (cmd_qtdp): Call remove_tracepoint when failed to install.
9507
9508 2012-03-07  Pedro Alves  <palves@redhat.com>
9509
9510         * linux-low.c (get_detach_signal): New.
9511         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9512         Pass on pending signals to PTRACE_DETACH.  Check the result of the
9513         ptrace call.
9514         * server.c (program_signals, program_signals_p): New.
9515         (handle_general_set): Handle QProgramSignals.
9516         * server.h (program_signals, program_signals_p): Declare.
9517
9518 2012-03-05  Pedro Alves  <palves@redhat.com>
9519             Jan Kratochvil  <jan.kratochvil@redhat.com>
9520
9521         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9522         New comment why.
9523
9524 2012-03-03  Yao Qi  <yao@codesourcery.com>
9525
9526         * tracepoint.c (tracepoint_look_up_symbols): Update call to
9527         agent_look_up_symbols.
9528
9529 2012-03-03  Yao Qi  <yao@codesourcery.com>
9530
9531         * Makefile.in (linux-low.o): Keep dependence on agent.h.
9532         (linux-x86-low.o): Likewise.
9533         * server.h: Remove in_process_agent_loaded.
9534         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
9535         common/agent.c.
9536         Update callers.
9537
9538 2012-03-03  Yao Qi  <yao@codesourcery.com>
9539
9540         * tracepoint.c (gdb_agent_capability): New global.
9541         (in_process_agent_loaded_ust): Renamed to
9542         `in_process_agent_supports_ust'.
9543         Update callers.
9544         (in_process_agent_supports_ust): Call agent_capability_check.
9545         (clear_installed_tracepoints): Assert that agent supports
9546         agent.
9547
9548 2012-03-03  Yao Qi  <yao@codesourcery.com>
9549
9550         * linux-low.c (linux_supports_agent): New.
9551         (linux_target_ops): Initialize field `supports_agent' with
9552         linux_supports_agent.
9553         * target.h (struct target_ops) <supports_agent>: New.
9554         (target_supports_agent): New macro.
9555         * server.c (handle_general_set): Handle packet 'QAgent'.
9556         (handle_query): Send `QAgent+'.
9557         * Makefile.in (server.o): Depends on agent.h.
9558
9559 2012-03-03  Yao Qi  <yao@codesourcery.com>
9560
9561         * Makefile.in (OBS): Add agent.o.
9562         Add new rule for agent.o.
9563         Track dependence of tracepoint.c on agent.h.
9564         * tracepoint.c (run_inferior_command_1):
9565         (run_inferior_command): Call agent_run_command.
9566         (gdb_ust_connect_sync_socket): Deleted.  Move it to
9567         common/agent.c.
9568         (resume_thread, stop_thread): Likewise.
9569         (gdb_ust_socket_init): Renamed to ...
9570         (gdb_agent_socket_init): ... New.
9571         (gdb_ust_thread): Renamed to ...
9572         (gdb_agent_helper_thread): ... New.
9573         (gdb_ust_init): Move some code to ...
9574         (gdb_agent_init): ... here.  New.
9575         [HAVE_UST]: Call gdb_ust_init.
9576         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
9577         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9578         * config.in, configure: Regenerated.
9579
9580 2012-03-02  Pedro Alves  <palves@redhat.com>
9581
9582         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9583         * linux-low.c (struct simple_pid_list): New.
9584         (stopped_pids): New a struct simple_pid_list pointer.
9585         (add_to_pid_list, pull_pid_from_list): New.
9586         (handle_extended_wait): Don't assume the first signal new children
9587         report is SIGSTOP.  Adjust call to pull_pid_from_list.
9588         (linux_wait_for_lwp): Adjust.
9589
9590 2012-03-02  Yao Qi  <yao@codesourcery.com>
9591
9592         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9593         debug log.
9594
9595 2012-03-02  Yao Qi  <yao@codesourcery.com>
9596
9597         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9598         `stop_pc' and `tpoint'.  Update caller.
9599
9600 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
9601
9602         * linux-low.h (linux_target_ops): Add regset_bitmap member.
9603         * linux-low.c (use_linux_regsets): New macro.
9604         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9605         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9606         (linux_register_in_regsets): New function.
9607         (usr_fetch_inferior_registers): Skip registers covered by
9608         regsets.
9609         (usr_store_inferior_registers): Likewise.
9610         (usr_fetch_inferior_registers): New macro.
9611         (usr_store_inferior_registers): Likewise.
9612         (linux_fetch_registers): Handle mixed regset/non-regset targets.
9613         (linux_store_registers): Likewise.
9614         * linux-mips-low.c (init_registers_mips_dsp_linux): New
9615         prototype.
9616         (init_registers_mips64_dsp_linux): Likewise.
9617         (init_registers_mips_linux): New macro.
9618         (init_registers_mips_dsp_linux): Likewise.
9619         (mips_dsp_num_regs): Likewise.
9620         (DSP_BASE, DSP_CONTROL): New fallback macros.
9621         (mips_base_regs): New macro.
9622         (mips_regmap): Use it.  Fix the size.
9623         (mips_dsp_regmap): New variable.
9624         (mips_dsp_regset_bitmap): Likewise.
9625         (mips_arch_setup): New function.
9626         (mips_cannot_fetch_register): Use the_low_target.regmap rather
9627         than mips_regmap.
9628         (mips_cannot_store_register): Likewise.
9629         (the_low_target): Update .arch_setup, .num_regs and .regmap
9630         initializers.  Add .regset_bitmap initializer.
9631         * linux-arm-low.c (the_low_target): Add .regset_bitmap
9632         initializer.
9633         * linux-bfin-low.c (the_low_target): Likewise.
9634         * linux-cris-low.c (the_low_target): Likewise.
9635         * linux-crisv32-low.c (the_low_target): Likewise.
9636         * linux-ia64-low.c (the_low_target): Likewise.
9637         * linux-m32r-low.c (the_low_target): Likewise.
9638         * linux-m68k-low.c (the_low_target): Likewise.
9639         * linux-ppc-low.c (the_low_target): Likewise.
9640         * linux-s390-low.c (the_low_target): Likewise.
9641         * linux-sh-low.c (the_low_target): Likewise.
9642         * linux-sparc-low.c (the_low_target): Likewise.
9643         * linux-tic6x-low.c (the_low_target): Likewise.
9644         * linux-x86-low.c (the_low_target): Likewise.
9645         * linux-xtensa-low.c (the_low_target): Likewise.
9646         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9647         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
9648         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9649         srv_xmlfiles.
9650         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9651         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9652
9653 2012-02-29  Yao Qi  <yao@codesourcery.com>
9654             Pedro Alves  <palves@redhat.com>
9655
9656         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9657         `step_over_finished' is true.
9658
9659 2012-02-27  Pedro Alves  <palves@redhat.com>
9660
9661         * linux-low.c (pid_is_stopped): Delete, moved to common/.
9662         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9663
9664 2012-02-27  Pedro Alves  <palves@redhat.com>
9665
9666         PR server/9684
9667         * linux-low.c (pid_is_stopped): New.
9668         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9669
9670 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
9671
9672         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9673         of conditions.
9674
9675 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
9676
9677         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9678
9679 2012-02-24  Luis Machado  <lgustavo@codesourcery>
9680
9681         * server.c (handle_query): Advertise support for target-side
9682         breakpoint condition evaluation.
9683         (process_point_options): New function.
9684         (process_serial_event): When inserting a breakpoint, check for
9685         a target-side condition that should be evaluated.
9686
9687         * mem-break.c: Include regcache.h and ax.h.
9688         (point_cond_list_t): New data structure.
9689         (breakpoint) <cond_list>: New field.
9690         (find_gdb_breakpoint_at): Make non-static.
9691         (delete_gdb_breakpoint_at): Clear any target-side
9692         conditions.
9693         (clear_gdb_breakpoint_conditions): New function.
9694         (add_condition_to_breakpoint): Likewise.
9695         (add_breakpoint_condition): Likewise.
9696         (gdb_condition_true_at_breakpoint): Likewise.
9697         (gdb_breakpoint_here): Return result directly instead
9698         of going through a local variable.
9699
9700         * mem-break.h (find_gdb_breakpoint_at): New prototype.
9701         (clear_gdb_breakpoint_conditions): Likewise.
9702         (add_breakpoint_condition): Likewise.
9703         (gdb_condition_true_at_breakpoint): Likewise.
9704
9705         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9706         (need_step_over_p): Take target-side breakpoint condition into
9707         consideration.
9708
9709 2012-02-24  Luis Machado  <lgustavo@codesourcery>
9710
9711         * server.h: Include tracepoint.h.
9712         (agent_mem_read, agent_get_trace_state_variable_value,
9713         agent_set_trace_state_variable_value,
9714         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9715         get_set_tsv_func_addr): New prototypes.
9716
9717         * ax.h: New include file.
9718         * ax.c: New source file.
9719
9720         * tracepoint.c: Include ax.h.
9721         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9722         agent_expr, eval_result_type): Move to ax.h.
9723         (parse_agent_expr): Rename to ...
9724         (gdb_parse_agent_expr): ... this, make it non-static and move
9725         to ax.h.
9726         (unparse_agent_expr) Rename to ...
9727         (gdb_unparse_agent_expr): ... this, make it non-static and move
9728         to ax.h.
9729         (eval_agent_expr): Rename to ...
9730         (eval_tracepoint_agent_expr): ... this.
9731         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9732         forward declarations.
9733         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9734         (agent_get_trace_state_variable_value): New function.
9735         (agent_set_trace_state_variable_value): New function.
9736         (cmd_qtdp): Call gdb_parse_agent_expr (...).
9737         (response_tracepoint): Call gdb_unparse_agent_expr (...).
9738         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9739         (condition_true_at_tracepoint): Likewise.
9740         (parse_agent_expr): Rename to ...
9741         (gdb_parse_agent_expr): ... this and move to ax.c.
9742         (unparse_agent_expr): Rename to ...
9743         (gdb_unparse_agent_expr): ... this and move to ax.c.
9744         (gdb_agent_op_name): Move to ax.c.
9745         (eval_agent_expr): Rename to ...
9746         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9747         and move to ax.c.
9748         (eval_tracepoint_agent_expr): New function.
9749         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9750         non-static.
9751         (current_insn_ptr, emit_error, struct bytecode_address): Move to
9752         ax.c.
9753         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9754         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9755         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9756         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9757         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9758         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9759         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9760         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9761         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9762         (compile_bytecodes): Remove forward declaration.
9763         (is_goto_target): Move to ax.c.
9764         (compile_bytecodes): Move to ax.c and call
9765         agent_get_trace_state_variable_value (...) and
9766         agent_set_trace_state_variable_value (...).
9767
9768         * Makefile.in: Update ax.c and IPA dependencies.
9769
9770 2012-02-24  Pedro Alves  <palves@redhat.com>
9771
9772         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9773         (cmd_bigqtbuffer_circular): ... this.  Only handle
9774         'QTBuffer:circular:'.
9775         (handle_tracepoint_general_set): Adjust.
9776
9777 2012-02-16  Yao Qi  <yao@codesourcery.com>
9778
9779         * inferiors.c: Move code to ...
9780         * dll.c: .... here.  New.
9781         * server.h: Declare clear_dlls.
9782         * Makefile.in (SFILES): Add dll.c.
9783         (OBS): Add dll.o
9784         (dll.o): New rule.
9785
9786 2012-02-11  Yao Qi  <yao@codesourcery.com>
9787
9788         * server.c: (handle_monitor_command): Add a new parameter
9789         `own_buf'.
9790         (handle_query): Update caller.
9791
9792 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
9793
9794         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9795         * configure, config.in: Regenerate.
9796         * hostio.c: Provide an alternate implementation if HAVE_READLINK
9797         is not defined.
9798
9799 2012-02-02  Pedro Alves  <palves@redhat.com>
9800
9801         Try SIGKILL first, then PTRACE_KILL.
9802         * linux-low.c (linux_kill_one_lwp): New.
9803         (linux_kill_one_lwp): Rename to ...
9804         (kill_one_lwp_callback): ... this.  Use the new
9805         linux_kill_one_lwp.
9806
9807 2012-02-02  Pedro Alves  <palves@redhat.com>
9808
9809         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9810         inferior.
9811
9812 2012-01-27  Pedro Alves  <palves@redhat.com>
9813
9814         * linux-low.c (linux_child_pid_to_exec_file): Delete.
9815         (elf_64_file_p): Make static.
9816         (linux_pid_exe_is_elf_64_file): New.
9817         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9818         Delete declarations.
9819         (linux_pid_exe_is_elf_64_file): Declare.
9820         * linux-x86-low.c (x86_arch_setup): Use
9821         linux_pid_exe_is_elf_64_file.
9822
9823 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
9824
9825         * linux-low.c (linux_wait_for_event_1): Rename to ...
9826         (linux_wait_for_event): ... here and merge it with former
9827         linux_wait_for_event - new variable wait_ptid, use it.
9828         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9829
9830 2012-01-23  Pedro Alves  <palves@redhat.com>
9831
9832         * server.c (main): Avoid yet another case of infinite loop while
9833         detaching/killing after a longjmp.
9834
9835 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9836
9837         Code cleanup.
9838         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9839
9840 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
9841
9842         * hostio.c (handle_readlink): New function.
9843         (handle_vFile): Call it to handle "vFile:readlink" packets.
9844
9845 2012-01-20  Pedro Alves  <palves@redhat.com>
9846             Ulrich Weigand  <ulrich.weigand@linaro.org>
9847
9848         * server.c (handle_v_requests): Only support vAttach and vRun to
9849         start multiple processes when in extended protocol mode.
9850
9851 2012-01-17  Pedro Alves  <palves@redhat.com>
9852
9853         * tracepoint.c (initialize_tracepoint): Use mmap instead of
9854         memalign plus mprotect to allocate the scratch buffer.
9855
9856 2012-01-13  Pedro Alves  <palves@redhat.com>
9857
9858         * server.c (attach_inferior): Clear `cont_thread'.
9859
9860 2012-01-13  Pedro Alves  <palves@redhat.com>
9861
9862         * server.c (main): Avoid infinite loop while detaching/killing
9863         after a longjmp.
9864
9865 2012-01-09  Doug Evans  <dje@google.com>
9866
9867         * server.c (start_inferior): Set last_ptid in --wrapper case.
9868
9869 2012-01-06  Yao Qi  <yao@codesourcery.com>
9870
9871         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9872         defined.
9873         [IN_PROCESS_AGENT] (debug_agent): New global variable.
9874
9875 2012-01-04  Yao Qi  <yao@codesourcery.com>
9876
9877         * tracepoint.c (cmd_qtdp): Print debug message
9878         for static tracepoint.
9879
9880 2012-01-04  Yao Qi  <yao@codesourcery.com>
9881
9882         * tracepoint.c (trace_vdebug): Differentiate debug message
9883         between gdbserver and IPA.
9884
9885 2012-01-03  Yao Qi  <yao@codesourcery.com>
9886
9887         * tracepoint.c (tracepoint_was_hit): Don't collect for
9888         static tracepoint.
9889
9890 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
9891
9892         * terminal.h: Reformat copyright header.
9893
9894 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
9895
9896         * server.c (gdbserver_version): Update copyright year.
9897         * gdbreplay.c (gdbreplay_version): Likewise.
9898
9899 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
9900
9901         * linux-low.c (linux_create_inferior): Put empty if clause for write.
9902
9903         Revert:
9904         2011-12-18  Hui Zhu  <teawater@gmail.com>
9905         * linux-low.c (linux_create_inferior): Save return value to ret.
9906
9907 2011-12-18  Hui Zhu  <teawater@gmail.com>
9908
9909         * linux-low.c (linux_create_inferior): Save return value to ret.
9910
9911 2011-12-16  Doug Evans  <dje@google.com>
9912
9913         * linux-low.c (linux_create_inferior): If stdio connection,
9914         redirect stdin from /dev/null, stdout to stderr.
9915         * remote-utils.c (remote_is_stdio): New static global.
9916         (remote_connection_is_stdio): New function.
9917         (remote_prepare): Handle stdio connection.
9918         (remote_open): Ditto.
9919         (remote_close): Don't close stdin for stdio connections.
9920         (read_prim,write_prim): New functions.  Replace all calls to
9921         read/write to these.
9922         * server.c (main): Watch for "-" argument.  Move call to
9923         remote_prepare before start_inferior.
9924         * server.h (STDIO_CONNECTION_NAME): New macro.
9925         (remote_connection_is_stdio): Declare.
9926
9927         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9928         in debugging output.
9929
9930 2011-12-15  Yao Qi  <yao@codesourcery.com>
9931
9932         * tracepoint.c: Include sys/syscall.h.
9933         (gdb_ust_thread): Remove preprocessor conditional.
9934
9935 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
9936
9937         * linux-low.c (linux_detach_one_lwp): Call
9938         the_low_target.prepare_to_resume before detaching.
9939
9940 2011-12-14  Yao Qi  <yao@codesourcery.com>
9941
9942         * tracepoint.c (gdb_ust_thread): Don't ignore return value
9943         of write.
9944
9945 2011-12-14  Yao Qi  <yao@codesourcery.com>
9946
9947         * i386-low.c (i386_low_stopped_data_address): Initialize local
9948         variable `control'.
9949
9950 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
9951
9952         PR remote/13492
9953
9954         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9955         DR_CONTROL unless necessary.  Extend comments.
9956         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9957         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
9958
9959 2011-12-13  Yao Qi  <yao@codesourcery.com>
9960
9961         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9962         macros.
9963         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9964
9965 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
9966
9967         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9968         Print new debug message for such case.
9969
9970 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
9971
9972         Fix overlapping memcpy.
9973         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
9974         the read_inferior_memory transfer.
9975         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
9976         write_inferior_memory transfer.
9977         (set_fast_tracepoint_jump): New variable buf.  Use it for the
9978         read_inferior_memory and write_inferior_memory transfers.
9979         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9980         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9981         Use it for the write_inferior_memory transfer.
9982         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9983         buffers.
9984
9985 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
9986
9987         * linux-low.c (fetch_register, store_register): Make code
9988         consistent, fix formatting.
9989
9990 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
9991
9992         * linux-low.c (usr_store_inferior_registers): Factor out code
9993         to handle individual registers into...
9994         (store_register): ... this new function.
9995
9996 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
9997
9998         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9999         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10000         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10001         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10002         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10003         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10004         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10005         (srv_xmlfiles): Add new XML files.
10006
10007         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10008         and <sys/uio.h>.
10009         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10010         (init_registers_s390_linux32v1): Add prototype.
10011         (init_registers_s390_linux32v2): Likewise.
10012         (init_registers_s390_linux64v1): Likewise.
10013         (init_registers_s390_linux64v2): Likewise.
10014         (init_registers_s390x_linux64v1): Likewise.
10015         (init_registers_s390x_linux64v2): Likewise.
10016         (s390_num_regs): Increment to 52.
10017         (s390_regmap): Add orig_r2 register.
10018         (s390_num_regs_3264): Increment to 68.
10019         (s390_regmap_3264): Add orig_r2 register.
10020         (s390_collect_ptrace_register): Handle orig_r2 register.
10021         (s390_supply_ptrace_register): Likewise.
10022         (s390_fill_last_break): New function.
10023         (s390_store_last_break): Likewise.
10024         (s390_fill_system_call): New function.
10025         (s390_store_system_call): Likewise.
10026         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10027         register sets.
10028         (s390_check_regset): New function.
10029         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10030         NT_S390_SYSTEM_CALL regsets and use appropriate description.
10031         Update target_regsets for available register sets.
10032
10033 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
10034             Jan Kratochvil  <jan.kratochvil@redhat.com>
10035
10036         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10037         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10038         New.
10039         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10040         * linux-low.h (struct process_info_private): New member r_debug.
10041         * server.c (handle_qxfer_libraries): Call
10042         the_target->qxfer_libraries_svr4.
10043         (handle_qxfer_libraries_svr4): New function.
10044         (qxfer_packets): New entry "libraries-svr4".
10045         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10046         * target.h (struct target_ops): New member qxfer_libraries_svr4.
10047         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10048         PACKET_qXfer_libraries_svr4.
10049
10050 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
10051
10052         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10053         PSW address/mask between 8-byte and 16-byte formats.
10054         (s390_supply_ptrace_register): Likewise.
10055         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10056         basic addressing mode bit.
10057
10058 2011-11-24  Stan Shebs  <stan@codesourcery.com>
10059
10060         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10061
10062 2011-11-17  Stan Shebs  <stan@codesourcery.com>
10063
10064         * tracepoint.c (struct tracepoint): New field traceframe_usage.
10065         (tracing_start_time): New global.
10066         (tracing_stop_time): New global.
10067         (tracing_user_name): New global.
10068         (tracing_notes): New global.
10069         (tracing_stop_note): New global.
10070         (cmd_qtstart): Set traceframe_usage, start_time.
10071         (stop_tracing): Set stop_time.
10072         (cmd_qtstatus): Report additional status.
10073         (cmd_qtp): New function.
10074         (handle_tracepoint_query): Call it.
10075         (cmd_qtnotes): New function.
10076         (handle_tracepoint_general_set): Call it.
10077         (get_timestamp): Rename from tsv_get_timestamp.
10078
10079 2011-11-14  Stan Shebs  <stan@codesourcery.com>
10080             Kwok Cheung Yeung  <kcy@codesourcery.com>
10081
10082         * linux-x86-low.c (small_jump_insn): New.
10083         (i386_install_fast_tracepoint_jump_pad): Add arguments for
10084         trampoline and error message, build a trampoline and issue a small
10085         jump instruction to it.
10086         (x86_install_fast_tracepoint_jump_pad): Add arguments for
10087         trampoline and error message.
10088         (x86_get_min_fast_tracepoint_insn_len): New.
10089         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10090         * linux-low.h (struct linux_target_ops): Add arguments to
10091         install_fast_tracepoint_jump_pad operation, add new operation.
10092         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10093         arguments.
10094         (linux_get_min_fast_tracepoint_insn_len): New function.
10095         (linux_target_op): Add new operation.
10096         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10097         (gdb_trampoline_buffer_end): Ditto.
10098         (gdb_trampoline_buffer_error): Ditto.
10099         (struct ipa_sym_addresses): Add fields for new IPA variables.
10100         (symbol_list): Add entries for new IPA variables.
10101         (struct tracepoint): Add fields to hold the address range of the
10102         trampoline used by the tracepoint.
10103         (trampoline_buffer_head): New static variable.
10104         (trampoline_buffer_tail): Ditto.
10105         (claim_trampoline_space): New function.
10106         (have_fast_tracepoint_trampoline_buffer): New function.
10107         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10108         structure.
10109         (install_fast_tracepoint): Ditto, also add error buffer argument.
10110         (cmd_qtminftpilen): New function.
10111         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10112         (fast_tracepoint_from_trampoline_address): New function.
10113         (fast_tracepoint_collecting): Handle trampoline as part of jump
10114         pad space.
10115         (set_trampoline_buffer_space): New function.
10116         (initialize_tracepoint): Initialize new IPA variables.
10117         * target.h (struct target_ops): Add arguments to
10118         install_fast_tracepoint_jump_pad operation, add new
10119         get_min_fast_tracepoint_insn_len operation.
10120         (target_get_min_fast_tracepoint_insn_len): New.
10121         (install_fast_tracepoint_jump_pad): Add arguments.
10122         * server.h (IPA_BUFSIZ): Define.
10123         * linux-i386-ipa.c: Include extra header files.
10124         (initialize_fast_tracepoint_trampoline_buffer): New function.
10125         (initialize_low_tracepoint): Call it.
10126         * server.h (set_trampoline_buffer_space): Declare.
10127         (claim_trampoline_space): Ditto.
10128         (have_fast_tracepoint_trampoline_buffer): Ditto.
10129
10130 2011-11-14  Yao Qi  <yao@codesourcery.com>
10131
10132         * server.c (handle_query): Handle InstallInTrace for qSupported.
10133         * tracepoint.c (add_tracepoint): Sort list.
10134         (install_tracepoint, download_tracepoint): New.
10135         (cmd_qtdp): Call them to install and download tracepoints.
10136         (sort_tracepoints): Removed.
10137         (cmd_qtstart): Update.
10138
10139 2011-11-14  Yao Qi  <yao@codesourcery.com>
10140
10141         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10142         * mem-break.h: Declare.
10143         * tracepoint.c (cmd_qtstart): Move some code to ...
10144         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10145         New.
10146         (download_tracepoints): Move some code to ...
10147         (download_tracepoint_1): ... here.  New.
10148
10149 2011-11-08  Yao Qi  <yao@codesourcery.com>
10150
10151         * remote-utils.c (relocate_instruction): A comment fix.
10152
10153 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
10154
10155         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10156         (i386_dr_low_get_control, i386_dr_low_get_status): Use
10157         dr_status_mirror and dr_control_mirror from debug_reg_state.
10158         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10159         (i386_initial_stuff): Remove use of deleted globals.
10160         (i386_get_thread_context, i386_set_thread_context,
10161         i386_thread_added): Use dr_status_mirror and dr_control_mirror
10162         from debug_reg_state.
10163
10164 2011-11-05  Yao Qi  <yao@codesourcery.com>
10165
10166         * tracepoint.c (gdb_collect): Loop over tracepoints of same
10167         address as TPOINT's.
10168
10169 2011-11-02  Stan Shebs  <stan@codesourcery.com>
10170
10171         * tracepoint.c (agent_mem_read_string): New function.
10172         (eval_agent_expr): Call it for tracenz.
10173         * server.c (handle_query): Report support for tracenz.
10174
10175 2011-11-02  Yao Qi  <yao@codesourcery.com>
10176
10177         * tracepoint.c (cmd_qtstart): Remove unused local variables.
10178
10179 2011-11-02  Yao Qi  <yao@codesourcery.com>
10180
10181         * target.h: Fix a typo in comment.
10182
10183 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
10184
10185         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
10186         clobber the breakpoints' shadows with fast tracepoint jumps.
10187         * mem-break.h (check_mem_write): Add `myaddr' parameter.
10188         * target.c (write_inferior_memory): Also pass MYADDR down to
10189         check_mem_write.
10190
10191 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
10192
10193         * configure.ac: Check support for personality routine.
10194         * configure: Regenerate.
10195         * config.in: Likewise.
10196         * linux-low.c: Include <sys/personality.h>.
10197         Define ADDR_NO_RANDOMIZE if necessary.
10198         (linux_create_inferior): Disable address space randomization when
10199         forking inferior, if requested.
10200         (linux_supports_disable_randomization): New function.
10201         (linux_target_ops): Install it.
10202         * server.h (disable_randomization): Declare.
10203         * server.c (disable_randomization): New global variable.
10204         (handle_general_set): Handle QDisableRandomization.
10205         (handle_query): Likewise for qSupported.
10206         (main): Support --disable-randomization and --no-disable-randomization
10207         command line arguments.
10208         * target.h (struct target_ops): Add supports_disable_randomization.
10209         (target_supports_disable_randomization): New macro.
10210
10211 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
10212
10213         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10214         ifdef check.
10215         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10216         [!PT_GETDSBT] (target_loadmap): New definition.
10217         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10218         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10219         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10220         and PT_GETDSBT to LINUX_LOADMAP.
10221         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10222         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10223
10224 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10225
10226         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10227         (arm_linux_hwbp_cap): New static variable.
10228         (arm_linux_get_hwbp_cap): Replace by ...
10229         (arm_linux_init_hwbp_cap): ... this new function.
10230         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10231         (arm_linux_get_hw_watchpoint_count): Likewise.
10232         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10233         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10234         (arm_prepare_to_resume): Use perror_with_name instead of error.
10235
10236 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10237
10238         * linux-arm-low.c: Include <signal.h>.
10239         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10240         (struct arm_linux_hwbp_cap): New data type.
10241         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10242         (struct arm_linux_hw_breakpoint): New data type.
10243         (MAX_BPTS, MAX_WPTS): Define.
10244         (struct arch_process_info, struct arch_lwp_info): New data types.
10245         (arm_linux_get_hwbp_cap): New function.
10246         (arm_linux_get_hw_breakpoint_count): Likewise.
10247         (arm_linux_get_hw_watchpoint_count): Likewise.
10248         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10249         (arm_hwbp_control_initialize): Likewise.
10250         (arm_hwbp_control_is_enabled): Likewise.
10251         (arm_hwbp_control_is_initialized): Likewise.
10252         (arm_hwbp_control_disable): Likewise.
10253         (arm_linux_hw_breakpoint_equal): Likewise.
10254         (arm_linux_hw_point_initialize): Likewise.
10255         (struct update_registers_data): New data structure.
10256         (update_registers_callback: New function.
10257         (arm_insert_point): Likewise.
10258         (arm_remove_point): Likewise.
10259         (arm_stopped_by_watchpoint): Likewise.
10260         (arm_stopped_data_address): Likewise.
10261         (arm_new_process): Likewise.
10262         (arm_new_thread): Likewise.
10263         (arm_prepare_to_resume): Likewise.
10264         (the_low_target): Register arm_insert_point, arm_remove_point,
10265         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10266         arm_new_thread, and arm_prepare_to_resume.
10267
10268 2011-09-15  Stan Shebs  <stan@codesourcery.com>
10269
10270         * server.h (struct emit_ops): Add compare-goto fields.
10271         * tracepoint.c (gdb_agent_op_sizes): New table.
10272         (emit_eq_goto): New function.
10273         (emit_ne_goto): New function.
10274         (emit_lt_goto): New function.
10275         (emit_le_goto): New function.
10276         (emit_gt_goto): New function.
10277         (emit_ge_goto): New function.
10278         (is_goto_target): New function.
10279         (compile_bytecodes): Recognize special cases of compare-goto
10280         combinations and call specialized emitters for them.
10281         * linux-x86-low.c (amd64_emit_eq_goto): New function.
10282         (amd64_emit_ne_goto): New function.
10283         (amd64_emit_lt_goto): New function.
10284         (amd64_emit_le_goto): New function.
10285         (amd64_emit_gt_goto): New function.
10286         (amd64_emit_ge_goto): New function.
10287         (amd64_emit_ops): Add the new functions.
10288         (i386_emit_eq_goto): New function.
10289         (i386_emit_ne_goto): New function.
10290         (i386_emit_lt_goto): New function.
10291         (i386_emit_le_goto): New function.
10292         (i386_emit_gt_goto): New function.
10293         (i386_emit_ge_goto): New function.
10294         (i386_emit_ops): Add the new functions.
10295
10296 2011-09-08  Stan Shebs  <stan@codesourcery.com>
10297
10298         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10299         (i386_emit_epilogue): Restore %ebx.
10300
10301 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
10302
10303         * server.c (step_thread): Remove definition.
10304         (process_serial_event): Don't handle Hs.
10305         * server.h (step_thread): Remove declaration.
10306         * target.c (set_desired_inferior): Remove use of step_thread.
10307
10308 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10309
10310         * linux-low.c: Include linux-procfs.h.
10311         (linux_attach_lwp_1): Update comments.
10312         (linux_attach): Scan for existing threads when attaching to a
10313         process that is the tgid.
10314         * Makefile.in: Update dependencies.
10315
10316 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10317
10318         * configure.srv: Add linux-procfs.o dependencies.
10319
10320 2011-08-14  Yao Qi  <yao@codesourcery.com>
10321
10322         * target.h (struct target_ops): Fix indent.
10323         * win32-low.c (win32_target_ops): Fix comment.
10324
10325 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
10326             Yao Qi  <yao@codesourcery.com>
10327
10328         * Makefile.in (clean): Remove tic6x-*.c files.
10329         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10330         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10331         (tic6x-c64xp-linux.c): Likewise.
10332         * configure.srv: Add support for tic6x-*-uclinux.
10333         * linux-tic6x-low.c: New.
10334         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10335
10336 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
10337             Yao Qi  <yao@codesourcery.com>
10338
10339         * target.h (struct target_ops): Add read_loadmap.
10340         * linux-low.c (struct target_loadseg): New type.
10341         (struct target_loadmap): New type.
10342         (linux_read_loadmap): New function.
10343         (linux_target_ops): Add linux_read_loadmap.
10344         * server.c (handle_query): Support qXfer:fdpic:read packet.
10345         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10346         to NULL.
10347
10348 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
10349
10350         * win32-low.c: Include <stdint.h>.
10351
10352 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
10353
10354         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10355         to the inferior here.
10356         (i386_remove_aligned_watchpoint): Ditto.
10357         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10358         fit part of the watchpoint in the debug registers.
10359         (i386_update_inferior_debug_regs): New.
10360         (i386_low_insert_watchpoint): Work on a local mirror of the debug
10361         registers, and only update the inferior on success.
10362         (i386_low_remove_watchpoint): Ditto.
10363
10364 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
10365
10366         * linux-low.c (compare_ints, unique, list_threads, show_process,
10367         linux_core_of_thread): Delete.
10368         (linux_target_ops): Change linux_core_of_thread to
10369         linux_common_core_of_thread.
10370         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10371         * utils.c (malloc_failure): Change type of argument.
10372         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10373         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10374         common/linux-osdata.c, common/ptid.c and common/buffer.c.
10375         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10376         (IPA_OBJS): Add common-utils-ipa.o.
10377         (ptid_h, linux_osdata_h): New macros.
10378         (server_h): Add common/common-utils.h, common/xml-utils.h,
10379         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10380         common/ptid.h.
10381         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10382         ptid.o, buffer.o): New rules.
10383         (linux-low.o): Add common/linux-osdata.h as a dependency.
10384         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10385         * configure.ac: Add AC_HEADER_DIRENT check.
10386         * config.in: Regenerate.
10387         * configure: Regenerate.
10388         * remote-utils.c (xml_escape_text): Delete.
10389         (buffer_grow, buffer_free, buffer_init, buffer_finish,
10390         buffer_xml_printf): Move to common/buffer.c.
10391         * server.c (main): Remove call to initialize_inferiors.
10392         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10393         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10394         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10395         internal_error, gdb_assert, gdb_assert_fail): Delete.
10396         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10397         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10398         common/buffer.h.
10399         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10400         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10401         initialize_inferiors): Delete.
10402
10403 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
10404
10405         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10406         symbol error.
10407
10408 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
10409
10410         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10411         assertion.
10412         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10413
10414 2011-05-26  Yao Qi  <yao@codesourcery.com>
10415
10416         * Makefile.in (thread-db.o): Track dependence to
10417         common/gdb_thread_db.h.
10418         * thread-db.c: include gdb_thread_db.h from right place.
10419
10420 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
10421
10422         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10423         __FILE__ and __LINE__ to internal_error.
10424
10425 2011-05-13  Doug Evans  <dje@google.com>
10426
10427         * thread-db.c (try_thread_db_load_from_sdir): New function.
10428         (try_thread_db_load_from_dir): New function.
10429         (thread_db_load_search): Handle $sdir, ignore $pdir.
10430         Remove trying of system directories if search of
10431         libthread-db-search-path fails, that is now done via $sdir.
10432
10433 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
10434
10435         * server.c (handle_query): Add EnableDisableTracepoints to the list
10436         of supported features.
10437         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10438         tracepoints.
10439         (cmd_qtenable_disable): New.
10440         (cmd_qtstart): Install tracepoints even if disabled.
10441         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10442         receiving a QTEnable or QTDisable packet.
10443         (gdb_collect): Skip data collection if fast tracepoint is disabled.
10444         (ust_marker_to_static_tracepoint): Do not ignore disabled static
10445         tracepoints.
10446         (gdb_probe): Skip data collection if static tracepoint is disabled.
10447
10448 2011-05-10  Doug Evans  <dje@google.com>
10449
10450         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10451
10452 2011-05-04  Doug Evans  <dje@google.com>
10453
10454         * linux-low.c (linux_join): Skip process lookup.
10455         * spu-low.c (spu_join): Ditto.
10456         * server.c (join_inferiors_callback): Delete.
10457         (process_serial_event): For 'D' packet (detach) call join_inferior
10458         directly.
10459
10460 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
10461
10462         * README: Don't mention xscale*-*-linux*.
10463         * configure.srv (xscale*-*-linux*): Don't handle target.
10464
10465 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
10466
10467         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10468         casting pointers.
10469         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10470         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10471         (i386_emit_void_call_2): Likewise.
10472
10473 2011-04-26  Yao Qi  <yao@codesourcery.com>
10474
10475         * linux-low.c: Move common macros to linux-ptrace.h.
10476         Include linux-ptrace.h.
10477         * Makefile.in (linux_ptrace_h): New.
10478         (linux-low.o): Depends on linux-ptrace.h.
10479
10480 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10481
10482         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10483         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
10484         (remote_prepare): New function with most of the TCP code from ...
10485         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
10486         setting transport_is_reliable.
10487         * server.c (run_once): New variable.
10488         (gdbserver_usage): Document it.
10489         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
10490         the first run if RUN_ONCE.
10491         * server.h (run_once, remote_prepare): New declarations.
10492
10493 2011-04-19  Tom Tromey  <tromey@redhat.com>
10494
10495         * win32-low.c (handle_load_dll): Remove duplicate "the".
10496
10497 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
10498
10499         Remove support for old Cygwin 1.5 versions.
10500         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10501         function to avoid warning.
10502         (win32_add_one_solib): Use cygwin_conv_path function to avoid
10503         warning.
10504
10505 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
10506
10507         * gdbserver/server.h (Macro _): Define it if not available.
10508
10509 2011-03-14  Michael Snyder  <msnyder@vmware.com>
10510
10511         * hostio.c (handle_close): Remove unnecessary null test.
10512
10513 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
10514
10515         * Makefile.in (maintainer-clean realclean distclean): Remove
10516         "make ...  subdir_do" command.
10517
10518 2011-03-10  Michael Snyder  <msnyder@vmware.com>
10519
10520         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10521
10522         * server.c (handle_v_run): Free alloced buffer on early return.
10523
10524 2011-03-09  Yao Qi  <yao@codesourcery.com>
10525
10526         Revert:
10527         2011-03-04  Yao Qi  <yao@codesourcery.com>
10528
10529         * Makefile.in: Remove GNU make feature --directory.
10530
10531         2011-03-05  Yao Qi  <yao@codesourcery.com>
10532
10533         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10534         (subdir_do): New make target.  Copied from gdb/Makefile.
10535         (maintainer-clean, realclean, distclean, clean): Call corresponding
10536         make targets in common/Makefile.
10537
10538         2011-02-11  Yao Qi  <yao@codesourcery.com>
10539
10540         * configure.ac: Call AC_PROG_RANLIB.
10541         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
10542         * configure: Regenerate.
10543
10544 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
10545
10546         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10547
10548 2011-03-06  Yao Qi  <yao@codesourcery.com>
10549
10550         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10551
10552 2011-03-05  Yao Qi  <yao@codesourcery.com>
10553
10554         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10555         (subdir_do): New make target.  Copied from gdb/Makefile.
10556         (maintainer-clean, realclean, distclean, clean): Call corresponding
10557         make targets in common/Makefile.
10558
10559 2011-03-04  Yao Qi  <yao@codesourcery.com>
10560
10561         * Makefile.in: Remove GNU make feature --directory.
10562
10563 2011-03-04  Michael Snyder  <msnyder@vmware.com>
10564
10565         * server.c (queue_stop_reply): Call xmalloc not malloc.
10566
10567 2011-03-02  Michael Snyder  <msnyder@vmware.com>
10568
10569         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10570
10571 2011-02-28  Michael Snyder  <msnyder@vmware.com>
10572
10573         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10574         (cmd_qtframe): Ditto.
10575         (cmd_qtbuffer): Ditto.
10576         (cmd_bigqtbuffer): Ditto.
10577
10578         * utils.c (decimal2str): Initialize 'width' to nine, then
10579         don't mess with it.
10580
10581 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10582
10583         * hostio.c (require_data): Free *data, not data.
10584
10585 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
10586
10587         * hostio.c (require_data): Use free, not xfree.
10588
10589 2011-02-27  Michael Snyder  <msnyder@vmware.com>
10590
10591         * server.c (handle_query): Discard unused value.
10592
10593         * hostio.c (require_data): Free malloc memory before returning
10594         error.
10595
10596 2011-02-26  Michael Snyder  <msnyder@vmware.com>
10597
10598         * linux-low.c (list_threads): Call closedir for dirent.
10599
10600 2011-02-27  Michael Snyder  <msnyder@vmware.com>
10601
10602         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10603         a case statement falls through.
10604
10605         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10606
10607         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10608         in comparison.
10609
10610 2011-02-26  Michael Snyder  <msnyder@vmware.com>
10611
10612         * utils.c (decimal2str): Eliminate dead code and dead param.
10613         (pulongest): Drop dead param from call to decimal2str.
10614         (plongest): Ditto.
10615
10616 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
10617
10618         Revert the following patch (not approved yet):
10619         2011-02-21  Hui Zhu  <teawater@gmail.com>
10620         * tracepoint.c (tp_printf): New function.
10621         (eval_agent_expr): Handle gdb_agent_op_printf.
10622
10623 2011-02-21  Hui Zhu  <teawater@gmail.com>
10624
10625         * tracepoint.c (tp_printf): New function.
10626         (eval_agent_expr): Handle gdb_agent_op_printf.
10627
10628 2011-02-18  Tom Tromey  <tromey@redhat.com>
10629
10630         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10631         (tracepoint.o): Likewise.
10632         * tracepoint.c (enum gdb_agent_op): Use ax.def.
10633         (gdb_agent_op_names): Likewise.
10634
10635 2011-02-18  Tom Tromey  <tromey@redhat.com>
10636
10637         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10638         gdb_agent_op_rot>: New constants.
10639         (gdb_agent_op_names): Add pick and roll.
10640         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10641         cases.
10642
10643 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
10644
10645         * aclocal.m4: Regenerated with aclocal-1.11.1.
10646
10647 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
10648
10649         * server.c (handle_qxfer_traceframe_info): New.
10650         (qxfer_packets): Register "traceframe-info".
10651         (handle_query): Report support for qXfer:traceframe-info:read+.
10652         * tracepoint.c (match_blocktype): New.
10653         (traceframe_find_block_type): Rename to ...
10654         (traceframe_walk_blocks): ... this.  Add callback filter argument,
10655         and use it.
10656         (traceframe_find_block_type): New, reimplemented on top of
10657         traceframe_walk_blocks.
10658         (build_traceframe_info_xml): New.
10659         (traceframe_read_info): New.
10660         * server.h (traceframe_read_info): Declare.
10661
10662 2011-02-11  Yao Qi  <yao@codesourcery.com>
10663
10664         * configure.ac: Call AC_PROG_RANLIB.
10665         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
10666         * configure: Regenerate.
10667
10668 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
10669
10670         * server.c (gdb_read_memory): Change return semantics to allow
10671         partial transfers.
10672         (handle_search_memory_1): Adjust.
10673         (process_serial_event) <'m' packet>: Handle partial transfers.
10674         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10675
10676 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
10677
10678         * regcache.c (init_register_cache): Initialize
10679         regcache->register_status.
10680         (free_register_cache): Release regcache->register_status.
10681         (regcache_cpy): Copy register_status.
10682         (registers_to_string): Print 'x's for unavailable registers.
10683         (supply_register): Mark the register's status valid or
10684         unavailable, depending on whether a buffer was passed in or not.
10685         (supply_register_zeroed): New.
10686         (supply_regblock): Mark the registers' status valid or
10687         unavailable, depending on whether a buffer was passed in or not.
10688         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10689         (struct regcache): New `register_status' field.
10690         (supply_register_zeroed): Declare.
10691         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10692         supply_register_zeroed, rather than passing a NULL buffer to
10693         supply_register.
10694         * tracepoint.c (fetch_traceframe_registers): Update comment.
10695
10696 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
10697
10698         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10699         buffer explicit.
10700
10701 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
10702
10703         * server.h (decode_xfer_write): Change prototype.
10704         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10705         and don't extract the annex here.
10706         * server.c (decode_xfer_read): Remove `annex' parameter,
10707         and don't extract the annex here.
10708         (decode_xfer): New.
10709         (struct qxfer): New.
10710         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10711         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10712         (handle_qxfer_statictrace): New functions, abstracted out from
10713         handle_query, and made to use the struct qxfer interface.
10714         (handle_threads_qxfer_proper): Rename to ...
10715         (handle_qxfer_threads_proper): ... this.
10716         (handle_threads_qxfer): Rename to ...
10717         (handle_qxfer_threads): ... this.  Adjust.
10718         (qxfer_packets): New array.
10719         (handle_qxfer): New function.
10720         (handle_query): Use handle_qxfer.
10721
10722 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
10723
10724         * gdbreplay.c: Shorten lines of >= 80 columns.
10725         * linux-low.c: Ditto.
10726         * linux-ppc-low.c: Ditto.
10727         * linux-s390-low.c: Ditto.
10728         * linux-sparc-low.c: Ditto.
10729         * linux-x86-low.c: Ditto.
10730         * linux-xtensa-low.c: Ditto.
10731         * mem-break.c: Ditto.
10732         * nto-low.c: Ditto.
10733         * regcache.h: Ditto.
10734         * remote-utils.c: Ditto.
10735         * server.c: Ditto.
10736         * server.h: Ditto.
10737         * thread-db.c: Ditto.
10738         * tracepoint.c: Ditto.
10739         * utils.c: Ditto.
10740         * win32-low.h: Ditto.
10741
10742 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
10743
10744         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10745         update.
10746
10747 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
10748
10749         * server.c (gdbserver_version): Update copyright year in version
10750         output.
10751         * gdbreplay.c (gdbreplay_version): Ditto.
10752
10753 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
10754
10755         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10756         * linux-bfin-low.c: New file.
10757         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10758         PT_DATA_ADDR for BFIN targets.
10759         * Makefile.in (SFILES): Add linux-bfin-low.c.
10760         (clean): Remove reg-bfin.c.
10761         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10762         * README: Mention supported Blackfin targets.
10763
10764 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
10765
10766         * .gitignore: New file.
10767
10768 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
10769
10770         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10771
10772 2010-10-22  Jie Zhang  <jie@codesourcery.com>
10773
10774         * Makefile.in: Add FLAGS_TO_PASS variable.
10775         (install): Remove dependency of install-only and recursively
10776         invoke make for install-only.
10777
10778 2010-10-04  Doug Evans  <dje@google.com>
10779
10780         * Makefile.in (uninstall): Use $(DESTDIR).
10781
10782 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
10783
10784         PR gdb/11842
10785
10786         * linux-x86-low.c (compat_siginfo_from_siginfo)
10787         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10788         si_code is < 0.  Check for si_code == SI_TIMER before checking for
10789         si_code < 0.
10790
10791 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
10792
10793         * lynx-i386-low.c: New file.
10794         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10795
10796 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
10797
10798         * lynx-low.c (ptrace_request_to_str): Remove handling for
10799         request values that have been removed in LynxOS 5.x.
10800
10801 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
10802
10803         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10804         <ptrace.h>
10805
10806 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
10807
10808         * configure.ac: Add --enable-inprocess-agent option.
10809         * configure: Rebuilt.
10810
10811 2010-09-06  Yao Qi  <yao@codesourcery.com>
10812
10813         * linux-low.c (linux_kill): Remove unused variable.
10814         (linux_stabilize_threads): Likewise.
10815         * server.c (start_inferior): Likewise.
10816         (queue_stop_reply_callback): Likewise.
10817         * tracepoint.c (do_action_at_tracepoint): Likewise.
10818
10819 2010-09-06  Yao Qi  <yao@codesourcery.com>
10820
10821         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10822         on return.
10823
10824 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
10825
10826         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10827
10828 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
10829
10830         * Makefile.in (install-only): Replace $IPA_DEPFILES with
10831         "$(IPA_DEPFILES)".
10832
10833 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10834
10835         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10836         gdbserver/lynx-ppc-low.c: New files.
10837         * Makefile.in (lynx_low_h): New variable.
10838         (lynx-low.o, lynx-ppc-low.o): New rules.
10839         * configure.ac: On LynxOS, link with -lnetinet.
10840         * configure.srv: Add handling of powerpc-*-lynxos* targets.
10841         * configure: regenerate.
10842
10843 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10844
10845         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10846         * configure.ac: Add check for vasprintf and vsnprintf.
10847         * configure, config.in: Regenerate.
10848         * server.h (vasprintf, vsnprintf): Add conditional declarations.
10849
10850 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10851
10852         * gdbreplay.c: Move include of alloca.h up, next to include of
10853         malloc.h.
10854         * server.h: Add include of malloc.h.
10855         * mem-break.c: Remove include of malloc.h.
10856         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10857
10858 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10859
10860         * Makefile.in (memmem.o): Build with -Wno-error.
10861
10862 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10863
10864         * utils.c (xsnprintf): Make non-static.
10865         * server.h: Add xsnprintf declaration.
10866         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10867         replace calls to snprintf by calls to xsnprintf throughout.
10868
10869 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
10870
10871         * configure.ac: Add configure check for alloca.
10872         * configure, config.in: Regenerate.
10873         * server.h: Include alloca.h if it exists.
10874         * gdbreplay.c: Include alloca.h if it exists.
10875
10876 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
10877
10878         * linux-low.c (__SIGRTMIN): Define if not already defined.
10879         (linux_create_inferior): Check for __ANDROID__ rather than
10880         __SIGRTMIN.
10881         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10882         are already deferred.
10883         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10884         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10885         stopped and already has a pending signal to report.
10886         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10887         a pending signal to report or is moving out of a jump pad.
10888         (linux_init_signals): Check for __ANDROID__ rather than
10889         __SIGRTMIN.
10890
10891 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
10892
10893         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10894         debug_threads check.  Avoid a linear search when not doing debug
10895         output.
10896
10897 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
10898
10899         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10900         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10901         (struct file_handler) <fd>: Change type to gdb_fildes_t.
10902         (process_event): Change local fd's type to gdb_fildes_t.
10903         (create_file_handler): Adjust prototype.
10904         (delete_file_handler): Adjust prototype.
10905         (handle_file_event): Adjust prototype.  Use pfildes.
10906         (create_file_event): Adjsut prototype.
10907         * remote-utils.c (remote_desc, listen_desc): Change type to
10908         gdb_fildes_t.
10909         * server.h: New gdb_fildes_t typedef.
10910         [USE_WIN32API]: Include winsock2.h.
10911         (delete_file_handler, add_file_handler): Adjust prototypes.
10912         (pfildes): Declare.
10913         * utils.c (pfildes): New.
10914
10915 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
10916
10917         * configure.ac (build_warnings): Add -Wno-char-subscripts.
10918         * configure: Regenerate.
10919
10920 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
10921
10922         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10923         (linux_done_accessing_memory): ... this.
10924         (linux_target_ops): Adjust.
10925         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10926         * nto-low.c (nto_target_ops): Adjust comment.
10927         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10928         * spu-low.c (spu_target_ops): Adjust comment.
10929         * target.h (target_ops): Rename unprepare_to_access_memory field
10930         to done_accessing_memory.
10931         (unprepare_to_access_memory): Rename to ...
10932         (done_accessing_memory): ... this.
10933
10934 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
10935
10936         * linux-low.c (linux_prepare_to_access_memory): New.
10937         (linux_unprepare_to_access_memory): New.
10938         (linux_target_ops): Install them.
10939         * server.c (read_memory): Rename to ...
10940         (gdb_read_memory): ... this.  Use
10941         prepare_to_access_memory/prepare_to_access_memory.
10942         (write_memory): Rename to ...
10943         (gdb_write_memory): ... this.  Use
10944         prepare_to_access_memory/prepare_to_access_memory.
10945         (handle_search_memory_1): Adjust.
10946         (process_serial_event): Adjust.
10947         * target.h (struct target_ops): New fields
10948         prepare_to_access_memory and unprepare_to_access_memory.
10949         (prepare_to_access_memory, unprepare_to_access_memory): New.
10950         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10951         prepare_to_access_memory/prepare_to_access_memory.
10952         * nto-low.c (nto_target_ops): Adjust.
10953         * spu-low.c (spu_target_ops): Adjust.
10954         * win32-low.c (win32_target_ops): Adjust.
10955
10956 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
10957
10958         * Makefile.in (WARN_CFLAGS): Get it from configure.
10959         (WERROR_CFLAGS): New.
10960         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10961         * configure.ac: Introduce --enable-werror, which adds -Werror to
10962         the compiler command line.  Enabled by default.  Disable with
10963         --disable-werror.  Add -Wdeclaration-after-statement
10964         Wpointer-arith and -Wformat-nonliteral to warning flags.
10965         * configure: Regenerate.
10966
10967 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
10968
10969         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10970
10971 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
10972
10973         * gdbreplay.c (remote_error): New.
10974         (gdbchar): New.
10975         (expect): Use gdbchar.  Check for error reading from GDB.
10976         Clarify sync error output.
10977         (play): Check for errors writing to GDB.
10978         * linux-low.c (sigchld_handler): Really ignore `write' errors.
10979         * remote-utils.c (getpkt): Check for errors writing to the remote
10980         descriptor.
10981
10982 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
10983
10984         * linux-low.c (linux_wait_1): Move non-debugging code out of
10985         `debug_threads' control.
10986
10987 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
10988
10989         * linux-low.c (linux_wait_1): Don't set last_status here.
10990         * server.c (push_event, queue_stop_reply_callback): Assert we're
10991         not pushing a TARGET_WAITKIND_IGNORE event.
10992         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10993         (myresume, handle_target_event): Set the thread's last_resume_kind
10994         and last_status from the target returned status.
10995
10996 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
10997
10998         PR threads/10729
10999
11000         * linux-x86-low.c (update_debug_registers_callback): New.
11001         (i386_dr_low_set_addr): Use it.
11002         (i386_dr_low_get_addr): New.
11003         (i386_dr_low_set_control): Use update_debug_registers_callback.
11004         (i386_dr_low_get_control): New.
11005         (i386_dr_low_get_status): Adjust.
11006         * linux-low.c (linux_stop_lwp): New.
11007         * linux-low.h (linux_stop_lwp): Declare.
11008
11009         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11010         argument instead of a i386_debug_reg_state.
11011         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11012         a i386_debug_reg_state.
11013         (i386_insert_aligned_watchpoint): Adjust.
11014         (i386_remove_aligned_watchpoint): Adjust.
11015         (i386_low_stopped_data_address): Read the debug registers from the
11016         inferior instead of from the mirrors.
11017         * i386-low.h (struct i386_debug_reg_state): Extend comment.
11018         (i386_dr_low_get_addr): Declare.
11019         (i386_dr_low_get_control): Declare.
11020         (i386_dr_low_get_status): Change prototype.
11021
11022         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11023         (i386_dr_low_get_addr): New.
11024         (i386_dr_low_get_control): New.
11025         (i386_dr_low_get_status): Adjust prototype.  Return
11026         dr_status_mirror.
11027         (i386_initial_stuff): Clear dr_status_mirror and
11028         dr_control_mirror.
11029         (i386_get_thread_context): Adjust.
11030         (i386_set_thread_context): Adjust.
11031         (i386_thread_added): Adjust.
11032
11033 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
11034
11035         * linux-low.h (linux_thread_area): Delete declaration.
11036
11037 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
11038
11039         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11040         after its termination.
11041
11042 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
11043
11044         * linux-low.c (gdb_wants_lwp_stopped): Delete.
11045         (gdb_wants_all_stopped): Delete.
11046         (linux_wait_1): Don't call them.
11047         * server.c (handle_v_cont): Tag all threads as want-stopped.
11048         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
11049         stopped as "client-wants-stopped".
11050
11051 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
11052
11053         * Makefile.in (signals_h): New.
11054         (server_h): Depend on it.
11055         (server.o): Don't depend on $(signals_def).
11056         (signals.o): Depend on $(signals_def).
11057
11058 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
11059
11060         * Makefile.in (signals_def): New.
11061         (server_h): Append include/gdb/signals.h and signals_def.
11062         (server.o): Append signals_def.
11063
11064 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
11065
11066         * server.c (handle_target_event): Use target_signal_to_host for
11067         resume_info.sig initialization.
11068         * target.h (struct thread_resume) <sig>: New comment.
11069
11070 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
11071
11072         * server.c (handle_query): strcpy() the returned string from paddress()
11073         instead of sprintf().
11074         * utils.c (paddress): Return phex_nz().
11075
11076 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
11077
11078         * server.c (handle_v_cont): Call mourn_inferior if process
11079         just exited.
11080         (myresume): Likewise.
11081
11082 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
11083
11084         Static tracepoints, and integration with UST.
11085
11086         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
11087         * mem-break.c (uninsert_all_breakpoints)
11088         (reinsert_all_breakpoints): New.
11089         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11090         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11091         (gdb_agent_ust_loaded, helper_thread_id)
11092         (gdb_agent_helper_thread_id): New macros.
11093         (struct ipa_sym_addresses): Add addr_ust_loaded,
11094         addr_helper_thread_id, addr_cmd_buf.
11095         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11096         (in_process_agent_loaded_ust): New.
11097         (write_e_ust_not_loaded): New.
11098         (maybe_write_ipa_ust_not_loaded): New.
11099         (struct collect_static_trace_data_action): New.
11100         (enum tracepoint_type) <static_tracepoint>: New.
11101         (struct tracepoint) <handle>: Mention static tracepoints.
11102         (struct static_tracepoint_ctx): New.
11103         (CMD_BUF_SIZE): New.
11104         (add_tracepoint_action): Handle static tracepoint actions.
11105         (unprobe_marker_at): New.
11106         (clear_installed_tracepoints): Handle static tracepoints.
11107         (cmd_qtdp): Handle static tracepoints.
11108         (probe_marker_at): New.
11109         (cmd_qtstart): Handle static tracepoints.
11110         (response_tracepoint): Handle static tracepoints.
11111         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11112         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11113         (get_context_regcache): Handle static tracepoints.
11114         (do_action_at_tracepoint): Handle static tracepoint actions.
11115         (traceframe_find_block_type): Handle static trace data blocks.
11116         (traceframe_read_sdata): New.
11117         (download_tracepoints): Download static tracepoint actions.
11118         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11119         (GDB_PROBE_NAME): New.
11120         (ust_ops): New.
11121         (GET_UST_SYM): New.
11122         (USTF): New.
11123         (dlsym_ust): New.
11124         (ust_marker_to_static_tracepoint): New.
11125         (gdb_probe): New.
11126         (collect_ust_data_at_tracepoint): New.
11127         (gdb_ust_probe): New.
11128         (UNIX_PATH_MAX, SOCK_DIR): New.
11129         (gdb_ust_connect_sync_socket): New.
11130         (resume_thread, stop_thread): New.
11131         (run_inferior_command): New.
11132         (init_named_socket): New.
11133         (gdb_ust_socket_init): New.
11134         (cstr_to_hexstr): New.
11135         (next_st): New.
11136         (first_marker, next_marker): New.
11137         (response_ust_marker): New.
11138         (cmd_qtfstm, cmd_qtsstm): New.
11139         (unprobe_marker_at, probe_marker_at): New.
11140         (cmd_qtstmat, gdb_ust_thread): New.
11141         (gdb_ust_init): New.
11142         (initialize_tracepoint_ftlib): Call gdb_ust_init.
11143         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11144         (ST_REGENTRY): New.
11145         (x86_64_st_collect_regmap): New.
11146         (X86_64_NUM_ST_COLLECT_GREGS): New.
11147         (AMD64_RIP_REGNUM): New.
11148         (supply_static_tracepoint_registers): New.
11149         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11150         (ST_REGENTRY): New.
11151         (i386_st_collect_regmap): New.
11152         (i386_NUM_ST_COLLECT_GREGS): New.
11153         (supply_static_tracepoint_registers): New.
11154         * server.c (handle_query): Handle qXfer:statictrace:read.
11155         <qSupported>: Report support for StaticTracepoints, and
11156         qXfer:statictrace:read features.
11157         * server.h (traceframe_read_sdata)
11158         (supply_static_tracepoint_registers): Declare.
11159         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11160         (unpack_varlen_hex): Include in IPA build.
11161         * Makefile.in (ustlibs, ustinc): New.
11162         (IPA_OBJS): Add remote-utils-ipa.o.
11163         ($(IPA_LIB)): Link -ldl and -lpthread.
11164         (UST_CFLAGS): New.
11165         (IPAGENT_CFLAGS): Add UST_CFLAGS.
11166         * config.in, configure: Regenerate.
11167
11168 2010-06-20  Ian Lance Taylor  <iant@google.com>
11169             Pedro Alves  <pedro@codesourcery.com>
11170
11171         * linux-x86-low.c (always_true): Delete.
11172         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11173         trying to fool the compiler with always_true.
11174
11175 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
11176
11177         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11178         conditions in gdbserver.
11179
11180 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
11181
11182         * spu-low.c (spu_read_memory): Wrap around local store limit.
11183         (spu_write_memory): Likewise.
11184
11185 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
11186
11187         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11188         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11189         LONGEST uses.
11190         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11191         uses.
11192         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11193         uses with LONGEST uses.
11194
11195 2010-06-14  Stan Shebs  <stan@codesourcery.com>
11196             Pedro Alves  <pedro@codesourcery.com>
11197
11198         Bytecode compiler.
11199
11200         * linux-x86-low.c: Include limits.h.
11201         (add_insns): New.
11202         (always_true): New.
11203         (EMIT_ASM): New.
11204         (EMIT_ASM32): New.
11205         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11206         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11207         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11208         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11209         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11210         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11211         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11212         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11213         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11214         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11215         (amd64_emit_void_call_2): New.
11216         (amd64_emit_ops): New.
11217         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11218         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11219         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11220         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11221         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11222         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11223         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11224         (i386_emit_call, i386_emit_reg, i386_emit_pop)
11225         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11226         (i386_emit_stack_adjust, i386_emit_int_call_1)
11227         (i386_emit_void_call_2): New.
11228         (i386_emit_ops): New.
11229         (x86_emit_ops): New.
11230         (the_low_target): Install x86_emit_ops.
11231         * server.h (struct emit_ops): New.
11232         (get_raw_reg_func_addr): Declare.
11233         (current_insn_ptr, emit_error): Declare.
11234         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11235         (set_trace_state_variable_value): New defines.
11236         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11237         addr_get_trace_state_variable_value and
11238         addr_set_trace_state_variable_value.
11239         (symbol_list): New fields for get_raw_reg,
11240         get_trace_state_variable_value and set_trace_state_variable_value.
11241         (condfn): New typedef.
11242         (struct tracepoint): New field `compiled_cond'.
11243         (do_action_at_tracepoint): Clear compiled_cond.
11244         (get_trace_state_variable_value, set_trace_state_variable_value):
11245         Export in the IPA.
11246         (condition_true_at_tracepoint): If there's a compiled condition,
11247         run that.
11248         (current_insn_ptr, emit_error): New globals.
11249         (struct bytecode_address): New.
11250         (get_raw_reg_func_addr): New.
11251         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11252         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11253         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11254         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11255         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11256         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11257         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11258         (compile_tracepoint_condition, compile_bytecodes): New.
11259         * target.h (emit_ops): Forward declare.
11260         (struct target_ops): New field emit_ops.
11261         (target_emit_ops): New.
11262         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11263         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11264         * linux-low.c (linux_emit_ops): New.
11265         (linux_target_ops): Install it.
11266         * linux-low.h (struct linux_target_ops): New field emit_ops.
11267
11268 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
11269
11270         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11271         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11272
11273 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
11274             Stan Shebs  <stan@codesourcery.com>
11275
11276         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11277         (all): Depend on $(extra_libraries).
11278         (install-only): Install the IPA.
11279         (IPA_OBJS, IPA_LIB): New.
11280         (clean): Remove the IPA lib.
11281         (IPAGENT_CFLAGS): New.
11282         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11283         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11284         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11285         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11286         * configure.ac: Check for atomic builtins support in the compiler.
11287         (IPA_DEPFILES, extra_libraries): Define.
11288         * configure.srv (ipa_obj): Add description.
11289         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11290         (i[34567]86-*-linux*): Set ipa_obj.
11291         (x86_64-*-linux*): Set ipa_obj.
11292         * linux-low.c (stabilizing_threads): New.
11293         (supports_fast_tracepoints): New.
11294         (linux_detach): Stabilize threads before detaching.
11295         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
11296         the lwp is either not stabilizing, or is moving out of a jump pad.
11297         (linux_fast_tracepoint_collecting): New.
11298         (maybe_move_out_of_jump_pad): New.
11299         (enqueue_one_deferred_signal): New.
11300         (dequeue_one_deferred_signal): New.
11301         (linux_wait_for_event_1): If moving out of a jump pad, defer
11302         pending signals to later.
11303         (linux_stabilize_threads): New.
11304         (linux_wait_1): Check if threads need moving out of jump pads, and
11305         do it if so.
11306         (stuck_in_jump_pad_callback): New.
11307         (move_out_of_jump_pad_callback): New.
11308         (lwp_running): New.
11309         (linux_resume_one_lwp): Handle moving out of jump pads.
11310         (linux_set_resume_request): Dequeue deferred signals.
11311         (need_step_over_p): Also step over fast tracepoint jumps.
11312         (start_step_over): Also uninsert fast tracepoint jumps.
11313         (finish_step_over): Also reinsert fast tracepoint jumps.
11314         (linux_install_fast_tracepoint_jump): New.
11315         (linux_target_ops): Install linux_stabilize_threads and
11316         linux_install_fast_tracepoint_jump_pad.
11317         * linux-low.h (linux_target_ops) <get_thread_area,
11318         install_fast_tracepoint_jump_pad>: New fields.
11319         (struct lwp_info) <collecting_fast_tracepoint,
11320         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11321         (linux_get_thread_area): Declare.
11322         * linux-x86-low.c (jump_insn): New.
11323         (x86_get_thread_area): New.
11324         (append_insns): New.
11325         (push_opcode): New.
11326         (amd64_install_fast_tracepoint_jump_pad): New.
11327         (i386_install_fast_tracepoint_jump_pad): New.
11328         (x86_install_fast_tracepoint_jump_pad): New.
11329         (the_low_target): Install x86_get_thread_area and
11330         x86_install_fast_tracepoint_jump_pad.
11331         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11332         (struct fast_tracepoint_jump): New.
11333         (fast_tracepoint_jump_insn): New.
11334         (fast_tracepoint_jump_shadow): New.
11335         (find_fast_tracepoint_jump_at): New.
11336         (fast_tracepoint_jump_here): New.
11337         (delete_fast_tracepoint_jump): New.
11338         (set_fast_tracepoint_jump): New.
11339         (uninsert_fast_tracepoint_jumps_at): New.
11340         (reinsert_fast_tracepoint_jumps_at): New.
11341         (set_breakpoint_at): Use write_inferior_memory.
11342         (uninsert_raw_breakpoint): Use write_inferior_memory.
11343         (check_mem_read): Mask out fast tracepoint jumps.
11344         (check_mem_write): Mask out fast tracepoint jumps.
11345         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11346         (set_fast_tracepoint_jump): Declare.
11347         (delete_fast_tracepoint_jump)
11348         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11349         (reinsert_fast_tracepoint_jumps_at): Declare.
11350         * regcache.c: Don't compile many functions when building the
11351         in-process agent library.
11352         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11353         the register buffer in the heap.
11354         (free_register_cache): If the register buffer isn't owned by the
11355         regcache, don't free it.
11356         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11357         pre-existing register caches.
11358         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11359         type.
11360         (convert_ascii_to_int): : Constify `from' parameter type.
11361         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11362         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
11363         the needed buffer in-place.
11364         (relocate_instruction): New.
11365         * server.c (handle_query) <qSymbols>: If the target supports
11366         tracepoints, give it a chance of looking up symbols.  Report
11367         support for fast tracepoints.
11368         (handle_status): Stabilize threads.
11369         (process_serial_event): Adjust.
11370         * server.h (struct fast_tracepoint_jump): Forward declare.
11371         (struct process_info) <fast_tracepoint_jumps>: New field.
11372         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11373         (decode_X_packet, decode_M_packet): Adjust.
11374         (relocate_instruction): Declare.
11375         (in_process_agent_loaded): Declare.
11376         (tracepoint_look_up_symbols): Declare.
11377         (struct fast_tpoint_collect_status): Declare.
11378         (fast_tracepoint_collecting): Declare.
11379         (force_unlock_trace_buffer): Declare.
11380         (handle_tracepoint_bkpts): Declare.
11381         (initialize_low_tracepoint)
11382         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11383         * target.h (struct target_ops) <stabilize_threads,
11384         install_fast_tracepoint_jump_pad>: New fields.
11385         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11386         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11387         [HAVE_STDINT_H]: Include stdint.h.
11388         (trace_debug_1): Rename to ...
11389         (trace_vdebug): ... this.
11390         (trace_debug): Rename to ...
11391         (trace_debug_1): ... this.  Add `level' parameter.
11392         (trace_debug): New.
11393         (ATTR_USED, ATTR_NOINLINE): New.
11394         (IP_AGENT_EXPORT): New.
11395         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11396         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11397         (about_to_request_buffer_space, trace_buffer_is_full)
11398         (stopping_tracepoint, expr_eval_result, error_tracepoint)
11399         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11400         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11401         (traceframe_write_count, traceframes_created)
11402         (trace_state_variables)
11403         New renaming defines.
11404         (struct ipa_sym_addresses): New.
11405         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11406         (symbol_list): New.
11407         (ipa_sym_addrs): New.
11408         (all_tracepoint_symbols_looked_up): New.
11409         (in_process_agent_loaded): New.
11410         (write_e_ipa_not_loaded): New.
11411         (maybe_write_ipa_not_loaded): New.
11412         (tracepoint_look_up_symbols): New.
11413         (debug_threads) [IN_PROCESS_AGENT]: New.
11414         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11415         (UNKNOWN_SIDE_EFFECTS): New.
11416         (stop_tracing): New.
11417         (flush_trace_buffer): New.
11418         (stop_tracing_bkpt): New.
11419         (flush_trace_buffer_bkpt): New.
11420         (read_inferior_integer): New.
11421         (read_inferior_uinteger): New.
11422         (read_inferior_data_pointer): New.
11423         (write_inferior_data_pointer): New.
11424         (write_inferior_integer): New.
11425         (write_inferior_uinteger): New.
11426         (struct collect_static_trace_data_action): Delete.
11427         (enum tracepoint_type): New.
11428         (struct tracepoint) <type>: New field `type'.
11429         <actions_str, step_actions, step_actions_str>: Only include in
11430         GDBserver.
11431         <orig_size, obj_addr_on_target, adjusted_insn_addr>
11432         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11433         (tracepoints): Use IP_AGENT_EXPORT.
11434         (last_tracepoint): Don't include in the IPA.
11435         (stopping_tracepoint): Use IP_AGENT_EXPORT.
11436         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11437         (alloced_trace_state_variables): New.
11438         (trace_state_variables): Use IP_AGENT_EXPORT.
11439         (traceframe_t): Delete unused variable.
11440         (circular_trace_buffer): Don't include in the IPA.
11441         (trace_buffer_start): Delete.
11442         (struct trace_buffer_control): New.
11443         (trace_buffer_free): Delete.
11444         (struct ipa_trace_buffer_control): New.
11445         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11446         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11447         New.
11448         (trace_buffer_ctrl): New.
11449         (TRACE_BUFFER_CTRL_CURR): New.
11450         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11451         Reimplement as macros.
11452         (trace_buffer_wrap): Delete.
11453         (traceframe_write_count, traceframe_read_count)
11454         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11455         (struct tracepoint_hit_ctx) <type>: New field.
11456         (struct fast_tracepoint_ctx): New.
11457         (memory_barrier): New.
11458         (cmpxchg): New.
11459         (record_tracepoint_error): Update atomically in the IPA.
11460         (clear_inferior_trace_buffer): New.
11461         (about_to_request_buffer_space): New.
11462         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11463         updating the same buffer.
11464         (add_tracepoint): Default the tracepoint's type to trap
11465         tracepoint, and orig_size to -1.
11466         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11467         internal variables.
11468         (create_trace_state_variable): New parameter `gdb'.  Handle it.
11469         (clear_installed_tracepoints): Clear fast tracepoint jumps.
11470         (cmd_qtdp): Handle fast tracepoints.
11471         (cmd_qtdv): Adjust.
11472         (max_jump_pad_size): New.
11473         (gdb_jump_pad_head): New.
11474         (get_jump_space_head): New.
11475         (claim_jump_space): New.
11476         (sort_tracepoints): New.
11477         (MAX_JUMP_SIZE): New.
11478         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
11479         IPA.
11480         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11481         support.  Upload fast traceframes, and delete internal IPA
11482         breakpoints.
11483         (stop_tracing_handler): New.
11484         (flush_trace_buffer_handler): New.
11485         (cmd_qtstop): Upload fast tracepoints.
11486         (response_tracepoint): Handle fast tracepoints.
11487         (tracepoint_finished_step): Upload fast traceframes.  Set the
11488         tracepoint hit context's tracepoint type.
11489         (handle_tracepoint_bkpts): New.
11490         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11491         type.  Add comment about fast tracepoints.
11492         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11493         non-existing action_str field.
11494         (get_context_regcache): Handle fast tracepoints.
11495         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11496         to the regcache.
11497         (fast_tracepoint_from_jump_pad_address): New.
11498         (fast_tracepoint_from_ipa_tpoint_address): New.
11499         (collecting_t): New.
11500         (force_unlock_trace_buffer): New.
11501         (fast_tracepoint_collecting): New.
11502         (collecting): New.
11503         (gdb_collect): New.
11504         (write_inferior_data_ptr): New.
11505         (target_tp_heap): New.
11506         (target_malloc): New.
11507         (download_agent_expr): New.
11508         (UALIGN): New.
11509         (download_tracepoints): New.
11510         (download_trace_state_variables): New.
11511         (upload_fast_traceframes): New.
11512         (IPA_FIRST_TRACEFRAME): New.
11513         (IPA_NEXT_TRACEFRAME_1): New.
11514         (IPA_NEXT_TRACEFRAME): New.
11515         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11516         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11517         (gdb_jump_pad_buffer_end): New.
11518         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11519         (initialize_tracepoint): Adjust.
11520         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11521         buffer.  Initialize the low module.
11522         * utils.c (PREFIX, TOOLNAME): New.
11523         (malloc_failure): Use PREFIX.
11524         (error): In the IPA, an error causes an exit.
11525         (fatal, warning): Use PREFIX.
11526         (internal_error): Use TOOLNAME.
11527         (NUMCELLS): Increase to 10.
11528         * configure, config.in: Regenerate.
11529
11530 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
11531
11532         * server.c (handle_query) <qSupported>: Do two passes over the
11533         qSupported string to avoid nesting strtok.
11534
11535 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11536
11537         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11538         (CDEPS): New.
11539         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
11540         -Wl,--dynamic-list.
11541         * configure: Regenerate.
11542         * proc-service.list: New.
11543
11544 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11545
11546         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11547         New comment.
11548
11549 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
11550
11551         * gdbreplay.c (remote_open): Check error return from socket() call by
11552         its equality to -1 not by it being negative.
11553         * remote-utils.c (remote_open): Likewise.
11554
11555 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
11556
11557         * config.h: Regenerate.
11558
11559 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
11560
11561         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11562         doesn't provide PTRACE_GET_THREAD_AREA.
11563
11564 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
11565
11566         * linux-m68k-low.c: Include <asm/ptrace.h>
11567         (ps_get_thread_area): Implement.
11568
11569 2010-05-03  Doug Evans  <dje@google.com>
11570
11571         * event-loop.c (struct callback_event): New struct.
11572         (callback_list): New global.
11573         (append_callback_event, delete_callback_event): New functions.
11574         (process_callback): New function.
11575         (start_event_loop): Call it.
11576         * remote-utils.c (NOT_SCHEDULED): Define.
11577         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11578         moved out of readchar.
11579         (readchar): Rewrite.  Call reschedule before returning.
11580         (reset_readchar): New function.
11581         (remote_close): Call it.
11582         (process_remaining, reschedule): New functions.
11583         * server.h (callback_handler_func): New typedef.
11584         (append_callback_event, delete_callback_event): Declare.
11585
11586 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
11587
11588         * proc-service.c (ps_pglobal_lookup): Use
11589         thread_db_look_up_one_symbol.
11590         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11591         parameter.  Use it instead of all_symbols_looked_up.
11592         * server.h (struct process_info) <all_symbols_looked_up>: Delete
11593         field.
11594         (all_symbols_looked_up): Don't declare.
11595         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11596         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11597         field.
11598         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11599         Set all_symbols_looked_up here.
11600         (thread_db_look_up_one_symbol): New.
11601         (thread_db_get_tls_address): Adjust.
11602         (thread_db_load_search, try_thread_db_load_1): Always allocate the
11603         thread_db object on the heap, and tentatively set it in the
11604         process structure.
11605         (thread_db_init): Don't set all_symbols_looked_up here.
11606         * linux-low.h (thread_db_look_up_one_symbol): Declare.
11607
11608 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
11609
11610         * linux-low.c (linux_kill, linux_detach): Adjust.
11611         (status_pending_p_callback): Remove redundant statement.  Check
11612         for !TARGET_WAITIKIND_IGNORE, instead of
11613         TARGET_WAITKIND_STOPPED.
11614         (handle_tracepoints): Make sure LWP is locked.  Adjust.
11615         (linux_wait_for_event_1): Adjust.
11616         (linux_cancel_breakpoints): New.
11617         (unsuspend_one_lwp): New.
11618         (unsuspend_all_lwps): New.
11619         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11620         (send_sigstop_callback): Change return type to int, add new
11621         `except' parameter and handle it.
11622         (suspend_and_send_sigstop_callback): New.
11623         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11624         pass them down.  If SUSPEND, also increment the lwp's suspend
11625         count.
11626         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11627         (need_step_over_p): Don't consider suspended LWPs.
11628         (start_step_over): Adjust.
11629         (proceed_one_lwp): Change return type to int, add new `except'
11630         parameter and handle it.
11631         (unsuspend_and_proceed_one_lwp): New.
11632         (proceed_all_lwps): Use find_inferior instead of
11633         for_each_inferior.
11634         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
11635         also decrement the suspend count of LWPs.  Pass `except' down,
11636         instead of hacking its suspend count.
11637         (linux_pause_all): Add `freeze' parameter.  Adjust.
11638         (linux_unpause_all): New.
11639         (linux_target_ops): Install linux_unpause_all.
11640         * server.c (handle_status): Adjust.
11641         * target.h (struct target_ops): New fields `unpause_all' and
11642         `cancel_breakpoints'.  Add new parameter to `pause_all'.
11643         (pause_all): Add new `freeze' parameter.
11644         (unpause_all): New.
11645         (cancel_breakpoints): New.
11646         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11647         cancel breakpoints.
11648         (cmd_qtstart): Pause threads.
11649         (stop_tracing): Pause threads, and cancel breakpoints.
11650         * win32-low.c (win32_target_ops): Adjust.
11651
11652 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
11653
11654         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11655         the inferior right away from here...
11656         (linux_wait_1): ... to here, and adjust to check the thread's
11657         last_resume_kind instead of the lwp's step or stop_expected flags.
11658
11659 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
11660
11661         * README: Use consistent `GDB' and `GDBserver' spellings.
11662
11663 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
11664
11665         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11666         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
11667         (linux_detach_one_lwp): Assume the lwp is stopped.
11668         (any_thread_of): Delete.
11669         (linux_detach): Stop all lwps here.  Don't blindly delete all
11670         breakpoints.
11671         (delete_lwp_callback): New.
11672         (linux_mourn): Delete all lwps of the process that is gone.
11673         (linux_wait_1): Don't delete the last lwp of the process here.
11674         * mem-break.h (mark_breakpoints_out): Declare.
11675         * mem-break.c (mark_breakpoints_out): New.
11676         (free_all_breakpoints): Use it.
11677         * server.c (handle_target_event): If the process is gone, mark
11678         breakpoints out.
11679         * thread-db.c (struct thread_db) <create_bp>: New field.
11680         (thread_db_enable_reporting): Fix prototype.  Store a thread event
11681         breakpoint reference in the thread_db struct.
11682         (thread_db_load_search): Clear the thread_db object.
11683         (try_thread_db_load_1): Ditto.
11684         (switch_to_process): New.
11685         (disable_thread_event_reporting): Use it.
11686         (remove_thread_event_breakpoints): New.
11687         (thread_db_detach, thread_db_mourn): Use it.
11688
11689 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
11690
11691         * linux-low.c (linux_enable_event_reporting): New.
11692         (linux_wait_for_event_1, handle_extended_wait): Use it.
11693
11694 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
11695
11696         * linux-low.c (linux_kill_one_lwp, linux_kill)
11697         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11698         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
11699         SIGSTOP even if the LWP is stopped.
11700         (send_sigstop_callback): New.
11701         (stop_all_lwps): Use send_sigstop_callback instead.
11702         (linux_resume_one_thread): Adjust.
11703         (proceed_one_lwp): Still proceed an LWP that the client has
11704         requested to stop, if we haven't reported it as stopped yet.  Make
11705         sure that LWPs the client want stopped, have a pending SIGSTOP.
11706
11707 2010-04-26  Doug Evans  <dje@google.com>
11708
11709         * server.c (handle_general_set): Make static.
11710
11711         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11712         Print received char after testing for error/eof instead of before.
11713         (input_interrupt): Tweak comment.
11714
11715 2010-04-23  Doug Evans  <dje@google.com>
11716
11717         * server.c (start_inferior): Print inferior argv if --debug.
11718
11719 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
11720
11721         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11722         * nto-x86-low.c: Include server.h
11723
11724 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
11725
11726         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11727         be consistent with other sources of this directory.
11728         (init_registers_amd64): Correct name of source file of this function
11729         in the comment.
11730
11731 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11732
11733         * configure.srv (x86_64-*-mingw*): New configuration for Windows
11734         64-bit executables.
11735
11736 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11737
11738         * win32-i386-low.c: Add 64-bit support.
11739         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11740         (init_registers_amd64): Declare.
11741         (mappings): Add 64-bit version of array.
11742         (init_windows_x86): New function.
11743         (the_low_target): Change init_arch field to init_windows_x86.
11744
11745 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11746
11747         * win32-low.c: Adapt to support also 64-bit architecture.
11748         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11749         (get_image_name): Use SIZE_T type for local variable `done'.
11750         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11751         (toolhelp_get_dll_name): Idem.
11752         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11753         Use uintptr_t typecast to avoid warning.
11754         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11755         (handle_exception): Use phex_nz to avoid warning.
11756         (win32_wait): Remove unused local variable `process'.
11757
11758 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11759
11760         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11761         `amd64-avx.o'.
11762
11763 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
11764
11765         * configure.ac: Use `ws2_32' library for srv_mingw.
11766         * configure: Regenerate.
11767         * gdbreplay.c: Include winsock2.h instead of winsock.h.
11768         * remote-utils.c: Likewise.
11769
11770 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
11771
11772         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11773         if __x86_64__ is defined.
11774
11775 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
11776
11777         * configure: Regenerate.
11778
11779 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
11780
11781         * server.c (handle_query): Handle 'qGetTIBAddr' query.
11782         * target.h (target_ops): New get_tib_address field.
11783         * win32-low.h (win32_thread_info): Add thread_local_base field.
11784         * win32-low.c (child_add_thread): Add tlb argument.
11785         Set thread_local_base field to TLB.
11786         (get_child_debug_event): Adapt to child_add_thread change.
11787         (win32_get_tib_address): New function.
11788         (win32_target_ops): Set get_tib_address field to
11789         win32_get_tib_address.
11790         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11791
11792 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
11793
11794         * linux-low.c (linux_mourn): Also remove the process.
11795         * server.c (handle_target_event): Don't remove the process here.
11796         * nto-low.c (nto_mourn): New.
11797         (nto_target_ops): Install it.
11798         * spu-low.c (spu_mourn): New.
11799         (spu_target_ops): Install it.
11800         * win32-low.c (win32_mourn): New.
11801         (win32_target_ops): Install it.
11802
11803 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
11804
11805         * server.h (buffer_xml_printf): Remove redundant `;'.
11806
11807 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
11808
11809         * regcache.c (set_register_cache): Invalidate regcaches before
11810         changing the register cache layout.
11811         (regcache_invalidate_one): Allow a NULL regcache.
11812         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11813         regcaches before changing the register cache layout or the target
11814         regsets.
11815
11816 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
11817
11818         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11819         variable warning on Linux/x86-64.
11820
11821 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
11822
11823         GDBserver disconnected tracing support.
11824
11825         * linux-low.c (linux_remove_process): Delete.
11826         (add_lwp): Don't set last_resume_kind here.
11827         (linux_kill): Use `mourn'.
11828         (linux_detach): Use `thread_db_detach', and `mourn'.
11829         (linux_mourn): New.
11830         (linux_attach_lwp_1): Adjust comment.
11831         (linux_attach): last_resume_kind moved the thread_info; adjust.
11832         (status_pending_p_callback): Adjust.
11833         (linux_wait_for_event_1): Adjust.
11834         (count_events_callback, select_singlestep_lwp_callback)
11835         (select_event_lwp_callback, cancel_breakpoints_callback)
11836         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11837         (proceed_one_lwp): Adjust.
11838         (linux_async): Add debug output.
11839         (linux_thread_stopped): New.
11840         (linux_pause_all): New.
11841         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11842         linux_pause_all.
11843         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11844         (thread_db_free): Delete declaration.
11845         (thread_db_detach, thread_db_mourn): Declare.
11846         * thread-db.c (thread_db_init): Use thread_db_mourn.
11847         (thread_db_free): Delete, split in two.
11848         (disable_thread_event_reporting): New.
11849         (thread_db_detach): New.
11850         (thread_db_mourn): New.
11851
11852         * server.h (struct thread_info) <last_resume_kind>: New field.
11853         <attached>: Add comment.
11854         <gdb_detached>: New field.
11855         (handler_func): Change return type to int.
11856         (handle_serial_event, handle_target_event): Ditto.
11857         (gdb_connected): Declare.
11858         (tracing): Delete.
11859         (disconnected_tracing): Declare.
11860         (stop_tracing): Declare.
11861
11862         * server.c (handle_query) <qSupported>: Report support for
11863         disconnected tracing.
11864         (queue_stop_reply_callback): Account for running threads.
11865         (gdb_wants_thread_stopped): New.
11866         (gdb_wants_all_threads_stopped): New.
11867         (gdb_reattached_process): New.
11868         (handle_status): Clear the `gdb_detached' flag of all processes.
11869         In all-stop, stop all threads.
11870         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
11871         (process_serial_event): If the remote connection breaks, or if an
11872         exit was forced with "monitor exit", force an event loop exit.
11873         Handle disconnected tracing on detach.
11874         (handle_serial_event): Adjust.
11875         (handle_target_event): If GDB isn't connected, forward events back
11876         to the inferior, unless the last process exited, in which case,
11877         exit gdbserver.  Adjust interface.
11878
11879         * remote-utils.c (remote_open): Don't block in accept.  Instead
11880         register an event loop source on the listen socket file
11881         descriptor.  Refactor bits into ...
11882         (listen_desc): ... this new global.
11883         (gdb_connected): ... this new function.
11884         (enable_async_notification): ... this new function.
11885         (handle_accept_event): ... this new function.
11886         (remote_close): Clear remote_desc.
11887
11888         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11889
11890         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11891         New fields.
11892         (mourn_inferior): Define.
11893         (target_process_qsupported): Avoid the dangling else problem.
11894         (thread_stopped): Define.
11895         (pause_all): Define.
11896         (target_waitstatus_to_string): Declare.
11897         * target.c (target_waitstatus_to_string): New.
11898
11899         * tracepoint.c (tracing): Make extern.
11900         (disconnected_tracing): New.
11901         (stop_tracing): Make extern.  Handle tracing stops due to GDB
11902         disconnecting.
11903         (cmd_qtdisconnected): New.
11904         (cmd_qtstatus): Report disconnected tracing status in trace reply.
11905         (handle_tracepoint_general_set): Handle QTDisconnected.
11906
11907         * event-loop.c (event_handler_func): Change return type to int.
11908         (process_event): Bail out if the event handler wants the event
11909         loop to stop.
11910         (handle_file_event): Ditto.
11911         (start_event_loop): Bail out if the event handler wants the event
11912         loop to stop.
11913
11914         * nto-low.c (nto_target_ops): Adjust.
11915         * spu-low.c (spu_wait): Don't remove the process here.
11916         (spu_target_ops): Adjust.
11917         * win32-low.c (win32_wait): Don't remove the process here.
11918         (win32_target_ops): Adjust.
11919
11920 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
11921
11922         * regcache.c (realloc_register_cache): Invalidate inferior's
11923         regcache before recreating it.
11924
11925 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
11926
11927         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11928
11929 2010-04-09  Stan Shebs  <stan@codesourcery.com>
11930             Pedro Alves  <pedro@codesourcery.com>
11931
11932         * server.h (LONGEST): New.
11933         (struct thread_info) <while_stepping>: New field.
11934         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11935         Declare.
11936         (initialize_tracepoint, handle_tracepoint_general_set)
11937         (handle_tracepoint_query, tracepoint_finished_step)
11938         (tracepoint_was_hit, release_while_stepping_state_list):
11939         (current_traceframe): Declare.
11940         * server.c (handle_general_set): Handle tracepoint packets.
11941         (read_memory): New.
11942         (write_memory): New.
11943         (handle_search_memory_1): Use read_memory.
11944         (handle_query): Report support for conditional tracepoints, trace
11945         state variables, and tracepoint sources.  Handle tracepoint
11946         queries.
11947         (main): Initialize the tracepoints module.
11948         (process_serial_event): Handle traceframe reads/writes.
11949
11950         * linux-low.c (handle_tracepoints): New.
11951         (linux_wait_1): Call it.
11952         (linux_resume_one_lwp): Handle while-stepping.
11953         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11954         (linux_target_ops): Install them.
11955         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11956         New field.
11957         * linux-x86-low.c (x86_supports_tracepoints): New.
11958         (the_low_target). Install it.
11959
11960         * mem-break.h (delete_breakpoint): Declare.
11961         * mem-break.c (delete_breakpoint): Make external.
11962
11963         * target.h (struct target_ops): Add `supports_tracepoints',
11964         `read_pc', and `write_pc' fields.
11965         (target_supports_tracepoints): Define.
11966         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11967         (phex_nz): New.
11968
11969         * regcache.h (struct regcache) <registers_owned>: New field.
11970         (init_register_cache, regcache_cpy): Declare.
11971         (regcache_read_pc, regcache_write_pc): Declare.
11972         (register_cache_size): Declare.
11973         (supply_regblock): Declare.
11974         * regcache.c (init_register_cache): New.
11975         (new_register_cache): Use it.
11976         (regcache_cpy): New.
11977         (register_cache_size): New.
11978         (supply_regblock): New.
11979         (regcache_read_pc, regcache_write_pc): New.
11980
11981         * tracepoint.c: New.
11982
11983         * Makefile.in (OBS): Add tracepoint.o.
11984         (tracepoint.o): New rule.
11985
11986 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
11987
11988         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11989         (i386-mmx.o): New.
11990         (i386-mmx.c): Likewise.
11991         (i386-mmx-linux.o): Likewise.
11992         (i386-mmx-linux.c): Likewise.
11993
11994         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11995         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11996         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11997         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11998
11999         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12000         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12001         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12002
12003 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
12004
12005         * Makefile.in (clean): Updated.
12006         (i386-avx.o): New.
12007         (i386-avx.c): Likewise.
12008         (i386-avx-linux.o): Likewise.
12009         (i386-avx-linux.c): Likewise.
12010         (amd64-avx.o): Likewise.
12011         (amd64-avx.c): Likewise.
12012         (amd64-avx-linux.o): Likewise.
12013         (amd64-avx-linux.c): Likewise.
12014
12015         * configure.srv (srv_i386_regobj): Add i386-avx.o.
12016         (srv_i386_linux_regobj): Add i386-avx-linux.o.
12017         (srv_amd64_regobj): Add amd64-avx.o.
12018         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12019         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12020         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12021         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12022         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12023         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12024         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12025
12026         * i387-fp.c: Include "i386-xstate.h".
12027         (i387_xsave): New.
12028         (i387_cache_to_xsave): Likewise.
12029         (i387_xsave_to_cache): Likewise.
12030         (x86_xcr0): Likewise.
12031
12032         * i387-fp.h (i387_cache_to_xsave): Likewise.
12033         (i387_xsave_to_cache): Likewise.
12034         (x86_xcr0): Likewise.
12035
12036         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12037         * linux-crisv32-low.c (target_regsets): Likewise.
12038         * linux-m68k-low.c (target_regsets): Likewise.
12039         * linux-mips-low.c (target_regsets): Likewise.
12040         * linux-ppc-low.c (target_regsets): Likewise.
12041         * linux-s390-low.c (target_regsets): Likewise.
12042         * linux-sh-low.c (target_regsets): Likewise.
12043         * linux-sparc-low.c (target_regsets): Likewise.
12044         * linux-xtensa-low.c (target_regsets): Likewise.
12045
12046         * linux-low.c: Include <sys/uio.h>.
12047         (regsets_fetch_inferior_registers): Support nt_type.
12048         (regsets_store_inferior_registers): Likewise.
12049         (linux_process_qsupported): New.
12050         (linux_target_ops): Add linux_process_qsupported.
12051
12052         * linux-low.h (regset_info): Add nt_type.
12053         (linux_target_ops): Add process_qsupported.
12054
12055         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12056         and <sys/uio.h>.
12057         (init_registers_i386_avx_linux): New.
12058         (init_registers_amd64_avx_linux): Likewise.
12059         (xmltarget_i386_linux_no_xml): Likewise.
12060         (xmltarget_amd64_linux_no_xml): Likewise.
12061         (PTRACE_GETREGSET): Likewise.
12062         (PTRACE_SETREGSET): Likewise.
12063         (x86_fill_xstateregset): Likewise.
12064         (x86_store_xstateregset): Likewise.
12065         (use_xml): Likewise.
12066         (x86_linux_update_xmltarget): Likewise.
12067         (x86_linux_process_qsupported): Likewise.
12068         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12069         (x86_arch_setup): Don't call init_registers_amd64_linux nor
12070         init_registers_i386_linux here.  Call
12071         x86_linux_update_xmltarget.
12072         (the_low_target): Add x86_linux_process_qsupported.
12073
12074         * server.c (handle_query): Call target_process_qsupported.
12075
12076         * target.h (target_ops): Add process_qsupported.
12077         (target_process_qsupported): New.
12078
12079 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
12080
12081         * inferiors.c (add_thread): Set last_status kind to
12082         TARGET_WAITKIND_IGNORE.
12083         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12084         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
12085         (linux_wait_1): Move `thread' local definition to block that uses
12086         it.  Don't NULL initialize `event_child'.
12087         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12088         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12089         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12090
12091 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12092
12093         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12094         an extended waitstatus, or by a watchpoint.
12095         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12096         thread was stepping or has been stopped by a watchpoint.
12097
12098 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12099
12100         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12101         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12102         of another, then delete the previous, and validate all
12103         breakpoints.
12104         (validate_inserted_breakpoint): New.
12105         (delete_disabled_breakpoints): New.
12106         (validate_breakpoints): New.
12107         (check_mem_read): Validate breakpoints before trusting their
12108         shadow.  Delete disabled breakpoints.
12109         (check_mem_write): Validate breakpoints before trusting they
12110         should be inserted.  Delete disabled breakpoints.
12111         * mem-break.h (validate_breakpoints):
12112         * server.c (handle_query): Validate breakpoints when we see a
12113         qSymbol query.
12114
12115 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12116
12117         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12118         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
12119         if we could tell there's a GDB breakpoint at stop_pc.
12120         (need_step_over_p): Don't do a step over if we find a GDB
12121         breakpoint at the resume PC.
12122
12123         * mem-break.c (struct raw_breakpoint): New.
12124         (enum bkpt_type): New type `gdb_breakpoint'.
12125         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12126         fields.  New field `raw'.
12127         (find_raw_breakpoint_at): New.
12128         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
12129         breakpoint instead.
12130         (set_breakpoint_at): Adjust.
12131         (delete_raw_breakpoint): New.
12132         (release_breakpoint): New.
12133         (delete_breakpoint): Rename to...
12134         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
12135         release_breakpoint.  Return ENOENT.
12136         (delete_breakpoint): Reimplement.
12137         (find_breakpoint_at): Delete.
12138         (find_gdb_breakpoint_at): New.
12139         (delete_breakpoint_at): Delete.
12140         (set_gdb_breakpoint_at): New.
12141         (delete_gdb_breakpoint_at): New.
12142         (gdb_breakpoint_here): New.
12143         (set_reinsert_breakpoint): Use release_breakpoint.
12144         (uninsert_breakpoint): Rename to ...
12145         (uninsert_raw_breakpoint): ... this.
12146         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12147         (reinsert_raw_breakpoint): Change parameter type to
12148         raw_breakpoint.
12149         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12150         instead.
12151         (check_breakpoints): Adjust.  Use release_breakpoint.
12152         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12153         (breakpoint_inserted_here): Ditto.
12154         (check_mem_read): Adjust to iterate over raw breakpoints instead.
12155         Don't trust the breakpoint's shadow if it is not inserted.
12156         (check_mem_write): Adjust to iterate over raw breakpoints instead.
12157         (delete_all_breakpoints): Adjust.
12158         (free_all_breakpoints): Mark all breakpoints as uninserted, and
12159         use delete_breakpoint_1.
12160
12161         * mem-break.h (breakpoints_supported): Delete declaration.
12162         (set_gdb_breakpoint_at): Declare.
12163         (gdb_breakpoint_here): Declare.
12164         (delete_breakpoint_at): Delete.
12165         (delete_gdb_breakpoint_at): Declare.
12166
12167         * server.h (struct raw_breakpoint): Forward declare.
12168         (struct process_info): New field `raw_breakpoints'.
12169
12170         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12171         breakpoints.
12172
12173 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12174
12175         * linux-low.c (status_pending_p_callback): Fix comment.
12176         (linux_wait_for_event_1): Move most of the internal breakpoint
12177         handling from here...
12178         (linux_wait_1): ... to here.
12179         (count_events_callback): New.
12180         (select_singlestep_lwp_callback): New.
12181         (select_event_lwp_callback): New.
12182         (cancel_breakpoints_callback): New.
12183         (select_event_lwp): New.
12184         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
12185         priority to all LWPs that have had events that should be reported
12186         to the client.  Cancel breakpoints when about to reporting the
12187         event to the client, not while stopping lwps.  No longer cancel
12188         finished single-steps here.
12189         (cancel_finished_single_step): Delete.
12190         (cancel_finished_single_steps): Delete.
12191
12192 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12193
12194         * mem-break.c (enum bkpt_type): New.
12195         (struct breakpoint): New field `type'.
12196         (set_breakpoint_at): Change return type to struct breakpoint
12197         pointer.  Set type to `other_breakpoint' by default.
12198         (delete_breakpoint): Rewrite, supporting more than one breakpoint
12199         in the breakpoint list.
12200         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12201         (reinsert_breakpoint): Rename to ...
12202         (reinsert_raw_breakpoint): ... this.
12203         (reinsert_breakpoints_at): Adjust.
12204         * mem-break.h (struct breakpoint): Declare.
12205         (set_breakpoint_at): Change return type to struct breakpoint
12206         pointer.
12207
12208 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12209
12210         * server.c (handle_query): Assign, not compare.
12211
12212 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12213
12214         Teach linux gdbserver to step-over-breakpoints.
12215
12216         * linux-low.c (can_hardware_single_step): New.
12217         (supports_breakpoints): New.
12218         (handle_extended_wait): If stopping threads, read the stop pc of
12219         the new cloned LWP.
12220         (get_pc): New.
12221         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
12222         low target doesn't support retrieving the PC.
12223         (add_lwp): Set last_resume_kind to resume_continue.
12224         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
12225         (linux_attach): Don't clear stop_expected.  Set the lwp's
12226         last_resume_kind to resume_stop.
12227         (linux_detach_one_lwp): Don't check for removed breakpoints.
12228         (check_removed_breakpoint): Delete.
12229         (status_pending_p): Rename to ...
12230         (status_pending_p_callback): ... this.  Don't check for removed
12231         breakpoints.  Don't consider threads that are stopped from GDB's
12232         perspective.
12233         (linux_wait_for_lwp): Always read the stop_pc here.
12234         (cancel_breakpoint): New.
12235         (step_over_bkpt): New global.
12236         (linux_wait_for_event_1): Implement stepping over breakpoints.
12237         (gdb_wants_lwp_stopped): New.
12238         (gdb_wants_all_stopped): New.
12239         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
12240         single-step traps here.  Store the thread's last reported target
12241         wait status.
12242         (send_sigstop): Don't clear stop_expected.  Always set it,
12243         instead.
12244         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12245         (cancel_finished_single_step): New.
12246         (cancel_finished_single_steps): New.
12247         (wait_for_sigstop): Don't cancel finished single-step traps here.
12248         (linux_resume_one_lwp): Don't check for removed breakpoints.
12249         Don't set `step' on non-hardware step archs.
12250         (linux_set_resume_request): Ignore resume_stop requests if already
12251         stopping or stopped.  Set the lwp's last_resume_kind.
12252         (resume_status_pending_p): Don't check for removed breakpoints.
12253         (need_step_over_p): New.
12254         (start_step_over): New.
12255         (finish_step_over): New.
12256         (linux_resume_one_thread): Always queue a sigstop for resume_stop
12257         requests.  Clear the thread's last reported target waitstatus.
12258         Don't use the `suspended' flag.  Don't consider pending breakpoints.
12259         (linux_resume): Start a step-over if necessary.
12260         (proceed_one_lwp): New.
12261         (proceed_all_lwps): New.
12262         (unstop_all_lwps): New.
12263         * linux-low.h (struct lwp_info): Rewrite comment for the
12264         `suspended' flag.  Add the `stop_pc' field.  Delete the
12265         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
12266         Add `'last_resume_kind' and `need_step_over' fields.
12267         * inferiors.c (struct thread_info): Delete, moved elsewhere.
12268         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12269         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
12270         (set_raw_breakpoint_at): New.
12271         (set_breakpoint_at): Rewrite to use it.
12272         (reinsert_breakpoint_handler): Delete.
12273         (set_reinsert_breakpoint): New.
12274         (reinsert_breakpoint_by_bp): Delete.
12275         (delete_reinsert_breakpoints): New.
12276         (uninsert_breakpoint): Rewrite.
12277         (uninsert_breakpoints_at): New.
12278         (reinsert_breakpoint): Rewrite.
12279         (reinsert_breakpoints_at): New.
12280         (check_breakpoints): Rewrite.
12281         (breakpoint_here): New.
12282         (breakpoint_inserted_here): New.
12283         (check_mem_read): Adjust.
12284         * mem-break.h (breakpoints_supported, breakpoint_here)
12285         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12286         (reinsert_breakpoint_by_bp): Delete declaration.
12287         (delete_reinsert_breakpoints): Declare.
12288         (reinsert_breakpoint): Delete declaration.
12289         (reinsert_breakpoints_at): Declare.
12290         (uninsert_breakpoint): Delete declaration.
12291         (uninsert_breakpoints_at): Declare.
12292         (check_breakpoints): Adjust prototype.
12293         * server.h: Adjust include order.
12294         (struct thread_info): Declare here.  Add a `last_status' field.
12295
12296 2010-03-23  Michael Snyder  <msnyder@vmware.com>
12297
12298         * server.c (crc32): New function.
12299         (handle_query): Add handling for 'qCRC:' request.
12300
12301 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
12302
12303         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12304         lwp had been stopped by a watchpoint.
12305
12306 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
12307
12308         * server.h (internal_error): Declare.
12309         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12310         * utils.c (internal_error): New function.
12311
12312 2010-03-15  Andreas Schwab  <schwab@redhat.com>
12313
12314         * configure.srv: Fix typo setting srv_regobj.
12315
12316 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
12317
12318         * linux-low.c (fetch_register): Avoid passing a non string literal
12319         format to `error'.
12320         (usr_store_inferior_registers): Ditto.
12321
12322 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
12323
12324         * linux-low.c (linux_write_memory): Bail out early if peeking
12325         memory failed.
12326
12327 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
12328
12329         * linux-low.h (struct lwp_info): New fields
12330         `stopped_by_watchpoint' and `stopped_data_address'.
12331         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12332         here, and cache them in the lwp object.
12333         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12334         directly.
12335         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12336         field.
12337         (linux_stopped_by_watchpoint): Rewrite.
12338         (linux_stopped_data_address): Rewrite.
12339
12340 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
12341
12342         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12343         switching the current inferior, not before.
12344
12345 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
12346
12347         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12348         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12349         i386-linux.c and amd64-linux.c.
12350         (reg-i386.o): Removed.
12351         (reg-i386.c): Likewise.
12352         (reg-i386-linux.o): Likewise.
12353         (reg-i386-linux.c): Likewise.
12354         (reg-x86-64.o): Likewise.
12355         (reg-x86-64.c): Likewise.
12356         (reg-x86-64-linux.o): Likewise.
12357         (reg-x86-64-linux.c): Likewise.
12358         (i386.o): New.
12359         (i386.c): Likewise.
12360         (i386-linux.o): Likewise.
12361         (i386-linux.c): Likewise.
12362         (amd64.o): Likewise.
12363         (amd64.c): Likewise.
12364         (amd64-linux.o): Likewise.
12365         (amd64-linux.c): Likewise.
12366
12367         * configure.srv (srv_i386_regobj): New.
12368         (srv_i386_linux_regobj): Likewise.
12369         (srv_amd64_regobj): Likewise.
12370         (srv_amd64_linux_regobj): Likewise.
12371         (srv_i386_32bit_xmlfiles): Likewise.
12372         (srv_i386_64bit_xmlfiles): Likewise.
12373         (srv_i386_xmlfiles): Likewise.
12374         (srv_amd64_xmlfiles): Likewise.
12375         (srv_i386_linux_xmlfiles): Likewise.
12376         (srv_amd64_linux_xmlfiles): Likewise.
12377         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
12378         srv_xmlfiles to $srv_i386_xmlfiles.
12379         (i[34567]86-*-mingw32ce*): Likewise.
12380         (i[34567]86-*-mingw*): Likewise.
12381         (i[34567]86-*-nto*): Likewise.
12382         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12383         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
12384         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12385         (x86_64-*-linux*): Likewise.
12386
12387         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12388         (init_registers_amd64_linux): New.
12389         (x86_arch_setup): Replace init_registers_x86_64_linux with
12390         init_registers_amd64_linux.
12391
12392 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
12393
12394         * configure.ac: Check for libdl.  If it is not available link against
12395         static libthread_db.
12396         * configure: Regenerate.
12397
12398 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
12399
12400         PR9605
12401
12402         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12403         handing a read watchpoint.
12404         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12405
12406 2010-02-12  Doug Evans  <dje@google.com>
12407
12408         * linux-low.c (linux_supports_tracefork_flag): Document.
12409         (linux_look_up_symbols): Add comment.
12410
12411 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
12412
12413         * regcache.c (supply_register): Clear regcache if buf is NULL.
12414
12415 2010-02-02  Nicolas Roche  <roche@sourceware.org>
12416             Joel Brobecker  <brobecker@adacore.com>
12417
12418         * inferiors.c (find_inferior): Add function documentation.
12419         (unloaded_dll): Handle the case where the unloaded dll has not
12420         been previously registered in the dll list.
12421
12422 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12423
12424         * linux-arm-low.c (thumb_breakpoint_len): Delete.
12425         (thumb2_breakpoint): New.
12426         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12427
12428 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12429
12430         * linux-low.c (get_stop_pc): Check for SIGTRAP.
12431         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12432         breakpoints.
12433
12434 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
12435
12436         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12437
12438 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12439
12440         * linux-s390-low.c (s390_collect_ptrace_register)
12441         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12442
12443 2010-01-21  Doug Evans  <dje@google.com>
12444
12445         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12446         (PTRACE_ARG4_TYPE): New macro.
12447         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12448         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12449         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12450         (usr_store_inferior_registers): Ditto.
12451         (linux_read_memory, linux_write_memory): Ditto.
12452         (linux_test_for_tracefork): Ditto.
12453
12454         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12455         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12456
12457 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
12458
12459         * proc-service.c (ps_lgetregs): Don't refetch registers from the
12460         target.
12461
12462 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
12463
12464         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12465         prototype to take a regcache.  Adjust.
12466
12467 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
12468
12469         * regcache.h (struct thread_info): Forward declare.
12470         (struct regcache): New.
12471         (new_register_cache): Adjust prototype.
12472         (get_thread_regcache): Declare.
12473         (free_register_cache): Adjust prototype.
12474         (registers_to_string, registers_from_string): Ditto.
12475         (supply_register, supply_register_by_name, collect_register)
12476         (collect_register_as_string, collect_register_by_name): Ditto.
12477         * regcache.c (struct inferior_regcache_data): Delete.
12478         (get_regcache): Rename to ...
12479         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
12480         fetching registers.
12481         (regcache_invalidate_one): Adjust.
12482         (regcache_invalidate): Fix prototype.
12483         (new_register_cache): Return the new register cache.
12484         (free_register_cache): Change prototype.
12485         (realloc_register_cache): Adjust.
12486         (registers_to_string): Change prototype to take a regcache.  Adjust.
12487         (registers_from_string): Ditto.
12488         (register_data): Ditto.
12489         (supply_register): Ditto.
12490         (supply_register_by_name): Ditto.
12491         (collect_register): Ditto.
12492         (collect_register_as_string): Ditto.
12493         (collect_register_by_name): Ditto.
12494         * server.c (process_serial_event): Adjust.
12495         * linux-low.h (regset_fill_func, regset_store_func): Change
12496         prototype.
12497         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12498         Change prototype.
12499         * linux-low.c (get_stop_pc): Adjust.
12500         (check_removed_breakpoint): Adjust.
12501         (linux_wait_for_event): Adjust.
12502         (linux_resume_one_lwp): Adjust.
12503         (fetch_register): Add regcache parameter.  Adjust.
12504         (usr_store_inferior_registers): Ditto.
12505         (regsets_fetch_inferior_registers): Ditto.
12506         (regsets_store_inferior_registers): Ditto.
12507         (linux_fetch_registers, linux_store_registers): Ditto.
12508         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12509         regcache.  Adjust.
12510         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12511         Ditto.
12512         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12513         prototype to take a regcache.
12514         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12515         * remote-utils.c (convert_ascii_to_int, outreg)
12516         (prepare_resume_reply): Change prototype to take a regcache.
12517         Adjust.
12518         * target.h (struct target_ops) <fetch_registers, store_registers>:
12519         Change prototype to take a regcache.
12520         (fetch_inferior_registers, store_inferior_registers): Change
12521         prototype to take a regcache.  Adjust.
12522         * proc-service.c (ps_lgetregs): Adjust.
12523         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12524         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12525         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12526         take a regcache.  Adjust.
12527         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12528         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12529         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12530         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
12531         * linux-cris-low.c (cris_get_pc, cris_set_pc)
12532         (cris_cannot_fetch_register):
12533         (cris_breakpoint_at): Change prototype to take a regcache.
12534         Adjust.
12535         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12536         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12537         to take a regcache.  Adjust.
12538         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12539         Adjust.
12540         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12541         take a regcache.  Adjust.
12542         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12543         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12544         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
12545         * linux-mips-low.c (mips_get_pc):
12546         (mips_set_pc): Change prototype to take a regcache.  Adjust.
12547         (mips_reinsert_addr): Adjust.
12548         (mips_collect_register): Change prototype to take a regcache.
12549         Adjust.
12550         (mips_supply_register):
12551         (mips_collect_register_32bit, mips_supply_register_32bit)
12552         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12553         (mips_store_fpregset): Ditto.
12554         * linux-ppc-low.c (ppc_supply_ptrace_register)
12555         (ppc_supply_ptrace_register): Ditto.
12556         (parse_spufs_run): Adjust.
12557         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12558         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12559         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12560         take a regcache.  Adjust.
12561         * linux-s390-low.c (s390_collect_ptrace_register)
12562         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12563         (s390_set_pc): Change prototype to take a regcache.  Adjust.
12564         (s390_arch_setup): Adjust.
12565         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12566         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
12567         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12568         (sparc_fill_gregset, sparc_store_gregset_from_stack)
12569         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12570         regcache.  Adjust.
12571         (sparc_breakpoint_at): Adjust.
12572         * linux-xtensa-low.c (xtensa_fill_gregset):
12573         (xtensa_store_gregset):
12574         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12575         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
12576         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12577         prototype to take a regcache.  Adjust.
12578         * win32-arm-low.c (arm_fetch_inferior_register)
12579         (arm_store_inferior_register): Change prototype to take a
12580         regcache.  Adjust.
12581         * win32-i386-low.c (i386_fetch_inferior_register)
12582         (i386_store_inferior_register): Change prototype to take a
12583         regcache.  Adjust.
12584         * win32-low.c (child_fetch_inferior_registers)
12585         (child_store_inferior_registers): Change prototype to take a
12586         regcache.  Adjust.
12587         (win32_wait): Adjust.
12588         (win32_fetch_inferior_registers): Change prototype to take a
12589         regcache.  Adjust.
12590         (win32_store_inferior_registers): Adjust.
12591         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12592         store_inferior_register>: Change prototype to take a regcache.
12593
12594 2010-01-20  Doug Evans  <dje@google.com>
12595
12596         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12597         #ifdef.
12598         (linux_wait_for_event1, linux_init_signals): Ditto.
12599         (W_STOPCODE): Provide definition if missing.
12600
12601 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
12602
12603         * linux-low.c (linux_core_of_thread): New.
12604         (compare_ints, show_process, list_threads): New.
12605         (linux_qxfer_osdata): Report threads and cores.
12606         (linux_target_op): Register linux_core_of_thread.
12607         * remote-utils.c (prepare_resume_reply): Report the core.
12608         (buffer_xml_printf): Support %d specifier.
12609         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12610         New.
12611         (handle_query): Handle qXfer:threads.  Announce availability
12612         thereof.
12613         * target.h (struct target_ops): New field core_of_thread.
12614
12615 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
12616
12617         * Makefile.in (clean): Remove new generated files.
12618         (reg-s390.o, reg-s390.c): Remove rules.
12619         (reg-s390x.o, reg-s390x.c): Likewise.
12620         (s390-linux32.o, s390-linux32.c): Add rules.
12621         (s390-linux64.o, s390-linux64.c): Likewise.
12622         (s390x-linux64.o, s390x-linux64.c): Likewise.
12623         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12624         * linux-s390-low.c: Include <elf.h>.
12625         (HWCAP_S390_HIGH_GPRS): Define if undefined.
12626         (init_registers_s390): Remove prototype.
12627         (init_registers_s390x): Likewise.
12628         (init_registers_s390_linux32): Add prototype.
12629         (init_registers_s390_linux64): Likewise.
12630         (init_registers_s390x_linux64): Likewise.
12631         (s390_num_regs_3264): New define.
12632         (s390_regmap_3264): New global variable.
12633         (s390_cannot_fetch_register): Remove obsolete check.
12634         (s390_cannot_store_register): Likewise.
12635         (s390_collect_ptrace_register): Handle upper/lower register halves.
12636         (s390_supply_ptrace_register): Likewise.
12637         (s390_fill_gregset): Update to register number changes.
12638         (s390_get_hwcap): New routine.
12639         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12640         Install appropriate regmap and register set.
12641
12642 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
12643
12644         * server.c (gdbserver_version): Update copyright year to 2010.
12645         * gdbreplay.c (gdbreplay_version): Likewise.
12646
12647 2009-12-28  Doug Evans  <dje@google.com>
12648
12649         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12650         elf/external.h.  Include <elf.h> instead but only if necessary.
12651
12652 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
12653
12654         * linux-low.c (linux_remove_process): Remove `detaching'
12655         parameter.  Don't release/detach from thread_db here.
12656         (linux_kill): Release/detach from thread_db here, ...
12657         (linux_detach): ... and here, before actually detaching.
12658         (linux_wait_1): ... and here, when a process exits.
12659         * thread-db.c (any_thread_of): New.
12660         (thread_db_free): Switch the current inferior to a thread of the
12661         passed in process.
12662
12663 2009-12-21  Doug Evans  <dje@google.com>
12664
12665         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12666
12667         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12668         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12669         warning ifndef __NR_tkill.  Move setting of errno there too.
12670         Delete unnecessary resetting of errno after syscall.
12671         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12672
12673         * configure.ac: Check for dladdr.
12674         * config.in: Regenerate.
12675         * configure: Regenerate.
12676         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12677         (try_thread_db_load): Update.
12678
12679         * linux-low.c (my_waitpid): Delete unnecessary prototype.
12680
12681 2009-12-18  Doug Evans  <dje@google.com>
12682
12683         * event-loop.c: Include unistd.h if it exists.
12684
12685         * linux-low.c (my_waitpid): Move definition away from being in
12686         between linux_tracefork_child/linux_test_for_tracefork.
12687
12688         * gdb_proc_service.h (psaddr_t): Fix type.
12689         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12690         signature to match glibc.
12691
12692 2009-12-16  Doug Evans  <dje@google.com>
12693
12694         * linux-low.c (linux_read_memory): Fix argument to read.
12695
12696 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
12697
12698         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12699         events, don't leave current_inferior pointing at null.
12700
12701 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
12702
12703         * win32-low.c (LOG): Delete.
12704         (OUTMSG): Output to stderr.
12705         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12706         on compile time LOG macro.
12707         (win32_wait): Fix debug output.
12708
12709 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
12710
12711         * win32-low.c (win32_add_one_solib): If the dll name is
12712         "ntdll.dll", prepend the system directory to the dll path.
12713
12714 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
12715
12716         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12717
12718 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12719             Vladimir Prus  <vladimir@codesourcery.com>
12720
12721         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12722         * configure.ac: Check for __mcoldfire__ and set
12723         gdb_cv_m68k_is_coldfire.
12724         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12725         reg-cf.o and reg-m68k.o.
12726         * configure: Regenerated.
12727
12728 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
12729
12730         * linux-low.c (linux_remove_process): Add `detaching' parameter.
12731         Pass it to thread_db_free.
12732         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12733         proper `detaching' argument to linux_remove_process.
12734         * linux-low.h (thread_db_free): Add `detaching' parameter.
12735         * thread-db.c (thread_db_init): Pass false as `detaching' argument
12736         to thread_db_free.
12737         (thread_db_free): Add `detaching' parameter.  Only
12738         call td_ta_clear_event if detaching from process.
12739
12740 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
12741
12742         * thread-db.c (thread_db_free): Fix typo.
12743
12744 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
12745
12746         PR gdb/10838
12747         * thread-db.c (thread_db_free): Call td_ta_clear_event.
12748
12749 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
12750
12751         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12752         with an i686 compiler.
12753         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12754         needed.
12755         * configure: Rebuilt.
12756
12757 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
12758
12759         PR gdb/10783
12760
12761         * server.c (handle_search_memory_1): Correct read_addr initialization
12762         in loop for searching subsequent chunks.
12763
12764 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
12765
12766         * configure.ac: New --with-libthread-db option.
12767         * thread-db.c: Allow direct dependence on libthread_db.
12768         (thread_db_free): Adjust.
12769         * config.in: Regenerate.
12770         * configure: Likewise.
12771
12772 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
12773
12774         PR gdb/10757
12775         * thread-db.c (attach_thread): New function.
12776         (maybe_attach_thread): Return success/failure.
12777         (find_new_threads_callback): Adjust.
12778         (thread_db_find_new_threads): Loop until no new threads.
12779
12780 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
12781
12782         * proc-service.c (ps_lgetregs): Formatting.
12783
12784 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
12785
12786         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12787         * configure.ac: Adjust.
12788         * linux-low.h (struct process_info_private): Move members to struct
12789         thread_db.
12790         (thread_db_free, thread_db_handle_monitor_command): New prototype.
12791         * linux-low.c (linux_remove_process): Adjust.
12792         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12793         * server.c (handle_query): Move code ...
12794         (handle_monitor_command): ... here. New function.
12795         * target.h (struct target_ops): New member.
12796         * thread-db.c (struct thread_db): New.
12797         (libthread_db_search_path): New variable.
12798         (thread_db_create_event, thread_db_enable_reporting)
12799         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12800         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12801         (try_thread_db_load_1, dladdr_to_soname): New functions.
12802         (try_thread_db_load, thread_db_load_search): New functions.
12803         (thread_db_init): Search for libthread_db.
12804         (thread_db_free): New function.
12805         (thread_db_handle_monitor_command): Likewise.
12806         * config.in: Regenerate.
12807         * configure: Regenerate.
12808
12809 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
12810
12811         * spu-low.c (spu_kill): Wait for inferior to terminate.
12812         Call clear_inferiors.
12813         (spu_detach): Call clear_inferiors.
12814
12815 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12816
12817         * aclocal.m4: Regenerate.
12818         * config.in: Likewise.
12819         * configure: Likewise.
12820
12821 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
12822
12823         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12824         (parse_spufs_run): New function.
12825         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12826         (ppc_breakpoint_at): Handle SPU breakpoints.
12827
12828 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
12829
12830         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12831         (SPUFS_MAGIC): Define.
12832         (spu_enumerate_spu_ids): New function.
12833         (linux_qxfer_spu): New function.
12834         (linux_target_ops): Install linux_qxfer_spu.
12835
12836 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
12837
12838         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12839         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
12840         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12841         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12842         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12843         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12844         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12845         (init_registers_powerpc_cell32l): Add prototype.
12846         (init_registers_powerpc_cell64l): Likewise.
12847         (ppc_arch_setup): Detect Cell/B.E. architecture.
12848
12849 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12850
12851         * Makefile.in (datarootdir): New variable.
12852
12853 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
12854
12855         * linux-low.c (linux_write_memory): Update debugging output.
12856         * Makefile.in (clean): Add new descriptions.
12857         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12858         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12859         * configure.srv: Add new files for arm*-*-linux*.
12860         * linux-arm-low.c: Add new declarations.
12861         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12862         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12863         (HWCAP_VFPv3D16): New.
12864         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12865         instead of __IWMMXT__.
12866         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12867         (arm_arch_setup): New.
12868         (target_regsets): Remove #ifdef.  Add VFP regset.
12869         (the_low_target): Use arm_arch_setup.
12870
12871 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
12872
12873         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12874         the main thread again.
12875
12876 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
12877
12878         Adding Neutrino gdbserver.
12879         * configure: Regenerated.
12880         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12881         * configure.srv (i[34567]86-*-nto*): New target.
12882         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12883         * remote-utils.c [__QNX__]: Include sys/iomgr.h
12884         (nto_comctrl) [__QNX__]: New function.
12885         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12886
12887 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
12888
12889         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12890         srv_tgtobj.
12891
12892 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
12893             Pedro Alves  <pedro@codesourcery.com>
12894
12895         * win32-i386-low.c (i386_get_thread_context): Handle systems that
12896         don't support CONTEXT_EXTENDED_REGISTERS.
12897         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12898         (the_low_target): Install them.
12899         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12900         failing with ERROR_PIPE_NOT_CONNECTED.
12901
12902 2009-06-30  Doug Evans  <dje@google.com>
12903             Pierre Muller  <muller@ics.u-strasbg.fr>
12904
12905         Add h/w watchpoint support to x86-linux, win32-i386.
12906         * Makefile.in (SFILES): Add i386-low.c
12907         (i386_low_h): Define.
12908         (i386-low.o): Add dependencies.
12909         (linux-x86-low.o): Add i386-low.h dependency.
12910         (win32-i386-low.o): Ditto.
12911         * i386-low.c: New file.
12912         * i386-low.h: New file.
12913         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12914         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12915         * linux-low.c (linux_add_process): Initialize arch_private.
12916         (linux_remove_process): Free arch_private.
12917         (add_lwp): Initialize arch_private.
12918         (delete_lwp): Free arch_private.
12919         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12920         provided.
12921         * linux-low.h (process_info_private): New member arch_private.
12922         (lwp_info): New member arch_private.
12923         (linux_target_ops): New members new_process, new_thread,
12924         prepare_to_resume.
12925         (ptid_of): New macro.
12926         * linux-x86-low.c: Include stddef.h, i386-low.h.
12927         (arch_process_info): New struct.
12928         (arch_lwp_info): New struct.
12929         (x86_linux_dr_get, x86_linux_dr_set): New functions.
12930         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12931         (i386_dr_low_get_status): New function.
12932         (x86_insert_point, x86_remove_point): New functions.
12933         (x86_stopped_by_watchpoint): New function.
12934         (x86_stopped_data_address): New function.
12935         (x86_linux_new_process, x86_linux_new_thread): New functions.
12936         (x86_linux_prepare_to_resume): New function.
12937         (the_low_target): Add entries for insert_point, remove_point,
12938         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12939         prepare_to_resume.
12940         * server.c (debug_hw_points): New global.
12941         (monitor_show_help): Document set debug-hw-points.
12942         (handle_query): Process "set debug-hw-points".
12943         * server.h (debug_hw_points): Declare.
12944         (paddress): Declare.
12945         * utils.c (NUMCELLS, CELLSIZE): New macros.
12946         (get_sell, xsnprintf, paddress): New functions.
12947         * win32-arm-low.c (the_low_target): Add entries for insert_point,
12948         remove_point, stopped_by_watchpoint, stopped_data_address.
12949         * win32-i386-low.c: Include i386-low.h.
12950         (debug_reg_state): Replaces dr.
12951         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12952         (i386_dr_low_get_status): New function.
12953         (i386_insert_point, i386_remove_point): New functions.
12954         (i386_stopped_by_watchpoint): New function.
12955         (i386_stopped_data_address): New function.
12956         (i386_initial_stuff): Update.
12957         (get_thread_context,set_thread_context,i386_thread_added): Update.
12958         (the_low_target): Add entries for insert_point,
12959         remove_point, stopped_by_watchpoint, stopped_data_address.
12960         * win32-low.c (win32_insert_watchpoint): New function.
12961         (win32_remove_watchpoint): New function.
12962         (win32_stopped_by_watchpoint): New function.
12963         (win32_stopped_data_address): New function.
12964         (win32_target_ops): Add entries for insert_watchpoint,
12965         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12966         * win32-low.h (win32_target_ops): New members insert_point,
12967         remove_point, stopped_by_watchpoint, stopped_data_address.
12968
12969 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
12970
12971         * server.c (process_serial_event): Re-return unsupported, not
12972         error, if the type isn't recognized.  Re-allow supporting only
12973         insert or remove packets.  Also call require_running for
12974         breakpoints.  Add missing break statement to default case.  Tidy.
12975         * target.h (struct target_ops): Rename insert_watchpoint to
12976         insert_point, and remove_watchpoint to remove_point.
12977
12978         * linux-low.h (struct linux_target_ops): Likewise.
12979         * linux-low.c (linux_insert_watchpoint): Rename to ...
12980         (linux_insert_point): ... this.  Adjust.
12981         (linux_remove_watchpoint): Rename to ...
12982         (linux_remove_point): ... this.  Adjust.
12983         (linux_target_ops): Adjust.
12984         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12985         (cris_insert_point): ... this.
12986         (cris_remove_watchpoint): Rename to ...
12987         (cris_remove_point): ... this.
12988         (the_low_target): Adjust.
12989
12990 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
12991
12992         * server.c (handle_v_kill): Pass signal_pid to
12993         kill_inferior if multi_process is zero.
12994
12995 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
12996
12997         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12998         * target.h (target_ops): Comment for *_watchpoint to make it clear
12999         the functions can get types '0' and '1'.
13000
13001 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
13002
13003         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13004         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13005         * regcache.c (get_regcache): Likewise.
13006         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13007         * win32-low.c (child_fetch_inferior_registers): Remove check for
13008         regno 0.
13009
13010 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
13011             Pedro Alves <pedro@codesourcery.com>
13012
13013         * target.h (struct target_ops) <supports_multi_process>: New
13014         callback.
13015         (target_supports_multi_process): New.
13016         * server.c (handle_query): Even if GDB reports support, only
13017         enable multi-process if the target also supports it.  Report
13018         multi-process support only if the target backend supports it.
13019         * linux-low.c (linux_supports_multi_process): New function.
13020         (linux_target_ops): Install it as target_supports_multi_process
13021         callback.
13022
13023 2009-05-24  Doug Evans  <dje@google.com>
13024
13025         Global renaming of find_thread_pid to find_thread_ptid.
13026         * server.h (find_thread_ptid): Renamed from find_thread_pid.
13027         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13028         All callers updated.
13029
13030         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13031         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13032         directly.
13033
13034         * linux-low.c (get_stop_pc): Print pc if debug_threads.
13035         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13036         (linux_resume_one_lwp): Ditto.
13037
13038 2009-05-23  Doug Evans  <dje@google.com>
13039
13040         * linux-low.c (linux_resume_one_lwp): Change type of first arg
13041         from struct inferior_list_entry * to struct lwp_info *.
13042         All callers updated.
13043
13044 2009-05-13  Doug Evans  <dje@google.com>
13045
13046         * linux-x86-low.c: Don't include assert.h.
13047         (x86_siginfo_fixup): Use fatal, not assert.
13048         (x86_arch_setup): Fix comment.
13049
13050 2009-05-12  Doug Evans  <dje@google.com>
13051
13052         Biarch support for i386/amd64 gdbserver.
13053         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13054         Add linux-x86-low.c.
13055         (linux-i386-low.o, linux-x86-64-low.o): Delete.
13056         (linux-x86-low.o): Add.
13057         * linux-x86-64-low.c: Delete.
13058         * linux-i386-low.c: Delete.
13059         * linux-x86-low.c: New file.
13060         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13061         linux-x86-low.o.
13062         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13063         linux-x86-low.o.
13064         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13065         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13066         (linux_child_pid_to_exec_file): New function.
13067         (elf_64_header_p, elf_64_file_p): New functions.
13068         (siginfo_fixup): New function.
13069         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
13070         give target a chance to convert layout.
13071         * linux-low.h (linux_target_ops): New member siginfo_fixup.
13072         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13073
13074 2009-05-07  Doug Evans  <dje@google.com>
13075
13076         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13077         (regsets_store_inferior_registers): Ditto.
13078
13079 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
13080
13081         PR server/10048
13082
13083         * linux-low.c (must_set_ptrace_flags): Delete.
13084         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13085         of the global.
13086         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
13087         `lwp->must_set_ptrace_flags' instead.
13088         (linux_wait_for_event_1): Set ptrace options here.
13089         (linux_wait_1): ... not here.
13090
13091 2009-04-30  Doug Evans  <dje@google.com>
13092
13093         * inferiors.c (started_inferior_callback): New function.
13094         (attached_inferior_callback): New function.
13095         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13096         * server.c (print_started_pid, print_attached_pid): New functions.
13097         (detach_or_kill_for_exit): New function.
13098         (main): Call it instead of for_each_inferior (kill_inferior_callback).
13099         * server.h (have_started_inferiors_p): Declare.
13100         (have_attached_inferiors_p): Declare.
13101
13102         * inferiors.c (remove_process): Fix memory leak, free process.
13103         * linux-low.c (linux_remove_process): New function.
13104         (linux_kill): Call it instead of remove_process.
13105         (linux_detach, linux_wait_1): Ditto.
13106
13107 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
13108
13109         * configure.srv: Add x86 Windows CE target.
13110
13111 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13112
13113         * inferiors.c (get_thread_process): Make global.
13114         * server.h (get_thread_process): Add prototype.
13115         * thread-db.c (find_one_thread): Use get_thread_process
13116         instead of current_process.
13117         (thread_db_get_tls_address): Do not crash if called when
13118         thread layer is not yet initialized.
13119
13120 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13121
13122         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13123         * spu-low.c (current_tid): Rename to ...
13124         (current_ptid): ... this.
13125         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13126         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13127         ptid_get_lwp (current_ptid) instead of current_tid.
13128         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13129         instead of current_tid.  Use find_process_pid to verify pid
13130         argument is valid.  Pass proper argument to remove_process.
13131         (spu_thread_alive): Compare current_ptid instead of current_tid.
13132         (spu_resume): Likewise.
13133
13134 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
13135
13136         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13137         variable.
13138
13139 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13140
13141         Implement the multiprocess extensions, and add linux multiprocess
13142         support.
13143
13144         * server.h (ULONGEST): Declare.
13145         (struct ptid, ptid_t): New.
13146         (minus_one_ptid, null_ptid): Declare.
13147         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13148         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13149         (struct inferior_list_entry): Change `id' type from unsigned from
13150         to ptid_t.
13151         (struct sym_cache, struct breakpoint, struct
13152         process_info_private): Forward declare.
13153         (struct process_info): Declare.
13154         (current_process): Declare.
13155         (all_processes): Declare.
13156         (initialize_inferiors): Declare.
13157         (add_thread): Adjust to use ptid_t.
13158         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13159         (add_process, remove_process, find_thread_pid): Declare.
13160         (find_inferior_id): Adjust to use ptid_t.
13161         (cont_thread, general_thread, step_thread): Change type to ptid_t.
13162         (multi_process): Declare.
13163         (push_event): Adjust to use ptid_t.
13164         (read_ptid, write_ptid): Declare.
13165         (prepare_resume_reply): Adjust to use ptid_t.
13166         (clear_symbol_cache): Declare.
13167         * inferiors.c (all_processes): New.
13168         (null_ptid, minus_one_ptid): New.
13169         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13170         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13171         (add_thread): Change unsigned long to ptid.  Remove gdb_id
13172         parameter.  Adjust.
13173         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13174         (gdb_id_to_thread): Rename to ...
13175         (find_thread_pid): ... this.  Change unsigned long to ptid.
13176         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13177         (loaded_dll, pull_pid_from_list): Adjust.
13178         (add_process, remove_process, find_process_pid)
13179         (get_thread_process, current_process, initialize_inferiors): New.
13180         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13181         (struct target_waitstatus) <related_pid>: Ditto.
13182         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
13183         return type to int.
13184         (struct target_ops) <join>: Add `pid' argument.
13185         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13186         (struct target_ops) <wait>: Add `ptid' field.  Change return type
13187         to ptid.
13188         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13189         (mywait): Add `ptid' argument.  Change return type to ptid_t.
13190         (target_pid_to_str): Declare.
13191         * target.c (set_desired_inferior): Adjust to use ptids.
13192         (mywait): Add new `ptid' argument.  Adjust.
13193         (target_pid_to_str): New.
13194         * mem-break.h (free_all_breakpoints): Declare.
13195         * mem-break.c (breakpoints): Delelete.
13196         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13197         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13198         to use per-process breakpoint list.
13199         (free_all_breakpoints): New.
13200         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13201         (symbol_cache, all_symbols_looked_up): Delete.
13202         (hexchars): New.
13203         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13204         read_ptid): New.
13205         (prepare_resume_reply): Change ptid argument's type from unsigned
13206         long to ptid_t.  Adjust.  Implement W;process and X;process.
13207         (free_sym_cache, clear_symbol_cache): New.
13208         (look_up_one_symbol): Adjust to per-process symbol cache.  *
13209         * server.c (cont_thread, general_thread, step_thread): Change type
13210         to ptid_t.
13211         (attached): Delete.
13212         (multi_process): New.
13213         (last_ptid): Change type to ptid_t.
13214         (struct vstop_notif) <ptid>: Change type to ptid_t.
13215         (queue_stop_reply, push_event): Change `ptid' argument's type to
13216         ptid_t.
13217         (discard_queued_stop_replies): Add `pid' argument.
13218         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
13219         changes.  Don't reference the `attached' global.
13220         (attach_inferior): Adjust to mywait interface changes.
13221         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
13222         features.  Handle and report "multiprocess+".  Handle
13223         "qAttached:PID".
13224         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
13225         changes.
13226         (handle_v_kill): New.
13227         (handle_v_stopped): Adjust to use target_pid_to_str.
13228         (handle_v_requests): Allow multiple attaches and runs when
13229         multiprocess extensions are in effect.  Handle "vKill".
13230         (myresume): Adjust to use ptids.
13231         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
13232         (handle_status): Adjust to discard_queued_stop_replies interface
13233         change.
13234         (first_thread_of, kill_inferior_callback)
13235         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13236         (main): Call initialize_inferiors.  Adjust to use ptids, killing
13237         and detaching from all inferiors.  Handle multiprocess packet
13238         variants.
13239         * linux-low.h: Include gdb_proc_service.h.
13240         (struct process_info_private): New.
13241         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13242         <lwpid_of>: Use ptid_get_lwp.
13243         (get_lwp_thread): Adjust.
13244         (struct lwp_info): Add `dead' member.
13245         (find_lwp_pid): Declare.
13246         * linux-low.c (thread_db_active): Delete.
13247         (new_inferior): Adjust comment.
13248         (inferior_pid): Delete.
13249         (linux_add_process): New.
13250         (handle_extended_wait): Adjust.
13251         (add_lwp): Change unsigned long to ptid.
13252         (linux_create_inferior): Add process to processes table.  Adjust
13253         to use ptids.  Don't set new_inferior here.
13254         (linux_attach_lwp): Rename to ...
13255         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
13256         it.  Adjust to use ptids.
13257         (linux_attach_lwp): New.
13258         (linux_attach): Add process to processes table.  Don't set
13259         new_inferior here.
13260         (struct counter): New.
13261         (second_thread_of_pid_p, last_thread_of_process_p): New.
13262         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
13263         multiple processes.
13264         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
13265         processes.  Remove process from process table.
13266         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
13267         to multiple processes.
13268         (any_thread_of): New.
13269         (linux_detach): Add `pid' argument, and handle it.  Remove process
13270         from processes table.
13271         (linux_join): Add `pid' argument.  Handle it.
13272         (linux_thread_alive): Change unsighed long argument to ptid_t.
13273         Consider dead lwps as not being alive.
13274         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
13275         threads we're not interested in.
13276         (same_lwp, find_lwp_pid): New.
13277         (linux_wait_for_lwp): Change `pid' argument's type from int to
13278         ptid_t.  Adjust.
13279         (linux_wait_for_event): Rename to ...
13280         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
13281         from int to ptid_t.  Adjust.
13282         (linux_wait_for_event): New.
13283         (linux_wait_1): Add `ptid' argument.  Change return type to
13284         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
13285         that exit from the process table.
13286         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
13287         Adjust.
13288         (mark_lwp_dead): New.
13289         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
13290         stopping all threads, mark its main lwp as dead.
13291         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13292         ptids.
13293         (fetch_register, usr_store_inferior_registers)
13294         (regsets_fetch_inferior_registers)
13295         (regsets_store_inferior_registers, linux_read_memory)
13296         (linux_write_memory): Inline `inferior_pid'.
13297         (linux_look_up_symbols): Adjust to use per-process
13298         `thread_db_active'.
13299         (linux_request_interrupt): Adjust to use ptids.
13300         (linux_read_auxv): Inline `inferior_pid'.
13301         (initialize_low): Don't reference thread_db_active.
13302         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13303         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13304         (ps_getpid): Return the pid of the current inferior.
13305         * thread-db.c (proc_handle, thread_agent): Delete.
13306         (thread_db_create_event, thread_db_enable_reporting): Adjust to
13307         per-process data.
13308         (find_one_thread): Change argument type to ptid_t.  Adjust to
13309         per-process data.
13310         (maybe_attach_thread): Adjust to per-process data and ptids.
13311         (thread_db_find_new_threads): Ditto.
13312         (thread_db_init): Ditto.
13313         * spu-low.c (spu_create_inferior, spu_attach): Add process to
13314         processes table.  Adjust to use ptids.
13315         (spu_kill, spu_detach): Adjust interface.  Remove process from
13316         processes table.
13317         (spu_join, spu_thread_alive): Adjust interface.
13318         (spu_wait): Adjust interface.  Remove process from processes
13319         table.  Adjust to use ptids.
13320         * win32-low.c (current_inferior_tid): Delete.
13321         (current_inferior_ptid): New.
13322         (debug_event_ptid): New.
13323         (thread_rec): Take a ptid.  Adjust.
13324         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
13325         (child_delete_thread): Ditto.
13326         (do_initial_child_stuff): Add `attached' argument.  Add process to
13327         processes table.
13328         (child_fetch_inferior_registers, child_store_inferior_registers):
13329         Adjust.
13330         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13331         (win32_attach): Pass 1 to do_initial_child_stuff.
13332         (win32_kill): Adjust interface.  Remove process from processes
13333         table.
13334         (win32_detach): Ditto.
13335         (win32_join): Adjust interface.
13336         (win32_thread_alive): Take a ptid.
13337         (win32_resume): Adjust to use ptids.
13338         (get_child_debug_event): Ditto.
13339         (win32_wait): Adjust interface.  Remove exiting process from
13340         processes table.
13341
13342 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13343
13344         Non-stop mode support.
13345
13346         * server.h (non_stop): Declare.
13347         (gdb_client_data, handler_func): Declare.
13348         (delete_file_handler, add_file_handler, start_event_loop):
13349         Declare.
13350         (handle_serial_event, handle_target_event, push_event)
13351         (putpkt_notif): Declare.
13352         * target.h (enum resume_kind): New.
13353         (struct thread_resume): Replace `step' field by `kind' field.
13354         (TARGET_WNOHANG): Define.
13355         (struct target_ops) <wait>: Add `options' argument.
13356         <supports_non_stop, async, start_non_stop>: New fields.
13357         (target_supports_non_stop, target_async): New.
13358         (start_non_stop): Declare.
13359         (mywait): Add `options' argument.
13360         * target.c (mywait): Add `options' argument.  Print child exit
13361         notifications here.
13362         (start_non_stop): New.
13363         * server.c (non_stop, own_buf, mem_buf): New globals.
13364         (struct vstop_notif): New.
13365         (notif_queue): New global.
13366         (queue_stop_reply, push_event, discard_queued_stop_replies)
13367         (send_next_stop_reply): New.
13368         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
13369         interface changes.
13370         (attach_inferior): In non-stop mode, don't wait for the target
13371         here.
13372         (handle_general_set): Handle QNonStop.
13373         (handle_query): When handling qC, return the current general
13374         thread, instead of the first thread of the list.
13375         (handle_query): If the backend supports non-stop mode, include
13376         QNonStop+ in the qSupported query response.
13377         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
13378         and non-stop mode.
13379         (handle_v_attach, handle_v_run): Handle non-stop mode.
13380         (handle_v_stopped): New.
13381         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
13382         (myresume): Adjust to use resume_kind.  Handle non-stop.
13383         (queue_stop_reply_callback): New.
13384         (handle_status): Handle non-stop mode.
13385         (main): Clear non_stop flag on reconnection.  Use the event-loop.
13386         Refactor serial protocol handling from here ...
13387         (process_serial_event): ... to this new function.  When GDB
13388         selects any thread, select one here.  In non-stop mode, wait until
13389         GDB acks all pending events before exiting.
13390         (handle_serial_event, handle_target_event): New.
13391         * remote-utils.c (remote_open): Install remote_desc in the event
13392         loop.
13393         (remote_close): Remove remote_desc from the event loop.
13394         (putpkt_binary): Rename to...
13395         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
13396         (putpkt_binary): New as wrapper around putpkt_binary_1.
13397         (putpkt_notif): New.
13398         (prepare_resume_reply): In non-stop mode, don't change the
13399         general_thread.
13400         * event-loop.c: New.
13401         * Makefile.in (OBJ): Add event-loop.o.
13402         (event-loop.o): New rule.
13403
13404         * linux-low.h (pid_of): Moved here.
13405         (lwpid_of): New.
13406         (get_lwp_thread): Use lwpid_of.
13407         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
13408         * linux-low.c (pid_of): Delete.
13409         (inferior_pid): Use lwpid_of.
13410         (linux_event_pipe): New.
13411         (target_is_async_p): New.
13412         (delete_lwp): New.
13413         (handle_extended_wait): Use lwpid_of.
13414         (add_lwp): Don't set lwpid field.
13415         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
13416         (linux_kill_one_lwp): If killing a running lwp, stop it first.
13417         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
13418         (linux_detach_one_lwp): If detaching from a running lwp, stop it
13419         first.  Adjust to linux_wait_for_event interface changes.  Use
13420         lwpid_of.
13421         (linux_detach): Don't delete the main lwp here.
13422         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
13423         (status_pending_p): Don't consider explicitly suspended lwps.
13424         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13425         pointer.  Add OPTIONS argument.  Change return type to int.  Use
13426         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
13427         (linux_wait_for_event): Take an integer pid instead of a lwp_info
13428         pointer.  Add status pointer argument.  Return a pid instead of a
13429         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
13430         changes.  In non-stop mode, don't switch to a random thread.
13431         (linux_wait): Rename to...
13432         (linux_wait_1): ... this.  Add target_options argument, and handle
13433         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
13434         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
13435         clean exit and signal exit code.  Don't stop all threads in
13436         non-stop mode.  In all-stop mode, only stop all threads when
13437         reporting a stop to GDB.  Handle explicit thread stop requests.
13438         (async_file_flush, async_file_mark): New.
13439         (linux_wait): New.
13440         (send_sigstop): Use lwpid_of.
13441         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
13442         interface changes.  In non-stop mode, don't switch to a random
13443         thread.
13444         (linux_resume_one_lwp): Use lwpid_of.
13445         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13446         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
13447         non-stop mode, don't look for pending flag in all threads.
13448         (resume_status_pending_p): Don't consider explicitly suspended
13449         threads.
13450         (my_waitpid): Reimplement.  Emulate __WALL.
13451         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13452         Use lwpid_of.
13453         (sigchld_handler, linux_supports_non_stop, linux_async)
13454         (linux_start_non_stop): New.
13455         (linux_target_ops): Register linux_supports_non_stop, linux_async
13456         and linux_start_non_stop.
13457         (initialize_low): Install SIGCHLD handler.
13458         * thread-db.c (thread_db_create_event, find_one_thread)
13459         (thread_db_get_tls_address): Use lwpid_of.
13460         * win32-low.c (win32_detach): Adjust to use resume_kind.
13461         (win32_wait): Add `options' argument.
13462         * spu-low.c (spu_resume): Adjust to use resume_kind.
13463         (spu_wait): Add `options' argument.
13464
13465 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13466
13467         Decouple target code from remote protocol.
13468
13469         * target.h (enum target_waitkind): New.
13470         (struct target_waitstatus): New.
13471         (struct target_ops) <wait>: Return an unsigned long.  Take a
13472         target_waitstatus pointer instead of a char pointer.
13473         (mywait): Likewise.
13474         * target.c (mywait): Change prototype to return an unsigned long.
13475         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
13476         * server.h (thread_from_wait, old_thread_from_wait): Delete
13477         declarations.
13478         (prepare_resume_reply): Change prototype to take a
13479         target_waitstatus.
13480         * server.c (thread_from_wait, old_thread_from_wait): Delete.
13481         (last_status, last_ptid): New.
13482         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
13483         pid instead of a signal.
13484         (attach_inferior): Remove "status" and "signal" parameters.
13485         Adjust.
13486         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13487         not as an address.
13488         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13489         (handle_v_requests, myresume): Remove "status" and "signal"
13490         parameters.  Adjust.
13491         (handle_status): New.
13492         (main): Delete local `status'.  Adjust.
13493         * remote-utils.c: Include target.h.
13494         (prepare_resume_reply): Change prototype to take a
13495         target_waitstatus.  Adjust.
13496
13497         * linux-low.c (linux_wait): Adjust to new target_ops->wait
13498         interface.
13499         * spu-low.c (spu_wait): Adjust.
13500         * win32-low.c (enum target_waitkind, struct target_waitstatus):
13501         Delete.
13502         (win32_wait): Adjust.
13503
13504 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13505
13506         * target.h (struct thread_resume): Delete leave_stopped member.
13507         (struct target_ops): Add a `n' argument to the `resume' callback.
13508         * server.c (start_inferior): Adjust.
13509         (handle_v_cont, myresume): Adjust.
13510         * linux-low.c (check_removed_breakpoint): Adjust to resume
13511         interface change, and to removed leave_stopped field.
13512         (resume_ptr): Delete.
13513         (struct thread_resume_array): New.
13514         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
13515         resume interface change.
13516         (linux_continue_one_thread, linux_queue_one_thread)
13517         (resume_status_pending_p): Check if the resume field is NULL
13518         instead of checking the leave_stopped member.
13519         (linux_resume): Adjust to the target resume interface change.
13520         * spu-low.c (spu_resume): Adjust to the target resume interface
13521         change.
13522         * win32-low.c (win32_detach, win32_resume): Ditto.
13523
13524 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13525
13526         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13527         flag.
13528         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13529         pending.
13530         (linux_continue_one_thread): Only preserve the stepping flag if
13531         there's a pending breakpoint.
13532
13533 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
13534
13535         * server.c (main): After the inferior having exited, call
13536         remote_close before exiting gdbserver.
13537
13538 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
13539
13540         Fix size of FPSCR in Power 7 processors.
13541         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13542         (PPC_FEATURE_HAS_DFP): New #define.
13543         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13544         size of the FPSCR.
13545
13546 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
13547
13548         * server.c (handle_query) Whitespace and formatting.
13549
13550 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
13551
13552         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13553         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13554         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13555         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13556         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13557         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13558         Makefile.in, configure.ac: Fix whitespace throughout.
13559         * configure: Regenerate.
13560
13561 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
13562
13563         * inferiors.c (find_inferior): Make it safe for the callback
13564         function to delete the currently iterated inferior.
13565
13566 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
13567
13568         * Makefile.in (linuw_low_h): Move higher.
13569         (thread-db.o): Depend on $(linux_low_h).
13570
13571 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
13572
13573         Rename "process" to "lwp" throughout.
13574
13575         * linux-low.c (all_processes): Rename to...
13576         (all_lwps): ... this.
13577         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13578         (add_process): Rename to ...
13579         (add_lwp): ... this.  Adjust.
13580         (linux_create_inferior): Adjust.
13581         (linux_attach_lwp): Adjust.
13582         (linux_attach): Adjust.
13583         (linux_kill_one_process): Rename to ...
13584         (linux_kill_one_lwp): ... this.  Adjust.
13585         (linux_kill): Adjust.
13586         (linux_detach_one_process): Rename to ...
13587         (linux_detach_one_lwp): ... this.  Adjust.
13588         (linux_detach): Adjust.
13589         (check_removed_breakpoint): Adjust.
13590         (status_pending_p): Adjust.
13591         (linux_wait_for_process): Rename to ...
13592         (linux_wait_for_lwp): ... this.  Adjust.
13593         (linux_wait_for_event): Adjust.
13594         (send_sigstop): Adjust.
13595         (wait_for_sigstop): Adjust.
13596         (stop_all_processes): Rename to ...
13597         (stop_all_lwps): ... this.
13598         (linux_resume_one_process): Rename to ...
13599         (linux_resume_one_lwp): ... this.  Adjust.
13600         (linux_set_resume_request, linux_continue_one_thread)
13601         (linux_queue_one_thread, resume_status_pending_p)
13602         (usr_store_inferior_registers, regsets_store_inferior_registers)
13603         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13604         Adjust.
13605         * linux-low.h (get_process): Rename to ...
13606         (get_lwp): ... this.  Adjust.
13607         (get_thread_process): Rename to ...
13608         (get_thread_lwp): ... this.  Adjust.
13609         (get_process_thread): Rename to ...
13610         (get_lwp_thread): ... this.  Adjust.
13611         (struct process_info): Rename to ...
13612         (struct lwp_info): ... this.
13613         (all_processes): Rename to ...
13614         (all_lwps): ... this.
13615         * proc-service.c (ps_lgetregs): Adjust.
13616         * thread-db.c (thread_db_create_event, find_one_thread)
13617         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13618
13619 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
13620
13621         * server.c (handle_query): Handle "qAttached".
13622
13623 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
13624
13625         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13626         GPLv3, update license URL.
13627
13628 2009-03-01  Doug Evans  <dje@google.com>
13629
13630         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13631         (server_h): Add gdb_signals.h.
13632         (signals.o): Update.
13633         * server.h (target_signal_from_host,target_signal_to_host_p)
13634         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13635
13636 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
13637
13638         * remote-utils.c (getpkt): Also generate remote-debug
13639         information if noack_mode is set.
13640
13641 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
13642
13643         * server.c (handle_query): Report qXfer:siginfo:read and
13644         qXfer:siginfo:write as supported and handle them.
13645         * target.h (struct target_ops) <qxfer_siginfo>: New field.
13646         * linux-low.c (linux_xfer_siginfo): New.
13647         (linux_target_ops): Set it.
13648
13649 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
13650
13651         * server.c (gdbserver_usage): Mention --remote-debug.
13652         (main): Accept '--remote-debug' switch.
13653
13654 2009-01-18  Doug Evans  <dje@google.com>
13655
13656         * regcache.c (new_register_cache): No need to check result of xcalloc.
13657         * server.c (handle_search_memory): Back out calls to xmalloc,
13658         result is checked and error is returned to user upon failure.
13659         (handle_query): Ditto.  Add more checks for result of malloc.
13660         (handle_v_cont): Check result of malloc, report error back to
13661         user upon failure.
13662         (handle_v_run): Ditto.  Call freeargv.
13663         * server.h (freeargv): Declare.
13664         * utils.c (freeargv): New fn.
13665
13666 2009-01-15  Doug Evans  <dje@google.com>
13667
13668         * gdbreplay.c (perror_with_name): Make arg const char *.
13669         * server.h (target_signal_to_name): Make return type const char *.
13670         * thread-db.c (thread_db_err_str): Make return type const char *.
13671         * utils.c (perror_with_name): Make arg const char *.
13672
13673 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
13674
13675         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13676         when handling a EXIT_PROCESS_DEBUG_EVENT.
13677
13678 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
13679
13680         * gdbreplay.c (gdbreplay_version): Update copyright year.
13681         * server.c (gdbserver_version): Likewise.
13682
13683 2009-01-05  Doug Evans  <dje@google.com>
13684
13685         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13686         (handle_extended_wait): Improve comment.
13687
13688 2008-12-13  Doug Evans  <dje@google.com>
13689
13690         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13691         * server.h (ATTR_MALLOC): New macro.
13692         (xmalloc,xcalloc,xstrdup): Declare.
13693         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13694         * inferiors.c: Ditto.
13695         * linux-low.c: Ditto.
13696         * mem-break.c: Ditto.
13697         * regcache.c: Ditto.
13698         * remote-utils.c: Ditto.
13699         * server.c: Ditto.
13700         * target.c: Ditto.
13701         * win32-low.c: Ditto.
13702
13703 2008-12-12  Doug Evans  <dje@google.com>
13704
13705         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13706         in debugging printf.
13707
13708         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13709
13710 2008-12-09  Doug Evans  <dje@google.com>
13711
13712         * linux-low.h (struct process_info): Delete member tid, unused.
13713         * thread-db.c (find_one_thread): Update.
13714         (maybe_attach_thread): Update.
13715
13716 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
13717
13718         * target.h (struct target_ops): Add qxfer_osdata member.
13719         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13720         and dirent.h.
13721         (linux_qxfer_osdata): New functions.
13722         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13723         callback.
13724         * server.c (handle_query): Handle "qXfer:osdata:read:".
13725         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13726         (buffer_xml_printf): New functions.
13727         * server.h (struct buffer): New.
13728         (buffer_grow_str, buffer_grow_str0): New macros.
13729         (buffer_grow, buffer_free, buffer_init, buffer_finish)
13730         (buffer_xml_printf): Declare.
13731
13732 2008-11-24  Doug Evans  <dje@google.com>
13733
13734         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13735
13736 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
13737
13738         * server.c (handle_v_run): Always use the supplied argument list.
13739
13740 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
13741
13742         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13743         (xtensa_regmap_table): Add entry for scompare1.
13744
13745 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
13746
13747         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13748         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13749         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13750         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13751         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13752         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13753         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13754         XML target descriptions.
13755         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13756         when inferior is running on an ISA 2.05 or later processor.  Add
13757         special case to return offset for full 64-bit slot of FPSCR when
13758         in 32-bits.
13759
13760 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
13761
13762         * Makefile.in (SFILES, clean): Added sparc64 files.
13763         (reg-sparc64.o, reg-sparc64.c): New.
13764         * configure.srv (sparc*-*-linux*): New configuration.
13765         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13766         syscall arguments for SPARC.
13767         (regsets_store_inferior_registers): Likewise.
13768         * linux-sparc-low.c: New file.
13769
13770 2008-10-21  Doug Evans  <dje@google.com>
13771
13772         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13773         (READLINE_DIR,READLINE_DEP): Delete.
13774         (INTERNAL_CFLAGS): Update.
13775         (LINTFLAGS): Update.
13776
13777 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
13778
13779         * server.c (handle_v_run): If GDB didn't specify an argv, use the
13780         whole argv from the last run, not just argv[0].
13781
13782 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
13783
13784         * regcache.c (new_register_cache): Return NULL if the register
13785         cache size isn't known yet.
13786         (free_register_cache): Avoid dereferencing a NULL regcache.
13787
13788 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
13789
13790         * configure.srv: Merge MIPS and MIPS64.
13791
13792 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
13793
13794         * Makefile.in (uninstall): Apply $(EXEEXT) too.
13795
13796 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
13797
13798         * Makefile.in: Add required vsx dependencies.
13799
13800         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13801         Declare init_registers_powerpc_vsx32l.
13802         Declare init_registers_powerpc_vsx64l.
13803         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13804         (ppc_arch_setup): Check for VSX in hwcap.
13805         (ppc_fill_vsxregset): New function.
13806         (ppc_store_vsxregset): New function.
13807         Add new VSX entry in regset_info target_regsets.
13808
13809         * configure.srv: Add new VSX dependencies.
13810
13811 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
13812
13813         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13814         (remote_open): Set or clear transport_is_reliable.
13815         (putpkt_binary): Don't expect acks in noack mode.
13816         (getpkt): Don't send ack/nac in noack mode.
13817         * server.c (handle_general_set): Handle QStartNoAckMode.
13818         (handle_query): If connected by tcp pass QStartNoAckMode+ in
13819         qSupported.
13820         (main): Reset noack_mode on every connection.
13821         * server.h (noack_mode): Declare.
13822
13823 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13824
13825         * Makefile.in (GDBREPLAY_OBS): New variable.
13826         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13827
13828 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
13829             Daniel Jacobowitz  <dan@codesourcery.com>
13830
13831         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13832         (usr_store_inferior_registers): Likewise.
13833         (regsets_store_inferior_registers): Likewise.
13834
13835 2008-07-31  Rolf Jansen  <rj@surtec.com>
13836             Pedro Alves  <pedro@codesourcery.com>
13837
13838         * configure.ac: Check for memmem declaration.
13839         * server.c [HAVE_MALLOC_H]: Include malloc.h.
13840         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13841         (disable_packet_qfThreadInfo): Unconditionally compile.
13842         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13843         * configure, config.in: Regenerate.
13844
13845 2008-07-28  Doug Kwan  <dougkwan@google.com>
13846
13847         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13848         (linux_write_memory): Remove declaration of errno.
13849
13850 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
13851
13852         * linux-low.c (handle_extended_wait): Do not use "status"
13853         variable uninitialized.
13854
13855 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
13856
13857         * server.c (handle_v_attach): Inhibit reporting dll changes.
13858
13859 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
13860
13861         * remote-utils.c (prepare_resume_reply): If requested, don't
13862         output "thread:TID" in the T stop reply.
13863
13864         * server.c (disable_packet_vCont, disable_packet_Tthread)
13865         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13866         (handle_query): If requested, disable support for qC, qfThreadInfo
13867         and qsThreadInfo.
13868         (handle_v_requests): If requested, disable support for vCont.
13869         (gdbserver_show_disableable): New.
13870         (main): Handle --disable-packet and --disable-packet=LIST.
13871
13872         * server.h (disable_packet_vCont, disable_packet_Tthread)
13873         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13874
13875 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
13876
13877         * server.c (gdbserver_usage): Mention --version.
13878
13879 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
13880
13881         * Makefile.in (gdbreplay.o): New rule.
13882
13883 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
13884
13885         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13886         message, not gdbserver.
13887
13888 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
13889             Nathan Sidwell  <nathan@codesourcery.com>
13890             Joseph Myers  <joseph@codesourcery.com>
13891
13892         * acinclude.m4: Include ../../config/acx.m4.
13893         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13894         * configure, config.in: Regenerate.
13895         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13896         * server.c (gdbserver_version): Print PKGVERSION.
13897         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
13898         (main): Adjust gdbserver_usage calls.
13899         * gdbreplay.c (version, host_name): Add declarations.
13900         (gdbreplay_version, gdbreplay_usage): New.
13901         (main): Accept --version and --help options.
13902
13903 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
13904
13905         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13906         (arm_breakpoint_at): Handle Thumb.
13907         (the_low_target): Add comment.
13908
13909 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
13910
13911         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13912
13913 2008-05-09  Doug Evans  <dje@google.com>
13914
13915         * server.h (decode_search_memory_packet): Declare.
13916         * remote-utils.c (decode_search_memory_packet): New fn.
13917         * server.c (handle_search_memory_1): New fn.
13918         (handle_search_memory): New fn.
13919         (handle_query): Process qSearch:memory packets.
13920
13921 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
13922
13923         * regcache.c (registers_length): Remove.
13924         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13925         full register packet.
13926         * regcache.h (registers_length): Remove prototype.
13927         * server.h (PBUFSIZ): Define to 16384.
13928
13929 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
13930
13931         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13932         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13933         powerpc-64l.o, and powerpc-altivec64l.o.
13934         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13935         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13936         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13937         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13938         rs6000/power-linux.xml, and rs6000/power64-linux.xml
13939         to srv_xmlfiles.
13940
13941         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13942         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13943         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13944         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13945         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13946         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13947         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13948         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13949         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13950         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13951         (clean): Update.
13952
13953         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13954         (init_registers_powerpc_32l): ... this new prototype.
13955         (init_registers_powerpc_32): Remove, replace by ...
13956         (init_registers_powerpc_altivec32l): ... this new prototype.
13957         (init_registers_powerpc_e500): Remove, replace by ...
13958         (init_registers_powerpc_e500l): ... this new prototype.
13959         (init_registers_ppc64): Remove, replace by ...
13960         (init_registers_powerpc_64l): ... this new prototype.
13961         (init_registers_powerpc_64): Remove, replace by ...
13962         (init_registers_powerpc_altivec64l): ... this new prototype.
13963         (ppc_num_regs): Set to 73.
13964         (PT_ORIG_R3, PT_TRAP): Define if necessary.
13965         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13966         (ppc_cannot_store_register): Handle orig_r3 and trap.
13967         (ppc_arch_setup): Update init_registers_... calls.
13968         (ppc_fill_gregset): Handle orig_r3 and trap.
13969
13970         * inferiors.c (clear_inferiors): Reset current_inferior.
13971
13972 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
13973
13974         * acinclude.m4: Add override.m4.
13975         * configure: Regenerate.
13976
13977 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
13978
13979         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13980         initial call to init_register_ppc64.
13981
13982 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
13983
13984         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13985         single powerpc*-*-linux* case.
13986         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13987
13988 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
13989
13990         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13991         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13992         from reg_xmlfiles.
13993         * linux-ppc-low.c: Include <elf.h>.
13994         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13995         (ppc_hwcap): New global variable.
13996         (ppc_regmap): Remove __SPE__ #ifdef sections.
13997         (ppc_regmap_e500): New global variable.
13998         (ppc_cannot_store_register): Update __SPE__ special case.
13999         (ppc_get_hwcap): New function.
14000         (ppc_arch_setup): Use it to determine whether inferior supports
14001         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
14002         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14003         Do not access registers if target does not support AltiVec.
14004         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14005         Do not access registers if target does not support SPE.
14006         (target_regsets): Unconditionally include AltiVec and SPE regsets.
14007
14008 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
14009
14010         * linux-low.c (disabled_regsets, num_regsets): New.
14011         (use_regsets_p): Delete.
14012         (linux_wait_for_process): Clear disabled_regsets.
14013         (regsets_fetch_inferior_registers): Check and set it.
14014         (regsets_store_inferior_registers): Likewise.
14015         (linux_fetch_registers, linux_store_registers): Do not use
14016         use_regsets_p.
14017         (initialize_low): Allocate disabled_regsets.
14018
14019 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
14020
14021         * Makefile.in (LIBOBJS): New.
14022         (OBS): Use LIBOBJS.
14023         (memmem.o): New rule.
14024         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14025         * configure: Regenerated.
14026
14027 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
14028
14029         * server.c (handle_query): Never return "unsupported" for
14030         qXfer:features:read queries.
14031
14032 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
14033
14034         * server.c (get_features_xml): Fix inverted condition.
14035         (handle_query): Always support qXfer:feature:read.
14036
14037 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
14038
14039         * server.c (wrapper_argv): New.
14040         (start_inferior): Handle wrapper_argv.  If set, expect an extra
14041         trap.
14042         (gdbserver_usage): Document --wrapper.
14043         (main): Parse --wrapper.
14044
14045 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14046
14047         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14048         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14049         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14050         (ppc_set_pc): Likewise.
14051         (ppc_arch_setup): New function.
14052         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14053         of collect_register.
14054         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14055
14056 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14057
14058         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14059         instead of linux-ppc64-low.o.
14060         * linux-ppc64-low.c: Remove file.
14061         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14062         (linux-ppc64-low.o): Remove rule.
14063
14064         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14065         (init_registers_powerpc_64): Likewise.
14066         (ppc_regmap): Conditionally define depending on __powerpc64__.
14067         (ppc_cannot_store_register): Do not special-case "fpscr" when
14068         compiled on __powerpc64__.
14069         (ppc_collect_ptrace_register): New function.
14070         (ppc_supply_ptrace_register): New function.
14071         (ppc_breakpoint): Change type to "unsigned int".
14072         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14073         (the_low_target): Conditionally provide initializers for the
14074         arch_setup member depending on __powerpc64__.  Install
14075         collect_ptrace_register and supply_ptrace_register members.
14076
14077 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14078
14079         * regcache.h (gdbserver_xmltarget): Add extern declaration.
14080         * server.c (gdbserver_xmltarget): Define.
14081         (get_features_xml): Use it to replace "target.xml" and arch_string.
14082
14083         * configure.srv: Remove srv_xmltarget.  Add XML files that were
14084         mentioned there to srv_xmlfiles instead.  Remove conditional tests
14085         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14086         srv_xmlfiles and srv_regobj to include all possible choices.
14087         * configure.ac (srv_xmltarget): Remove.
14088         (srv_xmlfiles): Do not add "target.xml".
14089         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14090         checks for supplementary target information.
14091         * configure: Regenerate.
14092         * Makefile.in (XML_TARGET): Remove.
14093         (target.xml): Remove rule.
14094         (clean): Do not clean up target.xml.
14095         (.PRECIOUS): Do not mention target.xml.
14096
14097         * target.h (struct target_ops): Remove arch_string member.
14098         * linux-low.c (linux_arch_string): Remove.
14099         (linux_target_ops): Remove arch_string initializer.
14100         * linux-low.h (struct linux_target_ops): Remove arch_string member.
14101         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14102         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14103         * spu-low.c (spu_arch_string): Remove.
14104         (spu_target_ops): Remove arch_string initializer.
14105         * win32-low.c (win32_arch_string): Remove.
14106         (win32_target_ops): Remove arch_string initializer.
14107         * win32-low.h (struct win32_target_ops): Remove arch_string member.
14108         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14109         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14110
14111 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14112
14113         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14114         by collect_ptrace_register and supply_ptrace_register hooks.
14115         * linux-low.c (fetch_register): Use supply_ptrace_register callback
14116         instead of checking for the_low_target.left_pad_xfer.
14117         (usr_store_inferior_registers): Use collect_ptrace_register callback
14118         instead of checking for the_low_target.left_pad_xfer.
14119
14120         * linux-s390-low.c (s390_collect_ptrace_register): New function.
14121         (s390_supply_ptrace_register): Likewise.
14122         (s390_fill_gregset): Call s390_collect_ptrace_register.
14123         (the_low_target): Update.
14124
14125         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14126         (ppc_supply_ptrace_register): Likewise.
14127         (the_low_target): Update.
14128
14129         * linux-i386-low.c (the_low_target): Update.
14130         * linux-x86-64-low.c (the_low_target): Update.
14131
14132 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14133
14134         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14135         reg-s390.o and reg-s390x.o.
14136
14137         * linux-low.c (new_inferior): New global variable.
14138         (linux_create_inferior, linux_attach): Set it.
14139         (linux_wait_for_process): Call the_low_target.arch_setup after the
14140         target has stopped for the first time.
14141         (initialize_low): Do not call the_low_target.arch_setup.
14142
14143         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14144         (s390_set_pc): Likewise.
14145         (s390_arch_setup): New function.
14146         (the_low_target): Use s390_arch_setup as arch_setup routine.
14147
14148         * regcache.c (realloc_register_cache): New function.
14149         (set_register_cache): Call it for each existing regcache.
14150
14151 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14152
14153         * server.h (init_registers): Remove prototype.
14154
14155         * linux-low.h (struct linux_target_ops): Add arch_setup field.
14156         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14157         instead of init_registers ().
14158         * linux-arm-low.c (init_registers_arm): Add prototype.
14159         (init_registers_arm_with_iwmmxt): Likewise.
14160         (the_low_target): Add initializer for arch_setup field.
14161         * linux-cris-low.c (init_registers_cris): Add prototype.
14162         (the_low_target): Add initializer for arch_setup field.
14163         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14164         (the_low_target): Add initializer for arch_setup field.
14165         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14166         (the_low_target): Add initializer for arch_setup field.
14167         * linux-ia64-low.c (init_registers_ia64): Add prototype.
14168         (the_low_target): Add initializer for arch_setup field.
14169         * linux-m32r-low.c (init_registers_m32r): Add prototype.
14170         (the_low_target): Add initializer for arch_setup field.
14171         * linux-m68k-low.c (init_registers_m68k): Add prototype.
14172         (the_low_target): Add initializer for arch_setup field.
14173         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14174         (init_registers_mips64_linux): Likewise.
14175         (the_low_target): Add initializer for arch_setup field.
14176         * linux-ppc-low.c (init_registers_ppc): Add prototype.
14177         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14178         (the_low_target): Add initializer for arch_setup field.
14179         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14180         (init_registers_powerpc_64): Likewise.
14181         (the_low_target): Add initializer for arch_setup field.
14182         * linux-s390-low.c (init_registers_s390): Add prototype.
14183         (init_registers_s390x): Likewise.
14184         (the_low_target): Add initializer for arch_setup field.
14185         * linux-sh-low.c (init_registers_sh): Add prototype.
14186         (the_low_target): Add initializer for arch_setup field.
14187         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14188         (the_low_target): Add initializer for arch_setup field.
14189         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14190         (the_low_target): Add initializer for arch_setup field.
14191
14192         * win32-low.h (struct win32_target_ops): Add arch_setup field.
14193         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14194         instead of init_registers ().
14195         * win32-arm-low.c (init_registers_arm): Add prototype.
14196         (the_low_target): Add initializer for arch_setup field.
14197         * win32-i386-low.c (init_registers_i386): Add prototype.
14198         (the_low_target): Add initializer for arch_setup field.
14199
14200         * spu-low.c (init_registers_spu): Add prototype.
14201         (initialize_low): Call initialie_registers_spu () instead of
14202         initialize_registers ().
14203
14204 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
14205
14206         * server.c (handle_v_requests): When handling the vRun and vAttach
14207         packets, if already debugging a process, don't kill it.  Return an
14208         error instead.
14209
14210 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
14211
14212         * server.c (handle_query): Correct length check.
14213
14214 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
14215
14216         * win32-low.c (do_initial_child_stuff): Add process handle
14217         parameter.  Set current_process_handle and current_process_id from the
14218         parameters. Clear globals.
14219         (win32_create_inferior): Don't set current_process_handle and
14220         current_process_id here.  Instead pass them on the call to
14221         do_initial_child_stuff.
14222         (win32_attach): Likewise.
14223         (win32_clear_inferiors): New.
14224         (win32_kill): Don't close the current process handle or the
14225         current thread handle here.  Instead call win32_clear_inferiors.
14226         (win32_detach): Don't open a new handle to the process.  Call
14227         win32_clear_inferiors.
14228         (win32_join): Don't rely on current_process_handle; open a new
14229         handle using the process id.
14230         (win32_wait): Call win32_clear_inferiors when the inferior process
14231         has exited.
14232
14233 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
14234
14235         * server.c (monitor_show_help): Add "exit".
14236
14237 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
14238
14239         * Makefile.in (SFILES): Add linux-xtensa-low.c.
14240         (clean): Add reg-xtensa.c.
14241         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14242         * configure.srv (xtensa*-*-linux*) New target.
14243         * linux-xtensa-low.c: New.
14244         * xtensa-xtregs.c: New.
14245
14246 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
14247
14248         * hostio.c: Don't include errno.h.
14249         (errno_to_fileio_errno): Move to hostio-errno.
14250         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
14251         error number outputting to the target->hostio_last_error callback.
14252         (hostio_packet_error): Use FILEIO_EINVAL directly.
14253         (handle_open, handle_pread, hostio_error, handle_unlink): Update
14254         calls to hostio_error.
14255         * hostio-errno.c: New.
14256         * server.h (hostio_last_error_from_errno): Declare.
14257         * target.h (target_ops): Add hostio_last_error member.
14258         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14259         as hostio_last_error handler.
14260         * spu-low.c (spu_target_ops): Likewise.
14261         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14262         (wince_hostio_last_error): New functions.
14263         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14264         as hostio_last_error handler.
14265         (win32_target_ops) [!_WIN32_WCE]: Register
14266         hostio_last_error_from_errno as hostio_last_error handler.
14267         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14268         (hostio-errno.o): New rule.
14269         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14270         * configure.srv (srv_hostio_err_objs): New variable.  Default to
14271         hostio-errno.o.
14272         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14273         * configure: Regenerate.
14274
14275 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
14276
14277         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14278         (linux_kill, linux_detach): Clean up the process list.
14279         * remote-utils.c (remote_open): Improve port number parsing.
14280         (putpkt_binary, input_interrupt): Only send interrupts if the target
14281         is running.
14282         * server.c (extended_protocol): Make static.
14283         (attached): Define earlier.
14284         (exit_requested, response_needed, program_argv): New variables.
14285         (target_running): New.
14286         (start_inferior): Clear attached here.
14287         (attach_inferior): Set attached here.
14288         (require_running): Define.
14289         (handle_query): Use require_running and target_running.  Implement
14290         "monitor exit".
14291         (handle_v_attach, handle_v_run): New.
14292         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
14293         (gdbserver_usage): Update.
14294         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
14295         --attach along with other options or after the port.  Save
14296         program_argv.  Support no initial program.  Resynchronize
14297         communication with GDB after an error.  Handle "monitor exit".
14298         Use require_running and target_running.  Always allow the extended
14299         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
14300         restart in extended mode.
14301         * README: Refer to the GDB manual.  Update --attach usage.
14302
14303 2007-12-20  Andreas Schwab  <schwab@suse.de>
14304
14305         * linux-low.c (STACK_SIZE): Define.
14306         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
14307         (linux_test_for_tracefork): Likewise.
14308
14309 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
14310
14311         * linux-low.c (linux_wait_for_event): Update messages.  Do not
14312         reinsert auto-delete breakpoints.
14313         * mem-break.c (struct breakpoint): Change return type of handler to
14314         int.
14315         (set_breakpoint_at): Update handler type.
14316         (reinsert_breakpoint_handler): Return 1 instead of calling
14317         delete_breakpoint.
14318         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14319         setting a new one.
14320         (check_breakpoints): Delete auto-delete breakpoints and return 2.
14321         * mem-break.h (set_breakpoint_at): Update handler type.
14322         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14323         * win32-low.c (auto_delete_breakpoint): New.
14324         (get_child_debug_event): Use it.
14325
14326 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
14327
14328         * configure.ac: Check for pread and pwrite.
14329         * hostio.c (handle_pread): Fall back to lseek and read.
14330         (handle_pwrite): Fall back to lseek and write.
14331         * config.in, configure: Regenerated.
14332
14333 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
14334
14335         * server.c (myresume): Add own_buf argument.
14336         (main): Update calls.
14337
14338 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
14339
14340         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14341         * remote-utils.c (remote_open): Do not call disable_async_io.
14342         (block_async_io): Delete.
14343         (unblock_async_io): Make static.
14344         (initialize_async_io): New.
14345         * server.c (handle_v_cont): Handle async I/O here.
14346         (myresume): Likewise.  Move other common resume tasks here...
14347         (main): ... from here.  Call initialize_async_io.  Disable async
14348         I/O before the main loop.
14349         * server.h (initialize_async_io): Declare.
14350         (block_async_io, unblock_async_io): Delete prototypes.
14351         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14352
14353 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
14354
14355         * remote-utils.c (readchar): Allow binary data in received messages.
14356
14357 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14358
14359         * win32-low.c (attaching): New global.
14360         (win32_create_inferior): Clear the `attaching' global.
14361         (win32_attach): Set the `attaching' global.
14362         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14363         attaching.  Only set a breakpoint at the entry point if not
14364         attaching.
14365
14366 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14367
14368         * server.c (main): Don't report dll events on the initial
14369         connection on attaches.
14370
14371 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14372
14373         * server.c (main): Relax numerical bases supported for the pid of
14374         the --attach command line argument.
14375
14376 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14377
14378         * win32-low.c (win32_attach): Call OpenProcess before
14379         DebugActiveProcess, not after.  Add last error output to error
14380         call.
14381
14382 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14383
14384         * win32-low.c (win32_get_thread_context)
14385         (win32_set_thread_context): New functions.
14386         (thread_rec): Use win32_get_thread_context.
14387         (continue_one_thread, win32_resume): Use win32_set_thread_context.
14388         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14389         field.
14390
14391 2007-12-03  Leo Zayas
14392             Pedro Alves  <pedro_alves@portugalmail.pt>
14393
14394         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14395         global variables.
14396         (child_add_thread): Minor cleanup.
14397         (child_continue): Resume artificially suspended threads before
14398         calling ContinueDebugEvent.
14399         (suspend_one_thread): New.
14400         (fake_breakpoint_event): New.
14401         (get_child_debug_event): Change return type to int.  Check here if
14402         gdb sent an interrupt request.  If a soft interrupt was requested,
14403         fake a breakpoint event.  Return 0 if there is no event to handle,
14404         and 1 otherwise.
14405         (win32_wait): Don't check here if gdb sent an interrupt request.
14406         Ensure there is a valid event to handle.
14407         (win32_request_interrupt): Add soft interruption method as last
14408         resort.
14409
14410 2007-12-03  Leo Zayas
14411             Pedro Alves  <pedro_alves@portugalmail.pt>
14412
14413         * win32-low.h (win32_thread_info): Add descriptions to the
14414         structure members.  Replace `suspend_count' counter by a
14415         `suspended' flag.
14416         * win32-low.c (thread_rec): Update condition of when to get the
14417         context from the inferior.  Rely on ContextFlags being set if it
14418         has already been retrieved.  Only suspend the inferior thread if
14419         we haven't already.  Warn if that fails.
14420         (continue_one_thread): s/suspend_count/suspended/.  Only call
14421         ResumeThread once.  Warn if that fails.
14422
14423 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
14424
14425         * win32-low.c (win32_wait): Don't read from the inferior when it
14426         has already exited.
14427
14428 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
14429
14430         * Makefile.in (win32_low_h): New variable.
14431         (win32-low.o): Add dependency on $(win32_low_h).
14432         (win32-arm-low.o, win32-i386-low.o): New rules.
14433
14434 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
14435
14436         * hostio.c: Correct copyright year.
14437
14438 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
14439
14440         * Makefile.in (OBS): Add hostio.o.
14441         (hostio.o): New rule.
14442         * server.h (handle_vFile): Declare.
14443         * hostio.c: New file.
14444         * server.c (handle_v_requests): Take packet_len and new_packet_len
14445         for binary packets.  Call handle_vFile.
14446         (main): Update call to handle_v_requests.
14447
14448 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
14449
14450         * linux-low.c: Include <sched.h>.
14451
14452 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
14453
14454         * linux-low.c (linux_tracefork_grandchild): New.
14455         (linux_tracefork_child): Use clone.
14456         (linux_test_for_tracefork): Use clone; allocate and free a stack.
14457
14458 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
14459
14460         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14461
14462 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
14463
14464         * linux-low.c (handle_extended_wait): Handle unexpected signals.
14465
14466 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
14467
14468         * inferiors.c (change_inferior_id): Delete.
14469         (add_pid_to_list, pull_pid_from_list): New.
14470         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14471         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14472         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14473         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14474         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14475         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14476         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14477         (using_threads): Always set to 1.
14478         (handle_extended_wait): New.
14479         (add_process): Do not set TID.
14480         (linux_create_inferior): Set must_set_ptrace_flags.
14481         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
14482         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
14483         (linux_thread_alive): Rename TID argument to LWPID.
14484         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
14485         (linux_wait_for_event): Do not use TID or check using_threads.  Update
14486         call to dead_thread_notify.  Call handle_extended_wait.
14487         (linux_create_inferior): Use PTRACE_SETOPTIONS.
14488         (send_sigstop): Delete sigstop_sent.
14489         (wait_for_sigstop): Avoid TID.
14490         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14491         (linux_test_for_tracefork): New.
14492         (linux_lookup_signals): Use thread_db_active and
14493         linux_supports_tracefork_flag.
14494         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14495         * linux-low.h (get_process_thread): Avoid TID.
14496         (struct process_ifo): Move thread_known and tid to the end.  Remove
14497         sigstop_sent.
14498         (linux_attach_lwp, thread_db_init): Update prototypes.
14499         * server.h (change_inferior_id): Delete prototype.
14500         (add_pid_to_list, pull_pid_from_list): New prototypes.
14501         * thread-db.c (thread_db_use_events): New.
14502         (find_first_thread): Rename to...
14503         (find_one_thread): ...this.  Update callers and messages.  Do not
14504         call fatal.  Check thread_db_use_events.  Do not call
14505         change_inferior_id or new_thread_notify.
14506         (maybe_attach_thread): Update.  Do not call new_thread_notify.
14507         (thread_db_init): Set thread_db_use_events.  Check use_events.
14508         * utils.c (fatal, warning): Correct message prefix.
14509
14510 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
14511
14512         * Makefile.in (clean): Remove new files.
14513         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14514         (powerpc-64.o, powerpc-64.c): New rules.
14515         * configure.srv: Use alternate register sets for powerpc64-*-linux*
14516         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14517         with SPE.
14518         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14519         SPE targets.
14520         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14521         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14522         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14523         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14524         (target_regsets): Add AltiVec and SPE register sets.
14525         * configure.ac: Check for AltiVec and SPE.
14526         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14527         (ppc_fill_vrregset, ppc_store_vrregset): New.
14528         (target_regsets): Add AltiVec register set.
14529         * configure: Regenerated.
14530
14531 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
14532
14533         * linux-low.c (O_LARGEFILE): Define.
14534         (linux_read_memory): Use /proc/PID/mem.
14535         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
14536         * configure, config.in: Regenerated.
14537
14538 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
14539
14540         * linux-low.c (linux_wait_for_event): Do not pass signals while
14541         single-stepping.
14542
14543 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14544
14545         * win32-low.c (create_process): New.
14546         (win32_create_inferior): Use create_process instead of
14547         CreateProcess.  If create_process failed retry appending an ".exe"
14548         suffix.  Store the GetLastError result immediatelly after
14549         create_process calls and use it on the call to error.
14550
14551 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14552
14553         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14554
14555 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
14556
14557         * configure.ac: Switch license to GPLv3.
14558
14559 2007-08-01  Michael Snyder  <msnyder@access-company.com>
14560
14561         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14562
14563 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
14564
14565         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14566         typedef.
14567         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14568         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
14569         CloseToolhelp32Snapshot.
14570         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14571         CloseToolhelp32Snapshot.
14572
14573 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
14574
14575         * server.c (main): Check for inferior exit before main loop.
14576
14577 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
14578
14579         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14580         instead of on tmp_desc.
14581
14582 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
14583             Daniel Jacobowitz  <dan@codesourcery.com>
14584
14585         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14586         (add_thread): Minor cleanups.
14587         (clear_inferiors): Move lower in the file.  Clear the DLL
14588         list.
14589         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14590         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14591         (xml_escape_text): New.
14592         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
14593         for qSupported.
14594         (handle_v_cont): Report errors.
14595         (gdbserver_version): Update.
14596         (main): Correct size of own_buf.  Do not report initial DLL events.
14597         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14598         (unloaded_dll, xml_escape_text): New.
14599         * win32-low.c (enum target_waitkind): Update comments.
14600         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14601         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14602         (win32_EnumProcessModules, win32_GetModuleInformation)
14603         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14604         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14605         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14606         (win32_Module32First, win32_Module32Next, load_toolhelp)
14607         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14608         (get_child_debug_event): Handle DLL events.
14609         (win32_wait): Likewise.
14610
14611 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
14612
14613         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14614         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14615
14616 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
14617
14618         * win32-low.c (handle_output_debug_string): Ignore event if not
14619         waiting.
14620
14621 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
14622
14623         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14624
14625 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
14626
14627         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14628
14629 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
14630
14631         * inferiors.c (change_inferior_id): Add comment.
14632         * linux-low.c (check_removed_breakpoint): Add an early
14633         prototype.  Improve debug output.
14634         (linux_attach): Doc update.
14635         (linux_detach_one_process, linux_detach): Clean up before releasing
14636         each process.
14637         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14638         * linux-low.h (struct process_info): Doc improvement.
14639         * mem-break.c (delete_all_breakpoints): New.
14640         * mem-break.h (delete_all_breakpoints): New prototype.
14641         * thread-db.c (find_first_thread): New.
14642         (thread_db_create_event): Call it instead of
14643         thread_db_find_new_threads.  Clean up unused variables.
14644         (maybe_attach_thread): Remove first thread handling.
14645         (thread_db_find_new_threads): Use find_first_thread.
14646         (thread_db_get_tls_address): Likewise.
14647
14648 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
14649
14650         * thread-db.c (thread_db_find_new_threads): Add prototype.
14651         (thread_db_create_event): Check for the main thread before adding
14652         a new thread.
14653         (maybe_attach_thread): Only enable event reporting if TID == 0.
14654         (thread_db_get_tls_address): Check for new threads.
14655
14656 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
14657
14658         * linux-low.c (linux_create_inferior): Try execv before execvp.
14659         * spu-low.c (spu_create_inferior): Likewise.
14660
14661 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
14662
14663         * linux-low.c (linux_create_inferior): Change execv to execvp.
14664         * spu-low.c (spu_create_inferior): Likewies.
14665
14666 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
14667
14668         * Makefile.in (clean): Clean new files instead of deleted ones.
14669         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14670         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14671         rules.
14672         * configure.srv: Specify XML files and new regformats for MIPS and
14673         MIPS64 GNU/Linux.
14674         * linux-mips-low.c (mips_num_regs): Set to only used registers.
14675         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
14676         an entry for the restart register.
14677         (mips_cannot_fetch_register, mips_cannot_store_register)
14678         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14679         register names to match the XML descriptions.
14680         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
14681         restart register instead of $0.
14682
14683 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
14684             Markus Deuling  <deuling@de.ibm.com>
14685
14686         * remote-utils.c (decode_xfer_write): New function.
14687         * server.h (decode_xfer_write): Add prototype.
14688         * server.c (handle_query): Add PACKET_LEN argument.  Support
14689         qXfer:spu:read and qXfer:spu:write packets.
14690         (main): Pass packet_len to handle_query.
14691         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14692         * target.h (target_ops): Add qxfer_spu.
14693
14694 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
14695
14696         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14697         accessing non-seekable spufs files.
14698
14699 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
14700
14701         * server.c (handle_query): Add reply for qC packet.
14702
14703 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14704             Leo Zayas  <lerele@champenstudios@com>
14705
14706         * server.h (check_remote_input_interrupt_request): New function.
14707         * remote_utils.c (INVALID_DESCRIPTOR): New define.
14708         (remote_desc): Initialize with INVALID_DESCRIPTOR.
14709         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
14710         (check_remote_input_interrupt_request): New function.
14711         * server.h (check_remote_input_interrupt_request): Declare.
14712         * win32-low.c (winapi_DebugBreakProcess,
14713         winapi_GenerateConsoleCtrlEvent): New typedefs.
14714         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14715         to 250 ms.
14716         (win32_wait): Check for remote interrupt request
14717         with check_remote_input_interrupt_request.
14718         (win32_request_interrupt): New function.
14719         (win32_target_op): Set request_interrupt to win32_request_interrupt.
14720
14721 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14722
14723         * win32-low.c (debug_registers_changed,
14724         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14725         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14726         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14727         (thread_rec): Get context using the low target.
14728         (child_add_thread): Call thread_added on the low target,
14729         which does the same thing.
14730         (regptr): Delete.
14731         (do_initial_child_stuff): Remove debug registers references.
14732         Set context using the low target.  Resume threads after
14733         setting the contexts.
14734         (child_continue): Remove dead variable.  Remove debug
14735         registers references.
14736         (child_fetch_inferior_registers): Go through the low target.
14737         (do_child_store_inferior_registers): Remove.
14738         (child_store_inferior_registers): Go through the low target.
14739         (win32_resume): Remove debug registers references.
14740         Set context using the low target.
14741         (handle_exception): Change return type to void.  Don't record
14742         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
14743         first chance exception.
14744         (get_child_debug_event): Change return type to void.  Remove
14745         goto loop.  Always return after waiting for debug event.
14746         (win32_wait): Convert to switch statement.  Handle spurious
14747         events.
14748
14749         * win32-i386-low.c (debug_registers_changed,
14750         debug_registers_used): New.
14751         (initial_stuff): Rename to ...
14752         (i386_initial_stuff): ... this.  Clear debug registers
14753         state variables.
14754         (store_debug_registers): Delete.
14755         (i386_get_thread_context): New.
14756         (load_debug_registers): Delete.
14757         (i386_set_thread_context): New.
14758         (i386_thread_added): New.
14759         (single_step): Rename to ...
14760         (i386_single_step): ... this.
14761         (do_fetch_inferior_registers): Rename to ...
14762         (i386_fetch_inferior_register): ... this.
14763         (i386_store_inferior_register): New.
14764         (the_low_target): Adapt to new interface.
14765
14766         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14767         (arm_get_thread_context): New.
14768         (arm_set_thread_context): New.
14769         (regptr): New.
14770         (do_fetch_inferior_registers): Rename to ...
14771         (arm_fetch_inferior_register): ... this.
14772         (arm_store_inferior_register): New.
14773         (arm_wince_breakpoint): Reimplement as unsigned long.
14774         (arm_wince_breakpoint_len): Define.
14775         (the_low_target): Adapt to new interface.
14776
14777         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14778         load_debug_registers.  Add get_thread_context, set_thread_context,
14779         thread_added and store_inferior_register.  Rename
14780         fetch_inferior_registers to fetch_inferior_register.
14781         (regptr): Remove declaration.
14782
14783 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14784
14785         * linux-low.c (linux_detach): Change return type to int.  Return 0.
14786         * spu-low.c (spu_detach): Likewise.
14787
14788 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14789
14790         * target.h (target_ops): Change return type of detach to int.
14791         Add join.
14792         (join_inferior): New.
14793         * server.c (main): Don't skip detach support on mingw32.
14794         If the inferior doesn't support detaching return error.
14795         Call join_inferior instead of using waitpid.
14796         * linux-low.c (linux_join): New.
14797         (linux_target_op): Add linux_join.
14798         * spu-low.c (spu_join): New.
14799         (spu_target_ops): Add spu_join.
14800         * win32-low.c (win32_detach): Adapt to new interface.
14801         Reopen current_process_handle before detaching.  Issue a child
14802         resume before detaching.
14803         (win32_join): New.
14804         (win32_target_op): Add win32_join.
14805
14806 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14807
14808         * win32-low.c (win32-attach): Fix return value.
14809         * target.h (target_ops): Describe ATTACH return values.
14810
14811 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14812
14813         * win32-low.c (GETPROCADDRESS): Define.
14814         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
14815         (winapi_DebugSetProcessKillOnExit): Likewise.
14816         (win32_create_inferior): Force usage of ansi CreateProcessA.
14817         (win32_attach): Use GETPROCADDRESS.
14818         (win32_detach): Likewise.
14819
14820 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14821
14822         * win32-low.c (win32_wait): Don't use WSTOPSIG.
14823
14824 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
14825
14826         * win32-low.c: Commit leftover changes from 2007-03-29.
14827
14828 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
14829
14830         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14831         fields short instead of int.  Add explicit padding.
14832         (i387_cache_to_fsave): Remove unnecessary casts.
14833         (i387_fsave_to_cache): Doc fix.
14834         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14835
14836 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
14837
14838         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14839         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14840
14841 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
14842
14843         * configure.srv (arm*-*-mingw32ce*): Move near the other
14844         arm targets.
14845
14846 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
14847
14848         * configure.ac: Add errno checking.
14849         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14850         sys/file.h and malloc.h.
14851         (AC_CHECK_DECLS): Add perror.
14852         (srv_mingwce): Handle.
14853         * configure.srv (i[34567]86-*-cygwin*): Add
14854         win32-i386-low.o to srv_tgtobj.
14855         (i[34567]86-*-mingw*): Likewise.
14856         (arm*-*-mingw32ce*): Add case.
14857         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14858         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14859         [__MINGW32CE__] (strerror): New function.
14860         [__MINGW32CE__] (errno): Define to GetLastError.
14861         [__MINGW32CE__] (COUNTOF): New macro.
14862         (remote_open): Remove extra close call.
14863         * mem-break.c (delete_breakpoint_at): New function.
14864         * mem-break.h (delete_breakpoint_at): Declare.
14865         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14866         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14867         [USE_WIN32API] (read, write): Add char* casts.
14868         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14869         * server.h: Include wincecompat.h on Windows CE.
14870         [HAVE_ERRNO_H]: Check.
14871         (perror): Declare if not declared.
14872         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14873         (perror_with_name): Remove errno declaration.
14874         * wincecompat.h: New.
14875         * wincecompat.c: New.
14876         * win32-low.h: New.
14877         * win32-arm-low.c: New.
14878         * win32-i386-low.c: New.
14879         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14880         (OUTMSG2): Make it safe.
14881         (_T): New macro.
14882         (COUNTOF): New macro.
14883         (NUM_REGS): Get it from the low target.
14884         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14885         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14886         (thread_rec): Let low target handle debug registers.
14887         (child_add_thread): Likewise.
14888         (child_init_thread_list): Likewise.
14889         (continue_one_thread): Likewise.
14890         (regptr): New.
14891         (do_child_fetch_inferior_registers): Move to ...
14892         * win32-i386-low.c: ... here, and rename to ...
14893         (do_fetch_inferior_registers): ... this.
14894         * win32-low.c (child_fetch_inferior_registers):
14895         Go through the low target.
14896         (do_child_store_inferior_registers): Use regptr.
14897         (strwinerror): New function.
14898         (win32_create_inferior): Handle Windows CE.
14899         Use strwinerror instead of strerror on Windows error
14900         codes.  Add program to the error output.
14901         Don't close the main thread handle on Windows CE.
14902         (win32_attach): Use coredll.dll on Windows CE.
14903         (win32_kill): Close current process and current
14904         thread handles.
14905         (win32_detach): Use coredll.dll on Windows CE.
14906         (win32_resume): Let low target handle debug registers, and
14907         step request.
14908         (handle_exception): Add/Remove initial breakpoint.  Avoid
14909         non-existant WSTOPSIG on Windows CE.
14910         (win32_read_inferior_memory): Cast to remove warning.
14911         (win32_arch_string): Go through the low target.
14912         (initialize_low): Call set_breakpoint_data with the low
14913         target's breakpoint.
14914         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14915         FOP_REGNUM, mappings): Move to ...
14916         * win32-i386-low.c: ... here.
14917         * win32-low.c (win32_thread_info): Move to ...
14918         * win32-low.h: ... here.
14919         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14920         win32-arm-low.c and wincecompat.c.
14921         (all:): Add $EXEEXT.
14922         (install-only:): Likewise.
14923         (gdbserver:): Likewise.
14924         (gdbreplay:): Likewise.
14925         * config.in: Regenerate.
14926         * configure: Regenerate.
14927
14928 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
14929
14930         * win32-low.c: Rename typedef thread_info to
14931         win32_thread_info throughout.
14932
14933 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
14934
14935         * win32-i386-low.c: Rename to ...
14936         * win32-low.c: ... this.
14937         * configure.srv: Replace win32-i386-low.o with win32-low.o.
14938         * Makefile.in: Likewise.
14939
14940 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
14941
14942         * remote-utils.c (monitor_output): Constify msg parameter.
14943         * server.h (monitor_output): Likewise.
14944         * win32-i386-low.c (handle_output_debug_string): New.
14945         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14946         handle_output_debug_string.
14947         (get_child_debug_event): Likewise.
14948
14949 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
14950
14951         * server.c (main): Correct strtoul check.
14952
14953 2007-03-27  Jon Ringle  <jon@ringle.org>
14954
14955         * linux-low.c: Check __ARCH_HAS_MMU__ also.
14956
14957 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
14958
14959         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14960
14961 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
14962
14963         * terminal.h: Check HAVE_SGTTY_H.
14964
14965 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
14966
14967         * remote-utils.c (remote_open): Print out the assigned port number.
14968
14969 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
14970
14971         * remote-utils.c (monitor_output): New function.
14972         * server.c (debug_threads): Define here.
14973         (monitor_show_help): New function.
14974         (handle_query): Handle qRcmd.
14975         (main): Do not handle 'd' packet.
14976         * server.h (debug_threads, remote_debug, monitor_output): Declare.
14977         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14978         of debug_threads.
14979
14980 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
14981
14982         * Makefile.in (EXEEXT): New.
14983         (clean): Use $(EXEEXT).
14984
14985 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
14986
14987         * target.h (target_ops): Rename send_signal to request_interrupt,
14988         and remove enum target_signal parameter.
14989         * linux-low.c (linux_request_interrupt): Rename from
14990         linux_send_signal, and always send SIGINT.
14991         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14992         and always send SIGINT.
14993         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14994         of send_signal.
14995         (input_interrupt): Likewise.
14996
14997 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
14998
14999         * server.c (get_features_xml): Check if target implemented
15000         arch_string.
15001         * win32-i386-low.c (win32_arch_string): New.
15002         (win32_target_ops): Add win32_arch_string as arch_string member.
15003
15004 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
15005
15006         * spu-low.c (spu_arch_string): New.
15007         (spu_target_ops): Add spu_arch_string.
15008
15009 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
15010
15011         * remote-utils.c: Remove HAVE_TERMINAL_H check.
15012         * configure.ac: Do not check for terminal.h.
15013         * configure, config.in: Regenerated.
15014
15015 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15016
15017         * Makefile.in (OBS): Add $(XML_BUILTIN).
15018         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15019         (clean): Update.
15020         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15021         (arm-with-iwmmxt.c): New.
15022         * config.in, configure: Regenerate.
15023         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
15024         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
15025         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15026         (arm*-*-linux*): Add iWMMXt and regset support.
15027         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15028         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15029         (arm_store_wmmxregset, target_regsets): New.
15030         * server.c (get_features_xml): Take annex argument.  Check builtin
15031         XML documents.
15032         (handle_query): Handle multiple annexes.
15033
15034 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
15035
15036         * remote-utils.c [USE_WIN32API] (read, write): Define.
15037         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15038         write.
15039
15040 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
15041
15042         * linux-i386-low.c (the_low_target): Set arch_string.
15043         * linux-x86-64-low.c (the_low_target): Likewise.
15044         * linux-low.c (linux_arch_string): New.
15045         (linux_target_ops): Add it.
15046         * linux-low.h (struct linux_target_ops): Add arch_string.
15047         * server.c (write_qxfer_response): Use const void * for DATA.
15048         (get_features_xml): New.
15049         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
15050         * target.h (struct target_ops): Add arch_string method.
15051
15052 2007-01-03  Denis Pilat  <denis.pilat@st.com>
15053             Daniel Jacobowitz  <dan@codesourcery.com>
15054
15055         * linux-low.c (linux_kill): Handle being called with no threads.
15056         * win32-i386-low.c (win32_kill): Likewise.
15057         (get_child_debug_event): Clear current_process_handle.
15058
15059 2006-12-30  Denis PILAT  <denis.pilat@st.com>
15060             Daniel Jacobowitz  <dan@codesourcery.com>
15061
15062         * remote-utils.c (remote_open): Check the type of specified
15063         serial port devices before opening them.
15064         * server.c (main): Kill the inferior if an error occurs during
15065         the first remote_open.
15066
15067 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
15068
15069         * README: Update supported targets.
15070
15071 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
15072
15073         * Makefile.in (clean): Remove reg-mips64.c.
15074         (reg-mips64.c, reg-mips64.o): New rules.
15075         * configure.srv: Handle mips64.  Include regset support for mips.
15076         * linux-mips-low.c (union mips_register): New.
15077         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15078         (mips_breakpoint, mips_breakpoint_at): Use int.
15079         (mips_collect_register, mips_supply_register)
15080         (mips_collect_register_32bit, mips_supply_register_32bit)
15081         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15082         (mips_store_fpregset, target_regsets): New.
15083         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15084
15085 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
15086
15087         * configure.srv: Add target "spu*-*-*".
15088         * Makefile.in (clean): Remove reg-spu.c.
15089         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15090         * spu-low.c: New file.
15091
15092 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15093
15094         * configure.ac: Correct td_thr_tls_get_addr test.
15095         * configure: Regenerated.
15096
15097 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15098
15099         * linux-low.c (linux_wait_for_event): Reformat.  Use the
15100         pass_signals array.
15101         * remote-utils.c (decode_address_to_semicolon): New.
15102         * server.c (pass_signals, handle_general_set): New.
15103         (handle_query): Mention QPassSignals for qSupported.
15104         (main): Call handle_general_set.
15105         * server.h (pass_signals, decode_address_to_semicolon): New.
15106
15107 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
15108
15109         * server.c (handle_query): Correct error handling for read_auxv.
15110
15111 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
15112
15113         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15114         and srv_linux_thread_db to yes.
15115         * linux-s390-low.c (s390_fill_gregset): New function.
15116         (target_regsets): Define data structure.
15117
15118 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
15119
15120         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15121         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
15122         * config.in, configure: Regenerated.
15123         * inferiors.c (gdb_id_to_thread): New function.
15124         (gdb_id_to_thread_id): Use it.
15125         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15126         * linux-low.h (struct process_info): Add th member.
15127         (thread_db_get_tls_address): New prototype.
15128         * remote-utils.c (decode_address): Make non-static.
15129         * server.c (handle_query): Handle qGetTLSAddr.
15130         * server.h (gdb_id_to_thread, decode_address): New prototypes.
15131         * target.h (struct target_ops): Add get_tls_address.
15132         * thread-db.c (maybe_attach_thread): Save the thread handle.
15133         (thread_db_get_tls_address): New.
15134
15135 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
15136
15137         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15138         (linux_resume_one_process): Take a siginfo_t *.  Update all
15139         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
15140         (struct pending_signals): Add a siginfo_t.
15141         (linux_wait_for_process): Always set last_status.
15142         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15143         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15144         * linux-low.h (struct process_info): Add last_status.
15145
15146 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
15147
15148         * remote-utils.c (try_rle): New function.
15149         (putpkt_binary): Use it.
15150
15151 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
15152
15153         * Makefile.in (clean): Clean reg-x86-64-linux.c.
15154         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15155         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15156         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15157         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15158         point registers.
15159
15160 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
15161
15162         * server.c (terminal_fd): New variable.
15163         (old_foreground_pgrp): Likewise.
15164         (restore_old_foreground_pgrp): New function.
15165         (start_inferior): Record the terminal file descriptor in terminal_fd
15166         and its original foreground group in old_foreground_pgrp.  Register
15167         restore_old_foreground_pgrp with atexit().
15168
15169 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
15170
15171         * server.c (handle_query): Correct qPart to qXfer.
15172
15173 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
15174
15175         * configure.ac: Check for more headers which are missing on
15176         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
15177         * configure.srv: Add Cygwin and mingw32.
15178         * remote-utils.c: Don't include headers unconditionally which
15179         are missing on mingw32.  Include <winsock.h> for mingw32.
15180         (remote_open): Adjust for mingw32 support.  Flush
15181         standard error after writing to it.
15182         (remote_close, putpkt_binary, input_interrupt, block_async_io)
15183         (unblock_async_io, enable_async_io, disable_async_io)
15184         (readchar, getpkt): Update for Winsock support.
15185         (prepare_resume_reply): Expect a protocol signal number.
15186         * server.c: Disable <sys/wait.h> on mingw32.
15187         (start_inferior): Adjust for mingw32 support.  Flush
15188         standard error after writing to it.
15189         (attach_inferior): Likewise.  Use protocol signal
15190         numbers.
15191         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
15192         and names.
15193         * win32-i386-low.c: New file.
15194         * Makefile.in (XM_CLIBS): Set.
15195         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15196         (win32-i386-low.o): New dependency rule.
15197         * linux-low.c (linux_wait): Use target signal numbers.
15198         * target.h (struct target_ops): Doc fix.
15199         * server.h (target_signal_to_name): New prototype.
15200         * gdbreplay.c: Don't include headers unconditionally which
15201         are missing on mingw32.  Include <winsock.h> for mingw32.
15202         (remote_close, remote_open): Adjust for Winsock support.
15203         * configure, config.in: Regenerated.
15204
15205 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
15206
15207         * server.c (decode_xfer_read, write_qxfer_response): New.
15208         (handle_query): Take a packet length argument.  Handle
15209         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
15210         the qSupported response.
15211         (main): Update call to handle_query.
15212
15213 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
15214
15215         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15216         (putpkt_binary): Renamed from putpkt and adjusted for binary
15217         data.
15218         (putpkt): New wrapper for putpkt_binary.
15219         (readchar): Don't mask off the high bit.
15220         (decode_X_packet): New function.
15221         * server.c (main): Call putpkt_binary if a handler sets the packet
15222         length.  Save the length of the incoming packet.  Handle 'X'.
15223         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15224
15225 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
15226
15227         * server.c (handle_query): Handle qSupported.
15228
15229 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15230
15231         * remote-utils.c (all_symbols_looked_up): New variable.
15232         (look_up_one_symbol): Check it.
15233         * server.h (look_up_one_symbol): New declaration.
15234         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15235
15236 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15237
15238         * Makefile.in (linux-arm-low.o): Update dependencies.
15239         * linux-arm-low.c: Include "gdb_proc_service.h".
15240         (PTRACE_GET_THREAD_AREA): Define.
15241         (ps_get_thread_area): New function.
15242
15243 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
15244
15245         * configure.srv (m68k*-*-uclinux*): New target.
15246         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15247         (linux_resume_one_process): Remove extraneous cast.
15248         (linux_read_offsets): New.
15249         (linux_target_op): Add linux_read_offsets on mmuless systems.
15250         * server.c (handle_query): Add qOffsets logic.
15251         * target.h (struct target_ops): Add read_offsets.
15252
15253 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15254
15255         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15256         (PTRACE_GET_THREAD_AREA): Define.
15257         (ps_get_thread_area): New function.
15258         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15259         (linux-x86-64-low.o): Update.
15260
15261 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15262
15263         * configure.ac: Remove checks for prfpregset_t.
15264         * gdb_proc_service.h: New file.
15265         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15266         new "gdb_proc_service.h".
15267         * proc-service.c: Likewise.
15268         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15269         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15270         * Makefile.in (gdb_proc_service_h): Updated.
15271         * configure, config.in: Regenerated.
15272
15273 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
15274
15275         * remote-utils.c (prepare_resume_reply): Move declaration
15276         of gdb_id_from_wait to the top of the block.
15277
15278 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
15279
15280         * linux-low.c (regsets_store_inferior_registers): Read the regset
15281         from the target before filling it.
15282
15283 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15284
15285         * server.c (attach_inferior): Return SIGTRAP for a successful
15286         attach.
15287
15288 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
15289
15290         * Makefile.in (OBS): Add version.o.
15291         (STAGESTUFF): Delete.
15292         (version.o): Add dependencies.
15293         (version.c): Replace rule.
15294         (clean): Remove version.c.
15295         * server.c (gdbserver_version): New.
15296         (gdbserver_usage): Use printf.
15297         (main): Handle --version and --help.
15298         * server.h (version, host_name): Add declarations.
15299
15300 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
15301
15302         * linux-arm-low.c:
15303         * linux-arm-low.c:
15304         * inferiors.c:
15305         * i387-fp.h:
15306         * i387-fp.c:
15307         * gdbreplay.c:
15308         * regcache.c:
15309         * proc-service.c:
15310         * mem-break.h:
15311         * mem-break.c:
15312         * linux-x86-64-low.c:
15313         * linux-sh-low.c:
15314         * linux-s390-low.c:
15315         * linux-ppc64-low.c:
15316         * linux-ppc-low.c:
15317         * linux-mips-low.c:
15318         * linux-m68k-low.c:
15319         * linux-m32r-low.c:
15320         * linux-low.h:
15321         * linux-low.c:
15322         * linux-ia64-low.c:
15323         * linux-i386-low.c:
15324         * linux-crisv32-low.c:
15325         * thread-db.c:
15326         * terminal.h:
15327         * target.h:
15328         * target.c:
15329         * server.h:
15330         * server.c:
15331         * remote-utils.c:
15332         * regcache.h:
15333         * utils.c:
15334         * Makefile.in:
15335         * configure.ac:
15336         * gdbserver.1: Add (C) after Copyright.  Update the FSF
15337         address.
15338
15339 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
15340
15341         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15342         (arm_breakpoint_at): Recognize both breakpoints.
15343         (the_low_target): Use the correct breakpoint instruction.
15344
15345 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
15346
15347         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15348         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15349         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15350         (the_low_target): Update.
15351
15352 2005-10-25  Andreas Schwab  <schwab@suse.de>
15353
15354         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15355
15356         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15357         (ia64_num_regs): Reduce to 462.
15358
15359 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
15360
15361         * acinclude.m4: Correct quoting.
15362         * aclocal.m4: Regenerated.
15363
15364         Suggested by SZOKOVACS Robert <szo@ies.hu>:
15365         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15366         (thread_db_init): Call thread_db_err_str.
15367         * configure.ac: Check for TD_VERSION.
15368         * config.in, configure: Regenerated.
15369
15370 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15371
15372         * server.h (error, fatal, warning): Add ATTR_FORMAT.
15373
15374 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
15375
15376         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15377         is not available.  Define HAVE_PTRACE_GETREGS if it is.
15378         * config.in, configure: Regenerated.
15379         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15380         * linux-i386-low.c, linux-m68k-low.c: Update to use
15381         HAVE_PTRACE_GETREGS.
15382         * linux-low.c (regsets_fetch_inferior_registers)
15383         (regsets_store_inferior_registers): Only return 0 if we processed
15384         GENERAL_REGS.
15385         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15386         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15387
15388 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
15389
15390         * inferiors.c (struct thread_info): Add gdb_id.
15391         (add_thread): Add gdb_id argument.
15392         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15393         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15394         calls to add_thread.
15395         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15396         * server.c (handle_query): Use thread_to_gdb_id.
15397         (handle_v_cont, main): Use gdb_id_to_thread_id.
15398         * server.h (add_thread): Update prototype.
15399         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15400         prototypes.
15401
15402 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
15403
15404         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15405         left-padded registers.
15406         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15407         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15408
15409 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
15410
15411         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15412         * configure: Regenerate.
15413         * config.in: Regenerate.
15414         * server.h (NEED_DECLARATION_STRERROR):
15415         Replace with !HAVE_DECL_STRERROR.
15416
15417 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
15418
15419         * linux-low.c (linux_wait, linux_send_signal): Don't test
15420         an unsigned long variable for > 0 if it could be MAX_ULONG.
15421         * server.c (myresume): Likewise.
15422         * target.c (set_desired_inferior): Likewise.
15423
15424 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
15425
15426         * configure.ac: Simplify and improve check for socklen_t.
15427         * configure, config.in: Regenerate.
15428
15429 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
15430
15431         * acconfig.h: Remove.
15432         * configure.ac: Add a test for socklen_t.  Use three-argument
15433         AC_DEFINE throughout.
15434         * config.in: Regenerated using autoheader 2.59.
15435         * configure: Regenerated.
15436
15437         * gdbreplay.c (socklen_t): Provide a default.
15438         (remote_open): Use socklen_t.
15439         * remote-utils.c (socklen_t): Provide a default.
15440         (remote_open): Use socklen_t.
15441         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15442         unsigned char.
15443
15444         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15445         char for buffers.
15446         * linux-low.c (linux_read_memory, linux_write_memory)
15447         (linux_read_auxv): Likewise.
15448         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15449         (check_mem_write): Likewise.
15450         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15451         Likewise.
15452         * regcache.c (struct inferior_rgcache_data, registers_to_string)
15453         (registers_from_string, register_data): Likewise.
15454         * server.c (handle_query, main): Likewise.
15455         * server.h (convert_ascii_to_int, convert_int_to_ascii)
15456         (decode_M_packet): Likewise.
15457         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15458         * target.h (struct target_ops): Update read_memory, write_memory,
15459         and read_auxv.
15460         (read_inferior_memory, write_inferior_memory): Update.
15461         * linux-low.h (struct linux_target_ops): Change type of breakpoint
15462         to unsigned char *.
15463         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15464         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15465         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15466         linux-s390-low.c, linux-sh-low.c: Update for changes in
15467         read_inferior_memory and the_low_target->breakpoint.
15468
15469 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
15470
15471         * Makefile.in (SFILES): Add linux-ppc64-low.c.
15472         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15473         * configure.srv: Add powerpc64-*-linux*.
15474         * linux-ppc64-low.c: New file.
15475
15476 2005-05-23  Orjan Friberg  <orjanf@axis.com>
15477
15478         * linux-cris-low.c: New file with support for CRIS.
15479         * linux-crisv32-low.c: Ditto for CRISv32.
15480         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15481         (clean): Add reg-cris.c and reg-crisv32.c.
15482         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15483         reg-crisv32.o, and reg-crisv32.c to make rules.
15484         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15485         recognized targets.
15486
15487 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
15488
15489         * linux-low.c (fetch_register): Ensure buffer size is a multiple
15490         of sizeof (PTRACE_XFER_TYPE).
15491         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
15492
15493 2005-05-12  Orjan Friberg  <orjanf@axis.com>
15494
15495         * target.h (struct target_ops): Add insert_watchpoint,
15496         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15497         pointers for hardware watchpoint support.
15498         * linux-low.h (struct linux_target_ops): Ditto.
15499         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15500         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
15501         to linux_target_ops.
15502         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15503         reply packet.
15504         * server.c (main): Recognize 'Z' and 'z' packets.
15505
15506 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
15507
15508         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15509         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15510         (the_low_target): Add new members.
15511
15512 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
15513
15514         * proc-service.c (ps_lgetregs): Search all_processes instead of
15515         all_threads.
15516
15517 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
15518
15519         * server.c (start_inferior): Change return type to int.
15520         (attach_inferior): Change sigptr to int *.
15521         (handle_v_cont, handle_v_requests): Change signal to int *.
15522         (main): Change signal to int.
15523
15524 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
15525
15526         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15527         * configure.srv: Add m32r*-*-linux*.
15528         * linux-m32r-low.c: New file.
15529
15530 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
15531
15532         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15533
15534 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
15535
15536         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15537         Take unsigned long arguments for PIDs.
15538         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15539         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15540         (wait_for_sigstop, linux_resume_one_process)
15541         (regsets_fetch_inferior_registers, linux_send_signal)
15542         (linux_read_auxv): Likewise.  Update the types of variables holding
15543         PIDs.  Update format string specifiers.
15544         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15545         * remote-utils.c (prepare_resume_reply): Likewise.
15546         * server.c (cont_thread, general_thread, step_thread)
15547         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15548         unsigned long.
15549         (handle_query): Update format specifiers.
15550         (handle_v_cont, main): Use strtoul for thread IDs.
15551         * server.h (struct inferior_list_entry): Use unsigned long for ID.
15552         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15553         (general_thread, step_thread, thread_from_wait)
15554         (old_thread_from_wait): Update.
15555         * target.h (struct thread_resume): Use unsigned long for THREAD.
15556         (struct target_ops): Use unsigned long for arguments to attach and
15557         thread_alive.
15558
15559 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
15560
15561         * acinclude.m4: Include bfd/bfd.m4 directly.
15562         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
15563         <agriffis@toolchain.org>.
15564         * aclocal.m4, configure: Regenerated.
15565
15566 2005-01-07  Andrew Cagney  <cagney@gnu.org>
15567
15568         * configure.ac: Rename configure.in, require autoconf 2.59.
15569         * configure: Re-generate.
15570
15571 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
15572
15573         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
15574         LIBS when finished.
15575         * aclocal.m4: Regenerated.
15576         * configure: Regenerated.
15577
15578 2004-11-21  Andreas Schwab  <schwab@suse.de>
15579
15580         * linux-m68k-low.c (m68k_num_gregs): Define.
15581         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15582         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15583         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15584         (m68k_breakpoint_at): New.  Add to the_low_target.
15585
15586         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15587         srv_linux_thread_db to yes.
15588
15589 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
15590
15591         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15592         (ARCH_SET_FS): Likewise.
15593         (ARCH_GET_FS): Likewise.
15594         (ARCH_GET_GS): Likewise.
15595
15596 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
15597
15598         * linux-i386-low.c (ps_get_thread_area): New.
15599         * linux-x86-64-low.c (ps_get_thread_area): New.
15600         * linux-low.c: Include <sys/syscall.h>.
15601         (linux_kill_one_process): Don't kill the first thread here.
15602         (linux_kill): Kill the first thread here.
15603         (kill_lwp): New function.
15604         (send_sigstop, linux_send_signal): Use it.
15605         * proc-service.c: Clean up #ifdefs.
15606         (fpregset_info): Delete.
15607         (ps_lgetregs): Update and enable implementation.
15608         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15609         implementations.
15610         * remote-utils.c (struct sym_cache, symbol_cache): New.
15611         (input_interrupt): Print a clearer message.
15612         (async_io_enabled): New variable.
15613         (enable_async_io, disable_async_io): Use it.  Update comments.
15614         (look_up_one_symbol): Use the symbol cache.
15615         * thread-db.c (thread_db_look_up_symbols): New function.
15616         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
15617
15618 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
15619
15620         * configure.in: Test for -rdynamic.
15621         * configure: Regenerated.
15622         * Makefile (INTERNAL_LDFLAGS): New.
15623         (gdbserver, gdbreplay): Use it.
15624
15625 2004-09-02  Andrew Cagney  <cagney@gnu.org>
15626
15627         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15628
15629 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
15630
15631         * linux-low.c (linux_wait): Clear all_processes list also.
15632
15633 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
15634
15635         * linux-low.c: Include <errno.h>.  Remove extern declaration of
15636         errno.
15637
15638 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
15639
15640         * gdbreplay.c, server.h, utils.c: Update copyright years.
15641
15642 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
15643
15644         * server.c (main): Print child status or termination signal from
15645         variable 'signal', not 'sig'.
15646
15647 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
15648
15649         * linux-low.c (linux_read_memory): Change return type to
15650         int.  Check for and return error from ptrace().
15651         * target.c (read_inferior_memory): Change return type to int.  Pass
15652         back return status from the_target->read_memory().
15653         * target.h (struct target_ops): Adapt *read_memory() prototype.
15654         Update comment.
15655         (read_inferior_memory): Adapt prototype.
15656         * server.c (main): Return an error packet if
15657         read_inferior_memory() returns an error.
15658
15659 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
15660
15661         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15662         Unify with other clean targets.
15663
15664 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15665
15666         * server.c (handle_v_cont): Call set_desired_inferior.
15667
15668 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15669
15670         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15671
15672 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15673
15674         * linux-low.c (linux_wait): Unblock async I/O.
15675         (linux_resume): Block and enable async I/O.
15676         * remote-utils.c (block_async_io, unblock_async_io): New functions.
15677         * server.h (block_async_io, unblock_async_io): Add prototypes.
15678
15679 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15680
15681         * remote-utils.c (remote_open): Print a status notice after
15682         opening a TCP port.
15683         * server.c (attach_inferior): Print a status notice after
15684         attaching.
15685
15686 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15687
15688         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15689
15690 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
15691
15692         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15693         error packet.
15694         * server.c, target.h: Update copyright years.
15695
15696 2004-02-25  Roland McGrath  <roland@redhat.com>
15697
15698         * target.h (struct target_ops): New member `read_auxv'.
15699         * server.c (handle_query): Handle qPart:auxv:read: query using that.
15700         * linux-low.c (linux_read_auxv): New function.
15701         (linux_target_ops): Initialize `read_auxv' member to that.
15702
15703 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15704
15705         Committed by Jim Blandy  <jimb@redhat.com>.
15706
15707         * linux-s390-low.c (s390_num_regs): Update.
15708         (s390_regmap): Remove control registers.  Use __s390x__ predefine
15709         instead of GPR_SIZE to distiguish s390 and s390x targets.
15710
15711 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
15712
15713         * linux-low.c: Update copyright year.
15714         (check_removed_breakpoint): Clear pending_is_breakpoint.
15715         (linux_set_resume_request, linux_queue_one_thread)
15716         (resume_status_pending_p): New functions.
15717         (linux_continue_one_thread): Use process->resume.
15718         (linux_resume): Only resume threads if there are no pending events.
15719         * linux-low.h (struct process_info): Add resume request
15720         pointer.
15721
15722 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
15723
15724         * regcache.c (new_register_cache): Clear the allocated register
15725         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15726
15727 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
15728
15729         * linux-low.c (linux_resume): Take a struct thread_resume *
15730         argument.
15731         (linux_wait): Update call.
15732         (resume_ptr): New static variable.
15733         (linux_continue_one_thread): Renamed from
15734         linux_continue_one_process.  Use resume_ptr.
15735         (linux_resume): Use linux_continue_one_thread.
15736         * server.c (handle_v_cont, handle_v_requests): New functions.
15737         (myresume): New function.
15738         (main): Handle 'v' case.
15739         * target.h (struct thread_resume): New type.
15740         (struct target_ops): Change argument of "resume" to struct
15741         thread_resume *.
15742         (myresume): Delete macro.
15743
15744 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
15745
15746         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15747         (uninstall): Support DESTDIR.
15748
15749 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
15750
15751         * configure.srv: Add xscale*linux copy of arm*linux entry.
15752
15753 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
15754
15755         * linux-arm-low.c (arm_reinsert_addr): New function.
15756         (the_low_target): Add arm_reinsert_addr.
15757
15758 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
15759
15760         * mem-break.c: Remove whitespace at end of file.
15761
15762 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
15763
15764         * configure.in: Check whether we need to prototype strerror.
15765         * server.h: Optionally prototype strerror.
15766         * gdbreplay.c (perror_with_name): Use strerror.
15767         * linux-low.c (linux_attach_lwp): Use strerror.
15768         * utils.c (perror_with_name): Use strerror.
15769         * config.in, configure: Regenerated.
15770
15771 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
15772
15773         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15774         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15775
15776 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
15777
15778         * Makefile.in (SFILES): Update.
15779         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15780         low-sun3.c: Remove files.
15781
15782 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
15783
15784         * linux-low.c: Move comment to linux_thread_alive where it belonged.
15785         (linux_detach_one_process, linux_detach): New functions.
15786         (linux_target_ops): Add linux_detach.
15787         * server.c (main): Handle 'D' packet.
15788         * target.h (struct target_ops): Add "detach" member.
15789         (detach_inferior): Define.
15790
15791 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
15792
15793         From Kelley Cook  <kelleycook@wideopenwest.com>:
15794         * configure.srv: Accept i[34567]86 variants.
15795
15796 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
15797
15798         * linux-low.c (linux_wait_for_event): Correct comment typos.
15799         (linux_resume_one_process): Call check_removed_breakpoint.
15800         (linux_send_signal): New function.
15801         (linux_target_ops): Add linux_send_signal.
15802         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15803         of kill.
15804         * target.h (struct target_ops): Add send_signal.
15805
15806 2003-05-29  Jim Blandy  <jimb@redhat.com>
15807
15808         * linux-low.c (usr_store_inferior_registers): Transfer buf in
15809         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
15810         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15811         away part of the register's value.
15812
15813 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
15814
15815         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15816         (linux_wait_for_event, linux_init_signals): Likewise.
15817
15818 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
15819
15820         * configure.in: Check for stdlib.h.
15821         * configure: Regenerated.
15822         * config.in: Regenerated.
15823
15824 2003-01-04  Andreas Schwab  <schwab@suse.de>
15825
15826         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15827
15828 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
15829
15830         * Makefile.in: Remove obsolete code.
15831
15832 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
15833
15834         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15835         defined(PT_FPR0_HI).
15836
15837 2002-11-17  Stuart Hughes  <seh@zee2.com>
15838
15839         * linux-arm-low.c (arm_num_regs): Increase.
15840         (arm_regmap): Include status register.
15841
15842 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
15843
15844         * linux-low.c (register_addr): Remove incorrect -1 check.
15845
15846 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
15847
15848         * linux-low.c (linux_create_inferior): Call setpgid.  Return
15849         the new PID.
15850         (unstopped_p, linux_signal_pid): Remove.
15851         (linux_target_ops): Remove linux_signal_pid.
15852         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15853         global instead of target method.
15854         * target.h (struct target_ops): Remove signal_pid.  Update comment
15855         for create_inferior.
15856         * server.c (signal_pid): New variable.
15857         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
15858         gdbserver.  Set the child to be the foreground process group.
15859         (attach_inferior): Set signal_pid.
15860
15861 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
15862
15863         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15864
15865 2002-08-20  Jim Blandy  <jimb@redhat.com>
15866
15867         * Makefile.in (LDFLAGS): Allow the configure script to establish a
15868         default for this.
15869
15870 2002-08-01  Andrew Cagney  <cagney@redhat.com>
15871
15872         * Makefile.in: Make chill references obsolete.
15873
15874 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
15875
15876         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15877         * configure: Regenerate.
15878         * config.in: Regenerate.
15879
15880 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
15881
15882         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15883         (perror_with_name, remote_close, remote_open, expect, play): Static.
15884
15885 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
15886
15887         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15888         byte offsets instead of an array of indexes.
15889         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15890
15891 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
15892
15893         * regcache.c: Add comment.
15894
15895 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
15896
15897         * thread-db.c: New file.
15898         * proc-service.c: New file.
15899         * acinclude.m4: New file.
15900         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15901         proc-service.o, and thread-db.o.
15902         (linux-low.o): Add USE_THREAD_DB.
15903         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15904         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15905         * aclocal.m4: Regenerated.
15906         * config.in: Regenerated.
15907         * configure: Regenerated.
15908         * configure.in: Check for proc_service.h, sys/procfs.h,
15909         thread_db.h, and linux/elf.h headrs.
15910         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15911         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
15912         Check for -lthread_db and thread support.
15913         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15914         PowerPC, and SuperH.
15915         * i387-fp.c: Constify arguments.
15916         * i387-fp.h: Likewise.
15917         * inferiors.c: (struct thread_info): Renamed from
15918         `struct inferior_info'.  Remove PID member.  Use generic inferior
15919         list header.  All uses updated.
15920         (inferiors, signal_pid): Removed.
15921         (all_threads): New variable.
15922         (get_thread): Define.
15923         (add_inferior_to_list): New function.
15924         (for_each_inferior): New function.
15925         (change_inferior_id): New function.
15926         (add_inferior): Removed.
15927         (remove_inferior): New function.
15928         (add_thread): New function.
15929         (free_one_thread): New function.
15930         (remove_thread): New function.
15931         (clear_inferiors): Use for_each_inferior and free_one_thread.
15932         (find_inferior): New function.
15933         (find_inferior_id): New function.
15934         (inferior_target_data): Update argument type.
15935         (set_inferior_target_data): Likewise.
15936         (inferior_regcache_data): Likewise.
15937         (set_inferior_regcache_data): Likewise.
15938         * linux-low.c (linux_bp_reinsert): Remove.
15939         (all_processes, stopping_threads, using_thrads)
15940         (struct pending_signals, debug_threads, pid_of): New.
15941         (inferior_pid): Replace with macro.
15942         (struct inferior_linux_data): Remove.
15943         (get_stop_pc, add_process): New functions.
15944         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15945         Use add_process and add_thread.
15946         (linux_attach_lwp): New function, based on old linux_attach.  Use
15947         add_process and add_thread.  Set stop_expected for new threads.
15948         (linux_attach): New function.
15949         (linux_kill_one_process): New function.
15950         (linux_kill): Kill all LWPs.
15951         (linux_thread_alive): Use find_inferior_id.
15952         (check_removed_breakpoints, status_pending_p): New functions.
15953         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15954         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
15955         struct for the found process.
15956         (linux_wait_for_event): New function.
15957         (linux_wait): Use it.  Support LWPs.
15958         (send_sigstop, wait_for_sigstop, stop_all_processes)
15959         (linux_resume_one_process, linux_continue_one_process): New functions.
15960         (linux_resume): Support LWPs.
15961         (REGISTER_RAW_SIZE): Remove.
15962         (fetch_register): Use register_size instead.  Call supply_register.
15963         (usr_store_inferior_registers): Likewise.  Call collect_register.
15964         Fix recursive case.
15965         (regsets_fetch_inferior_registers): Improve error message.
15966         (regsets_store_inferior_registers): Add debugging.
15967         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15968         (unstopped_p, linux_signal_pid): New functions.
15969         (linux_target_ops): Add linux_signal_pid.
15970         (linux_init_signals): New function.
15971         (initialize_low): Call it.  Initialize using_threads.
15972         * regcache.c (inferior_regcache_data): Add valid
15973         flag.
15974         (get_regcache): Fetch registers lazily.  Add fetch argument
15975         and update all callers.
15976         (regcache_invalidate_one, regcache_invalidate): New
15977         functions.
15978         (new_register_cache): Renamed from create_register_cache.
15979         Return the new regcache.
15980         (free_register_cache): Change argument to a void *.
15981         (registers_to_string, registers_from_string): Call get_regcache
15982         with fetch flag set.
15983         (register_data): Make static.  Pass fetch flag to get_regcache.
15984         (supply_register): Call get_regcache with fetch flag clear.
15985         (collect_register): Call get_regcache with fetch flag set.
15986         (collect_register_as_string): New function.
15987         * regcache.h: Update.
15988         * remote-utils.c (putpkt): Flush after debug output and use
15989         stderr.
15990         Handle input interrupts while waiting for an ACK.
15991         (input_interrupt): Use signal_pid method.
15992         (getpkt): Flush after debug output and use stderr.
15993         (outreg): Use collect_register_as_string.
15994         (new_thread_notify, dead_thread_notify): New functions.
15995         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
15996         and general_thread.
15997         (look_up_one_symbol): Flush after debug output.
15998         * server.c (step_thread, server_waiting): New variables.
15999         (start_inferior): Don't use signal_pid.  Update call to mywait.
16000         (attach_inferior): Update call to mywait.
16001         (handle_query): Handle qfThreadInfo and qsThreadInfo.
16002         (main): Don't fetch/store registers explicitly.  Use
16003         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
16004         calls to mywait.
16005         * server.h: Update.
16006         (struct inferior_list, struct_inferior_list_entry): New.
16007         * target.c (set_desired_inferior): New.
16008         (write_inferior_memory): Constify.
16009         (mywait): New function.
16010         * target.h: Update.
16011         (struct target_ops): New signal_pid method.
16012         (mywait): Removed macro, added prototype.
16013
16014         * linux-low.h (regset_func): Removed.
16015         (regset_fill_func, regset_store_func): New.
16016         (enum regset_type): New.
16017         (struct regset_info): Add type field.  Use new operation types.
16018         (struct linux_target_ops): stop_pc renamed to get_pc.
16019         Add decr_pc_after_break and breakpoint_at.
16020         (get_process, get_thread_proess, get_process_thread)
16021         (strut process_info, all_processes, linux_attach_lwp)
16022         (thread_db_init): New.
16023
16024         * linux-arm-low.c (arm_get_pc, arm_set_pc,
16025         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16026         (the_low_target): Add new members.
16027         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16028         (i386_store_fpxregset): Constify.
16029         (target_regsets): Add new kind identifier.
16030         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
16031         (i386_set_pc): Add debugging.
16032         (i386_breakpoint_at): New function.
16033         (the_low_target): Add new members.
16034         * linux-mips-low.c (mips_get_pc, mips_set_pc)
16035         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16036         (mips_breakpoint_at): New.
16037         (the_low_target): Add new members.
16038         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16039         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16040         (the_low_target): Add new members.
16041         * linux-sh-low.c (sh_get_pc, sh_set_pc)
16042         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16043         (the_low_target): Add new members.
16044         * linux-x86-64-low.c (target_regsets): Add new kind
16045         identifier.
16046
16047 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
16048
16049         From Martin Pool <mbp@samba.org>:
16050         * server.c (gdbserver_usage): New function.
16051         (main): Call it.
16052
16053 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
16054
16055         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16056         stop_at -> stop_pc.
16057
16058 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
16059
16060         * Makefile.in: Remove obsolete code.
16061
16062 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
16063
16064         * linux-low.c (regsets_fetch_inferior_registers),
16065         (regsets_store_inferior_registers): Removed cast to int from
16066         ptrace() calls.
16067         * regcache.h: Added declaration of struct inferior_info.
16068
16069 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16070
16071         * inferiors.c (struct inferior_info): Add regcache_data.
16072         (add_inferior): Call create_register_cache.
16073         (clear_inferiors): Call free_register_cache.
16074         (inferior_regcache_data, set_inferior_regcache_data): New functions.
16075         * regcache.c (struct inferior_regcache_data): New.
16076         (registers): Remove.
16077         (get_regcache): New function.
16078         (create_register_cache, free_register_cache): New functions.
16079         (set_register_cache): Don't initialize the register cache here.
16080         (registers_to_string, registers_from_string, register_data): Call
16081         get_regcache.
16082         * regcache.h: Add prototypes.
16083         * server.h: Likewise.
16084
16085 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16086
16087         * mem-break.c: New file.
16088         * mem-break.h: New file.
16089         * Makefile.in: Add mem-break.o rule; update server.h
16090         dependencies.
16091         * inferiors.c (struct inferior_info): Add target_data
16092         member.
16093         (clear_inferiors): Free target_data member if set.
16094         (inferior_target_data, set_inferior_target_data): New functions.
16095         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16096         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
16097         * linux-low.c (linux_bp_reinsert): New variable.
16098         (struct inferior_linux_data): New.
16099         (linux_create_inferior): Use set_inferior_target_data.
16100         (linux_attach): Likewise.  Call add_inferior.
16101         (linux_wait_for_one_inferior): New function.
16102         (linux_wait): Call it.
16103         (linux_write_memory): Add const.
16104         (initialize_low): Call set_breakpoint_data.
16105         * linux-low.h (struct linux_target_ops): Add breakpoint
16106         handling members.
16107         * server.c (attach_inferior): Remove extra add_inferior
16108         call.
16109         * server.h: Include mem-break.h.  Update inferior.c
16110         prototypes.
16111         * target.c (read_inferior_memory)
16112         (write_inferior_memory): New functions.
16113         * target.h (read_inferior_memory)
16114         (write_inferior_memory): Change macros to prototypes.
16115         (struct target_ops): Update comments.  Add const to write_memory
16116         definition.
16117
16118 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
16119
16120         * linux-low.c (usr_store_inferior_registers): Support
16121         registers which are allowed to fail to store.
16122         * linux-low.h (linux_target_ops): Likewise.
16123         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16124         (ppc_cannot_store_register): FPSCR may not be storable.
16125
16126 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16127
16128         * server.h: Include <string.h> if HAVE_STRING_H.
16129         * ChangeLog: Correct paths in last ChangeLog entry.
16130
16131 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16132
16133         * linux-low.h: Remove obsolete prototypes.
16134         (struct linux_target_ops): New.
16135         (extern the_low_target): New.
16136         * linux-low.c (num_regs, regmap): Remove declarations.
16137         (register_addr): Use the_low_target explicitly.
16138         (fetch_register): Likewise.
16139         (usr_fetch_inferior_registers): Likewise.
16140         (usr_store_inferior_registers): Likewise.
16141         * linux-arm-low.c (num_regs): Remove.
16142         (arm_num_regs): Define.
16143         (arm_regmap): Renamed from regmap, made static.
16144         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16145         made static.
16146         (arm_cannot_store_register): Renamed from cannot_store_register,
16147         made static.
16148         (the_low_target): New.
16149         * linux-i386-low.c (num_regs): Remove.
16150         (i386_num_regs): Define.
16151         (i386_regmap): Renamed from regmap, made static.
16152         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16153         made static.
16154         (i386_cannot_store_register): Renamed from cannot_store_register,
16155         made static.
16156         (the_low_target): New.
16157         * linux-ia64-low.c (num_regs): Remove.
16158         (ia64_num_regs): Define.
16159         (ia64_regmap): Renamed from regmap, made static.
16160         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16161         made static.
16162         (ia64_cannot_store_register): Renamed from cannot_store_register,
16163         made static.
16164         (the_low_target): New.
16165         * linux-m68k-low.c (num_regs): Remove.
16166         (m68k_num_regs): Define.
16167         (m68k_regmap): Renamed from regmap, made static.
16168         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16169         made static.
16170         (m68k_cannot_store_register): Renamed from cannot_store_register,
16171         made static.
16172         (the_low_target): New.
16173         * linux-mips-low.c (num_regs): Remove.
16174         (mips_num_regs): Define.
16175         (mips_regmap): Renamed from regmap, made static.
16176         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16177         made static.
16178         (mips_cannot_store_register): Renamed from cannot_store_register,
16179         made static.
16180         (the_low_target): New.
16181         * linux-ppc-low.c (num_regs): Remove.
16182         (ppc_num_regs): Define.
16183         (ppc_regmap): Renamed from regmap, made static.
16184         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16185         made static.
16186         (ppc_cannot_store_register): Renamed from cannot_store_register,
16187         made static.
16188         (the_low_target): New.
16189         * linux-s390-low.c (num_regs): Remove.
16190         (s390_num_regs): Define.
16191         (s390_regmap): Renamed from regmap, made static.
16192         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16193         made static.
16194         (s390_cannot_store_register): Renamed from cannot_store_register,
16195         made static.
16196         (the_low_target): New.
16197         * linux-sh-low.c (num_regs): Remove.
16198         (sh_num_regs): Define.
16199         (sh_regmap): Renamed from regmap, made static.
16200         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16201         made static.
16202         (sh_cannot_store_register): Renamed from cannot_store_register,
16203         made static.
16204         (the_low_target): New.
16205         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16206         (the_low_target): New.
16207
16208 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16209
16210         * Makefile.in: Add stamp-h target.
16211         * configure.in: Create stamp-h.
16212         * configure: Regenerated.
16213
16214 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16215
16216         * inferiors.c: New file.
16217         * target.c: New file.
16218         * target.h: New file.
16219         * Makefile.in:  Add target.o and inferiors.o.  Update
16220         dependencies.
16221         * linux-low.c (inferior_pid): New static variable,
16222         moved from server.c.
16223         (linux_create_inferior): Renamed from create_inferior.
16224         Call add_inferior.  Return 0 on success instead of a PID.
16225         (linux_attach): Renamed from myattach.
16226         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
16227         (linux_thread_alive): Renamed from mythread_alive.
16228         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
16229         child dies.
16230         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
16231         (regsets_store_inferior_registers): Correct error message.
16232         Add missing ``return 0''.
16233         (linux_fetch_registers): Renamed from fetch_inferior_registers.
16234         (linux_store_registers): Renamed from store_inferior_registers.
16235         (linux_read_memory): Renamed from read_inferior_memory.
16236         (linux_write_memory): Renamed from write_inferior_memory.
16237         (linux_target_ops): New structure.
16238         (initialize_low): Call set_target_ops ().
16239         * remote-utils.c (unhexify): New function.
16240         (hexify): New function.
16241         (input_interrupt): Send signals to ``signal_pid''.
16242         * server.c (inferior_pid): Remove.
16243         (start_inferior): Update create_inferior call.
16244         (attach_inferior): Call add_inferior.
16245         (handle_query): New function.
16246         (main): Call handle_query for `q' packets.
16247         * server.h: Include "target.h".  Remove obsolete prototypes.
16248         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16249
16250 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16251
16252         * Makefile.in: Add WARN_CFLAGS.  Update configury
16253         dependencies.
16254         * configure.in: Check for <string.h>
16255         * configure: Regenerate.
16256         * config.in: Regenerate.
16257         * gdbreplay.c: Include needed system headers.
16258         (remote_open): Remove strchr prototype.
16259         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16260         * regcache.c (supply_register): Change buf argument to const void *.
16261         (supply_register_by_name): Likewise.
16262         (collect_register): Change buf argument to void *.
16263         (collect_register_by_name): Likewise.
16264         * regcache.h: Add missing prototypes.
16265         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16266         * server.c (handle_query): New function.
16267         (attached): New static variable, moved out of main.
16268         (main): Quiet longjmp clobber warnings.
16269         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
16270         * utils.c (error): Remove NORETURN.
16271         (fatal): Likewise.