1 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3 * server.c: Include "filenames.h" and "pathstuff.h".
4 (program_name): Delete variable.
5 (program_path): New anonymous class.
6 (get_exec_wrapper): Use "program_path" instead of
8 (handle_v_run): Likewise.
9 (captured_main): Likewise.
10 (process_serial_event): Likewise.
12 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
14 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
15 (OBJS): Add "pathstuff.o".
16 * server.c (current_directory): New global variable.
17 (captured_main): Initialize "current_directory".
19 2018-02-26 Alan Hayward <alan.hayward@arm.com>
21 * tdesc.c: Use common/tdesc.h.
24 2018-02-20 Alan Hayward <alan.hayward@arm.com>
25 Simon Marchi <simon.marchi@ericsson.com>
27 * Makefile.in: Switch order of make rules.
29 2018-02-19 Alan Hayward <alan.hayward@arm.com>
31 * Makefile.in: Add common directory in build.
32 * configure.ac: Add common reference.
33 * configure: Regenerate.
35 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
37 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
38 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
39 * spu-low.c (spu_target_ops): Likewise.
40 * win32-low.c (win32_target_ops): Likewise.
41 * server.c (supported_btrace_packets): Report packets unconditionally.
42 * target.h (target_ops) <supports_btrace>: Remove.
43 (target_supports_btrace): Remove.
45 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
47 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
48 (handle_btrace_disable): Change return type to void. Use exceptions
50 (handle_btrace_general_set): Catch exception and copy message to
53 2018-02-08 Tom Tromey <tom@tromey.com>
55 * linux-low.c (install_software_single_step_breakpoints): Use
57 * inferiors.c (make_cleanup_restore_current_thread): Remove.
58 (do_restore_current_thread_cleanup): Remove.
59 * gdbthread.h (make_cleanup_restore_current_thread): Don't
62 2018-02-08 Tom Tromey <tom@tromey.com>
64 * mem-break.c (set_raw_breakpoint_at): Use
65 gdb::unique_xmalloc_ptr.
67 2018-01-30 Pedro Alves <palves@redhat.com>
70 * target.c (target_terminal::terminal_state): Rename to ...
71 (target_terminal::m_terminal_state): ... this.
73 2018-01-19 James Clarke <jrtc27@jrtc27.com>
75 * linux-low.c (handle_extended_wait): Surround call to
76 thread_db_notice_clone with #ifdef USE_THREAD_DB.
78 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
80 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
81 linux_ptrace_attach_fail_reason_string now returning an
83 (linux_attach): Likewise.
84 * thread-db.c (attach_thread): Likewise.
86 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
89 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
90 checking for fs_base/gs_base fields in struct user_regs_struct.
91 * configure: Regenerate.
93 2018-01-16 Yao Qi <yao.qi@linaro.org>
96 * linux-low.c (fetch_register): Call supply_register instead of
99 2018-01-08 Yao Qi <yao.qi@linaro.org>
100 Simon Marchi <simon.marchi@ericsson.com>
102 * Makefile.in (OBS): Remove selftest.o.
103 * configure.ac: Set srv_selftest_objs if $development is true.
104 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
105 * configure: Re-generated.
106 * server.c (captured_main): Wrap variable selftest_filter with
109 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
111 * server.c (parse_debug_format_options): Return std::string.
112 (handle_monitor_command, captured_main): Adjust.
114 2018-01-05 Pedro Alves <palves@redhat.com>
117 * server.c (captured_main): Pass quiet=false to
118 save_original_signals_state.
120 2018-01-01 Joel Brobecker <brobecker@adacore.com>
122 * gdbreplay.c (gdbreplay_version): Update copyright year in
124 * server.c (gdbserver_version): Likewise.
126 2017-12-08 Tom Tromey <tom@tromey.com>
128 * ax.c (ax_printf): Update.
130 2017-12-07 Yao Qi <yao.qi@linaro.org>
132 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
133 aarch64_linux_read_description.
134 * linux-amd64-ipa.c (idx2mask): New array.
135 (get_ipa_tdesc): Move idx2mask out.
136 (initialize_low_tracepoint): Initialize target descriptions.
137 * linux-i386-ipa.c (idx2mask): New array.
138 (get_ipa_tdesc): Move idx2mask out.
139 (initialize_low_tracepoint): Initialize target descriptions.
141 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
143 * tdesc.c (struct tdesc_type): Change return type.
144 (tdesc_add_flag): Change parameter type.
145 (tdesc_add_bitfield): Likewise.
146 (tdesc_add_field): Likewise.
147 (tdesc_set_struct_size): Likewise.
149 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
151 * regcache.c (registers_to_string): Remove unused variable.
153 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
155 * inferiors.c (for_each_inferior_with_data): Remove.
156 * inferiors.h (for_each_inferior_with_data): Remove.
157 * server.c (handle_qxfer_threads_worker): Change parameter type.
158 (handle_qxfer_threads_proper): Use for_each_thread.
160 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
162 * inferiors.c (for_each_inferior): Remove.
163 (clear_inferiors): Use for_each_thread.
164 * inferiors.h (for_each_inferior): Remove.
165 * linux-low.c (linux_wait_for_event_filtered): Use
167 (linux_stabilize_threads): Likewise.
168 * regcache.c (regcache_release): Likewise.
169 * server.c (gdb_wants_all_threads_stopped): Likewise.
170 (clear_pending_status_callback): Remove.
171 (handle_status): Use for_each_thread.
172 (captured_main): Likewise.
173 * win32-low.c (child_init_thread_list): Likewise.
174 (win32_clear_inferiors): Likewise.
175 (fake_breakpoint_event): Likewise.
177 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
179 * inferiors.h (find_inferior): Remove.
180 * inferiors.c (find_inferior): Remove.
182 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
184 * linux-low.c (resume_status_pending_p): Update comment.
185 (need_step_over_p): Update comment.
187 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
189 * linux-low.c (proceed_one_lwp): Return void, change parameter
191 (unsuspend_and_proceed_one_lwp): Likewise.
192 (proceed_all_lwps): Use for_each_thread.
193 (unstop_all_lwps): Likewise.
195 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
197 * linux-low.c (linux_resume_one_thread): Return void, take
199 (linux_resume): Use for_each_thread.
201 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
203 * linux-low.c (send_sigstop_callback): Return void, change
204 parameter type. Rename to...
205 (send_sigstop): ... this.
206 (suspend_and_send_sigstop_callback): Return void, change parameter
208 (suspend_and_send_sigstop): ... this.
209 (stop_all_lwps): Use for_each_thread.
211 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
213 * linux-low.c (lwp_running): Return bool, remove unused
215 (linux_stabilize_threads): Use find_thread.
217 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
219 * linux-low.c (select_singlestep_lwp_callback): Remove.
220 (count_events_callback): Remove.
221 (select_event_lwp_callback): Remove.
222 (select_event_lwp): Use find_thread/for_each_thread.
224 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
226 * linux-low.c (not_stopped_callback): Return bool, take filter
228 (linux_wait_for_event_filtered): Use find_thread.
229 (linux_wait_1): Likewise.
231 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
233 * linux-low.c (same_lwp): Remove.
234 (find_lwp_pid): Use find_thread.
236 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
238 * linux-low.c (delete_lwp_callback): Remove.
239 (linux_mourn): Use for_each_thread.
241 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
243 * linux-low.c (linux_detach_lwp_callback): Return void, remove
244 args parameter, don't check for pid.
245 (linux_detach): Use for_each_thread.
247 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
249 * linux-low.c (struct counter): Remove.
250 (second_thread_of_pid_p): Remove.
251 (last_thread_of_process_p): Use find_thread.
253 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
255 * inferiors.c (find_inferior_in_random): Remove.
256 * inferiors.h (find_inferior_in_random): Remove.
257 * linux-low.c (status_pending_p_callback): Return bool, accept
258 parameter ptid directly.
259 (linux_wait_for_event_filtered): Use find_thread_in_random.
260 (linux_wait_1): Likewise.
262 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
264 * inferiors.c (find_inferior_id): Remove.
265 (find_thread_ptid): Move implemention from find_inferior_id to
267 * inferiors.h (find_inferior_id): Remove.
268 * server.c (handle_status): Use find_thread_ptid.
269 (process_serial_event): Likewise.
270 * thread-db.c (find_one_thread): Likewise.
271 (thread_db_thread_handle): Likewise.
272 * win32-low.c (thread_rec): Likewise.
273 (child_delete_thread): Likewise.
274 (win32_thread_alive): Likewise.
275 (get_child_debug_event): Likewise.
277 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
279 * linux-mips-low.c (update_watch_registers_callback): Return
280 void, remove pid_p parameter, don't check for pid.
281 (mips_insert_point, mips_remove_point): Use for_each_thread.
283 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
285 * lynx.low (lynx_delete_thread_callback): Remove.
286 (lynx_mourn): Use for_each_thread.
288 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
290 * regcache.c (regcache_invalidate_one): Remove.
291 (regcache_invalidate_pid): use for_each_thread.
293 2017-11-26 Tom Tromey <tom@tromey.com>
295 * linux-low.c (linux_create_inferior): Update.
297 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
299 * spu-low.c (spu_create_inferior): Fix typo in argument name.
301 2017-11-24 Alan Hayward <alan.hayward@arm.com>
303 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
304 * linux-aarch64-low.c (initialize_low_arch): Call init func.
305 * linux-aarch64-tdesc-selftest.c: New file.
306 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
308 2017-11-24 Alan Hayward <alan.hayward@arm.com>
310 * configure.srv: Add new file.
311 * linux-aarch64-low.c (initialize_low_arch): Call init func.
312 * linux-aarch64-tdesc-selftest.c: New file.
313 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
315 2017-11-24 Alan Hayward <alan.hayward@arm.com>
317 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
318 * linux-aarch64-low.c (initialize_low_arch): Remove init.
319 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
321 2017-11-24 Alan Hayward <alan.hayward@arm.com>
323 * configure.srv: Add new files.
324 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
325 aarch64_linux_read_description.
326 * linux-aarch64-low.c (aarch64_linux_read_description):
327 Merge with aarch64_arch_setup.
328 (aarch64_arch_setup): Call aarch64_linux_read_description.
329 * linux-aarch64-tdesc.c: New file.
330 * linux-aarch64-tdesc.h: New file.
332 2017-11-24 Yao Qi <yao.qi@linaro.org>
334 * configure.srv: Set $srv_regobj for tic6x-linux.
335 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
336 (tic6x_read_description): Move some code to tic6x_arch_setup.
337 (tic6x_tdesc_test): New function.
338 (initialize_low_arch): Call selftests::register_test.
340 2017-11-22 Yao Qi <yao.qi@linaro.org>
342 * remote-utils.c (prepare_resume_reply): Use memcpy.
344 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
346 * linux-low.c (kill_one_lwp_callback): Return void, take
347 argument directly, don't filter on pid.
348 (linux_kill): Use for_each_thread.
350 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
352 * linux-low.c (need_step_over_p): Return bool, remove dummy
354 (linux_resume, proceed_all_lwps): Use find_thread.
356 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
358 * linux-low.c (resume_status_pending_p): Return bool, remove
360 (linux_resume): Use find_thread.
362 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
364 * linux-low.c (struct thread_resume_array): Remove.
365 (linux_set_resume_request): Return void, take arguments
367 (linux_resume): Use for_each_thread.
369 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
371 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
372 return bool, remove data argument.
373 (linux_stabilize_threads): Use find_thread.
375 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
377 * linux-low.c (unsuspend_one_lwp): Remove.
378 (unsuspend_all_lwps): Use for_each_thread, inline code from
381 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
383 * gdbthread.h (find_thread): Add overload with ptid_t filter.
384 * linux-low.c (struct iterate_over_lwps_args): Remove.
385 (iterate_over_lwps_filter): Remove.
386 (iterate_over_lwps): Use find_thread.
388 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
390 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
391 (linux_handle_new_gdb_connection): Use for_each_thread, inline
392 code from reset_lwp_ptrace_options_callback.
394 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
396 * linux-arm-low.c (struct update_registers_data): Remove.
397 (update_registers_callback): Return void, take arguments
398 directly, don't check thread's pid.
399 (arm_insert_point, arm_remove_point): Use for_each_thread.
401 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
403 * win32-low.c (continue_one_thread): Return void, take argument
405 (child_continue): Use for_each_thread.
407 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
409 * win32-i386-low.c (update_debug_registers_callback): Rename
411 (update_debug_registers): ... this, return void, remove pid_p arg.
412 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
414 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
416 * inferiors.h (struct process_info): Add constructor, initialize
418 <syscalls_to_catch>: Change type to std::vector<int>.
419 * inferiors.c (add_process): Allocate process_info with new.
420 (remove_process): Free process_info with delete.
421 * linux-low.c (handle_extended_wait): Adjust.
422 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
423 * server.c (handle_general_set): Adjust.
425 2017-11-16 Pedro Alves <palves@redhat.com>
427 * remote-utils.c (remote_close): Block SIGIO signals instead of
428 uninstalling the SIGIO handler.
430 2017-11-16 Alan Hayward <alan.hayward@arm.com>
432 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
434 2017-11-16 Yao Qi <yao.qi@linaro.org>
436 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
437 (tic6x_store_gregset): Likewise.
438 (tic6x_usrregs_info): Move it up.
440 2017-11-15 Alan Hayward <alan.hayward@arm.com>
442 * Makefile.in: Update arch rules.
443 * configure.srv: Explicitly mark arch/ files.
445 2017-11-13 Andreas Schwab <schwab@suse.de>
447 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
449 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
451 2017-11-06 Pedro Alves <palves@redhat.com>
453 * config.in, configure: Regenerate.
455 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
457 * target.c (struct thread_search): Remove.
458 (thread_search_callback): Remove.
459 (prepare_to_access_memory): Use for_each_thread instead of
460 find_inferior. Inline code from thread_search_callback.
462 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
464 * server.c (struct visit_actioned_threads_data): Remove.
465 (visit_actioned_threads): Change prototype to take arguments
467 (resume): Use find_thread instead of find_inferior.
469 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
471 * server.c (queue_stop_reply_callback): Change prototype, return
473 (find_status_pending_thread_callback): Remove.
474 (handle_status): Replace find_inferior with find_thread and
477 2017-10-25 Alan Hayward <alan.hayward@arm.com>
479 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
481 (aarch64_store_gregset): Likewise.
482 (aarch64_fill_fpregset): Likewise.
483 (aarch64_store_fpregset): Likewise.
485 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
487 * gdbthread.h (find_thread, for_each_thread): New functions.
488 * inferiors.c (thread_of_pid): Remove.
489 (find_any_thread_of_pid): Use find_thread.
490 * linux-low.c (num_lwps): Use for_each_thread.
492 2017-10-17 Yao Qi <yao.qi@linaro.org>
494 * Makefile.in: Remove one rule.
495 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
497 2017-10-17 Yao Qi <yao.qi@linaro.org>
499 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
500 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
502 2017-10-17 Yao Qi <yao.qi@linaro.org>
504 * configure.srv: Rename arm.o with arch/arm.o.
506 2017-10-17 Yao Qi <yao.qi@linaro.org>
508 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
509 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
510 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
511 (arch-i386.o, arch-amd64.o): Remove rules.
512 (arch/%.o): New rule.
513 Update POSTCOMPILE and COMPILE.pre.
514 * configure.ac: Invoke AC_CONFIG_COMMANDS.
515 * configure: Re-generated.
516 * configure.srv: Replace arch-i386.o with arch/i386.o.
517 Replace arch-amd64.o with arch/amd64.o.
519 2017-10-16 Yao Qi <yao.qi@linaro.org>
521 * configure: Regenerated.
523 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
525 * inferiors.h: (struct inferior_list): Remove.
526 (struct inferior_list_entry); Remove.
527 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
528 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
529 get_first_inferior): Remove.
530 (for_each_inferior, for_each_inferior_with_data, find_inferior,
531 find_inferior_id, find_inferior_in_random): Change signature.
532 * inferiors.c (all_threads): Change type to
533 std::list<thread_info *>.
534 (get_thread): Remove macro.
535 (find_inferior, find_inferior_id): Change signature, implement
537 (find_inferior_in_random): Change signature, implement using
538 find_thread_in_random.
539 (for_each_inferior, for_each_inferior_with_data): Change
540 signature, implement using for_each_thread.
541 (add_inferior_to_list, remove_inferior): Remove.
542 (add_thread, get_first_thread, thread_of_pid,
543 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
544 (get_first_inferior, one_inferior_p, clear_inferior_list):
546 (clear_inferiors, get_thread_process): Update.
547 * gdbthread.h: Include <list>.
548 (struct thread_info) <entry>: Remove field.
550 (all_threads): Change type to std::list<thread_info *>.
551 (get_first_inferior): Add doc.
552 (find_thread, for_each_thread, find_thread_in_random): New
554 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
555 * linux-arm-low.c (update_registers_callback): Update.
556 * linux-low.c (second_thread_of_pid_p): Update.
557 (kill_one_lwp_callback, linux_detach_lwp_callback,
558 delete_lwp_callback, status_pending_p_callback, same_lwp,
559 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
560 iterate_over_lwps, not_stopped_callback,
561 resume_stopped_resumed_lwps, count_events_callback,
562 select_singlestep_lwp_callback, select_event_lwp_callback,
563 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
564 suspend_and_send_sigstop_callback, wait_for_sigstop,
565 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
566 lwp_running, linux_set_resume_request, resume_status_pending_p,
567 need_step_over_p, start_step_over, linux_resume_one_thread,
568 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
569 reset_lwp_ptrace_options_callback): Update.
570 * linux-mips-low.c (update_watch_registers_callback): Update.
571 * regcache.c (regcache_invalidate_one, regcache_invalidate):
573 (free_register_cache_thread_one): Remove.
574 (regcache_release): Update.
575 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
576 handle_qxfer_threads_worker): Update.
577 (handle_query): Update, use list iterator.
578 (visit_actioned_threads, handle_pending_status,
579 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
580 clear_pending_status_callback, set_pending_status_callback,
581 find_status_pending_thread_callback, handle_status,
582 process_serial_event): Update.
583 * target.c (thread_search_callback): Update.
584 * thread-db.c (thread_db_get_tls_address): Update.
585 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
587 * win32-i386-low.c (update_debug_registers_callback): Update.
588 * win32-low.c (delete_thread_info, child_delete_thread,
589 continue_one_thread, suspend_one_thread,
590 get_child_debug_event): Adjust.
592 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
594 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
595 * inferiors.h: Include <list>.
596 (struct process_info) <entry>: Remove field.
598 (pid_of): Change macro to function.
599 (ptid_of, lwpid_of): Remove macro.
600 (all_processes): Change type to std::list<process_info *>.
601 (ALL_PROCESSES): Remove macro.
602 (for_each_process, find_process): New function.
603 * inferiors.c (all_processes): Change type to
604 std::list<process_info *>.
605 (find_thread_process): Adjust.
606 (add_process): Likewise.
607 (remove_process): Likewise.
608 (find_process_pid): Likewise.
609 (get_first_process): Likewise.
610 (started_inferior_callback): Remove.
611 (have_started_inferiors_p): Adjust.
612 (attached_inferior_callback): Remove.
613 (have_attached_inferiors_p): Adjust.
614 * linux-low.c (check_zombie_leaders): Likewise.
615 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
616 (x86_linux_update_xmltarget): Adjust.
617 * server.c (handle_query): Likewise.
618 (gdb_reattached_process): Remove.
619 (handle_status): Adjust.
620 (kill_inferior_callback): Likewise.
621 (detach_or_kill_inferior): Remove.
622 (print_started_pid): Likewise.
623 (print_attached_pid): Likewise.
624 (detach_or_kill_for_exit): Update.
625 (process_serial_event): Likewise.
626 * linux-arm-low.c (arm_new_fork): Likewise.
628 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
630 * dll.h: Include <list>.
631 (struct dll_info): Add constructor.
632 <entry>: Remove field.
633 (all_dlls): Change type to std::list<dll_info>.
634 * dll.c: Include <algorithm>.
635 (get_dll): Remove macro.
636 (all_dlls): Change type to std::list<dll_info *>.
637 (free_one_dll): Remove.
638 (match_dll): Likewise.
639 (loaded_dll): Adjust.
640 (unloaded_dll): Adjust to all_dlls type change, use
641 std::find_if. Inline code from match_dll.
642 (clear_dlls): Adjust to all_dlls type change.
643 * server.c (emit_dll_description): Remove.
644 (handle_qxfer_libraries): Adjust to all_dlls type change,
645 integrate emit_dll_description's functionality.
647 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
649 * linux-low.h (struct linux_target_ops) <delete_process>: New
651 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
652 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
653 (struct linux_target_ops): Add delete_process callback.
654 * linux-arm-low.c (arm_delete_process): New.
655 (struct linux_target_ops): Add delete_process callback.
656 * linux-bfin-low.c (struct linux_target_ops): Likewise.
657 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
658 * linux-m32r-low.c (struct linux_target_ops): Likewise.
659 * linux-mips-low.c (mips_linux_delete_process): New.
660 (struct linux_target_ops): Add delete_process callback.
661 * linux-ppc-low.c (struct linux_target_ops): Likewise.
662 * linux-s390-low.c (struct linux_target_ops): Likewise.
663 * linux-sh-low.c (struct linux_target_ops): Likewise.
664 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
665 * linux-tile-low.c (struct linux_target_ops): Likewise.
666 * linux-x86-low.c (x86_linux_delete_process): New.
667 (struct linux_target_ops): Add delete_process callback.
668 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
670 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
672 * linux-aarch64-low.c (the_low_target): Add thread delete
674 * linux-arm-low.c (arm_delete_thread): New function.
675 (the_low_target): Add thread delete callback.
676 * linux-bfin-low.c (the_low_target): Likewise.
677 * linux-crisv32-low.c (the_low_target): Likewise.
678 * linux-low.c (delete_lwp): Invoke delete_thread callback if
680 * linux-low.h (struct linux_target_ops) <delete_thread>: New
682 * linux-m32r-low.c (the_low_target): Add thread delete callback.
683 * linux-mips-low.c (mips_linux_delete_thread): New function.
684 (the_low_target): Add thread delete callback.
685 * linux-ppc-low.c (the_low_target): Likewise.
686 * linux-s390-low.c (the_low_target): Likewise.
687 * linux-sh-low.c (the_low_target): Likewise.
688 * linux-tic6x-low.c (the_low_target): Likewise.
689 * linux-tile-low.c (the_low_target): Likewise.
690 * linux-x86-low.c (the_low_target): Likewise.
691 * linux-xtensa-low.c (the_low_target): Likewise.
693 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
695 * win32-low.c: Include "common-inferior.h".
697 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
699 * inferiors.c (set_inferior_cwd): New function.
700 * server.c (handle_general_set): Handle QSetWorkingDir packet.
701 (handle_query): Inform that QSetWorkingDir is supported.
702 * win32-low.c (create_process): Pass the inferior's cwd to
705 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
707 * inferiors.c (current_inferior_cwd): New global variable.
708 (get_inferior_cwd): New function.
709 * inferiors.h (struct process_info) <cwd>: New field.
711 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
713 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
714 (OBS): Add gdb_tilde_expand.o.
716 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
718 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
719 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
721 2017-09-29 Pedro Alves <palves@redhat.com>
723 * ax.c (gdb_parse_agent_expr): Constify.
724 * ax.h (gdb_parse_agent_expr): Constify.
725 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
727 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
728 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
729 * remote-utils.h (read_ptid): Constify.
730 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
731 (process_point_options, process_serial_event): Constify.
732 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
733 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
734 (cmd_qtbuffer): Constify.
736 2017-09-29 Pedro Alves <palves@redhat.com>
738 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
741 2017-09-29 Pedro Alves <palves@redhat.com>
743 * linux-low.c (handle_extended_wait): Pass parent thread instead
744 of process to thread_db_notice_clone.
745 * linux-low.h (thread_db_notice_clone): Replace parent process
746 parameter with parent thread parameter.
747 * thread-db.c (find_one_thread): Add comment.
748 (thread_db_notice_clone): Replace parent process parameter with
749 parent thread parameter. Temporarily switch to the parent thread.
751 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
753 * gdbthread.h: Include "common-gdbthread.h".
754 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
755 "if" when validating the ptid.
756 * remote-utils.c: Include "gdbthread.h".
757 (prepare_resume_reply): Use "switch_to_thread".
758 * target.c (done_accessing_memory): Likewise.
760 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
762 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
763 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
764 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
765 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
766 s390x-gs-linux64-ipa.o to ipa_obj.
767 * linux-s390-low.c (HWCAP_S390_GS): New define.
768 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
770 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
771 (s390_arch_setup): Check for guarded-storage support and choose
773 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
774 init_registers_s390x_gs_linux64.
775 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
777 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
778 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
780 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
782 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
784 2017-09-21 Kevin Buettner <kevinb@redhat.com>
786 * linux-low.h (struct lwp_info): Add new field, thread_handle.
787 (thread_db_thread_handle): Declare.
788 * linux-low.c (linux_target_ops): Initialize thread_handle.
789 * server.c (handle_qxfer_threads_worker): Add support for
791 * target.h (struct target_ops): Add new function pointer,
793 (target_thread_handle): Define.
794 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
796 (thread_db_thread_handle): New function.
798 2017-09-21 Kevin Buettner <kevinb@redhat.com>
800 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
801 * linux-low.h (thread_db_notice_clone): Declare.
802 * thread-db.c (thread_db_notice_clone): New function.
804 2017-09-21 Pedro Alves <palves@redhat.com>
806 * server.c (gdb_read_memory, handle_status, process_serial_event)
807 (handle_serial_event, handle_target_event): Adjust to
808 set_desired_thread prototype change.
809 * target.c (set_desired_thread): Remove 'use_general' parameter
811 * target.h (set_desired_thread): Remove 'use_general' parameter.
813 2017-09-20 Tom Tromey <tom@tromey.com>
815 * target.c (target_terminal::terminal_state): Define.
816 (target_terminal::init): Rename from target_terminal_init.
817 (target_terminal::inferior): Rename from
818 target_terminal_inferior.
819 (target_terminal::ours): Rename from target_terminal_ours.
820 (target_terminal::ours_for_output, target_terminal::info): New.
822 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
824 * server.c (accumulate_file_name_length): Remove.
825 (emit_dll_description): Adjust to std::string change.
826 (handle_qxfer_libraries): Use std::string to hold document.
828 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
830 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
831 return type of xml_escape_text.
832 * server.c (emit_dll_description): Likewise.
834 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
836 * server.c (captured_main): Accept argument for --selftest.
837 Update run_tests call.
838 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
839 when registering selftests.
841 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
843 * regcache.c (get_thread_regcache): Update code to use "std::vector"
844 instead of "VEC" for "target_desc.reg_defs".
845 (regcache_cpy): Likewise.
846 (registers_to_string): Likewise.
847 (registers_from_string): Likewise.
848 (find_regno): Likewise.
849 (supply_regblock): Likewise.
850 (regcache_raw_read_unsigned): Likewise.
851 * tdesc.c (init_target_desc): Likewise.
852 (tdesc_create_reg): Likewise.
853 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
854 (struct target_desc) <reg_defs>: Convert to "std::vector".
855 (target_desc): Do not initialize "reg_defs".
856 (~target_desc): Update code to use "std::vector" instead of "VEC"
857 for "target_desc.reg_defs".
858 (operator==): Likewise.
860 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
862 * inferiors.h (thread_to_gdb_id): Remove.
863 * inferiors.c (thread_to_gdb_id): Remove.
864 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
865 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
866 lynx_store_registers, lynx_read_memory, lynx_write_memory):
868 * nto-low.c (nto_fetch_registers, nto_store_registers,
869 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
871 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
873 * inferiors.h (gdb_id_to_thread_id): Remove.
874 * inferiors.c (gdb_id_to_thread_id): Remove.
875 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
876 removal. Move pid declaration closer to where it's used.
878 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
880 * server.c (handle_detach): New function.
881 (process_serial_event): Move code out, call handle_detach.
883 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
885 * server.c (require_running): Rename to ...
886 (require_running_or_return): ... this ...
887 (require_running_or_break): ... and this.
888 (handle_query, process_serial_event): Adjust.
890 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
892 * linux-low.c (linux_set_resume_request): Remove unused
895 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
897 * server.c (first_thread_of): Remove.
898 (process_serial_event): Replace usage of first_thread_of with
899 find_any_thread_of_pid.
900 * tracepoint.c (same_process_p): Remove.
901 (gdb_agent_about_to_close): Replace usage of same_process_p with
902 find_any_thread_of_pid.
903 * linux-x86-low.c (same_process_callback): Remove.
904 (x86_arch_setup_process_callback): Replace usage of
905 same_process_callback with find_any_thread_of_pid.
906 * thread-db.c (any_thread_of): Remove.
907 (switch_to_process): Replace usage of any_thread_of with
908 find_any_thread_of_pid.
909 * inferiors.c (thread_pid_matches_callback): Remove.
910 (find_thread_process): Adjust to use find_any_thread_of_pid.
912 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
914 * regcache.c (get_thread_regcache): Guard calls to "memset"
917 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
919 * linux-low.c (handle_extended_wait): Use
920 "allocate_target_description" instead of "XNEW".
921 * linux-x86-low.c (initialize_low_arch): Likewise.
923 2017-09-05 Yao Qi <yao.qi@linaro.org>
925 * configure.srv (srv_i386_regobj): Remove.
926 (srv_amd64_regobj): Remove.
927 (srv_regobj): Set it to "" for x86 non-linux targets.
928 * linux-x86-tdesc.c (i386_linux_read_description):
929 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
930 (init_registers_i386): Remove the declaration.
931 (tdesc_i386): Remove the declaration.
932 (lynx_i386_arch_setup): Call i386_create_target_description.
933 * nto-x86-low.c: Likewise.
934 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
935 [!__x86_64__]: include arch/i386.h.
936 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
938 2017-09-05 Yao Qi <yao.qi@linaro.org>
940 * configure.srv (srv_amd64_linux_xmlfiles): Remove
941 i386/amd64-XXX-linux from it.
943 2017-09-05 Yao Qi <yao.qi@linaro.org>
945 * configure.srv: Empty srv_amd64_linux_regobj if $development is
947 (ipa_amd64_linux_regobj): Remove.
948 (ipa_x32_linux_regobj): Remove.
950 2017-09-05 Yao Qi <yao.qi@linaro.org>
952 * Makefile.in (arch-amd64.o): New rule.
953 * configure.srv: Append arch-amd64.o.
954 * linux-amd64-ipa.c: Include common/x86-xstate.h.
955 (get_ipa_tdesc): Call amd64_linux_read_description.
956 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
957 and init_registers_amd64_XXX.
958 * linux-x86-low.c (x86_linux_read_description): Call
959 amd64_linux_read_description.
960 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
961 (initialize_low_arch): Don't call init_registers_x32_XXX and
962 init_registers_amd64_XXX.
963 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
965 [__x86_64__] (amd64_tdesc_test): New function.
966 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
967 and init_registers_amd64_XXX.
968 * linux-x86-tdesc.c: Include arch/amd64.h.
969 (xcr0_to_tdesc_idx): New function.
970 (i386_linux_read_description): New function.
971 (amd64_get_ipa_tdesc_idx): New function.
972 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
973 (amd64_get_ipa_tdesc): Declare.
975 2017-09-05 Yao Qi <yao.qi@linaro.org>
977 * configure.srv (srv_i386_linux_xmlfiles): Remove
978 i386/i386-XXX-linux.xml from it.
980 2017-09-05 Yao Qi <yao.qi@linaro.org>
982 * configure.srv: Set srv_i386_linux_regobj empty if $development
984 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
985 initialize_low_tdesc.
986 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
987 with #if initialize_low_tdesc.
988 * linux-x86-tdesc-selftest.c: New file.
989 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
991 2017-09-05 Yao Qi <yao.qi@linaro.org>
993 * Makefile.in (arch-i386.o): New rule.
994 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
995 (x86_64-*-linux*): Likewise.
996 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
998 (i386_linux_read_description): Remove code and call
999 i386_create_target_description.
1000 * tdesc.c (allocate_target_description): New function.
1001 * tdesc.h (set_tdesc_architecture): Remove declaration.
1002 (set_tdesc_osabi): Likewise.
1004 2017-09-05 Yao Qi <yao.qi@linaro.org>
1006 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1007 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1008 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1010 * server.c (get_features_xml): Call tdesc_get_features_xml.
1011 * tdesc.c (set_tdesc_architecture): New function.
1012 (set_tdesc_osabi): New function.
1013 (tdesc_get_features_xml): New function.
1014 (tdesc_create_feature): Add an argument.
1015 * tdesc.h (struct target_desc) <features>: New field.
1016 <arch, osabi>: New field.
1017 (~target_desc): xfree features, arch, and osabi.
1018 (target_desc::oerator==): Don't compare .xmltarget.
1019 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1020 (set_tdesc_osabi): Likewise.
1021 (tdesc_get_features_xml): Likewise.
1023 2017-09-05 Yao Qi <yao.qi@linaro.org>
1025 * linux-x86-tdesc.c: Include selftest.h.
1026 (i386_tdesc_test): New function.
1027 (initialize_low_tdesc): Call selftests::register_test.
1028 * tdesc.h: Include regdef.h.
1029 (target_desc): Override operator == and !=.
1031 2017-09-05 Yao Qi <yao.qi@linaro.org>
1033 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1034 (ipa_obj): Likewise.
1035 * linux-i386-ipa.c: Include common/x86-xstate.h
1036 (get_ipa_tdesc): Call i386_linux_read_description.
1037 (initialize_low_tracepoint): Don't call init_registers_XXX
1038 functions, call initialize_low_tdesc instead.
1039 * linux-x86-low.c (x86_linux_read_description): Call
1040 i386_linux_read_description.
1041 (initialize_low_arch): Don't call init_registers_i386_XXX
1042 functions, call initialize_low_tdesc.
1043 * linux-x86-tdesc.c: New file.
1044 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1045 (i386_get_ipa_tdesc_idx): Declare.
1046 (i386_get_ipa_tdesc): Declare.
1047 (initialize_low_tdesc): Declare.
1049 2017-09-05 Yao Qi <yao.qi@linaro.org>
1051 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1054 2017-09-05 Yao Qi <yao.qi@linaro.org>
1056 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1057 * regcache.c (get_thread_regcache): Use VEC_length.
1058 (init_register_cache): Likewise.
1059 (regcache_cpy): Likewise.
1060 (registers_to_string): Iterate reg_defs via VEC_iterate.
1061 (find_regno): Likewise.
1062 (find_register_by_number): Use VEC_index.
1063 (register_size): Call find_register_by_number.
1064 (register_data): Call find_register_by_number.
1065 (supply_regblock): Use VEC_length.
1066 (regcache_raw_read_unsigned): Likewise.
1067 * tdesc.c (init_target_desc): Iterate reg_defs via
1069 (default_description): Update initializer.
1070 (copy_target_description): Don't update field num_registers.
1071 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1072 <num_registers>: Remove.
1074 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1076 * Makefile.in (.SECONDARY): Define target.
1078 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1080 * linux-low.c (linux_wait_1): Adjust.
1081 * server.c (queue_stop_reply_callback): Adjust.
1083 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1085 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1086 QEnvironmentUnset and QEnvironmentReset packets.
1087 (handle_query): Inform remote that QEnvironmentHexEncoded,
1088 QEnvironmentUnset and QEnvironmentReset are supported.
1090 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1092 * inferiors.h (inferior_target_data): Rename to ...
1093 (thread_target_data): ... this.
1094 (inferior_regcache_data): Rename to ...
1095 (thread_regcache_data): ... this.
1096 (set_inferior_regcache_data): Rename to ...
1097 (set_thread_regcache_data): ... this.
1098 * inferiors.c (inferior_target_data): Rename to ...
1099 (thread_target_data): ... this.
1100 (inferior_regcache_data): Rename to ...
1101 (thread_regcache_data): ... this.
1102 (set_inferior_regcache_data): Rename to ...
1103 (set_thread_regcache_data): ... this.
1104 (free_one_thread): Update.
1105 * linux-low.h (get_thread_lwp): Update.
1106 * regcache.c (get_thread_regcache): Update.
1107 (regcache_invalidate_thread): Update.
1108 (free_register_cache_thread): Update.
1109 * win32-i386-low.c (update_debug_registers_callback): Update.
1110 (win32_get_current_dr): Update.
1111 * win32-low.c (thread_rec): Update.
1112 (delete_thread_info): Update.
1113 (continue_one_thread): Update.
1114 (suspend_one_thread): Update.
1116 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1118 * inferiors.c (set_inferior_target_data): Remove.
1119 * inferiors.h (set_inferior_target_data): Remove.
1121 2017-08-18 Yao Qi <yao.qi@linaro.org>
1123 * Makefile.in (OBS): Add selftest.o.
1124 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1125 * configure, config.in: Re-generated.
1126 * server.c: Include common/sefltest.h.
1127 (captured_main): Handle option --selftest.
1129 2017-08-09 Yao Qi <yao.qi@linaro.org>
1131 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1132 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1133 i386-avx-mpx.o and i386-mmx.o.
1134 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1135 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1136 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1137 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1138 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1139 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1140 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1141 i386/amd64-avx-mpx.xml.
1143 2017-08-09 Yao Qi <yao.qi@linaro.org>
1145 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1146 and x32-avx-avx512.o.
1147 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1148 i386/x32-avx-avx512.xml.
1150 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1152 * tracepoint.h (enum class fast_tpoint_collect_result): New
1154 (fast_tracepoint_collecting): Change return type to
1155 fast_tpoint_collect_result.
1156 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1157 * linux-low.h: Include tracepoint.h.
1158 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1159 fast_tpoint_collect_result.
1160 * linux-low.c (handle_tracepoints): Adjust.
1161 (linux_fast_tracepoint_collecting): Change return type to
1162 fast_tpoint_collect_result.
1163 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1164 linux_wait_1, stuck_in_jump_pad_callback,
1165 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1166 proceed_one_lwp): Adjust to type change.
1168 2017-07-10 Yao Qi <yao.qi@linaro.org>
1170 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1172 2017-06-29 Yao Qi <yao.qi@linaro.org>
1174 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1176 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1178 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1180 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1182 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1184 * linux-low.c (linux_create_inferior): Adjust code to access the
1185 environment information via 'gdb_environ' class.
1186 * lynx-low.c (lynx_create_inferior): Likewise.
1187 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1188 (get_environ): Return a pointer to 'our_environ'.
1189 (captured_main): Initialize 'our_environ'.
1190 * server.h (get_environ): Adjust prototype.
1191 * spu-low.c (spu_create_inferior): Adjust code to access the
1192 environment information via 'gdb_environ' class.
1194 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1196 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1197 usage of "register" keyword.
1199 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1201 * configure: Re-generate.
1203 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1205 * configure: Re-generate.
1207 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1209 * Makefile.in (COMPILE.pre): Add "-x c++".
1211 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1213 * fork-child.c: Conditionally include <signal.h>.
1215 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1217 * server.c (handle_general_set): Handle new packet
1218 "QStartupWithShell".
1219 (handle_query): Add "QStartupWithShell" to the list of supported
1221 (gdbserver_usage): Add help text explaining the
1222 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1224 (captured_main): Recognize and act upon the presence of the new
1227 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1228 Pedro Alves <palves@redhat.com>
1230 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1231 * configure: Regenerate.
1232 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1234 (i[34567]86-*-lynxos*): Likewise.
1235 (spu*-*-*): Likewise.
1236 * fork-child.c: New file.
1237 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1239 (linux_ptrace_fun): New function.
1240 (linux_create_inferior): Adjust function prototype to reflect
1241 change on "target.h". Adjust function code to use
1243 (linux_request_interrupt): Delete "signal_pid".
1244 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1245 (lynx_ptrace_fun): New function.
1246 (lynx_create_inferior): Adjust function prototype to reflect
1247 change on "target.h". Adjust function code to use
1249 * nto-low.c (nto_create_inferior): Adjust function prototype and
1250 code to reflect change on "target.h". Update comments.
1251 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1252 "common-terminal.h" and "environ.h".
1253 (terminal_fd): Moved to fork-child.c.
1254 (old_foreground_pgrp): Likewise.
1255 (restore_old_foreground_pgrp): Likewise.
1256 (last_status): Make it global.
1257 (last_ptid): Likewise.
1258 (our_environ): New variable.
1259 (startup_with_shell): Likewise.
1260 (program_name): Likewise.
1261 (program_argv): Rename to...
1262 (program_args): ...this.
1263 (wrapper_argv): New variable.
1264 (start_inferior): Delete function.
1265 (get_exec_wrapper): New function.
1266 (get_exec_file): Likewise.
1267 (get_environ): Likewise.
1268 (prefork_hook): Likewise.
1269 (post_fork_inferior): Likewise.
1270 (postfork_hook): Likewise.
1271 (postfork_child_hook): Likewise.
1272 (handle_v_run): Update code to deal with arguments coming from the
1273 remote host. Update calls from "start_inferior" to
1275 (captured_main): Likewise. Initialize environment variable. Call
1277 * server.h (post_fork_inferior): New prototype.
1278 (get_environ): Likewise.
1279 (last_status): Declare.
1280 (last_ptid): Likewise.
1281 (signal_pid): Likewise.
1282 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1283 (spu_ptrace_fun): New function.
1284 (spu_create_inferior): Adjust function prototype to reflect change
1285 on "target.h". Adjust function code to use "fork_inferior".
1286 * target.c (target_terminal_init): New function.
1287 (target_terminal_inferior): Likewise.
1288 (target_terminal_ours): Likewise.
1289 * target.h: Include <vector>.
1290 (struct target_ops) <create_inferior>: Update prototype.
1291 (create_inferior): Update macro.
1292 * utils.c (gdb_flush_out_err): New function.
1293 * win32-low.c (win32_create_inferior): Adjust function prototype
1294 and code to reflect change on "target.h".
1296 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1298 * inferiors.c (switch_to_thread): New function.
1300 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1302 * Makefile.in (SFILE): Add "common/job-control.c".
1303 (OBS): Add "job-control.o".
1305 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1307 * Makefile: Remove "@host_makefile_frag@".
1309 2017-05-05 Pedro Alves <palves@redhat.com>
1311 * configure: Regenerate.
1313 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1315 * configure: Regenerate.
1317 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1319 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1320 software_single_step change of return type to
1321 std::vector<CORE_ADDR>.
1322 * linux-low.c (install_software_single_step_breakpoints):
1324 * linux-low.h (install_software_single_step_breakpoints):
1327 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1329 * remote-utils.c: Include "gdb_termios.h" instead of
1331 * terminal.h: Delete file.
1333 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1335 * server.c: Include <vector>.
1336 <program_argv, wrapper_argv>: Convert to std::vector.
1337 (start_inferior): Rewrite function to use C++.
1338 (handle_v_run): Likewise. Update code that calculates the argv
1339 based on the vRun packet; use C++.
1340 (captured_main): Likewise.
1342 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1344 * server.c (handle_v_cont): Initialize thread_resume::thread
1347 2017-04-05 Pedro Alves <palves@redhat.com>
1349 * configure: Regenerate.
1351 2017-04-05 Pedro Alves <palves@redhat.com>
1353 * gdbreplay.c (sync_error): Constify.
1354 * linux-x86-low.c (push_opcode): Constify.
1356 2017-04-05 Pedro Alves <palves@redhat.com>
1358 * win32-low.c (get_child_debug_event)
1359 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1360 Report TARGET_WAITKIND_SPURIOUS instead.
1362 2017-04-05 Pedro Alves <palves@redhat.com>
1364 * remote-utils.c (remote_prepare, remote_open): Constify.
1365 * remote-utils.h (remote_prepare, remote_open): Constify.
1366 * server.c (captured_main): Constify 'port' handling.
1368 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1370 * Makefile.in (clean): Clear .deps.
1372 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1374 * .gitignore: Remove generated files, replace with wildcard.
1375 * (clean): Replace removal of generated files with wildcard.
1376 (version.c): Replace with...
1377 (version-generated.c): ...this.
1378 (xml-builtin.c): Replace with...
1379 (xml-builtin-generated.c): ...this.
1380 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1381 (%.c: *regformats*): Replace with...
1382 (%-generated.c: *regformats*): ...this.
1384 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1386 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1387 (xtensa_fill_gregset): Call collect_register_by_name for
1389 (xtensa_store_gregset): Call supply_register_by_name for
1392 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1394 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1395 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1396 (xtensa_store_gregset): Call supply_register for all registers in
1397 a0_regnum..a0_regnum + C0_NREGS range.
1399 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1401 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1402 (ax-ipa.o: ax.c): Remove.
1403 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1404 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1405 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1406 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1407 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1409 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1411 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1412 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1413 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1414 (errors-ipa.o: ../common/errors.c): Remove.
1415 (format-ipa.o: ../common/format.c): Remove.
1416 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1418 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1420 * Makefile.in (%-ipa.o: %.c): New rule.
1421 (tracepoint-ipa.o: tracepoint.c): Remove.
1422 (utils-ipa.o: utils.c): Remove.
1423 (remote-utils-ipa.o: remote-utils.c): Remove.
1424 (regcache-ipa.o: regcache.c): Remove.
1425 (i386-linux-ipa.o: i386-linux.c): Remove.
1426 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1427 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1428 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1429 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1430 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1431 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1432 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1433 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1434 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1435 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1436 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1437 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1438 (aarch64-ipa.o: aarch64.c): Remove.
1439 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1440 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1441 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1442 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1443 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1444 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1445 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1446 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1447 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1448 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1449 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1450 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1451 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1452 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1453 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1454 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1455 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1456 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1457 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1458 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1459 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1460 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1461 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1462 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1463 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1464 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1465 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1466 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1467 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1468 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1469 (tdesc-ipa.o: tdesc.c): Remove.
1470 (x32-linux-ipa.o: x32-linux.c): Remove.
1471 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1472 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1474 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1476 * Makefile.in (%.o: ../arch/%.c): New rule.
1477 (arm.o: ../arch/arm.c): Remove.
1478 (arm-linux.o: ../arch/arm-linux.c): Remove.
1479 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1480 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1482 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1484 * Makefile.in (%.o: ../nat/%.c): New rule.
1485 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1486 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1487 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1488 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1489 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1490 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1491 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1492 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1493 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1494 (linux-personality.o: ../nat/linux-personality.c): Remove.
1495 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1496 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1497 (x86-linux.o: ../nat/x86-linux.c): Remove.
1498 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1499 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1501 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1503 * Makefile.in (%.o: ../common/%.c): New rule.
1504 (signals.o: ../common/signals.c): Remove.
1505 (print-utils.o: ../common/print-utils.c): Remove.
1506 (rsp-low.o: ../common/rsp-low.c): Remove.
1507 (common-utils.o: ../common/common-utils.c): Remove.
1508 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1509 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1510 (vec.o: ../common/vec.c): Remove.
1511 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1512 (xml-utils.o: ../common/xml-utils.c): Remove.
1513 (ptid.o: ../common/ptid.c): Remove.
1514 (buffer.o: ../common/buffer.c): Remove.
1515 (format.o: ../common/format.c): Remove.
1516 (filestuff.o: ../common/filestuff.c): Remove.
1517 (agent.o: ../common/agent.c): Remove.
1518 (errors.o: ../common/errors.c): Remove.
1519 (environ.o: ../common/environ.c): Remove.
1520 (common-debug.o: ../common/common-debug.c): Remove.
1521 (cleanups.o: ../common/cleanups.c): Remove.
1522 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1523 (fileio.o: ../common/fileio.c): Remove.
1524 (common-regcache.o: ../common/common-regcache.c): Remove.
1525 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1526 (new-op.o: ../common/new-op.c): Remove.
1527 (btrace-common.o: ../common/btrace-common.c): Remove.
1529 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1531 * Makefile.in (%.o: ../target/%.c): New rule.
1532 (waitstatus.o: ../target/waitstatus.c): Remove.
1534 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1537 (%.c: ../regformats/%.dat,
1538 (%.c: ../regformats/arm/%.dat,
1539 (%.c: ../regformats/i386/%.dat,
1540 (%.c: ../regformats/rs6000/%.dat): New rules.
1541 (aarch64.c): Remove.
1542 (reg-arm.c): Remove.
1543 (arm-with-iwmmxt.c): Remove.
1544 (arm-with-vfpv2.c): Remove.
1545 (arm-with-vfpv3.c): Remove.
1546 (arm-with-neon.c): Remove.
1547 (reg-bfin.c): Remove.
1548 (reg-cris.c): Remove.
1549 (reg-crisv32.c): Remove.
1551 (i386-linux.c): Remove.
1552 (i386-avx.c): Remove.
1553 (i386-avx-linux.c): Remove.
1554 (i386-avx-avx512.c): Remove.
1555 (i386-avx-avx512-linux.c): Remove.
1556 (i386-mpx.c): Remove.
1557 (i386-mpx-linux.c): Remove.
1558 (i386-avx-mpx-avx512-pku.c): Remove.
1559 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1560 (i386-avx-mpx.c): Remove.
1561 (i386-avx-mpx-linux.c): Remove.
1562 (i386-mmx.c): Remove.
1563 (i386-mmx-linux.c): Remove.
1564 (reg-ia64.c): Remove.
1565 (reg-m32r.c): Remove.
1566 (reg-m68k.c): Remove.
1568 (mips-linux.c): Remove.
1569 (mips-dsp-linux.c): Remove.
1570 (mips64-linux.c): Remove.
1571 (mips64-dsp-linux.c): Remove.
1572 (nios2-linux.c): Remove.
1573 (powerpc-32.c): Remove.
1574 (powerpc-32l.c): Remove.
1575 (powerpc-altivec32l.c): Remove.
1576 (powerpc-cell32l.c): Remove.
1577 (powerpc-vsx32l.c): Remove.
1578 (powerpc-isa205-32l.c): Remove.
1579 (powerpc-isa205-altivec32l.c): Remove.
1580 (powerpc-isa205-vsx32l.c): Remove.
1581 (powerpc-e500l.c): Remove.
1582 (powerpc-64l.c): Remove.
1583 (powerpc-altivec64l.c): Remove.
1584 (powerpc-cell64l.c): Remove.
1585 (powerpc-vsx64l.c): Remove.
1586 (powerpc-isa205-64l.c): Remove.
1587 (powerpc-isa205-altivec64l.c): Remove.
1588 (powerpc-isa205-vsx64l.c): Remove.
1589 (s390-linux32.c): Remove.
1590 (s390-linux32v1.c): Remove.
1591 (s390-linux32v2.c): Remove.
1592 (s390-linux64.c): Remove.
1593 (s390-linux64v1.c): Remove.
1594 (s390-linux64v2.c): Remove.
1595 (s390-te-linux64.c): Remove.
1596 (s390-vx-linux64.c): Remove.
1597 (s390-tevx-linux64.c): Remove.
1598 (s390x-linux64.c): Remove.
1599 (s390x-linux64v1.c): Remove.
1600 (s390x-linux64v2.c): Remove.
1601 (s390x-te-linux64.c): Remove.
1602 (s390x-vx-linux64.c): Remove.
1603 (s390x-tevx-linux64.c): Remove.
1604 (tic6x-c64xp-linux.c): Remove.
1605 (tic6x-c64x-linux.c): Remove.
1606 (tic6x-c62x-linux.c): Remove.
1608 (reg-sparc64.c): Remove.
1609 (reg-spu.c): Remove.
1611 (amd64-linux.c): Remove.
1612 (amd64-avx.c): Remove.
1613 (amd64-avx-linux.c): Remove.
1614 (amd64-avx-avx512.c): Remove.
1615 (amd64-avx-avx512-linux.c): Remove.
1616 (amd64-mpx.c): Remove.
1617 (amd64-mpx-linux.c): Remove.
1618 (amd64-avx-mpx-avx512-pku.c): Remove.
1619 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1620 (amd64-avx-mpx.c): Remove.
1621 (amd64-avx-mpx-linux.c): Remove.
1623 (x32-linux.c): Remove.
1624 (x32-avx.c): Remove.
1625 (x32-avx-linux.c): Remove.
1626 (x32-avx-avx512.c): Remove.
1627 (x32-avx-avx512-linux.c): Remove.
1628 (reg-xtensa.c): Remove.
1629 (reg-tilegx.c): Remove.
1630 (reg-tilegx32.c): Remove.
1632 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1634 * Makefile.in (SFILES): Add "common/environ.c".
1635 (OBJS): Add "common/environ.h".
1637 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1639 * configure.ac: Check if the fs_base and gs_base members of
1640 `struct user_regs_struct' exist.
1641 * config.in: Regenerated.
1642 * configure: Likewise.
1644 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1646 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1648 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1649 (get_next_pcs_syscall_next_pc): Likewise.
1651 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1653 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1654 * nto-x86-low.c: Likewise.
1656 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1658 * Makefile.in: Include disable-implicit-rules.mk.
1660 2016-11-23 Pedro Alves <palves@redhat.com>
1662 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1663 (debug_vprintf): Use std::chrono::steady_clock instead of
1664 gettimeofday. Use '.' instead of ':'.
1665 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1666 (get_timestamp): Use std::chrono::steady_clock instead of
1669 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1671 * Makefile.in: Fix whitespace formatting.
1673 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1675 * Makefile.in (SFILES, OBS): Flatten list and order
1678 2016-11-23 Pedro Alves <palves@redhat.com>
1680 * event-loop.c (handle_file_event): Use warning.
1681 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1682 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1685 2016-11-23 Pedro Alves <palves@redhat.com>
1687 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1689 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1690 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1691 debug_printf and debug_flush for debug output.
1692 * server.c (handle_general_set): Likewise.
1693 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1696 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1698 * Makefile.in (.c.o): Replace rule with ...
1699 (%.o: %.c): ... this one.
1701 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1703 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1704 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1706 * configure.ac: Remove checks for the make program.
1707 * configure: Re-generate.
1709 2016-10-28 Pedro Alves <palves@redhat.com>
1711 * Makefile.in (CXX_DIALECT): Get from configure.
1712 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1713 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1714 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1715 * config.in: Regenerate.
1716 * configure: Regenerate.
1718 2016-10-27 Yao Qi <yao.qi@linaro.org>
1720 * linux-low.c (linux_supports_range_stepping): Return true if
1721 can_software_single_step return true.
1723 2016-10-27 Yao Qi <yao.qi@linaro.org>
1725 * inferiors.c (find_inferior_in_random): New function.
1726 * inferiors.h (find_inferior_in_random): Declare.
1727 * linux-low.c (linux_wait_for_event_filtered): Call
1728 find_inferior_in_random instead of find_inferior.
1730 2016-10-27 Yao Qi <yao.qi@linaro.org>
1732 * linux-low.c (linux_wait_1): If single-step breakpoints are
1733 inserted, remove them.
1735 2016-10-26 Pedro Alves <palves@redhat.com>
1737 * linux-low.c (handle_extended_wait): Link parent/child fork
1739 (linux_wait_1): Unlink them.
1740 (linux_set_resume_request): Ignore resume requests for
1741 already-resumed and unhandled fork child threads.
1742 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1743 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1745 (handle_v_requests) <vCont>: Don't call require_running.
1746 * server.h (in_queued_stop_replies): New declaration.
1748 2016-10-24 Yao Qi <yao.qi@linaro.org>
1751 * linux-aarch64-low.c (append_insns): Cast the return value to
1754 2016-10-10 Yao Qi <yao.qi@linaro.org>
1756 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1758 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1760 * target.c (target_supports_multi_process): New function, moved
1762 * target.h (target_supports_multi_process): ... here. Remove
1765 2016-10-05 Tom Tromey <tom@tromey.com>
1768 * tracepoint.c (handle_tracepoint_bkpts): Check
1769 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1771 2016-10-05 Yao Qi <yao.qi@linaro.org>
1773 * configure.srv: Update the path of arm-*.xml files.
1775 2016-10-05 Terry Guo <terry.guo@arm.com>
1776 Yao Qi <yao.qi@linaro.org>
1778 * Makefile.in: Adjust the path of rules.
1779 * configure.srv: Update the path of xml files.
1780 * regformats/arm-with-iwmmxt.dat: Regenerated.
1781 * regformats/arm-with-neon.dat: Likewise.
1782 * regformats/arm-with-vfpv2.dat: Likewise.
1783 * regformats/arm-with-vfpv3.dat Likewise.
1785 2016-09-30 Yao Qi <yao.qi@linaro.org>
1788 * target.c (target_stop_and_wait): Don't call
1789 target_continue_no_signal, use resume_stop instead.
1791 2016-09-26 Yao Qi <yao.qi@linaro.org>
1793 * linux-low.c (linux_wait_1): Call debug_exit.
1795 2016-09-23 Pedro Alves <palves@redhat.com>
1797 * Makefile.in (SFILES): Add common/new-op.c.
1798 (OBS): Add common/new-op.o.
1799 (new-op.o): New rule.
1801 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1803 * .gitinore: Ignore more files.
1805 2016-09-21 Yao Qi <yao.qi@linaro.org>
1807 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1810 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1812 * server.c (start_inferior): Call target_mourn_inferior instead of
1813 mourn_inferior; pass ptid_t argument to it.
1815 (handle_target_event): Likewise.
1816 * target.c (target_mourn_inferior): New function.
1817 * target.h (mourn_inferior): Delete macro.
1819 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1821 * linux-low.c (lwp_is_stepping): New function.
1823 2016-09-06 Carl Love <cel@us.ibm.com>
1825 * server.c (start_inferior): Fixed comment, requested comment change
1826 didn't get updated correctly. Removed reference to ptrace () call as
1827 it is only true on Linux systems.
1829 2016-09-06 Carl Love <cel@us.ibm.com>
1831 * server.c (start_inferior): Do not call
1832 function target_post_create_inferior () if the
1833 inferior process has already exited.
1835 2016-09-05 Pedro Alves <palves@redhat.com>
1837 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1838 (COMPILE.pre, CC_LD): Use CXX directly.
1839 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1840 * acinclude.m4: Don't include build-with-cxx.m4.
1841 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1842 * configure: Regenerate.
1844 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1847 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1848 call writing data to own_buf.
1850 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1852 * target.c (mywait): Call target_wait instead of
1854 (target_wait): New function.
1856 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1858 * server.c (start_inferior): New variable 'ptid'. Replace calls
1859 to the_target->resume by target_continue{,_no_signal}, depending
1861 * target.c (target_stop_and_wait): Call target_continue_no_signal
1862 instead of the_target->resume.
1863 (target_continue): New function.
1865 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1867 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1869 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1872 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1874 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1875 * linux-arm-low.c (ps_get_thread_area): Likewise.
1876 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1877 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1878 * linux-mips-low.c (ps_get_thread_area): Likewise.
1879 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1880 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1881 * linux-x86-low.c (ps_get_thread_area): Likewise.
1882 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1884 2016-08-19 Pedro Alves <palves@redhat.com>
1886 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1888 2016-08-19 Pedro Alves <palves@redhat.com>
1890 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1891 comment. Use memcpy instead of casting through unsigned long.
1893 2016-08-19 Pedro Alves <palves@redhat.com>
1895 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1896 allocating around 0x80000000.
1898 2016-08-19 Pedro Alves <palves@redhat.com>
1901 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1902 (x32-avx512-linux-ipa.o): New rules.
1903 * configure.ac (x86_64-*-linux*): New x32 check.
1904 * configure.srv (ipa_x32_linux_regobj): New.
1905 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1906 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1908 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1910 * configure: Regenerate.
1912 2016-08-09 Pedro Alves <palves@redhat.com>
1915 * Makefile.in (OBS): Add signals-state-save-restore.o.
1916 (signals-state-save-restore.o): New rule.
1917 * config.in: Regenerate.
1918 * configure: Regenerate.
1919 * linux-low.c: Include "signals-state-save-restore.h".
1920 (linux_create_inferior): Call
1921 restore_original_signals_state.
1922 * server.c: Include "dispositions-save-restore.h".
1923 (captured_main): Call save_original_signals_state.
1925 2016-08-05 Pedro Alves <palves@redhat.com>
1927 * configure: Regenerate.
1929 2016-08-04 Yao Qi <yao.qi@linaro.org>
1931 * linux-low.c (regsets_fetch_inferior_registers): Check
1932 errno is ESRCH or not.
1934 2016-08-02 Yao Qi <yao.qi@linaro.org>
1936 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1937 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1938 (thread_db_load_search): Update.
1939 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1940 td_ta_set_event and td_ta_event_getmsg.
1942 2016-07-26 Pedro Alves <palves@redhat.com>
1945 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1946 of unsigned long for 64-bit registers and use uint32_t instead of
1947 unsigned int for 32-bit registers.
1949 2016-07-26 Pedro Alves <palves@redhat.com>
1951 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1954 2016-07-21 Tom Tromey <tom@tromey.com>
1956 * configure: Rebuild.
1958 2016-07-21 Yao Qi <yao.qi@linaro.org>
1960 * mem-break.c (find_gdb_breakpoint): Cast bp to
1961 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1963 2016-07-21 Yao Qi <yao.qi@linaro.org>
1965 * server.c (handle_v_requests): Support s and S actions
1966 if target_supports_software_single_step return true.
1968 2016-07-21 Yao Qi <yao.qi@linaro.org>
1970 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1971 is resume_step, call maybe_hw_step.
1972 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1974 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1976 (proceed_one_lwp): If resume request is resume_step, install
1977 reinsert breakpoints and call maybe_hw_step.
1979 2016-07-21 Yao Qi <yao.qi@linaro.org>
1981 * linux-low.c (proceed_one_lwp): Declare.
1982 (linux_resume_one_thread): Remove local variable 'step'.
1983 Lift code enqueue signal. Call proceed_one_lwp instead of
1984 linux_resume_one_lwp.
1986 2016-07-21 Yao Qi <yao.qi@linaro.org>
1988 * linux-low.c (linux_resume_one_thread): Call
1989 enqueue_pending_signal.
1991 2016-07-21 Yao Qi <yao.qi@linaro.org>
1993 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1994 * inferiors.c (do_restore_current_thread_cleanup): New function.
1995 (make_cleanup_restore_current_thread): Likewise.
1996 * linux-low.c (install_software_single_step_breakpoints): Call
1997 make_cleanup_restore_current_thread. Switch current_thread to
2000 2016-07-21 Yao Qi <yao.qi@linaro.org>
2002 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2003 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2004 (clone_one_breakpoint): Likewise.
2005 (delete_reinsert_breakpoints): Change parameter to thread.
2007 (has_reinsert_breakpoints): Likewise.
2008 (uninsert_reinsert_breakpoints): Likewise.
2009 (reinsert_reinsert_breakpoints): Likewise.
2010 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2011 (delete_reinsert_breakpoints): Likewise.
2012 (reinsert_reinsert_breakpoints): Likewise.
2013 (uninsert_reinsert_breakpoints): Likewise.
2014 (has_reinsert_breakpoints): Likewise.
2016 2016-07-21 Yao Qi <yao.qi@linaro.org>
2018 * inferiors.c (get_thread_process): Make parameter const.
2019 * inferiors.h (get_thread_process): Update declaration.
2020 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2021 Add new parameters child_thread and parent_thread. Callers
2023 * mem-break.h (clone_all_breakpoints): Update declaration.
2025 2016-07-21 Yao Qi <yao.qi@linaro.org>
2027 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2028 <command_list, handler>: Remove.
2029 (struct gdb_breakpoint): New.
2030 (struct other_breakpoint): New.
2031 (struct reinsert_breakpoint): New.
2032 (is_gdb_breakpoint): New function.
2033 (any_persistent_commands): Update command_list if
2034 is_gdb_breakpoint returns true.
2035 (set_breakpoint): Create breakpoints according to their types.
2036 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2037 (set_gdb_breakpoint_1): Likewise.
2038 (set_gdb_breakpoint): Likewise.
2039 (clear_breakpoint_conditions): Change parameter type to
2040 'struct gdb_breakpoint *'.
2041 (clear_breakpoint_commands): Likewise.
2042 (clear_breakpoint_conditions_and_commands): Likewise.
2043 (add_condition_to_breakpoint): Likewise.
2044 (add_breakpoint_condition): Likewise.
2045 (add_commands_to_breakpoint): Likewise.
2046 (check_breakpoints): Check other_breakpoint.
2047 (clone_one_breakpoint): Clone breakpopint according to its type.
2048 * mem-break.h (struct gdb_breakpoint): Declare.
2049 (set_gdb_breakpoint): Update declaration.
2050 (clear_breakpoint_conditions_and_commands): Likewise.
2051 (add_breakpoint_condition): Likewise.
2052 (add_breakpoint_commands): Likewise.
2053 * server.c (process_point_options): Change parameter type to
2054 'struct gdb_breakpoint *'.
2056 2016-07-21 Yao Qi <yao.qi@linaro.org>
2058 * mem-break.c (set_breakpoint_at): Rename it to ...
2059 (set_breakpoint_type_at): ... it.
2060 (set_breakpoint_at): Call set_breakpoint_type_at.
2061 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2062 * mem-break.h (set_breakpoint_at): Update comments.
2064 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2066 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2068 (nios2_store_gregset): Likewise.
2070 2016-07-01 Pedro Alves <palves@redhat.com>
2071 Antoine Tremblay <antoine.tremblay@ericsson.com>
2073 * linux-low.c: Change interface to take the target lwp_info
2074 pointer directly and return void. Handle detaching from a zombie
2076 (linux_detach_lwp_callback): New function.
2077 (linux_detach): Detach from the leader thread after detaching from
2080 2016-06-28 Yao Qi <yao.qi@linaro.org>
2082 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2083 for variable new_offset.
2084 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2085 (aarch64_ftrace_insn_reloc_cb): Likewise.
2086 (aarch64_ftrace_insn_reloc_tb): Likewise.
2087 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2088 PRIx64 instead of PRIx32.
2090 2016-06-28 Yao Qi <yao.qi@linaro.org>
2092 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2093 (the_low_target): Install arm_get_syscall_trapinfo.
2095 2016-06-28 Yao Qi <yao.qi@linaro.org>
2097 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2099 (the_low_target): Install aarch64_get_syscall_trapinfo.
2101 2016-06-28 Yao Qi <yao.qi@linaro.org>
2103 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2105 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2106 Remove parameter sysno.
2107 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2110 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2112 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2113 (s390_emit_ne_goto): Likewise.
2114 (s390_emit_lt_goto): Likewise.
2115 (s390_emit_le_goto): Likewise.
2116 (s390_emit_gt_goto): Likewise.
2117 (s390_emit_ge_goto): Likewise.
2118 (s390x_emit_eq_goto): Likewise.
2119 (s390x_emit_ne_goto): Likewise.
2120 (s390x_emit_lt_goto): Likewise.
2121 (s390x_emit_le_goto): Likewise.
2122 (s390x_emit_gt_goto): Likewise.
2123 (s390x_emit_ge_goto): Likewise.
2124 (s390_emit_ops_impl): Mark variable static.
2125 (s390x_emit_ops): Likewise.
2127 2016-06-17 Yao Qi <yao.qi@linaro.org>
2129 * linux-low.c (handle_extended_wait): Call
2130 uninsert_reinsert_breakpoints for the parent process. Remove
2131 reinsert breakpoints from the child process. Reinsert them to
2132 the parent process when vfork is done.
2133 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2134 (reinsert_reinsert_breakpoints): New function.
2135 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2136 (reinsert_reinsert_breakpoints): Declare.
2138 2016-06-17 Yao Qi <yao.qi@linaro.org>
2140 * linux-low.c (handle_extended_wait): If the parent is doing
2141 step-over, remove the reinsert breakpoints from the forked child.
2143 2016-06-17 Yao Qi <yao.qi@linaro.org>
2145 * linux-low.c (unsuspend_all_lwps): Declare.
2146 (linux_low_filter_event): If thread exited, call finish_step_over.
2147 If step-over is finished, unsuspend other threads.
2149 2016-06-17 Yao Qi <yao.qi@linaro.org>
2151 * linux-low.c (linux_resume_one_lwp_throw): Assert
2152 has_reinsert_breakpoints returns false.
2153 * mem-break.c (delete_disabled_breakpoints): Assert
2154 bp type isn't reinsert_breakpoint.
2156 2016-06-17 Yao Qi <yao.qi@linaro.org>
2158 * linux-low.c (maybe_hw_step): New function.
2159 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2160 (finish_step_over): Switch current_thread to lwp temporarily,
2161 and assert has_reinsert_breakpoints returns true.
2162 (proceed_one_lwp): Call maybe_hw_step.
2163 * mem-break.c (has_reinsert_breakpoints): New function.
2164 * mem-break.h (has_reinsert_breakpoints): Declare.
2166 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2168 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2170 2016-05-17 Yao Qi <yao.qi@linaro.org>
2172 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2173 instead of find_inferior.
2175 2016-05-05 Yao Qi <yao.qi@linaro.org>
2177 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2178 Initialize res to zero.
2180 2016-05-05 Yao Qi <yao.qi@linaro.org>
2182 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2185 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2187 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2188 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2189 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2191 2016-04-28 Par Olsson <par.olsson@windriver.com>
2192 Simon Marchi <simon.marchi@ericsson.com>
2194 * tracepoint.c (write_inferior_int8): New function.
2195 (cmd_qtenable_disable): Write enable flag using
2196 write_inferior_int8.
2198 2016-04-25 Yao Qi <yao.qi@linaro.org>
2200 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2201 (need_step_over_p): Return zero if the LWP has pending signals
2202 can be delivered on software single step target.
2204 2016-04-25 Yao Qi <yao.qi@linaro.org>
2206 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2207 return instead of error.
2209 2016-04-22 Yao Qi <yao.qi@linaro.org>
2211 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2214 2016-04-22 Yao Qi <yao.qi@linaro.org>
2216 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2217 signal when stepping over breakpoint with software single
2220 2016-04-21 Pedro Alves <palves@redhat.com>
2222 * linux-s390-low.c (s390_collect_ptrace_register)
2223 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2225 (s390_check_regset): Use void * instead of gdb_byte *.
2227 2016-04-20 Pedro Alves <palves@redhat.com>
2229 * configure: Renegerate.
2231 2016-04-20 Yao Qi <yao.qi@linaro.org>
2233 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2234 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2236 (arm_store_gregset): Likewise.
2238 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2240 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2241 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2242 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2243 (amd64-avx-mpx-linux.c): New rules.
2244 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2245 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2246 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2247 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2248 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2249 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2250 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2251 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2252 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2253 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2254 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2255 * linux-x86-low.c (x86_linux_read_description): Add case for
2256 X86_XSTATE_AVX_MPX_MASK.
2257 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2258 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2259 init_registers_i386_avx_mpx_linux.
2260 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2261 (initialize_low_tracepoint): Call
2262 init_registers_i386_avx_mpx_linux.
2263 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2264 (initialize_low_tracepoint): Call
2265 init_registers_amd64_avx_mpx_linux.
2266 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2267 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2268 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2271 2016-04-18 Pedro Alves <palves@redhat.com>
2273 * configure: Regenerate.
2275 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2277 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2278 (aarch64_emit_sub): Likewise.
2280 2016-04-12 Pedro Alves <palves@redhat.com>
2282 * utils.c (prepare_to_throw_exception): Delete.
2284 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2286 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2288 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2290 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2292 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2294 * linux-aarch64-ipa.c: Add <elf.h> include.
2295 * linux-ppc-ipa.c: Add <elf.h> include.
2296 * linux-s390-ipa.c: Add <elf.h> include.
2298 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2300 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2301 (get_raw_reg_ptr): Likewise.
2302 (get_trace_state_variable_value_ptr): Likewise.
2303 (set_trace_state_variable_value_ptr): Likewise.
2304 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2307 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2308 Marcin Kościelnicki <koriakin@0x04.net>
2311 * linux-ppc-low.c (emit_insns): New function.
2312 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2313 (ppc_emit_prologue): New function.
2314 (ppc_emit_epilogue): New function.
2315 (ppc_emit_add): New function.
2316 (ppc_emit_sub): New function.
2317 (ppc_emit_mul): New function.
2318 (ppc_emit_lsh): New function.
2319 (ppc_emit_rsh_signed): New function.
2320 (ppc_emit_rsh_unsigned): New function.
2321 (ppc_emit_ext): New function.
2322 (ppc_emit_zero_ext): New function.
2323 (ppc_emit_log_not): New function.
2324 (ppc_emit_bit_and): New function.
2325 (ppc_emit_bit_or): New function.
2326 (ppc_emit_bit_xor): New function.
2327 (ppc_emit_bit_not): New function.
2328 (ppc_emit_equal): New function.
2329 (ppc_emit_less_signed): New function.
2330 (ppc_emit_less_unsigned): New function.
2331 (ppc_emit_ref): New function.
2332 (ppc_emit_const): New function.
2333 (ppc_emit_reg): New function.
2334 (ppc_emit_pop): New function.
2335 (ppc_emit_stack_flush): New function.
2336 (ppc_emit_swap): New function.
2337 (ppc_emit_stack_adjust): New function.
2338 (ppc_emit_call): New function.
2339 (ppc_emit_int_call_1): New function.
2340 (ppc_emit_void_call_2): New function.
2341 (ppc_emit_if_goto): New function.
2342 (ppc_emit_goto): New function.
2343 (ppc_emit_eq_goto): New function.
2344 (ppc_emit_ne_goto): New function.
2345 (ppc_emit_lt_goto): New function.
2346 (ppc_emit_le_goto): New function.
2347 (ppc_emit_gt_goto): New function.
2348 (ppc_emit_ge_goto): New function.
2349 (ppc_write_goto_address): New function.
2350 (ppc_emit_ops_impl): New static variable.
2351 (ppc64v1_emit_prologue): New function.
2352 (ppc64v2_emit_prologue): New function.
2353 (ppc64_emit_epilogue): New function.
2354 (ppc64_emit_add): New function.
2355 (ppc64_emit_sub): New function.
2356 (ppc64_emit_mul): New function.
2357 (ppc64_emit_lsh): New function.
2358 (ppc64_emit_rsh_signed): New function.
2359 (ppc64_emit_rsh_unsigned): New function.
2360 (ppc64_emit_ext): New function.
2361 (ppc64_emit_zero_ext): New function.
2362 (ppc64_emit_log_not): New function.
2363 (ppc64_emit_bit_and): New function.
2364 (ppc64_emit_bit_or): New function.
2365 (ppc64_emit_bit_xor): New function.
2366 (ppc64_emit_bit_not): New function.
2367 (ppc64_emit_equal): New function.
2368 (ppc64_emit_less_signed): New function.
2369 (ppc64_emit_less_unsigned): New function.
2370 (ppc64_emit_ref): New function.
2371 (ppc64_emit_const): New function.
2372 (ppc64v1_emit_reg): New function.
2373 (ppc64v2_emit_reg): New function.
2374 (ppc64_emit_pop): New function.
2375 (ppc64_emit_stack_flush): New function.
2376 (ppc64_emit_swap): New function.
2377 (ppc64v1_emit_call): New function.
2378 (ppc64v2_emit_call): New function.
2379 (ppc64v1_emit_int_call_1): New function.
2380 (ppc64v2_emit_int_call_1): New function.
2381 (ppc64v1_emit_void_call_2): New function.
2382 (ppc64v2_emit_void_call_2): New function.
2383 (ppc64_emit_if_goto): New function.
2384 (ppc64_emit_eq_goto): New function.
2385 (ppc64_emit_ne_goto): New function.
2386 (ppc64_emit_lt_goto): New function.
2387 (ppc64_emit_le_goto): New function.
2388 (ppc64_emit_gt_goto): New function.
2389 (ppc64_emit_ge_goto): New function.
2390 (ppc64v1_emit_ops_impl): New static variable.
2391 (ppc64v2_emit_ops_impl): New static variable.
2392 (ppc_emit_ops): New function.
2393 (linux_low_target): Wire in ppc_emit_ops.
2395 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2396 Marcin Kościelnicki <koriakin@0x04.net>
2399 * Makefile.in: Add powerpc-*-ipa.o
2400 * configure.srv: Add ipa_obj for powerpc*-linux.
2401 * linux-ppc-ipa.c: New file.
2402 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2404 (PPC_FIELD): New macro.
2405 (PPC_SEXT): New macro.
2406 (PPC_OP6): New macro.
2407 (PPC_BO): New macro.
2408 (PPC_LI): New macro.
2409 (PPC_BD): New macro.
2410 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2411 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2412 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2413 (ppc_get_thread_area): New function.
2414 (is_elfv2_inferior): New function.
2415 (gen_ds_form): New function.
2416 (GEN_STD): New macro.
2417 (GEN_STDU): New macro.
2418 (GEN_LD): New macro.
2419 (GEN_LDU): New macro.
2420 (gen_d_form): New function.
2421 (GEN_ADDI): New macro.
2422 (GEN_ADDIS): New macro.
2423 (GEN_LI): New macro.
2424 (GEN_LIS): New macro.
2425 (GEN_ORI): New macro.
2426 (GEN_ORIS): New macro.
2427 (GEN_LWZ): New macro.
2428 (GEN_STW): New macro.
2429 (GEN_STWU): New macro.
2430 (gen_xfx_form): New function.
2431 (GEN_MFSPR): New macro.
2432 (GEN_MTSPR): New macro.
2433 (GEN_MFCR): New macro.
2434 (GEN_MTCR): New macro.
2435 (GEN_SYNC): New macro.
2436 (GEN_LWSYNC): New macro.
2437 (gen_x_form): New function.
2438 (GEN_OR): New macro.
2439 (GEN_MR): New macro.
2440 (GEN_LWARX): New macro.
2441 (GEN_STWCX): New macro.
2442 (GEN_CMPW): New macro.
2443 (gen_md_form): New function.
2444 (GEN_RLDICL): New macro.
2445 (GEN_RLDICR): New macro.
2446 (gen_i_form): New function.
2448 (GEN_BL): New macro.
2449 (gen_b_form): New function.
2450 (GEN_BNE): New macro.
2451 (GEN_LOAD): New macro.
2452 (GEN_STORE): New macro.
2453 (gen_limm): New function.
2454 (gen_atomic_xchg): New function.
2455 (gen_call): New function.
2456 (ppc_relocate_instruction): New function.
2457 (ppc_install_fast_tracepoint_jump_pad): New function.
2458 (ppc_get_min_fast_tracepoint_insn_len): New function.
2459 (ppc_get_ipa_tdesc_idx): New function.
2460 (the_low_target): Wire in the new functions.
2461 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2463 * linux-ppc-tdesc.h: New file.
2465 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2467 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2468 (alloc_jump_pad_buffer): New function.
2469 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2470 (alloc_jump_pad_buffer): New function.
2471 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2472 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2473 (alloc_jump_pad_buffer): New function.
2474 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2475 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2476 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2477 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2479 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2481 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2482 * linux-amd64-ipa.c: Likewise.
2483 * linux-i386-ipa.c: Likewise.
2484 * linux-s390-ipa.c: Likewise.
2485 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2486 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2487 set_trace_state_variable_value_ptr.
2488 (struct ipa_sym_addresses): Likewise.
2489 (symbol_list): Likewise.
2490 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2491 accessing gdb_collect directly.
2492 (gdb_collect_ptr_type): New typedef.
2493 (get_raw_reg_ptr_type): New typedef.
2494 (get_trace_state_variable_value_ptr_type): New typedef.
2495 (set_trace_state_variable_value_ptr_type): New typedef.
2496 (gdb_collect_ptr): New global.
2497 (get_raw_reg_ptr): New global.
2498 (get_trace_state_variable_value_ptr): New global.
2499 (set_trace_state_variable_value_ptr): New global.
2500 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2501 accessing get_raw_reg directly.
2502 (get_get_tsv_func_addr): Likewise for
2503 get_trace_state_variable_value_ptr.
2504 (get_set_tsv_func_addr): Likewise for
2505 set_trace_state_variable_value_ptr.
2506 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2508 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2510 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2512 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2514 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2516 (relocate_instruction): Remove own_buf.
2517 * server.c (own_buf): Make global.
2518 (handle_v_requests): Make global.
2519 * server.h (own_buf): New declaration.
2520 (handle_v_requests): New prototype.
2522 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2525 * linux-s390-low.c (add_insns): New function.
2526 (s390_emit_prologue): New function.
2527 (s390_emit_epilogue): New function.
2528 (s390_emit_add): New function.
2529 (s390_emit_sub): New function.
2530 (s390_emit_mul): New function.
2531 (s390_emit_lsh): New function.
2532 (s390_emit_rsh_signed): New function.
2533 (s390_emit_rsh_unsigned): New function.
2534 (s390_emit_ext): New function.
2535 (s390_emit_log_not): New function.
2536 (s390_emit_bit_and): New function.
2537 (s390_emit_bit_or): New function.
2538 (s390_emit_bit_xor): New function.
2539 (s390_emit_bit_not): New function.
2540 (s390_emit_equal): New function.
2541 (s390_emit_less_signed): New function.
2542 (s390_emit_less_unsigned): New function.
2543 (s390_emit_ref): New function.
2544 (s390_emit_if_goto): New function.
2545 (s390_emit_goto): New function.
2546 (s390_write_goto_address): New function.
2547 (s390_emit_litpool): New function.
2548 (s390_emit_const): New function.
2549 (s390_emit_call): New function.
2550 (s390_emit_reg): New function.
2551 (s390_emit_pop): New function.
2552 (s390_emit_stack_flush): New function.
2553 (s390_emit_zero_ext): New function.
2554 (s390_emit_swap): New function.
2555 (s390_emit_stack_adjust): New function.
2556 (s390_emit_set_r2): New function.
2557 (s390_emit_int_call_1): New function.
2558 (s390_emit_void_call_2): New function.
2559 (s390_emit_eq_goto): New function.
2560 (s390_emit_ne_goto): New function.
2561 (s390_emit_lt_goto): New function.
2562 (s390_emit_le_goto): New function.
2563 (s390_emit_gt_goto): New function.
2564 (s390_emit_ge_goto): New function.
2565 (s390x_emit_prologue): New function.
2566 (s390x_emit_epilogue): New function.
2567 (s390x_emit_add): New function.
2568 (s390x_emit_sub): New function.
2569 (s390x_emit_mul): New function.
2570 (s390x_emit_lsh): New function.
2571 (s390x_emit_rsh_signed): New function.
2572 (s390x_emit_rsh_unsigned): New function.
2573 (s390x_emit_ext): New function.
2574 (s390x_emit_log_not): New function.
2575 (s390x_emit_bit_and): New function.
2576 (s390x_emit_bit_or): New function.
2577 (s390x_emit_bit_xor): New function.
2578 (s390x_emit_bit_not): New function.
2579 (s390x_emit_equal): New function.
2580 (s390x_emit_less_signed): New function.
2581 (s390x_emit_less_unsigned): New function.
2582 (s390x_emit_ref): New function.
2583 (s390x_emit_if_goto): New function.
2584 (s390x_emit_const): New function.
2585 (s390x_emit_call): New function.
2586 (s390x_emit_reg): New function.
2587 (s390x_emit_pop): New function.
2588 (s390x_emit_stack_flush): New function.
2589 (s390x_emit_zero_ext): New function.
2590 (s390x_emit_swap): New function.
2591 (s390x_emit_stack_adjust): New function.
2592 (s390x_emit_int_call_1): New function.
2593 (s390x_emit_void_call_2): New function.
2594 (s390x_emit_eq_goto): New function.
2595 (s390x_emit_ne_goto): New function.
2596 (s390x_emit_lt_goto): New function.
2597 (s390x_emit_le_goto): New function.
2598 (s390x_emit_gt_goto): New function.
2599 (s390x_emit_ge_goto): New function.
2600 (s390_emit_ops): New function.
2601 (struct linux_target_ops): Fill in emit_ops hook.
2603 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2606 * Makefile.in: Add s390 IPA files.
2607 * configure.srv: Build IPA for s390.
2608 * linux-s390-ipa.c: New file.
2609 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2610 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2611 (tdesc_s390_linux32): Likewise.
2612 (init_registers_s390_linux32v1): Likewise.
2613 (tdesc_s390_linux32v1): Likewise.
2614 (init_registers_s390_linux32v2): Likewise.
2615 (tdesc_s390_linux32v2): Likewise.
2616 (init_registers_s390_linux64): Likewise.
2617 (tdesc_s390_linux64): Likewise.
2618 (init_registers_s390_linux64v1): Likewise.
2619 (tdesc_s390_linux64v1): Likewise.
2620 (init_registers_s390_linux64v2): Likewise.
2621 (tdesc_s390_linux64v2): Likewise.
2622 (init_registers_s390_te_linux64): Likewise.
2623 (tdesc_s390_te_linux64): Likewise.
2624 (init_registers_s390_vx_linux64): Likewise.
2625 (tdesc_s390_vx_linux64): Likewise.
2626 (init_registers_s390_tevx_linux64): Likewise.
2627 (tdesc_s390_tevx_linux64): Likewise.
2628 (init_registers_s390x_linux64): Likewise.
2629 (tdesc_s390x_linux64): Likewise.
2630 (init_registers_s390x_linux64v1): Likewise.
2631 (tdesc_s390x_linux64v1): Likewise.
2632 (init_registers_s390x_linux64v2): Likewise.
2633 (tdesc_s390x_linux64v2): Likewise.
2634 (init_registers_s390x_te_linux64): Likewise.
2635 (tdesc_s390x_te_linux64): Likewise.
2636 (init_registers_s390x_vx_linux64): Likewise.
2637 (tdesc_s390x_vx_linux64): Likewise.
2638 (init_registers_s390x_tevx_linux64): Likewise.
2639 (tdesc_s390x_tevx_linux64): Likewise.
2640 (have_hwcap_s390_vx): New static variable.
2641 (s390_arch_setup): Fill have_hwcap_s390_vx.
2642 (s390_get_thread_area): New function.
2643 (s390_ft_entry_gpr_esa): New const.
2644 (s390_ft_entry_gpr_zarch): New const.
2645 (s390_ft_entry_misc): New const.
2646 (s390_ft_entry_fr): New const.
2647 (s390_ft_entry_vr): New const.
2648 (s390_ft_main_31): New const.
2649 (s390_ft_main_64): New const.
2650 (s390_ft_exit_fr): New const.
2651 (s390_ft_exit_vr): New const.
2652 (s390_ft_exit_misc): New const.
2653 (s390_ft_exit_gpr_esa): New const.
2654 (s390_ft_exit_gpr_zarch): New const.
2655 (append_insns): New function.
2656 (s390_relocate_instruction): New function.
2657 (s390_install_fast_tracepoint_jump_pad): New function.
2658 (s390_get_min_fast_tracepoint_insn_len): New function.
2659 (s390_get_ipa_tdesc_idx): New function.
2660 (struct linux_target_ops): Wire in the above functions.
2661 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2662 * linux-s390-tdesc.h: New file.
2664 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2666 * linux-s390-low.c (s390_supports_tracepoints): New function.
2667 (struct linux_target_ops): Fill supports_tracepoints hook.
2669 2016-03-18 Yao Qi <yao.qi@linaro.org>
2671 * linux-low.c (lwp_signal_can_be_delivered): New function.
2672 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2674 2016-03-18 Yao Qi <yao.qi@linaro.org>
2676 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2677 0 if signal is enqueued. Remove 'signal' from one debugging
2678 message. Move one debugging message to some lines below.
2679 Remove code setting 'signal' to 0.
2681 2016-03-18 Yao Qi <yao.qi@linaro.org>
2683 * linux-low.c (linux_low_filter_event): Remove redundant
2684 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2686 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2688 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2689 (struct linux_target_ops): Wire in the above.
2691 2016-03-03 Yao Qi <yao.qi@linaro.org>
2693 * linux-low.c: Update comments to start_step_over.
2695 2016-03-03 Yao Qi <yao.qi@linaro.org>
2698 * linux-low.c (handle_extended_wait): Set child suspended
2699 if event_lwp->bp_reinsert isn't zero.
2701 2016-03-02 Yao Qi <yao.qi@linaro.org>
2703 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2704 enqueue_pending_signal.
2706 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2708 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2711 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2713 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2714 (s390_regmap_3264) [!__s390x__]: New global.
2715 (s390_collect_ptrace_register): Skip map entries containing -1.
2716 (s390_supply_ptrace_register): Ditto.
2717 (s390_fill_gprs_high): New function.
2718 (s390_store_gprs_high): New function.
2719 (s390_regsets): Add NT_S390_HIGH_GPRS.
2720 (s390_get_hwcap): Enable on 31-bit.
2721 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2722 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2723 Detect NT_S390_HIGH_GPRS.
2724 (s390_usrregs_info_3264): Enable on 31-bit.
2725 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2726 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2728 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2731 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2732 * configure.srv: Ditto.
2733 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2734 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2735 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2736 (init_registers_amd64_linux): Remove prototype.
2737 (tdesc_amd64_linux): Remove declaration.
2738 (get_ipa_tdesc): New function.
2739 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2740 initialize remaining tdescs.
2741 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2742 (init_registers_i386_linux): Remove prototype.
2743 (tdesc_i386_linux): Remove declaration.
2744 (get_ipa_tdesc): New function.
2745 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2746 initialize remaining tdescs.
2747 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2748 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2749 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2750 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2751 (x86_get_ipa_tdesc_idx): New function.
2752 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2753 * linux-x86-tdesc.h: New file.
2754 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2755 (target_get_ipa_tdesc_idx): New macro.
2756 * tracepoint.c (ipa_tdesc_idx): New macro.
2757 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2758 (symbol_list): Add ipa_tdesc_idx.
2759 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2760 (ipa_tdesc): Remove.
2761 (ipa_tdesc_idx): New variable.
2762 (get_context_regcache): Use get_ipa_tdesc.
2763 (gdb_collect): Ditto.
2765 * tracepoint.h (get_ipa_tdesc): New prototype.
2766 (ipa_tdesc): Remove.
2768 2016-02-24 Pedro Alves <palves@redhat.com>
2770 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2771 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2772 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2773 Factor out common code between the USE_SIGTRAP_SIGINFO and
2774 !USE_SIGTRAP_SIGINFO blocks.
2775 (linux_low_filter_event): Call save_stop_reason instead of
2776 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2778 (linux_wait_1): Update comments.
2780 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2782 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2783 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2784 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2785 ppc_insert_point, ppc_remove_point.
2787 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2789 * linux-s390-low.c (s390_supports_z_point_type): New function.
2790 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2792 2016-02-16 Yao Qi <yao.qi@linaro.org>
2794 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2795 PC. Get pc from regcache_read_pc.
2797 2016-02-12 Yao Qi <yao.qi@linaro.org>
2799 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2800 or linux_get_pc_32bit.
2801 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2803 2016-02-12 Yao Qi <yao.qi@linaro.org>
2805 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2806 arm_linux_get_next_pcs_fixup.
2808 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2810 * tracepoint.c (x_tracepoint_action_download): Change
2811 write_inferior_data_ptr to write_inferior_data_pointer.
2812 (cmd_qtstart): Likewise.
2813 (write_inferior_data_ptr): Remove.
2814 (download_agent_expr): Change write_inferior_data_ptr to
2815 write_inferior_data_pointer.
2816 (download_tracepoint_1): Likewise.
2817 (download_tracepoint): Likewise.
2818 (download_trace_state_variables): Likewise.
2820 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2821 Marcin Kościelnicki <koriakin@0x04.net>
2823 * tracepoint.c (struct tracepoint_action_ops): Remove.
2824 (struct tracepoint_action): Remove ops.
2825 (m_tracepoint_action_download, r_tracepoint_action_download)
2826 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2827 size and offset accordingly.
2828 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2829 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2830 (tracepoint_action_send, tracepoint_action_download): New functions.
2831 Helpers for trace action handlers.
2832 (add_tracepoint_action): Remove setup actions ops.
2833 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2835 2016-02-10 Yao Qi <yao.qi@linaro.org>
2837 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2839 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2841 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2843 * configure: Regenerate.
2845 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2847 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2848 void * to gdb_byte *.
2849 * linux-low.c (siginfo_fixup): Likewise.
2850 (linux_xfer_siginfo): Likewise.
2851 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2853 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2855 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2857 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2859 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2861 * linux-x86-low.c [__x86_64__]: Include
2862 "nat/amd64-linux-siginfo.h".
2863 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2864 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2865 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2866 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2867 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2868 (cpt_si_fd, si_timerid, si_overrun): Move from
2869 nat/amd64-linux-siginfo.c.
2870 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2872 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2874 * server.c (skip_to_semicolon): Remove.
2875 (process_point_options): Use strchrnul instead of
2878 2016-01-26 Yao Qi <yao.qi@linaro.org>
2880 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2881 * linux-low.c (install_software_single_step_breakpoints): Don't
2882 call regcache_read_pc.
2883 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2886 2016-01-26 Yao Qi <yao.qi@linaro.org>
2888 * linux-low.c (install_software_single_step_breakpoints): Call
2889 regcache_read_pc instead of get_pc.
2891 2016-01-26 Yao Qi <yao.qi@linaro.org>
2893 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2894 (unblock_async_io): Rename to ...
2895 (block_unblock_async_io): ... it. New function.
2896 (enable_async_io): Don't install SIGIO handler. Unblock it
2898 (disable_async_io): Don't ignore SIGIO. Block it instead.
2899 (initialize_async_io): Install SIGIO handler. Don't call
2902 2016-01-26 Yao Qi <yao.qi@linaro.org>
2904 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2905 first character is '\003', call *the_target->request_interrupt.
2907 2016-01-25 Yao Qi <yao.qi@linaro.org>
2909 * remote-utils.c (new_thread_notify): Remove.
2910 (dead_thread_notify): Likewise.
2911 * remote-utils.h (new_thread_notify): Remove declaration.
2912 (dead_thread_notify): Likewise.
2914 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2916 * gdb.trace/pending.exp: Fix expected message on continue.
2918 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2920 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2921 it works properly on big-endian machines where sizeof (CORE_ADDR)
2924 2016-01-21 Pedro Alves <palves@redhat.com>
2926 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2927 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2928 * configure: Regenerate.
2930 2016-01-21 Yao Qi <yao.qi@linaro.org>
2932 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2933 is_thumb and set it according to CPSR saved on the stack.
2934 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2935 arm_sigreturn_next_pc.
2937 2016-01-18 Yao Qi <yao.qi@linaro.org>
2939 * linux-low.c (linux_set_pc_64bit): New function.
2940 (linux_get_pc_64bit): New function.
2941 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2943 * linux-sparc-low.c (debug_threads): Remove declaration.
2944 (sparc_get_pc): Remove.
2945 (the_low_target): Use linux_get_pc_64bit instead of
2947 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2948 (the_low_target): Use linux_get_pc_64bit and
2951 2016-01-18 Yao Qi <yao.qi@linaro.org>
2953 * linux-arm-low.c (debug_threads): Remove declaration.
2954 (arm_get_pc, arm_set_pc): Remove.
2955 (the_low_target): Use linux_get_pc_32bit and
2957 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2958 (the_low_target): Use linux_get_pc_32bit and
2960 * linux-cris-low.c (debug_threads): Remove declaration.
2961 (cris_get_pc, cris_set_pc,): Remove.
2962 (the_low_target): Use linux_get_pc_32bit and
2964 * linux-crisv32-low.c (debug_threads): Remove declaration.
2965 (cris_get_pc, cris_set_pc): Remove.
2966 (the_low_target): Use linux_get_pc_32bit and
2968 * linux-low.c: Include inttypes.h.
2969 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2970 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2971 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2972 (the_low_target): Use linux_get_pc_32bit and
2974 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2975 (the_low_target): Use linux_get_pc_32bit and
2977 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2978 (the_low_target): Use linux_get_pc_32bit and
2980 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2981 (the_low_target): Use linux_get_pc_32bit and
2983 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2984 (the_low_target): Use linux_get_pc_32bit and
2987 2016-01-18 Gary Benson <gbenson@redhat.com>
2989 * configure.ac (AC_FUNC_FORK): New check.
2990 * config.in: Regenerate.
2991 * configure: Likewise.
2993 2016-01-14 Yao Qi <yao.qi@linaro.org>
2995 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2996 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2997 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2998 arm_get_next_pcs_ctor.
3000 2016-01-12 Josh Stone <jistone@redhat.com>
3001 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3003 * inferiors.h: Include "gdb_vecs.h".
3004 (struct process_info): Add syscalls_to_catch.
3005 * inferiors.c (remove_process): Free syscalls_to_catch.
3006 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3007 syscall_return stops.
3008 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3009 * server.c (handle_general_set): Handle QCatchSyscalls.
3010 (handle_query): Report support for QCatchSyscalls.
3011 * target.h (struct target_ops): Add supports_catch_syscall.
3012 (target_supports_catch_syscall): New macro.
3013 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3014 (struct lwp_info): Add syscall_state.
3015 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3016 Maintain syscall_state and syscalls_to_catch across exec.
3017 (get_syscall_trapinfo): New function, proxy to the_low_target.
3018 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3019 (linux_low_filter_event): Toggle syscall_state entry/return for
3020 syscall traps, and set it ignored for all others.
3021 (gdb_catching_syscalls_p): New function.
3022 (gdb_catch_this_syscall_p): New function.
3023 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3024 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3025 (linux_supports_catch_syscall): New function.
3026 (linux_target_ops): Install it.
3027 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3028 (the_low_target): Install it.
3030 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3032 * acinclude.m4: Include new ../warning.m4 file.
3033 * configure: Regenerated.
3034 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3036 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3038 * ax.c (is_goto_target): Mark static.
3039 * linux-low.c (register_addr): Likewise.
3040 (linux_fetch_registers, linux_store_registers): Likewise.
3041 * mem-break.c (any_persistent_commands): Fix old prototype.
3042 (add_commands_to_breakpoint): Mark static.
3043 * regcache.c (find_register_by_name): Delete unused func.
3044 * remote-utils.c (hex_or_minus_one): Mark static.
3045 * server.c (monitor_show_help): Mark static.
3046 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3047 handle_v_requests): Likewise.
3049 2016-01-12 Pedro Alves <palves@redhat.com>
3051 Remove use of the registered trademark symbol throughout.
3053 2016-01-08 Yao Qi <yao.qi@linaro.org>
3055 * remote-utils.c (getpkt): If c is '\003', call target hook
3058 2016-01-06 Yao Qi <yao.qi@linaro.org>
3060 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3061 linux-aarch32-low.c.
3062 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3063 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3064 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3065 (thumb2_breakpoint): Declare.
3066 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3067 linux-aarch32-low.h.
3068 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3069 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3070 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3072 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3074 * gdbreplay.c (gdbreplay_version): Change copyright year in
3076 * server.c (gdbserver_version): Likewise.
3078 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3080 * server.c (crc32_table): Delete.
3081 (crc32): Use libiberty's xcrc32 function.
3083 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3085 * lynx-low.c (lynx_delete_thread_callback): New function.
3086 (lynx_mourn): Properly delete our process and all of its
3087 threads. Remove call to clear_inferiors.
3089 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3091 * target.c (thread_search_callback): Add check that
3092 the thread_stopped target callback is not NULL before
3095 2015-12-21 Yao Qi <yao.qi@linaro.org>
3097 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3100 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3102 * server.c (handle_query): Call target_supports_software_single_step.
3104 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3106 * linux-low.c (single_step): New function.
3107 (linux_resume_one_lwp_throw): Call single_step.
3108 (start_step_over): Likewise.
3110 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3112 * Makefile.in (SFILES): Append arch/arm-linux.c,
3113 arch/arm-get-next-pcs.c.
3114 (arm-linux.o): New rule.
3115 (arm-get-next-pcs.o): New rule.
3116 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3118 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3119 to linux-aarch32-low.c.
3120 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3121 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3122 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3123 (thumb2_breakpoint_len): Likewise.
3124 (arm_is_thumb_mode): Make non-static.
3125 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3126 from linux-aarch32-low.c.
3127 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3128 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3129 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3130 (thumb2_breakpoint_len): Likewise.
3131 (arm_is_thumb_mode): New declaration.
3132 * linux-arm-low.c: Include arch/arm-linux.h
3133 aarch/arm-get-next-pcs.h, sys/syscall.h.
3134 (get_next_pcs_ops): New struct.
3135 (get_next_pcs_addr_bits_remove): New function.
3136 (get_next_pcs_is_thumb): New function.
3137 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3138 (arm_sigreturn_next_pc): Likewise.
3139 (get_next_pcs_syscall_next_pc): Likewise.
3140 (arm_gdbserver_get_next_pcs): Likewise.
3141 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3143 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3144 * server.h: Include gdb_vecs.h.
3146 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3148 * Makefile.in (SFILES): Append common/common-regcache.c.
3149 (OBS): Append common-regcache.o.
3150 (common-regcache.o): New rule.
3151 * regcache.c (init_register_cache): Initialize cache to
3153 (regcache_raw_read_unsigned): New function.
3154 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3155 register_status enum.
3157 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3159 * linux-aarch64-low.c (the_low_targets): Rename
3160 breakpoint_reinsert_addr to get_next_pcs.
3161 * linux-arm-low.c (the_low_targets): Likewise.
3162 * linux-bfin-low.c (the_low_targets): Likewise.
3163 * linux-cris-low.c (the_low_targets): Likewise.
3164 * linux-crisv32-low.c (the_low_targets): Likewise.
3165 * linux-low.c (can_software_single_step): Likewise.
3166 (install_software_single_step_breakpoints): New function.
3167 (start_step_over): Use install_software_single_step_breakpoints.
3168 * linux-low.h: New CORE_ADDR vector.
3169 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3171 * linux-mips-low.c (the_low_targets): Likewise.
3172 * linux-nios2-low.c (the_low_targets): Likewise.
3173 * linux-sparc-low.c (the_low_targets): Likewise.
3175 2015-12-17 Pedro Alves <palves@redhat.com>
3177 * linux-low.c (linux_kill_one_lwp): Remove references to
3179 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3181 (linux_init_signals): Delete.
3182 (initialize_low): Adjust.
3183 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3185 2015-12-16 Pedro Alves <palves@redhat.com>
3187 * configure.ac (compiler warning flags): When testing a
3188 -Wno-foo option, check whether -Wfoo works instead.
3189 * configure: Regenerate.
3191 2015-12-11 Don Breazeal <donb@codesourcery.com>
3193 * server.c (process_serial_event): Don't exit from gdbserver
3194 in remote mode if there are still active inferiors.
3196 2015-12-11 Yao Qi <yao.qi@linaro.org>
3198 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3199 arm_breakpoint_at if the process is 32-bit.
3201 2015-12-11 Yao Qi <yao.qi@linaro.org>
3203 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3206 2015-12-07 Yao Qi <yao.qi@linaro.org>
3208 * configure.srv: Append arm.o to srv_tgtobj for
3209 aarch64*-*-linux* target.
3210 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3211 from linux-arm-low.c.
3212 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3213 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3214 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3215 (thumb2_breakpoint_len): Likewise.
3216 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3217 (arm_breakpoint_kinds): Likewise.
3218 (arm_breakpoint_kind_from_pc): Likewise.
3219 (arm_sw_breakpoint_from_kind): Likewise.
3220 (arm_breakpoint_kind_from_current_state): Likewise.
3221 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3222 (arm_sw_breakpoint_from_kind): Declare.
3223 (arm_breakpoint_kind_from_current_state): Declare.
3224 (arm_breakpoint_at): Declare.
3225 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3226 arm_sw_breakpoint_from_kind if process is 32-bit.
3227 (aarch64_breakpoint_kind_from_pc): New function.
3228 (aarch64_breakpoint_kind_from_current_state): New function.
3229 (the_low_target): Initialize fields breakpoint_kind_from_pc
3230 and breakpoint_kind_from_current_state.
3231 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3232 linux-aarch32-low.c.
3233 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3234 (arm_breakpoint, arm_breakpoint_len): Likewise.
3235 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3236 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3237 (arm_is_thumb_mode): Likewise.
3238 (arm_breakpoint_at): Likewise.
3239 (arm_breakpoint_kind_from_pc): Likewise.
3240 (arm_sw_breakpoint_from_kind): Likewise.
3241 (arm_breakpoint_kind_from_current_state): Likewise.
3244 2015-08-04 Yao Qi <yao.qi@linaro.org>
3246 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3247 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3248 * server.c (extended_protocol): Remove "static".
3249 * server.h (extended_protocol): Declare it.
3251 2015-12-04 Josh Stone <jistone@redhat.com>
3253 * target.h (struct target_ops) <arch_setup>: Rename to ...
3254 (struct target_ops) <post_create_inferior>: ... this.
3255 (target_arch_setup): Rename to ...
3256 (target_post_create_inferior): ... this, calling post_create_inferior.
3257 * server.c (start_inferior): Update target_arch_setup calls to
3258 target_post_create_inferior.
3259 * linux-low.c (linux_low_ptrace_options): Forward declare.
3260 (linux_arch_setup): Update its comment for general use.
3261 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3262 (struct linux_target_ops): Use linux_post_create_inferior.
3263 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3264 to post_create_inferior.
3265 * nto-low.c (struct nto_target_ops): Likewise.
3266 * spu-low.c (struct spu_target_ops): Likewise.
3267 * win32-low.c (struct win32_target_ops): Likewise.
3269 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3271 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3273 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3275 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3276 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3277 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3278 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3279 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3280 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3281 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3282 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3283 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3284 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3285 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3286 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3288 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3290 * linux-low.c (linux_look_up_symbols): Don't call
3291 linux_supports_traceclone.
3292 * linux-low.h (thread_db_init): Remove use_events argument.
3293 * thread-db.c (thread_db_use_event): Remove global variable.
3294 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3295 (struct thread_db) <td_create_bp>: Remove field.
3296 (thread_db_create_event): Remove function.
3297 (thread_db_enable_reporting): Likewise.
3298 (find_one_thread): Don't check for thread_db_use_events.
3299 (attach_thread): Likewise.
3300 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3301 (try_thread_db_load_1): Don't check for thread_db_use_events.
3302 (thread_db_init): Remove use_events argument and thread events
3304 (remove_thread_event_breakpoints): Remove function.
3305 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3307 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3309 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3311 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3312 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3313 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3314 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3315 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3317 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3319 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3320 * linux-low.c (can_hardware_single_step): Use
3321 supports_hardware_single_step.
3322 (can_software_single_step): New function.
3323 (start_step_over): Call can_software_single_step.
3324 (linux_supports_hardware_single_step): New function.
3325 (struct target_ops) <supports_software_single_step>: Initialize.
3326 * linux-low.h (struct linux_target_ops)
3327 <supports_hardware_single_step>: Initialize.
3328 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3329 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3330 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3331 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3332 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3333 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3334 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3335 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3336 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3337 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3339 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3340 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3342 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3343 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3344 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3346 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3347 * target.h (struct target_ops): <supports_software_single_step>:
3349 (target_supports_software_single_step): New macro.
3351 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3353 * linux-low.c (linux_wait_1): Fix pc advance condition.
3354 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3355 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3357 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3359 * linux-arm-low.c (arm_is_thumb_mode): New function.
3360 (arm_breakpoint_at): Use arm_is_thumb_mode.
3361 (arm_breakpoint_kind_from_current_state): New function.
3362 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3364 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3365 (linux_breakpoint_kind_from_current_state): New function.
3366 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3367 * linux-low.h (struct linux_target_ops)
3368 <breakpoint_kind_from_current_state>: New field.
3369 * target.h (struct target_ops): Likewise.
3370 (target_breakpoint_kind_from_current_state): New macro.
3372 2015-11-30 Pedro Alves <palves@redhat.com>
3374 * linux-low.c (linux_resume): Wake up the event loop before
3377 2015-11-30 Pedro Alves <palves@redhat.com>
3379 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3381 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3383 * target.c (struct thread_search): New structure.
3384 (thread_search_callback): New function.
3385 (prev_general_thread): New global.
3386 (prepare_to_access_memory, done_accessing_memory): New functions.
3387 * target.h (prepare_to_access_memory, done_accessing_memory):
3388 Replace macros with function declarations.
3390 2015-11-30 Pedro Alves <palves@redhat.com>
3393 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3394 report TARGET_WAITKIND_NO_RESUMED.
3395 * remote-utils.c (prepare_resume_reply): Handle
3396 TARGET_WAITKIND_NO_RESUMED.
3397 * server.c (report_no_resumed): New global.
3398 (handle_query) <qSupported>: Handle "no-resumed+". Report
3399 "no-resumed+" support.
3400 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3401 return error if the client doesn't support no-resumed events.
3402 (push_stop_notification): New function.
3403 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3404 events if the client supports them.
3406 2015-11-30 Pedro Alves <palves@redhat.com>
3408 * linux-low.c (thread_still_has_status_pending_p): Don't check
3410 (lwp_resumed): New function.
3411 (status_pending_p_callback): Return early if the LWP is not
3412 supposed to be resumed.
3414 2015-11-30 Pedro Alves <palves@redhat.com>
3416 * linux-low.c (handle_extended_wait): Assert that the LWP's
3417 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3418 thread create events, leave the new child's status pending.
3419 (linux_low_filter_event): If GDB wants to hear about thread exit
3420 events, leave the LWP marked dead and don't delete it.
3421 (linux_wait_for_event_filtered): Don't check for thread exit.
3422 (filter_exit_event): New function.
3423 (linux_wait_1): Use it, when returning an exit event.
3424 (linux_resume_one_lwp_throw): Assert that the LWP's
3425 waitstatus is TARGET_WAITKIND_IGNORE.
3426 * remote-utils.c (prepare_resume_reply): Handle
3427 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3428 * server.c (report_thread_events): New global.
3429 (handle_general_set): Handle QThreadEvents.
3430 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3431 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3432 TARGET_WAITKIND_THREAD_EXITED.
3433 * server.h (report_thread_events): Declare.
3435 2015-11-30 Pedro Alves <palves@redhat.com>
3437 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3438 the thread's last_resume_kind was resume_stop.
3440 2015-11-30 Pedro Alves <palves@redhat.com>
3442 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3445 2015-11-30 Pedro Alves <palves@redhat.com>
3447 * server.c (handle_v_requests): Handle vCtrlC.
3449 2015-11-30 Pedro Alves <palves@redhat.com>
3451 * gdbthread.h (find_any_thread_of_pid): Declare.
3452 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3454 * server.c (handle_query): If current_thread is NULL, look for
3455 another thread of the selected process.
3457 2015-11-26 Daniel Colascione <dancol@dancol.org>
3458 Simon Marchi <simon.marchi@ericsson.com>
3460 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3461 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3463 * target.h (struct target_ops) <thread_name>: New field.
3464 (target_thread_name): New macro.
3466 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3468 * regcache.h (regcache_invalidate_pid): Add declaration.
3469 * regcache.c (regcache_invalidate_pid): New function, extracted
3470 from regcache_invalidate.
3471 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3472 Add trivial documentation comment.
3473 * lynx-low.c: Use regcache_invalidate_pid instead of
3474 regcache_invalidate.
3476 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3478 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3479 and Elf64_auxv_t if the target is Android.
3481 2015-11-22 Doug Evans <xdje42@gmail.com>
3483 * target.h: #include <sys/types.h>.
3485 2015-11-19 Pedro Alves <palves@redhat.com>
3487 * linux-low.c (linux_process_qsupported): Change prototype.
3489 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3491 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3492 and adjust to loop over all features.
3493 * server.c (handle_query) <qSupported>: Adjust to call
3494 target_process_qsupported once, passing it a vector of unprocessed
3496 * target.h (struct target_ops) <process_qsupported>: Change
3498 (target_process_qsupported): Adjust.
3500 2015-11-19 Pedro Alves <palves@redhat.com>
3502 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3504 * configure: Regenerate.
3506 2015-11-19 Pedro Alves <palves@redhat.com>
3508 * configure: Regenerate.
3510 2015-11-19 Yao Qi <yao.qi@linaro.org>
3512 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3515 2015-11-19 Yao Qi <yao.qi@linaro.org>
3517 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3518 (struct aarch64_operand): Move enum out.
3520 2015-11-19 Yao Qi <yao.qi@linaro.org>
3522 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3523 struct user_fpsimd_state *.
3524 (aarch64_store_fpregset): Likewise.
3526 2015-11-19 Yao Qi <yao.qi@linaro.org>
3528 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3529 struct user_pt_regs *.
3530 (aarch64_store_gregset): Likewise.
3532 2015-11-18 Pedro Alves <palves@redhat.com>
3534 * Makefile.in (all_object_files): Add $IPA_OBJS.
3536 2015-11-17 Pedro Alves <palves@redhat.com>
3538 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3539 GDB_SIGNAL_0 and gdb_signal_to_string.
3541 2015-11-17 Pedro Alves <palves@redhat.com>
3543 * win32-low.c (handle_output_debug_string): Remove parameter.
3544 (win32_kill): Remove our_status local and adjust call to
3545 handle_output_debug_string.
3546 (get_child_debug_event): Adjust call to
3547 handle_output_debug_string.
3549 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3551 * linux-mips-low.c (mips_fill_gregset): Add cast.
3552 (mips_store_gregset): Likewise.
3553 (mips_fill_fpregset): Likewise.
3554 (mips_store_fpregset): Likewise.
3556 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3558 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3561 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3563 * linux-mips-low.c (mips_linux_new_thread): Change type of
3564 watch_type to enum target_hw_bp_type.
3566 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3568 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3569 Change return type to arm_hwbp_type.
3571 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3573 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3574 (arm_store_gregset): Likewise.
3575 * linux-arm-low.c (arm_get_hwcap): Likewise.
3576 (arm_read_description): Likewise.
3578 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3580 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3582 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3584 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3585 (ppc_fill_vsxregset): Likewise.
3586 (ppc_store_vsxregset): Likewise.
3587 (ppc_fill_vrregset): Likewise.
3588 (ppc_store_vrregset): Likewise.
3589 (ppc_fill_evrregset): Likewise.
3590 (ppc_store_evrregset): Likewise.
3592 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3594 * linux-ppc-low.c (ppc_usrregs_info): Remove
3595 forward-declaration.
3596 (ppc_arch_setup): Move lower in file.
3598 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3600 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3601 (ps_pdwrite): Likewise.
3603 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3605 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3606 to after assert checks.
3608 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3610 * proc-service.c (ps_pdread): Add/adjust casts.
3611 (ps_pdwrite): Add/adjust casts.
3613 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3615 * server.c (handle_search_memory_1): Cast return value of
3618 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3620 * server.c (write_qxfer_response): Change type of data to
3623 2015-10-29 Pedro Alves <palves@redhat.com>
3625 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3627 2015-10-29 Pedro Alves <palves@redhat.com>
3629 * tracepoint.c (clear_installed_tracepoints): Add casts.
3631 2015-10-29 Pedro Alves <palves@redhat.com>
3633 * server.c (handle_v_cont, process_serial_event): Add enum
3634 gdb_signal casts to signal parsing code.
3636 2015-10-29 Pedro Alves <palves@redhat.com>
3638 * linux-low.h (NULL_REGSET): Define.
3639 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3640 * linux-arm-low.c (arm_regsets): Likewise.
3641 * linux-crisv32-low.c (cris_regsets): Likewise.
3642 * linux-m68k-low.c (m68k_regsets): Likewise.
3643 * linux-mips-low.c (mips_regsets): Likewise.
3644 * linux-nios2-low.c (nios2_regsets): Likewise.
3645 * linux-ppc-low.c (ppc_regsets): Likewise.
3646 * linux-s390-low.c (s390_regsets): Likewise.
3647 * linux-sh-low.c (sh_regsets): Likewise.
3648 * linux-sparc-low.c (sparc_regsets): Likewise.
3649 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3650 * linux-tile-low.c (tile_regsets): Likewise.
3651 * linux-x86-low.c (x86_regsets): Likewise.
3652 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3654 2015-10-29 Pedro Alves <palves@redhat.com>
3656 * linux-low.h (NULL_REGSET): Define.
3657 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3658 * linux-arm-low.c (arm_regsets): Likewise.
3659 * linux-crisv32-low.c (cris_regsets): Likewise.
3660 * linux-m68k-low.c (m68k_regsets): Likewise.
3661 * linux-mips-low.c (mips_regsets): Likewise.
3662 * linux-nios2-low.c (nios2_regsets): Likewise.
3663 * linux-ppc-low.c (ppc_regsets): Likewise.
3664 * linux-s390-low.c (s390_regsets): Likewise.
3665 * linux-sh-low.c (sh_regsets): Likewise.
3666 * linux-sparc-low.c (sparc_regsets): Likewise.
3667 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3668 * linux-tile-low.c (tile_regsets): Likewise.
3669 * linux-x86-low.c (x86_regsets): Likewise.
3670 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3672 2015-10-26 Doug Evans <dje@google.com>
3674 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3676 2015-10-26 Doug Evans <dje@google.com>
3678 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3680 2015-10-26 Doug Evans <dje@google.com>
3682 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3684 (attach_thread, find_new_threads_callback): Ditto.
3686 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3688 * mem-break.h (set_breakpoint_data): Remove.
3690 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3692 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3693 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3694 (initialize_low): Remove set_breakpoint_data call.
3695 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3696 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3697 (initialize_low): Remove set_breakpoint_data call.
3698 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3699 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3700 (initialize_low): Remove set_breakpoint_data call.
3702 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3704 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3705 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3706 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3707 * target.h (target_breakpoint_kind_from_pc): New macro.
3709 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3711 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3712 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3713 the default breakpoint kind.
3715 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3717 * linux-arm-low.c (arm_supports_z_point_type): Add software
3720 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3722 * linux-arm-low.c: Refactor breakpoint definitions.
3723 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3724 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3726 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3728 * Makefile.in: Add arm.c/o.
3729 * configure.srv: Likewise.
3730 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3731 (arm_breakpoint_kind_from_pc): New function.
3732 (arm_sw_breakpoint_from_kind): Return proper kind.
3733 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3735 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3737 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3739 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3740 (struct raw_breakpoint) <size>: Remove.
3741 (struct raw_breakpoint) <kind>: Add.
3742 (bp_size): New function.
3743 (bp_opcode): Likewise.
3744 (find_raw_breakpoint_at): Adjust for kind.
3745 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3746 (remove_memory_breakpoint): Adjust for kind call bp_size.
3747 (set_raw_breakpoint_at): Adjust for kind.
3748 (set_breakpoint): Likewise.
3749 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3750 (delete_raw_breakpoint): Adjust for kind.
3751 (delete_breakpoint): Likewise.
3752 (find_gdb_breakpoint): Likewise.
3753 (set_gdb_breakpoint_1): Likewise.
3754 (set_gdb_breakpoint): Likewise.
3755 (delete_gdb_breakpoint_1): Likewise.
3756 (delete_gdb_breakpoint): Likewise.
3757 (uninsert_raw_breakpoint): Likewise.
3758 (reinsert_raw_breakpoint): Likewise.
3759 (set_breakpoint_data): Remove.
3760 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3761 (check_mem_read): Adjust for kind call bp_size.
3762 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3763 (clone_one_breakpoint): Adjust for kind.
3764 * mem-break.h (set_gdb_breakpoint): Likewise.
3765 (delete_gdb_breakpoint): Likewise.
3766 * server.c (process_serial_event): Likewise.
3768 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3770 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3771 (struct linux_target_ops) <breakpoint>: Remove.
3772 (struct linux_target_ops) <breakpoint_len>: Remove.
3773 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3774 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3775 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3776 (arm_sw_breakpoint_from_kind): New function.
3777 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3778 (struct linux_target_ops) <breakpoint>: Remove.
3779 (struct linux_target_ops) <breakpoint_len>: Remove.
3780 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3781 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3782 * linux-cris-low.c (cris_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-crisv32-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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3793 and sw_breakpoint_from_kind to increment the pc.
3794 (linux_breakpoint_kind_from_pc): New function.
3795 (linux_sw_breakpoint_from_kind): New function.
3796 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3797 (initialize_low): Call breakpoint_kind_from_pc and
3798 sw_breakpoint_from_kind to replace breakpoint_data/len.
3799 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3801 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3802 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3803 (struct linux_target_ops) <breakpoint>: Remove.
3804 (struct linux_target_ops) <breakpoint_len>: Remove.
3805 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3806 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3807 * linux-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3848 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3849 (struct linux_target_ops) <breakpoint>: Remove.
3850 (struct linux_target_ops) <breakpoint_len>: Remove.
3851 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3852 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3853 * linux-xtensa-low.c (xtensa_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.
3859 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3861 * linux-cris-low.c (cris_get_pc): Remove void arg.
3863 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3865 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3868 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3870 * inferiors.c (thread_pid_matches_callback): New function.
3871 (find_thread_process): New function.
3872 (remove_thread): Reset current_thread.
3873 (remove_process): Assert threads have been removed first.
3875 2015-10-15 Yao Qi <yao.qi@linaro.org>
3877 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3879 (aarch64_remove_point): Likewise.
3880 * regcache.c (regcache_register_size): New function.
3882 2015-10-12 Yao Qi <yao.qi@linaro.org>
3884 * linux-aarch64-low.c: Update all callers as emit_load_store
3885 is renamed to aarch64_emit_load_store.
3887 2015-10-12 Yao Qi <yao.qi@linaro.org>
3889 * linux-aarch64-low.c: Update all callers of function renaming
3890 from emit_insn to aarch64_emit_insn.
3892 2015-10-12 Yao Qi <yao.qi@linaro.org>
3894 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3895 arch/aarch64-insn.h.
3896 (struct aarch64_memory_operand): Likewise.
3898 (emit_insn): Move to arch/aarch64-insn.c.
3899 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3900 (emit_load_store): Move to arch/aarch64-insn.c.
3901 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3902 (can_encode_int32): Remove.
3904 2015-10-12 Yao Qi <yao.qi@linaro.org>
3906 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3907 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3908 (aarch64_relocate_instruction): Likewise.
3909 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3910 (struct aarch64_insn_visitor): Likewise.
3912 2015-10-12 Yao Qi <yao.qi@linaro.org>
3914 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3915 (struct aarch64_insn_visitor): New.
3916 (struct aarch64_insn_relocation_data): New.
3917 (aarch64_ftrace_insn_reloc_b): New function.
3918 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3919 (aarch64_ftrace_insn_reloc_cb): Likewise.
3920 (aarch64_ftrace_insn_reloc_tb): Likewise.
3921 (aarch64_ftrace_insn_reloc_adr): Likewise.
3922 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3923 (aarch64_ftrace_insn_reloc_others): Likewise.
3925 (aarch64_relocate_instruction): Use visitor.
3927 2015-10-12 Yao Qi <yao.qi@linaro.org>
3929 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3930 int. Add argument buf.
3931 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3932 aarch64_relocate_instruction.
3934 2015-10-12 Yao Qi <yao.qi@linaro.org>
3936 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3937 argument insn. Remove local variable insn. Don't call
3939 (aarch64_install_fast_tracepoint_jump_pad): Call
3942 2015-09-30 Yao Qi <yao.qi@linaro.org>
3944 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3945 (emit_load_store_pair): Likewise.
3947 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3949 * dll.c (match_dll): Add cast(s).
3950 (unloaded_dll): Likewise.
3951 * linux-low.c (second_thread_of_pid_p): Likewise.
3952 (delete_lwp_callback): Likewise.
3953 (count_events_callback): Likewise.
3954 (select_event_lwp_callback): Likewise.
3955 (linux_set_resume_request): Likewise.
3956 * server.c (accumulate_file_name_length): Likewise.
3957 (emit_dll_description): Likewise.
3958 (handle_qxfer_threads_worker): Likewise.
3959 (visit_actioned_threads): Likewise.
3960 * thread-db.c (any_thread_of): Likewise.
3961 * tracepoint.c (same_process_p): Likewise.
3962 (match_blocktype): Likewise.
3963 (build_traceframe_info_xml): Likewise.
3965 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3967 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3969 (gdb_unparse_agent_expr): Likewise.
3970 * hostio.c (require_data): Likewise.
3971 (handle_pread): Likewise.
3972 * linux-low.c (disable_regset): Likewise.
3973 (fetch_register): Likewise.
3974 (store_register): Likewise.
3975 (get_dynamic): Likewise.
3976 (linux_qxfer_libraries_svr4): Likewise.
3977 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3978 (set_fast_tracepoint_jump): Likewise.
3979 (uninsert_fast_tracepoint_jumps_at): Likewise.
3980 (reinsert_fast_tracepoint_jumps_at): Likewise.
3981 (validate_inserted_breakpoint): Likewise.
3982 (clone_agent_expr): Likewise.
3983 * regcache.c (init_register_cache): Likewise.
3984 * remote-utils.c (putpkt_binary_1): Likewise.
3985 (decode_M_packet): Likewise.
3986 (decode_X_packet): Likewise.
3987 (look_up_one_symbol): Likewise.
3988 (relocate_instruction): Likewise.
3989 (monitor_output): Likewise.
3990 * server.c (handle_search_memory): Likewise.
3991 (handle_qxfer_exec_file): Likewise.
3992 (handle_qxfer_libraries): Likewise.
3993 (handle_qxfer): Likewise.
3994 (handle_query): Likewise.
3995 (handle_v_cont): Likewise.
3996 (handle_v_run): Likewise.
3997 (captured_main): Likewise.
3998 * target.c (write_inferior_memory): Likewise.
3999 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4000 * tracepoint.c (init_trace_buffer): Likewise.
4001 (add_tracepoint_action): Likewise.
4002 (add_traceframe): Likewise.
4003 (add_traceframe_block): Likewise.
4004 (cmd_qtdpsrc): Likewise.
4005 (cmd_qtdv): Likewise.
4006 (cmd_qtstatus): Likewise.
4007 (response_source): Likewise.
4008 (response_tsv): Likewise.
4009 (cmd_qtnotes): Likewise.
4010 (gdb_collect): Likewise.
4011 (initialize_tracepoint): Likewise.
4013 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4015 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4016 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4017 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4019 (enum aarch64_condition_codes): New enum.
4020 (w0): New static global.
4023 (struct aarch64_memory_operand) <type>: New
4024 MEMORY_OPERAND_POSTINDEX type.
4025 (postindex_memory_operand): New helper function.
4026 (emit_ret): New function.
4027 (emit_load_store_pair): New function, factored out of emit_stp
4028 with support for MEMORY_OPERAND_POSTINDEX.
4029 (emit_stp): Rewrite using emit_load_store_pair.
4030 (emit_ldp): New function.
4031 (emit_load_store): Likewise.
4032 (emit_ldr): Mention post-index instruction in comment.
4033 (emit_ldrh): New function.
4034 (emit_ldrb): New function.
4035 (emit_ldrsw): Mention post-index instruction in comment.
4036 (emit_str): Likewise.
4037 (emit_subs): New function.
4038 (emit_cmp): Likewise.
4039 (emit_and): Likewise.
4040 (emit_orr): Likewise.
4041 (emit_orn): Likewise.
4042 (emit_eor): Likewise.
4043 (emit_mvn): Likewise.
4044 (emit_lslv): Likewise.
4045 (emit_lsrv): Likewise.
4046 (emit_asrv): Likewise.
4047 (emit_mul): Likewise.
4048 (emit_sbfm): Likewise.
4049 (emit_sbfx): Likewise.
4050 (emit_ubfm): Likewise.
4051 (emit_ubfx): Likewise.
4052 (emit_csinc): Likewise.
4053 (emit_cset): Likewise.
4054 (emit_nop): Likewise.
4055 (emit_ops_insns): New helper function.
4056 (emit_pop): Likewise.
4057 (emit_push): Likewise.
4058 (aarch64_emit_prologue): New function.
4059 (aarch64_emit_epilogue): Likewise.
4060 (aarch64_emit_add): Likewise.
4061 (aarch64_emit_sub): Likewise.
4062 (aarch64_emit_mul): Likewise.
4063 (aarch64_emit_lsh): Likewise.
4064 (aarch64_emit_rsh_signed): Likewise.
4065 (aarch64_emit_rsh_unsigned): Likewise.
4066 (aarch64_emit_ext): Likewise.
4067 (aarch64_emit_log_not): Likewise.
4068 (aarch64_emit_bit_and): Likewise.
4069 (aarch64_emit_bit_or): Likewise.
4070 (aarch64_emit_bit_xor): Likewise.
4071 (aarch64_emit_bit_not): Likewise.
4072 (aarch64_emit_equal): Likewise.
4073 (aarch64_emit_less_signed): Likewise.
4074 (aarch64_emit_less_unsigned): Likewise.
4075 (aarch64_emit_ref): Likewise.
4076 (aarch64_emit_if_goto): Likewise.
4077 (aarch64_emit_goto): Likewise.
4078 (aarch64_write_goto_address): Likewise.
4079 (aarch64_emit_const): Likewise.
4080 (aarch64_emit_call): Likewise.
4081 (aarch64_emit_reg): Likewise.
4082 (aarch64_emit_pop): Likewise.
4083 (aarch64_emit_stack_flush): Likewise.
4084 (aarch64_emit_zero_ext): Likewise.
4085 (aarch64_emit_swap): Likewise.
4086 (aarch64_emit_stack_adjust): Likewise.
4087 (aarch64_emit_int_call_1): Likewise.
4088 (aarch64_emit_void_call_2): Likewise.
4089 (aarch64_emit_eq_goto): Likewise.
4090 (aarch64_emit_ne_goto): Likewise.
4091 (aarch64_emit_lt_goto): Likewise.
4092 (aarch64_emit_le_goto): Likewise.
4093 (aarch64_emit_gt_goto): Likewise.
4094 (aarch64_emit_ge_got): Likewise.
4095 (aarch64_emit_ops_impl): New static global variable.
4096 (aarch64_emit_ops): New target function, return
4097 &aarch64_emit_ops_impl.
4098 (struct linux_target_ops): Install it.
4100 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4102 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4103 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4105 * linux-aarch64-ipa.c: New file.
4106 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4108 (aarch64_get_thread_area): New target method.
4109 (extract_signed_bitfield): New helper function.
4110 (aarch64_decode_ldr_literal): New function.
4111 (enum aarch64_opcodes): New enum.
4112 (struct aarch64_register): New struct.
4113 (struct aarch64_operand): New struct.
4114 (x0): New static global.
4123 (aarch64_register): New helper function.
4124 (register_operand): Likewise.
4125 (immediate_operand): Likewise.
4126 (struct aarch64_memory_operand): New struct.
4127 (offset_memory_operand): New helper function.
4128 (preindex_memory_operand): Likewise.
4129 (enum aarch64_system_control_registers): New enum.
4130 (ENCODE): New macro.
4131 (emit_insn): New helper function.
4132 (emit_b): New function.
4133 (emit_bcond): Likewise.
4134 (emit_cb): Likewise.
4135 (emit_tb): Likewise.
4136 (emit_blr): Likewise.
4137 (emit_stp): Likewise.
4138 (emit_ldp_q_offset): Likewise.
4139 (emit_stp_q_offset): Likewise.
4140 (emit_load_store): Likewise.
4141 (emit_ldr): Likewise.
4142 (emit_ldrsw): Likewise.
4143 (emit_str): Likewise.
4144 (emit_ldaxr): Likewise.
4145 (emit_stxr): Likewise.
4146 (emit_stlr): Likewise.
4147 (emit_data_processing_reg): Likewise.
4148 (emit_data_processing): Likewise.
4149 (emit_add): Likewise.
4150 (emit_sub): Likewise.
4151 (emit_mov): Likewise.
4152 (emit_movk): Likewise.
4153 (emit_mov_addr): Likewise.
4154 (emit_mrs): Likewise.
4155 (emit_msr): Likewise.
4156 (emit_sevl): Likewise.
4157 (emit_wfe): Likewise.
4158 (append_insns): Likewise.
4159 (can_encode_int32_in): New helper function.
4160 (aarch64_relocate_instruction): New function.
4161 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4162 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4163 (struct linux_target_ops): Install aarch64_get_thread_area,
4164 aarch64_install_fast_tracepoint_jump_pad and
4165 aarch64_get_min_fast_tracepoint_insn_len.
4167 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4169 * Makefile.in (aarch64-insn.o): New rule.
4170 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4172 2015-09-21 Yao Qi <yao.qi@linaro.org>
4174 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4176 2015-09-21 Yao Qi <yao.qi@linaro.org>
4178 * tracepoint.c (max_jump_pad_size): Remove.
4180 2015-09-18 Yao Qi <yao.qi@linaro.org>
4182 * linux-aarch64-low.c: Don't include sys/uio.h.
4183 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4185 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4187 * tracepoint.c (eval_result_type): Change prototype.
4188 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4190 2015-09-15 Pedro Alves <palves@redhat.com>
4192 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4193 Check whether to report exec events instead of checking whether
4194 multiprocess is enabled.
4196 2015-09-15 Pedro Alves <palves@redhat.com>
4199 * remote-utils.c (prepare_resume_reply): Merge
4200 TARGET_WAITKIND_VFORK_DONE switch case with the
4201 TARGET_WAITKIND_FORKED case.
4203 2015-09-15 Yao Qi <yao.qi@linaro.org>
4205 * server.c (handle_query): Check string comparison using
4206 "else if" instead of "if".
4208 2015-09-15 Yao Qi <yao.qi@linaro.org>
4210 * server.c (vCont_supported): New global variable.
4211 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4212 matches. Append ";vContSupported+" to own_buf.
4213 (handle_v_requests): Append ";s;S" to own_buf if target supports
4214 hardware single step or vCont_supported is false.
4215 (capture_main): Set vCont_supported to zero.
4217 2015-09-15 Yao Qi <yao.qi@linaro.org>
4219 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4221 (linux_supports_hardware_single_step): ... New function.
4222 (linux_target_ops): Update.
4223 * lynx-low.c (lynx_target_ops): Set field
4224 supports_hardware_single_step to target_can_do_hardware_single_step.
4225 * nto-low.c (nto_target_ops): Likewise.
4226 * spu-low.c (spu_target_ops): Likewise.
4227 * win32-low.c (win32_target_ops): Likewise.
4228 * target.c (target_can_do_hardware_single_step): New function.
4229 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4230 Remove. <supports_hardware_single_step>: New field.
4231 (target_supports_conditional_breakpoints): Remove.
4232 (target_supports_hardware_single_step): New macro.
4233 (target_can_do_hardware_single_step): Declare.
4234 * server.c (handle_query): Use target_supports_hardware_single_step
4235 instead of target_supports_conditional_breakpoints.
4237 2015-09-15 Yao Qi <yao.qi@linaro.org>
4239 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4241 (struct linux_target_ops the_low_target): Install
4242 aarch64_linux_siginfo_fixup.
4244 2015-09-11 Don Breazeal <donb@codesourcery.com>
4245 Luis Machado <lgustavo@codesourcery.com>
4247 * linux-low.c (linux_mourn): Static declaration.
4248 (linux_arch_setup): Move in front of
4249 handle_extended_wait.
4250 (linux_arch_setup_thread): New function.
4251 (handle_extended_wait): Handle exec events. Call
4252 linux_arch_setup_thread. Make event_lwp argument a
4253 pointer-to-a-pointer.
4254 (check_zombie_leaders): Do not check stopped threads.
4255 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4256 (linux_low_filter_event): Add lwp and thread for exec'ing
4257 non-leader thread if leader thread has been deleted.
4258 Refactor code into linux_arch_setup_thread and call it.
4259 Pass child lwp pointer by reference to handle_extended_wait.
4260 (linux_wait_for_event_filtered): Update comment.
4261 (linux_wait_1): Prevent clobbering exec event status.
4262 (linux_supports_exec_events): New function.
4263 (linux_target_ops) <supports_exec_events>: Initialize new member.
4264 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4266 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4267 * server.c (report_exec_events): New global variable.
4268 (handle_query): Handle qSupported query for exec-events feature.
4269 (captured_main): Initialize report_exec_events.
4270 * server.h (report_exec_events): Declare new global variable.
4271 * target.h (struct target_ops) <supports_exec_events>: New
4273 (target_supports_exec_events): New macro.
4274 * win32-low.c (win32_target_ops) <supports_exec_events>:
4275 Initialize new member.
4277 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4279 * linux-low.c (linux_low_enable_btrace): Remove.
4280 (linux_target_ops): Replace linux_low_enable_btrace with
4281 linux_enable_btrace.
4283 2015-09-03 Yao Qi <yao.qi@linaro.org>
4285 * linux-aarch64-low.c (aarch64_insert_point): Call
4286 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4289 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4291 * linux-low.c (check_stopped_by_breakpoint): Use
4292 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4294 2015-08-27 Pedro Alves <palves@redhat.com>
4296 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4298 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4300 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4301 the XNEW-family equivalent.
4302 (compile_bytecodes): Likewise.
4303 * dll.c (loaded_dll): Likewise.
4304 * event-loop.c (append_callback_event): Likewise.
4305 (create_file_handler): Likewise.
4306 (create_file_event): Likewise.
4307 * hostio.c (handle_open): Likewise.
4308 * inferiors.c (add_thread): Likewise.
4309 (add_process): Likewise.
4310 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4311 * linux-arm-low.c (arm_new_process): Likewise.
4312 (arm_new_thread): Likewise.
4313 * linux-low.c (add_to_pid_list): Likewise.
4314 (linux_add_process): Likewise.
4315 (handle_extended_wait): Likewise.
4316 (add_lwp): Likewise.
4317 (enqueue_one_deferred_signal): Likewise.
4318 (enqueue_pending_signal): Likewise.
4319 (linux_resume_one_lwp_throw): Likewise.
4320 (linux_resume_one_thread): Likewise.
4321 (linux_read_memory): Likewise.
4322 (linux_write_memory): Likewise.
4323 * linux-mips-low.c (mips_linux_new_process): Likewise.
4324 (mips_linux_new_thread): Likewise.
4325 (mips_add_watchpoint): Likewise.
4326 * linux-x86-low.c (initialize_low_arch): Likewise.
4327 * lynx-low.c (lynx_add_process): Likewise.
4328 * mem-break.c (set_raw_breakpoint_at): Likewise.
4329 (set_breakpoint): Likewise.
4330 (add_condition_to_breakpoint): Likewise.
4331 (add_commands_to_breakpoint): Likewise.
4332 (clone_agent_expr): Likewise.
4333 (clone_one_breakpoint): Likewise.
4334 * regcache.c (new_register_cache): Likewise.
4335 * remote-utils.c (look_up_one_symbol): Likewise.
4336 * server.c (queue_stop_reply): Likewise.
4337 (start_inferior): Likewise.
4338 (queue_stop_reply_callback): Likewise.
4339 (handle_target_event): Likewise.
4340 * spu-low.c (fetch_ppc_memory): Likewise.
4341 (store_ppc_memory): Likewise.
4342 * target.c (set_target_ops): Likewise.
4343 * thread-db.c (thread_db_load_search): Likewise.
4344 (try_thread_db_load_1): Likewise.
4345 * tracepoint.c (add_tracepoint): Likewise.
4346 (add_tracepoint_action): Likewise.
4347 (create_trace_state_variable): Likewise.
4348 (cmd_qtdpsrc): Likewise.
4349 (cmd_qtro): Likewise.
4350 (add_while_stepping_state): Likewise.
4351 * win32-low.c (child_add_thread): Likewise.
4352 (get_image_name): Likewise.
4354 2015-08-25 Yao Qi <yao.qi@linaro.org>
4356 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4358 2015-08-25 Yao Qi <yao.qi@linaro.org>
4360 * Makefile.in (aarch64-linux.o): New rule.
4361 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4363 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4364 (aarch64_init_debug_reg_state): Make it extern.
4365 (aarch64_linux_prepare_to_resume): Remove.
4367 2015-08-25 Yao Qi <yao.qi@linaro.org>
4369 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4370 lwp_arch_private_info and ptid_of_lwp.
4372 2015-08-25 Yao Qi <yao.qi@linaro.org>
4374 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4375 Find proc_info by find_process_pid. All callers updated.
4377 2015-08-25 Yao Qi <yao.qi@linaro.org>
4379 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4381 (debug_reg_change_callback): Remove.
4382 (aarch64_notify_debug_reg_change): Remove.
4384 2015-08-25 Yao Qi <yao.qi@linaro.org>
4386 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4387 Call current_lwp_ptid.
4389 2015-08-25 Yao Qi <yao.qi@linaro.org>
4391 * linux-aarch64-low.c (debug_reg_change_callback): Use
4394 2015-08-25 Yao Qi <yao.qi@linaro.org>
4396 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4398 2015-08-25 Yao Qi <yao.qi@linaro.org>
4400 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4402 2015-08-25 Yao Qi <yao.qi@linaro.org>
4404 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4407 2015-08-25 Yao Qi <yao.qi@linaro.org>
4409 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4411 (debug_reg_change_callback): Remove argument entry and add argument
4412 lwp. Remove local variable thread. Don't print thread id in the
4413 debugging output. Don't check whether pid of thread equals to pid.
4414 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4415 iterate_over_lwps instead find_inferior.
4417 2015-08-24 Pedro Alves <palves@redhat.com>
4419 * inferiors.c (get_first_process): New function.
4420 * inferiors.h (get_first_process): New declaration.
4421 * remote-utils.c (read_ptid): Default to the first process in the
4422 list, instead of to the current thread's process.
4424 2015-08-24 Pedro Alves <palves@redhat.com>
4426 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4427 * event-loop.c: Likewise.
4428 * remote-utils.c: Likewise.
4429 * tracepoint.c: Likewise.
4431 2015-08-24 Pedro Alves <palves@redhat.com>
4433 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4436 2015-08-21 Pedro Alves <palves@redhat.com>
4438 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4439 instead of literal 1.
4441 2015-08-21 Pedro Alves <palves@redhat.com>
4443 * tdesc.c (default_description): Explicitly zero-initialize.
4445 2015-08-21 Pedro Alves <palves@redhat.com>
4448 * inferiors.c (remove_thread): Discard any pending stop reply for
4450 * server.c (remove_all_on_match_pid): Rename to ...
4451 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4453 (discard_queued_stop_replies): Change parameter to a ptid. Now
4455 (handle_v_kill, kill_inferior_callback, captured_main)
4456 (process_serial_event): Adjust.
4457 * server.h (discard_queued_stop_replies): Declare.
4459 2015-08-21 Pedro Alves <palves@redhat.com>
4461 * linux-low.c (wait_for_sigstop): Always switch to no thread
4462 selected if the previously current thread dies.
4463 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4464 process instead of the current thread's.
4465 * remote-utils.c (input_interrupt): Don't check if there's no
4467 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4468 current thread to the general thread fails, error out.
4469 (handle_qxfer_auxv, handle_qxfer_libraries)
4470 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4471 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4472 (handle_query): Check if there's a thread selected instead of
4473 checking whether there's any thread in the thread list.
4474 (handle_qxfer_threads, handle_qxfer_btrace)
4475 (handle_qxfer_btrace_conf): Don't error out early if there's no
4476 thread in the thread list.
4477 (handle_v_cont, myresume): Don't set the current thread to the
4479 (process_serial_event) <Hg handling>: Also set thread_id if the
4480 previous general thread is still alive.
4481 (process_serial_event) <g/G handling>: If setting the current
4482 thread to the general thread fails, error out.
4483 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4484 thread's lwp instead of the current thread's.
4485 * target.c (set_desired_thread): If the desired thread was not
4486 found, leave the current thread pointing to NULL. Return an int
4487 (boolean) indicating success.
4488 * target.h (set_desired_thread): Change return type to int.
4490 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4492 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4493 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4495 (ps_get_thread_area): New function.
4497 2015-08-19 Gary Benson <gbenson@redhat.com>
4499 * hostio.c (handle_pread): Do not attempt to read more data
4500 than hostio_reply_with_data can fit in a packet.
4502 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4504 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4506 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4508 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4510 2015-08-06 Pedro Alves <palves@redhat.com>
4512 * tracepoint.c (expr_eval_result): Now an int.
4514 2015-08-06 Pedro Alves <palves@redhat.com>
4516 * gdbthread.h (struct regcache): Forward declare.
4517 (struct thread_info) <regcache_data>: Now a struct regcache
4519 * inferiors.c (inferior_regcache_data)
4520 (set_inferior_regcache_data): Now work with struct regcache
4522 * inferiors.h (struct regcache): Forward declare.
4523 (inferior_regcache_data, set_inferior_regcache_data): Now work
4524 with struct regcache pointers.
4525 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4526 (free_register_cache_thread): Remove struct regcache pointer
4529 2015-08-06 Pedro Alves <palves@redhat.com>
4531 * server.c (captured_main): On error, print the exception message
4532 to stderr, and if run_once is set, throw a quit.
4534 2015-08-06 Pedro Alves <palves@redhat.com>
4536 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4539 2015-08-06 Pedro Alves <palves@redhat.com>
4541 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4542 reading beyond the passed in buffer length.
4544 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4546 * tracepoint.c (symbol_list) <required>: Remove.
4548 2015-08-06 Pedro Alves <palves@redhat.com>
4550 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4551 count if stopping and suspending threads.
4552 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4553 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4554 (linux_detach): Complete an ongoing step-over.
4555 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4557 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4558 (linux_wait_1): If passing a signal to the inferior after
4559 finishing a step-over, unsuspend and re-resume all lwps. If we
4560 see a single-step event but the thread should be continuing, don't
4561 pass the trap to gdb.
4562 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4563 internal_error instead of gdb_assert.
4564 (enqueue_pending_signal): New function.
4565 (check_ptrace_stopped_lwp_gone): Add debug output.
4566 (start_step_over): Use internal_error instead of gdb_assert.
4567 (complete_ongoing_step_over): New function.
4568 (linux_resume_one_thread): Don't resume a suspended thread.
4569 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4572 2015-08-06 Pedro Alves <palves@redhat.com>
4574 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4575 (linux_thread_alive): Use lwp_is_marked_dead.
4576 (extended_event_reported): Delete.
4577 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4578 instead of extended_event_reported.
4579 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4581 (lwp_is_marked_dead): New function.
4582 (lwp_running): Use lwp_is_marked_dead.
4583 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4586 2015-08-06 Pedro Alves <palves@redhat.com>
4588 * linux-low.c (linux_wait_1): Move fork event output out of the
4589 !report_to_gdb check. Pass event_child->waitstatus to
4590 target_waitstatus_to_string instead of ourstatus.
4592 2015-08-04 Yao Qi <yao.qi@linaro.org>
4594 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4595 if current_thread is 32 bit.
4597 2015-08-04 Yao Qi <yao.qi@linaro.org>
4599 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4600 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4601 * server.c (extended_protocol): Remove "static".
4602 * server.h (extended_protocol): Declare it.
4604 2015-08-04 Yao Qi <yao.qi@linaro.org>
4606 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4607 both aarch64 and aarch32.
4608 (aarch64_set_pc): Likewise.
4610 2015-08-04 Yao Qi <yao.qi@linaro.org>
4612 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4613 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4614 arm-with-neon.xml to srv_xmlfiles.
4615 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4616 (is_64bit_tdesc): New function.
4617 (aarch64_linux_read_description): New function.
4618 (aarch64_arch_setup): Call aarch64_linux_read_description.
4619 (regs_info): Rename to regs_info_aarch64.
4620 (aarch64_regs_info): Return right regs_info.
4621 (initialize_low_arch): Call initialize_low_arch_aarch32.
4623 2015-08-04 Yao Qi <yao.qi@linaro.org>
4625 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4626 * linux-aarch32-low.c: New file.
4627 * linux-aarch32-low.h: New file.
4628 * linux-arm-low.c (arm_fill_gregset): Move it to
4629 linux-aarch32-low.c.
4630 (arm_store_gregset): Likewise.
4631 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4632 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4633 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4634 (regs_info): Rename to regs_info_arm.
4635 (arm_regs_info): Return regs_info_aarch32 if
4636 have_ptrace_getregset is 1 and target description is
4637 arm_with_neon or arm_with_vfpv3.
4638 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4639 Call initialize_low_arch_aarch32 instead.
4641 2015-08-04 Yao Qi <yao.qi@linaro.org>
4643 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4644 * linux-low.c: ... here.
4645 * linux-low.h (have_ptrace_getregset): Declare it.
4647 2015-08-04 Pedro Alves <palves@redhat.com>
4649 * thread-db.c (struct thread_db): Use new typedefs.
4650 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4652 (disable_thread_event_reporting): Cast result of dlsym to
4653 destination function pointer type.
4654 (thread_db_mourn): Use td_ta_delete_ftype.
4656 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4658 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4660 (CDX_BREAKPOINT): Define for R2.
4661 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4662 (the_low_target): Add comments.
4664 2015-07-30 Yao Qi <yao.qi@linaro.org>
4666 * linux-arm-low.c (arm_hwcap): Remove it.
4667 (arm_read_description): New local variable arm_hwcap. Don't
4668 set arm_hwcap to zero.
4670 2015-07-30 Yao Qi <yao.qi@linaro.org>
4672 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4673 Use regcache->tdesc instead.
4674 (arm_store_wmmxregset): Likewise.
4675 (arm_fill_vfpregset): Likewise.
4676 (arm_store_vfpregset): Likewise.
4678 2015-07-30 Yao Qi <yao.qi@linaro.org>
4680 * linux-arm-low.c: Include arch/arm.h.
4681 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4682 (arm_store_gregset): Likewise.
4684 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4686 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4687 ptrace's 4th parameter.
4689 2015-07-27 Yao Qi <yao.qi@linaro.org>
4691 * configure.srv (case aarch64*-*-linux*): Don't set
4694 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4696 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4698 * linux-arm-low.c: Likewise.
4699 * linux-cris-low.c: Likewise.
4700 * linux-crisv32-low.c: Likewise.
4701 * linux-low.c: Likewise.
4702 * linux-m68k-low.c: Likewise.
4703 * linux-mips-low.c: Likewise.
4704 * linux-nios2-low.c: Likewise.
4705 * linux-s390-low.c: Likewise.
4706 * linux-sparc-low.c: Likewise.
4707 * linux-tic6x-low.c: Likewise.
4708 * linux-tile-low.c: Likewise.
4709 * linux-x86-low.c: Likewise.
4711 2015-07-24 Pedro Alves <palves@redhat.com>
4713 * config.in: Regenerate.
4714 * configure: Regenerate.
4716 2015-07-24 Pedro Alves <palves@redhat.com>
4718 * acinclude.m4: Include ../ptrace.m4.
4719 * configure.ac: Call GDB_AC_PTRACE.
4720 * config.in, configure: Regenerate.
4722 2015-07-24 Yao Qi <yao.qi@linaro.org>
4724 * linux-low.c (linux_create_inferior): Remove setting to
4725 proc->priv->new_inferior.
4726 (linux_attach): Likewise.
4727 (linux_low_filter_event): Likewise.
4728 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4730 2015-07-24 Yao Qi <yao.qi@linaro.org>
4732 * linux-low.c (linux_arch_setup): New function.
4733 (linux_low_filter_event): If proc->tdesc is NULL and
4734 proc->attached is true, call the_low_target.arch_setup.
4735 Otherwise, keep status pending, and return.
4736 (linux_resume_one_lwp_throw): Don't call get_pc if
4737 thread->while_stepping isn't NULL. Don't call
4738 get_thread_regcache if proc->tdesc is NULL.
4739 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4740 (linux_target_ops): Install arch_setup.
4741 * server.c (start_inferior): Call the_target->arch_setup.
4742 * target.h (struct target_ops) <arch_setup>: New field.
4743 (target_arch_setup): New marco.
4744 * lynx-low.c (lynx_target_ops): Update.
4745 * nto-low.c (nto_target_ops): Update.
4746 * spu-low.c (spu_target_ops): Update.
4747 * win32-low.c (win32_target_ops): Update.
4749 2015-07-24 Yao Qi <yao.qi@linaro.org>
4751 * linux-low.c (linux_add_process): Don't set
4752 proc->priv->new_inferior.
4753 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4754 (linux_attach): Likewise.
4756 2015-07-24 Yao Qi <yao.qi@linaro.org>
4758 * server.c (start_inferior): Code refactor.
4760 2015-07-24 Yao Qi <yao.qi@linaro.org>
4762 * server.c (process_serial_event): Set general_thread.
4764 2015-07-21 Yao Qi <yao.qi@linaro.org>
4766 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4767 aarch64_linux_get_debug_reg_capacity.
4769 2015-07-17 Yao Qi <yao.qi@linaro.org>
4771 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4772 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4773 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4774 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4775 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4776 (AARCH64_HWP_ALIGNMENT): Likewise.
4777 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4778 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4779 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4780 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4781 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4782 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4783 (struct aarch64_debug_reg_state): Likewise.
4784 (struct arch_lwp_info): Likewise.
4785 (aarch64_align_watchpoint): Likewise.
4786 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4787 (aarch64_watchpoint_length): Likewise.
4788 (aarch64_point_encode_ctrl_reg): Likewise
4789 (aarch64_point_is_aligned): Likewise.
4790 (aarch64_align_watchpoint): Likewise.
4791 (aarch64_linux_set_debug_regs):
4792 (aarch64_dr_state_insert_one_point): Likewise.
4793 (aarch64_dr_state_remove_one_point): Likewise.
4794 (aarch64_handle_breakpoint): Likewise.
4795 (aarch64_handle_aligned_watchpoint): Likewise.
4796 (aarch64_handle_unaligned_watchpoint): Likewise.
4797 (aarch64_handle_watchpoint): Likewise.
4799 2015-07-17 Yao Qi <yao.qi@linaro.org>
4801 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4802 and don't aarch64_get_debug_reg_state. All callers update.
4803 (aarch64_handle_aligned_watchpoint): Likewise.
4804 (aarch64_handle_unaligned_watchpoint): Likewise.
4805 (aarch64_handle_watchpoint): Likewise.
4806 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4807 (aarch64_remove_point): Likewise.
4809 2015-07-17 Yao Qi <yao.qi@linaro.org>
4811 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4813 (aarch64_handle_unaligned_watchpoint): Likewise.
4815 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4817 Revert the previous 3 commits:
4818 Move gdb_regex* to common/
4819 Move linux_find_memory_regions_full & co.
4820 gdbserver build-id attribute generator
4822 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4823 Jan Kratochvil <jan.kratochvil@redhat.com>
4825 gdbserver build-id attribute generator.
4826 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4827 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4828 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4830 (get_dynamic): Use find_pdhr to traverse program headers.
4831 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4832 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4833 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4834 (get_hex_build_id): New.
4835 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4836 to reply XML document.
4838 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4839 Jan Kratochvil <jan.kratochvil@redhat.com>
4841 * target.c: Include target/target-utils.h and fcntl.h.
4842 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4843 (target_fileio_read_stralloc): New functions.
4845 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4847 * Makefile.in (OBS): Add gdb_regex.o.
4849 * config.in: Rebuilt.
4850 * configure: Rebuilt.
4852 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4853 Jan Kratochvil <jan.kratochvil@redhat.com>
4855 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4856 * Makefile.in (OBS): Add target-utils.o.
4857 (linux-maps.o, target-utils.o): New.
4858 * configure.srv (srv_linux_obj): Add linux-maps.o.
4860 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4862 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4864 (the_low_target): Install it.
4866 2015-07-14 Pedro Alves <palves@redhat.com>
4868 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4869 Instead, ignore ECHILD, and throw an error for other errnos.
4871 2015-07-10 Pedro Alves <palves@redhat.com>
4873 * event-loop.c (struct callback_event) <data>: Change type to
4874 gdb_client_data instance instead of gdb_client_data pointer.
4875 (append_callback_event): Adjust.
4877 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4879 * linux-aarch64-low.c: Add comments for each linux_target_ops
4880 method. Remove comments already covered in target_ops and
4881 linux_target_ops definitions.
4882 (the_low_target): Add comments for each unimplemented method.
4884 2015-07-09 Yao Qi <yao.qi@linaro.org>
4886 * linux-aarch64-low.c (aarch64_regmap): Remove.
4887 (aarch64_usrregs_info): Remove.
4888 (regs_info): Set field usrregs to NULL.
4890 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4892 * linux-low.c: Include "rsp-low.h"
4893 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4894 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4895 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4896 (handle_btrace_enable_pt): New.
4897 (handle_btrace_general_set): Support "pt".
4898 (handle_btrace_conf_general_set): Support "pt:size".
4900 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4902 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4905 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4907 * linux-aarch64-low.c: Remove comment about endianness.
4908 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4909 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4912 2015-06-24 Gary Benson <gbenson@redhat.com>
4914 * linux-i386-ipa.c (stdint.h): Do not include.
4915 * lynx-i386-low.c (stdint.h): Likewise.
4916 * lynx-ppc-low.c (stdint.h): Likewise.
4917 * mem-break.c (stdint.h): Likewise.
4918 * thread-db.c (stdint.h): Likewise.
4919 * tracepoint.c (stdint.h): Likewise.
4920 * win32-low.c (stdint.h): Likewise.
4922 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4924 * server.c (write_qxfer_response): Update call to
4925 remote_escape_output.
4927 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4928 Jan Kratochvil <jan.kratochvil@redhat.com>
4930 Merge multiple hex conversions.
4931 * gdbreplay.c (tohex): Rename to 'fromhex'.
4932 (logchar): Use fromhex.
4934 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4936 * server.c (handle_qxfer_libraries): Set `version' attribute for
4939 2015-06-10 Gary Benson <gbenson@redhat.com>
4941 * target.h (struct target_ops) <multifs_open>: New field.
4942 <multifs_unlink>: Likewise.
4943 <multifs_readlink>: Likewise.
4944 * linux-low.c (nat/linux-namespaces.h): New include.
4945 (linux_target_ops): Initialize the_target->multifs_open,
4946 the_target->multifs_unlink and the_target->multifs_readlink.
4947 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4948 * hostio.c (hostio_fs_pid): New static variable.
4949 (hostio_handle_new_gdb_connection): New function.
4950 (handle_setfs): Likewise.
4951 (handle_open): Use the_target->multifs_open as appropriate.
4952 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4953 (handle_readlink): Use the_target->multifs_readlink as
4955 (handle_vFile): Handle vFile:setfs packets.
4956 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4957 after target_handle_new_gdb_connection.
4959 2015-06-10 Gary Benson <gbenson@redhat.com>
4961 * configure.ac (AC_CHECK_FUNCS): Add setns.
4962 * config.in: Regenerate.
4963 * configure: Likewise.
4964 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4965 (linux-namespaces.o): New rule.
4966 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4968 2015-06-09 Gary Benson <gbenson@redhat.com>
4970 * hostio.c (handle_open): Process mode argument with
4971 fileio_to_host_mode.
4973 2015-06-01 Yao Qi <yao.qi@linaro.org>
4975 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4976 * linux-x86-low.c: Likewise.
4978 2015-05-28 Don Breazeal <donb@codesourcery.com>
4980 * linux-low.c (handle_extended_wait): Initialize
4981 thread_info.last_resume_kind for new fork children.
4983 2015-05-15 Pedro Alves <palves@redhat.com>
4985 * target.h (target_handle_new_gdb_connection): Rewrite using if
4986 wrapped in do/while.
4988 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4990 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4991 * configure, config.in: Regenerate.
4992 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4995 2015-05-12 Don Breazeal <donb@codesourcery.com>
4997 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4998 PTRACE_EVENT_VFORK_DONE.
4999 (linux_low_ptrace_options, extended_event_reported): Add vfork
5001 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5002 and "vforkdone" for RSP 'T' Stop Reply Packet.
5003 * server.h (report_vfork_events): Declare
5006 2015-05-12 Don Breazeal <donb@codesourcery.com>
5008 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5009 (the_low_target) <new_fork>: Initialize new member.
5010 * linux-arm-low.c (arm_new_fork): New function.
5011 (the_low_target) <new_fork>: Initialize new member.
5012 * linux-low.c (handle_extended_wait): Call new target function
5014 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5015 * linux-mips-low.c (mips_add_watchpoint): New function
5016 extracted from mips_insert_point.
5017 (the_low_target) <new_fork>: Initialize new member.
5018 (mips_linux_new_fork): New function.
5019 (mips_insert_point): Call mips_add_watchpoint.
5020 * linux-x86-low.c (x86_linux_new_fork): New function.
5021 (the_low_target) <new_fork>: Initialize new member.
5023 2015-05-12 Don Breazeal <donb@codesourcery.com>
5025 * linux-low.c (handle_extended_wait): Implement return value,
5026 rename argument 'event_child' to 'event_lwp', handle
5027 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5028 (linux_low_ptrace_options): New function.
5029 (linux_low_filter_event): Call linux_low_ptrace_options,
5030 use different argument fo linux_enable_event_reporting,
5031 use return value from handle_extended_wait.
5032 (extended_event_reported): New function.
5033 (linux_wait_1): Call extended_event_reported and set
5034 status to report fork events.
5035 (linux_write_memory): Add pid to debug message.
5036 (reset_lwp_ptrace_options_callback): New function.
5037 (linux_handle_new_gdb_connection): New function.
5038 (linux_target_ops): Initialize new structure member.
5039 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5040 * lynx-low.c: Initialize new structure member.
5041 * remote-utils.c (prepare_resume_reply): Implement stop reason
5042 "fork" for "T" stop message.
5043 * server.c (handle_query): Call handle_new_gdb_connection.
5044 * server.h (report_fork_events): Declare global flag.
5045 * target.h (struct target_ops) <handle_new_gdb_connection>:
5047 (target_handle_new_gdb_connection): New macro.
5048 * win32-low.c: Initialize new structure member.
5050 2015-05-12 Don Breazeal <donb@codesourcery.com>
5052 * mem-break.c (APPEND_TO_LIST): Define macro.
5053 (clone_agent_expr): New function.
5054 (clone_one_breakpoint): New function.
5055 (clone_all_breakpoints): New function.
5056 * mem-break.h: Declare new functions.
5058 2015-05-12 Don Breazeal <donb@codesourcery.com>
5060 * linux-low.c (linux_supports_fork_events): New function.
5061 (linux_supports_vfork_events): New function.
5062 (linux_target_ops): Initialize new structure members.
5063 (initialize_low): Call linux_check_ptrace_features.
5064 * lynx-low.c (lynx_target_ops): Initialize new structure
5066 * server.c (report_fork_events, report_vfork_events):
5068 (handle_query): Add new features to qSupported packet and
5070 (captured_main): Initialize new global variables.
5071 * target.h (struct target_ops) <supports_fork_events>:
5073 <supports_vfork_events>: New member.
5074 (target_supports_fork_events): New macro.
5075 (target_supports_vfork_events): New macro.
5076 * win32-low.c (win32_target_ops): Initialize new structure
5079 2015-05-12 Gary Benson <gbenson@redhat.com>
5081 * server.c (handle_qxfer_exec_file): Use current process
5084 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5086 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5087 Remove HAVE_PTRACE_GETREGS conditionals.
5088 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5089 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5091 2015-05-08 Yao Qi <yao.qi@linaro.org>
5093 * linux-low.c (linux_supports_conditional_breakpoints): New
5095 (linux_target_ops): Install new target method.
5096 * lynx-low.c (lynx_target_ops): Install NULL hook for
5097 supports_conditional_breakpoints.
5098 * nto-low.c (nto_target_ops): Likewise.
5099 * spu-low.c (spu_target_ops): Likewise.
5100 * win32-low.c (win32_target_ops): Likewise.
5101 * server.c (handle_query): Check
5102 target_supports_conditional_breakpoints.
5103 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5105 (target_supports_conditional_breakpoints): New macro.
5107 2015-05-06 Pedro Alves <palves@redhat.com>
5110 * server.c (start_inferior): If the process exits, mourn it.
5112 2015-04-21 Gary Benson <gbenson@redhat.com>
5114 * hostio.c (fileio_open_flags_to_host): Factored out to
5115 fileio_to_host_openflags in common/fileio.c. Single use
5118 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5120 * linux-xtensa-low.c (xtensa_fill_gregset)
5121 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5124 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5126 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5127 (regs_info): Replace usrregs pointer with NULL.
5129 2015-04-17 Gary Benson <gbenson@redhat.com>
5131 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5132 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5133 * server.c (handle_qxfer_exec_file): New function.
5134 (qxfer_packets): Add exec-file entry.
5135 (handle_query): Report qXfer:exec-file:read as supported packet.
5137 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5139 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5141 2015-04-09 Gary Benson <gbenson@redhat.com>
5143 * hostio-errno.c (errno_to_fileio_error): Remove function.
5144 Update caller to use remote_fileio_to_fio_error.
5146 2015-04-09 Yao Qi <yao.qi@linaro.org>
5148 * linux-low.c (linux_insert_point): Call
5149 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5150 (linux_remove_point): Call remove_memory_breakpoint if type is
5152 * linux-x86-low.c (x86_insert_point): Don't call
5153 insert_memory_breakpoint.
5154 (x86_remove_point): Don't call remove_memory_breakpoint.
5156 2015-04-01 Pedro Alves <palves@redhat.com>
5157 Cleber Rosa <crosa@redhat.com>
5159 * server.c (gdbserver_usage): Reorganize and extend the usage
5162 2015-03-24 Pedro Alves <palves@redhat.com>
5164 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5165 output. Also dump TRAP_TRACE.
5166 (linux_low_filter_event): In debug output, distinguish a
5167 resume_stop SIGSTOP from a delayed SIGSTOP.
5169 2015-03-24 Gary Benson <gbenson@redhat.com>
5171 * linux-x86-low.c (x86_linux_new_thread): Moved to
5173 (x86_linux_prepare_to_resume): Likewise.
5175 2015-03-24 Gary Benson <gbenson@redhat.com>
5177 * Makefile.in (x86-linux-dregs.o): New rule.
5178 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5179 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5180 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5181 (x86_linux_dr_get): Likewise.
5182 (x86_linux_dr_set): Likewise.
5183 (update_debug_registers_callback): Likewise.
5184 (x86_linux_dr_set_addr): Likewise.
5185 (x86_linux_dr_get_addr): Likewise.
5186 (x86_linux_dr_set_control): Likewise.
5187 (x86_linux_dr_get_control): Likewise.
5188 (x86_linux_dr_get_status): Likewise.
5189 (x86_linux_update_debug_registers): Likewise.
5191 2015-03-24 Gary Benson <gbenson@redhat.com>
5193 * linux-x86-low.c (x86_linux_update_debug_registers):
5194 New function, factored out from...
5195 (x86_linux_prepare_to_resume): ...this.
5197 2015-03-24 Gary Benson <gbenson@redhat.com>
5199 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5200 (x86_linux_dr_set): Likewise.
5201 (update_debug_registers_callback): Likewise.
5202 (x86_linux_dr_set_addr): Likewise.
5203 (x86_linux_dr_get_addr): Likewise.
5204 (x86_linux_dr_set_control): Likewise.
5205 (x86_linux_dr_get_control): Likewise.
5206 (x86_linux_dr_get_status): Likewise.
5207 (x86_linux_prepare_to_resume): Likewise.
5209 2015-03-24 Gary Benson <gbenson@redhat.com>
5211 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5212 Use perror_with_name. Pass string through gettext.
5213 (x86_linux_dr_set): Likewise.
5215 2015-03-24 Gary Benson <gbenson@redhat.com>
5217 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5218 (x86_linux_dr_set_addr): ...this.
5219 (x86_dr_low_get_addr): Rename to...
5220 (x86_linux_dr_get_addr): ...this.
5221 (x86_dr_low_set_control): Rename to...
5222 (x86_linux_dr_set_control): ...this.
5223 (x86_dr_low_get_control): Rename to...
5224 (x86_linux_dr_get_control): ...this.
5225 (x86_dr_low_get_status): Rename to...
5226 (x86_linux_dr_get_status): ...this.
5227 (x86_dr_low): Update with new function names.
5229 2015-03-24 Gary Benson <gbenson@redhat.com>
5231 * Makefile.in (x86-linux.o): New rule.
5232 * configure.srv: Add x86-linux.o to relevant targets.
5233 * linux-low.c (lwp_set_arch_private_info): New function.
5234 (lwp_arch_private_info): Likewise.
5235 * linux-x86-low.c: Include nat/x86-linux.h.
5236 (arch_lwp_info): Removed structure.
5237 (update_debug_registers_callback):
5238 Use lwp_set_debug_registers_changed.
5239 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5240 and lwp_set_debug_registers_changed.
5241 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5243 2015-03-24 Gary Benson <gbenson@redhat.com>
5245 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5246 * linux-arm-low.c (arm_new_thread): Likewise.
5247 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5248 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5249 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5250 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5252 2015-03-24 Gary Benson <gbenson@redhat.com>
5254 * linux-low.c (ptid_of_lwp): New function.
5255 (lwp_is_stopped): Likewise.
5256 (lwp_stop_reason): Likewise.
5257 * linux-x86-low.c (update_debug_registers_callback):
5259 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5262 2015-03-24 Gary Benson <gbenson@redhat.com>
5264 * linux-low.h (linux_stop_lwp): Remove declaration.
5266 2015-03-24 Gary Benson <gbenson@redhat.com>
5268 * linux-low.h: Include nat/linux-nat.h.
5269 * linux-low.c (iterate_over_lwps_args): New structure.
5270 (iterate_over_lwps_filter): New function.
5271 (iterate_over_lwps): Likewise.
5272 * linux-x86-low.c (update_debug_registers_callback):
5273 Update signature to what iterate_over_lwps expects.
5274 Remove PID check that iterate_over_lwps now performs.
5275 (x86_dr_low_set_addr): Use iterate_over_lwps.
5276 (x86_dr_low_set_control): Likewise.
5278 2015-03-24 Gary Benson <gbenson@redhat.com>
5280 * linux-x86-low.c (x86_debug_reg_state): New function.
5281 (x86_linux_prepare_to_resume): Use the above.
5283 2015-03-24 Gary Benson <gbenson@redhat.com>
5285 * linux-low.c (current_lwp_ptid): New function.
5286 * linux-x86-low.c: Include nat/linux-nat.h.
5287 (x86_dr_low_get_addr): Use current_lwp_ptid.
5288 (x86_dr_low_get_control): Likewise.
5289 (x86_dr_low_get_status): Likewise.
5291 2015-03-20 Pedro Alves <palves@redhat.com>
5293 * tracepoint.c (cmd_qtstatus): Make "str" const.
5295 2015-03-20 Pedro Alves <palves@redhat.com>
5297 * server.c (handle_general_set): Make "req_str" const.
5299 2015-03-19 Pedro Alves <palves@redhat.com>
5301 * linux-low.c (linux_resume_one_lwp): Rename to ...
5302 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5303 instead call perror_with_name.
5304 (check_ptrace_stopped_lwp_gone): New function.
5305 (linux_resume_one_lwp): Reimplement as wrapper around
5306 linux_resume_one_lwp_throw that swallows errors if the LWP is
5309 2015-03-19 Pedro Alves <palves@redhat.com>
5311 * linux-low.c (count_events_callback, select_event_lwp_callback):
5312 No longer check whether the thread has resume_stop as last resume
5315 2015-03-19 Pedro Alves <palves@redhat.com>
5317 * linux-low.c (count_events_callback, select_event_lwp_callback):
5318 Use the lwp's status_pending_p field, not the thread's.
5320 2015-03-19 Pedro Alves <palves@redhat.com>
5322 * linux-low.c (select_event_lwp_callback): Update comments to
5323 no longer mention SIGTRAP.
5325 2015-03-18 Gary Benson <gbenson@redhat.com>
5327 * server.c (handle_query): Do not report vFile:fstat as supported.
5329 2015-03-11 Gary Benson <gbenson@redhat.com>
5331 * hostio.c (sys/types.h): New include.
5332 (sys/stat.h): Likewise.
5333 (common-remote-fileio.h): Likewise.
5334 (handle_fstat): New function.
5335 (handle_vFile): Handle vFile:fstat packets.
5337 2015-03-11 Gary Benson <gbenson@redhat.com>
5339 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5340 struct stat.st_blocks and struct stat.st_blksize.
5341 * configure: Regenerate.
5342 * config.in: Likewise.
5343 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5344 (OBS): Add common-remote-fileio.o.
5345 (common-remote-fileio.o): New rule.
5347 2015-03-09 Pedro Alves <palves@redhat.com>
5349 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5350 'struct sockaddr' pointer in 'accept' call.
5352 2015-03-09 Pedro Alves <palves@redhat.com>
5355 2015-03-07 Pedro Alves <palves@redhat.com>
5356 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5357 or <winsock2.h> here. Instead include "gdb_socket.h".
5358 (remote_open): Use union gdb_sockaddr_u.
5359 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5360 or <winsock2.h> here. Instead include "gdb_socket.h".
5361 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5362 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5364 (init_named_socket, gdb_agent_helper_thread): Use union
5367 2015-03-07 Pedro Alves <palves@redhat.com>
5369 * configure.ac (build_warnings): Move
5370 -Wdeclaration-after-statement to the C-specific set.
5371 * configure: Regenerate.
5373 2015-03-07 Pedro Alves <palves@redhat.com>
5375 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5376 or <winsock2.h> here. Instead include "gdb_socket.h".
5377 (remote_open): Use union gdb_sockaddr_u.
5378 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5379 or <winsock2.h> here. Instead include "gdb_socket.h".
5380 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5381 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5383 (init_named_socket, gdb_agent_helper_thread): Use union
5386 2015-03-07 Pedro Alves <palves@redhat.com>
5388 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5391 2015-03-06 Yao Qi <yao.qi@linaro.org>
5393 * linux-aarch64-low.c (aarch64_insert_point): Use
5394 show_debug_regs as a boolean.
5395 (aarch64_remove_point): Likewise.
5397 2015-03-05 Pedro Alves <palves@redhat.com>
5399 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5400 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5401 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5402 * nto-low.c (nto_target_ops): Likewise.
5403 * spu-low.c (spu_target_ops): Likewise.
5404 * win32-low.c (win32_target_ops): Likewise.
5406 2015-03-04 Pedro Alves <palves@redhat.com>
5408 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5409 Decide whether a breakpoint triggered based on the SIGTRAP's
5411 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5412 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5413 (linux_low_filter_event): Check for breakpoints before checking
5415 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5417 (linux_stopped_by_sw_breakpoint)
5418 (linux_supports_stopped_by_sw_breakpoint)
5419 (linux_stopped_by_hw_breakpoint)
5420 (linux_supports_stopped_by_hw_breakpoint): New functions.
5421 (linux_target_ops): Install new target methods.
5423 2015-03-04 Pedro Alves <palves@redhat.com>
5425 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5426 * server.c (swbreak_feature, hwbreak_feature): New globals.
5427 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5428 (captured_main): Clear swbreak_feature and hwbreak_feature.
5429 * server.h (swbreak_feature, hwbreak_feature): Declare.
5430 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5431 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5432 supports_stopped_by_hw_breakpoint>: New fields.
5433 (target_supports_stopped_by_sw_breakpoint)
5434 (target_stopped_by_sw_breakpoint)
5435 (target_supports_stopped_by_hw_breakpoint)
5436 (target_stopped_by_hw_breakpoint): Declare.
5438 2015-03-04 Pedro Alves <palves@redhat.com>
5440 enum lwp_stop_reason -> enum target_stop_reason
5441 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5442 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5443 (linux_wait_1, stuck_in_jump_pad_callback)
5444 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5445 (linux_stopped_by_watchpoint):
5446 * linux-low.h (enum lwp_stop_reason): Delete.
5447 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5448 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5450 2015-03-04 Yao Qi <yao.qi@linaro.org>
5452 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5454 2015-03-03 Gary Benson <gbenson@redhat.com>
5456 * hostio.c (handle_vFile): Fix prefix lengths.
5458 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5460 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5463 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5465 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5466 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5467 (clean): Add "rm -f" for above C files.
5468 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5469 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5470 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5471 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5472 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5473 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5474 (init_registers_s390x_vx_linux64)
5475 (init_registers_s390x_tevx_linux64)
5476 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5477 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5479 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5480 (s390_store_vxrs_high): New functions.
5481 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5483 (s390_arch_setup): Add logic for selecting one of the new target
5484 descriptions. Activate the new vector regsets if applicable.
5485 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5486 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5487 and init_registers_s390x_tevx_linux64.
5489 2015-03-01 Pedro Alves <palves@redhat.com>
5491 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5494 2015-02-27 Pedro Alves <palves@redhat.com>
5496 * linux-x86-low.c (u_debugreg_offset): New function.
5497 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5499 2015-02-27 Pedro Alves <palves@redhat.com>
5501 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5502 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5503 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5504 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5505 (ps_lsetfpregs, ps_getpid)
5506 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5507 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5508 (ps_lsetxregs, ps_plog): Declare.
5510 2015-02-27 Pedro Alves <palves@redhat.com>
5512 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5513 IP_AGENT_EXPORT_FUNC.
5514 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5515 IP_AGENT_EXPORT_FUNC.
5516 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5517 (IP_AGENT_EXPORT): Delete.
5518 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5519 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5520 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5521 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5522 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5523 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5524 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5525 (traceframe_read_count, traceframe_write_count)
5526 (traceframes_created, trace_state_variables, get_raw_reg)
5527 (get_trace_state_variable_value, set_trace_state_variable_value)
5528 (ust_loaded, helper_thread_id, cmd_buf): Use
5529 IPA_SYM_EXPORTED_NAME.
5530 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5531 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5532 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5533 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5534 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5535 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5536 EXTERN_C_PUSH/EXTERN_C_POP.
5537 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5538 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5539 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5540 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5541 (traceframe_write_count, traceframe_read_count)
5542 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5543 (about_to_request_buffer_space, get_trace_state_variable_value)
5544 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5545 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5546 EXTERN_C_PUSH/EXTERN_C_POP.
5547 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5548 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5549 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5550 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5551 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5552 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5553 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5554 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5556 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5557 (IP_AGENT_EXPORT_VAR_DECL): Define.
5559 (gdb_agent_get_raw_reg): Declare.
5561 2015-02-27 Tom Tromey <tromey@redhat.com>
5562 Pedro Alves <palves@redhat.com>
5564 Rename symbols whose names are reserved C++ keywords throughout.
5566 2015-02-27 Pedro Alves <palves@redhat.com>
5568 * Makefile.in (COMPILER): New, get it from autoconf.
5569 (CXX): Get from autoconf instead.
5570 (COMPILE.pre): Use COMPILER.
5571 (CC-LD): Rename to ...
5572 (CC_LD): ... this. Use COMPILER.
5573 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5574 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5575 * acinclude.m4: Include build-with-cxx.m4.
5576 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5577 Disable -Werror by default if building in C++ mode.
5578 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5579 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5580 the C++ compiler. Save/restore CXXFLAGS too.
5581 * configure: Regenerate.
5583 2015-02-27 Pedro Alves <palves@redhat.com>
5585 * acinclude.m4: Include libiberty.m4.
5586 * configure.ac: Call libiberty_INIT.
5587 * config.in, configure: Regenerate.
5589 2015-02-26 Pedro Alves <palves@redhat.com>
5591 * linux-low.c (linux_wait_1): When incrementing the PC past a
5592 program breakpoint always use the_low_target.breakpoint_len as
5593 increment, rather than the maximum between that and
5594 the_low_target.decr_pc_after_break.
5596 2015-02-23 Pedro Alves <palves@redhat.com>
5598 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5599 thread was doing a step-over; always adjust the PC if
5600 we stepped over a permanent breakpoint.
5601 (linux_wait_1): If we stepped over breakpoint that was on top of a
5602 permanent breakpoint, manually advance the PC past it.
5604 2015-02-23 Pedro Alves <palves@redhat.com>
5606 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5608 (x86_fill_gregset, x86_store_gregset): Use it when handling
5611 2015-02-20 Pedro Alves <palves@redhat.com>
5613 * thread-db.c: Include "nat/linux-procfs.h".
5614 (thread_db_init): Skip listing new threads if the kernel supports
5615 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5617 2015-02-20 Pedro Alves <palves@redhat.com>
5619 * linux-low.c (status_pending_p_callback): Use ptid_match.
5621 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5623 PR breakpoints/16812
5624 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5625 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5626 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5628 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5630 PR breakpoints/15956
5631 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5633 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5635 * linux-low.c (linux_low_btrace_conf): Print size.
5636 * server.c (handle_btrace_conf_general_set): New.
5637 (hanle_general_set): Call handle_btrace_conf_general_set.
5638 (handle_query): Report Qbtrace-conf:bts:size as supported.
5640 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5642 * linux-low.c (linux_low_enable_btrace): Update parameters.
5643 (linux_low_btrace_conf): New.
5644 (linux_target_ops)<to_btrace_conf>: Initialize.
5645 * server.c (current_btrace_conf): New.
5646 (handle_btrace_enable): Rename to ...
5647 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5648 to target_enable_btrace. Update comment. Update users.
5649 (handle_qxfer_btrace_conf): New.
5650 (qxfer_packets): Add btrace-conf entry.
5651 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5652 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5653 (target_ops)<read_btrace_conf>: New.
5654 (target_enable_btrace): Update parameters.
5655 (target_read_btrace_conf): New.
5657 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5659 * server.c (handle_btrace_general_set): Remove call to
5660 target_supports_btrace.
5661 (supported_btrace_packets): New.
5662 (handle_query): Call supported_btrace_packets.
5663 * target.h: include btrace-common.h.
5664 (btrace_target_info): Removed.
5665 (supports_btrace, target_supports_btrace): Update parameters.
5667 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5669 * Makefile.in (SFILES): Add common/btrace-common.c.
5670 (OBS): Add common/btrace-common.o.
5671 (btrace-common.o): Add build rules.
5672 * linux-low: Include btrace-common.h.
5673 (linux_low_read_btrace): Use struct btrace_data. Call
5674 btrace_data_init and btrace_data_fini.
5676 2015-02-06 Pedro Alves <palves@redhat.com>
5678 * thread-db.c (find_new_threads_callback): Add debug output.
5680 2015-02-04 Pedro Alves <palves@redhat.com>
5682 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5683 (resume_stopped_resumed_lwps): New function.
5684 (linux_wait_for_event_filtered): Use it.
5686 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5688 * Makefile.in (SFILES): Add linux-personality.c.
5689 (linux-personality.o): New rule.
5690 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5691 list of objects to be built.
5692 * linux-low.c: Include nat/linux-personality.h.
5693 (linux_create_inferior): Remove code to disable address space
5694 randomization (moved to ../nat/linux-personality.c). Create
5695 cleanup to disable address space randomization.
5697 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5699 * Makefile.in (posix-strerror.o): New rule.
5700 (mingw-strerror.o): Likewise.
5701 * configure: Regenerated.
5702 * configure.ac: Source file ../common/common.host. Initialize new
5703 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5705 2015-01-14 Yao Qi <yao@codesourcery.com>
5707 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5708 (ppc-linux.o): New rule.
5709 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5710 * configure.ac: AC_CHECK_FUNCS(getauxval).
5711 * config.in: Re-generated.
5712 * configure: Re-generated.
5713 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5714 ppc64_64bit_inferior_p
5716 2015-01-14 Yao Qi <yao@codesourcery.com>
5718 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5719 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5720 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5721 (PT_ORIG_R3, PT_TRAP): Likewise.
5722 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5723 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5724 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5726 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5728 * i387-fp.c (i387_cache_to_xsave): In look over
5729 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5730 zmmh_low_space field by use of zmmh_high_space.
5732 2015-01-09 Pedro Alves <palves@redhat.com>
5734 * linux-low.c (step_over_bkpt): Move higher up in the file.
5735 (handle_extended_wait): Don't store the stop_pc here.
5736 (get_stop_pc): Adjust comments and rename to ...
5737 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5738 stopped for a software breakpoint or hardware breakpoint.
5739 (thread_still_has_status_pending_p): New function.
5740 (status_pending_p_callback): Use
5741 thread_still_has_status_pending_p. If the event is no longer
5742 interesting, resume the LWP.
5743 (handle_tracepoints): Add assert.
5744 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5745 (wstatus_maybe_breakpoint): New function.
5746 (cancel_breakpoint): Delete function.
5747 (check_stopped_by_watchpoint): New function, factored out from
5748 linux_low_filter_event.
5749 (lp_status_maybe_breakpoint): Delete function.
5750 (linux_low_filter_event): Remove filter_ptid argument.
5751 Leave thread group exits pending here. Store the LWP's stop PC.
5752 Always leave events pending.
5753 (linux_wait_for_event_filtered): Pull all events out of the
5754 kernel, and leave them all pending.
5755 (count_events_callback, select_event_lwp_callback): Consider all
5757 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5758 (select_event_lwp): Only give preference to the stepping LWP in
5759 all-stop mode. Adjust comments.
5760 (ignore_event): New function.
5761 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5762 references to cancel_breakpoints. Adjust to renames. Also give
5763 equal priority to all LWPs that have had events in non-stop mode.
5764 If reporting a software breakpoint event, unadjust the LWP's PC.
5765 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5766 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5768 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5769 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5770 (linux_stopped_by_watchpoint): Adjust.
5771 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5772 * linux-low.h (enum lwp_stop_reason): New.
5773 (struct lwp_info) <stop_pc>: Adjust comment.
5774 <stopped_by_watchpoint>: Delete field.
5775 <stop_reason>: New field.
5776 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5777 * mem-break.c (software_breakpoint_inserted_here)
5778 (hardware_breakpoint_inserted_here): New function.
5779 * mem-break.h (software_breakpoint_inserted_here)
5780 (hardware_breakpoint_inserted_here): Declare.
5781 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5782 (cancel_breakpoints): Delete.
5783 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5784 (upload_fast_traceframes): Remove references to
5787 2015-01-09 Pedro Alves <palves@redhat.com>
5789 * thread-db.c (find_new_threads_callback): Ignore thread if the
5790 kernel thread ID is -1.
5792 2015-01-09 Pedro Alves <palves@redhat.com>
5794 * linux-low.c (linux_attach_fail_reason_string): Move to
5795 nat/linux-ptrace.c, and rename.
5796 (linux_attach_lwp): Update comment.
5797 (attach_proc_task_lwp_callback): New function.
5798 (linux_attach): Adjust to rename and use
5799 linux_proc_attach_tgid_threads.
5800 (linux_attach_fail_reason_string): Delete declaration.
5802 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5804 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5805 * server.c (gdbserver_version): Likewise.
5807 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5809 * remote-utils.c: Include ctype.h.
5810 (input_interrupt): Explicitly handle the case when the char
5811 received is the NUL byte. Improve the printing of non-ASCII
5814 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5816 * linux-low.c (linux_low_filter_event): Update call to
5817 linux_enable_event_reporting following the addition of
5818 a new parameter to that function.
5820 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5823 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5824 (AARCH64_FPCR_REGNO): Likewise.
5825 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5826 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5827 (aarch64_store_fpregset): Likewise.
5829 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5831 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5832 Remove FIXME comment about assumption about N.
5834 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5836 * configure.ac: If large-file support is disabled in GDBserver,
5837 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5838 * configure: Regenerate.
5840 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5842 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5843 warning upon ENODATA from ptrace.
5844 * linux-s390-low.c (s390_store_tdb): New.
5845 (s390_regsets): Add regset for NT_S390_TDB.
5847 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5849 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5850 without a fill_function.
5851 * linux-s390-low.c (s390_fill_last_break): Remove.
5852 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5853 (s390_arch_setup): Use regset's size instead of fill_function for
5856 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5858 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5859 the regset's store function when ptrace returned an error.
5860 * regcache.c (get_thread_regcache): Invalidate register cache
5861 before fetching inferior's registers.
5863 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5865 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5866 while-loop as for-loop.
5867 (regsets_store_inferior_registers): Likewise.
5869 2014-11-28 Yao Qi <yao@codesourcery.com>
5871 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5872 * config.in, configure: Re-generate.
5873 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5876 2014-11-21 Yao Qi <yao@codesourcery.com>
5878 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5879 (AC_CHECK_HEADERS): Remove malloc.h.
5880 * configure: Re-generated.
5881 * config.in: Re-generated.
5882 * server.h: Don't include alloca.h and malloc.h.
5883 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5884 Don't include malloc.h.
5886 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5888 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5889 corresponding ERRNO check in same block.
5891 2014-11-12 Pedro Alves <palves@redhat.com>
5893 * server.c (cont_thread): Update comment.
5894 (start_inferior, attach_inferior): No longer clear cont_thread.
5895 (handle_v_cont): No longer set cont_thread.
5896 (captured_main): Clear cont_thread each time a GDB connects.
5898 2014-11-12 Pedro Alves <palves@redhat.com>
5900 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5901 thread, and don't resume all threads if the Hc thread has exited.
5903 2014-11-12 Pedro Alves <palves@redhat.com>
5905 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5906 the process group instead of to a specific LWP.
5908 2014-10-15 Pedro Alves <palves@redhat.com>
5911 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5913 (arm_set_thread_context): Delete.
5914 (the_low_target): Adjust.
5915 * win32-i386-low.c (debug_registers_changed)
5916 (debug_registers_used): Delete.
5917 (update_debug_registers_callback): New function.
5918 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5919 needing to update their debug registers.
5920 (win32_get_current_dr): New function.
5921 (x86_dr_low_get_addr, x86_dr_low_get_control)
5922 (x86_dr_low_get_status): Fetch the debug register from the thread
5924 (i386_initial_stuff): Adjust.
5925 (i386_get_thread_context): Remove current_event parameter. Don't
5926 clear debug_registers_changed nor copy DR values to
5928 (i386_set_thread_context): Delete.
5929 (i386_prepare_to_resume): New function.
5930 (i386_thread_added): Mark the thread as needing to update irs
5932 (the_low_target): Remove i386_set_thread_context and install
5933 i386_prepare_to_resume.
5934 * win32-low.c (win32_get_thread_context): Adjust.
5935 (win32_set_thread_context): Use SetThreadContext
5937 (win32_prepare_to_resume): New function.
5938 (win32_require_context): New function, factored out from ...
5939 (thread_rec): ... this.
5940 (continue_one_thread): Call win32_prepare_to_resume on each thread
5941 we're about to continue.
5942 (win32_resume): Call win32_prepare_to_resume on the event thread.
5943 * win32-low.h (struct win32_thread_info)
5944 <debug_registers_changed>: New field.
5945 (struct win32_target_ops): Change prototype of set_thread_context,
5946 delete set_thread_context and add prepare_to_resume.
5947 (win32_require_context): New declaration.
5949 2014-10-08 Gary Benson <gbenson@redhat.com>
5951 * server.h: Do not include common-exceptions.h.
5953 2014-10-08 Gary Benson <gbenson@redhat.com>
5955 * server.h: Do not include cleanups.h.
5957 2014-09-30 James Hogan <james.hogan@imgtec.com>
5959 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5962 2014-09-23 Yao Qi <yao@codesourcery.com>
5964 * linux-low.c (lp_status_maybe_breakpoint): New function.
5965 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5966 (count_events_callback): Likewise.
5967 (select_event_lwp_callback): Likewise.
5968 (cancel_breakpoints_callback): Likewise.
5970 2014-09-19 Don Breazeal <donb@codesourcery.com>
5972 * linux-low.c (handle_extended_wait): Call
5973 linux_ptrace_get_extended_event.
5974 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5975 linux_is_extended_waitstatus.
5977 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5979 * Makefile.in (CPPFLAGS): Define.
5980 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5981 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5983 2014-09-16 Gary Benson <gbenson@redhat.com>
5985 * inferiors.h (current_inferior): Renamed as...
5986 (current_thread): New variable. All uses updated.
5987 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5988 (maybe_move_out_of_jump_pad): Likewise.
5989 (cancel_breakpoint): Likewise.
5990 (linux_low_filter_event): Likewise.
5991 (wait_for_sigstop): Likewise.
5992 (linux_resume_one_lwp): Likewise.
5993 (need_step_over_p): Likewise.
5994 (start_step_over): Likewise.
5995 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5996 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5997 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5998 and save_inferior as saved_thread.
5999 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6001 (regcache_invalidate_thread): Likewise.
6002 * remote-utils.c (prepare_resume_reply): Likewise.
6003 * thread-db.c (thread_db_get_tls_address): Likewise.
6004 (disable_thread_event_reporting): Likewise.
6005 (remove_thread_event_breakpoints): Likewise.
6006 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6008 * target.h (set_desired_inferior): Renamed as...
6009 (set_desired_thread): New declaration. All uses updated.
6010 * server.c (myresume): Updated comment to reference thread instead
6012 (handle_serial_event): Likewise.
6013 (handle_target_event): Likewise.
6015 2014-09-12 Tom Tromey <tromey@redhat.com>
6016 Gary Benson <gbenson@redhat.com>
6018 * regcache.h: Include common-regcache.h.
6019 (regcache_read_pc): Don't declare.
6020 * regcache.c (get_thread_regcache_for_ptid): New function.
6022 2014-09-11 Tom Tromey <tromey@redhat.com>
6023 Gary Benson <gbenson@redhat.com>
6025 * symbol.c: New file.
6026 * Makefile.in (SFILES): Add symbol.c.
6027 (OBS): Add symbol.o.
6029 2014-09-11 Gary Benson <gbenson@redhat.com>
6031 * target.c (target_stop_ptid, target_continue_ptid): New
6034 2014-09-11 Tom Tromey <tromey@redhat.com>
6035 Gary Benson <gbenson@redhat.com>
6037 * target.h: Include target/target.h.
6038 * target.c (target_read_memory, target_read_uint32)
6039 (target_write_memory): New functions.
6041 2014-09-11 Gary Benson <gbenson@redhat.com>
6043 * server.h (debug_hw_points): Don't declare.
6044 * server.c (debug_hw_points): Don't define. Replace all uses
6045 with show_debug_regs.
6046 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6047 all uses with show_debug_regs.
6049 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6051 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6052 endianness into account.
6053 (ppc_supply_ptrace_register): Likewise.
6055 2014-09-03 James Hogan <james.hogan@imgtec.com>
6057 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6058 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6060 2014-09-03 Gary Benson <gbenson@redhat.com>
6062 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6063 ALL_DEBUG_ADDRESS_REGISTERS.
6065 2014-09-02 Gary Benson <gbenson@redhat.com>
6067 * i386-low.h: Renamed as...
6068 * x86-low.h: New file. All type, function and variable name
6069 prefixes changed from "i386_" to "x86_". All references updated.
6070 * i386-low.c: Renamed as...
6071 * x86-low.c: New file. All type, function and variable name
6072 prefixes changed from "i386_" to "x86_". All references updated.
6074 2014-09-02 Gary Benson <gbenson@redhat.com>
6076 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6077 (x86_linux_new_thread): Likewise.
6079 2014-08-29 Gary Benson <gbenson@redhat.com>
6081 * server.h (setjmp.h): Do not include.
6082 (toplevel): Do not declare.
6083 (common-exceptions.h): Include.
6084 (cleanups.h): Likewise.
6085 * server.c (toplevel): Do not define.
6086 (exit_code): New static global.
6087 (detach_or_kill_for_exit_cleanup): New function.
6088 (main): New function. Original main renamed to...
6089 (captured_main): New function.
6090 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6092 2014-08-29 Gary Benson <gbenson@redhat.com>
6094 * Makefile.in (SFILES): Add common/common-exceptions.c.
6095 (OBS): Add common-exceptions.o.
6096 (common-exceptions.o): New rule.
6097 * utils.c (prepare_to_throw_exception): New function.
6099 2014-08-29 Gary Benson <gbenson@redhat.com>
6101 * config.in: Regenerate.
6102 * configure: Likewise.
6104 2014-08-29 Gary Benson <gbenson@redhat.com>
6106 * Makefile.in (SFILES): Add common/cleanups.c.
6108 (cleanups.o): New rule.
6110 2014-08-29 Gary Benson <gbenson@redhat.com>
6112 * utils.c (internal_vwarning): New function.
6114 2014-08-28 Gary Benson <gbenson@redhat.com>
6116 * utils.h (fatal): Remove declaration.
6117 * utils.c (fatal): Remove function.
6119 2014-08-28 Gary Benson <gbenson@redhat.com>
6121 * tracepoint.c (gdb_agent_init): Replace fatal with
6123 (initialize_tracepoint): Likewise.
6125 2014-08-28 Gary Benson <gbenson@redhat.com>
6127 * remote-utils.c (remote_prepare): Replace fatal with error.
6129 2014-08-28 Gary Benson <gbenson@redhat.com>
6131 * linux-low.c (linux_async): Replace fatal with warning.
6133 (linux_start_non_stop): Return -1 if linux_async failed.
6135 2014-08-28 Gary Benson <gbenson@redhat.com>
6137 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6139 (i386_dr_low_get_addr): Remove vague comment.
6140 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6143 2014-08-28 Gary Benson <gbenson@redhat.com>
6145 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6146 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6148 (linux_resume_one_lwp): Likewise.
6149 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6151 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6152 with internal_error.
6153 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6154 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6155 (find_register_by_name): Replace fatal with internal_error.
6156 (find_regno): Likewise.
6157 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6158 * thread-db.c (thread_db_create_event): Likewise.
6159 (thread_db_load_search): Likewise.
6160 (try_thread_db_load_1): Likewise.
6161 * tracepoint.c (get_jump_space_head): Replace fatal with
6163 (claim_trampoline_space): Likewise.
6164 (have_fast_tracepoint_trampoline_buffer): Likewise.
6165 (cmd_qtstart): Likewise.
6166 (stop_tracing): Likewise.
6167 (fast_tracepoint_collecting): Likewise.
6168 (target_malloc): Likewise.
6169 (download_tracepoint): Likewise.
6170 (download_trace_state_variables): Replace check with gdb_assert.
6171 (upload_fast_traceframes): Replace fatal with internal_error.
6173 2014-08-19 Tom Tromey <tromey@redhat.com>
6174 Gary Benson <gbenson@redhat.com>
6176 * Makefile.in (SFILES): Add common/common-debug.c.
6177 (OBS): Add common-debug.o.
6178 (common-debug.o): New rule.
6179 * debug.h (debug_printf): Don't declare.
6180 * debug.c (debug_printf): Renamed and rewritten as...
6181 (debug_vprintf): New function.
6183 2014-08-19 Gary Benson <gbenson@redhat.com>
6185 * utils.h: Do not include print-utils.h.
6187 2014-08-19 Tom Tromey <tromey@redhat.com>
6188 Gary Benson <gbenson@redhat.com>
6190 * server.h: Add static assertion.
6191 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6193 2014-08-19 Tom Tromey <tromey@redhat.com>
6194 Gary Benson <gbenson@redhat.com>
6196 * Makefile.in (SFILES): Add common/errors.c.
6197 (OBS): Add errors.o.
6198 (IPA_OBS): Add errors-ipa.o.
6199 (errors.o): New rule.
6200 (errors-ipa.o): Likewise.
6201 * utils.h (perror_with_name, error, warning): Don't declare.
6202 * utils.c (warning): Renamed and rewritten as...
6203 (vwarning): New function.
6204 (error): Renamed and rewritten as...
6205 (verror): New function.
6206 (internal_error): Renamed and rewritten as...
6207 (internal_verror): New function.
6209 2014-08-07 Gary Benson <gbenson@redhat.com>
6211 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6212 * configure: Regenerate.
6213 * config.in: Likewise.
6214 * server.h: Do not include errno.h.
6215 * event-loop.c: Likewise.
6216 * hostio-errno.c: Likewise.
6217 * linux-low.c: Likewise.
6218 * remote-utils.c: Likewise.
6219 * spu-low.c: Likewise.
6220 * utils.c: Likewise.
6221 * gdbreplay.c: Unconditionally include errno.h.
6223 2014-08-07 Gary Benson <gbenson@redhat.com>
6225 * server.h: Do not include string.h.
6226 * event-loop.c: Likewise.
6227 * linux-low.c: Likewise.
6228 * regcache.c: Likewise.
6229 * remote-utils.c: Likewise.
6230 * spu-low.c: Likewise.
6231 * utils.c: Likewise.
6233 2014-08-07 Gary Benson <gbenson@redhat.com>
6235 * server.h: Do not include gdb_assert.h.
6237 2014-08-07 Gary Benson <gbenson@redhat.com>
6239 * server.h: Do not include common-utils.h.
6241 2014-08-07 Gary Benson <gbenson@redhat.com>
6243 * server.h: Do not include ptid.h.
6244 * notif.h: Likewise.
6246 2014-08-07 Gary Benson <gbenson@redhat.com>
6248 * server.h: Do not include gdb_locale.h.
6250 2014-08-07 Gary Benson <gbenson@redhat.com>
6252 * server.h: Do not include gdb/signals.h.
6253 * win32-low.c: Likewise.
6255 2014-08-07 Gary Benson <gbenson@redhat.com>
6257 * server.h: Do not include pathmax.h.
6259 2014-08-07 Gary Benson <gbenson@redhat.com>
6261 * server.h: Do not include libiberty.h.
6262 * linux-bfin-low.c: Likewise.
6264 2014-08-07 Gary Benson <gbenson@redhat.com>
6266 * server.h: Do not include ansidecl.h.
6268 2014-08-07 Gary Benson <gbenson@redhat.com>
6270 * linux-x86-low.c: Do not include stddef.h.
6271 * lynx-ppc-low.c: Likewise.
6272 * tracepoint.c: Likewise.
6274 2014-08-07 Gary Benson <gbenson@redhat.com>
6276 * server.h: Do not include stdarg.h.
6277 * nto-low.c: Likewise.
6279 2014-08-07 Gary Benson <gbenson@redhat.com>
6281 * server.h: Do not include stdlib.h.
6282 * inferiors.c: Likewise.
6283 * linux-low.c: Likewise.
6284 * regcache.c: Likewise.
6285 * spu-low.c: Likewise.
6286 * tracepoint.c: Likewise.
6287 * utils.c: Likewise.
6289 2014-08-07 Gary Benson <gbenson@redhat.com>
6291 * server.h: Do not include stdio.h.
6292 * linux-low.c: Likewise.
6293 * remote-utils.c: Likewise.
6294 * spu-low.c: Likewise.
6295 * utils.c: Likewise.
6296 * wincecompat.c: Likewise.
6298 2014-08-06 Gary Benson <gbenson@redhat.com>
6300 * regcache.c (init_register_cache): Move conditionals inside if.
6302 2014-08-06 Gary Benson <gbenson@redhat.com>
6304 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6306 2014-07-31 Gary Benson <gbenson@redhat.com>
6308 * ax.h: Do not include server.h.
6309 * gdbthread.h: Likewise.
6310 * lynx-low.h: Likewise.
6311 * notif.h: Likewise.
6313 2014-07-30 Gary Benson <gbenson@redhat.com>
6315 * server.h: Include common-defs.h.
6316 Do not include config.h or build-gnulib-gdbserver/config.h.
6318 2014-07-30 Gary Benson <gbenson@redhat.com>
6320 * hostio-errno.c: Move server.h to top of includes list.
6321 * inferiors.c: Likewise.
6322 * linux-x86-low.c: Likewise.
6323 * notif.c: Include server.h.
6325 2014-07-24 Tom Tromey <tromey@redhat.com>
6326 Gary Benson <gbenson@redhat.com>
6328 * server.h (CORE_ADDR): Now unsigned.
6330 2014-07-16 Pedro Alves <palves@redhat.com>
6332 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6334 2014-07-15 Pedro Alves <palves@redhat.com>
6336 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6339 2014-07-11 Pedro Alves <palves@redhat.com>
6341 * linux-low.c (kill_wait_lwp): New function, based on
6342 kill_one_lwp_callback, but use my_waitpid directly.
6343 (kill_one_lwp_callback, linux_kill): Use it.
6345 2014-06-23 Pedro Alves <palves@redhat.com>
6347 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6348 before setting DR0..DR3.
6350 2014-06-20 Gary Benson <gbenson@redhat.com>
6352 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6353 * configure: Regenerated.
6354 * config.in: Likewise.
6356 2014-06-20 Gary Benson <gbenson@redhat.com>
6358 * Makefile.in (SFILES): Update locations for files moved
6360 (object file files): Reordered.
6362 2014-06-20 Gary Benson <gbenson@redhat.com>
6364 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6365 (i386_dr_low_set_addr): Likewise.
6366 (i386_dr_low_get_addr): Likewise.
6367 (i386_dr_low_can_set_control): Likewise.
6368 (i386_dr_low_set_control): Likewise.
6369 (i386_dr_low_get_control): Likewise.
6370 (i386_dr_low_get_status): Likewise.
6371 (i386_get_debug_register_length): Likewise.
6372 * linux-x86-low.c (i386_dr_low_set_addr):
6373 Changed signature. Made static.
6374 (i386_dr_low_get_addr): Likewise.
6375 (i386_dr_low_set_control): Likewise.
6376 (i386_dr_low_get_control): Likewise.
6377 (i386_dr_low_get_status): Likewise.
6378 (i386_dr_low): New global variable.
6379 * win32-i386-low.c (i386_dr_low_set_addr):
6380 Changed signature. Made static.
6381 (i386_dr_low_get_addr): Likewise.
6382 (i386_dr_low_set_control): Likewise.
6383 (i386_dr_low_get_control): Likewise.
6384 (i386_dr_low_get_status): Likewise.
6385 (i386_dr_low): New global variable.
6387 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6389 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6390 * Makefile.in (AR, AR_FLAGS): Define.
6391 * configure: Regenerate.
6393 2014-06-19 Gary Benson <gbenson@redhat.com>
6395 * Makefile.in (i386-dregs.o): New rule.
6396 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6397 * i386-low.c (target.h): Remove include.
6398 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6399 (DR_CONTROL_SHIFT): Likewise.
6400 (DR_CONTROL_SIZE): Likewise.
6401 (DR_RW_EXECUTE): Likewise.
6402 (DR_RW_WRITE): Likewise.
6403 (DR_RW_READ): Likewise.
6404 (DR_RW_IORW): Likewise.
6405 (DR_LEN_1): Likewise.
6406 (DR_LEN_2): Likewise.
6407 (DR_LEN_4): Likewise.
6408 (DR_LEN_8): Likewise.
6409 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6410 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6411 (DR_ENABLE_SIZE): Likewise.
6412 (DR_LOCAL_SLOWDOWN): Likewise.
6413 (DR_GLOBAL_SLOWDOWN): Likewise.
6414 (DR_CONTROL_RESERVED): Likewise.
6415 (I386_DR_CONTROL_MASK): Likewise.
6416 (I386_DR_VACANT): Likewise.
6417 (I386_DR_LOCAL_ENABLE): Likewise.
6418 (I386_DR_GLOBAL_ENABLE): Likewise.
6419 (I386_DR_DISABLE): Likewise.
6420 (I386_DR_SET_RW_LEN): Likewise.
6421 (I386_DR_GET_RW_LEN): Likewise.
6422 (I386_DR_WATCH_HIT): Likewise.
6423 (i386_wp_op_t): Likewise.
6424 (i386_show_dr): Likewise.
6425 (i386_length_and_rw_bits): Likewise.
6426 (i386_insert_aligned_watchpoint): Likewise.
6427 (i386_remove_aligned_watchpoint): Likewise.
6428 (i386_handle_nonaligned_watchpoint): Likewise.
6429 i386_update_inferior_debug_regs(): Likewise.
6430 (i386_dr_insert_watchpoint): Likewise.
6431 (i386_dr_remove_watchpoint): Likewise.
6432 (i386_dr_region_ok_for_watchpoint): Likewise.
6433 (i386_dr_stopped_data_address): Likewise.
6434 (i386_dr_stopped_by_watchpoint): Likewise.
6436 2014-06-19 Gary Benson <gbenson@redhat.com>
6438 * i386-low.c (i386_dr_show): Renamed to
6439 i386_show_dr and made static. All uses updated.
6440 (i386_dr_length_and_rw_bits): Renamed to
6441 i386_length_and_rw_bits and made static.
6443 (i386_dr_insert_aligned_watchpoint): Renamed to
6444 i386_insert_aligned_watchpoint and made static.
6446 (i386_dr_remove_aligned_watchpoint): Renamed to
6447 i386_remove_aligned_watchpoint and made static.
6449 (i386_dr_update_inferior_debug_regs): Renamed to
6450 i386_update_inferior_debug_regs and made static.
6453 2014-06-18 Gary Benson <gbenson@redhat.com>
6455 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6456 (i386_dr_low_can_set_control): Likewise.
6457 (i386_get_debug_register_length): Likewise.
6458 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6459 (i386_dr_low_can_set_control): Likewise.
6460 (i386_get_debug_register_length): Likewise.
6462 2014-06-17 Gary Benson <gbenson@redhat.com>
6464 * i386-low.h (i386-dregs.h): New include.
6465 (DR_FIRSTADDR): Now in i386-dregs.h.
6466 (DR_LASTADDR): Likewise.
6467 (DR_NADDR): Likewise.
6468 (DR_STATUS): Likewise.
6469 (DR_CONTROL): Likewise.
6470 (i386_debug_reg_state): Likewise.
6471 (i386_dr_insert_watchpoint): Likewise.
6472 (i386_dr_remove_watchpoint): Likewise.
6473 (i386_dr_region_ok_for_watchpoint): Likewise.
6474 (i386_dr_stopped_data_address): Likewise.
6475 (i386_dr_stopped_by_watchpoint): Likewise.
6476 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6478 2014-06-18 Gary Benson <gbenson@redhat.com>
6480 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6481 i386_dr_insert_watchpoint.
6482 (i386_low_remove_watchpoint): Renamed to
6483 i386_dr_remove_watchpoint.
6484 (i386_low_region_ok_for_watchpoint): Renamed to
6485 i386_dr_region_ok_for_watchpoint.
6486 (i386_low_stopped_data_address): Renamed to
6487 i386_dr_stopped_data_address.
6488 (i386_low_stopped_by_watchpoint): Renamed to
6489 i386_dr_stopped_by_watchpoint.
6490 * i386-low.c (i386_show_dr): Renamed to
6491 i386_dr_show and made nonstatic. All uses updated.
6492 (i386_length_and_rw_bits): Renamed to
6493 i386_dr_length_and_rw_bits and made nonstatic.
6495 (i386_insert_aligned_watchpoint): Renamed to
6496 i386_dr_insert_aligned_watchpoint and made nonstatic.
6498 (i386_remove_aligned_watchpoint): Renamed to
6499 i386_dr_remove_aligned_watchpoint and made nonstatic.
6501 (i386_update_inferior_debug_regs): Renamed to
6502 i386_dr_update_inferior_debug_regs and made nonstatic.
6504 (i386_low_insert_watchpoint): Renamed to
6505 i386_dr_insert_watchpoint. All uses updated.
6506 (i386_low_remove_watchpoint): Renamed to
6507 i386_dr_remove_watchpoint. All uses updated.
6508 (i386_low_region_ok_for_watchpoint): Renamed to
6509 i386_dr_region_ok_for_watchpoint. All uses updated.
6510 (i386_low_stopped_data_address): Renamed to
6511 i386_dr_stopped_data_address. All uses updated.
6512 (i386_low_stopped_by_watchpoint): Renamed to
6513 i386_dr_stopped_by_watchpoint. All uses updated.
6515 2014-06-18 Gary Benson <gbenson@redhat.com>
6517 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6518 (i386_dr_low_can_set_control): Likewise.
6519 (i386_insert_aligned_watchpoint): New check.
6521 2014-06-18 Gary Benson <gbenson@redhat.com>
6523 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6526 2014-06-18 Gary Benson <gbenson@redhat.com>
6528 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6529 instead of fatal and error.
6530 (i386_handle_nonaligned_watchpoint): Likewise.
6532 2014-06-18 Gary Benson <gbenson@redhat.com>
6534 * i386-low.c (i386_get_debug_register_length): New macro.
6535 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6536 (i386_show_dr): Use debug_printf instead of fprintf. Use
6537 phex to format values.
6539 2014-06-18 Gary Benson <gbenson@redhat.com>
6541 * i386-low.h: Comment changes.
6542 * i386-low.c: Likewise.
6544 2014-06-18 Gary Benson <gbenson@redhat.com>
6546 * i386-low.c: Whitespace changes.
6548 2014-06-12 Tom Tromey <tromey@redhat.com>
6550 * utils.c (freeargv): Remove.
6552 2014-06-12 Tom Tromey <tromey@redhat.com>
6554 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6555 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6556 (parse_debug_format_options): Likewise.
6557 (gdbserver_usage): Likewise.
6558 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6559 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6560 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6562 ($(LIBGNU)): Depend on libiberty.
6563 (all-lib): Recurse into all subdirs.
6564 (install-only): Invoke "install" target in subdirs.
6565 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6567 * configure: Rebuild.
6568 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6569 for vasprintf, vsnprintf, or gettimeofday.
6570 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6573 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6575 * development.sh: Delete.
6576 * Makefile.in (config.status): Adjust dependency on development.sh.
6577 * configure.ac: Adjust development.sh source call.
6578 * configure: Regenerate.
6580 2014-06-02 Pedro Alves <palves@redhat.com>
6582 * ax.c (gdb_free_agent_expr): New function.
6583 * ax.h (gdb_free_agent_expr): New declaration.
6584 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6586 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6588 (clear_breakpoint_conditions_and_commands): New function.
6589 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6590 (clear_breakpoint_conditions_and_commands): New declaration.
6592 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6594 * linux-aarch64-low.c (asm/ptrace.h): Include.
6596 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6598 Fix TLS access for -static -pthread.
6599 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6600 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6601 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6603 2014-05-20 Pedro Alves <palves@redhat.com>
6605 * linux-aarch64-low.c (aarch64_insert_point)
6606 (aarch64_remove_point): No longer check whether the type is
6607 supported here. Adjust to new interface.
6608 (the_low_target): Install aarch64_supports_z_point_type as
6609 supports_z_point_type method.
6610 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6611 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6612 instead of a Z packet char. Adjust.
6613 (arm_supports_z_point_type): New function.
6614 (arm_insert_point, arm_remove_point): Adjust to new interface.
6615 (the_low_target): Install arm_supports_z_point_type.
6616 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6617 (cris_insert_point, cris_remove_point): Adjust to new interface.
6618 Don't check whether the type is supported here.
6619 (the_low_target): Install cris_supports_z_point_type.
6620 * linux-low.c (linux_supports_z_point_type): New function.
6621 (linux_insert_point, linux_remove_point): Adjust to new interface.
6622 * linux-low.h (struct linux_target_ops) <insert_point,
6623 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6624 raw_breakpoint pointer parameter.
6625 <supports_z_point_type>: New method.
6626 * linux-mips-low.c (mips_supports_z_point_type): New function.
6627 (mips_insert_point, mips_remove_point): Adjust to new interface.
6628 Use mips_supports_z_point_type.
6629 (the_low_target): Install mips_supports_z_point_type.
6630 * linux-ppc-low.c (the_low_target): Install NULL as
6631 supports_z_point_type method.
6632 * linux-s390-low.c (the_low_target): Install NULL as
6633 supports_z_point_type method.
6634 * linux-sparc-low.c (the_low_target): Install NULL as
6635 supports_z_point_type method.
6636 * linux-x86-low.c (x86_supports_z_point_type): New function.
6637 (x86_insert_point): Adjust to new insert_point interface. Use
6638 insert_memory_breakpoint. Adjust to new
6639 i386_low_insert_watchpoint interface.
6640 (x86_remove_point): Adjust to remove_point interface. Use
6641 remove_memory_breakpoint. Adjust to new
6642 i386_low_remove_watchpoint interface.
6643 (the_low_target): Install x86_supports_z_point_type.
6644 * lynx-low.c (lynx_target_ops): Install NULL as
6645 supports_z_point_type callback.
6646 * nto-low.c (nto_supports_z_point_type): New.
6647 (nto_insert_point, nto_remove_point): Adjust to new interface.
6648 (nto_target_ops): Install nto_supports_z_point_type.
6649 * mem-break.c: Adjust intro comment.
6650 (struct raw_breakpoint) <raw_type, size>: New fields.
6651 <inserted>: Update comment.
6652 <shlib_disabled>: Delete field.
6653 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6654 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6655 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6656 (raw_bkpt_type_to_target_hw_bp_type): New function.
6657 (find_enabled_raw_code_breakpoint_at): New function.
6658 (find_raw_breakpoint_at): New type and size parameters. Use them.
6659 (insert_memory_breakpoint): New function, based off
6660 set_raw_breakpoint_at.
6661 (remove_memory_breakpoint): New function.
6662 (set_raw_breakpoint_at): Reimplement.
6663 (set_breakpoint): New, based on set_breakpoint_at.
6664 (set_breakpoint_at): Reimplement.
6665 (delete_raw_breakpoint): Go through the_target->remove_point
6666 instead of assuming memory breakpoints.
6667 (find_gdb_breakpoint_at): Delete.
6668 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6669 (find_gdb_breakpoint): New function.
6670 (set_gdb_breakpoint_at): Delete.
6671 (z_type_supported): New function.
6672 (set_gdb_breakpoint_1): New function, loosely based off
6673 set_gdb_breakpoint_at.
6674 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6675 (delete_gdb_breakpoint_at): Delete.
6676 (delete_gdb_breakpoint_1): New function, loosely based off
6677 delete_gdb_breakpoint_at.
6678 (delete_gdb_breakpoint): New function.
6679 (clear_gdb_breakpoint_conditions): Rename to ...
6680 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6682 (add_condition_to_breakpoint): Make static.
6683 (add_breakpoint_condition): Take a struct breakpoint pointer
6684 instead of an address. Adjust.
6685 (gdb_condition_true_at_breakpoint): Rename to ...
6686 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6688 (gdb_condition_true_at_breakpoint): Reimplement.
6689 (add_breakpoint_commands): Take a struct breakpoint pointer
6690 instead of an address. Adjust.
6691 (gdb_no_commands_at_breakpoint): Rename to ...
6692 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6693 parameter. Return true if no breakpoint was found. Change debug
6695 (gdb_no_commands_at_breakpoint): Reimplement.
6696 (run_breakpoint_commands): Rename to ...
6697 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6698 and change return type to boolean.
6699 (run_breakpoint_commands): New function.
6700 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6701 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6702 breakpoint. Go through the_target->remove_point instead of
6703 assuming memory breakpoint.
6704 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6705 software and hardware breakpoints.
6706 (reinsert_raw_breakpoint): Go through the_target->insert_point
6707 instead of assuming memory breakpoint.
6708 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6709 software and hardware breakpoints.
6710 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6711 Check both software and hardware breakpoints.
6712 (validate_inserted_breakpoint): Assert the breakpoint is a
6713 software breakpoint. Set the inserted flag to -1 instead of
6714 setting shlib_disabled.
6715 (delete_disabled_breakpoints): Adjust.
6716 (validate_breakpoints): Only validate software breakpoints.
6717 Adjust to inserted flag change.
6718 (check_mem_read, check_mem_write): Skip breakpoint types other
6719 than software breakpoints. Adjust to inserted flag change.
6720 * mem-break.h (enum raw_bkpt_type): New enum.
6721 (raw_breakpoint, struct process_info): Forward declare.
6722 (Z_packet_to_target_hw_bp_type): Delete declaration.
6723 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6724 (set_gdb_breakpoint, delete_gdb_breakpoint)
6725 (clear_breakpoint_conditions): New declarations.
6726 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6727 (breakpoint_inserted_here): Update comment.
6728 (add_breakpoint_condition, add_breakpoint_commands): Replace
6729 address parameter with a breakpoint pointer parameter.
6730 (gdb_breakpoint_here): Update comment.
6731 (delete_gdb_breakpoint_at): Delete.
6732 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6733 * server.c (process_point_options): Take a struct breakpoint
6734 pointer instead of an address. Adjust.
6735 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6736 delete_gdb_breakpoint.
6737 * spu-low.c (spu_target_ops): Install NULL as
6738 supports_z_point_type method.
6739 * target.h: Include mem-break.h.
6740 (struct target_ops) <prepare_to_access_memory>: Update comment.
6741 <supports_z_point_type>: New field.
6742 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6743 instead of a char. Also take a raw breakpoint pointer.
6744 * win32-arm-low.c (the_low_target): Install NULL as
6745 supports_z_point_type.
6746 * win32-i386-low.c (i386_supports_z_point_type): New function.
6747 (i386_insert_point, i386_remove_point): Adjust to new interface.
6748 (the_low_target): Install i386_supports_z_point_type.
6749 * win32-low.c (win32_supports_z_point_type): New function.
6750 (win32_insert_point, win32_remove_point): Adjust to new interface.
6751 (win32_target_ops): Install win32_supports_z_point_type.
6752 * win32-low.h (struct win32_target_ops):
6753 <supports_z_point_type>: New method.
6754 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6755 instead of a char. Also take a raw breakpoint pointer.
6757 2014-05-20 Pedro Alves <palves@redhat.com>
6759 * mem-break.h: Include break-common.h.
6760 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6761 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6762 (Z_packet_to_target_hw_bp_type): New declaration.
6763 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6764 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6765 (Z_PACKET_ACCESS_WP): Delete macros.
6766 (Z_packet_to_hw_type): Delete function.
6767 * i386-low.h: Don't include break-common.h here.
6768 (Z_packet_to_hw_type): Delete declaration.
6769 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6770 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6771 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6772 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6773 * linux-aarch64-low.c: Don't include break-common.h here.
6774 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6775 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6776 (Z_packet_to_target_hw_bp_type): Delete function.
6777 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6779 (mips_insert_point, mips_remove_point): Use
6780 Z_packet_to_target_hw_bp_type.
6782 2014-05-20 Pedro Alves <palves@redhat.com>
6784 * linux-aarch64-low.c: Include break-common.h.
6785 (enum target_point_type): Delete.
6786 (Z_packet_to_point_type): Rename to ...
6787 (Z_packet_to_target_hw_bp_type): ... this, and return a
6788 target_hw_bp_type instead.
6789 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6790 instead of an enum target_point_type.
6791 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6793 (aarch64_dr_state_insert_one_point)
6794 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6795 (aarch64_handle_aligned_watchpoint)
6796 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6797 Take an enum target_hw_bp_type instead of an enum
6799 (aarch64_supports_z_point_type): New function.
6800 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6801 use Z_packet_to_target_hw_bp_type.
6803 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6805 * configure.ac: Only use -Werror by default when DEVELOPMENT
6807 * configure: Regenerate.
6809 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6811 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6812 * linux-x86-low.c (X86_64_USER_REGS): New.
6813 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6815 2014-04-28 Yao Qi <yao@codesourcery.com>
6817 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6820 2014-04-25 Pedro Alves <palves@redhat.com>
6823 * linux-low.c (linux_attach_fail_reason_string): New function.
6824 (linux_attach_lwp): Delete.
6825 (linux_attach_lwp_1): Rename to ...
6826 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6827 argument. Remove "initial" parameter. Return int instead of
6828 void. Don't error or warn here.
6829 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6830 failure to attach to the tgid. Call warning when failing to
6832 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6833 argument. Remove "initial" parameter. Return int instead of
6834 void. Don't error or warn here.
6835 (linux_attach_fail_reason_string): New declaration.
6836 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6837 interface change. Use linux_attach_fail_reason_string.
6839 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6840 Walfred Tedeschi <walfred.tedeschi@intel.com>
6842 * Makefile.in: Added rules to handle new files
6843 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6844 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6845 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6846 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6847 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6848 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6850 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6851 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6852 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6853 i386/x32-avx512.xml.
6854 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6855 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6856 i386/x32-avx512-linux.xml.
6857 * i387-fp.c (num_avx512_k_registers): New constant for number
6859 (num_avx512_zmmh_low_registers): New constant for number of
6860 lower ZMM registers (0-15).
6861 (num_avx512_zmmh_high_registers): New constant for number of
6862 higher ZMM registers (16-31).
6863 (num_avx512_ymmh_registers): New contant for number of higher
6864 YMM registers (ymm16-31 added by avx521 on x86_64).
6865 (num_avx512_xmm_registers): New constant for number of higher
6866 XMM registers (xmm16-31 added by AVX512 on x86_64).
6867 (struct i387_xsave): Add space for AVX512 registers.
6868 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6869 Add code to handle AVX512 registers.
6870 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6871 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6872 prototypei from generated file.
6873 (tdesc_amd64_avx512_linux): Likewise.
6874 (init_registers_x32_avx512_linux): Likewise.
6875 (tdesc_x32_avx512_linux): Likewise.
6876 (init_registers_i386_avx512_linux): Likewise.
6877 (tdesc_i386_avx512_linux): Likewise.
6878 (x86_64_regmap): Add AVX512 registers.
6879 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6881 (initialize_low_arch): Add code to initialize AVX512 registers.
6883 2014-04-23 Pedro Alves <palves@redhat.com>
6885 * mem-break.c (find_gdb_breakpoint_at): Make static.
6886 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6888 2014-04-23 Pedro Alves <palves@redhat.com>
6890 * i386-low.c: Don't include break-common.h here.
6891 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6892 prototype to take target_hw_bp_type as argument instead of a Z
6894 * i386-low.h: Include break-common.h here.
6895 (Z_packet_to_hw_type): Declare.
6896 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6898 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6899 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6900 (x86_remove_point): Convert the packet number to a
6901 target_hw_bp_type before calling i386_low_remove_watchpoint.
6902 * win32-i386-low.c (i386_insert_point): Convert the packet number
6903 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6904 (i386_remove_point): Convert the packet number to a
6905 target_hw_bp_type before calling i386_low_remove_watchpoint.
6907 2014-04-23 Pedro Alves <palves@redhat.com>
6909 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6911 2014-04-10 Pedro Alves <palves@redhat.com>
6913 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6914 Check if the condition or command is NULL before checking if the
6915 breakpoint is known. On success, return true.
6916 * mem-break.h (add_breakpoint_condition): Document return.
6917 (add_breakpoint_commands): Add describing comment.
6918 * server.c (skip_to_semicolon): New function.
6919 (process_point_options): Use it.
6921 2014-04-09 Pedro Alves <palves@redhat.com>
6923 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6926 2014-02-27 Pedro Alves <palves@redhat.com>
6929 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6931 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6933 (last_thread_of_process_p): Take a PID argument instead of a
6935 (linux_wait_for_lwp): Delete.
6936 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6938 (linux_low_filter_event): New function, party factored out from
6939 linux_wait_for_event.
6940 (linux_wait_for_event): Rename to ...
6941 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6942 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6943 sigsuspend. Check for zombie leaders.
6944 (linux_wait_for_event): Reimplement as wrapper around
6945 linux_wait_for_event_filtered.
6946 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6947 a normal or signal exit is seen, it's the whole process exiting.
6948 (wait_for_sigstop): No longer a for_each_inferior callback.
6949 Rewrite on top of linux_wait_for_event_filtered.
6950 (stop_all_lwps): Call wait_for_sigstop directly.
6951 * server.c (resume, handle_target_event): Handle
6952 TARGET_WAITKIND_NO_RESUMED.
6954 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6956 * win32-low.c (psapi_get_dll_name,
6957 * win32_CreateToolhelp32Snapshot): Delete.
6958 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6959 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6961 (handle_load_dll): Add function description.
6962 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6964 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6966 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6968 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6969 base address when calling win32_add_one_solib.
6970 (handle_load_dll): Delete local variable load_addr.
6971 Remove 0x1000 offset applied to DLL base address when calling
6972 win32_add_one_solib.
6973 (handle_unload_dll): Add comment.
6975 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6977 * win32-low.c (win32_add_all_dlls): Renames
6978 win32_ensure_ntdll_loaded. Rewrite function documentation.
6979 Adjust implementation to always load all DLLs.
6980 Add 0x1000 offset to DLL base address when calling
6981 win32_add_one_solib.
6982 (child_initialization_done): New static global.
6983 (do_initial_child_stuff): Set child_initialization_done to
6984 zero during child initialization, and 1 after. Replace call
6985 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6987 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6988 (handle_unload_dll): Add function documentation.
6989 (get_child_debug_event): Ignore load and unload DLL events
6990 during child initialization.
6992 2014-02-20 Doug Evans <dje@google.com>
6994 Remove global all_lwps.
6995 * inferiors.h (ptid_of): Move here from linux-low.h.
6996 (pid_of, lwpid_of): Ditto.
6997 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6998 parameter is a struct thread_info * now.
6999 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7000 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7001 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7003 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7004 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7005 * linux-arm-low.c (update_registers_callback): Update, "entry"
7006 parameter is a struct thread_info * now.
7007 Fetch lwpid from current_inferior directly.
7008 (arm_insert_point): Pass &all_threads to find_inferior instead of
7010 (arm_remove_point): Ditto.
7011 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7012 (arm_prepare_to_resume): Fetch pid from thread.
7013 (arm_read_description): Fetch lwpid from current_inferior directly.
7014 * linux-low.c (all_lwps): Delete.
7015 (delete_lwp): Delete call to remove_inferior.
7016 (handle_extended_wait): Fetch lwpid from thread.
7017 (add_lwp): Don't set lwp->entry.id. Remove call to
7018 add_inferior_to_list.
7019 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7020 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7021 (kill_one_lwp_callback): Ditto.
7022 (linux_kill): Don't dereference NULL pointer.
7023 Fetch ptid,lwpid from thread.
7024 (get_detach_signal): Fetch ptid from thread.
7025 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7026 Simplify call to regcache_invalidate_thread.
7027 (delete_lwp_callback): Update, "entry" parameter is a
7028 struct thread_info * now. Fetch pid from thread.
7029 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7030 (status_pending_p_callback): Update, "entry" parameter is a
7031 struct thread_info * now. Fetch ptid from thread.
7032 (find_lwp_pid): Update, "entry" parameter is a
7033 struct thread_info * now.
7034 (linux_wait_for_lwp): Fetch pid from thread.
7035 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7036 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7037 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7038 (dequeue_one_deferred_signal): Ditto.
7039 (cancel_breakpoint): Fetch ptid from current_inferior.
7040 (linux_wait_for_event): Pass &all_threads to find_inferior,
7041 not &all_lwps. Fetch ptid, lwpid from thread.
7042 (count_events_callback): Update, "entry" parameter is a
7043 struct thread_info * now.
7044 (select_singlestep_lwp_callback): Ditto.
7045 (select_event_lwp_callback): Ditto.
7046 (cancel_breakpoints_callback): Ditto.
7047 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7049 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7050 (unsuspend_one_lwp): Update, "entry" parameter is a
7051 struct thread_info * now.
7052 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7054 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7055 Fetch lwpid from thread, not lwp.
7056 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7057 Pass &all_threads to find_inferior, not &all_lwps.
7058 (send_sigstop): Fetch lwpid from thread, not lwp.
7059 (send_sigstop_callback): Update, "entry" parameter is a
7060 struct thread_info * now.
7061 (suspend_and_send_sigstop_callback): Ditto.
7062 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7063 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7064 struct thread_info * now.
7065 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7067 (lwp_running): Update, "entry" parameter is a
7068 struct thread_info * now.
7069 (stop_all_lwps): Fetch ptid from thread.
7070 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7071 (linux_resume_one_lwp): Fetch lwpid from thread.
7072 (linux_set_resume_request): Update, "entry" parameter is a
7073 struct thread_info * now. Fetch pid, lwpid from thread.
7074 (resume_status_pending_p): Update, "entry" parameter is a
7075 struct thread_info * now.
7076 (need_step_over_p): Ditto. Fetch lwpid from thread.
7077 (start_step_over): Fetch lwpid from thread.
7078 (linux_resume_one_thread): Update, "entry" parameter is a
7079 struct thread_info * now. Fetch lwpid from thread.
7080 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7081 (proceed_one_lwp): Update, "entry" parameter is a
7082 struct thread_info * now. Fetch lwpid from thread.
7083 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7084 struct thread_info * now.
7085 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7086 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7087 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7089 (regsets_store_inferior_registers): Ditto.
7090 (fetch_register, store_register): Ditto.
7091 (linux_read_memory, linux_write_memory): Ditto.
7092 (linux_request_interrupt): Ditto.
7093 (linux_read_auxv): Ditto.
7094 (linux_xfer_siginfo): Ditto.
7095 (linux_qxfer_spu): Ditto.
7096 (linux_qxfer_libraries_svr4): Ditto.
7097 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7098 moved to inferiors.h.
7100 (get_thread_lwp): Update.
7101 (struct lwp_info): Delete member "entry". Simplify comment for
7104 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7105 current_inferior directly.
7106 (update_watch_registers_callback): Update, "entry" parameter is a
7107 struct thread_info * now. Fetch pid from thread.
7108 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7109 (mips_insert_point): Fetch lwpid from current_inferior.
7110 Pass &all_threads to find_inferior, not &all_lwps.
7111 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7112 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7114 (mips_stopped_data_address): Ditto.
7115 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7117 * linux-tile-low.c (tile_arch_setup): Ditto.
7118 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7119 (update_debug_registers_callback): Update, "entry" parameter is a
7120 struct thread_info * now. Fetch pid from thread.
7121 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7122 Pass &all_threads to find_inferior, not &all_lwps.
7123 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7124 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7125 Pass &all_threads to find_inferior, not &all_lwps.
7126 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7127 (i386_dr_low_get_status): Ditto.
7128 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7129 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7130 (x86_linux_read_description): Ditto.
7131 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7133 2014-02-20 Doug Evans <dje@google.com>
7135 * inferiors.c (get_first_inferior): Fix buglet.
7137 2014-02-19 Doug Evans <dje@google.com>
7139 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7140 * inferiors.c (add_thread): Change result type to struct thread_info *.
7141 All callers updated.
7142 (add_lwp): Call add_thread here instead of in callers.
7143 All callers updated.
7144 * linux-low.h (get_lwp_thread): Rewrite.
7145 (struct lwp_info): New member "thread".
7147 2014-02-19 Doug Evans <dje@google.com>
7149 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7150 All callers updated.
7152 2014-02-19 Doug Evans <dje@google.com>
7154 * inferiors.c (add_thread): Fix whitespace.
7156 2014-02-19 Doug Evans <dje@google.com>
7158 * dll.c (clear_dlls): Replace accessing list implemention details
7160 * gdbthread.h (get_first_thread): Declare.
7161 * inferiors.c (for_each_inferior_with_data): New function.
7162 (get_first_thread): New function.
7163 (find_thread_ptid): Simplify.
7164 (get_first_inferior): New function.
7165 (clear_list): Delete.
7166 (one_inferior_p): New function.
7167 (clear_inferior_list): New function.
7168 (clear_inferiors): Update.
7169 * inferiors.h (for_each_inferior_with_data): Declare.
7170 (clear_inferior_list): Declare.
7171 (one_inferior_p): Declare.
7172 (get_first_inferior): Declare.
7173 * linux-low.c (linux_wait_for_event): Replace accessing list
7174 implemention details with API function.
7175 * server.c (target_running): Ditto.
7176 (accumulate_file_name_length): New function.
7177 (emit_dll_description): New function.
7178 (handle_qxfer_libraries): Replace accessing list implemention
7179 details with API function.
7180 (handle_qxfer_threads_worker): New function.
7181 (handle_qxfer_threads_proper): Replace accessing list implemention
7182 details with API function.
7183 (handle_query): Ditto.
7184 (visit_actioned_threads_callback_ftype): New typedef.
7185 (visit_actioned_threads_data): New struct.
7186 (visit_actioned_threads): Rewrite to be find_inferior callback.
7187 (resume): Call find_inferior.
7188 (handle_status): Replace accessing list implemention
7189 details with API function.
7190 (process_serial_event): Replace accessing list implemention details
7192 * target.c (set_desired_inferior): Replace accessing list implemention
7193 details with API function.
7194 * tracepoint.c (same_process_p): New function.
7195 (gdb_agent_about_to_close): Replace accessing list implemention
7196 details with API function.
7197 * win32-low.c (child_delete_thread): Replace accessing list
7198 implemention details with API function.
7199 (match_dll_by_basename): New function.
7200 (dll_is_loaded_by_basename): New function.
7201 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7202 details call to dll_is_loaded_by_basename.
7204 2014-02-19 Doug Evans <dje@google.com>
7206 * dll.h (struct dll_info): Add comment.
7207 * gdbthread.h (struct thread_info): Add comment.
7208 (current_ptid): Simplify.
7209 * inferiors.c (add_process): Update.
7210 (remove_process): Update.
7211 * inferiors.h (struct process_info): Rename member "head" to "entry".
7212 * linux-low.c (delete_lwp): Update.
7214 (last_thread_of_process_p): Update.
7215 (kill_one_lwp_callback, linux_kill): Update.
7216 (status_pending_p_callback): Update.
7217 (wait_for_sigstop): Update. Simplify read of ptid.
7218 (start_step_over): Update.
7219 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7220 (get_lwp_thread): Update.
7221 (struct lwp_info): Rename member "head" to "entry".
7222 * regcache.h (inferior_list_entry): Delete.
7223 * server.c (kill_inferior_callback): Update.
7224 (detach_or_kill_inferior_callback): Update.
7225 (print_started_pid): Update.
7226 (print_attached_pid): Update.
7227 (process_serial_event): Simplify read of ptid.
7228 * thread-db.c (thread_db_create_event): Update.
7229 (thread_db_get_tls_address): Update.
7230 * win32-low.c (current_inferior_ptid): Simplify.
7232 2014-02-19 Tom Tromey <tromey@redhat.com>
7234 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7236 (target_supports_btrace): Update.
7238 2014-02-14 Yao Qi <yao@codesourcery.com>
7240 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7241 (rsp-low-ipa.o): New target.
7243 2014-02-12 Tom Tromey <tromey@redhat.com>
7245 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7246 convert_ascii_to_int.
7247 * regcache.c (registers_to_string): Likewise.
7248 * remote-utils.c (decode_M_packet): Likewise.
7249 * server.c (process_serial_event): Likewise.
7251 2014-02-12 Tom Tromey <tromey@redhat.com>
7253 * server.c (handle_query, handle_v_run): Use hex2bin, not
7255 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7257 2014-02-12 Tom Tromey <tromey@redhat.com>
7259 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7260 convert_int_to_ascii.
7261 * regcache.c (registers_to_string, collect_register_as_string):
7263 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7265 * server.c (process_serial_event): Likewise.
7266 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7267 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7269 2014-02-12 Tom Tromey <tromey@redhat.com>
7271 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7272 bin2hex, not hexify.
7273 * tracepoint.c (cmd_qtstatus): Likewise.
7275 2014-02-12 Tom Tromey <tromey@redhat.com>
7277 * remote-utils.c (monitor_output): Pass explicit length to
7280 2014-02-12 Tom Tromey <tromey@redhat.com>
7282 * tracepoint.c: Include rsp-low.h.
7283 * server.c: Include rsp-low.h.
7284 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7285 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7287 * remote-utils.c: Include rsp-low.h.
7288 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7289 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7290 (convert_int_to_ascii, convert_ascii_to_int): Move to
7292 * regcache.c: Include rsp-low.h.
7293 * ax.c: Include rsp-low.h.
7294 * Makefile.in (SFILES): Add common/rsp-low.c.
7295 (OBS): Add rsp-low.o.
7296 (rsp-low.o): New target.
7298 2014-02-12 Tom Tromey <tromey@redhat.com>
7300 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7301 Include print-utils.h.
7302 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7303 (plongest, thirty_two, phex_nz): Remove.
7304 * Makefile.in (SFILES): Add common/print-utils.c.
7305 (OBS): Add print-utils.o.
7306 (print-utils-ipa.o): New target.
7307 (print-utils.o): New target.
7308 (IPA_OBJS): Add print-utils-ipa.o.
7310 2014-02-06 Tom Tromey <tromey@redhat.com>
7312 * Makefile.in (SFILES): Fix indentation.
7314 2014-02-05 Doug Evans <dje@google.com>
7316 * linux-low.c (linux_wait_for_event): Improve comment.
7317 (linux_wait_1): Keep current_inferior in sync with event_child.
7319 2014-01-22 Doug Evans <dje@google.com>
7321 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7323 2014-01-22 Doug Evans <dje@google.com>
7325 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7326 * configure: Regenerate.
7327 * config.in: Regenerate.
7328 * Makefile.in (SFILES): Add debug.c.
7330 * debug.c: New file.
7331 * debug.h: New file.
7332 * linux-aarch64-low.c (*): Update all debugging printfs to use
7333 debug_printf instead of fprintf.
7334 * linux-arm-low.c (*): Ditto.
7335 * linux-cris-low.c (*): Ditto.
7336 * linux-crisv32-low.c (*): Ditto.
7337 * linux-m32r-low.c (*): Ditto.
7338 * linux-sparc-low.c (*): Ditto.
7339 * linux-x86.c (*): Ditto.
7340 * linux-low.c (*): Ditto.
7341 (linux_wait_1): Add calls to debug_enter, debug_exit.
7342 (linux_wait): Remove redundant debugging printf.
7343 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7344 (linux_resume, unstop_all_lwps): Ditto.
7345 * mem-break.c (*): Update all debugging printfs to use
7346 debug_printf instead of fprintf.
7347 * remote-utils.c (*): Ditto.
7348 * thread-db.c (*): Ditto.
7349 * server.c #include <ctype.h>, "gdb_vecs.h".
7350 (debug_threads): Moved to debug.c.
7351 (*): Update all debugging printfs to use debug_printf instead of
7353 (start_inferior): Replace call to fflush with call to debug_flush.
7354 (monitor_show_help): Mention set debug-format.
7355 (parse_debug_format_options): New function.
7356 (handle_monitor_command): Handle "monitor set debug-format".
7357 (gdbserver_usage): Mention --debug-format.
7358 (main): Parse --debug-format.
7359 * server.h (debug_threads): Declaration moved to debug.h.
7361 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7362 trace_debug_1 that uses debug_printf.
7363 (tracepoint_look_up_symbols): Update all debugging printfs to use
7364 debug_printf instead of fprintf.
7366 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7368 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7371 2014-01-17 Pedro Alves <palves@redhat.com>
7374 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7375 defined after including gdb_proc_service.h.
7377 2014-01-16 Doug Evans <dje@google.com>
7379 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7380 (match_dll): Use it.
7382 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7384 * target.h (target_ops) <read_btrace>: Change parameters and
7385 return type to allow error reporting.
7386 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7387 trace reading errors on.
7388 * linux-low.c (linux_low_read_btrace): Pass trace reading
7390 (linux_low_disable_btrace): New.
7392 2014-01-15 Doug Evans <dje@google.com>
7394 * inferiors.c (thread_id_to_gdb_id): Delete.
7395 * inferiors.h (thread_id_to_gdb_id): Delete.
7397 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7399 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7400 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7403 2014-01-08 Pedro Alves <palves@redhat.com>
7405 * server.c (handle_status): Don't discard previous queued stop
7406 replies or thread's pending status here.
7407 (main) <disconnection>: Do it here instead.
7409 2014-01-08 Pedro Alves <palves@redhat.com>
7411 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7412 * server.c (visit_actioned_threads, handle_pending_status): New
7414 (handle_v_cont): Factor out parts to ...
7415 (resume): ... this new function. If in all-stop, and a thread
7416 being resumed has a pending status, report it without actually
7418 (myresume): Adjust to use the new 'resume' function.
7419 (clear_pending_status_callback, set_pending_status_callback)
7420 (find_status_pending_thread_callback): New functions.
7421 (handle_status): Handle the case of multiple threads having
7422 interesting statuses to report. Report threads' real last signal
7423 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7424 with an interesting thread to report the status for, instead of
7425 always reporting the status of the first thread.
7427 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7429 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7430 * gdbreplay.c (gdbreplay_version): Likewise.
7432 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7434 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7435 iov.iov_len with the real length in use.
7437 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7439 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7440 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7441 for all targets that use win32-low.c.
7442 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7443 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7445 2013-12-13 Pedro Alves <palves@redhat.com>
7447 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7448 if equal to TARGET_WAITKIND_LOADED.
7449 * win32-low.c (cached_status): New static global.
7450 (win32_wait): Add declaration.
7451 (do_initial_child_stuff): Flush all initial pending debug events
7452 up to the initial breakpoint.
7453 (win32_wait): If CACHED_STATUS was set, return that instead
7454 of doing a real wait. Remove the code resuming the execution
7455 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7456 during the initial phase. Also remove the code changing
7457 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7458 TARGET_WAITKIND_STOPPED.
7460 2013-12-11 Yao Qi <yao@codesourcery.com>
7462 * notif.c (handle_notif_ack): Return 0 if no notification
7465 2013-11-20 Doug Evans <dje@google.com>
7467 * linux-low.c (linux_set_resume_request): Fix comment.
7469 2013-11-20 Doug Evans <dje@google.com>
7471 * linux-low.c (resume_status_pending_p): Tweak comment.
7473 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7475 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7476 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7477 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7478 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7479 (srv_amd64_regobj): Add amd64-mpx.o.
7480 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7481 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7482 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7483 * i387-fp.c (num_pl_bnd_register) Added constant.
7484 (num_pl_bnd_cfg_registers) Added constant.
7485 (struct i387_xsave) Added reserved area and MPX fields.
7486 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7487 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7489 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7490 (init_registers_amd64_mpx_linux): Declare new function.
7491 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7492 (x86_64_regmap): Add MPX registers.
7493 (x86_linux_read_description): Add MPX case.
7494 (initialize_low_arch): Initialize MPX targets.
7496 2013-11-18 Tom Tromey <tromey@redhat.com>
7498 * configure: Rebuild.
7499 * configure.ac: Don't check for stdlib.h.
7500 * gdbreplay.c: Unconditionally include stdlib.h.
7502 2013-11-18 Tom Tromey <tromey@redhat.com>
7504 * config.in: Rebuild.
7505 * configure: Rebuild.
7506 * configure.ac: Don't use AC_HEADER_DIRENT.
7508 2013-11-18 Tom Tromey <tromey@redhat.com>
7510 * server.h: Don't check HAVE_STRING_H.
7511 * gdbreplay.c: Don't check HAVE_STRING_H.
7512 * configure: Rebuild.
7514 2013-11-18 Tom Tromey <tromey@redhat.com>
7516 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7519 2013-11-08 Tom Tromey <tromey@redhat.com>
7521 * configure, config.in: Rebuild.
7522 * configure.ac: Remove unused configury.
7524 2013-11-08 Tom Tromey <tromey@redhat.com>
7526 * acinclude.m4: Include common.m4, codeset.m4.
7527 * configure, config.in: Rebuild.
7528 * configure.ac: Use GDB_AC_COMMON.
7530 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7532 * linux-s390-low.c (HWCAP_S390_TE): New define.
7533 (s390_arch_setup): Consider the TE field in the HWCAP for
7534 determining 'have_regset_tdb'.
7536 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7539 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7542 2013-10-02 Pedro Alves <palves@redhat.com>
7544 * server.c (process_serial_event): Don't output "GDBserver
7545 exiting" if GDB is connected through stdio.
7546 * target.c (mywait): Likewise, be silent if GDB is connected
7549 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7551 * lynx-low.c (lynx_add_threads_after_attach): New function.
7552 (lynx_attach): Remove call to add_thread. Add call to
7553 lynx_add_threads_after_attach instead.
7555 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7557 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7558 * config.in, configure: Regenerated.
7560 2013-09-18 Yao Qi <yao@codesourcery.com>
7563 * server.c (start_inferior): Clear 'resume_info'.
7565 2013-09-16 Jiong Wang <jiwang@tilera.com>
7567 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7570 2013-09-16 Jiong Wang <jiwang@tilera.com>
7572 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7573 linux-tile-low.o to srv_tgtobj.
7575 2013-09-16 Will Newton <will.newton@linaro.org>
7577 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7580 2013-09-06 Pedro Alves <palves@redhat.com>
7582 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7583 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7584 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7585 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7586 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7587 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7589 2013-09-06 Pedro Alves <palves@redhat.com>
7591 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7592 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7594 2013-09-06 Pedro Alves <palves@redhat.com>
7596 * linux-amd64-ipa.c: Include tracepoint.h.
7597 * linux-i386-ipa.c: Include tracepoint.h.
7599 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7601 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7602 (ps_get_thread_area): New function.
7604 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7606 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7607 (initialize_low_arch): Call init_registers_crisv32 rather than
7608 init_register_crisv32.
7610 2013-09-05 Pedro Alves <palves@redhat.com>
7612 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7614 * hostio.h: ... this new file.
7615 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7616 win32-low.c: Include hostio.h.
7618 2013-09-05 Pedro Alves <palves@redhat.com>
7620 * server.h (gdb_client_data, handler_func, callback_handler_func)
7621 (delete_file_handler, add_file_handler, append_callback_event)
7622 (delete_callback_event, start_event_loop, initialize_event_loop):
7623 Move to event-loop.h and include it.
7624 * event-loop.h: New file.
7626 2013-09-05 Pedro Alves <palves@redhat.com>
7628 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7629 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7630 (loaded_dll, unloaded_dll): Move to ...
7631 * dll.h: ... this new file.
7632 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7634 2013-09-05 Pedro Alves <palves@redhat.com>
7636 * server.h (current_process, get_thread_process, all_processes)
7637 (add_inferior_to_list, for_each_inferior, current_inferior)
7638 (remove_inferior, add_process, remove_process, find_process_pid)
7639 (have_started_inferiors_p, have_attached_inferiors_p)
7640 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7641 (clear_inferiors, find_inferior, find_inferior_id)
7642 (inferior_target_data, set_inferior_target_data)
7643 (inferior_regcache_data, set_inferior_regcache_data): Move to
7644 inferiors.h, and include it.
7645 * inferiors.h: New file.
7647 2013-09-05 Pedro Alves <palves@redhat.com>
7649 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7653 2013-09-05 Pedro Alves <palves@redhat.com>
7655 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7657 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7658 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7659 (handle_tracepoint_general_set, handle_tracepoint_query)
7660 (tracepoint_finished_step, tracepoint_was_hit)
7661 (release_while_stepping_state_list, current_traceframe)
7662 (in_readonly_region, traceframe_read_mem)
7663 (fetch_traceframe_registers, traceframe_read_sdata)
7664 (traceframe_read_info, struct fast_tpoint_collect_status)
7665 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7666 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7667 (supply_fast_tracepoint_registers)
7668 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7669 (ipa_tdesc, claim_trampoline_space)
7670 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7671 (agent_mem_read, agent_get_trace_state_variable_value)
7672 (agent_set_trace_state_variable_value, agent_tsv_read)
7673 (agent_mem_read_string, get_raw_reg_func_addr)
7674 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7675 * tracepoint.h: ... this new file.
7677 2013-09-05 Pedro Alves <palves@redhat.com>
7679 * server.h (perror_with_name, error, fatal, warning, paddress)
7680 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7682 * utils.h: New file.
7684 2013-09-05 Pedro Alves <palves@redhat.com>
7686 * server.h (remote_debug, noack_mode, transport_is_reliable)
7687 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7688 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7689 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7690 (write_enn, initialize_async_io, enable_async_io)
7691 (disable_async_io, check_remote_input_interrupt_request)
7692 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7693 (dead_thread_notify, prepare_resume_reply)
7694 (decode_address_to_semicolon, decode_address, decode_m_packet)
7695 (decode_M_packet, decode_X_packet, decode_xfer_write)
7696 (decode_search_memory_packet, unhexify, hexify)
7697 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7698 (look_up_one_symbol, relocate_instruction)
7699 (monitor_output): Move to remote-utils.h, and include it.
7700 * remote-utils.h: New file.
7702 2013-09-05 Pedro Alves <palves@redhat.com>
7704 * server.h (_): Delete.
7706 2013-09-02 Pedro Alves <palves@redhat.com>
7708 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7709 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7711 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7713 2013-09-02 Pierre Muller <muller@sourceware.org>
7715 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7716 or WriteProcessMemory complete successfully and handle
7717 ERROR_PARTIAL_COPY error.
7719 2013-09-02 Pedro Alves <palves@redhat.com>
7721 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7722 error instead of EIO.
7724 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7727 * linux-low.c: Include filestuff.h.
7728 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7729 * lynx-low.c: Include filestuff.h.
7730 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7731 * server.c: Include filestuff.h.
7732 (main): Call notice_open_fds.
7733 * spu-low.c: Include filestuff.h.
7734 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7736 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7738 * Makefile.in: Explain why ../target and ../nat are not
7739 listed as include file search paths.
7740 (linux-waitpid.o): New object file rule.
7741 * configure.srv (srv_native_linux_obj): New variable.
7742 Replace all occurrences of linux native object files with
7743 $srv_native_linux_obj.
7744 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7745 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7746 (linux_enable_event_reporting): Remove declaration.
7747 (my_waitpid): Moved to common/linux-waitpid.c.
7748 (linux_wait_for_event): Pass ptid when calling
7749 linux_enable_event_reporting.
7750 (linux_supports_tracefork_flag): Remove.
7751 (linux_enable_event_reporting): Likewise.
7752 (linux_tracefork_grandchild): Remove.
7753 (STACK_SIZE): Moved to common/linux-ptrace.c.
7754 (linux_tracefork_child): Remove.
7755 (linux_test_for_tracefork): Remove.
7756 (linux_look_up_symbols): Call linux_supports_traceclone.
7757 (initialize_low): Remove call to linux_test_for_tracefork.
7758 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7759 common/linux-ptrace.h.
7760 (PTRACE_TYPE_ARG4): Likewise.
7761 Include linux-ptrace.h.
7763 2013-08-21 Pedro Alves <palves@redhat.com>
7765 * config.in: Renegerate.
7767 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7769 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7770 (SFILES): Remove $(srcdir)/common/target-common.c and
7771 add $(srcdir)/target/waitstatus.c.
7772 (OBS): Remove target-common.o and add waitstatus.o.
7773 (server_h): Remove $(srcdir)/../common/target-common.h and
7774 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7775 and $(srcdir)/../target/waitstatus.h.
7776 (target-common.o): Remove.
7777 (waitstatus.o): New target object file.
7778 * target.h: Do not include target-common.h and
7779 include target/resume.h, target/wait.h and
7780 target/waitstatus.h.
7782 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7784 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7785 to PTRACE_TYPE_ARG3.
7786 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7787 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7789 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7790 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7792 2013-07-27 Jie Zhang <jie@codesourcery.com>
7793 Daniel Jacobowitz <dan@codesourcery.com>
7794 Yao Qi <yao@codesourcery.com>
7796 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7797 (mips-linux-watch.o): New rule.
7798 (mips_linux_watch_h): New variable.
7799 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7801 * linux-mips-low.c: Include mips-linux-watch.h.
7802 (struct arch_process_info, struct arch_lwp_info): New.
7803 (update_watch_registers_callback): New function.
7804 (mips_linux_new_process, mips_linux_new_thread) New functions.
7805 (mips_linux_prepare_to_resume, mips_insert_point): New
7807 (mips_remove_point, mips_stopped_by_watchpoint): New
7809 (rsp_bp_type_to_target_hw_bp_type): New function.
7810 (mips_stopped_data_address): New function.
7811 (the_low_target): Add watchpoint support functions.
7813 2013-07-27 Yao Qi <yao@codesourcery.com>
7815 * i386-low.c: Include break-common.h.
7816 (enum target_hw_bp_type): Remove.
7818 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7820 * Makefile.in (SFILES): /common/target-common.c.
7821 (OBS): Add target-common.o.
7822 (server_h): Add $(srcdir)/../common/target-common.h.
7823 (target-common.o): New target.
7824 * server.c (queue_stop_reply_callback): Free
7825 status string after use.
7826 * target.c (target_waitstatus_to_string): Remove.
7827 * target.h: Include target-common.h.
7828 (resume_kind): Likewise.
7829 (target_waitkind): Likewise.
7830 (target_waitstatus): Likewise.
7831 (TARGET_WNOHANG): Likewise.
7833 2013-07-04 Yao Qi <yao@codesourcery.com>
7835 * Makefile.in (host_alias): Use @host_noncanonical@.
7836 (target_alias): Use @target_noncanonical@.
7837 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7838 ACX_NONCANONICAL_HOST.
7839 * configure: Regenerated.
7842 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7844 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7845 * configure: Rebuild.
7846 * Makefile.in (version_host, version_target): Get from configure.
7847 (version.c): Use $(version_host) and $(version_target).
7849 2013-07-03 Pedro Alves <palves@redhat.com>
7851 * Makefile.in (config.status): Depend on development.sh.
7852 * acinclude.m4: Include libmcheck.m4.
7853 * configure: Regenerate.
7855 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7857 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7858 attribute inside the parentheses.
7859 (winapi_DebugSetProcessKillOnExit): Ditto.
7860 (winapi_DebugBreakProcess): Ditto.
7861 (winapi_GenerateConsoleCtrlEvent): Ditto.
7863 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7865 * notif.h (notif_event): Add a dummy member to avoid compiler
7868 2013-07-01 Pedro Alves <palves@redhat.com>
7870 * hostio.c (HOSTIO_PATH_MAX): Define.
7871 (require_filename, handle_open, handle_unlink, handle_readlink):
7874 2013-07-01 Pedro Alves <palves@redhat.com>
7876 * server.h: Include "pathmax.h".
7877 * linux-low.c: Don't include sys/param.h.
7878 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7880 * win32-low.c: Don't include sys/param.h.
7881 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7883 2013-07-01 Pedro Alves <palves@redhat.com>
7885 * event-loop.c: Don't check HAVE_UNISTD_H before including
7887 * gdbreplay.c: Likewise.
7888 * remote-utils.c: Likewise.
7889 * server.c: Likewise.
7890 * configure.ac: Don't check for unistd.h.
7891 * configure: Regenerate.
7893 2013-06-28 Tom Tromey <tromey@redhat.com>
7895 * Makefile.in (version.c): Use version.in, not
7898 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7900 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7901 * configure: Rebuild.
7902 * Makefile.in (version_host, version_target): Get from configure.
7903 (version.c): Use $(version_host) and $(version_target).
7905 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7907 Fix trace-status to output user name without trailing colon.
7908 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7910 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7912 Fix trace-status to output proper start-time and stop-time.
7913 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7914 output start time and stop time in hex as gdb expects.
7916 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7918 * tracepoint.c (build_traceframe_info_xml): Output trace state
7919 variables present in the trace buffer.
7921 2013-06-24 Tom Tromey <tromey@redhat.com>
7923 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7925 (version.o): Remove.
7926 * gdbreplay.c: Include version.h.
7927 (version, host_name): Don't declare.
7928 * server.h: Include version.h.
7929 (version, host_name): Don't declare.
7931 2013-06-12 Pedro Alves <palves@redhat.com>
7933 * linux-x86-low.c (linux_is_elf64): Delete global.
7934 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7935 with local linux_pid_exe_is_elf_64_file use.
7937 2013-06-11 Pedro Alves <palves@redhat.com>
7939 * linux-low.c (regset_disabled, disable_regset): New functions.
7940 (regsets_fetch_inferior_registers)
7941 (regsets_store_inferior_registers): Use them.
7942 (initialize_regsets_info); Don't allocate the disabled_regsets
7944 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7947 2013-06-11 Pedro Alves <palves@redhat.com>
7949 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7952 2013-06-11 Pedro Alves <palves@redhat.com>
7954 * linux-x86-low.c (initialize_low_arch): Call
7955 init_registers_x32_avx_linux.
7957 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7959 Fix compatibility with Android Bionic.
7960 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7963 2013-06-07 Pedro Alves <palves@redhat.com>
7966 * Makefile.in (OBS): Add tdesc.o.
7967 (IPA_OBJS): Add tdesc-ipa.o.
7968 (tdesc-ipa.o): New rule.
7969 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7971 * linux-low.c (new_inferior): Delete.
7972 (disabled_regsets, num_regsets): Delete.
7973 (linux_add_process): Adjust to set the new per-process
7975 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7976 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7977 was a stop. When calling arch_setup, switch the current inferior
7978 to the thread that got an event.
7979 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7980 (regsets_fetch_inferior_registers)
7981 (regsets_store_inferior_registers): New regsets_info parameter.
7983 (linux_register_in_regsets): New regs_info parameter. Adjust to
7985 (register_addr, fetch_register, store_register): New usrregs_info
7986 parameter. Adjust to use it.
7987 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7988 parameter regs_info. Adjust to use it.
7989 (linux_fetch_registers): Get the current inferior's regs_info, and
7991 (linux_store_registers): Ditto.
7992 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7993 (initialize_low): Don't initialize the target_regsets here. Call
7994 initialize_low_arch.
7995 * linux-low.h (target_regsets): Delete declaration.
7996 (struct regsets_info): New.
7997 (struct usrregs_info): New.
7998 (struct regs_info): New.
7999 (struct process_info_private) <new_inferior>: New field.
8000 (struct linux_target_ops): Delete the num_regs, regmap, and
8001 regset_bitmap fields. New field regs_info.
8002 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8003 * i387-fp.c (num_xmm_registers): Delete.
8004 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8005 calls to new interface.
8006 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8007 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8008 Infer the number of xmm registers from the regcache's target
8010 * i387-fp.h (num_xmm_registers): Delete.
8011 * inferiors.c (add_thread): Don't install the thread's regcache
8013 * proc-service.c (gregset_info): Fetch the current inferior's
8014 regs_info. Adjust to use it.
8015 * regcache.c: Include tdesc.h.
8016 (register_bytes, reg_defs, num_registers)
8017 (gdbserver_expedite_regs): Delete.
8018 (get_thread_regcache): If the thread doesn't have a regcache yet,
8019 create one, instead of aborting gdbserver.
8020 (regcache_invalidate_one): Rename to ...
8021 (regcache_invalidate_thread): ... this.
8022 (regcache_invalidate_one): New.
8023 (regcache_invalidate): Only invalidate registers of the current
8025 (init_register_cache): Add target_desc parameter, and use it.
8026 (new_register_cache): Ditto. Assert the target description has a
8027 non zero registers_size.
8028 (regcache_cpy): Add assertions. Adjust.
8029 (realloc_register_cache, set_register_cache): Delete.
8030 (registers_to_string, registers_from_string): Adjust.
8031 (find_register_by_name, find_regno, find_register_by_number)
8032 (register_cache_size): Add target_desc parameter, and use it.
8033 (free_register_cache_thread, free_register_cache_thread_one)
8034 (regcache_release, register_cache_size): New.
8035 (register_size): Add target_desc parameter, and use it.
8036 (register_data, supply_register, supply_register_zeroed)
8037 (supply_regblock, supply_register_by_name, collect_register)
8038 (collect_register_as_string, collect_register_by_name): Adjust.
8039 * regcache.h (struct target_desc): Forward declare.
8040 (struct regcache) <tdesc>: New field.
8041 (init_register_cache, new_register_cache): Add target_desc
8043 (regcache_invalidate_thread): Declare.
8044 (regcache_invalidate_one): Delete declaration.
8045 (regcache_release): Declare.
8046 (find_register_by_number, register_cache_size, register_size)
8047 (find_regno): Add target_desc parameter.
8048 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8050 * remote-utils.c: Include tdesc.h.
8051 (outreg, prepare_resume_reply): Adjust.
8052 * server.c: Include tdesc.h.
8053 (gdbserver_xmltarget): Delete declaration.
8054 (get_features_xml, process_serial_event): Adjust.
8055 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8057 (struct process_info) <tdesc>: New field.
8058 (ipa_tdesc): Declare.
8059 * tdesc.c: New file.
8060 * tdesc.h: New file.
8061 * tracepoint.c: Include tdesc.h.
8062 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8063 (get_context_regcache): Adjust to pass ipa_tdesc down.
8064 (do_action_at_tracepoint): Adjust to get the register cache size
8065 from the context regcache's description.
8066 (traceframe_walk_blocks): Adjust to get the register cache size
8067 from the current trace frame's description.
8068 (traceframe_get_pc): Adjust to get current trace frame's
8069 description and pass it down.
8070 (gdb_collect): Adjust to get the register cache size from the
8072 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8073 (gdbserver_xmltarget): Delete.
8074 (initialize_low_tracepoint): Set the ipa's target description.
8075 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8076 (initialize_low_tracepoint): Set the ipa's target description.
8077 * linux-x86-low.c: Include tdesc.h.
8078 [__x86_64__] (is_64bit_tdesc): New.
8079 (ps_get_thread_area, x86_get_thread_area): Use it.
8080 (i386_cannot_store_register): Rename to ...
8081 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8082 (i386_cannot_fetch_register): Rename to ...
8083 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8084 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8086 (target_regsets): Rename to ...
8087 (x86_regsets): ... this.
8088 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8090 (x86_siginfo_fixup): Use is_64bit_tdesc.
8091 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8092 (tdesc_x32_avx_linux, tdesc_x32_linux)
8093 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8095 (x86_linux_update_xmltarget): Delete.
8096 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8097 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8098 (AMD64_LINUX_USER64_CS): New.
8099 (x86_linux_read_description): New, based on
8100 x86_linux_update_xmltarget.
8101 (same_process_callback): New.
8102 (x86_arch_setup_process_callback): New.
8103 (x86_linux_update_xmltarget): New.
8104 (x86_regsets_info): New.
8105 (amd64_linux_regs_info): New.
8106 (i386_linux_usrregs_info): New.
8107 (i386_linux_regs_info): New.
8108 (x86_linux_regs_info): New.
8109 (x86_arch_setup): Reimplement.
8110 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8111 (x86_emit_ops): Ditto.
8112 (the_low_target): Adjust. Install x86_linux_regs_info,
8113 x86_cannot_fetch_register, and x86_cannot_store_register.
8114 (initialize_low_arch): New.
8115 * linux-ia64-low.c (tdesc_ia64): Declare.
8116 (ia64_fetch_register): Adjust.
8117 (ia64_usrregs_info, regs_info): New globals.
8118 (ia64_regs_info): New function.
8119 (the_low_target): Adjust.
8120 (initialize_low_arch): New function.
8121 * linux-sparc-low.c (tdesc_sparc64): Declare.
8122 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8124 (sparc_arch_setup): New function.
8125 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8126 (the_low_target): Adjust.
8127 (initialize_low_arch): New function.
8128 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8129 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8130 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8131 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8132 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8133 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8134 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8135 (tdesc_powerpc_isa205_vsx64l): Declare.
8136 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8137 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8138 (ppc_set_pc, ppc_get_hwcap): Adjust.
8139 (ppc_usrregs_info): Forward declare.
8140 (!__powerpc64__) ppc_regmap_adjusted: New global.
8141 (ppc_arch_setup): Adjust to the current process'es target
8143 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8144 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8145 (ppc_store_evrregset): Adjust.
8146 (target_regsets): Rename to ...
8147 (ppc_regsets): ... this, and make static.
8148 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8149 (ppc_regs_info): New function.
8150 (the_low_target): Adjust.
8151 (initialize_low_arch): New function.
8152 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8153 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8154 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8155 (tdesc_s390x_linux64v2): Declare.
8156 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8157 (s390_fill_gregset, s390_store_last_break): Adjust.
8158 (target_regsets): Rename to ...
8159 (s390_regsets): ... this, and make static.
8160 (s390_get_pc, s390_set_pc): Adjust.
8161 (s390_get_hwcap): New target_desc parameter, and use it.
8162 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8163 (s390_arch_setup): Adjust to set the current process'es target
8164 description. Don't adjust the regmap.
8165 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8166 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8167 (regs_info_3264): New globals.
8168 (s390_regs_info): New function.
8169 (the_low_target): Adjust.
8170 (initialize_low_arch): New function.
8171 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8172 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8173 [__mips64] (init_registers_mips_linux)
8174 (init_registers_mips_dsp_linux): Delete defines.
8175 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8176 (have_dsp): New global.
8177 (mips_read_description): New, based on mips_arch_setup.
8178 (mips_arch_setup): Reimplement.
8179 (get_usrregs_info): New function.
8180 (mips_cannot_fetch_register, mips_cannot_store_register)
8181 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8182 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8183 (target_regsets): Rename to ...
8184 (mips_regsets): ... this, and make static.
8185 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8186 (dsp_regs_info, regs_info): New globals.
8187 (mips_regs_info): New function.
8188 (the_low_target): Adjust.
8189 (initialize_low_arch): New function.
8190 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8191 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8193 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8194 (arm_read_description): New, with bits factored from
8196 (arm_arch_setup): Reimplement.
8197 (target_regsets): Rename to ...
8198 (arm_regsets): ... this, and make static.
8199 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8200 (arm_regs_info): New function.
8201 (the_low_target): Adjust.
8202 (initialize_low_arch): New function.
8203 * linux-m68k-low.c (tdesc_m68k): Declare.
8204 (target_regsets): Rename to ...
8205 (m68k_regsets): ... this, and make static.
8206 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8207 (m68k_regs_info): New function.
8208 (m68k_arch_setup): New function.
8209 (the_low_target): Adjust.
8210 (initialize_low_arch): New function.
8211 * linux-sh-low.c (tdesc_sharch): Declare.
8212 (target_regsets): Rename to ...
8213 (sh_regsets): ... this, and make static.
8214 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8215 (sh_regs_info, sh_arch_setup): New functions.
8216 (the_low_target): Adjust.
8217 (initialize_low_arch): New function.
8218 * linux-bfin-low.c (tdesc_bfin): Declare.
8219 (bfin_arch_setup): New function.
8220 (bfin_usrregs_info, regs_info): New globals.
8221 (bfin_regs_info): New function.
8222 (the_low_target): Adjust.
8223 (initialize_low_arch): New function.
8224 * linux-cris-low.c (tdesc_cris): Declare.
8225 (cris_arch_setup): New function.
8226 (cris_usrregs_info, regs_info): New globals.
8227 (cris_regs_info): New function.
8228 (the_low_target): Adjust.
8229 (initialize_low_arch): New function.
8230 * linux-cris-low.c (tdesc_crisv32): Declare.
8231 (cris_arch_setup): New function.
8232 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8233 (cris_regs_info): New function.
8234 (the_low_target): Adjust.
8235 (initialize_low_arch): New function.
8236 * linux-m32r-low.c (tdesc_m32r): Declare.
8237 (m32r_arch_setup): New function.
8238 (m32r_usrregs_info, regs_info): New globals.
8239 (m32r_regs_info): Adjust.
8240 (initialize_low_arch): New function.
8241 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8242 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8243 (tic6x_usrregs_info): Forward declare.
8244 (tic6x_read_description): New function, based on ...
8245 (tic6x_arch_setup): ... this. Reimplement.
8246 (target_regsets): Rename to ...
8247 (tic6x_regsets): ... this, and make static.
8248 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8249 (tic6x_regs_info): New function.
8250 (the_low_target): Adjust.
8251 (initialize_low_arch): New function.
8252 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8253 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8254 (target_regsets): Rename to ...
8255 (xtensa_regsets): ... this, and make static.
8256 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8258 (xtensa_arch_setup, xtensa_regs_info): New functions.
8259 (the_low_target): Adjust.
8260 (initialize_low_arch): New function.
8261 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8262 (nios2_arch_setup): Set the current process'es tdesc.
8263 (target_regsets): Rename to ...
8264 (nios2_regsets): ... this.
8265 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8266 (nios2_regs_info): New function.
8267 (the_low_target): Adjust.
8268 (initialize_low_arch): New function.
8269 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8270 (aarch64_arch_setup): Set the current process'es tdesc.
8271 (target_regsets): Rename to ...
8272 (aarch64_regsets): ... this.
8273 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8274 (aarch64_regs_info): New function.
8275 (the_low_target): Adjust.
8276 (initialize_low_arch): New function.
8277 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8279 (target_regsets): Rename to ...
8280 (tile_regsets): ... this.
8281 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8282 (tile_regs_info): New function.
8283 (tile_arch_setup): Set the current process'es tdesc.
8284 (the_low_target): Adjust.
8285 (initialize_low_arch): New function.
8286 * spu-low.c (tdesc_spu): Declare.
8287 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8288 * win32-arm-low.c (tdesc_arm): Declare.
8289 (arm_arch_setup): New function.
8290 (the_low_target): Install arm_arch_setup instead of
8292 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8293 (init_windows_x86): Rename to ...
8294 (i386_arch_setup): ... this. Set `win32_tdesc'.
8295 (the_low_target): Adjust.
8296 * win32-low.c (win32_tdesc): New global.
8297 (child_add_thread): Don't create the thread cache here.
8298 (do_initial_child_stuff): Set the new process'es tdesc.
8299 * win32-low.h (struct target_desc): Forward declare.
8300 (win32_tdesc): Declare.
8301 * lynx-i386-low.c (tdesc_i386): Declare global.
8302 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8303 * lynx-low.c (lynx_tdesc): New global.
8304 (lynx_add_process): Set the new process'es tdesc.
8305 * lynx-low.h (struct target_desc): Forward declare.
8306 (lynx_tdesc): Declare global.
8307 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8308 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8309 * nto-low.c (nto_tdesc): New global.
8310 (do_attach): Set the new process'es tdesc.
8311 * nto-low.h (struct target_desc): Forward declare.
8312 (nto_tdesc): Declare.
8313 * nto-x86-low.c (tdesc_i386): Declare.
8314 (nto_x86_arch_setup): Set `nto_tdesc'.
8316 2013-06-04 Gary Benson <gbenson@redhat.com>
8318 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8319 to qSupported response when appropriate.
8320 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8321 with nonzero-length annex.
8322 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8323 arguments supplied in annex.
8325 2013-05-31 Doug Evans <dje@google.com>
8328 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8329 64 bits in 64-cross-32 environment.
8331 2013-05-28 Pedro Alves <palves@redhat.com>
8333 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8334 (aarch64-without-fpu.c): Delete rule.
8335 * configure.srv (aarch64*-*-linux*): Remove references to
8336 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8337 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8340 2013-05-24 Pedro Alves <palves@redhat.com>
8342 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8343 instead of strchr/decode_address. Error if the range isn't split
8344 with a ','. Don't assume there's be a ':' in the action.
8346 2013-05-23 Yao Qi <yao@codesourcery.com>
8347 Pedro Alves <palves@redhat.com>
8349 * linux-low.c (lwp_in_step_range): New function.
8350 (linux_wait_1): If the thread was range stepping and stopped
8351 outside the stepping range, report the stop to GDB. Otherwise,
8352 continue stepping. Add range stepping debug output.
8353 (linux_set_resume_request): Copy the step range from the resume
8355 (linux_supports_range_stepping): New.
8356 (linux_target_ops) <supports_range_stepping>: Set to
8357 linux_supports_range_stepping.
8358 * linux-low.h (struct linux_target_ops)
8359 <supports_range_stepping>: New field.
8360 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8361 * linux-x86-low.c (x86_supports_range_stepping): New.
8362 (the_low_target) <supports_range_stepping>: Set to
8363 x86_supports_range_stepping.
8364 * server.c (handle_v_cont): Handle 'r' action.
8365 (handle_v_requests): Append ";r" if the target supports range
8367 * target.h (struct thread_resume) <step_range_start,
8368 step_range_end>: New fields.
8369 (struct target_ops) <supports_range_stepping>:
8371 (target_supports_range_stepping): New macro.
8373 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8375 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8376 confusion in comment.
8378 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8380 * lynx-low.c (struct process_info_private): New type.
8381 (lynx_add_process): New function.
8382 (lynx_create_inferior, lynx_attach): Replace calls to
8383 add_process by calls to lynx_add_process.
8384 (lynx_resume): If PTID is null, then try using
8385 current_process()->private->last_wait_event_ptid.
8387 (lynx_clear_inferiors): Delete. The contents of that function
8388 has been inlined in lynx_mourn;
8389 (lynx_wait_1): Save the ptid in the process's private data.
8390 (lynx_mourn): Free the process' private data. Replace call
8391 to lynx_clear_inferiors by call to clear_inferiors.
8393 2013-05-17 Yao Qi <yao@codesourcery.com>
8395 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8398 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8400 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8401 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8402 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8403 PT_TEXT_END_ADDR guards. Update comments.
8404 (linux_target_op) <read_offsets>: Conditionally define to
8405 linux_read_offsets if the target is UCLIBC and if it defines
8406 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8408 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8409 Andrew Jenner <andrew@codesourcery.com>
8411 * Makefile.in (SFILES): Add linux-nios2-low.c.
8412 (clean): Add action to delete nios2-linux.c.
8413 (nios2-linux.c): New rule.
8414 * configure.srv: Add nios2*-*-linux*.
8415 * linux-nios2-low.c: New.
8417 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8419 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8421 2013-04-25 Hui Zhu <hui@codesourcery.com>
8424 * ax.c (ax_printf): Add fflush.
8426 2013-04-22 Tom Tromey <tromey@redhat.com>
8428 * Makefile.in (SFILES): Add filestuff.c.
8429 (OBS): Add filestuff.o.
8430 (filestuff.o): New target.
8431 * config.in, configure: Rebuild.
8432 * configure.ac: Check for fdwalk, pipe2.
8434 2013-04-17 Pedro Alves <palves@redhat.com>
8436 * configure.ac (USE_THREAD_DB): Delete variable.
8437 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8438 Don't AC_SUBST USE_THREAD_DB.
8439 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8440 * config.in, configure: Regenerate.
8442 2013-04-16 Pedro Alves <palves@redhat.com>
8444 * linux-low.h (struct lwp_info) <thread_known>: Move under
8445 the USE_THREAD_DB #ifdef.
8447 2013-04-16 Pedro Alves <palves@redhat.com>
8449 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8450 (linux-low.o): Delete rule.
8451 * linux-low.h: Always include "gdb_thread_db.h" instead of
8452 conditionally including thread_db.h.
8453 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8456 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8458 * Makefile.in (install-only): Fix make install regression.
8460 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8462 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8463 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8465 * gdbserver.1: Remove.
8467 2013-03-22 Pedro Alves <palves@redhat.com>
8469 * linux-low.c (handle_extended_wait): Don't call
8470 linux_enable_event_reporting.
8472 2013-03-15 Tony Theodore <tonyt@logyst.com>
8475 * Makefile.in (SHELL): Use @SHELL@.
8477 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8479 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8482 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8484 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8485 Remove extraneous NULL element.
8487 2013-03-13 Yao Qi <yao@codesourcery.com>
8489 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8490 'V' block in trace frame.
8492 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8494 * target.h (struct target_ops): Add btrace ops.
8495 (target_supports_btrace): New macro.
8496 (target_enable_btrace): New macro.
8497 (target_disable_btrace): New macro.
8498 (target_read_btrace): New macro.
8499 * gdbthread.h (struct thread_info): Add btrace field.
8500 * server.c: Include btrace-common.h.
8501 (handle_btrace_general_set): New function.
8502 (handle_btrace_enable): New function.
8503 (handle_btrace_disable): New function.
8504 (handle_general_set): Call handle_btrace_general_set.
8505 (handle_qxfer_btrace): New function.
8506 (struct qxfer qxfer_packets[]): Add btrace entry.
8507 * inferiors.c (remove_thread): Disable btrace.
8508 * linux-low: Include linux-btrace.h.
8509 (linux_low_enable_btrace): New function.
8510 (linux_low_read_btrace): New function.
8511 (linux_target_ops): Add btrace ops.
8512 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8513 Add srv_linux_btrace=yes.
8514 (x86_64-*-linux*): Add linux-btrace.o.
8515 Add srv_linux_btrace=yes.
8516 * configure.ac: Define HAVE_LINUX_BTRACE.
8517 * config.in: Regenerated.
8518 * configure: Regenerated.
8520 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8522 * server.c (handle_qxfer): Preserve error message if -3 is
8524 (qxfer): Document the -3 return value.
8526 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8528 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8529 (linux_btrace_h): New variable.
8530 (linux-btrace.o): New rule.
8532 2013-03-08 Stan Shebs <stan@codesourcery.com>
8533 Hafiz Abid Qadeer <abidh@codesourcery.com>
8535 * tracepoint.c (trace_buffer_size): New global.
8536 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8537 (init_trace_buffer): Change to one-argument function. Allocate
8538 trace buffer memory.
8539 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8540 handle QTBuffer:size packet.
8541 (cmd_bigqtbuffer_size): New function.
8542 (initialize_tracepoint): Call init_trace_buffer with
8543 DEFAULT_TRACE_BUFFER_SIZE.
8544 * server.c (handle_query): Add QTBuffer:size in the
8547 2013-03-07 Yao Qi <yao@codesourcery.com>
8549 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8550 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8552 (cmd_qtsp): Adjust condition. Do post increment.
8553 Set cur_action and cur_step_action back to 0.
8555 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8558 * linux-low.c (linux_write_memory): Return early success if LEN is
8561 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8563 * configure.srv: Add x86_64-*-cygwin* as target.
8565 2013-02-28 Tom Tromey <tromey@redhat.com>
8567 * configure.ac: Invoke AC_SYS_LARGEFILE.
8568 * configure, config.in: Rebuild.
8570 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8572 * win32-low.c: Throughout, fix format strings and casts of
8573 printf-like functions to avoid type related warnings on all
8575 (get_child_debug_event): Print dwDebugEventCode as hex since
8576 that's how it's usually documented.
8578 2013-02-28 Yao Qi <yao@codesourcery.com>
8580 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8583 2013-02-27 Jiong Wang <jiwang@tilera.com>
8585 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8586 (reg-tilegx32.c): New rule.
8587 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8588 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8589 different register info initializer according to elf class.
8590 (init_registers_tilgx32): New function. The tilegx32 register info
8592 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8593 (tile_store_gregset): Likewise.
8595 2013-02-27 Yao Qi <yao@codesourcery.com>
8597 * server.c (process_point_options): Print debug message when
8598 debug_threads is true.
8600 2013-02-26 Yao Qi <yao@codesourcery.com>
8602 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8604 2013-02-19 Pedro Alves <palves@redhat.com>
8605 Kai Tietz <ktietz@redhat.com>
8609 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8610 instead of strtoul to extract address from packet.
8611 (process_serial_event) <'z'>: Likewise.
8613 2013-02-18 Yao Qi <yao@codesourcery.com>
8615 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8617 2013-02-14 Pedro Alves <palves@redhat.com>
8621 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8622 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8624 2013-02-14 Pedro Alves <palves@redhat.com>
8626 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8628 2013-02-14 Pedro Alves <palves@redhat.com>
8630 * tracepoint.c (save_string): Delete.
8631 (add_tracepoint_action): Use savestring instead of save_string.
8633 2013-02-12 Pedro Alves <palves@redhat.com>
8635 * linux-xtensa-low.c: Ditto.
8636 * xtensa-xtregs.c: Ditto.
8638 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8640 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8643 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8645 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8646 aarch64_num_wp_regs and aarch64_num_bp_regs to
8647 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8649 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8651 * linux-aarch64-low.c (ps_get_thread_area): Replace
8652 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8654 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8655 Marcus Shawcroft <marcus.shawcroft@arm.com>
8656 Nigel Stephens <nigel.stephens@arm.com>
8657 Yufeng Zhang <yufeng.zhang@arm.com>
8659 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8660 (aarch64.c, aarch64-without-fpu.c): New targets.
8661 * configure.srv (aarch64*-*-linux*): New.
8662 * linux-aarch64-low.c: New file.
8664 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8666 * linux-low.c (handle_extended_wait, linux_create_inferior)
8667 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8668 (dequeue_one_deferred_signal, linux_resume_one_thread)
8669 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8670 (linux_tracefork_grandchild, linux_test_for_tracefork)
8671 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8672 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8673 where the argument is 0.
8675 2013-01-25 Yao Qi <yao@codesourcery.com>
8677 * event-loop.c: Include "queue.h".
8678 (gdb_event_p): New typedef.
8679 (struct gdb_event) <next_event>: Remove.
8680 (event_queue): Change to QUEUE(gdb_event_p).
8681 (async_queue_event): Remove.
8682 (gdb_event_xfree): New.
8683 (initialize_event_loop): New.
8684 (process_event): Use API from QUEUE.
8685 (wait_for_event): Likewise.
8686 * server.c (main): Call initialize_event_loop.
8687 * server.h (initialize_event_loop): Declare.
8689 2013-01-18 Yao Qi <yao@codesourcery.com>
8691 * ax.h (struct eval_agent_expr_context): New.
8692 (gdb_eval_agent_expr): Update declaration.
8693 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8694 TFRAME. Add new argument CTX.
8695 * server.h (struct eval_agent_expr_context): Declare.
8696 (agent_mem_read, agent_tsv_read): Update declaration.
8697 (agent_mem_read_string): Likewise.
8698 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8699 (add_traceframe_block): Add new argument TPOINT.
8700 Increase TPOINT->traceframe_usage.
8701 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8702 eval_tracepoint_agent_expr.
8703 (condition_true_at_tracepoint): Likewise.
8704 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8705 (agent_mem_read_string, agent_tsv_read): Likewise.
8707 2013-01-16 Yao Qi <yao@codesourcery.com>
8709 * linux-low.c (linux_resume_one_lwp): Don't check
8710 'lwp->bp_reinsert != 0'.
8712 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8713 Pedro Alves <palves@redhat.com>
8715 * lynx-low.c (ptrace_request_to_str): Define a temporary
8716 macro and use it to simplify this function's implementation.
8718 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8720 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8723 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8725 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8727 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8729 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8731 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8733 * lynx-low.c (lynx_resume): Use the resume_info parameter
8734 to determine the ptid for the lynx_ptrace call, unless
8735 it is equal to minus_one_ptid, in which case we use the
8736 ptid of the current_inferior.
8737 (lynx_wait_1): After having received a thread create/exit
8738 event, resume the inferior's execution using the signaling
8739 thread's ptid, rather than the old ptid.
8741 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8743 * lynx-low.c (lynx_resume): Delete variable ret.
8745 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8747 * gdbreplay.c (gdbreplay_version): Update copyright year.
8748 * server.c (gdbserver_version): Likewise.
8750 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8752 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8755 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8757 * lynx-low.c (ptrace_request_to_str): Add handling for
8760 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8762 * lynx-low.c (lynx_attach): Delete variable new_process.
8764 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8766 * lynx-low.c (lynx_create_inferior): Delete variable
8769 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8771 * lynx-low.c (ptrace_request_to_str): Do not handle
8772 PTRACE_GETTHREADLIST if this macro does not exist.
8774 2012-12-15 Yao Qi <yao@codesourcery.com>
8776 * Makefile.in (OBS): Add notif.o.
8777 * notif.c, notif.h: New.
8778 * server.c: Include "notif.h".
8779 (struct vstop_notif) <next>: Remove.
8781 (queue_stop_reply): Update.
8782 (push_event, send_next_stop_reply): Remove.
8783 (discard_queued_stop_replies): Update.
8784 (notif_stop): New variable.
8785 (handle_v_stopped): Remove.
8786 (handle_v_requests): Don't call handle_v_stopped. Call
8787 handle_ack_notif instead.
8788 (queue_stop_reply_callback): Call notif_event_enque instead
8789 of queue_stop_reply.
8790 (handle_status): Don't call send_next_stop_reply, call
8791 notif_write_event instead.
8792 (kill_inferior_callback): Likewise.
8793 (detach_or_kill_inferior_callback): Likewise.
8794 (main): Call initialize_notif.
8795 (process_serial_event): Call QUEUE_is_empty.
8796 (handle_target_event): Call notif_push instead of push event.
8797 * server.h (push_event): Remove declaration.
8799 2012-12-10 Tom Tromey <tromey@redhat.com>
8801 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8802 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8805 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8806 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8807 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8808 (amd64-linux-ipa.o, ax.o): Rewrite.
8809 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8810 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8811 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8812 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8813 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8814 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8815 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8816 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8817 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8818 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8819 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8820 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8821 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8822 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8823 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8824 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8825 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8826 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8827 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8828 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8829 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8830 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8831 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8832 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8833 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8834 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8835 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8836 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8837 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8838 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8839 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8840 (reg-tilegx.o): Remove.
8841 (all_object_files): New macro.
8842 Include .deps files.
8843 * aclocal.m4, configure: Rebuild.
8844 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8845 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8846 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8848 2012-12-05 Tom Tromey <tromey@redhat.com>
8851 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8853 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8855 * configure.ac: Check for linux/perf_event.h.
8856 * config.in: Regenerated.
8857 * configure: Regenerated.
8859 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8861 * hostio.c (handle_readlink): Decrease buffer size
8862 parameter passed to readlink by one byte.
8864 2012-11-26 Yao Qi <yao@codesourcery.com>
8866 * configure.ac (build_warnings): Append '-Wempty-body'.
8867 * configure: Regenerated.
8868 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8871 2012-11-15 Pierre Muller <muller@sourceware.org>
8873 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8874 * config.in: Regenerate.
8875 * configure: Regenerate.
8876 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8877 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8878 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8879 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8881 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8882 instead of <sys/wait.h> header.
8883 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8885 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8887 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8888 (various make rules): Remove -DGDBSERVER
8890 2012-11-09 Yao Qi <yao@codesourcery.com>
8892 * spu-low.c (current_ptid): Move it to ..
8893 * gdbthread.h: ... here. New.
8894 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8895 * server.c (myresume, process_serial_event): Likewise.
8896 * thread-db.c (thread_db_find_new_threads): Likewise.
8897 * tracepoint.c (run_inferior_command): Likewise.
8899 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8901 * server.c (handle_search_memory_1): Include access length in
8904 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8906 * linux-crisv32-low.c: Fix compile errors.
8908 2012-09-04 Yao Qi <yao@codesourcery.com>
8910 * tracepoint.c (cmd_qtsv): Adjust debug message.
8911 Don't check CUR_TPOINT.
8913 2012-08-28 Yao Qi <yao@codesourcery.com>
8915 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8916 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8917 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8918 Remove declarations of xmalloc, xreallloc, xstrdup and
8920 * Makefile.in (libiberty_h): New.
8921 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8922 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8924 2012-08-23 Yao Qi <yao@codesourcery.com>
8926 * server.h: Remove declaration of 'xsnprintf'.
8928 2012-08-22 Keith Seitz <keiths@redhat.com>
8930 * server.h: Include build-gnulib-gbserver/config.h.
8931 * gdbreplay.c: Likewise.
8933 2012-08-08 Doug Evans <dje@google.com>
8935 * Makefile.in (SFILES): Add gdb_vecs.c.
8936 (OBS): Add gdb_vecs.o.
8937 (gdb_vecs_h, host_defs_h): New variables.
8938 (thread-db.o): Add $(gdb_vecs_h) dependency.
8939 (gdb_vecs.o): New rule.
8940 * thread-db.c: #include "gdb_vecs.h".
8941 (thread_db_load_search): Use a vector to iterate over path elements.
8942 Handle text appearing after "$pdir".
8944 * configure.ac: Add check for strstr.
8945 * config.in: Regenerate.
8946 * configure: Regenerate.
8948 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8950 * hostio.c (handle_pread): If pread fails, fall back to attempting
8952 (handle_pwrite): Likewise for pwrite.
8954 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8956 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8957 between unsupported TYPE and unimplementable ADDR/LEN combination.
8958 (arm_insert_point): Act on new return value.
8960 2012-07-31 Pedro Alves <palves@redhat.com>
8962 * server.c (process_point_options): Only skip tokens if we find
8963 one that is unrecognized. Don't treat 'X' specially while
8964 skipping unrecognized tokens.
8966 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8968 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8969 to 4-byte-align HW breakpoint addresses for Thumb.
8971 2012-07-27 Yao Qi <yao@codesourcery.com>
8975 * server.h: Declare gdb_agent_about_to_close.
8976 * target.c (kill_inferior): Include "agent.h".
8977 New. Send command 'kill'.
8978 * target.h (kill_inferior): Removed macro.
8979 * tracepoint.c (gdb_agent_about_to_close): New.
8980 (gdb_agent_helper_thread): Handle command 'close'.
8981 Wait endlessly until the inferior stops.
8982 Install gdb_agent_remove_socket to atexit hook.
8983 (agent_socket_name): New static variable.
8984 (gdb_agent_socket_init): Replace local variable 'name' with
8985 'agent_socket_name'.
8986 (gdb_agent_remove_socket): New.
8988 2012-07-27 Yao Qi <yao@codesourcery.com>
8990 * server.c (process_point_options): Stop at 'X' when parsing.
8992 2012-07-19 Michael Eager <eager@eagercon.com>
8994 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8996 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8997 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8998 hardware breakpoint.
9000 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9002 * gdbserver/linux-low.c (initialize_low): Call
9003 linux_ptrace_init_warnings.
9005 2012-07-02 Doug Evans <dje@google.com>
9007 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9010 2012-07-02 Stan Shebs <stan@codesourcery.com>
9012 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9013 (ax.o): Add it to build rule.
9015 (OBS): Add format.o.
9016 (IPA_OBS): Add format.o.
9017 * server.c (handle_query): Claim support for breakpoint commands.
9018 (process_point_options): Add command case.
9019 (process_serial_event): Leave running if there are printfs in
9021 * mem-break.h (any_persistent_commands): Declare.
9022 (add_breakpoint_commands): Declare.
9023 (gdb_no_commands_at_breakpoint): Declare.
9024 (run_breakpoint_commands): Declare.
9025 * mem-break.c (struct point_command_list): New struct.
9026 (struct breakpoint): New field command_list.
9027 (any_persistent_commands): New function.
9028 (add_commands_to_breakpoint): New function.
9029 (add_breakpoint_commands): New function.
9030 (gdb_no_commands_at_breakpoint): New function.
9031 (run_breakpoint_commands): New function.
9032 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9034 * ax.c: Include format.h.
9035 (ax_printf): New function.
9036 (gdb_eval_agent_expr): Add printf opcode.
9038 2012-06-13 Yao Qi <yao@codesourcery.com>
9040 * server.c (start_inferior): Remove duplicated writes to fields
9041 'last_resume_kind' and 'last_status' of 'current_inferior'.
9043 2012-06-12 Yao Qi <yao@codesourcery.com>
9044 Pedro Alves <palves@redhat.com>
9046 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9048 * server.c (handle_v_cont): Extend comment.
9050 2012-06-11 Yao Qi <yao@codesourcery.com>
9052 * linux-low.c (linux_attach): Add 'static'.
9054 2012-06-06 Yao Qi <yao@codesourcery.com>
9056 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9058 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9060 Fix gcc -flto compilation warning.
9061 * server.c (main): Make variable multi_mode and attach volatile.
9063 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9065 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9066 if the platform doesn't know about it.
9068 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9070 * Makefile.in (SFILES): Add linux-tile-low.c.
9071 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9072 * configure.srv: Handle tilegx-*-linux*.
9073 * linux-tile-low.c: New file.
9075 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9077 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9079 2012-05-24 Pedro Alves <palves@redhat.com>
9083 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9085 2012-05-24 Pedro Alves <palves@redhat.com>
9089 Replace target_signal with gdb_signal throughout.
9091 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9093 * linux-low.c (linux_store_registers): Avoid the copying sequence
9094 when no data has been retrieved by ptrace.
9096 2012-05-22 Will Deacon <will.deacon@arm.com>
9098 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9099 Include asm/ptrace.h.
9100 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9103 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9105 * linux-low.c (linux_store_registers): Don't re-retrieve data
9106 with ptrace that has already been obtained from /proc. Always
9107 copy any data retrieved with ptrace to the buffer supplied.
9109 2012-05-11 Yao Qi <yao@codesourcery.com>
9110 Pedro Alves <palves@redhat.com>
9112 * linux-low.c (enum stopping_threads_kind): New.
9113 (stopping_threads): Change type to `enum stopping_threads_kind'.
9114 (handle_extended_wait): If stopping and suspending threads, leave
9115 the new_lwp suspended too.
9116 (linux_wait_for_event): Adjust.
9117 (stop_all_lwps): Set `stopping_threads' to
9118 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9119 whether we're suspending threads or just stopping them. Assert no
9122 2012-04-29 Yao Qi <yao@codesourcery.com>
9124 * server.h: Move some code to ...
9125 * gdbthread.h: ... here. New.
9126 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9127 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9128 (nto-low.o, win32-low.o): Likewise.
9129 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9130 * regcache.c, remote-utils.c, server.c: Likewise.
9131 * target.c, tracepoint.c, win32-low.c: Likewise.
9133 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9135 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9136 (PTRACE_ARG4_TYPE): Likewise.
9137 (PTRACE_XFER_TYPE): Likewise.
9138 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9139 ptrace to PTRACE_ARG3_TYPE.
9140 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9141 (PTRACE_ARG4_TYPE): Likewise.
9142 (PTRACE_XFER_TYPE): Likewise.
9143 (linux_detach_one_lwp): Cast fourth argument of
9144 ptrace to long then PTRACE_ARG4_TYPE.
9145 (regsets_fetch_inferior_registers): Cast third argument of
9146 ptrace to long then PTRACE_ARG3_TYPE.
9147 (regsets_store_inferior_registers): Likewise.
9149 2012-04-20 Pedro Alves <palves@redhat.com>
9151 * configure: Regenerate.
9153 2012-04-19 Pedro Alves <palves@redhat.com>
9155 * Makefile.in (GNULIB_BUILDDIR): New.
9156 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9157 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9158 (all, install-only, uninstall, clean-info, all-lib, clean): No
9159 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9160 (maintainer-clean realclean distclean): Use subdir_do.
9162 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9163 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9164 * acinclude.m4: Include acx_configure_dir.m4.
9165 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9166 calls. Call AC_PROG_RANLIB. Configure gnulib using
9169 (GNULIB_STDINT_H): Adjust.
9170 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9171 * gdbreplay.c: Include build-gnulib/config.h.
9172 * server.h: Likewise.
9173 * aclocal.m4: Regenerate.
9174 * config.in: Regenerate.
9175 * configure: Regenerate.
9177 2012-04-19 Pedro Alves <palves@redhat.com>
9179 * Makefile.in (LIBGNU, INCGNU): Adjust.
9180 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9181 (all, install-only, uninstall, clean-info, all-lib, clean)
9182 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9183 * configure.ac: Adjust AC_OUTPUT output.
9184 * aclocal.m4: Regenerate.
9185 * configure: Regenerate.
9187 2012-04-19 Pedro Alves <palves@redhat.com>
9189 * Makefile.in (generated_files): New.
9190 (server_h): Remove the explicit dependency on config.h, and depend
9191 on $generated_files.
9193 2012-04-19 Pedro Alves <palves@redhat.com>
9195 * Makefile.in (INCGNU): Add -Ignulib.
9197 2012-04-19 Pedro Alves <palves@redhat.com>
9199 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9200 (INCGNU): ... this, and spell out -I here.
9201 (GNULIB_LIB): Rename to ...
9203 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9205 2012-04-19 Pedro Alves <palves@redhat.com>
9207 * config.in: Regenerate.
9209 2012-04-19 Pedro Alves <palves@redhat.com>
9211 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9212 * server.h (memmem): Remove declaration.
9213 * config.in: Regenerate.
9214 * configure: Regenerate.
9216 2012-04-19 Yao Qi <yao@codesourcery.com>
9218 * Makefile.in (SFILES): Add common/vec.c.
9222 2012-04-19 Yao Qi <yao@codesourcery.com>
9224 * remote-utils.c (prepare_resume_reply): Replace with macro
9225 target_core_of_thread.
9226 * server.c (handle_qxfer_threads_proper): Likewise.
9227 * target.h (traget_core_of_thread): New macro.
9229 2012-04-18 Pedro Alves <palves@redhat.com>
9231 * aclocal.m4: Regenerate.
9232 * configure: Regenerate.
9234 2012-04-16 Yao Qi <yao@codesourcery.com>
9236 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9237 duplicated on address.
9239 2012-04-16 Yao Qi <yao@codesourcery.com>
9241 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9242 (struct tracepoint_action_ops) <send>: New field.
9243 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9244 (agent_expr_send, x_tracepoint_action_send): New.
9245 (l_tracepoint_action_send): New.
9246 (cmd_qtdp): Download and install tracepoint
9247 according to `use_agent'.
9248 (run_inferior_command): Add one more parameter `len'.
9250 (tracepoint_send_agent): New.
9251 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9253 2012-04-16 Yao Qi <yao@codesourcery.com>
9255 * tracepoint.c (download_tracepoints): Moved to ...
9256 (cmd_qtstart): ... here.
9258 2012-04-14 Yao Qi <yao@codesourcery.com>
9260 * tracepoint.c: Include inttypes.h.
9261 (struct collect_memory_action): Use sized types.
9262 (struct tracepoint): Likewise.
9263 (cmd_qtdp, stop_tracing): Update print specifiers.
9264 (cmd_qtp, response_tracepoint): Likewise.
9265 (collect_data_at_tracepoint): Likewise.
9266 (collect_data_at_step): Likewise.
9268 2012-04-14 Yao Qi <yao@codesourcery.com>
9270 Import gnulib module inttypes.
9271 * aclocal.m4, config.in, configure: Regenerated.
9273 2012-04-14 Yao Qi <yao@codesourcery.com>
9275 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9276 Makefile and config.status at last.
9278 2012-04-13 Yao Qi <yao@codesourcery.com>
9280 * tracepoint.c: Include stdint.h unconditionally.
9282 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9284 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9285 on BFD_HAVE_SYS_PROCFS_TYPE.
9286 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9287 * configure: Regenerate.
9288 * config.in: Likewise.
9290 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9292 * Makefile.in (clean): Also remove x32.c x32-linux.c
9293 x32-avx.c x32-avx-linux.c.
9294 (x32.o): New target.
9296 (x32-linux.o): Likewise.
9297 (x32-linux.c): Likewise.
9298 (x32-avx.o): Likewise.
9299 (x32-avx.c): Likewise.
9300 (x32-avx-linux.o): Likewise.
9301 (x32-avx-linux.c): Likewise.
9303 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9304 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9305 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9306 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9307 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9308 i386/x32-avx-linux.xml.
9310 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9311 (init_registers_x32_avx_linux): Likwise.
9312 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9313 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9315 2012-04-13 Pedro Alves <palves@redhat.com>
9317 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9318 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9319 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9320 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9323 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9325 * linux-x86-low.c (compat_x32_clock_t): New.
9326 (compat_x32_siginfo_t): Likewise.
9327 (compat_x32_siginfo_from_siginfo): Likewise.
9328 (siginfo_from_compat_x32_siginfo): Likewise.
9329 (linux_is_elf64): Likewise.
9330 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9331 and siginfo_from_compat_x32_siginfo for x32.
9332 (x86_arch_setup): Set linux_is_elf64.
9334 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9337 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9339 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9340 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9341 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9342 compatible with process.
9344 2012-04-12 Yao Qi <yao@codesourcery.com>
9346 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9347 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9348 (install-only, install-info, clean): Handle sub dir gnulib.
9349 (all-lib, am--refresh): New targets.
9350 (memmem.o): Remove target.
9351 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9352 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9353 (AC_REPLACE_FUNCS): Remove memmem.
9354 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9355 (AC_OUTPUT): Generate Makefile in gnulib/.
9356 * aclocal.m4, config.in, configure: Regenerated.
9358 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9360 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9362 2012-04-05 Pedro Alves <palves@redhat.com>
9364 -Werror=strict-aliasing
9366 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9369 2012-04-04 Pedro Alves <palves@redhat.com>
9371 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9372 (sparc_store_gregset_from_stack, sparc_store_gregset)
9373 (sparc_breakpoint_at): Fix formatting.
9375 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9377 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9379 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9380 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9381 * config.in: Regenerate.
9382 * configure: Likewise.
9384 2012-03-29 Pedro Alves <palves@redhat.com>
9386 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9387 Correct ptrace arguments.
9389 2012-03-28 Pedro Alves <palves@redhat.com>
9391 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9392 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9393 (IA64_FR1_REGNUM): New defines.
9394 (ia64_fetch_register): New.
9395 (the_low_target): Install it.
9396 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9398 * linux-low.c (linux_fetch_registers): Try the
9399 the_low_target.fetch_register hook first.
9401 * linux-arm-low.c (the_low_target): Adjust.
9402 * linux-bfin-low.c (the_low_target): Adjust.
9403 * linux-cris-low.c (the_low_target): Adjust.
9404 * linux-crisv32-low.c (the_low_target): Adjust.
9405 * linux-m32r-low.c (the_low_target): Adjust.
9406 * linux-m68k-low.c (the_low_target): Adjust.
9407 * linux-mips-low.c (the_low_target): Adjust.
9408 * linux-ppc-low.c (the_low_target): Adjust.
9409 * linux-s390-low.c (the_low_target): Adjust.
9410 * linux-sh-low.c (the_low_target): Adjust.
9411 * linux-sparc-low.c (the_low_target): Adjust.
9412 * linux-tic6x-low.c (the_low_target): Adjust.
9413 * linux-x86-low.c (the_low_target): Adjust.
9414 * linux-xtensa-low.c (the_low_target): Adjust.
9416 2012-03-26 Pedro Alves <palves@redhat.com>
9418 * server.c (handle_qxfer_libraries): Don't bail early if
9419 the_target->qxfer_libraries_svr4 is not NULL.
9421 2012-03-26 Pedro Alves <palves@redhat.com>
9423 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9425 2012-03-23 Pedro Alves <palves@redhat.com>
9427 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9428 "library-list-svr4" element's start tag when the the DSO list is
9431 2012-03-23 Pedro Alves <palves@redhat.com>
9433 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9434 a variable whose type size is the same as the inferior's pointer
9437 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9439 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9441 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9442 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9443 * linux-low.h: Include <signal.h>.
9444 (struct siginfo): Remove forward declaration.
9445 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9448 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9450 * .gitignore: Ignore more files.
9452 2012-03-19 Pedro Alves <palves@redhat.com>
9453 Jan Kratochvil <jan.kratochvil@redhat.com>
9455 * server.c (cont_thread, general_thread): Add describing comments.
9456 (start_inferior): Clear `cont_thread'.
9457 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9460 2012-03-15 Yao Qi <yao@codesourcery.com>
9462 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9464 (cmd_qtdp): ... here.
9466 2012-03-15 Yao Qi <yao@codesourcery.com>
9468 * tracepoint.c (struct tracepoint_action_ops): New.
9469 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9470 (m_tracepoint_action_download): New.
9471 (r_tracepoint_action_download): New.
9472 (x_tracepoint_action_download): New.
9473 (l_tracepoint_action_download): New.
9474 (add_tracepoint_action): Install `action->ops' according type.
9475 (download_tracepoint_1): Move code `download' function pointer
9476 of various tracepoint_action_ops.
9478 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9480 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9481 linux_ptrace_attach_warnings.
9483 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9485 * Makefile.in (linux-ptrace.o): New.
9486 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9487 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9488 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9489 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9490 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9492 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9494 2012-03-08 Yao Qi <yao@codesourcery.com>
9495 Pedro Alves <palves@redhat.com>
9497 Fix PR server/13392.
9498 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9500 * tracepoint.c (remove_tracepoint): New.
9501 (cmd_qtdp): Call remove_tracepoint when failed to install.
9503 2012-03-07 Pedro Alves <palves@redhat.com>
9505 * linux-low.c (get_detach_signal): New.
9506 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9507 Pass on pending signals to PTRACE_DETACH. Check the result of the
9509 * server.c (program_signals, program_signals_p): New.
9510 (handle_general_set): Handle QProgramSignals.
9511 * server.h (program_signals, program_signals_p): Declare.
9513 2012-03-05 Pedro Alves <palves@redhat.com>
9514 Jan Kratochvil <jan.kratochvil@redhat.com>
9516 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9519 2012-03-03 Yao Qi <yao@codesourcery.com>
9521 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9522 agent_look_up_symbols.
9524 2012-03-03 Yao Qi <yao@codesourcery.com>
9526 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9527 (linux-x86-low.o): Likewise.
9528 * server.h: Remove in_process_agent_loaded.
9529 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9533 2012-03-03 Yao Qi <yao@codesourcery.com>
9535 * tracepoint.c (gdb_agent_capability): New global.
9536 (in_process_agent_loaded_ust): Renamed to
9537 `in_process_agent_supports_ust'.
9539 (in_process_agent_supports_ust): Call agent_capability_check.
9540 (clear_installed_tracepoints): Assert that agent supports
9543 2012-03-03 Yao Qi <yao@codesourcery.com>
9545 * linux-low.c (linux_supports_agent): New.
9546 (linux_target_ops): Initialize field `supports_agent' with
9547 linux_supports_agent.
9548 * target.h (struct target_ops) <supports_agent>: New.
9549 (target_supports_agent): New macro.
9550 * server.c (handle_general_set): Handle packet 'QAgent'.
9551 (handle_query): Send `QAgent+'.
9552 * Makefile.in (server.o): Depends on agent.h.
9554 2012-03-03 Yao Qi <yao@codesourcery.com>
9556 * Makefile.in (OBS): Add agent.o.
9557 Add new rule for agent.o.
9558 Track dependence of tracepoint.c on agent.h.
9559 * tracepoint.c (run_inferior_command_1):
9560 (run_inferior_command): Call agent_run_command.
9561 (gdb_ust_connect_sync_socket): Deleted. Move it to
9563 (resume_thread, stop_thread): Likewise.
9564 (gdb_ust_socket_init): Renamed to ...
9565 (gdb_agent_socket_init): ... New.
9566 (gdb_ust_thread): Renamed to ...
9567 (gdb_agent_helper_thread): ... New.
9568 (gdb_ust_init): Move some code to ...
9569 (gdb_agent_init): ... here. New.
9570 [HAVE_UST]: Call gdb_ust_init.
9571 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9572 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9573 * config.in, configure: Regenerated.
9575 2012-03-02 Pedro Alves <palves@redhat.com>
9577 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9578 * linux-low.c (struct simple_pid_list): New.
9579 (stopped_pids): New a struct simple_pid_list pointer.
9580 (add_to_pid_list, pull_pid_from_list): New.
9581 (handle_extended_wait): Don't assume the first signal new children
9582 report is SIGSTOP. Adjust call to pull_pid_from_list.
9583 (linux_wait_for_lwp): Adjust.
9585 2012-03-02 Yao Qi <yao@codesourcery.com>
9587 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9590 2012-03-02 Yao Qi <yao@codesourcery.com>
9592 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9593 `stop_pc' and `tpoint'. Update caller.
9595 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9597 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9598 * linux-low.c (use_linux_regsets): New macro.
9599 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9600 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9601 (linux_register_in_regsets): New function.
9602 (usr_fetch_inferior_registers): Skip registers covered by
9604 (usr_store_inferior_registers): Likewise.
9605 (usr_fetch_inferior_registers): New macro.
9606 (usr_store_inferior_registers): Likewise.
9607 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9608 (linux_store_registers): Likewise.
9609 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9611 (init_registers_mips64_dsp_linux): Likewise.
9612 (init_registers_mips_linux): New macro.
9613 (init_registers_mips_dsp_linux): Likewise.
9614 (mips_dsp_num_regs): Likewise.
9615 (DSP_BASE, DSP_CONTROL): New fallback macros.
9616 (mips_base_regs): New macro.
9617 (mips_regmap): Use it. Fix the size.
9618 (mips_dsp_regmap): New variable.
9619 (mips_dsp_regset_bitmap): Likewise.
9620 (mips_arch_setup): New function.
9621 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9623 (mips_cannot_store_register): Likewise.
9624 (the_low_target): Update .arch_setup, .num_regs and .regmap
9625 initializers. Add .regset_bitmap initializer.
9626 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9628 * linux-bfin-low.c (the_low_target): Likewise.
9629 * linux-cris-low.c (the_low_target): Likewise.
9630 * linux-crisv32-low.c (the_low_target): Likewise.
9631 * linux-ia64-low.c (the_low_target): Likewise.
9632 * linux-m32r-low.c (the_low_target): Likewise.
9633 * linux-m68k-low.c (the_low_target): Likewise.
9634 * linux-ppc-low.c (the_low_target): Likewise.
9635 * linux-s390-low.c (the_low_target): Likewise.
9636 * linux-sh-low.c (the_low_target): Likewise.
9637 * linux-sparc-low.c (the_low_target): Likewise.
9638 * linux-tic6x-low.c (the_low_target): Likewise.
9639 * linux-x86-low.c (the_low_target): Likewise.
9640 * linux-xtensa-low.c (the_low_target): Likewise.
9641 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9642 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9643 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9645 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9646 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9648 2012-02-29 Yao Qi <yao@codesourcery.com>
9649 Pedro Alves <palves@redhat.com>
9651 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9652 `step_over_finished' is true.
9654 2012-02-27 Pedro Alves <palves@redhat.com>
9656 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9657 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9659 2012-02-27 Pedro Alves <palves@redhat.com>
9662 * linux-low.c (pid_is_stopped): New.
9663 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9665 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9667 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9670 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9672 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9674 2012-02-24 Luis Machado <lgustavo@codesourcery>
9676 * server.c (handle_query): Advertise support for target-side
9677 breakpoint condition evaluation.
9678 (process_point_options): New function.
9679 (process_serial_event): When inserting a breakpoint, check for
9680 a target-side condition that should be evaluated.
9682 * mem-break.c: Include regcache.h and ax.h.
9683 (point_cond_list_t): New data structure.
9684 (breakpoint) <cond_list>: New field.
9685 (find_gdb_breakpoint_at): Make non-static.
9686 (delete_gdb_breakpoint_at): Clear any target-side
9688 (clear_gdb_breakpoint_conditions): New function.
9689 (add_condition_to_breakpoint): Likewise.
9690 (add_breakpoint_condition): Likewise.
9691 (gdb_condition_true_at_breakpoint): Likewise.
9692 (gdb_breakpoint_here): Return result directly instead
9693 of going through a local variable.
9695 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9696 (clear_gdb_breakpoint_conditions): Likewise.
9697 (add_breakpoint_condition): Likewise.
9698 (gdb_condition_true_at_breakpoint): Likewise.
9700 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9701 (need_step_over_p): Take target-side breakpoint condition into
9704 2012-02-24 Luis Machado <lgustavo@codesourcery>
9706 * server.h: Include tracepoint.h.
9707 (agent_mem_read, agent_get_trace_state_variable_value,
9708 agent_set_trace_state_variable_value,
9709 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9710 get_set_tsv_func_addr): New prototypes.
9712 * ax.h: New include file.
9713 * ax.c: New source file.
9715 * tracepoint.c: Include ax.h.
9716 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9717 agent_expr, eval_result_type): Move to ax.h.
9718 (parse_agent_expr): Rename to ...
9719 (gdb_parse_agent_expr): ... this, make it non-static and move
9721 (unparse_agent_expr) Rename to ...
9722 (gdb_unparse_agent_expr): ... this, make it non-static and move
9724 (eval_agent_expr): Rename to ...
9725 (eval_tracepoint_agent_expr): ... this.
9726 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9727 forward declarations.
9728 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9729 (agent_get_trace_state_variable_value): New function.
9730 (agent_set_trace_state_variable_value): New function.
9731 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9732 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9733 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9734 (condition_true_at_tracepoint): Likewise.
9735 (parse_agent_expr): Rename to ...
9736 (gdb_parse_agent_expr): ... this and move to ax.c.
9737 (unparse_agent_expr): Rename to ...
9738 (gdb_unparse_agent_expr): ... this and move to ax.c.
9739 (gdb_agent_op_name): Move to ax.c.
9740 (eval_agent_expr): Rename to ...
9741 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9743 (eval_tracepoint_agent_expr): New function.
9744 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9746 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9748 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9749 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9750 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9751 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9752 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9753 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9754 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9755 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9756 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9757 (compile_bytecodes): Remove forward declaration.
9758 (is_goto_target): Move to ax.c.
9759 (compile_bytecodes): Move to ax.c and call
9760 agent_get_trace_state_variable_value (...) and
9761 agent_set_trace_state_variable_value (...).
9763 * Makefile.in: Update ax.c and IPA dependencies.
9765 2012-02-24 Pedro Alves <palves@redhat.com>
9767 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9768 (cmd_bigqtbuffer_circular): ... this. Only handle
9769 'QTBuffer:circular:'.
9770 (handle_tracepoint_general_set): Adjust.
9772 2012-02-16 Yao Qi <yao@codesourcery.com>
9774 * inferiors.c: Move code to ...
9775 * dll.c: .... here. New.
9776 * server.h: Declare clear_dlls.
9777 * Makefile.in (SFILES): Add dll.c.
9781 2012-02-11 Yao Qi <yao@codesourcery.com>
9783 * server.c: (handle_monitor_command): Add a new parameter
9785 (handle_query): Update caller.
9787 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9789 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9790 * configure, config.in: Regenerate.
9791 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9794 2012-02-02 Pedro Alves <palves@redhat.com>
9796 Try SIGKILL first, then PTRACE_KILL.
9797 * linux-low.c (linux_kill_one_lwp): New.
9798 (linux_kill_one_lwp): Rename to ...
9799 (kill_one_lwp_callback): ... this. Use the new
9802 2012-02-02 Pedro Alves <palves@redhat.com>
9804 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9807 2012-01-27 Pedro Alves <palves@redhat.com>
9809 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9810 (elf_64_file_p): Make static.
9811 (linux_pid_exe_is_elf_64_file): New.
9812 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9813 Delete declarations.
9814 (linux_pid_exe_is_elf_64_file): Declare.
9815 * linux-x86-low.c (x86_arch_setup): Use
9816 linux_pid_exe_is_elf_64_file.
9818 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9820 * linux-low.c (linux_wait_for_event_1): Rename to ...
9821 (linux_wait_for_event): ... here and merge it with former
9822 linux_wait_for_event - new variable wait_ptid, use it.
9823 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9825 2012-01-23 Pedro Alves <palves@redhat.com>
9827 * server.c (main): Avoid yet another case of infinite loop while
9828 detaching/killing after a longjmp.
9830 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9833 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9835 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9837 * hostio.c (handle_readlink): New function.
9838 (handle_vFile): Call it to handle "vFile:readlink" packets.
9840 2012-01-20 Pedro Alves <palves@redhat.com>
9841 Ulrich Weigand <ulrich.weigand@linaro.org>
9843 * server.c (handle_v_requests): Only support vAttach and vRun to
9844 start multiple processes when in extended protocol mode.
9846 2012-01-17 Pedro Alves <palves@redhat.com>
9848 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9849 memalign plus mprotect to allocate the scratch buffer.
9851 2012-01-13 Pedro Alves <palves@redhat.com>
9853 * server.c (attach_inferior): Clear `cont_thread'.
9855 2012-01-13 Pedro Alves <palves@redhat.com>
9857 * server.c (main): Avoid infinite loop while detaching/killing
9860 2012-01-09 Doug Evans <dje@google.com>
9862 * server.c (start_inferior): Set last_ptid in --wrapper case.
9864 2012-01-06 Yao Qi <yao@codesourcery.com>
9866 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9868 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9870 2012-01-04 Yao Qi <yao@codesourcery.com>
9872 * tracepoint.c (cmd_qtdp): Print debug message
9873 for static tracepoint.
9875 2012-01-04 Yao Qi <yao@codesourcery.com>
9877 * tracepoint.c (trace_vdebug): Differentiate debug message
9878 between gdbserver and IPA.
9880 2012-01-03 Yao Qi <yao@codesourcery.com>
9882 * tracepoint.c (tracepoint_was_hit): Don't collect for
9885 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9887 * terminal.h: Reformat copyright header.
9889 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9891 * server.c (gdbserver_version): Update copyright year.
9892 * gdbreplay.c (gdbreplay_version): Likewise.
9894 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9896 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9899 2011-12-18 Hui Zhu <teawater@gmail.com>
9900 * linux-low.c (linux_create_inferior): Save return value to ret.
9902 2011-12-18 Hui Zhu <teawater@gmail.com>
9904 * linux-low.c (linux_create_inferior): Save return value to ret.
9906 2011-12-16 Doug Evans <dje@google.com>
9908 * linux-low.c (linux_create_inferior): If stdio connection,
9909 redirect stdin from /dev/null, stdout to stderr.
9910 * remote-utils.c (remote_is_stdio): New static global.
9911 (remote_connection_is_stdio): New function.
9912 (remote_prepare): Handle stdio connection.
9913 (remote_open): Ditto.
9914 (remote_close): Don't close stdin for stdio connections.
9915 (read_prim,write_prim): New functions. Replace all calls to
9916 read/write to these.
9917 * server.c (main): Watch for "-" argument. Move call to
9918 remote_prepare before start_inferior.
9919 * server.h (STDIO_CONNECTION_NAME): New macro.
9920 (remote_connection_is_stdio): Declare.
9922 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9923 in debugging output.
9925 2011-12-15 Yao Qi <yao@codesourcery.com>
9927 * tracepoint.c: Include sys/syscall.h.
9928 (gdb_ust_thread): Remove preprocessor conditional.
9930 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9932 * linux-low.c (linux_detach_one_lwp): Call
9933 the_low_target.prepare_to_resume before detaching.
9935 2011-12-14 Yao Qi <yao@codesourcery.com>
9937 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9940 2011-12-14 Yao Qi <yao@codesourcery.com>
9942 * i386-low.c (i386_low_stopped_data_address): Initialize local
9945 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9949 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9950 DR_CONTROL unless necessary. Extend comments.
9951 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9952 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9954 2011-12-13 Yao Qi <yao@codesourcery.com>
9956 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9958 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9960 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9962 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9963 Print new debug message for such case.
9965 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9967 Fix overlapping memcpy.
9968 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9969 the read_inferior_memory transfer.
9970 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9971 write_inferior_memory transfer.
9972 (set_fast_tracepoint_jump): New variable buf. Use it for the
9973 read_inferior_memory and write_inferior_memory transfers.
9974 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9975 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9976 Use it for the write_inferior_memory transfer.
9977 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9980 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9982 * linux-low.c (fetch_register, store_register): Make code
9983 consistent, fix formatting.
9985 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9987 * linux-low.c (usr_store_inferior_registers): Factor out code
9988 to handle individual registers into...
9989 (store_register): ... this new function.
9991 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9993 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9994 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9995 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9996 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9997 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9998 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9999 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10000 (srv_xmlfiles): Add new XML files.
10002 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10004 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10005 (init_registers_s390_linux32v1): Add prototype.
10006 (init_registers_s390_linux32v2): Likewise.
10007 (init_registers_s390_linux64v1): Likewise.
10008 (init_registers_s390_linux64v2): Likewise.
10009 (init_registers_s390x_linux64v1): Likewise.
10010 (init_registers_s390x_linux64v2): Likewise.
10011 (s390_num_regs): Increment to 52.
10012 (s390_regmap): Add orig_r2 register.
10013 (s390_num_regs_3264): Increment to 68.
10014 (s390_regmap_3264): Add orig_r2 register.
10015 (s390_collect_ptrace_register): Handle orig_r2 register.
10016 (s390_supply_ptrace_register): Likewise.
10017 (s390_fill_last_break): New function.
10018 (s390_store_last_break): Likewise.
10019 (s390_fill_system_call): New function.
10020 (s390_store_system_call): Likewise.
10021 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10023 (s390_check_regset): New function.
10024 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10025 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10026 Update target_regsets for available register sets.
10028 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10029 Jan Kratochvil <jan.kratochvil@redhat.com>
10031 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10032 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10034 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10035 * linux-low.h (struct process_info_private): New member r_debug.
10036 * server.c (handle_qxfer_libraries): Call
10037 the_target->qxfer_libraries_svr4.
10038 (handle_qxfer_libraries_svr4): New function.
10039 (qxfer_packets): New entry "libraries-svr4".
10040 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10041 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10042 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10043 PACKET_qXfer_libraries_svr4.
10045 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10047 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10048 PSW address/mask between 8-byte and 16-byte formats.
10049 (s390_supply_ptrace_register): Likewise.
10050 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10051 basic addressing mode bit.
10053 2011-11-24 Stan Shebs <stan@codesourcery.com>
10055 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10057 2011-11-17 Stan Shebs <stan@codesourcery.com>
10059 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10060 (tracing_start_time): New global.
10061 (tracing_stop_time): New global.
10062 (tracing_user_name): New global.
10063 (tracing_notes): New global.
10064 (tracing_stop_note): New global.
10065 (cmd_qtstart): Set traceframe_usage, start_time.
10066 (stop_tracing): Set stop_time.
10067 (cmd_qtstatus): Report additional status.
10068 (cmd_qtp): New function.
10069 (handle_tracepoint_query): Call it.
10070 (cmd_qtnotes): New function.
10071 (handle_tracepoint_general_set): Call it.
10072 (get_timestamp): Rename from tsv_get_timestamp.
10074 2011-11-14 Stan Shebs <stan@codesourcery.com>
10075 Kwok Cheung Yeung <kcy@codesourcery.com>
10077 * linux-x86-low.c (small_jump_insn): New.
10078 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10079 trampoline and error message, build a trampoline and issue a small
10080 jump instruction to it.
10081 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10082 trampoline and error message.
10083 (x86_get_min_fast_tracepoint_insn_len): New.
10084 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10085 * linux-low.h (struct linux_target_ops): Add arguments to
10086 install_fast_tracepoint_jump_pad operation, add new operation.
10087 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10089 (linux_get_min_fast_tracepoint_insn_len): New function.
10090 (linux_target_op): Add new operation.
10091 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10092 (gdb_trampoline_buffer_end): Ditto.
10093 (gdb_trampoline_buffer_error): Ditto.
10094 (struct ipa_sym_addresses): Add fields for new IPA variables.
10095 (symbol_list): Add entries for new IPA variables.
10096 (struct tracepoint): Add fields to hold the address range of the
10097 trampoline used by the tracepoint.
10098 (trampoline_buffer_head): New static variable.
10099 (trampoline_buffer_tail): Ditto.
10100 (claim_trampoline_space): New function.
10101 (have_fast_tracepoint_trampoline_buffer): New function.
10102 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10104 (install_fast_tracepoint): Ditto, also add error buffer argument.
10105 (cmd_qtminftpilen): New function.
10106 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10107 (fast_tracepoint_from_trampoline_address): New function.
10108 (fast_tracepoint_collecting): Handle trampoline as part of jump
10110 (set_trampoline_buffer_space): New function.
10111 (initialize_tracepoint): Initialize new IPA variables.
10112 * target.h (struct target_ops): Add arguments to
10113 install_fast_tracepoint_jump_pad operation, add new
10114 get_min_fast_tracepoint_insn_len operation.
10115 (target_get_min_fast_tracepoint_insn_len): New.
10116 (install_fast_tracepoint_jump_pad): Add arguments.
10117 * server.h (IPA_BUFSIZ): Define.
10118 * linux-i386-ipa.c: Include extra header files.
10119 (initialize_fast_tracepoint_trampoline_buffer): New function.
10120 (initialize_low_tracepoint): Call it.
10121 * server.h (set_trampoline_buffer_space): Declare.
10122 (claim_trampoline_space): Ditto.
10123 (have_fast_tracepoint_trampoline_buffer): Ditto.
10125 2011-11-14 Yao Qi <yao@codesourcery.com>
10127 * server.c (handle_query): Handle InstallInTrace for qSupported.
10128 * tracepoint.c (add_tracepoint): Sort list.
10129 (install_tracepoint, download_tracepoint): New.
10130 (cmd_qtdp): Call them to install and download tracepoints.
10131 (sort_tracepoints): Removed.
10132 (cmd_qtstart): Update.
10134 2011-11-14 Yao Qi <yao@codesourcery.com>
10136 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10137 * mem-break.h: Declare.
10138 * tracepoint.c (cmd_qtstart): Move some code to ...
10139 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10141 (download_tracepoints): Move some code to ...
10142 (download_tracepoint_1): ... here. New.
10144 2011-11-08 Yao Qi <yao@codesourcery.com>
10146 * remote-utils.c (relocate_instruction): A comment fix.
10148 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10150 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10151 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10152 dr_status_mirror and dr_control_mirror from debug_reg_state.
10153 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10154 (i386_initial_stuff): Remove use of deleted globals.
10155 (i386_get_thread_context, i386_set_thread_context,
10156 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10157 from debug_reg_state.
10159 2011-11-05 Yao Qi <yao@codesourcery.com>
10161 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10162 address as TPOINT's.
10164 2011-11-02 Stan Shebs <stan@codesourcery.com>
10166 * tracepoint.c (agent_mem_read_string): New function.
10167 (eval_agent_expr): Call it for tracenz.
10168 * server.c (handle_query): Report support for tracenz.
10170 2011-11-02 Yao Qi <yao@codesourcery.com>
10172 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10174 2011-11-02 Yao Qi <yao@codesourcery.com>
10176 * target.h: Fix a typo in comment.
10178 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10180 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10181 clobber the breakpoints' shadows with fast tracepoint jumps.
10182 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10183 * target.c (write_inferior_memory): Also pass MYADDR down to
10186 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10188 * configure.ac: Check support for personality routine.
10189 * configure: Regenerate.
10190 * config.in: Likewise.
10191 * linux-low.c: Include <sys/personality.h>.
10192 Define ADDR_NO_RANDOMIZE if necessary.
10193 (linux_create_inferior): Disable address space randomization when
10194 forking inferior, if requested.
10195 (linux_supports_disable_randomization): New function.
10196 (linux_target_ops): Install it.
10197 * server.h (disable_randomization): Declare.
10198 * server.c (disable_randomization): New global variable.
10199 (handle_general_set): Handle QDisableRandomization.
10200 (handle_query): Likewise for qSupported.
10201 (main): Support --disable-randomization and --no-disable-randomization
10202 command line arguments.
10203 * target.h (struct target_ops): Add supports_disable_randomization.
10204 (target_supports_disable_randomization): New macro.
10206 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10208 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10210 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10211 [!PT_GETDSBT] (target_loadmap): New definition.
10212 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10213 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10214 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10215 and PT_GETDSBT to LINUX_LOADMAP.
10216 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10217 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10219 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10221 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10222 (arm_linux_hwbp_cap): New static variable.
10223 (arm_linux_get_hwbp_cap): Replace by ...
10224 (arm_linux_init_hwbp_cap): ... this new function.
10225 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10226 (arm_linux_get_hw_watchpoint_count): Likewise.
10227 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10228 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10229 (arm_prepare_to_resume): Use perror_with_name instead of error.
10231 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10233 * linux-arm-low.c: Include <signal.h>.
10234 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10235 (struct arm_linux_hwbp_cap): New data type.
10236 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10237 (struct arm_linux_hw_breakpoint): New data type.
10238 (MAX_BPTS, MAX_WPTS): Define.
10239 (struct arch_process_info, struct arch_lwp_info): New data types.
10240 (arm_linux_get_hwbp_cap): New function.
10241 (arm_linux_get_hw_breakpoint_count): Likewise.
10242 (arm_linux_get_hw_watchpoint_count): Likewise.
10243 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10244 (arm_hwbp_control_initialize): Likewise.
10245 (arm_hwbp_control_is_enabled): Likewise.
10246 (arm_hwbp_control_is_initialized): Likewise.
10247 (arm_hwbp_control_disable): Likewise.
10248 (arm_linux_hw_breakpoint_equal): Likewise.
10249 (arm_linux_hw_point_initialize): Likewise.
10250 (struct update_registers_data): New data structure.
10251 (update_registers_callback: New function.
10252 (arm_insert_point): Likewise.
10253 (arm_remove_point): Likewise.
10254 (arm_stopped_by_watchpoint): Likewise.
10255 (arm_stopped_data_address): Likewise.
10256 (arm_new_process): Likewise.
10257 (arm_new_thread): Likewise.
10258 (arm_prepare_to_resume): Likewise.
10259 (the_low_target): Register arm_insert_point, arm_remove_point,
10260 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10261 arm_new_thread, and arm_prepare_to_resume.
10263 2011-09-15 Stan Shebs <stan@codesourcery.com>
10265 * server.h (struct emit_ops): Add compare-goto fields.
10266 * tracepoint.c (gdb_agent_op_sizes): New table.
10267 (emit_eq_goto): New function.
10268 (emit_ne_goto): New function.
10269 (emit_lt_goto): New function.
10270 (emit_le_goto): New function.
10271 (emit_gt_goto): New function.
10272 (emit_ge_goto): New function.
10273 (is_goto_target): New function.
10274 (compile_bytecodes): Recognize special cases of compare-goto
10275 combinations and call specialized emitters for them.
10276 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10277 (amd64_emit_ne_goto): New function.
10278 (amd64_emit_lt_goto): New function.
10279 (amd64_emit_le_goto): New function.
10280 (amd64_emit_gt_goto): New function.
10281 (amd64_emit_ge_goto): New function.
10282 (amd64_emit_ops): Add the new functions.
10283 (i386_emit_eq_goto): New function.
10284 (i386_emit_ne_goto): New function.
10285 (i386_emit_lt_goto): New function.
10286 (i386_emit_le_goto): New function.
10287 (i386_emit_gt_goto): New function.
10288 (i386_emit_ge_goto): New function.
10289 (i386_emit_ops): Add the new functions.
10291 2011-09-08 Stan Shebs <stan@codesourcery.com>
10293 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10294 (i386_emit_epilogue): Restore %ebx.
10296 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10298 * server.c (step_thread): Remove definition.
10299 (process_serial_event): Don't handle Hs.
10300 * server.h (step_thread): Remove declaration.
10301 * target.c (set_desired_inferior): Remove use of step_thread.
10303 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10305 * linux-low.c: Include linux-procfs.h.
10306 (linux_attach_lwp_1): Update comments.
10307 (linux_attach): Scan for existing threads when attaching to a
10308 process that is the tgid.
10309 * Makefile.in: Update dependencies.
10311 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10313 * configure.srv: Add linux-procfs.o dependencies.
10315 2011-08-14 Yao Qi <yao@codesourcery.com>
10317 * target.h (struct target_ops): Fix indent.
10318 * win32-low.c (win32_target_ops): Fix comment.
10320 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10321 Yao Qi <yao@codesourcery.com>
10323 * Makefile.in (clean): Remove tic6x-*.c files.
10324 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10325 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10326 (tic6x-c64xp-linux.c): Likewise.
10327 * configure.srv: Add support for tic6x-*-uclinux.
10328 * linux-tic6x-low.c: New.
10329 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10331 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10332 Yao Qi <yao@codesourcery.com>
10334 * target.h (struct target_ops): Add read_loadmap.
10335 * linux-low.c (struct target_loadseg): New type.
10336 (struct target_loadmap): New type.
10337 (linux_read_loadmap): New function.
10338 (linux_target_ops): Add linux_read_loadmap.
10339 * server.c (handle_query): Support qXfer:fdpic:read packet.
10340 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10343 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10345 * win32-low.c: Include <stdint.h>.
10347 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10349 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10350 to the inferior here.
10351 (i386_remove_aligned_watchpoint): Ditto.
10352 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10353 fit part of the watchpoint in the debug registers.
10354 (i386_update_inferior_debug_regs): New.
10355 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10356 registers, and only update the inferior on success.
10357 (i386_low_remove_watchpoint): Ditto.
10359 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10361 * linux-low.c (compare_ints, unique, list_threads, show_process,
10362 linux_core_of_thread): Delete.
10363 (linux_target_ops): Change linux_core_of_thread to
10364 linux_common_core_of_thread.
10365 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10366 * utils.c (malloc_failure): Change type of argument.
10367 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10368 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10369 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10370 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10371 (IPA_OBJS): Add common-utils-ipa.o.
10372 (ptid_h, linux_osdata_h): New macros.
10373 (server_h): Add common/common-utils.h, common/xml-utils.h,
10374 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10376 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10377 ptid.o, buffer.o): New rules.
10378 (linux-low.o): Add common/linux-osdata.h as a dependency.
10379 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10380 * configure.ac: Add AC_HEADER_DIRENT check.
10381 * config.in: Regenerate.
10382 * configure: Regenerate.
10383 * remote-utils.c (xml_escape_text): Delete.
10384 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10385 buffer_xml_printf): Move to common/buffer.c.
10386 * server.c (main): Remove call to initialize_inferiors.
10387 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10388 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10389 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10390 internal_error, gdb_assert, gdb_assert_fail): Delete.
10391 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10392 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10394 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10395 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10396 initialize_inferiors): Delete.
10398 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10400 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10403 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10405 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10407 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10409 2011-05-26 Yao Qi <yao@codesourcery.com>
10411 * Makefile.in (thread-db.o): Track dependence to
10412 common/gdb_thread_db.h.
10413 * thread-db.c: include gdb_thread_db.h from right place.
10415 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10417 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10418 __FILE__ and __LINE__ to internal_error.
10420 2011-05-13 Doug Evans <dje@google.com>
10422 * thread-db.c (try_thread_db_load_from_sdir): New function.
10423 (try_thread_db_load_from_dir): New function.
10424 (thread_db_load_search): Handle $sdir, ignore $pdir.
10425 Remove trying of system directories if search of
10426 libthread-db-search-path fails, that is now done via $sdir.
10428 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10430 * server.c (handle_query): Add EnableDisableTracepoints to the list
10431 of supported features.
10432 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10434 (cmd_qtenable_disable): New.
10435 (cmd_qtstart): Install tracepoints even if disabled.
10436 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10437 receiving a QTEnable or QTDisable packet.
10438 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10439 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10441 (gdb_probe): Skip data collection if static tracepoint is disabled.
10443 2011-05-10 Doug Evans <dje@google.com>
10445 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10447 2011-05-04 Doug Evans <dje@google.com>
10449 * linux-low.c (linux_join): Skip process lookup.
10450 * spu-low.c (spu_join): Ditto.
10451 * server.c (join_inferiors_callback): Delete.
10452 (process_serial_event): For 'D' packet (detach) call join_inferior
10455 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10457 * README: Don't mention xscale*-*-linux*.
10458 * configure.srv (xscale*-*-linux*): Don't handle target.
10460 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10462 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10464 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10465 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10466 (i386_emit_void_call_2): Likewise.
10468 2011-04-26 Yao Qi <yao@codesourcery.com>
10470 * linux-low.c: Move common macros to linux-ptrace.h.
10471 Include linux-ptrace.h.
10472 * Makefile.in (linux_ptrace_h): New.
10473 (linux-low.o): Depends on linux-ptrace.h.
10475 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10477 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10478 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10479 (remote_prepare): New function with most of the TCP code from ...
10480 (remote_open): ... here. Detect PORT here unconditionally. Move also
10481 setting transport_is_reliable.
10482 * server.c (run_once): New variable.
10483 (gdbserver_usage): Document it.
10484 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10485 the first run if RUN_ONCE.
10486 * server.h (run_once, remote_prepare): New declarations.
10488 2011-04-19 Tom Tromey <tromey@redhat.com>
10490 * win32-low.c (handle_load_dll): Remove duplicate "the".
10492 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10494 Remove support for old Cygwin 1.5 versions.
10495 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10496 function to avoid warning.
10497 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10500 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10502 * gdbserver/server.h (Macro _): Define it if not available.
10504 2011-03-14 Michael Snyder <msnyder@vmware.com>
10506 * hostio.c (handle_close): Remove unnecessary null test.
10508 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10510 * Makefile.in (maintainer-clean realclean distclean): Remove
10511 "make ... subdir_do" command.
10513 2011-03-10 Michael Snyder <msnyder@vmware.com>
10515 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10517 * server.c (handle_v_run): Free alloced buffer on early return.
10519 2011-03-09 Yao Qi <yao@codesourcery.com>
10522 2011-03-04 Yao Qi <yao@codesourcery.com>
10524 * Makefile.in: Remove GNU make feature --directory.
10526 2011-03-05 Yao Qi <yao@codesourcery.com>
10528 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10529 (subdir_do): New make target. Copied from gdb/Makefile.
10530 (maintainer-clean, realclean, distclean, clean): Call corresponding
10531 make targets in common/Makefile.
10533 2011-02-11 Yao Qi <yao@codesourcery.com>
10535 * configure.ac: Call AC_PROG_RANLIB.
10536 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10537 * configure: Regenerate.
10539 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10541 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10543 2011-03-06 Yao Qi <yao@codesourcery.com>
10545 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10547 2011-03-05 Yao Qi <yao@codesourcery.com>
10549 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10550 (subdir_do): New make target. Copied from gdb/Makefile.
10551 (maintainer-clean, realclean, distclean, clean): Call corresponding
10552 make targets in common/Makefile.
10554 2011-03-04 Yao Qi <yao@codesourcery.com>
10556 * Makefile.in: Remove GNU make feature --directory.
10558 2011-03-04 Michael Snyder <msnyder@vmware.com>
10560 * server.c (queue_stop_reply): Call xmalloc not malloc.
10562 2011-03-02 Michael Snyder <msnyder@vmware.com>
10564 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10566 2011-02-28 Michael Snyder <msnyder@vmware.com>
10568 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10569 (cmd_qtframe): Ditto.
10570 (cmd_qtbuffer): Ditto.
10571 (cmd_bigqtbuffer): Ditto.
10573 * utils.c (decimal2str): Initialize 'width' to nine, then
10574 don't mess with it.
10576 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10578 * hostio.c (require_data): Free *data, not data.
10580 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10582 * hostio.c (require_data): Use free, not xfree.
10584 2011-02-27 Michael Snyder <msnyder@vmware.com>
10586 * server.c (handle_query): Discard unused value.
10588 * hostio.c (require_data): Free malloc memory before returning
10591 2011-02-26 Michael Snyder <msnyder@vmware.com>
10593 * linux-low.c (list_threads): Call closedir for dirent.
10595 2011-02-27 Michael Snyder <msnyder@vmware.com>
10597 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10598 a case statement falls through.
10600 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10602 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10605 2011-02-26 Michael Snyder <msnyder@vmware.com>
10607 * utils.c (decimal2str): Eliminate dead code and dead param.
10608 (pulongest): Drop dead param from call to decimal2str.
10611 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10613 Revert the following patch (not approved yet):
10614 2011-02-21 Hui Zhu <teawater@gmail.com>
10615 * tracepoint.c (tp_printf): New function.
10616 (eval_agent_expr): Handle gdb_agent_op_printf.
10618 2011-02-21 Hui Zhu <teawater@gmail.com>
10620 * tracepoint.c (tp_printf): New function.
10621 (eval_agent_expr): Handle gdb_agent_op_printf.
10623 2011-02-18 Tom Tromey <tromey@redhat.com>
10625 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10626 (tracepoint.o): Likewise.
10627 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10628 (gdb_agent_op_names): Likewise.
10630 2011-02-18 Tom Tromey <tromey@redhat.com>
10632 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10633 gdb_agent_op_rot>: New constants.
10634 (gdb_agent_op_names): Add pick and roll.
10635 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10638 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10640 * aclocal.m4: Regenerated with aclocal-1.11.1.
10642 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10644 * server.c (handle_qxfer_traceframe_info): New.
10645 (qxfer_packets): Register "traceframe-info".
10646 (handle_query): Report support for qXfer:traceframe-info:read+.
10647 * tracepoint.c (match_blocktype): New.
10648 (traceframe_find_block_type): Rename to ...
10649 (traceframe_walk_blocks): ... this. Add callback filter argument,
10651 (traceframe_find_block_type): New, reimplemented on top of
10652 traceframe_walk_blocks.
10653 (build_traceframe_info_xml): New.
10654 (traceframe_read_info): New.
10655 * server.h (traceframe_read_info): Declare.
10657 2011-02-11 Yao Qi <yao@codesourcery.com>
10659 * configure.ac: Call AC_PROG_RANLIB.
10660 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10661 * configure: Regenerate.
10663 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10665 * server.c (gdb_read_memory): Change return semantics to allow
10667 (handle_search_memory_1): Adjust.
10668 (process_serial_event) <'m' packet>: Handle partial transfers.
10669 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10671 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10673 * regcache.c (init_register_cache): Initialize
10674 regcache->register_status.
10675 (free_register_cache): Release regcache->register_status.
10676 (regcache_cpy): Copy register_status.
10677 (registers_to_string): Print 'x's for unavailable registers.
10678 (supply_register): Mark the register's status valid or
10679 unavailable, depending on whether a buffer was passed in or not.
10680 (supply_register_zeroed): New.
10681 (supply_regblock): Mark the registers' status valid or
10682 unavailable, depending on whether a buffer was passed in or not.
10683 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10684 (struct regcache): New `register_status' field.
10685 (supply_register_zeroed): Declare.
10686 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10687 supply_register_zeroed, rather than passing a NULL buffer to
10689 * tracepoint.c (fetch_traceframe_registers): Update comment.
10691 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10693 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10696 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10698 * server.h (decode_xfer_write): Change prototype.
10699 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10700 and don't extract the annex here.
10701 * server.c (decode_xfer_read): Remove `annex' parameter,
10702 and don't extract the annex here.
10703 (decode_xfer): New.
10704 (struct qxfer): New.
10705 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10706 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10707 (handle_qxfer_statictrace): New functions, abstracted out from
10708 handle_query, and made to use the struct qxfer interface.
10709 (handle_threads_qxfer_proper): Rename to ...
10710 (handle_qxfer_threads_proper): ... this.
10711 (handle_threads_qxfer): Rename to ...
10712 (handle_qxfer_threads): ... this. Adjust.
10713 (qxfer_packets): New array.
10714 (handle_qxfer): New function.
10715 (handle_query): Use handle_qxfer.
10717 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10719 * gdbreplay.c: Shorten lines of >= 80 columns.
10720 * linux-low.c: Ditto.
10721 * linux-ppc-low.c: Ditto.
10722 * linux-s390-low.c: Ditto.
10723 * linux-sparc-low.c: Ditto.
10724 * linux-x86-low.c: Ditto.
10725 * linux-xtensa-low.c: Ditto.
10726 * mem-break.c: Ditto.
10727 * nto-low.c: Ditto.
10728 * regcache.h: Ditto.
10729 * remote-utils.c: Ditto.
10732 * thread-db.c: Ditto.
10733 * tracepoint.c: Ditto.
10735 * win32-low.h: Ditto.
10737 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10739 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10742 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10744 * server.c (gdbserver_version): Update copyright year in version
10746 * gdbreplay.c (gdbreplay_version): Ditto.
10748 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10750 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10751 * linux-bfin-low.c: New file.
10752 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10753 PT_DATA_ADDR for BFIN targets.
10754 * Makefile.in (SFILES): Add linux-bfin-low.c.
10755 (clean): Remove reg-bfin.c.
10756 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10757 * README: Mention supported Blackfin targets.
10759 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10761 * .gitignore: New file.
10763 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10765 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10767 2010-10-22 Jie Zhang <jie@codesourcery.com>
10769 * Makefile.in: Add FLAGS_TO_PASS variable.
10770 (install): Remove dependency of install-only and recursively
10771 invoke make for install-only.
10773 2010-10-04 Doug Evans <dje@google.com>
10775 * Makefile.in (uninstall): Use $(DESTDIR).
10777 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10781 * linux-x86-low.c (compat_siginfo_from_siginfo)
10782 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10783 si_code is < 0. Check for si_code == SI_TIMER before checking for
10786 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10788 * lynx-i386-low.c: New file.
10789 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10791 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10793 * lynx-low.c (ptrace_request_to_str): Remove handling for
10794 request values that have been removed in LynxOS 5.x.
10796 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10798 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10801 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10803 * configure.ac: Add --enable-inprocess-agent option.
10804 * configure: Rebuilt.
10806 2010-09-06 Yao Qi <yao@codesourcery.com>
10808 * linux-low.c (linux_kill): Remove unused variable.
10809 (linux_stabilize_threads): Likewise.
10810 * server.c (start_inferior): Likewise.
10811 (queue_stop_reply_callback): Likewise.
10812 * tracepoint.c (do_action_at_tracepoint): Likewise.
10814 2010-09-06 Yao Qi <yao@codesourcery.com>
10816 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10819 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10821 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10823 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10825 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10828 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10830 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10831 gdbserver/lynx-ppc-low.c: New files.
10832 * Makefile.in (lynx_low_h): New variable.
10833 (lynx-low.o, lynx-ppc-low.o): New rules.
10834 * configure.ac: On LynxOS, link with -lnetinet.
10835 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10836 * configure: regenerate.
10838 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10840 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10841 * configure.ac: Add check for vasprintf and vsnprintf.
10842 * configure, config.in: Regenerate.
10843 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10845 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10847 * gdbreplay.c: Move include of alloca.h up, next to include of
10849 * server.h: Add include of malloc.h.
10850 * mem-break.c: Remove include of malloc.h.
10851 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10853 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10855 * Makefile.in (memmem.o): Build with -Wno-error.
10857 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10859 * utils.c (xsnprintf): Make non-static.
10860 * server.h: Add xsnprintf declaration.
10861 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10862 replace calls to snprintf by calls to xsnprintf throughout.
10864 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10866 * configure.ac: Add configure check for alloca.
10867 * configure, config.in: Regenerate.
10868 * server.h: Include alloca.h if it exists.
10869 * gdbreplay.c: Include alloca.h if it exists.
10871 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10873 * linux-low.c (__SIGRTMIN): Define if not already defined.
10874 (linux_create_inferior): Check for __ANDROID__ rather than
10876 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10877 are already deferred.
10878 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10879 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10880 stopped and already has a pending signal to report.
10881 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10882 a pending signal to report or is moving out of a jump pad.
10883 (linux_init_signals): Check for __ANDROID__ rather than
10886 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10888 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10889 debug_threads check. Avoid a linear search when not doing debug
10892 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10894 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10895 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10896 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10897 (process_event): Change local fd's type to gdb_fildes_t.
10898 (create_file_handler): Adjust prototype.
10899 (delete_file_handler): Adjust prototype.
10900 (handle_file_event): Adjust prototype. Use pfildes.
10901 (create_file_event): Adjsut prototype.
10902 * remote-utils.c (remote_desc, listen_desc): Change type to
10904 * server.h: New gdb_fildes_t typedef.
10905 [USE_WIN32API]: Include winsock2.h.
10906 (delete_file_handler, add_file_handler): Adjust prototypes.
10907 (pfildes): Declare.
10908 * utils.c (pfildes): New.
10910 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10912 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10913 * configure: Regenerate.
10915 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10917 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10918 (linux_done_accessing_memory): ... this.
10919 (linux_target_ops): Adjust.
10920 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10921 * nto-low.c (nto_target_ops): Adjust comment.
10922 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10923 * spu-low.c (spu_target_ops): Adjust comment.
10924 * target.h (target_ops): Rename unprepare_to_access_memory field
10925 to done_accessing_memory.
10926 (unprepare_to_access_memory): Rename to ...
10927 (done_accessing_memory): ... this.
10929 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10931 * linux-low.c (linux_prepare_to_access_memory): New.
10932 (linux_unprepare_to_access_memory): New.
10933 (linux_target_ops): Install them.
10934 * server.c (read_memory): Rename to ...
10935 (gdb_read_memory): ... this. Use
10936 prepare_to_access_memory/prepare_to_access_memory.
10937 (write_memory): Rename to ...
10938 (gdb_write_memory): ... this. Use
10939 prepare_to_access_memory/prepare_to_access_memory.
10940 (handle_search_memory_1): Adjust.
10941 (process_serial_event): Adjust.
10942 * target.h (struct target_ops): New fields
10943 prepare_to_access_memory and unprepare_to_access_memory.
10944 (prepare_to_access_memory, unprepare_to_access_memory): New.
10945 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10946 prepare_to_access_memory/prepare_to_access_memory.
10947 * nto-low.c (nto_target_ops): Adjust.
10948 * spu-low.c (spu_target_ops): Adjust.
10949 * win32-low.c (win32_target_ops): Adjust.
10951 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10953 * Makefile.in (WARN_CFLAGS): Get it from configure.
10954 (WERROR_CFLAGS): New.
10955 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10956 * configure.ac: Introduce --enable-werror, which adds -Werror to
10957 the compiler command line. Enabled by default. Disable with
10958 --disable-werror. Add -Wdeclaration-after-statement
10959 Wpointer-arith and -Wformat-nonliteral to warning flags.
10960 * configure: Regenerate.
10962 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10964 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10966 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10968 * gdbreplay.c (remote_error): New.
10970 (expect): Use gdbchar. Check for error reading from GDB.
10971 Clarify sync error output.
10972 (play): Check for errors writing to GDB.
10973 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10974 * remote-utils.c (getpkt): Check for errors writing to the remote
10977 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10979 * linux-low.c (linux_wait_1): Move non-debugging code out of
10980 `debug_threads' control.
10982 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10984 * linux-low.c (linux_wait_1): Don't set last_status here.
10985 * server.c (push_event, queue_stop_reply_callback): Assert we're
10986 not pushing a TARGET_WAITKIND_IGNORE event.
10987 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10988 (myresume, handle_target_event): Set the thread's last_resume_kind
10989 and last_status from the target returned status.
10991 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10995 * linux-x86-low.c (update_debug_registers_callback): New.
10996 (i386_dr_low_set_addr): Use it.
10997 (i386_dr_low_get_addr): New.
10998 (i386_dr_low_set_control): Use update_debug_registers_callback.
10999 (i386_dr_low_get_control): New.
11000 (i386_dr_low_get_status): Adjust.
11001 * linux-low.c (linux_stop_lwp): New.
11002 * linux-low.h (linux_stop_lwp): Declare.
11004 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11005 argument instead of a i386_debug_reg_state.
11006 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11007 a i386_debug_reg_state.
11008 (i386_insert_aligned_watchpoint): Adjust.
11009 (i386_remove_aligned_watchpoint): Adjust.
11010 (i386_low_stopped_data_address): Read the debug registers from the
11011 inferior instead of from the mirrors.
11012 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11013 (i386_dr_low_get_addr): Declare.
11014 (i386_dr_low_get_control): Declare.
11015 (i386_dr_low_get_status): Change prototype.
11017 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11018 (i386_dr_low_get_addr): New.
11019 (i386_dr_low_get_control): New.
11020 (i386_dr_low_get_status): Adjust prototype. Return
11022 (i386_initial_stuff): Clear dr_status_mirror and
11024 (i386_get_thread_context): Adjust.
11025 (i386_set_thread_context): Adjust.
11026 (i386_thread_added): Adjust.
11028 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11030 * linux-low.h (linux_thread_area): Delete declaration.
11032 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11034 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11035 after its termination.
11037 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11039 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11040 (gdb_wants_all_stopped): Delete.
11041 (linux_wait_1): Don't call them.
11042 * server.c (handle_v_cont): Tag all threads as want-stopped.
11043 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11044 stopped as "client-wants-stopped".
11046 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11048 * Makefile.in (signals_h): New.
11049 (server_h): Depend on it.
11050 (server.o): Don't depend on $(signals_def).
11051 (signals.o): Depend on $(signals_def).
11053 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11055 * Makefile.in (signals_def): New.
11056 (server_h): Append include/gdb/signals.h and signals_def.
11057 (server.o): Append signals_def.
11059 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11061 * server.c (handle_target_event): Use target_signal_to_host for
11062 resume_info.sig initialization.
11063 * target.h (struct thread_resume) <sig>: New comment.
11065 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11067 * server.c (handle_query): strcpy() the returned string from paddress()
11068 instead of sprintf().
11069 * utils.c (paddress): Return phex_nz().
11071 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11073 * server.c (handle_v_cont): Call mourn_inferior if process
11075 (myresume): Likewise.
11077 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11079 Static tracepoints, and integration with UST.
11081 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11082 * mem-break.c (uninsert_all_breakpoints)
11083 (reinsert_all_breakpoints): New.
11084 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11085 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11086 (gdb_agent_ust_loaded, helper_thread_id)
11087 (gdb_agent_helper_thread_id): New macros.
11088 (struct ipa_sym_addresses): Add addr_ust_loaded,
11089 addr_helper_thread_id, addr_cmd_buf.
11090 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11091 (in_process_agent_loaded_ust): New.
11092 (write_e_ust_not_loaded): New.
11093 (maybe_write_ipa_ust_not_loaded): New.
11094 (struct collect_static_trace_data_action): New.
11095 (enum tracepoint_type) <static_tracepoint>: New.
11096 (struct tracepoint) <handle>: Mention static tracepoints.
11097 (struct static_tracepoint_ctx): New.
11098 (CMD_BUF_SIZE): New.
11099 (add_tracepoint_action): Handle static tracepoint actions.
11100 (unprobe_marker_at): New.
11101 (clear_installed_tracepoints): Handle static tracepoints.
11102 (cmd_qtdp): Handle static tracepoints.
11103 (probe_marker_at): New.
11104 (cmd_qtstart): Handle static tracepoints.
11105 (response_tracepoint): Handle static tracepoints.
11106 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11107 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11108 (get_context_regcache): Handle static tracepoints.
11109 (do_action_at_tracepoint): Handle static tracepoint actions.
11110 (traceframe_find_block_type): Handle static trace data blocks.
11111 (traceframe_read_sdata): New.
11112 (download_tracepoints): Download static tracepoint actions.
11113 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11114 (GDB_PROBE_NAME): New.
11116 (GET_UST_SYM): New.
11119 (ust_marker_to_static_tracepoint): New.
11121 (collect_ust_data_at_tracepoint): New.
11122 (gdb_ust_probe): New.
11123 (UNIX_PATH_MAX, SOCK_DIR): New.
11124 (gdb_ust_connect_sync_socket): New.
11125 (resume_thread, stop_thread): New.
11126 (run_inferior_command): New.
11127 (init_named_socket): New.
11128 (gdb_ust_socket_init): New.
11129 (cstr_to_hexstr): New.
11131 (first_marker, next_marker): New.
11132 (response_ust_marker): New.
11133 (cmd_qtfstm, cmd_qtsstm): New.
11134 (unprobe_marker_at, probe_marker_at): New.
11135 (cmd_qtstmat, gdb_ust_thread): New.
11136 (gdb_ust_init): New.
11137 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11138 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11139 (ST_REGENTRY): New.
11140 (x86_64_st_collect_regmap): New.
11141 (X86_64_NUM_ST_COLLECT_GREGS): New.
11142 (AMD64_RIP_REGNUM): New.
11143 (supply_static_tracepoint_registers): New.
11144 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11145 (ST_REGENTRY): New.
11146 (i386_st_collect_regmap): New.
11147 (i386_NUM_ST_COLLECT_GREGS): New.
11148 (supply_static_tracepoint_registers): New.
11149 * server.c (handle_query): Handle qXfer:statictrace:read.
11150 <qSupported>: Report support for StaticTracepoints, and
11151 qXfer:statictrace:read features.
11152 * server.h (traceframe_read_sdata)
11153 (supply_static_tracepoint_registers): Declare.
11154 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11155 (unpack_varlen_hex): Include in IPA build.
11156 * Makefile.in (ustlibs, ustinc): New.
11157 (IPA_OBJS): Add remote-utils-ipa.o.
11158 ($(IPA_LIB)): Link -ldl and -lpthread.
11160 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11161 * config.in, configure: Regenerate.
11163 2010-06-20 Ian Lance Taylor <iant@google.com>
11164 Pedro Alves <pedro@codesourcery.com>
11166 * linux-x86-low.c (always_true): Delete.
11167 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11168 trying to fool the compiler with always_true.
11170 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11172 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11173 conditions in gdbserver.
11175 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11177 * spu-low.c (spu_read_memory): Wrap around local store limit.
11178 (spu_write_memory): Likewise.
11180 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11182 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11183 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11185 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11187 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11188 uses with LONGEST uses.
11190 2010-06-14 Stan Shebs <stan@codesourcery.com>
11191 Pedro Alves <pedro@codesourcery.com>
11195 * linux-x86-low.c: Include limits.h.
11197 (always_true): New.
11200 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11201 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11202 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11203 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11204 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11205 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11206 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11207 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11208 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11209 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11210 (amd64_emit_void_call_2): New.
11211 (amd64_emit_ops): New.
11212 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11213 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11214 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11215 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11216 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11217 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11218 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11219 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11220 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11221 (i386_emit_stack_adjust, i386_emit_int_call_1)
11222 (i386_emit_void_call_2): New.
11223 (i386_emit_ops): New.
11224 (x86_emit_ops): New.
11225 (the_low_target): Install x86_emit_ops.
11226 * server.h (struct emit_ops): New.
11227 (get_raw_reg_func_addr): Declare.
11228 (current_insn_ptr, emit_error): Declare.
11229 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11230 (set_trace_state_variable_value): New defines.
11231 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11232 addr_get_trace_state_variable_value and
11233 addr_set_trace_state_variable_value.
11234 (symbol_list): New fields for get_raw_reg,
11235 get_trace_state_variable_value and set_trace_state_variable_value.
11236 (condfn): New typedef.
11237 (struct tracepoint): New field `compiled_cond'.
11238 (do_action_at_tracepoint): Clear compiled_cond.
11239 (get_trace_state_variable_value, set_trace_state_variable_value):
11241 (condition_true_at_tracepoint): If there's a compiled condition,
11243 (current_insn_ptr, emit_error): New globals.
11244 (struct bytecode_address): New.
11245 (get_raw_reg_func_addr): New.
11246 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11247 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11248 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11249 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11250 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11251 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11252 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11253 (compile_tracepoint_condition, compile_bytecodes): New.
11254 * target.h (emit_ops): Forward declare.
11255 (struct target_ops): New field emit_ops.
11256 (target_emit_ops): New.
11257 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11258 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11259 * linux-low.c (linux_emit_ops): New.
11260 (linux_target_ops): Install it.
11261 * linux-low.h (struct linux_target_ops): New field emit_ops.
11263 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11265 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11266 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11268 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11269 Stan Shebs <stan@codesourcery.com>
11271 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11272 (all): Depend on $(extra_libraries).
11273 (install-only): Install the IPA.
11274 (IPA_OBJS, IPA_LIB): New.
11275 (clean): Remove the IPA lib.
11276 (IPAGENT_CFLAGS): New.
11277 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11278 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11279 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11280 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11281 * configure.ac: Check for atomic builtins support in the compiler.
11282 (IPA_DEPFILES, extra_libraries): Define.
11283 * configure.srv (ipa_obj): Add description.
11284 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11285 (i[34567]86-*-linux*): Set ipa_obj.
11286 (x86_64-*-linux*): Set ipa_obj.
11287 * linux-low.c (stabilizing_threads): New.
11288 (supports_fast_tracepoints): New.
11289 (linux_detach): Stabilize threads before detaching.
11290 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11291 the lwp is either not stabilizing, or is moving out of a jump pad.
11292 (linux_fast_tracepoint_collecting): New.
11293 (maybe_move_out_of_jump_pad): New.
11294 (enqueue_one_deferred_signal): New.
11295 (dequeue_one_deferred_signal): New.
11296 (linux_wait_for_event_1): If moving out of a jump pad, defer
11297 pending signals to later.
11298 (linux_stabilize_threads): New.
11299 (linux_wait_1): Check if threads need moving out of jump pads, and
11301 (stuck_in_jump_pad_callback): New.
11302 (move_out_of_jump_pad_callback): New.
11303 (lwp_running): New.
11304 (linux_resume_one_lwp): Handle moving out of jump pads.
11305 (linux_set_resume_request): Dequeue deferred signals.
11306 (need_step_over_p): Also step over fast tracepoint jumps.
11307 (start_step_over): Also uninsert fast tracepoint jumps.
11308 (finish_step_over): Also reinsert fast tracepoint jumps.
11309 (linux_install_fast_tracepoint_jump): New.
11310 (linux_target_ops): Install linux_stabilize_threads and
11311 linux_install_fast_tracepoint_jump_pad.
11312 * linux-low.h (linux_target_ops) <get_thread_area,
11313 install_fast_tracepoint_jump_pad>: New fields.
11314 (struct lwp_info) <collecting_fast_tracepoint,
11315 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11316 (linux_get_thread_area): Declare.
11317 * linux-x86-low.c (jump_insn): New.
11318 (x86_get_thread_area): New.
11319 (append_insns): New.
11320 (push_opcode): New.
11321 (amd64_install_fast_tracepoint_jump_pad): New.
11322 (i386_install_fast_tracepoint_jump_pad): New.
11323 (x86_install_fast_tracepoint_jump_pad): New.
11324 (the_low_target): Install x86_get_thread_area and
11325 x86_install_fast_tracepoint_jump_pad.
11326 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11327 (struct fast_tracepoint_jump): New.
11328 (fast_tracepoint_jump_insn): New.
11329 (fast_tracepoint_jump_shadow): New.
11330 (find_fast_tracepoint_jump_at): New.
11331 (fast_tracepoint_jump_here): New.
11332 (delete_fast_tracepoint_jump): New.
11333 (set_fast_tracepoint_jump): New.
11334 (uninsert_fast_tracepoint_jumps_at): New.
11335 (reinsert_fast_tracepoint_jumps_at): New.
11336 (set_breakpoint_at): Use write_inferior_memory.
11337 (uninsert_raw_breakpoint): Use write_inferior_memory.
11338 (check_mem_read): Mask out fast tracepoint jumps.
11339 (check_mem_write): Mask out fast tracepoint jumps.
11340 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11341 (set_fast_tracepoint_jump): Declare.
11342 (delete_fast_tracepoint_jump)
11343 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11344 (reinsert_fast_tracepoint_jumps_at): Declare.
11345 * regcache.c: Don't compile many functions when building the
11346 in-process agent library.
11347 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11348 the register buffer in the heap.
11349 (free_register_cache): If the register buffer isn't owned by the
11350 regcache, don't free it.
11351 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11352 pre-existing register caches.
11353 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11355 (convert_ascii_to_int): : Constify `from' parameter type.
11356 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11357 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11358 the needed buffer in-place.
11359 (relocate_instruction): New.
11360 * server.c (handle_query) <qSymbols>: If the target supports
11361 tracepoints, give it a chance of looking up symbols. Report
11362 support for fast tracepoints.
11363 (handle_status): Stabilize threads.
11364 (process_serial_event): Adjust.
11365 * server.h (struct fast_tracepoint_jump): Forward declare.
11366 (struct process_info) <fast_tracepoint_jumps>: New field.
11367 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11368 (decode_X_packet, decode_M_packet): Adjust.
11369 (relocate_instruction): Declare.
11370 (in_process_agent_loaded): Declare.
11371 (tracepoint_look_up_symbols): Declare.
11372 (struct fast_tpoint_collect_status): Declare.
11373 (fast_tracepoint_collecting): Declare.
11374 (force_unlock_trace_buffer): Declare.
11375 (handle_tracepoint_bkpts): Declare.
11376 (initialize_low_tracepoint)
11377 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11378 * target.h (struct target_ops) <stabilize_threads,
11379 install_fast_tracepoint_jump_pad>: New fields.
11380 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11381 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11382 [HAVE_STDINT_H]: Include stdint.h.
11383 (trace_debug_1): Rename to ...
11384 (trace_vdebug): ... this.
11385 (trace_debug): Rename to ...
11386 (trace_debug_1): ... this. Add `level' parameter.
11387 (trace_debug): New.
11388 (ATTR_USED, ATTR_NOINLINE): New.
11389 (IP_AGENT_EXPORT): New.
11390 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11391 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11392 (about_to_request_buffer_space, trace_buffer_is_full)
11393 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11394 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11395 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11396 (traceframe_write_count, traceframes_created)
11397 (trace_state_variables)
11398 New renaming defines.
11399 (struct ipa_sym_addresses): New.
11400 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11401 (symbol_list): New.
11402 (ipa_sym_addrs): New.
11403 (all_tracepoint_symbols_looked_up): New.
11404 (in_process_agent_loaded): New.
11405 (write_e_ipa_not_loaded): New.
11406 (maybe_write_ipa_not_loaded): New.
11407 (tracepoint_look_up_symbols): New.
11408 (debug_threads) [IN_PROCESS_AGENT]: New.
11409 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11410 (UNKNOWN_SIDE_EFFECTS): New.
11411 (stop_tracing): New.
11412 (flush_trace_buffer): New.
11413 (stop_tracing_bkpt): New.
11414 (flush_trace_buffer_bkpt): New.
11415 (read_inferior_integer): New.
11416 (read_inferior_uinteger): New.
11417 (read_inferior_data_pointer): New.
11418 (write_inferior_data_pointer): New.
11419 (write_inferior_integer): New.
11420 (write_inferior_uinteger): New.
11421 (struct collect_static_trace_data_action): Delete.
11422 (enum tracepoint_type): New.
11423 (struct tracepoint) <type>: New field `type'.
11424 <actions_str, step_actions, step_actions_str>: Only include in
11426 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11427 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11428 (tracepoints): Use IP_AGENT_EXPORT.
11429 (last_tracepoint): Don't include in the IPA.
11430 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11431 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11432 (alloced_trace_state_variables): New.
11433 (trace_state_variables): Use IP_AGENT_EXPORT.
11434 (traceframe_t): Delete unused variable.
11435 (circular_trace_buffer): Don't include in the IPA.
11436 (trace_buffer_start): Delete.
11437 (struct trace_buffer_control): New.
11438 (trace_buffer_free): Delete.
11439 (struct ipa_trace_buffer_control): New.
11440 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11441 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11443 (trace_buffer_ctrl): New.
11444 (TRACE_BUFFER_CTRL_CURR): New.
11445 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11446 Reimplement as macros.
11447 (trace_buffer_wrap): Delete.
11448 (traceframe_write_count, traceframe_read_count)
11449 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11450 (struct tracepoint_hit_ctx) <type>: New field.
11451 (struct fast_tracepoint_ctx): New.
11452 (memory_barrier): New.
11454 (record_tracepoint_error): Update atomically in the IPA.
11455 (clear_inferior_trace_buffer): New.
11456 (about_to_request_buffer_space): New.
11457 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11458 updating the same buffer.
11459 (add_tracepoint): Default the tracepoint's type to trap
11460 tracepoint, and orig_size to -1.
11461 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11462 internal variables.
11463 (create_trace_state_variable): New parameter `gdb'. Handle it.
11464 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11465 (cmd_qtdp): Handle fast tracepoints.
11466 (cmd_qtdv): Adjust.
11467 (max_jump_pad_size): New.
11468 (gdb_jump_pad_head): New.
11469 (get_jump_space_head): New.
11470 (claim_jump_space): New.
11471 (sort_tracepoints): New.
11472 (MAX_JUMP_SIZE): New.
11473 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11475 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11476 support. Upload fast traceframes, and delete internal IPA
11478 (stop_tracing_handler): New.
11479 (flush_trace_buffer_handler): New.
11480 (cmd_qtstop): Upload fast tracepoints.
11481 (response_tracepoint): Handle fast tracepoints.
11482 (tracepoint_finished_step): Upload fast traceframes. Set the
11483 tracepoint hit context's tracepoint type.
11484 (handle_tracepoint_bkpts): New.
11485 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11486 type. Add comment about fast tracepoints.
11487 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11488 non-existing action_str field.
11489 (get_context_regcache): Handle fast tracepoints.
11490 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11492 (fast_tracepoint_from_jump_pad_address): New.
11493 (fast_tracepoint_from_ipa_tpoint_address): New.
11494 (collecting_t): New.
11495 (force_unlock_trace_buffer): New.
11496 (fast_tracepoint_collecting): New.
11498 (gdb_collect): New.
11499 (write_inferior_data_ptr): New.
11500 (target_tp_heap): New.
11501 (target_malloc): New.
11502 (download_agent_expr): New.
11504 (download_tracepoints): New.
11505 (download_trace_state_variables): New.
11506 (upload_fast_traceframes): New.
11507 (IPA_FIRST_TRACEFRAME): New.
11508 (IPA_NEXT_TRACEFRAME_1): New.
11509 (IPA_NEXT_TRACEFRAME): New.
11510 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11511 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11512 (gdb_jump_pad_buffer_end): New.
11513 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11514 (initialize_tracepoint): Adjust.
11515 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11516 buffer. Initialize the low module.
11517 * utils.c (PREFIX, TOOLNAME): New.
11518 (malloc_failure): Use PREFIX.
11519 (error): In the IPA, an error causes an exit.
11520 (fatal, warning): Use PREFIX.
11521 (internal_error): Use TOOLNAME.
11522 (NUMCELLS): Increase to 10.
11523 * configure, config.in: Regenerate.
11525 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11527 * server.c (handle_query) <qSupported>: Do two passes over the
11528 qSupported string to avoid nesting strtok.
11530 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11532 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11534 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11535 -Wl,--dynamic-list.
11536 * configure: Regenerate.
11537 * proc-service.list: New.
11539 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11541 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11544 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11546 * gdbreplay.c (remote_open): Check error return from socket() call by
11547 its equality to -1 not by it being negative.
11548 * remote-utils.c (remote_open): Likewise.
11550 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11552 * config.h: Regenerate.
11554 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11556 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11557 doesn't provide PTRACE_GET_THREAD_AREA.
11559 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11561 * linux-m68k-low.c: Include <asm/ptrace.h>
11562 (ps_get_thread_area): Implement.
11564 2010-05-03 Doug Evans <dje@google.com>
11566 * event-loop.c (struct callback_event): New struct.
11567 (callback_list): New global.
11568 (append_callback_event, delete_callback_event): New functions.
11569 (process_callback): New function.
11570 (start_event_loop): Call it.
11571 * remote-utils.c (NOT_SCHEDULED): Define.
11572 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11573 moved out of readchar.
11574 (readchar): Rewrite. Call reschedule before returning.
11575 (reset_readchar): New function.
11576 (remote_close): Call it.
11577 (process_remaining, reschedule): New functions.
11578 * server.h (callback_handler_func): New typedef.
11579 (append_callback_event, delete_callback_event): Declare.
11581 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11583 * proc-service.c (ps_pglobal_lookup): Use
11584 thread_db_look_up_one_symbol.
11585 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11586 parameter. Use it instead of all_symbols_looked_up.
11587 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11589 (all_symbols_looked_up): Don't declare.
11590 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11591 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11593 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11594 Set all_symbols_looked_up here.
11595 (thread_db_look_up_one_symbol): New.
11596 (thread_db_get_tls_address): Adjust.
11597 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11598 thread_db object on the heap, and tentatively set it in the
11600 (thread_db_init): Don't set all_symbols_looked_up here.
11601 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11603 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11605 * linux-low.c (linux_kill, linux_detach): Adjust.
11606 (status_pending_p_callback): Remove redundant statement. Check
11607 for !TARGET_WAITIKIND_IGNORE, instead of
11608 TARGET_WAITKIND_STOPPED.
11609 (handle_tracepoints): Make sure LWP is locked. Adjust.
11610 (linux_wait_for_event_1): Adjust.
11611 (linux_cancel_breakpoints): New.
11612 (unsuspend_one_lwp): New.
11613 (unsuspend_all_lwps): New.
11614 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11615 (send_sigstop_callback): Change return type to int, add new
11616 `except' parameter and handle it.
11617 (suspend_and_send_sigstop_callback): New.
11618 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11619 pass them down. If SUSPEND, also increment the lwp's suspend
11621 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11622 (need_step_over_p): Don't consider suspended LWPs.
11623 (start_step_over): Adjust.
11624 (proceed_one_lwp): Change return type to int, add new `except'
11625 parameter and handle it.
11626 (unsuspend_and_proceed_one_lwp): New.
11627 (proceed_all_lwps): Use find_inferior instead of
11629 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11630 also decrement the suspend count of LWPs. Pass `except' down,
11631 instead of hacking its suspend count.
11632 (linux_pause_all): Add `freeze' parameter. Adjust.
11633 (linux_unpause_all): New.
11634 (linux_target_ops): Install linux_unpause_all.
11635 * server.c (handle_status): Adjust.
11636 * target.h (struct target_ops): New fields `unpause_all' and
11637 `cancel_breakpoints'. Add new parameter to `pause_all'.
11638 (pause_all): Add new `freeze' parameter.
11639 (unpause_all): New.
11640 (cancel_breakpoints): New.
11641 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11642 cancel breakpoints.
11643 (cmd_qtstart): Pause threads.
11644 (stop_tracing): Pause threads, and cancel breakpoints.
11645 * win32-low.c (win32_target_ops): Adjust.
11647 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11649 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11650 the inferior right away from here...
11651 (linux_wait_1): ... to here, and adjust to check the thread's
11652 last_resume_kind instead of the lwp's step or stop_expected flags.
11654 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11656 * README: Use consistent `GDB' and `GDBserver' spellings.
11658 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11660 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11661 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11662 (linux_detach_one_lwp): Assume the lwp is stopped.
11663 (any_thread_of): Delete.
11664 (linux_detach): Stop all lwps here. Don't blindly delete all
11666 (delete_lwp_callback): New.
11667 (linux_mourn): Delete all lwps of the process that is gone.
11668 (linux_wait_1): Don't delete the last lwp of the process here.
11669 * mem-break.h (mark_breakpoints_out): Declare.
11670 * mem-break.c (mark_breakpoints_out): New.
11671 (free_all_breakpoints): Use it.
11672 * server.c (handle_target_event): If the process is gone, mark
11674 * thread-db.c (struct thread_db) <create_bp>: New field.
11675 (thread_db_enable_reporting): Fix prototype. Store a thread event
11676 breakpoint reference in the thread_db struct.
11677 (thread_db_load_search): Clear the thread_db object.
11678 (try_thread_db_load_1): Ditto.
11679 (switch_to_process): New.
11680 (disable_thread_event_reporting): Use it.
11681 (remove_thread_event_breakpoints): New.
11682 (thread_db_detach, thread_db_mourn): Use it.
11684 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11686 * linux-low.c (linux_enable_event_reporting): New.
11687 (linux_wait_for_event_1, handle_extended_wait): Use it.
11689 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11691 * linux-low.c (linux_kill_one_lwp, linux_kill)
11692 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11693 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11694 SIGSTOP even if the LWP is stopped.
11695 (send_sigstop_callback): New.
11696 (stop_all_lwps): Use send_sigstop_callback instead.
11697 (linux_resume_one_thread): Adjust.
11698 (proceed_one_lwp): Still proceed an LWP that the client has
11699 requested to stop, if we haven't reported it as stopped yet. Make
11700 sure that LWPs the client want stopped, have a pending SIGSTOP.
11702 2010-04-26 Doug Evans <dje@google.com>
11704 * server.c (handle_general_set): Make static.
11706 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11707 Print received char after testing for error/eof instead of before.
11708 (input_interrupt): Tweak comment.
11710 2010-04-23 Doug Evans <dje@google.com>
11712 * server.c (start_inferior): Print inferior argv if --debug.
11714 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11716 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11717 * nto-x86-low.c: Include server.h
11719 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11721 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11722 be consistent with other sources of this directory.
11723 (init_registers_amd64): Correct name of source file of this function
11726 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11728 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11729 64-bit executables.
11731 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11733 * win32-i386-low.c: Add 64-bit support.
11734 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11735 (init_registers_amd64): Declare.
11736 (mappings): Add 64-bit version of array.
11737 (init_windows_x86): New function.
11738 (the_low_target): Change init_arch field to init_windows_x86.
11740 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11742 * win32-low.c: Adapt to support also 64-bit architecture.
11743 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11744 (get_image_name): Use SIZE_T type for local variable `done'.
11745 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11746 (toolhelp_get_dll_name): Idem.
11747 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11748 Use uintptr_t typecast to avoid warning.
11749 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11750 (handle_exception): Use phex_nz to avoid warning.
11751 (win32_wait): Remove unused local variable `process'.
11753 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11755 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11758 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11760 * configure.ac: Use `ws2_32' library for srv_mingw.
11761 * configure: Regenerate.
11762 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11763 * remote-utils.c: Likewise.
11765 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11767 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11768 if __x86_64__ is defined.
11770 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11772 * configure: Regenerate.
11774 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11776 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11777 * target.h (target_ops): New get_tib_address field.
11778 * win32-low.h (win32_thread_info): Add thread_local_base field.
11779 * win32-low.c (child_add_thread): Add tlb argument.
11780 Set thread_local_base field to TLB.
11781 (get_child_debug_event): Adapt to child_add_thread change.
11782 (win32_get_tib_address): New function.
11783 (win32_target_ops): Set get_tib_address field to
11784 win32_get_tib_address.
11785 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11787 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11789 * linux-low.c (linux_mourn): Also remove the process.
11790 * server.c (handle_target_event): Don't remove the process here.
11791 * nto-low.c (nto_mourn): New.
11792 (nto_target_ops): Install it.
11793 * spu-low.c (spu_mourn): New.
11794 (spu_target_ops): Install it.
11795 * win32-low.c (win32_mourn): New.
11796 (win32_target_ops): Install it.
11798 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11800 * server.h (buffer_xml_printf): Remove redundant `;'.
11802 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11804 * regcache.c (set_register_cache): Invalidate regcaches before
11805 changing the register cache layout.
11806 (regcache_invalidate_one): Allow a NULL regcache.
11807 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11808 regcaches before changing the register cache layout or the target
11811 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11813 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11814 variable warning on Linux/x86-64.
11816 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11818 GDBserver disconnected tracing support.
11820 * linux-low.c (linux_remove_process): Delete.
11821 (add_lwp): Don't set last_resume_kind here.
11822 (linux_kill): Use `mourn'.
11823 (linux_detach): Use `thread_db_detach', and `mourn'.
11824 (linux_mourn): New.
11825 (linux_attach_lwp_1): Adjust comment.
11826 (linux_attach): last_resume_kind moved the thread_info; adjust.
11827 (status_pending_p_callback): Adjust.
11828 (linux_wait_for_event_1): Adjust.
11829 (count_events_callback, select_singlestep_lwp_callback)
11830 (select_event_lwp_callback, cancel_breakpoints_callback)
11831 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11832 (proceed_one_lwp): Adjust.
11833 (linux_async): Add debug output.
11834 (linux_thread_stopped): New.
11835 (linux_pause_all): New.
11836 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11838 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11839 (thread_db_free): Delete declaration.
11840 (thread_db_detach, thread_db_mourn): Declare.
11841 * thread-db.c (thread_db_init): Use thread_db_mourn.
11842 (thread_db_free): Delete, split in two.
11843 (disable_thread_event_reporting): New.
11844 (thread_db_detach): New.
11845 (thread_db_mourn): New.
11847 * server.h (struct thread_info) <last_resume_kind>: New field.
11848 <attached>: Add comment.
11849 <gdb_detached>: New field.
11850 (handler_func): Change return type to int.
11851 (handle_serial_event, handle_target_event): Ditto.
11852 (gdb_connected): Declare.
11854 (disconnected_tracing): Declare.
11855 (stop_tracing): Declare.
11857 * server.c (handle_query) <qSupported>: Report support for
11858 disconnected tracing.
11859 (queue_stop_reply_callback): Account for running threads.
11860 (gdb_wants_thread_stopped): New.
11861 (gdb_wants_all_threads_stopped): New.
11862 (gdb_reattached_process): New.
11863 (handle_status): Clear the `gdb_detached' flag of all processes.
11864 In all-stop, stop all threads.
11865 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11866 (process_serial_event): If the remote connection breaks, or if an
11867 exit was forced with "monitor exit", force an event loop exit.
11868 Handle disconnected tracing on detach.
11869 (handle_serial_event): Adjust.
11870 (handle_target_event): If GDB isn't connected, forward events back
11871 to the inferior, unless the last process exited, in which case,
11872 exit gdbserver. Adjust interface.
11874 * remote-utils.c (remote_open): Don't block in accept. Instead
11875 register an event loop source on the listen socket file
11876 descriptor. Refactor bits into ...
11877 (listen_desc): ... this new global.
11878 (gdb_connected): ... this new function.
11879 (enable_async_notification): ... this new function.
11880 (handle_accept_event): ... this new function.
11881 (remote_close): Clear remote_desc.
11883 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11885 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11887 (mourn_inferior): Define.
11888 (target_process_qsupported): Avoid the dangling else problem.
11889 (thread_stopped): Define.
11890 (pause_all): Define.
11891 (target_waitstatus_to_string): Declare.
11892 * target.c (target_waitstatus_to_string): New.
11894 * tracepoint.c (tracing): Make extern.
11895 (disconnected_tracing): New.
11896 (stop_tracing): Make extern. Handle tracing stops due to GDB
11898 (cmd_qtdisconnected): New.
11899 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11900 (handle_tracepoint_general_set): Handle QTDisconnected.
11902 * event-loop.c (event_handler_func): Change return type to int.
11903 (process_event): Bail out if the event handler wants the event
11905 (handle_file_event): Ditto.
11906 (start_event_loop): Bail out if the event handler wants the event
11909 * nto-low.c (nto_target_ops): Adjust.
11910 * spu-low.c (spu_wait): Don't remove the process here.
11911 (spu_target_ops): Adjust.
11912 * win32-low.c (win32_wait): Don't remove the process here.
11913 (win32_target_ops): Adjust.
11915 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11917 * regcache.c (realloc_register_cache): Invalidate inferior's
11918 regcache before recreating it.
11920 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11922 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11924 2010-04-09 Stan Shebs <stan@codesourcery.com>
11925 Pedro Alves <pedro@codesourcery.com>
11927 * server.h (LONGEST): New.
11928 (struct thread_info) <while_stepping>: New field.
11929 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11931 (initialize_tracepoint, handle_tracepoint_general_set)
11932 (handle_tracepoint_query, tracepoint_finished_step)
11933 (tracepoint_was_hit, release_while_stepping_state_list):
11934 (current_traceframe): Declare.
11935 * server.c (handle_general_set): Handle tracepoint packets.
11936 (read_memory): New.
11937 (write_memory): New.
11938 (handle_search_memory_1): Use read_memory.
11939 (handle_query): Report support for conditional tracepoints, trace
11940 state variables, and tracepoint sources. Handle tracepoint
11942 (main): Initialize the tracepoints module.
11943 (process_serial_event): Handle traceframe reads/writes.
11945 * linux-low.c (handle_tracepoints): New.
11946 (linux_wait_1): Call it.
11947 (linux_resume_one_lwp): Handle while-stepping.
11948 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11949 (linux_target_ops): Install them.
11950 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11952 * linux-x86-low.c (x86_supports_tracepoints): New.
11953 (the_low_target). Install it.
11955 * mem-break.h (delete_breakpoint): Declare.
11956 * mem-break.c (delete_breakpoint): Make external.
11958 * target.h (struct target_ops): Add `supports_tracepoints',
11959 `read_pc', and `write_pc' fields.
11960 (target_supports_tracepoints): Define.
11961 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11964 * regcache.h (struct regcache) <registers_owned>: New field.
11965 (init_register_cache, regcache_cpy): Declare.
11966 (regcache_read_pc, regcache_write_pc): Declare.
11967 (register_cache_size): Declare.
11968 (supply_regblock): Declare.
11969 * regcache.c (init_register_cache): New.
11970 (new_register_cache): Use it.
11971 (regcache_cpy): New.
11972 (register_cache_size): New.
11973 (supply_regblock): New.
11974 (regcache_read_pc, regcache_write_pc): New.
11976 * tracepoint.c: New.
11978 * Makefile.in (OBS): Add tracepoint.o.
11979 (tracepoint.o): New rule.
11981 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11983 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11985 (i386-mmx.c): Likewise.
11986 (i386-mmx-linux.o): Likewise.
11987 (i386-mmx-linux.c): Likewise.
11989 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11990 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11991 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11992 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11994 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11995 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11996 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11998 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12000 * Makefile.in (clean): Updated.
12002 (i386-avx.c): Likewise.
12003 (i386-avx-linux.o): Likewise.
12004 (i386-avx-linux.c): Likewise.
12005 (amd64-avx.o): Likewise.
12006 (amd64-avx.c): Likewise.
12007 (amd64-avx-linux.o): Likewise.
12008 (amd64-avx-linux.c): Likewise.
12010 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12011 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12012 (srv_amd64_regobj): Add amd64-avx.o.
12013 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12014 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12015 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12016 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12017 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12018 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12019 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12021 * i387-fp.c: Include "i386-xstate.h".
12023 (i387_cache_to_xsave): Likewise.
12024 (i387_xsave_to_cache): Likewise.
12025 (x86_xcr0): Likewise.
12027 * i387-fp.h (i387_cache_to_xsave): Likewise.
12028 (i387_xsave_to_cache): Likewise.
12029 (x86_xcr0): Likewise.
12031 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12032 * linux-crisv32-low.c (target_regsets): Likewise.
12033 * linux-m68k-low.c (target_regsets): Likewise.
12034 * linux-mips-low.c (target_regsets): Likewise.
12035 * linux-ppc-low.c (target_regsets): Likewise.
12036 * linux-s390-low.c (target_regsets): Likewise.
12037 * linux-sh-low.c (target_regsets): Likewise.
12038 * linux-sparc-low.c (target_regsets): Likewise.
12039 * linux-xtensa-low.c (target_regsets): Likewise.
12041 * linux-low.c: Include <sys/uio.h>.
12042 (regsets_fetch_inferior_registers): Support nt_type.
12043 (regsets_store_inferior_registers): Likewise.
12044 (linux_process_qsupported): New.
12045 (linux_target_ops): Add linux_process_qsupported.
12047 * linux-low.h (regset_info): Add nt_type.
12048 (linux_target_ops): Add process_qsupported.
12050 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12052 (init_registers_i386_avx_linux): New.
12053 (init_registers_amd64_avx_linux): Likewise.
12054 (xmltarget_i386_linux_no_xml): Likewise.
12055 (xmltarget_amd64_linux_no_xml): Likewise.
12056 (PTRACE_GETREGSET): Likewise.
12057 (PTRACE_SETREGSET): Likewise.
12058 (x86_fill_xstateregset): Likewise.
12059 (x86_store_xstateregset): Likewise.
12060 (use_xml): Likewise.
12061 (x86_linux_update_xmltarget): Likewise.
12062 (x86_linux_process_qsupported): Likewise.
12063 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12064 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12065 init_registers_i386_linux here. Call
12066 x86_linux_update_xmltarget.
12067 (the_low_target): Add x86_linux_process_qsupported.
12069 * server.c (handle_query): Call target_process_qsupported.
12071 * target.h (target_ops): Add process_qsupported.
12072 (target_process_qsupported): New.
12074 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12076 * inferiors.c (add_thread): Set last_status kind to
12077 TARGET_WAITKIND_IGNORE.
12078 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12079 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12080 (linux_wait_1): Move `thread' local definition to block that uses
12081 it. Don't NULL initialize `event_child'.
12082 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12083 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12084 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12086 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12088 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12089 an extended waitstatus, or by a watchpoint.
12090 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12091 thread was stepping or has been stopped by a watchpoint.
12093 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12095 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12096 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12097 of another, then delete the previous, and validate all
12099 (validate_inserted_breakpoint): New.
12100 (delete_disabled_breakpoints): New.
12101 (validate_breakpoints): New.
12102 (check_mem_read): Validate breakpoints before trusting their
12103 shadow. Delete disabled breakpoints.
12104 (check_mem_write): Validate breakpoints before trusting they
12105 should be inserted. Delete disabled breakpoints.
12106 * mem-break.h (validate_breakpoints):
12107 * server.c (handle_query): Validate breakpoints when we see a
12110 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12112 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12113 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12114 if we could tell there's a GDB breakpoint at stop_pc.
12115 (need_step_over_p): Don't do a step over if we find a GDB
12116 breakpoint at the resume PC.
12118 * mem-break.c (struct raw_breakpoint): New.
12119 (enum bkpt_type): New type `gdb_breakpoint'.
12120 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12121 fields. New field `raw'.
12122 (find_raw_breakpoint_at): New.
12123 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12124 breakpoint instead.
12125 (set_breakpoint_at): Adjust.
12126 (delete_raw_breakpoint): New.
12127 (release_breakpoint): New.
12128 (delete_breakpoint): Rename to...
12129 (delete_breakpoint_1): ... this. Add proc parameter. Use
12130 release_breakpoint. Return ENOENT.
12131 (delete_breakpoint): Reimplement.
12132 (find_breakpoint_at): Delete.
12133 (find_gdb_breakpoint_at): New.
12134 (delete_breakpoint_at): Delete.
12135 (set_gdb_breakpoint_at): New.
12136 (delete_gdb_breakpoint_at): New.
12137 (gdb_breakpoint_here): New.
12138 (set_reinsert_breakpoint): Use release_breakpoint.
12139 (uninsert_breakpoint): Rename to ...
12140 (uninsert_raw_breakpoint): ... this.
12141 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12142 (reinsert_raw_breakpoint): Change parameter type to
12144 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12146 (check_breakpoints): Adjust. Use release_breakpoint.
12147 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12148 (breakpoint_inserted_here): Ditto.
12149 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12150 Don't trust the breakpoint's shadow if it is not inserted.
12151 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12152 (delete_all_breakpoints): Adjust.
12153 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12154 use delete_breakpoint_1.
12156 * mem-break.h (breakpoints_supported): Delete declaration.
12157 (set_gdb_breakpoint_at): Declare.
12158 (gdb_breakpoint_here): Declare.
12159 (delete_breakpoint_at): Delete.
12160 (delete_gdb_breakpoint_at): Declare.
12162 * server.h (struct raw_breakpoint): Forward declare.
12163 (struct process_info): New field `raw_breakpoints'.
12165 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12168 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12170 * linux-low.c (status_pending_p_callback): Fix comment.
12171 (linux_wait_for_event_1): Move most of the internal breakpoint
12172 handling from here...
12173 (linux_wait_1): ... to here.
12174 (count_events_callback): New.
12175 (select_singlestep_lwp_callback): New.
12176 (select_event_lwp_callback): New.
12177 (cancel_breakpoints_callback): New.
12178 (select_event_lwp): New.
12179 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12180 priority to all LWPs that have had events that should be reported
12181 to the client. Cancel breakpoints when about to reporting the
12182 event to the client, not while stopping lwps. No longer cancel
12183 finished single-steps here.
12184 (cancel_finished_single_step): Delete.
12185 (cancel_finished_single_steps): Delete.
12187 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12189 * mem-break.c (enum bkpt_type): New.
12190 (struct breakpoint): New field `type'.
12191 (set_breakpoint_at): Change return type to struct breakpoint
12192 pointer. Set type to `other_breakpoint' by default.
12193 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12194 in the breakpoint list.
12195 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12196 (reinsert_breakpoint): Rename to ...
12197 (reinsert_raw_breakpoint): ... this.
12198 (reinsert_breakpoints_at): Adjust.
12199 * mem-break.h (struct breakpoint): Declare.
12200 (set_breakpoint_at): Change return type to struct breakpoint
12203 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12205 * server.c (handle_query): Assign, not compare.
12207 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12209 Teach linux gdbserver to step-over-breakpoints.
12211 * linux-low.c (can_hardware_single_step): New.
12212 (supports_breakpoints): New.
12213 (handle_extended_wait): If stopping threads, read the stop pc of
12214 the new cloned LWP.
12216 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12217 low target doesn't support retrieving the PC.
12218 (add_lwp): Set last_resume_kind to resume_continue.
12219 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12220 (linux_attach): Don't clear stop_expected. Set the lwp's
12221 last_resume_kind to resume_stop.
12222 (linux_detach_one_lwp): Don't check for removed breakpoints.
12223 (check_removed_breakpoint): Delete.
12224 (status_pending_p): Rename to ...
12225 (status_pending_p_callback): ... this. Don't check for removed
12226 breakpoints. Don't consider threads that are stopped from GDB's
12228 (linux_wait_for_lwp): Always read the stop_pc here.
12229 (cancel_breakpoint): New.
12230 (step_over_bkpt): New global.
12231 (linux_wait_for_event_1): Implement stepping over breakpoints.
12232 (gdb_wants_lwp_stopped): New.
12233 (gdb_wants_all_stopped): New.
12234 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12235 single-step traps here. Store the thread's last reported target
12237 (send_sigstop): Don't clear stop_expected. Always set it,
12239 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12240 (cancel_finished_single_step): New.
12241 (cancel_finished_single_steps): New.
12242 (wait_for_sigstop): Don't cancel finished single-step traps here.
12243 (linux_resume_one_lwp): Don't check for removed breakpoints.
12244 Don't set `step' on non-hardware step archs.
12245 (linux_set_resume_request): Ignore resume_stop requests if already
12246 stopping or stopped. Set the lwp's last_resume_kind.
12247 (resume_status_pending_p): Don't check for removed breakpoints.
12248 (need_step_over_p): New.
12249 (start_step_over): New.
12250 (finish_step_over): New.
12251 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12252 requests. Clear the thread's last reported target waitstatus.
12253 Don't use the `suspended' flag. Don't consider pending breakpoints.
12254 (linux_resume): Start a step-over if necessary.
12255 (proceed_one_lwp): New.
12256 (proceed_all_lwps): New.
12257 (unstop_all_lwps): New.
12258 * linux-low.h (struct lwp_info): Rewrite comment for the
12259 `suspended' flag. Add the `stop_pc' field. Delete the
12260 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12261 Add `'last_resume_kind' and `need_step_over' fields.
12262 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12263 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12264 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12265 (set_raw_breakpoint_at): New.
12266 (set_breakpoint_at): Rewrite to use it.
12267 (reinsert_breakpoint_handler): Delete.
12268 (set_reinsert_breakpoint): New.
12269 (reinsert_breakpoint_by_bp): Delete.
12270 (delete_reinsert_breakpoints): New.
12271 (uninsert_breakpoint): Rewrite.
12272 (uninsert_breakpoints_at): New.
12273 (reinsert_breakpoint): Rewrite.
12274 (reinsert_breakpoints_at): New.
12275 (check_breakpoints): Rewrite.
12276 (breakpoint_here): New.
12277 (breakpoint_inserted_here): New.
12278 (check_mem_read): Adjust.
12279 * mem-break.h (breakpoints_supported, breakpoint_here)
12280 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12281 (reinsert_breakpoint_by_bp): Delete declaration.
12282 (delete_reinsert_breakpoints): Declare.
12283 (reinsert_breakpoint): Delete declaration.
12284 (reinsert_breakpoints_at): Declare.
12285 (uninsert_breakpoint): Delete declaration.
12286 (uninsert_breakpoints_at): Declare.
12287 (check_breakpoints): Adjust prototype.
12288 * server.h: Adjust include order.
12289 (struct thread_info): Declare here. Add a `last_status' field.
12291 2010-03-23 Michael Snyder <msnyder@vmware.com>
12293 * server.c (crc32): New function.
12294 (handle_query): Add handling for 'qCRC:' request.
12296 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12298 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12299 lwp had been stopped by a watchpoint.
12301 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12303 * server.h (internal_error): Declare.
12304 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12305 * utils.c (internal_error): New function.
12307 2010-03-15 Andreas Schwab <schwab@redhat.com>
12309 * configure.srv: Fix typo setting srv_regobj.
12311 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12313 * linux-low.c (fetch_register): Avoid passing a non string literal
12315 (usr_store_inferior_registers): Ditto.
12317 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12319 * linux-low.c (linux_write_memory): Bail out early if peeking
12322 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12324 * linux-low.h (struct lwp_info): New fields
12325 `stopped_by_watchpoint' and `stopped_data_address'.
12326 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12327 here, and cache them in the lwp object.
12328 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12330 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12332 (linux_stopped_by_watchpoint): Rewrite.
12333 (linux_stopped_data_address): Rewrite.
12335 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12337 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12338 switching the current inferior, not before.
12340 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12342 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12343 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12344 i386-linux.c and amd64-linux.c.
12345 (reg-i386.o): Removed.
12346 (reg-i386.c): Likewise.
12347 (reg-i386-linux.o): Likewise.
12348 (reg-i386-linux.c): Likewise.
12349 (reg-x86-64.o): Likewise.
12350 (reg-x86-64.c): Likewise.
12351 (reg-x86-64-linux.o): Likewise.
12352 (reg-x86-64-linux.c): Likewise.
12354 (i386.c): Likewise.
12355 (i386-linux.o): Likewise.
12356 (i386-linux.c): Likewise.
12357 (amd64.o): Likewise.
12358 (amd64.c): Likewise.
12359 (amd64-linux.o): Likewise.
12360 (amd64-linux.c): Likewise.
12362 * configure.srv (srv_i386_regobj): New.
12363 (srv_i386_linux_regobj): Likewise.
12364 (srv_amd64_regobj): Likewise.
12365 (srv_amd64_linux_regobj): Likewise.
12366 (srv_i386_32bit_xmlfiles): Likewise.
12367 (srv_i386_64bit_xmlfiles): Likewise.
12368 (srv_i386_xmlfiles): Likewise.
12369 (srv_amd64_xmlfiles): Likewise.
12370 (srv_i386_linux_xmlfiles): Likewise.
12371 (srv_amd64_linux_xmlfiles): Likewise.
12372 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12373 srv_xmlfiles to $srv_i386_xmlfiles.
12374 (i[34567]86-*-mingw32ce*): Likewise.
12375 (i[34567]86-*-mingw*): Likewise.
12376 (i[34567]86-*-nto*): Likewise.
12377 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12378 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12379 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12380 (x86_64-*-linux*): Likewise.
12382 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12383 (init_registers_amd64_linux): New.
12384 (x86_arch_setup): Replace init_registers_x86_64_linux with
12385 init_registers_amd64_linux.
12387 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12389 * configure.ac: Check for libdl. If it is not available link against
12390 static libthread_db.
12391 * configure: Regenerate.
12393 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12397 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12398 handing a read watchpoint.
12399 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12401 2010-02-12 Doug Evans <dje@google.com>
12403 * linux-low.c (linux_supports_tracefork_flag): Document.
12404 (linux_look_up_symbols): Add comment.
12406 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12408 * regcache.c (supply_register): Clear regcache if buf is NULL.
12410 2010-02-02 Nicolas Roche <roche@sourceware.org>
12411 Joel Brobecker <brobecker@adacore.com>
12413 * inferiors.c (find_inferior): Add function documentation.
12414 (unloaded_dll): Handle the case where the unloaded dll has not
12415 been previously registered in the dll list.
12417 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12419 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12420 (thumb2_breakpoint): New.
12421 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12423 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12425 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12426 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12429 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12431 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12433 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12435 * linux-s390-low.c (s390_collect_ptrace_register)
12436 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12438 2010-01-21 Doug Evans <dje@google.com>
12440 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12441 (PTRACE_ARG4_TYPE): New macro.
12442 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12443 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12444 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12445 (usr_store_inferior_registers): Ditto.
12446 (linux_read_memory, linux_write_memory): Ditto.
12447 (linux_test_for_tracefork): Ditto.
12449 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12450 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12452 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12454 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12457 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12459 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12460 prototype to take a regcache. Adjust.
12462 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12464 * regcache.h (struct thread_info): Forward declare.
12465 (struct regcache): New.
12466 (new_register_cache): Adjust prototype.
12467 (get_thread_regcache): Declare.
12468 (free_register_cache): Adjust prototype.
12469 (registers_to_string, registers_from_string): Ditto.
12470 (supply_register, supply_register_by_name, collect_register)
12471 (collect_register_as_string, collect_register_by_name): Ditto.
12472 * regcache.c (struct inferior_regcache_data): Delete.
12473 (get_regcache): Rename to ...
12474 (get_thread_regcache): ... this. Adjust. Switch inferior before
12475 fetching registers.
12476 (regcache_invalidate_one): Adjust.
12477 (regcache_invalidate): Fix prototype.
12478 (new_register_cache): Return the new register cache.
12479 (free_register_cache): Change prototype.
12480 (realloc_register_cache): Adjust.
12481 (registers_to_string): Change prototype to take a regcache. Adjust.
12482 (registers_from_string): Ditto.
12483 (register_data): Ditto.
12484 (supply_register): Ditto.
12485 (supply_register_by_name): Ditto.
12486 (collect_register): Ditto.
12487 (collect_register_as_string): Ditto.
12488 (collect_register_by_name): Ditto.
12489 * server.c (process_serial_event): Adjust.
12490 * linux-low.h (regset_fill_func, regset_store_func): Change
12492 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12494 * linux-low.c (get_stop_pc): Adjust.
12495 (check_removed_breakpoint): Adjust.
12496 (linux_wait_for_event): Adjust.
12497 (linux_resume_one_lwp): Adjust.
12498 (fetch_register): Add regcache parameter. Adjust.
12499 (usr_store_inferior_registers): Ditto.
12500 (regsets_fetch_inferior_registers): Ditto.
12501 (regsets_store_inferior_registers): Ditto.
12502 (linux_fetch_registers, linux_store_registers): Ditto.
12503 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12505 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12507 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12508 prototype to take a regcache.
12509 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12510 * remote-utils.c (convert_ascii_to_int, outreg)
12511 (prepare_resume_reply): Change prototype to take a regcache.
12513 * target.h (struct target_ops) <fetch_registers, store_registers>:
12514 Change prototype to take a regcache.
12515 (fetch_inferior_registers, store_inferior_registers): Change
12516 prototype to take a regcache. Adjust.
12517 * proc-service.c (ps_lgetregs): Adjust.
12518 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12519 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12520 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12521 take a regcache. Adjust.
12522 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12523 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12524 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12525 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12526 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12527 (cris_cannot_fetch_register):
12528 (cris_breakpoint_at): Change prototype to take a regcache.
12530 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12531 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12532 to take a regcache. Adjust.
12533 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12535 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12536 take a regcache. Adjust.
12537 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12538 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12539 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12540 * linux-mips-low.c (mips_get_pc):
12541 (mips_set_pc): Change prototype to take a regcache. Adjust.
12542 (mips_reinsert_addr): Adjust.
12543 (mips_collect_register): Change prototype to take a regcache.
12545 (mips_supply_register):
12546 (mips_collect_register_32bit, mips_supply_register_32bit)
12547 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12548 (mips_store_fpregset): Ditto.
12549 * linux-ppc-low.c (ppc_supply_ptrace_register)
12550 (ppc_supply_ptrace_register): Ditto.
12551 (parse_spufs_run): Adjust.
12552 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12553 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12554 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12555 take a regcache. Adjust.
12556 * linux-s390-low.c (s390_collect_ptrace_register)
12557 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12558 (s390_set_pc): Change prototype to take a regcache. Adjust.
12559 (s390_arch_setup): Adjust.
12560 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12561 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12562 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12563 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12564 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12566 (sparc_breakpoint_at): Adjust.
12567 * linux-xtensa-low.c (xtensa_fill_gregset):
12568 (xtensa_store_gregset):
12569 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12570 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12571 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12572 prototype to take a regcache. Adjust.
12573 * win32-arm-low.c (arm_fetch_inferior_register)
12574 (arm_store_inferior_register): Change prototype to take a
12576 * win32-i386-low.c (i386_fetch_inferior_register)
12577 (i386_store_inferior_register): Change prototype to take a
12579 * win32-low.c (child_fetch_inferior_registers)
12580 (child_store_inferior_registers): Change prototype to take a
12582 (win32_wait): Adjust.
12583 (win32_fetch_inferior_registers): Change prototype to take a
12585 (win32_store_inferior_registers): Adjust.
12586 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12587 store_inferior_register>: Change prototype to take a regcache.
12589 2010-01-20 Doug Evans <dje@google.com>
12591 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12593 (linux_wait_for_event1, linux_init_signals): Ditto.
12594 (W_STOPCODE): Provide definition if missing.
12596 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12598 * linux-low.c (linux_core_of_thread): New.
12599 (compare_ints, show_process, list_threads): New.
12600 (linux_qxfer_osdata): Report threads and cores.
12601 (linux_target_op): Register linux_core_of_thread.
12602 * remote-utils.c (prepare_resume_reply): Report the core.
12603 (buffer_xml_printf): Support %d specifier.
12604 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12606 (handle_query): Handle qXfer:threads. Announce availability
12608 * target.h (struct target_ops): New field core_of_thread.
12610 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12612 * Makefile.in (clean): Remove new generated files.
12613 (reg-s390.o, reg-s390.c): Remove rules.
12614 (reg-s390x.o, reg-s390x.c): Likewise.
12615 (s390-linux32.o, s390-linux32.c): Add rules.
12616 (s390-linux64.o, s390-linux64.c): Likewise.
12617 (s390x-linux64.o, s390x-linux64.c): Likewise.
12618 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12619 * linux-s390-low.c: Include <elf.h>.
12620 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12621 (init_registers_s390): Remove prototype.
12622 (init_registers_s390x): Likewise.
12623 (init_registers_s390_linux32): Add prototype.
12624 (init_registers_s390_linux64): Likewise.
12625 (init_registers_s390x_linux64): Likewise.
12626 (s390_num_regs_3264): New define.
12627 (s390_regmap_3264): New global variable.
12628 (s390_cannot_fetch_register): Remove obsolete check.
12629 (s390_cannot_store_register): Likewise.
12630 (s390_collect_ptrace_register): Handle upper/lower register halves.
12631 (s390_supply_ptrace_register): Likewise.
12632 (s390_fill_gregset): Update to register number changes.
12633 (s390_get_hwcap): New routine.
12634 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12635 Install appropriate regmap and register set.
12637 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12639 * server.c (gdbserver_version): Update copyright year to 2010.
12640 * gdbreplay.c (gdbreplay_version): Likewise.
12642 2009-12-28 Doug Evans <dje@google.com>
12644 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12645 elf/external.h. Include <elf.h> instead but only if necessary.
12647 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12649 * linux-low.c (linux_remove_process): Remove `detaching'
12650 parameter. Don't release/detach from thread_db here.
12651 (linux_kill): Release/detach from thread_db here, ...
12652 (linux_detach): ... and here, before actually detaching.
12653 (linux_wait_1): ... and here, when a process exits.
12654 * thread-db.c (any_thread_of): New.
12655 (thread_db_free): Switch the current inferior to a thread of the
12658 2009-12-21 Doug Evans <dje@google.com>
12660 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12662 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12663 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12664 warning ifndef __NR_tkill. Move setting of errno there too.
12665 Delete unnecessary resetting of errno after syscall.
12666 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12668 * configure.ac: Check for dladdr.
12669 * config.in: Regenerate.
12670 * configure: Regenerate.
12671 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12672 (try_thread_db_load): Update.
12674 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12676 2009-12-18 Doug Evans <dje@google.com>
12678 * event-loop.c: Include unistd.h if it exists.
12680 * linux-low.c (my_waitpid): Move definition away from being in
12681 between linux_tracefork_child/linux_test_for_tracefork.
12683 * gdb_proc_service.h (psaddr_t): Fix type.
12684 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12685 signature to match glibc.
12687 2009-12-16 Doug Evans <dje@google.com>
12689 * linux-low.c (linux_read_memory): Fix argument to read.
12691 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12693 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12694 events, don't leave current_inferior pointing at null.
12696 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12698 * win32-low.c (LOG): Delete.
12699 (OUTMSG): Output to stderr.
12700 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12701 on compile time LOG macro.
12702 (win32_wait): Fix debug output.
12704 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12706 * win32-low.c (win32_add_one_solib): If the dll name is
12707 "ntdll.dll", prepend the system directory to the dll path.
12709 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12711 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12713 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12714 Vladimir Prus <vladimir@codesourcery.com>
12716 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12717 * configure.ac: Check for __mcoldfire__ and set
12718 gdb_cv_m68k_is_coldfire.
12719 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12720 reg-cf.o and reg-m68k.o.
12721 * configure: Regenerated.
12723 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12725 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12726 Pass it to thread_db_free.
12727 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12728 proper `detaching' argument to linux_remove_process.
12729 * linux-low.h (thread_db_free): Add `detaching' parameter.
12730 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12732 (thread_db_free): Add `detaching' parameter. Only
12733 call td_ta_clear_event if detaching from process.
12735 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12737 * thread-db.c (thread_db_free): Fix typo.
12739 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12742 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12744 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12746 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12747 with an i686 compiler.
12748 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12750 * configure: Rebuilt.
12752 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12756 * server.c (handle_search_memory_1): Correct read_addr initialization
12757 in loop for searching subsequent chunks.
12759 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12761 * configure.ac: New --with-libthread-db option.
12762 * thread-db.c: Allow direct dependence on libthread_db.
12763 (thread_db_free): Adjust.
12764 * config.in: Regenerate.
12765 * configure: Likewise.
12767 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12770 * thread-db.c (attach_thread): New function.
12771 (maybe_attach_thread): Return success/failure.
12772 (find_new_threads_callback): Adjust.
12773 (thread_db_find_new_threads): Loop until no new threads.
12775 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12777 * proc-service.c (ps_lgetregs): Formatting.
12779 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12781 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12782 * configure.ac: Adjust.
12783 * linux-low.h (struct process_info_private): Move members to struct
12785 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12786 * linux-low.c (linux_remove_process): Adjust.
12787 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12788 * server.c (handle_query): Move code ...
12789 (handle_monitor_command): ... here. New function.
12790 * target.h (struct target_ops): New member.
12791 * thread-db.c (struct thread_db): New.
12792 (libthread_db_search_path): New variable.
12793 (thread_db_create_event, thread_db_enable_reporting)
12794 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12795 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12796 (try_thread_db_load_1, dladdr_to_soname): New functions.
12797 (try_thread_db_load, thread_db_load_search): New functions.
12798 (thread_db_init): Search for libthread_db.
12799 (thread_db_free): New function.
12800 (thread_db_handle_monitor_command): Likewise.
12801 * config.in: Regenerate.
12802 * configure: Regenerate.
12804 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12806 * spu-low.c (spu_kill): Wait for inferior to terminate.
12807 Call clear_inferiors.
12808 (spu_detach): Call clear_inferiors.
12810 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12812 * aclocal.m4: Regenerate.
12813 * config.in: Likewise.
12814 * configure: Likewise.
12816 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12818 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12819 (parse_spufs_run): New function.
12820 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12821 (ppc_breakpoint_at): Handle SPU breakpoints.
12823 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12825 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12826 (SPUFS_MAGIC): Define.
12827 (spu_enumerate_spu_ids): New function.
12828 (linux_qxfer_spu): New function.
12829 (linux_target_ops): Install linux_qxfer_spu.
12831 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12833 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12834 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12835 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12836 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12837 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12838 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12839 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12840 (init_registers_powerpc_cell32l): Add prototype.
12841 (init_registers_powerpc_cell64l): Likewise.
12842 (ppc_arch_setup): Detect Cell/B.E. architecture.
12844 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12846 * Makefile.in (datarootdir): New variable.
12848 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12850 * linux-low.c (linux_write_memory): Update debugging output.
12851 * Makefile.in (clean): Add new descriptions.
12852 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12853 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12854 * configure.srv: Add new files for arm*-*-linux*.
12855 * linux-arm-low.c: Add new declarations.
12856 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12857 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12858 (HWCAP_VFPv3D16): New.
12859 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12860 instead of __IWMMXT__.
12861 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12862 (arm_arch_setup): New.
12863 (target_regsets): Remove #ifdef. Add VFP regset.
12864 (the_low_target): Use arm_arch_setup.
12866 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12868 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12869 the main thread again.
12871 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12873 Adding Neutrino gdbserver.
12874 * configure: Regenerated.
12875 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12876 * configure.srv (i[34567]86-*-nto*): New target.
12877 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12878 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12879 (nto_comctrl) [__QNX__]: New function.
12880 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12882 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12884 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12887 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12888 Pedro Alves <pedro@codesourcery.com>
12890 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12891 don't support CONTEXT_EXTENDED_REGISTERS.
12892 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12893 (the_low_target): Install them.
12894 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12895 failing with ERROR_PIPE_NOT_CONNECTED.
12897 2009-06-30 Doug Evans <dje@google.com>
12898 Pierre Muller <muller@ics.u-strasbg.fr>
12900 Add h/w watchpoint support to x86-linux, win32-i386.
12901 * Makefile.in (SFILES): Add i386-low.c
12902 (i386_low_h): Define.
12903 (i386-low.o): Add dependencies.
12904 (linux-x86-low.o): Add i386-low.h dependency.
12905 (win32-i386-low.o): Ditto.
12906 * i386-low.c: New file.
12907 * i386-low.h: New file.
12908 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12909 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12910 * linux-low.c (linux_add_process): Initialize arch_private.
12911 (linux_remove_process): Free arch_private.
12912 (add_lwp): Initialize arch_private.
12913 (delete_lwp): Free arch_private.
12914 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12916 * linux-low.h (process_info_private): New member arch_private.
12917 (lwp_info): New member arch_private.
12918 (linux_target_ops): New members new_process, new_thread,
12920 (ptid_of): New macro.
12921 * linux-x86-low.c: Include stddef.h, i386-low.h.
12922 (arch_process_info): New struct.
12923 (arch_lwp_info): New struct.
12924 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12925 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12926 (i386_dr_low_get_status): New function.
12927 (x86_insert_point, x86_remove_point): New functions.
12928 (x86_stopped_by_watchpoint): New function.
12929 (x86_stopped_data_address): New function.
12930 (x86_linux_new_process, x86_linux_new_thread): New functions.
12931 (x86_linux_prepare_to_resume): New function.
12932 (the_low_target): Add entries for insert_point, remove_point,
12933 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12935 * server.c (debug_hw_points): New global.
12936 (monitor_show_help): Document set debug-hw-points.
12937 (handle_query): Process "set debug-hw-points".
12938 * server.h (debug_hw_points): Declare.
12939 (paddress): Declare.
12940 * utils.c (NUMCELLS, CELLSIZE): New macros.
12941 (get_sell, xsnprintf, paddress): New functions.
12942 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12943 remove_point, stopped_by_watchpoint, stopped_data_address.
12944 * win32-i386-low.c: Include i386-low.h.
12945 (debug_reg_state): Replaces dr.
12946 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12947 (i386_dr_low_get_status): New function.
12948 (i386_insert_point, i386_remove_point): New functions.
12949 (i386_stopped_by_watchpoint): New function.
12950 (i386_stopped_data_address): New function.
12951 (i386_initial_stuff): Update.
12952 (get_thread_context,set_thread_context,i386_thread_added): Update.
12953 (the_low_target): Add entries for insert_point,
12954 remove_point, stopped_by_watchpoint, stopped_data_address.
12955 * win32-low.c (win32_insert_watchpoint): New function.
12956 (win32_remove_watchpoint): New function.
12957 (win32_stopped_by_watchpoint): New function.
12958 (win32_stopped_data_address): New function.
12959 (win32_target_ops): Add entries for insert_watchpoint,
12960 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12961 * win32-low.h (win32_target_ops): New members insert_point,
12962 remove_point, stopped_by_watchpoint, stopped_data_address.
12964 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12966 * server.c (process_serial_event): Re-return unsupported, not
12967 error, if the type isn't recognized. Re-allow supporting only
12968 insert or remove packets. Also call require_running for
12969 breakpoints. Add missing break statement to default case. Tidy.
12970 * target.h (struct target_ops): Rename insert_watchpoint to
12971 insert_point, and remove_watchpoint to remove_point.
12973 * linux-low.h (struct linux_target_ops): Likewise.
12974 * linux-low.c (linux_insert_watchpoint): Rename to ...
12975 (linux_insert_point): ... this. Adjust.
12976 (linux_remove_watchpoint): Rename to ...
12977 (linux_remove_point): ... this. Adjust.
12978 (linux_target_ops): Adjust.
12979 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12980 (cris_insert_point): ... this.
12981 (cris_remove_watchpoint): Rename to ...
12982 (cris_remove_point): ... this.
12983 (the_low_target): Adjust.
12985 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12987 * server.c (handle_v_kill): Pass signal_pid to
12988 kill_inferior if multi_process is zero.
12990 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12992 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12993 * target.h (target_ops): Comment for *_watchpoint to make it clear
12994 the functions can get types '0' and '1'.
12996 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12998 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12999 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13000 * regcache.c (get_regcache): Likewise.
13001 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13002 * win32-low.c (child_fetch_inferior_registers): Remove check for
13005 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13006 Pedro Alves <pedro@codesourcery.com>
13008 * target.h (struct target_ops) <supports_multi_process>: New
13010 (target_supports_multi_process): New.
13011 * server.c (handle_query): Even if GDB reports support, only
13012 enable multi-process if the target also supports it. Report
13013 multi-process support only if the target backend supports it.
13014 * linux-low.c (linux_supports_multi_process): New function.
13015 (linux_target_ops): Install it as target_supports_multi_process
13018 2009-05-24 Doug Evans <dje@google.com>
13020 Global renaming of find_thread_pid to find_thread_ptid.
13021 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13022 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13023 All callers updated.
13025 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13026 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13029 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13030 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13031 (linux_resume_one_lwp): Ditto.
13033 2009-05-23 Doug Evans <dje@google.com>
13035 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13036 from struct inferior_list_entry * to struct lwp_info *.
13037 All callers updated.
13039 2009-05-13 Doug Evans <dje@google.com>
13041 * linux-x86-low.c: Don't include assert.h.
13042 (x86_siginfo_fixup): Use fatal, not assert.
13043 (x86_arch_setup): Fix comment.
13045 2009-05-12 Doug Evans <dje@google.com>
13047 Biarch support for i386/amd64 gdbserver.
13048 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13049 Add linux-x86-low.c.
13050 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13051 (linux-x86-low.o): Add.
13052 * linux-x86-64-low.c: Delete.
13053 * linux-i386-low.c: Delete.
13054 * linux-x86-low.c: New file.
13055 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13057 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13059 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13060 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13061 (linux_child_pid_to_exec_file): New function.
13062 (elf_64_header_p, elf_64_file_p): New functions.
13063 (siginfo_fixup): New function.
13064 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13065 give target a chance to convert layout.
13066 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13067 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13069 2009-05-07 Doug Evans <dje@google.com>
13071 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13072 (regsets_store_inferior_registers): Ditto.
13074 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13078 * linux-low.c (must_set_ptrace_flags): Delete.
13079 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13081 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13082 `lwp->must_set_ptrace_flags' instead.
13083 (linux_wait_for_event_1): Set ptrace options here.
13084 (linux_wait_1): ... not here.
13086 2009-04-30 Doug Evans <dje@google.com>
13088 * inferiors.c (started_inferior_callback): New function.
13089 (attached_inferior_callback): New function.
13090 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13091 * server.c (print_started_pid, print_attached_pid): New functions.
13092 (detach_or_kill_for_exit): New function.
13093 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13094 * server.h (have_started_inferiors_p): Declare.
13095 (have_attached_inferiors_p): Declare.
13097 * inferiors.c (remove_process): Fix memory leak, free process.
13098 * linux-low.c (linux_remove_process): New function.
13099 (linux_kill): Call it instead of remove_process.
13100 (linux_detach, linux_wait_1): Ditto.
13102 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13104 * configure.srv: Add x86 Windows CE target.
13106 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13108 * inferiors.c (get_thread_process): Make global.
13109 * server.h (get_thread_process): Add prototype.
13110 * thread-db.c (find_one_thread): Use get_thread_process
13111 instead of current_process.
13112 (thread_db_get_tls_address): Do not crash if called when
13113 thread layer is not yet initialized.
13115 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13117 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13118 * spu-low.c (current_tid): Rename to ...
13119 (current_ptid): ... this.
13120 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13121 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13122 ptid_get_lwp (current_ptid) instead of current_tid.
13123 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13124 instead of current_tid. Use find_process_pid to verify pid
13125 argument is valid. Pass proper argument to remove_process.
13126 (spu_thread_alive): Compare current_ptid instead of current_tid.
13127 (spu_resume): Likewise.
13129 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13131 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13134 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13136 Implement the multiprocess extensions, and add linux multiprocess
13139 * server.h (ULONGEST): Declare.
13140 (struct ptid, ptid_t): New.
13141 (minus_one_ptid, null_ptid): Declare.
13142 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13143 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13144 (struct inferior_list_entry): Change `id' type from unsigned from
13146 (struct sym_cache, struct breakpoint, struct
13147 process_info_private): Forward declare.
13148 (struct process_info): Declare.
13149 (current_process): Declare.
13150 (all_processes): Declare.
13151 (initialize_inferiors): Declare.
13152 (add_thread): Adjust to use ptid_t.
13153 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13154 (add_process, remove_process, find_thread_pid): Declare.
13155 (find_inferior_id): Adjust to use ptid_t.
13156 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13157 (multi_process): Declare.
13158 (push_event): Adjust to use ptid_t.
13159 (read_ptid, write_ptid): Declare.
13160 (prepare_resume_reply): Adjust to use ptid_t.
13161 (clear_symbol_cache): Declare.
13162 * inferiors.c (all_processes): New.
13163 (null_ptid, minus_one_ptid): New.
13164 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13165 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13166 (add_thread): Change unsigned long to ptid. Remove gdb_id
13168 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13169 (gdb_id_to_thread): Rename to ...
13170 (find_thread_pid): ... this. Change unsigned long to ptid.
13171 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13172 (loaded_dll, pull_pid_from_list): Adjust.
13173 (add_process, remove_process, find_process_pid)
13174 (get_thread_process, current_process, initialize_inferiors): New.
13175 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13176 (struct target_waitstatus) <related_pid>: Ditto.
13177 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13178 return type to int.
13179 (struct target_ops) <join>: Add `pid' argument.
13180 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13181 (struct target_ops) <wait>: Add `ptid' field. Change return type
13183 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13184 (mywait): Add `ptid' argument. Change return type to ptid_t.
13185 (target_pid_to_str): Declare.
13186 * target.c (set_desired_inferior): Adjust to use ptids.
13187 (mywait): Add new `ptid' argument. Adjust.
13188 (target_pid_to_str): New.
13189 * mem-break.h (free_all_breakpoints): Declare.
13190 * mem-break.c (breakpoints): Delelete.
13191 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13192 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13193 to use per-process breakpoint list.
13194 (free_all_breakpoints): New.
13195 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13196 (symbol_cache, all_symbols_looked_up): Delete.
13198 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13200 (prepare_resume_reply): Change ptid argument's type from unsigned
13201 long to ptid_t. Adjust. Implement W;process and X;process.
13202 (free_sym_cache, clear_symbol_cache): New.
13203 (look_up_one_symbol): Adjust to per-process symbol cache. *
13204 * server.c (cont_thread, general_thread, step_thread): Change type
13206 (attached): Delete.
13207 (multi_process): New.
13208 (last_ptid): Change type to ptid_t.
13209 (struct vstop_notif) <ptid>: Change type to ptid_t.
13210 (queue_stop_reply, push_event): Change `ptid' argument's type to
13212 (discard_queued_stop_replies): Add `pid' argument.
13213 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13214 changes. Don't reference the `attached' global.
13215 (attach_inferior): Adjust to mywait interface changes.
13216 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13217 features. Handle and report "multiprocess+". Handle
13219 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13221 (handle_v_kill): New.
13222 (handle_v_stopped): Adjust to use target_pid_to_str.
13223 (handle_v_requests): Allow multiple attaches and runs when
13224 multiprocess extensions are in effect. Handle "vKill".
13225 (myresume): Adjust to use ptids.
13226 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13227 (handle_status): Adjust to discard_queued_stop_replies interface
13229 (first_thread_of, kill_inferior_callback)
13230 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13231 (main): Call initialize_inferiors. Adjust to use ptids, killing
13232 and detaching from all inferiors. Handle multiprocess packet
13234 * linux-low.h: Include gdb_proc_service.h.
13235 (struct process_info_private): New.
13236 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13237 <lwpid_of>: Use ptid_get_lwp.
13238 (get_lwp_thread): Adjust.
13239 (struct lwp_info): Add `dead' member.
13240 (find_lwp_pid): Declare.
13241 * linux-low.c (thread_db_active): Delete.
13242 (new_inferior): Adjust comment.
13243 (inferior_pid): Delete.
13244 (linux_add_process): New.
13245 (handle_extended_wait): Adjust.
13246 (add_lwp): Change unsigned long to ptid.
13247 (linux_create_inferior): Add process to processes table. Adjust
13248 to use ptids. Don't set new_inferior here.
13249 (linux_attach_lwp): Rename to ...
13250 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13251 it. Adjust to use ptids.
13252 (linux_attach_lwp): New.
13253 (linux_attach): Add process to processes table. Don't set
13255 (struct counter): New.
13256 (second_thread_of_pid_p, last_thread_of_process_p): New.
13257 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13258 multiple processes.
13259 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13260 processes. Remove process from process table.
13261 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13262 to multiple processes.
13263 (any_thread_of): New.
13264 (linux_detach): Add `pid' argument, and handle it. Remove process
13265 from processes table.
13266 (linux_join): Add `pid' argument. Handle it.
13267 (linux_thread_alive): Change unsighed long argument to ptid_t.
13268 Consider dead lwps as not being alive.
13269 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13270 threads we're not interested in.
13271 (same_lwp, find_lwp_pid): New.
13272 (linux_wait_for_lwp): Change `pid' argument's type from int to
13274 (linux_wait_for_event): Rename to ...
13275 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13276 from int to ptid_t. Adjust.
13277 (linux_wait_for_event): New.
13278 (linux_wait_1): Add `ptid' argument. Change return type to
13279 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13280 that exit from the process table.
13281 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13283 (mark_lwp_dead): New.
13284 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13285 stopping all threads, mark its main lwp as dead.
13286 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13288 (fetch_register, usr_store_inferior_registers)
13289 (regsets_fetch_inferior_registers)
13290 (regsets_store_inferior_registers, linux_read_memory)
13291 (linux_write_memory): Inline `inferior_pid'.
13292 (linux_look_up_symbols): Adjust to use per-process
13293 `thread_db_active'.
13294 (linux_request_interrupt): Adjust to use ptids.
13295 (linux_read_auxv): Inline `inferior_pid'.
13296 (initialize_low): Don't reference thread_db_active.
13297 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13298 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13299 (ps_getpid): Return the pid of the current inferior.
13300 * thread-db.c (proc_handle, thread_agent): Delete.
13301 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13303 (find_one_thread): Change argument type to ptid_t. Adjust to
13305 (maybe_attach_thread): Adjust to per-process data and ptids.
13306 (thread_db_find_new_threads): Ditto.
13307 (thread_db_init): Ditto.
13308 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13309 processes table. Adjust to use ptids.
13310 (spu_kill, spu_detach): Adjust interface. Remove process from
13312 (spu_join, spu_thread_alive): Adjust interface.
13313 (spu_wait): Adjust interface. Remove process from processes
13314 table. Adjust to use ptids.
13315 * win32-low.c (current_inferior_tid): Delete.
13316 (current_inferior_ptid): New.
13317 (debug_event_ptid): New.
13318 (thread_rec): Take a ptid. Adjust.
13319 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13320 (child_delete_thread): Ditto.
13321 (do_initial_child_stuff): Add `attached' argument. Add process to
13323 (child_fetch_inferior_registers, child_store_inferior_registers):
13325 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13326 (win32_attach): Pass 1 to do_initial_child_stuff.
13327 (win32_kill): Adjust interface. Remove process from processes
13329 (win32_detach): Ditto.
13330 (win32_join): Adjust interface.
13331 (win32_thread_alive): Take a ptid.
13332 (win32_resume): Adjust to use ptids.
13333 (get_child_debug_event): Ditto.
13334 (win32_wait): Adjust interface. Remove exiting process from
13337 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13339 Non-stop mode support.
13341 * server.h (non_stop): Declare.
13342 (gdb_client_data, handler_func): Declare.
13343 (delete_file_handler, add_file_handler, start_event_loop):
13345 (handle_serial_event, handle_target_event, push_event)
13346 (putpkt_notif): Declare.
13347 * target.h (enum resume_kind): New.
13348 (struct thread_resume): Replace `step' field by `kind' field.
13349 (TARGET_WNOHANG): Define.
13350 (struct target_ops) <wait>: Add `options' argument.
13351 <supports_non_stop, async, start_non_stop>: New fields.
13352 (target_supports_non_stop, target_async): New.
13353 (start_non_stop): Declare.
13354 (mywait): Add `options' argument.
13355 * target.c (mywait): Add `options' argument. Print child exit
13356 notifications here.
13357 (start_non_stop): New.
13358 * server.c (non_stop, own_buf, mem_buf): New globals.
13359 (struct vstop_notif): New.
13360 (notif_queue): New global.
13361 (queue_stop_reply, push_event, discard_queued_stop_replies)
13362 (send_next_stop_reply): New.
13363 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13365 (attach_inferior): In non-stop mode, don't wait for the target
13367 (handle_general_set): Handle QNonStop.
13368 (handle_query): When handling qC, return the current general
13369 thread, instead of the first thread of the list.
13370 (handle_query): If the backend supports non-stop mode, include
13371 QNonStop+ in the qSupported query response.
13372 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13374 (handle_v_attach, handle_v_run): Handle non-stop mode.
13375 (handle_v_stopped): New.
13376 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13377 (myresume): Adjust to use resume_kind. Handle non-stop.
13378 (queue_stop_reply_callback): New.
13379 (handle_status): Handle non-stop mode.
13380 (main): Clear non_stop flag on reconnection. Use the event-loop.
13381 Refactor serial protocol handling from here ...
13382 (process_serial_event): ... to this new function. When GDB
13383 selects any thread, select one here. In non-stop mode, wait until
13384 GDB acks all pending events before exiting.
13385 (handle_serial_event, handle_target_event): New.
13386 * remote-utils.c (remote_open): Install remote_desc in the event
13388 (remote_close): Remove remote_desc from the event loop.
13389 (putpkt_binary): Rename to...
13390 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13391 (putpkt_binary): New as wrapper around putpkt_binary_1.
13392 (putpkt_notif): New.
13393 (prepare_resume_reply): In non-stop mode, don't change the
13395 * event-loop.c: New.
13396 * Makefile.in (OBJ): Add event-loop.o.
13397 (event-loop.o): New rule.
13399 * linux-low.h (pid_of): Moved here.
13401 (get_lwp_thread): Use lwpid_of.
13402 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13403 * linux-low.c (pid_of): Delete.
13404 (inferior_pid): Use lwpid_of.
13405 (linux_event_pipe): New.
13406 (target_is_async_p): New.
13408 (handle_extended_wait): Use lwpid_of.
13409 (add_lwp): Don't set lwpid field.
13410 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13411 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13412 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13413 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13414 first. Adjust to linux_wait_for_event interface changes. Use
13416 (linux_detach): Don't delete the main lwp here.
13417 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13418 (status_pending_p): Don't consider explicitly suspended lwps.
13419 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13420 pointer. Add OPTIONS argument. Change return type to int. Use
13421 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13422 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13423 pointer. Add status pointer argument. Return a pid instead of a
13424 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13425 changes. In non-stop mode, don't switch to a random thread.
13426 (linux_wait): Rename to...
13427 (linux_wait_1): ... this. Add target_options argument, and handle
13428 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13429 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13430 clean exit and signal exit code. Don't stop all threads in
13431 non-stop mode. In all-stop mode, only stop all threads when
13432 reporting a stop to GDB. Handle explicit thread stop requests.
13433 (async_file_flush, async_file_mark): New.
13435 (send_sigstop): Use lwpid_of.
13436 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13437 interface changes. In non-stop mode, don't switch to a random
13439 (linux_resume_one_lwp): Use lwpid_of.
13440 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13441 (linux_resume_one_thread): ... this. Handle resume_stop. In
13442 non-stop mode, don't look for pending flag in all threads.
13443 (resume_status_pending_p): Don't consider explicitly suspended
13445 (my_waitpid): Reimplement. Emulate __WALL.
13446 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13448 (sigchld_handler, linux_supports_non_stop, linux_async)
13449 (linux_start_non_stop): New.
13450 (linux_target_ops): Register linux_supports_non_stop, linux_async
13451 and linux_start_non_stop.
13452 (initialize_low): Install SIGCHLD handler.
13453 * thread-db.c (thread_db_create_event, find_one_thread)
13454 (thread_db_get_tls_address): Use lwpid_of.
13455 * win32-low.c (win32_detach): Adjust to use resume_kind.
13456 (win32_wait): Add `options' argument.
13457 * spu-low.c (spu_resume): Adjust to use resume_kind.
13458 (spu_wait): Add `options' argument.
13460 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13462 Decouple target code from remote protocol.
13464 * target.h (enum target_waitkind): New.
13465 (struct target_waitstatus): New.
13466 (struct target_ops) <wait>: Return an unsigned long. Take a
13467 target_waitstatus pointer instead of a char pointer.
13468 (mywait): Likewise.
13469 * target.c (mywait): Change prototype to return an unsigned long.
13470 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13471 * server.h (thread_from_wait, old_thread_from_wait): Delete
13473 (prepare_resume_reply): Change prototype to take a
13475 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13476 (last_status, last_ptid): New.
13477 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13478 pid instead of a signal.
13479 (attach_inferior): Remove "status" and "signal" parameters.
13481 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13483 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13484 (handle_v_requests, myresume): Remove "status" and "signal"
13485 parameters. Adjust.
13486 (handle_status): New.
13487 (main): Delete local `status'. Adjust.
13488 * remote-utils.c: Include target.h.
13489 (prepare_resume_reply): Change prototype to take a
13490 target_waitstatus. Adjust.
13492 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13494 * spu-low.c (spu_wait): Adjust.
13495 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13497 (win32_wait): Adjust.
13499 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13501 * target.h (struct thread_resume): Delete leave_stopped member.
13502 (struct target_ops): Add a `n' argument to the `resume' callback.
13503 * server.c (start_inferior): Adjust.
13504 (handle_v_cont, myresume): Adjust.
13505 * linux-low.c (check_removed_breakpoint): Adjust to resume
13506 interface change, and to removed leave_stopped field.
13507 (resume_ptr): Delete.
13508 (struct thread_resume_array): New.
13509 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13510 resume interface change.
13511 (linux_continue_one_thread, linux_queue_one_thread)
13512 (resume_status_pending_p): Check if the resume field is NULL
13513 instead of checking the leave_stopped member.
13514 (linux_resume): Adjust to the target resume interface change.
13515 * spu-low.c (spu_resume): Adjust to the target resume interface
13517 * win32-low.c (win32_detach, win32_resume): Ditto.
13519 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13521 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13523 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13525 (linux_continue_one_thread): Only preserve the stepping flag if
13526 there's a pending breakpoint.
13528 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13530 * server.c (main): After the inferior having exited, call
13531 remote_close before exiting gdbserver.
13533 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13535 Fix size of FPSCR in Power 7 processors.
13536 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13537 (PPC_FEATURE_HAS_DFP): New #define.
13538 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13541 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13543 * server.c (handle_query) Whitespace and formatting.
13545 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13547 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13548 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13549 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13550 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13551 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13552 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13553 Makefile.in, configure.ac: Fix whitespace throughout.
13554 * configure: Regenerate.
13556 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13558 * inferiors.c (find_inferior): Make it safe for the callback
13559 function to delete the currently iterated inferior.
13561 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13563 * Makefile.in (linuw_low_h): Move higher.
13564 (thread-db.o): Depend on $(linux_low_h).
13566 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13568 Rename "process" to "lwp" throughout.
13570 * linux-low.c (all_processes): Rename to...
13571 (all_lwps): ... this.
13572 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13573 (add_process): Rename to ...
13574 (add_lwp): ... this. Adjust.
13575 (linux_create_inferior): Adjust.
13576 (linux_attach_lwp): Adjust.
13577 (linux_attach): Adjust.
13578 (linux_kill_one_process): Rename to ...
13579 (linux_kill_one_lwp): ... this. Adjust.
13580 (linux_kill): Adjust.
13581 (linux_detach_one_process): Rename to ...
13582 (linux_detach_one_lwp): ... this. Adjust.
13583 (linux_detach): Adjust.
13584 (check_removed_breakpoint): Adjust.
13585 (status_pending_p): Adjust.
13586 (linux_wait_for_process): Rename to ...
13587 (linux_wait_for_lwp): ... this. Adjust.
13588 (linux_wait_for_event): Adjust.
13589 (send_sigstop): Adjust.
13590 (wait_for_sigstop): Adjust.
13591 (stop_all_processes): Rename to ...
13592 (stop_all_lwps): ... this.
13593 (linux_resume_one_process): Rename to ...
13594 (linux_resume_one_lwp): ... this. Adjust.
13595 (linux_set_resume_request, linux_continue_one_thread)
13596 (linux_queue_one_thread, resume_status_pending_p)
13597 (usr_store_inferior_registers, regsets_store_inferior_registers)
13598 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13600 * linux-low.h (get_process): Rename to ...
13601 (get_lwp): ... this. Adjust.
13602 (get_thread_process): Rename to ...
13603 (get_thread_lwp): ... this. Adjust.
13604 (get_process_thread): Rename to ...
13605 (get_lwp_thread): ... this. Adjust.
13606 (struct process_info): Rename to ...
13607 (struct lwp_info): ... this.
13608 (all_processes): Rename to ...
13609 (all_lwps): ... this.
13610 * proc-service.c (ps_lgetregs): Adjust.
13611 * thread-db.c (thread_db_create_event, find_one_thread)
13612 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13614 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13616 * server.c (handle_query): Handle "qAttached".
13618 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13620 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13621 GPLv3, update license URL.
13623 2009-03-01 Doug Evans <dje@google.com>
13625 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13626 (server_h): Add gdb_signals.h.
13627 (signals.o): Update.
13628 * server.h (target_signal_from_host,target_signal_to_host_p)
13629 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13631 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13633 * remote-utils.c (getpkt): Also generate remote-debug
13634 information if noack_mode is set.
13636 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13638 * server.c (handle_query): Report qXfer:siginfo:read and
13639 qXfer:siginfo:write as supported and handle them.
13640 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13641 * linux-low.c (linux_xfer_siginfo): New.
13642 (linux_target_ops): Set it.
13644 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13646 * server.c (gdbserver_usage): Mention --remote-debug.
13647 (main): Accept '--remote-debug' switch.
13649 2009-01-18 Doug Evans <dje@google.com>
13651 * regcache.c (new_register_cache): No need to check result of xcalloc.
13652 * server.c (handle_search_memory): Back out calls to xmalloc,
13653 result is checked and error is returned to user upon failure.
13654 (handle_query): Ditto. Add more checks for result of malloc.
13655 (handle_v_cont): Check result of malloc, report error back to
13657 (handle_v_run): Ditto. Call freeargv.
13658 * server.h (freeargv): Declare.
13659 * utils.c (freeargv): New fn.
13661 2009-01-15 Doug Evans <dje@google.com>
13663 * gdbreplay.c (perror_with_name): Make arg const char *.
13664 * server.h (target_signal_to_name): Make return type const char *.
13665 * thread-db.c (thread_db_err_str): Make return type const char *.
13666 * utils.c (perror_with_name): Make arg const char *.
13668 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13670 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13671 when handling a EXIT_PROCESS_DEBUG_EVENT.
13673 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13675 * gdbreplay.c (gdbreplay_version): Update copyright year.
13676 * server.c (gdbserver_version): Likewise.
13678 2009-01-05 Doug Evans <dje@google.com>
13680 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13681 (handle_extended_wait): Improve comment.
13683 2008-12-13 Doug Evans <dje@google.com>
13685 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13686 * server.h (ATTR_MALLOC): New macro.
13687 (xmalloc,xcalloc,xstrdup): Declare.
13688 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13689 * inferiors.c: Ditto.
13690 * linux-low.c: Ditto.
13691 * mem-break.c: Ditto.
13692 * regcache.c: Ditto.
13693 * remote-utils.c: Ditto.
13696 * win32-low.c: Ditto.
13698 2008-12-12 Doug Evans <dje@google.com>
13700 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13701 in debugging printf.
13703 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13705 2008-12-09 Doug Evans <dje@google.com>
13707 * linux-low.h (struct process_info): Delete member tid, unused.
13708 * thread-db.c (find_one_thread): Update.
13709 (maybe_attach_thread): Update.
13711 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13713 * target.h (struct target_ops): Add qxfer_osdata member.
13714 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13716 (linux_qxfer_osdata): New functions.
13717 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13719 * server.c (handle_query): Handle "qXfer:osdata:read:".
13720 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13721 (buffer_xml_printf): New functions.
13722 * server.h (struct buffer): New.
13723 (buffer_grow_str, buffer_grow_str0): New macros.
13724 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13725 (buffer_xml_printf): Declare.
13727 2008-11-24 Doug Evans <dje@google.com>
13729 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13731 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13733 * server.c (handle_v_run): Always use the supplied argument list.
13735 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13737 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13738 (xtensa_regmap_table): Add entry for scompare1.
13740 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13742 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13743 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13744 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13745 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13746 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13747 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13748 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13749 XML target descriptions.
13750 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13751 when inferior is running on an ISA 2.05 or later processor. Add
13752 special case to return offset for full 64-bit slot of FPSCR when
13755 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13757 * Makefile.in (SFILES, clean): Added sparc64 files.
13758 (reg-sparc64.o, reg-sparc64.c): New.
13759 * configure.srv (sparc*-*-linux*): New configuration.
13760 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13761 syscall arguments for SPARC.
13762 (regsets_store_inferior_registers): Likewise.
13763 * linux-sparc-low.c: New file.
13765 2008-10-21 Doug Evans <dje@google.com>
13767 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13768 (READLINE_DIR,READLINE_DEP): Delete.
13769 (INTERNAL_CFLAGS): Update.
13770 (LINTFLAGS): Update.
13772 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13774 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13775 whole argv from the last run, not just argv[0].
13777 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13779 * regcache.c (new_register_cache): Return NULL if the register
13780 cache size isn't known yet.
13781 (free_register_cache): Avoid dereferencing a NULL regcache.
13783 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13785 * configure.srv: Merge MIPS and MIPS64.
13787 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13789 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13791 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13793 * Makefile.in: Add required vsx dependencies.
13795 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13796 Declare init_registers_powerpc_vsx32l.
13797 Declare init_registers_powerpc_vsx64l.
13798 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13799 (ppc_arch_setup): Check for VSX in hwcap.
13800 (ppc_fill_vsxregset): New function.
13801 (ppc_store_vsxregset): New function.
13802 Add new VSX entry in regset_info target_regsets.
13804 * configure.srv: Add new VSX dependencies.
13806 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13808 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13809 (remote_open): Set or clear transport_is_reliable.
13810 (putpkt_binary): Don't expect acks in noack mode.
13811 (getpkt): Don't send ack/nac in noack mode.
13812 * server.c (handle_general_set): Handle QStartNoAckMode.
13813 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13815 (main): Reset noack_mode on every connection.
13816 * server.h (noack_mode): Declare.
13818 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13820 * Makefile.in (GDBREPLAY_OBS): New variable.
13821 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13823 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13824 Daniel Jacobowitz <dan@codesourcery.com>
13826 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13827 (usr_store_inferior_registers): Likewise.
13828 (regsets_store_inferior_registers): Likewise.
13830 2008-07-31 Rolf Jansen <rj@surtec.com>
13831 Pedro Alves <pedro@codesourcery.com>
13833 * configure.ac: Check for memmem declaration.
13834 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13835 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13836 (disable_packet_qfThreadInfo): Unconditionally compile.
13837 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13838 * configure, config.in: Regenerate.
13840 2008-07-28 Doug Kwan <dougkwan@google.com>
13842 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13843 (linux_write_memory): Remove declaration of errno.
13845 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13847 * linux-low.c (handle_extended_wait): Do not use "status"
13848 variable uninitialized.
13850 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13852 * server.c (handle_v_attach): Inhibit reporting dll changes.
13854 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13856 * remote-utils.c (prepare_resume_reply): If requested, don't
13857 output "thread:TID" in the T stop reply.
13859 * server.c (disable_packet_vCont, disable_packet_Tthread)
13860 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13861 (handle_query): If requested, disable support for qC, qfThreadInfo
13863 (handle_v_requests): If requested, disable support for vCont.
13864 (gdbserver_show_disableable): New.
13865 (main): Handle --disable-packet and --disable-packet=LIST.
13867 * server.h (disable_packet_vCont, disable_packet_Tthread)
13868 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13870 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13872 * server.c (gdbserver_usage): Mention --version.
13874 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13876 * Makefile.in (gdbreplay.o): New rule.
13878 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13880 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13881 message, not gdbserver.
13883 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13884 Nathan Sidwell <nathan@codesourcery.com>
13885 Joseph Myers <joseph@codesourcery.com>
13887 * acinclude.m4: Include ../../config/acx.m4.
13888 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13889 * configure, config.in: Regenerate.
13890 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13891 * server.c (gdbserver_version): Print PKGVERSION.
13892 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13893 (main): Adjust gdbserver_usage calls.
13894 * gdbreplay.c (version, host_name): Add declarations.
13895 (gdbreplay_version, gdbreplay_usage): New.
13896 (main): Accept --version and --help options.
13898 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13900 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13901 (arm_breakpoint_at): Handle Thumb.
13902 (the_low_target): Add comment.
13904 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13906 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13908 2008-05-09 Doug Evans <dje@google.com>
13910 * server.h (decode_search_memory_packet): Declare.
13911 * remote-utils.c (decode_search_memory_packet): New fn.
13912 * server.c (handle_search_memory_1): New fn.
13913 (handle_search_memory): New fn.
13914 (handle_query): Process qSearch:memory packets.
13916 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13918 * regcache.c (registers_length): Remove.
13919 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13920 full register packet.
13921 * regcache.h (registers_length): Remove prototype.
13922 * server.h (PBUFSIZ): Define to 16384.
13924 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13926 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13927 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13928 powerpc-64l.o, and powerpc-altivec64l.o.
13929 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13930 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13931 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13932 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13933 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13936 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13937 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13938 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13939 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13940 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13941 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13942 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13943 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13944 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13945 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13948 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13949 (init_registers_powerpc_32l): ... this new prototype.
13950 (init_registers_powerpc_32): Remove, replace by ...
13951 (init_registers_powerpc_altivec32l): ... this new prototype.
13952 (init_registers_powerpc_e500): Remove, replace by ...
13953 (init_registers_powerpc_e500l): ... this new prototype.
13954 (init_registers_ppc64): Remove, replace by ...
13955 (init_registers_powerpc_64l): ... this new prototype.
13956 (init_registers_powerpc_64): Remove, replace by ...
13957 (init_registers_powerpc_altivec64l): ... this new prototype.
13958 (ppc_num_regs): Set to 73.
13959 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13960 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13961 (ppc_cannot_store_register): Handle orig_r3 and trap.
13962 (ppc_arch_setup): Update init_registers_... calls.
13963 (ppc_fill_gregset): Handle orig_r3 and trap.
13965 * inferiors.c (clear_inferiors): Reset current_inferior.
13967 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13969 * acinclude.m4: Add override.m4.
13970 * configure: Regenerate.
13972 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13974 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13975 initial call to init_register_ppc64.
13977 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13979 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13980 single powerpc*-*-linux* case.
13981 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13983 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13985 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13986 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13988 * linux-ppc-low.c: Include <elf.h>.
13989 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13990 (ppc_hwcap): New global variable.
13991 (ppc_regmap): Remove __SPE__ #ifdef sections.
13992 (ppc_regmap_e500): New global variable.
13993 (ppc_cannot_store_register): Update __SPE__ special case.
13994 (ppc_get_hwcap): New function.
13995 (ppc_arch_setup): Use it to determine whether inferior supports
13996 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13997 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13998 Do not access registers if target does not support AltiVec.
13999 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14000 Do not access registers if target does not support SPE.
14001 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14003 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14005 * linux-low.c (disabled_regsets, num_regsets): New.
14006 (use_regsets_p): Delete.
14007 (linux_wait_for_process): Clear disabled_regsets.
14008 (regsets_fetch_inferior_registers): Check and set it.
14009 (regsets_store_inferior_registers): Likewise.
14010 (linux_fetch_registers, linux_store_registers): Do not use
14012 (initialize_low): Allocate disabled_regsets.
14014 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14016 * Makefile.in (LIBOBJS): New.
14017 (OBS): Use LIBOBJS.
14018 (memmem.o): New rule.
14019 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14020 * configure: Regenerated.
14022 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14024 * server.c (handle_query): Never return "unsupported" for
14025 qXfer:features:read queries.
14027 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14029 * server.c (get_features_xml): Fix inverted condition.
14030 (handle_query): Always support qXfer:feature:read.
14032 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14034 * server.c (wrapper_argv): New.
14035 (start_inferior): Handle wrapper_argv. If set, expect an extra
14037 (gdbserver_usage): Document --wrapper.
14038 (main): Parse --wrapper.
14040 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14042 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14043 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14044 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14045 (ppc_set_pc): Likewise.
14046 (ppc_arch_setup): New function.
14047 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14048 of collect_register.
14049 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14051 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14053 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14054 instead of linux-ppc64-low.o.
14055 * linux-ppc64-low.c: Remove file.
14056 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14057 (linux-ppc64-low.o): Remove rule.
14059 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14060 (init_registers_powerpc_64): Likewise.
14061 (ppc_regmap): Conditionally define depending on __powerpc64__.
14062 (ppc_cannot_store_register): Do not special-case "fpscr" when
14063 compiled on __powerpc64__.
14064 (ppc_collect_ptrace_register): New function.
14065 (ppc_supply_ptrace_register): New function.
14066 (ppc_breakpoint): Change type to "unsigned int".
14067 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14068 (the_low_target): Conditionally provide initializers for the
14069 arch_setup member depending on __powerpc64__. Install
14070 collect_ptrace_register and supply_ptrace_register members.
14072 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14074 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14075 * server.c (gdbserver_xmltarget): Define.
14076 (get_features_xml): Use it to replace "target.xml" and arch_string.
14078 * configure.srv: Remove srv_xmltarget. Add XML files that were
14079 mentioned there to srv_xmlfiles instead. Remove conditional tests
14080 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14081 srv_xmlfiles and srv_regobj to include all possible choices.
14082 * configure.ac (srv_xmltarget): Remove.
14083 (srv_xmlfiles): Do not add "target.xml".
14084 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14085 checks for supplementary target information.
14086 * configure: Regenerate.
14087 * Makefile.in (XML_TARGET): Remove.
14088 (target.xml): Remove rule.
14089 (clean): Do not clean up target.xml.
14090 (.PRECIOUS): Do not mention target.xml.
14092 * target.h (struct target_ops): Remove arch_string member.
14093 * linux-low.c (linux_arch_string): Remove.
14094 (linux_target_ops): Remove arch_string initializer.
14095 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14096 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14097 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14098 * spu-low.c (spu_arch_string): Remove.
14099 (spu_target_ops): Remove arch_string initializer.
14100 * win32-low.c (win32_arch_string): Remove.
14101 (win32_target_ops): Remove arch_string initializer.
14102 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14103 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14104 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14106 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14108 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14109 by collect_ptrace_register and supply_ptrace_register hooks.
14110 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14111 instead of checking for the_low_target.left_pad_xfer.
14112 (usr_store_inferior_registers): Use collect_ptrace_register callback
14113 instead of checking for the_low_target.left_pad_xfer.
14115 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14116 (s390_supply_ptrace_register): Likewise.
14117 (s390_fill_gregset): Call s390_collect_ptrace_register.
14118 (the_low_target): Update.
14120 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14121 (ppc_supply_ptrace_register): Likewise.
14122 (the_low_target): Update.
14124 * linux-i386-low.c (the_low_target): Update.
14125 * linux-x86-64-low.c (the_low_target): Update.
14127 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14129 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14130 reg-s390.o and reg-s390x.o.
14132 * linux-low.c (new_inferior): New global variable.
14133 (linux_create_inferior, linux_attach): Set it.
14134 (linux_wait_for_process): Call the_low_target.arch_setup after the
14135 target has stopped for the first time.
14136 (initialize_low): Do not call the_low_target.arch_setup.
14138 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14139 (s390_set_pc): Likewise.
14140 (s390_arch_setup): New function.
14141 (the_low_target): Use s390_arch_setup as arch_setup routine.
14143 * regcache.c (realloc_register_cache): New function.
14144 (set_register_cache): Call it for each existing regcache.
14146 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14148 * server.h (init_registers): Remove prototype.
14150 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14151 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14152 instead of init_registers ().
14153 * linux-arm-low.c (init_registers_arm): Add prototype.
14154 (init_registers_arm_with_iwmmxt): Likewise.
14155 (the_low_target): Add initializer for arch_setup field.
14156 * linux-cris-low.c (init_registers_cris): Add prototype.
14157 (the_low_target): Add initializer for arch_setup field.
14158 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14159 (the_low_target): Add initializer for arch_setup field.
14160 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14161 (the_low_target): Add initializer for arch_setup field.
14162 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14163 (the_low_target): Add initializer for arch_setup field.
14164 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14165 (the_low_target): Add initializer for arch_setup field.
14166 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14167 (the_low_target): Add initializer for arch_setup field.
14168 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14169 (init_registers_mips64_linux): Likewise.
14170 (the_low_target): Add initializer for arch_setup field.
14171 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14172 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14173 (the_low_target): Add initializer for arch_setup field.
14174 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14175 (init_registers_powerpc_64): Likewise.
14176 (the_low_target): Add initializer for arch_setup field.
14177 * linux-s390-low.c (init_registers_s390): Add prototype.
14178 (init_registers_s390x): Likewise.
14179 (the_low_target): Add initializer for arch_setup field.
14180 * linux-sh-low.c (init_registers_sh): Add prototype.
14181 (the_low_target): Add initializer for arch_setup field.
14182 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14183 (the_low_target): Add initializer for arch_setup field.
14184 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14185 (the_low_target): Add initializer for arch_setup field.
14187 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14188 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14189 instead of init_registers ().
14190 * win32-arm-low.c (init_registers_arm): Add prototype.
14191 (the_low_target): Add initializer for arch_setup field.
14192 * win32-i386-low.c (init_registers_i386): Add prototype.
14193 (the_low_target): Add initializer for arch_setup field.
14195 * spu-low.c (init_registers_spu): Add prototype.
14196 (initialize_low): Call initialie_registers_spu () instead of
14197 initialize_registers ().
14199 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14201 * server.c (handle_v_requests): When handling the vRun and vAttach
14202 packets, if already debugging a process, don't kill it. Return an
14205 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14207 * server.c (handle_query): Correct length check.
14209 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14211 * win32-low.c (do_initial_child_stuff): Add process handle
14212 parameter. Set current_process_handle and current_process_id from the
14213 parameters. Clear globals.
14214 (win32_create_inferior): Don't set current_process_handle and
14215 current_process_id here. Instead pass them on the call to
14216 do_initial_child_stuff.
14217 (win32_attach): Likewise.
14218 (win32_clear_inferiors): New.
14219 (win32_kill): Don't close the current process handle or the
14220 current thread handle here. Instead call win32_clear_inferiors.
14221 (win32_detach): Don't open a new handle to the process. Call
14222 win32_clear_inferiors.
14223 (win32_join): Don't rely on current_process_handle; open a new
14224 handle using the process id.
14225 (win32_wait): Call win32_clear_inferiors when the inferior process
14228 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14230 * server.c (monitor_show_help): Add "exit".
14232 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14234 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14235 (clean): Add reg-xtensa.c.
14236 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14237 * configure.srv (xtensa*-*-linux*) New target.
14238 * linux-xtensa-low.c: New.
14239 * xtensa-xtregs.c: New.
14241 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14243 * hostio.c: Don't include errno.h.
14244 (errno_to_fileio_errno): Move to hostio-errno.
14245 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14246 error number outputting to the target->hostio_last_error callback.
14247 (hostio_packet_error): Use FILEIO_EINVAL directly.
14248 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14249 calls to hostio_error.
14250 * hostio-errno.c: New.
14251 * server.h (hostio_last_error_from_errno): Declare.
14252 * target.h (target_ops): Add hostio_last_error member.
14253 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14254 as hostio_last_error handler.
14255 * spu-low.c (spu_target_ops): Likewise.
14256 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14257 (wince_hostio_last_error): New functions.
14258 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14259 as hostio_last_error handler.
14260 (win32_target_ops) [!_WIN32_WCE]: Register
14261 hostio_last_error_from_errno as hostio_last_error handler.
14262 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14263 (hostio-errno.o): New rule.
14264 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14265 * configure.srv (srv_hostio_err_objs): New variable. Default to
14267 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14268 * configure: Regenerate.
14270 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14272 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14273 (linux_kill, linux_detach): Clean up the process list.
14274 * remote-utils.c (remote_open): Improve port number parsing.
14275 (putpkt_binary, input_interrupt): Only send interrupts if the target
14277 * server.c (extended_protocol): Make static.
14278 (attached): Define earlier.
14279 (exit_requested, response_needed, program_argv): New variables.
14280 (target_running): New.
14281 (start_inferior): Clear attached here.
14282 (attach_inferior): Set attached here.
14283 (require_running): Define.
14284 (handle_query): Use require_running and target_running. Implement
14286 (handle_v_attach, handle_v_run): New.
14287 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14288 (gdbserver_usage): Update.
14289 (main): Redo argument parsing. Handle --debug and --multi. Handle
14290 --attach along with other options or after the port. Save
14291 program_argv. Support no initial program. Resynchronize
14292 communication with GDB after an error. Handle "monitor exit".
14293 Use require_running and target_running. Always allow the extended
14294 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14295 restart in extended mode.
14296 * README: Refer to the GDB manual. Update --attach usage.
14298 2007-12-20 Andreas Schwab <schwab@suse.de>
14300 * linux-low.c (STACK_SIZE): Define.
14301 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14302 (linux_test_for_tracefork): Likewise.
14304 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14306 * linux-low.c (linux_wait_for_event): Update messages. Do not
14307 reinsert auto-delete breakpoints.
14308 * mem-break.c (struct breakpoint): Change return type of handler to
14310 (set_breakpoint_at): Update handler type.
14311 (reinsert_breakpoint_handler): Return 1 instead of calling
14313 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14315 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14316 * mem-break.h (set_breakpoint_at): Update handler type.
14317 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14318 * win32-low.c (auto_delete_breakpoint): New.
14319 (get_child_debug_event): Use it.
14321 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14323 * configure.ac: Check for pread and pwrite.
14324 * hostio.c (handle_pread): Fall back to lseek and read.
14325 (handle_pwrite): Fall back to lseek and write.
14326 * config.in, configure: Regenerated.
14328 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14330 * server.c (myresume): Add own_buf argument.
14331 (main): Update calls.
14333 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14335 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14336 * remote-utils.c (remote_open): Do not call disable_async_io.
14337 (block_async_io): Delete.
14338 (unblock_async_io): Make static.
14339 (initialize_async_io): New.
14340 * server.c (handle_v_cont): Handle async I/O here.
14341 (myresume): Likewise. Move other common resume tasks here...
14342 (main): ... from here. Call initialize_async_io. Disable async
14343 I/O before the main loop.
14344 * server.h (initialize_async_io): Declare.
14345 (block_async_io, unblock_async_io): Delete prototypes.
14346 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14348 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14350 * remote-utils.c (readchar): Allow binary data in received messages.
14352 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14354 * win32-low.c (attaching): New global.
14355 (win32_create_inferior): Clear the `attaching' global.
14356 (win32_attach): Set the `attaching' global.
14357 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14358 attaching. Only set a breakpoint at the entry point if not
14361 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14363 * server.c (main): Don't report dll events on the initial
14364 connection on attaches.
14366 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14368 * server.c (main): Relax numerical bases supported for the pid of
14369 the --attach command line argument.
14371 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14373 * win32-low.c (win32_attach): Call OpenProcess before
14374 DebugActiveProcess, not after. Add last error output to error
14377 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14379 * win32-low.c (win32_get_thread_context)
14380 (win32_set_thread_context): New functions.
14381 (thread_rec): Use win32_get_thread_context.
14382 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14383 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14386 2007-12-03 Leo Zayas
14387 Pedro Alves <pedro_alves@portugalmail.pt>
14389 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14391 (child_add_thread): Minor cleanup.
14392 (child_continue): Resume artificially suspended threads before
14393 calling ContinueDebugEvent.
14394 (suspend_one_thread): New.
14395 (fake_breakpoint_event): New.
14396 (get_child_debug_event): Change return type to int. Check here if
14397 gdb sent an interrupt request. If a soft interrupt was requested,
14398 fake a breakpoint event. Return 0 if there is no event to handle,
14400 (win32_wait): Don't check here if gdb sent an interrupt request.
14401 Ensure there is a valid event to handle.
14402 (win32_request_interrupt): Add soft interruption method as last
14405 2007-12-03 Leo Zayas
14406 Pedro Alves <pedro_alves@portugalmail.pt>
14408 * win32-low.h (win32_thread_info): Add descriptions to the
14409 structure members. Replace `suspend_count' counter by a
14411 * win32-low.c (thread_rec): Update condition of when to get the
14412 context from the inferior. Rely on ContextFlags being set if it
14413 has already been retrieved. Only suspend the inferior thread if
14414 we haven't already. Warn if that fails.
14415 (continue_one_thread): s/suspend_count/suspended/. Only call
14416 ResumeThread once. Warn if that fails.
14418 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14420 * win32-low.c (win32_wait): Don't read from the inferior when it
14421 has already exited.
14423 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14425 * Makefile.in (win32_low_h): New variable.
14426 (win32-low.o): Add dependency on $(win32_low_h).
14427 (win32-arm-low.o, win32-i386-low.o): New rules.
14429 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14431 * hostio.c: Correct copyright year.
14433 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14435 * Makefile.in (OBS): Add hostio.o.
14436 (hostio.o): New rule.
14437 * server.h (handle_vFile): Declare.
14438 * hostio.c: New file.
14439 * server.c (handle_v_requests): Take packet_len and new_packet_len
14440 for binary packets. Call handle_vFile.
14441 (main): Update call to handle_v_requests.
14443 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14445 * linux-low.c: Include <sched.h>.
14447 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14449 * linux-low.c (linux_tracefork_grandchild): New.
14450 (linux_tracefork_child): Use clone.
14451 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14453 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14455 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14457 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14459 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14461 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14463 * inferiors.c (change_inferior_id): Delete.
14464 (add_pid_to_list, pull_pid_from_list): New.
14465 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14466 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14467 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14468 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14469 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14470 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14471 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14472 (using_threads): Always set to 1.
14473 (handle_extended_wait): New.
14474 (add_process): Do not set TID.
14475 (linux_create_inferior): Set must_set_ptrace_flags.
14476 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14477 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14478 (linux_thread_alive): Rename TID argument to LWPID.
14479 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14480 (linux_wait_for_event): Do not use TID or check using_threads. Update
14481 call to dead_thread_notify. Call handle_extended_wait.
14482 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14483 (send_sigstop): Delete sigstop_sent.
14484 (wait_for_sigstop): Avoid TID.
14485 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14486 (linux_test_for_tracefork): New.
14487 (linux_lookup_signals): Use thread_db_active and
14488 linux_supports_tracefork_flag.
14489 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14490 * linux-low.h (get_process_thread): Avoid TID.
14491 (struct process_ifo): Move thread_known and tid to the end. Remove
14493 (linux_attach_lwp, thread_db_init): Update prototypes.
14494 * server.h (change_inferior_id): Delete prototype.
14495 (add_pid_to_list, pull_pid_from_list): New prototypes.
14496 * thread-db.c (thread_db_use_events): New.
14497 (find_first_thread): Rename to...
14498 (find_one_thread): ...this. Update callers and messages. Do not
14499 call fatal. Check thread_db_use_events. Do not call
14500 change_inferior_id or new_thread_notify.
14501 (maybe_attach_thread): Update. Do not call new_thread_notify.
14502 (thread_db_init): Set thread_db_use_events. Check use_events.
14503 * utils.c (fatal, warning): Correct message prefix.
14505 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14507 * Makefile.in (clean): Remove new files.
14508 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14509 (powerpc-64.o, powerpc-64.c): New rules.
14510 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14511 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14513 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14515 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14516 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14517 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14518 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14519 (target_regsets): Add AltiVec and SPE register sets.
14520 * configure.ac: Check for AltiVec and SPE.
14521 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14522 (ppc_fill_vrregset, ppc_store_vrregset): New.
14523 (target_regsets): Add AltiVec register set.
14524 * configure: Regenerated.
14526 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14528 * linux-low.c (O_LARGEFILE): Define.
14529 (linux_read_memory): Use /proc/PID/mem.
14530 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14531 * configure, config.in: Regenerated.
14533 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14535 * linux-low.c (linux_wait_for_event): Do not pass signals while
14538 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14540 * win32-low.c (create_process): New.
14541 (win32_create_inferior): Use create_process instead of
14542 CreateProcess. If create_process failed retry appending an ".exe"
14543 suffix. Store the GetLastError result immediatelly after
14544 create_process calls and use it on the call to error.
14546 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14548 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14550 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14552 * configure.ac: Switch license to GPLv3.
14554 2007-08-01 Michael Snyder <msnyder@access-company.com>
14556 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14558 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14560 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14562 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14563 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14564 CloseToolhelp32Snapshot.
14565 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14566 CloseToolhelp32Snapshot.
14568 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14570 * server.c (main): Check for inferior exit before main loop.
14572 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14574 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14575 instead of on tmp_desc.
14577 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14578 Daniel Jacobowitz <dan@codesourcery.com>
14580 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14581 (add_thread): Minor cleanups.
14582 (clear_inferiors): Move lower in the file. Clear the DLL
14584 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14585 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14586 (xml_escape_text): New.
14587 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14589 (handle_v_cont): Report errors.
14590 (gdbserver_version): Update.
14591 (main): Correct size of own_buf. Do not report initial DLL events.
14592 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14593 (unloaded_dll, xml_escape_text): New.
14594 * win32-low.c (enum target_waitkind): Update comments.
14595 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14596 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14597 (win32_EnumProcessModules, win32_GetModuleInformation)
14598 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14599 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14600 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14601 (win32_Module32First, win32_Module32Next, load_toolhelp)
14602 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14603 (get_child_debug_event): Handle DLL events.
14604 (win32_wait): Likewise.
14606 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14608 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14609 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14611 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14613 * win32-low.c (handle_output_debug_string): Ignore event if not
14616 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14618 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14620 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14622 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14624 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14626 * inferiors.c (change_inferior_id): Add comment.
14627 * linux-low.c (check_removed_breakpoint): Add an early
14628 prototype. Improve debug output.
14629 (linux_attach): Doc update.
14630 (linux_detach_one_process, linux_detach): Clean up before releasing
14632 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14633 * linux-low.h (struct process_info): Doc improvement.
14634 * mem-break.c (delete_all_breakpoints): New.
14635 * mem-break.h (delete_all_breakpoints): New prototype.
14636 * thread-db.c (find_first_thread): New.
14637 (thread_db_create_event): Call it instead of
14638 thread_db_find_new_threads. Clean up unused variables.
14639 (maybe_attach_thread): Remove first thread handling.
14640 (thread_db_find_new_threads): Use find_first_thread.
14641 (thread_db_get_tls_address): Likewise.
14643 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14645 * thread-db.c (thread_db_find_new_threads): Add prototype.
14646 (thread_db_create_event): Check for the main thread before adding
14648 (maybe_attach_thread): Only enable event reporting if TID == 0.
14649 (thread_db_get_tls_address): Check for new threads.
14651 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14653 * linux-low.c (linux_create_inferior): Try execv before execvp.
14654 * spu-low.c (spu_create_inferior): Likewise.
14656 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14658 * linux-low.c (linux_create_inferior): Change execv to execvp.
14659 * spu-low.c (spu_create_inferior): Likewies.
14661 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14663 * Makefile.in (clean): Clean new files instead of deleted ones.
14664 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14665 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14667 * configure.srv: Specify XML files and new regformats for MIPS and
14669 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14670 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14671 an entry for the restart register.
14672 (mips_cannot_fetch_register, mips_cannot_store_register)
14673 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14674 register names to match the XML descriptions.
14675 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14676 restart register instead of $0.
14678 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14679 Markus Deuling <deuling@de.ibm.com>
14681 * remote-utils.c (decode_xfer_write): New function.
14682 * server.h (decode_xfer_write): Add prototype.
14683 * server.c (handle_query): Add PACKET_LEN argument. Support
14684 qXfer:spu:read and qXfer:spu:write packets.
14685 (main): Pass packet_len to handle_query.
14686 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14687 * target.h (target_ops): Add qxfer_spu.
14689 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14691 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14692 accessing non-seekable spufs files.
14694 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14696 * server.c (handle_query): Add reply for qC packet.
14698 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14699 Leo Zayas <lerele@champenstudios@com>
14701 * server.h (check_remote_input_interrupt_request): New function.
14702 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14703 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14704 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14705 (check_remote_input_interrupt_request): New function.
14706 * server.h (check_remote_input_interrupt_request): Declare.
14707 * win32-low.c (winapi_DebugBreakProcess,
14708 winapi_GenerateConsoleCtrlEvent): New typedefs.
14709 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14711 (win32_wait): Check for remote interrupt request
14712 with check_remote_input_interrupt_request.
14713 (win32_request_interrupt): New function.
14714 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14716 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14718 * win32-low.c (debug_registers_changed,
14719 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14720 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14721 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14722 (thread_rec): Get context using the low target.
14723 (child_add_thread): Call thread_added on the low target,
14724 which does the same thing.
14726 (do_initial_child_stuff): Remove debug registers references.
14727 Set context using the low target. Resume threads after
14728 setting the contexts.
14729 (child_continue): Remove dead variable. Remove debug
14730 registers references.
14731 (child_fetch_inferior_registers): Go through the low target.
14732 (do_child_store_inferior_registers): Remove.
14733 (child_store_inferior_registers): Go through the low target.
14734 (win32_resume): Remove debug registers references.
14735 Set context using the low target.
14736 (handle_exception): Change return type to void. Don't record
14737 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14738 first chance exception.
14739 (get_child_debug_event): Change return type to void. Remove
14740 goto loop. Always return after waiting for debug event.
14741 (win32_wait): Convert to switch statement. Handle spurious
14744 * win32-i386-low.c (debug_registers_changed,
14745 debug_registers_used): New.
14746 (initial_stuff): Rename to ...
14747 (i386_initial_stuff): ... this. Clear debug registers
14749 (store_debug_registers): Delete.
14750 (i386_get_thread_context): New.
14751 (load_debug_registers): Delete.
14752 (i386_set_thread_context): New.
14753 (i386_thread_added): New.
14754 (single_step): Rename to ...
14755 (i386_single_step): ... this.
14756 (do_fetch_inferior_registers): Rename to ...
14757 (i386_fetch_inferior_register): ... this.
14758 (i386_store_inferior_register): New.
14759 (the_low_target): Adapt to new interface.
14761 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14762 (arm_get_thread_context): New.
14763 (arm_set_thread_context): New.
14765 (do_fetch_inferior_registers): Rename to ...
14766 (arm_fetch_inferior_register): ... this.
14767 (arm_store_inferior_register): New.
14768 (arm_wince_breakpoint): Reimplement as unsigned long.
14769 (arm_wince_breakpoint_len): Define.
14770 (the_low_target): Adapt to new interface.
14772 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14773 load_debug_registers. Add get_thread_context, set_thread_context,
14774 thread_added and store_inferior_register. Rename
14775 fetch_inferior_registers to fetch_inferior_register.
14776 (regptr): Remove declaration.
14778 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14780 * linux-low.c (linux_detach): Change return type to int. Return 0.
14781 * spu-low.c (spu_detach): Likewise.
14783 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14785 * target.h (target_ops): Change return type of detach to int.
14787 (join_inferior): New.
14788 * server.c (main): Don't skip detach support on mingw32.
14789 If the inferior doesn't support detaching return error.
14790 Call join_inferior instead of using waitpid.
14791 * linux-low.c (linux_join): New.
14792 (linux_target_op): Add linux_join.
14793 * spu-low.c (spu_join): New.
14794 (spu_target_ops): Add spu_join.
14795 * win32-low.c (win32_detach): Adapt to new interface.
14796 Reopen current_process_handle before detaching. Issue a child
14797 resume before detaching.
14799 (win32_target_op): Add win32_join.
14801 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14803 * win32-low.c (win32-attach): Fix return value.
14804 * target.h (target_ops): Describe ATTACH return values.
14806 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14808 * win32-low.c (GETPROCADDRESS): Define.
14809 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14810 (winapi_DebugSetProcessKillOnExit): Likewise.
14811 (win32_create_inferior): Force usage of ansi CreateProcessA.
14812 (win32_attach): Use GETPROCADDRESS.
14813 (win32_detach): Likewise.
14815 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14817 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14819 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14821 * win32-low.c: Commit leftover changes from 2007-03-29.
14823 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14825 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14826 fields short instead of int. Add explicit padding.
14827 (i387_cache_to_fsave): Remove unnecessary casts.
14828 (i387_fsave_to_cache): Doc fix.
14829 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14831 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14833 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14834 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14836 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14838 * configure.srv (arm*-*-mingw32ce*): Move near the other
14841 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14843 * configure.ac: Add errno checking.
14844 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14845 sys/file.h and malloc.h.
14846 (AC_CHECK_DECLS): Add perror.
14847 (srv_mingwce): Handle.
14848 * configure.srv (i[34567]86-*-cygwin*): Add
14849 win32-i386-low.o to srv_tgtobj.
14850 (i[34567]86-*-mingw*): Likewise.
14851 (arm*-*-mingw32ce*): Add case.
14852 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14853 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14854 [__MINGW32CE__] (strerror): New function.
14855 [__MINGW32CE__] (errno): Define to GetLastError.
14856 [__MINGW32CE__] (COUNTOF): New macro.
14857 (remote_open): Remove extra close call.
14858 * mem-break.c (delete_breakpoint_at): New function.
14859 * mem-break.h (delete_breakpoint_at): Declare.
14860 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14861 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14862 [USE_WIN32API] (read, write): Add char* casts.
14863 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14864 * server.h: Include wincecompat.h on Windows CE.
14865 [HAVE_ERRNO_H]: Check.
14866 (perror): Declare if not declared.
14867 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14868 (perror_with_name): Remove errno declaration.
14869 * wincecompat.h: New.
14870 * wincecompat.c: New.
14871 * win32-low.h: New.
14872 * win32-arm-low.c: New.
14873 * win32-i386-low.c: New.
14874 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14875 (OUTMSG2): Make it safe.
14877 (COUNTOF): New macro.
14878 (NUM_REGS): Get it from the low target.
14879 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14880 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14881 (thread_rec): Let low target handle debug registers.
14882 (child_add_thread): Likewise.
14883 (child_init_thread_list): Likewise.
14884 (continue_one_thread): Likewise.
14886 (do_child_fetch_inferior_registers): Move to ...
14887 * win32-i386-low.c: ... here, and rename to ...
14888 (do_fetch_inferior_registers): ... this.
14889 * win32-low.c (child_fetch_inferior_registers):
14890 Go through the low target.
14891 (do_child_store_inferior_registers): Use regptr.
14892 (strwinerror): New function.
14893 (win32_create_inferior): Handle Windows CE.
14894 Use strwinerror instead of strerror on Windows error
14895 codes. Add program to the error output.
14896 Don't close the main thread handle on Windows CE.
14897 (win32_attach): Use coredll.dll on Windows CE.
14898 (win32_kill): Close current process and current
14900 (win32_detach): Use coredll.dll on Windows CE.
14901 (win32_resume): Let low target handle debug registers, and
14903 (handle_exception): Add/Remove initial breakpoint. Avoid
14904 non-existant WSTOPSIG on Windows CE.
14905 (win32_read_inferior_memory): Cast to remove warning.
14906 (win32_arch_string): Go through the low target.
14907 (initialize_low): Call set_breakpoint_data with the low
14908 target's breakpoint.
14909 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14910 FOP_REGNUM, mappings): Move to ...
14911 * win32-i386-low.c: ... here.
14912 * win32-low.c (win32_thread_info): Move to ...
14913 * win32-low.h: ... here.
14914 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14915 win32-arm-low.c and wincecompat.c.
14916 (all:): Add $EXEEXT.
14917 (install-only:): Likewise.
14918 (gdbserver:): Likewise.
14919 (gdbreplay:): Likewise.
14920 * config.in: Regenerate.
14921 * configure: Regenerate.
14923 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14925 * win32-low.c: Rename typedef thread_info to
14926 win32_thread_info throughout.
14928 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14930 * win32-i386-low.c: Rename to ...
14931 * win32-low.c: ... this.
14932 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14933 * Makefile.in: Likewise.
14935 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14937 * remote-utils.c (monitor_output): Constify msg parameter.
14938 * server.h (monitor_output): Likewise.
14939 * win32-i386-low.c (handle_output_debug_string): New.
14940 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14941 handle_output_debug_string.
14942 (get_child_debug_event): Likewise.
14944 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14946 * server.c (main): Correct strtoul check.
14948 2007-03-27 Jon Ringle <jon@ringle.org>
14950 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14952 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14954 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14956 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14958 * terminal.h: Check HAVE_SGTTY_H.
14960 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14962 * remote-utils.c (remote_open): Print out the assigned port number.
14964 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14966 * remote-utils.c (monitor_output): New function.
14967 * server.c (debug_threads): Define here.
14968 (monitor_show_help): New function.
14969 (handle_query): Handle qRcmd.
14970 (main): Do not handle 'd' packet.
14971 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14972 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14975 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14977 * Makefile.in (EXEEXT): New.
14978 (clean): Use $(EXEEXT).
14980 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14982 * target.h (target_ops): Rename send_signal to request_interrupt,
14983 and remove enum target_signal parameter.
14984 * linux-low.c (linux_request_interrupt): Rename from
14985 linux_send_signal, and always send SIGINT.
14986 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14987 and always send SIGINT.
14988 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14990 (input_interrupt): Likewise.
14992 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14994 * server.c (get_features_xml): Check if target implemented
14996 * win32-i386-low.c (win32_arch_string): New.
14997 (win32_target_ops): Add win32_arch_string as arch_string member.
14999 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15001 * spu-low.c (spu_arch_string): New.
15002 (spu_target_ops): Add spu_arch_string.
15004 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15006 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15007 * configure.ac: Do not check for terminal.h.
15008 * configure, config.in: Regenerated.
15010 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15012 * Makefile.in (OBS): Add $(XML_BUILTIN).
15013 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15015 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15016 (arm-with-iwmmxt.c): New.
15017 * config.in, configure: Regenerate.
15018 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15019 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15020 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15021 (arm*-*-linux*): Add iWMMXt and regset support.
15022 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15023 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15024 (arm_store_wmmxregset, target_regsets): New.
15025 * server.c (get_features_xml): Take annex argument. Check builtin
15027 (handle_query): Handle multiple annexes.
15029 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15031 * remote-utils.c [USE_WIN32API] (read, write): Define.
15032 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15035 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15037 * linux-i386-low.c (the_low_target): Set arch_string.
15038 * linux-x86-64-low.c (the_low_target): Likewise.
15039 * linux-low.c (linux_arch_string): New.
15040 (linux_target_ops): Add it.
15041 * linux-low.h (struct linux_target_ops): Add arch_string.
15042 * server.c (write_qxfer_response): Use const void * for DATA.
15043 (get_features_xml): New.
15044 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15045 * target.h (struct target_ops): Add arch_string method.
15047 2007-01-03 Denis Pilat <denis.pilat@st.com>
15048 Daniel Jacobowitz <dan@codesourcery.com>
15050 * linux-low.c (linux_kill): Handle being called with no threads.
15051 * win32-i386-low.c (win32_kill): Likewise.
15052 (get_child_debug_event): Clear current_process_handle.
15054 2006-12-30 Denis PILAT <denis.pilat@st.com>
15055 Daniel Jacobowitz <dan@codesourcery.com>
15057 * remote-utils.c (remote_open): Check the type of specified
15058 serial port devices before opening them.
15059 * server.c (main): Kill the inferior if an error occurs during
15060 the first remote_open.
15062 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15064 * README: Update supported targets.
15066 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15068 * Makefile.in (clean): Remove reg-mips64.c.
15069 (reg-mips64.c, reg-mips64.o): New rules.
15070 * configure.srv: Handle mips64. Include regset support for mips.
15071 * linux-mips-low.c (union mips_register): New.
15072 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15073 (mips_breakpoint, mips_breakpoint_at): Use int.
15074 (mips_collect_register, mips_supply_register)
15075 (mips_collect_register_32bit, mips_supply_register_32bit)
15076 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15077 (mips_store_fpregset, target_regsets): New.
15078 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15080 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15082 * configure.srv: Add target "spu*-*-*".
15083 * Makefile.in (clean): Remove reg-spu.c.
15084 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15085 * spu-low.c: New file.
15087 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15089 * configure.ac: Correct td_thr_tls_get_addr test.
15090 * configure: Regenerated.
15092 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15094 * linux-low.c (linux_wait_for_event): Reformat. Use the
15095 pass_signals array.
15096 * remote-utils.c (decode_address_to_semicolon): New.
15097 * server.c (pass_signals, handle_general_set): New.
15098 (handle_query): Mention QPassSignals for qSupported.
15099 (main): Call handle_general_set.
15100 * server.h (pass_signals, decode_address_to_semicolon): New.
15102 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15104 * server.c (handle_query): Correct error handling for read_auxv.
15106 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15108 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15109 and srv_linux_thread_db to yes.
15110 * linux-s390-low.c (s390_fill_gregset): New function.
15111 (target_regsets): Define data structure.
15113 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15115 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15116 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15117 * config.in, configure: Regenerated.
15118 * inferiors.c (gdb_id_to_thread): New function.
15119 (gdb_id_to_thread_id): Use it.
15120 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15121 * linux-low.h (struct process_info): Add th member.
15122 (thread_db_get_tls_address): New prototype.
15123 * remote-utils.c (decode_address): Make non-static.
15124 * server.c (handle_query): Handle qGetTLSAddr.
15125 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15126 * target.h (struct target_ops): Add get_tls_address.
15127 * thread-db.c (maybe_attach_thread): Save the thread handle.
15128 (thread_db_get_tls_address): New.
15130 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15132 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15133 (linux_resume_one_process): Take a siginfo_t *. Update all
15134 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15135 (struct pending_signals): Add a siginfo_t.
15136 (linux_wait_for_process): Always set last_status.
15137 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15138 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15139 * linux-low.h (struct process_info): Add last_status.
15141 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15143 * remote-utils.c (try_rle): New function.
15144 (putpkt_binary): Use it.
15146 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15148 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15149 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15150 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15151 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15152 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15155 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15157 * server.c (terminal_fd): New variable.
15158 (old_foreground_pgrp): Likewise.
15159 (restore_old_foreground_pgrp): New function.
15160 (start_inferior): Record the terminal file descriptor in terminal_fd
15161 and its original foreground group in old_foreground_pgrp. Register
15162 restore_old_foreground_pgrp with atexit().
15164 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15166 * server.c (handle_query): Correct qPart to qXfer.
15168 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15170 * configure.ac: Check for more headers which are missing on
15171 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15172 * configure.srv: Add Cygwin and mingw32.
15173 * remote-utils.c: Don't include headers unconditionally which
15174 are missing on mingw32. Include <winsock.h> for mingw32.
15175 (remote_open): Adjust for mingw32 support. Flush
15176 standard error after writing to it.
15177 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15178 (unblock_async_io, enable_async_io, disable_async_io)
15179 (readchar, getpkt): Update for Winsock support.
15180 (prepare_resume_reply): Expect a protocol signal number.
15181 * server.c: Disable <sys/wait.h> on mingw32.
15182 (start_inferior): Adjust for mingw32 support. Flush
15183 standard error after writing to it.
15184 (attach_inferior): Likewise. Use protocol signal
15186 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15188 * win32-i386-low.c: New file.
15189 * Makefile.in (XM_CLIBS): Set.
15190 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15191 (win32-i386-low.o): New dependency rule.
15192 * linux-low.c (linux_wait): Use target signal numbers.
15193 * target.h (struct target_ops): Doc fix.
15194 * server.h (target_signal_to_name): New prototype.
15195 * gdbreplay.c: Don't include headers unconditionally which
15196 are missing on mingw32. Include <winsock.h> for mingw32.
15197 (remote_close, remote_open): Adjust for Winsock support.
15198 * configure, config.in: Regenerated.
15200 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15202 * server.c (decode_xfer_read, write_qxfer_response): New.
15203 (handle_query): Take a packet length argument. Handle
15204 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15205 the qSupported response.
15206 (main): Update call to handle_query.
15208 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15210 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15211 (putpkt_binary): Renamed from putpkt and adjusted for binary
15213 (putpkt): New wrapper for putpkt_binary.
15214 (readchar): Don't mask off the high bit.
15215 (decode_X_packet): New function.
15216 * server.c (main): Call putpkt_binary if a handler sets the packet
15217 length. Save the length of the incoming packet. Handle 'X'.
15218 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15220 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15222 * server.c (handle_query): Handle qSupported.
15224 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15226 * remote-utils.c (all_symbols_looked_up): New variable.
15227 (look_up_one_symbol): Check it.
15228 * server.h (look_up_one_symbol): New declaration.
15229 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15231 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15233 * Makefile.in (linux-arm-low.o): Update dependencies.
15234 * linux-arm-low.c: Include "gdb_proc_service.h".
15235 (PTRACE_GET_THREAD_AREA): Define.
15236 (ps_get_thread_area): New function.
15238 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15240 * configure.srv (m68k*-*-uclinux*): New target.
15241 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15242 (linux_resume_one_process): Remove extraneous cast.
15243 (linux_read_offsets): New.
15244 (linux_target_op): Add linux_read_offsets on mmuless systems.
15245 * server.c (handle_query): Add qOffsets logic.
15246 * target.h (struct target_ops): Add read_offsets.
15248 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15250 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15251 (PTRACE_GET_THREAD_AREA): Define.
15252 (ps_get_thread_area): New function.
15253 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15254 (linux-x86-64-low.o): Update.
15256 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15258 * configure.ac: Remove checks for prfpregset_t.
15259 * gdb_proc_service.h: New file.
15260 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15261 new "gdb_proc_service.h".
15262 * proc-service.c: Likewise.
15263 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15264 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15265 * Makefile.in (gdb_proc_service_h): Updated.
15266 * configure, config.in: Regenerated.
15268 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15270 * remote-utils.c (prepare_resume_reply): Move declaration
15271 of gdb_id_from_wait to the top of the block.
15273 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15275 * linux-low.c (regsets_store_inferior_registers): Read the regset
15276 from the target before filling it.
15278 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15280 * server.c (attach_inferior): Return SIGTRAP for a successful
15283 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15285 * Makefile.in (OBS): Add version.o.
15286 (STAGESTUFF): Delete.
15287 (version.o): Add dependencies.
15288 (version.c): Replace rule.
15289 (clean): Remove version.c.
15290 * server.c (gdbserver_version): New.
15291 (gdbserver_usage): Use printf.
15292 (main): Handle --version and --help.
15293 * server.h (version, host_name): Add declarations.
15295 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15307 * linux-x86-64-low.c:
15309 * linux-s390-low.c:
15310 * linux-ppc64-low.c:
15312 * linux-mips-low.c:
15313 * linux-m68k-low.c:
15314 * linux-m32r-low.c:
15317 * linux-ia64-low.c:
15318 * linux-i386-low.c:
15319 * linux-crisv32-low.c:
15331 * gdbserver.1: Add (C) after Copyright. Update the FSF
15334 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15336 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15337 (arm_breakpoint_at): Recognize both breakpoints.
15338 (the_low_target): Use the correct breakpoint instruction.
15340 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15342 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15343 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15344 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15345 (the_low_target): Update.
15347 2005-10-25 Andreas Schwab <schwab@suse.de>
15349 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15351 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15352 (ia64_num_regs): Reduce to 462.
15354 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15356 * acinclude.m4: Correct quoting.
15357 * aclocal.m4: Regenerated.
15359 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15360 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15361 (thread_db_init): Call thread_db_err_str.
15362 * configure.ac: Check for TD_VERSION.
15363 * config.in, configure: Regenerated.
15365 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15367 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15369 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15371 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15372 is not available. Define HAVE_PTRACE_GETREGS if it is.
15373 * config.in, configure: Regenerated.
15374 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15375 * linux-i386-low.c, linux-m68k-low.c: Update to use
15376 HAVE_PTRACE_GETREGS.
15377 * linux-low.c (regsets_fetch_inferior_registers)
15378 (regsets_store_inferior_registers): Only return 0 if we processed
15380 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15381 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15383 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15385 * inferiors.c (struct thread_info): Add gdb_id.
15386 (add_thread): Add gdb_id argument.
15387 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15388 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15389 calls to add_thread.
15390 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15391 * server.c (handle_query): Use thread_to_gdb_id.
15392 (handle_v_cont, main): Use gdb_id_to_thread_id.
15393 * server.h (add_thread): Update prototype.
15394 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15397 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15399 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15400 left-padded registers.
15401 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15402 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15404 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15406 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15407 * configure: Regenerate.
15408 * config.in: Regenerate.
15409 * server.h (NEED_DECLARATION_STRERROR):
15410 Replace with !HAVE_DECL_STRERROR.
15412 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15414 * linux-low.c (linux_wait, linux_send_signal): Don't test
15415 an unsigned long variable for > 0 if it could be MAX_ULONG.
15416 * server.c (myresume): Likewise.
15417 * target.c (set_desired_inferior): Likewise.
15419 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15421 * configure.ac: Simplify and improve check for socklen_t.
15422 * configure, config.in: Regenerate.
15424 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15426 * acconfig.h: Remove.
15427 * configure.ac: Add a test for socklen_t. Use three-argument
15428 AC_DEFINE throughout.
15429 * config.in: Regenerated using autoheader 2.59.
15430 * configure: Regenerated.
15432 * gdbreplay.c (socklen_t): Provide a default.
15433 (remote_open): Use socklen_t.
15434 * remote-utils.c (socklen_t): Provide a default.
15435 (remote_open): Use socklen_t.
15436 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15439 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15441 * linux-low.c (linux_read_memory, linux_write_memory)
15442 (linux_read_auxv): Likewise.
15443 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15444 (check_mem_write): Likewise.
15445 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15447 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15448 (registers_from_string, register_data): Likewise.
15449 * server.c (handle_query, main): Likewise.
15450 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15451 (decode_M_packet): Likewise.
15452 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15453 * target.h (struct target_ops): Update read_memory, write_memory,
15455 (read_inferior_memory, write_inferior_memory): Update.
15456 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15457 to unsigned char *.
15458 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15459 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15460 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15461 linux-s390-low.c, linux-sh-low.c: Update for changes in
15462 read_inferior_memory and the_low_target->breakpoint.
15464 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15466 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15467 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15468 * configure.srv: Add powerpc64-*-linux*.
15469 * linux-ppc64-low.c: New file.
15471 2005-05-23 Orjan Friberg <orjanf@axis.com>
15473 * linux-cris-low.c: New file with support for CRIS.
15474 * linux-crisv32-low.c: Ditto for CRISv32.
15475 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15476 (clean): Add reg-cris.c and reg-crisv32.c.
15477 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15478 reg-crisv32.o, and reg-crisv32.c to make rules.
15479 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15480 recognized targets.
15482 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15484 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15485 of sizeof (PTRACE_XFER_TYPE).
15486 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15488 2005-05-12 Orjan Friberg <orjanf@axis.com>
15490 * target.h (struct target_ops): Add insert_watchpoint,
15491 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15492 pointers for hardware watchpoint support.
15493 * linux-low.h (struct linux_target_ops): Ditto.
15494 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15495 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15496 to linux_target_ops.
15497 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15499 * server.c (main): Recognize 'Z' and 'z' packets.
15501 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15503 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15504 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15505 (the_low_target): Add new members.
15507 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15509 * proc-service.c (ps_lgetregs): Search all_processes instead of
15512 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15514 * server.c (start_inferior): Change return type to int.
15515 (attach_inferior): Change sigptr to int *.
15516 (handle_v_cont, handle_v_requests): Change signal to int *.
15517 (main): Change signal to int.
15519 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15521 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15522 * configure.srv: Add m32r*-*-linux*.
15523 * linux-m32r-low.c: New file.
15525 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15527 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15529 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15531 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15532 Take unsigned long arguments for PIDs.
15533 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15534 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15535 (wait_for_sigstop, linux_resume_one_process)
15536 (regsets_fetch_inferior_registers, linux_send_signal)
15537 (linux_read_auxv): Likewise. Update the types of variables holding
15538 PIDs. Update format string specifiers.
15539 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15540 * remote-utils.c (prepare_resume_reply): Likewise.
15541 * server.c (cont_thread, general_thread, step_thread)
15542 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15544 (handle_query): Update format specifiers.
15545 (handle_v_cont, main): Use strtoul for thread IDs.
15546 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15547 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15548 (general_thread, step_thread, thread_from_wait)
15549 (old_thread_from_wait): Update.
15550 * target.h (struct thread_resume): Use unsigned long for THREAD.
15551 (struct target_ops): Use unsigned long for arguments to attach and
15554 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15556 * acinclude.m4: Include bfd/bfd.m4 directly.
15557 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15558 <agriffis@toolchain.org>.
15559 * aclocal.m4, configure: Regenerated.
15561 2005-01-07 Andrew Cagney <cagney@gnu.org>
15563 * configure.ac: Rename configure.in, require autoconf 2.59.
15564 * configure: Re-generate.
15566 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15568 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15569 LIBS when finished.
15570 * aclocal.m4: Regenerated.
15571 * configure: Regenerated.
15573 2004-11-21 Andreas Schwab <schwab@suse.de>
15575 * linux-m68k-low.c (m68k_num_gregs): Define.
15576 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15577 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15578 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15579 (m68k_breakpoint_at): New. Add to the_low_target.
15581 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15582 srv_linux_thread_db to yes.
15584 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15586 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15587 (ARCH_SET_FS): Likewise.
15588 (ARCH_GET_FS): Likewise.
15589 (ARCH_GET_GS): Likewise.
15591 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15593 * linux-i386-low.c (ps_get_thread_area): New.
15594 * linux-x86-64-low.c (ps_get_thread_area): New.
15595 * linux-low.c: Include <sys/syscall.h>.
15596 (linux_kill_one_process): Don't kill the first thread here.
15597 (linux_kill): Kill the first thread here.
15598 (kill_lwp): New function.
15599 (send_sigstop, linux_send_signal): Use it.
15600 * proc-service.c: Clean up #ifdefs.
15601 (fpregset_info): Delete.
15602 (ps_lgetregs): Update and enable implementation.
15603 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15605 * remote-utils.c (struct sym_cache, symbol_cache): New.
15606 (input_interrupt): Print a clearer message.
15607 (async_io_enabled): New variable.
15608 (enable_async_io, disable_async_io): Use it. Update comments.
15609 (look_up_one_symbol): Use the symbol cache.
15610 * thread-db.c (thread_db_look_up_symbols): New function.
15611 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15613 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15615 * configure.in: Test for -rdynamic.
15616 * configure: Regenerated.
15617 * Makefile (INTERNAL_LDFLAGS): New.
15618 (gdbserver, gdbreplay): Use it.
15620 2004-09-02 Andrew Cagney <cagney@gnu.org>
15622 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15624 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15626 * linux-low.c (linux_wait): Clear all_processes list also.
15628 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15630 * linux-low.c: Include <errno.h>. Remove extern declaration of
15633 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15635 * gdbreplay.c, server.h, utils.c: Update copyright years.
15637 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15639 * server.c (main): Print child status or termination signal from
15640 variable 'signal', not 'sig'.
15642 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15644 * linux-low.c (linux_read_memory): Change return type to
15645 int. Check for and return error from ptrace().
15646 * target.c (read_inferior_memory): Change return type to int. Pass
15647 back return status from the_target->read_memory().
15648 * target.h (struct target_ops): Adapt *read_memory() prototype.
15650 (read_inferior_memory): Adapt prototype.
15651 * server.c (main): Return an error packet if
15652 read_inferior_memory() returns an error.
15654 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15656 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15657 Unify with other clean targets.
15659 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15661 * server.c (handle_v_cont): Call set_desired_inferior.
15663 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15665 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15667 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15669 * linux-low.c (linux_wait): Unblock async I/O.
15670 (linux_resume): Block and enable async I/O.
15671 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15672 * server.h (block_async_io, unblock_async_io): Add prototypes.
15674 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15676 * remote-utils.c (remote_open): Print a status notice after
15677 opening a TCP port.
15678 * server.c (attach_inferior): Print a status notice after
15681 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15683 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15685 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15687 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15689 * server.c, target.h: Update copyright years.
15691 2004-02-25 Roland McGrath <roland@redhat.com>
15693 * target.h (struct target_ops): New member `read_auxv'.
15694 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15695 * linux-low.c (linux_read_auxv): New function.
15696 (linux_target_ops): Initialize `read_auxv' member to that.
15698 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15700 Committed by Jim Blandy <jimb@redhat.com>.
15702 * linux-s390-low.c (s390_num_regs): Update.
15703 (s390_regmap): Remove control registers. Use __s390x__ predefine
15704 instead of GPR_SIZE to distiguish s390 and s390x targets.
15706 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15708 * linux-low.c: Update copyright year.
15709 (check_removed_breakpoint): Clear pending_is_breakpoint.
15710 (linux_set_resume_request, linux_queue_one_thread)
15711 (resume_status_pending_p): New functions.
15712 (linux_continue_one_thread): Use process->resume.
15713 (linux_resume): Only resume threads if there are no pending events.
15714 * linux-low.h (struct process_info): Add resume request
15717 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15719 * regcache.c (new_register_cache): Clear the allocated register
15720 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15722 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15724 * linux-low.c (linux_resume): Take a struct thread_resume *
15726 (linux_wait): Update call.
15727 (resume_ptr): New static variable.
15728 (linux_continue_one_thread): Renamed from
15729 linux_continue_one_process. Use resume_ptr.
15730 (linux_resume): Use linux_continue_one_thread.
15731 * server.c (handle_v_cont, handle_v_requests): New functions.
15732 (myresume): New function.
15733 (main): Handle 'v' case.
15734 * target.h (struct thread_resume): New type.
15735 (struct target_ops): Change argument of "resume" to struct
15737 (myresume): Delete macro.
15739 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15741 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15742 (uninstall): Support DESTDIR.
15744 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15746 * configure.srv: Add xscale*linux copy of arm*linux entry.
15748 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15750 * linux-arm-low.c (arm_reinsert_addr): New function.
15751 (the_low_target): Add arm_reinsert_addr.
15753 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15755 * mem-break.c: Remove whitespace at end of file.
15757 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15759 * configure.in: Check whether we need to prototype strerror.
15760 * server.h: Optionally prototype strerror.
15761 * gdbreplay.c (perror_with_name): Use strerror.
15762 * linux-low.c (linux_attach_lwp): Use strerror.
15763 * utils.c (perror_with_name): Use strerror.
15764 * config.in, configure: Regenerated.
15766 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15768 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15769 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15771 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15773 * Makefile.in (SFILES): Update.
15774 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15775 low-sun3.c: Remove files.
15777 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15779 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15780 (linux_detach_one_process, linux_detach): New functions.
15781 (linux_target_ops): Add linux_detach.
15782 * server.c (main): Handle 'D' packet.
15783 * target.h (struct target_ops): Add "detach" member.
15784 (detach_inferior): Define.
15786 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15788 From Kelley Cook <kelleycook@wideopenwest.com>:
15789 * configure.srv: Accept i[34567]86 variants.
15791 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15793 * linux-low.c (linux_wait_for_event): Correct comment typos.
15794 (linux_resume_one_process): Call check_removed_breakpoint.
15795 (linux_send_signal): New function.
15796 (linux_target_ops): Add linux_send_signal.
15797 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15799 * target.h (struct target_ops): Add send_signal.
15801 2003-05-29 Jim Blandy <jimb@redhat.com>
15803 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15804 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15805 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15806 away part of the register's value.
15808 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15810 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15811 (linux_wait_for_event, linux_init_signals): Likewise.
15813 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15815 * configure.in: Check for stdlib.h.
15816 * configure: Regenerated.
15817 * config.in: Regenerated.
15819 2003-01-04 Andreas Schwab <schwab@suse.de>
15821 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15823 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15825 * Makefile.in: Remove obsolete code.
15827 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15829 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15830 defined(PT_FPR0_HI).
15832 2002-11-17 Stuart Hughes <seh@zee2.com>
15834 * linux-arm-low.c (arm_num_regs): Increase.
15835 (arm_regmap): Include status register.
15837 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15839 * linux-low.c (register_addr): Remove incorrect -1 check.
15841 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15843 * linux-low.c (linux_create_inferior): Call setpgid. Return
15845 (unstopped_p, linux_signal_pid): Remove.
15846 (linux_target_ops): Remove linux_signal_pid.
15847 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15848 global instead of target method.
15849 * target.h (struct target_ops): Remove signal_pid. Update comment
15850 for create_inferior.
15851 * server.c (signal_pid): New variable.
15852 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15853 gdbserver. Set the child to be the foreground process group.
15854 (attach_inferior): Set signal_pid.
15856 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15858 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15860 2002-08-20 Jim Blandy <jimb@redhat.com>
15862 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15865 2002-08-01 Andrew Cagney <cagney@redhat.com>
15867 * Makefile.in: Make chill references obsolete.
15869 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15871 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15872 * configure: Regenerate.
15873 * config.in: Regenerate.
15875 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15877 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15878 (perror_with_name, remote_close, remote_open, expect, play): Static.
15880 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15882 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15883 byte offsets instead of an array of indexes.
15884 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15886 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15888 * regcache.c: Add comment.
15890 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15892 * thread-db.c: New file.
15893 * proc-service.c: New file.
15894 * acinclude.m4: New file.
15895 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15896 proc-service.o, and thread-db.o.
15897 (linux-low.o): Add USE_THREAD_DB.
15898 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15899 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15900 * aclocal.m4: Regenerated.
15901 * config.in: Regenerated.
15902 * configure: Regenerated.
15903 * configure.in: Check for proc_service.h, sys/procfs.h,
15904 thread_db.h, and linux/elf.h headrs.
15905 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15906 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15907 Check for -lthread_db and thread support.
15908 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15909 PowerPC, and SuperH.
15910 * i387-fp.c: Constify arguments.
15911 * i387-fp.h: Likewise.
15912 * inferiors.c: (struct thread_info): Renamed from
15913 `struct inferior_info'. Remove PID member. Use generic inferior
15914 list header. All uses updated.
15915 (inferiors, signal_pid): Removed.
15916 (all_threads): New variable.
15917 (get_thread): Define.
15918 (add_inferior_to_list): New function.
15919 (for_each_inferior): New function.
15920 (change_inferior_id): New function.
15921 (add_inferior): Removed.
15922 (remove_inferior): New function.
15923 (add_thread): New function.
15924 (free_one_thread): New function.
15925 (remove_thread): New function.
15926 (clear_inferiors): Use for_each_inferior and free_one_thread.
15927 (find_inferior): New function.
15928 (find_inferior_id): New function.
15929 (inferior_target_data): Update argument type.
15930 (set_inferior_target_data): Likewise.
15931 (inferior_regcache_data): Likewise.
15932 (set_inferior_regcache_data): Likewise.
15933 * linux-low.c (linux_bp_reinsert): Remove.
15934 (all_processes, stopping_threads, using_thrads)
15935 (struct pending_signals, debug_threads, pid_of): New.
15936 (inferior_pid): Replace with macro.
15937 (struct inferior_linux_data): Remove.
15938 (get_stop_pc, add_process): New functions.
15939 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15940 Use add_process and add_thread.
15941 (linux_attach_lwp): New function, based on old linux_attach. Use
15942 add_process and add_thread. Set stop_expected for new threads.
15943 (linux_attach): New function.
15944 (linux_kill_one_process): New function.
15945 (linux_kill): Kill all LWPs.
15946 (linux_thread_alive): Use find_inferior_id.
15947 (check_removed_breakpoints, status_pending_p): New functions.
15948 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15949 Update. Use WNOHANG. Wait for cloned processes also. Update process
15950 struct for the found process.
15951 (linux_wait_for_event): New function.
15952 (linux_wait): Use it. Support LWPs.
15953 (send_sigstop, wait_for_sigstop, stop_all_processes)
15954 (linux_resume_one_process, linux_continue_one_process): New functions.
15955 (linux_resume): Support LWPs.
15956 (REGISTER_RAW_SIZE): Remove.
15957 (fetch_register): Use register_size instead. Call supply_register.
15958 (usr_store_inferior_registers): Likewise. Call collect_register.
15959 Fix recursive case.
15960 (regsets_fetch_inferior_registers): Improve error message.
15961 (regsets_store_inferior_registers): Add debugging.
15962 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15963 (unstopped_p, linux_signal_pid): New functions.
15964 (linux_target_ops): Add linux_signal_pid.
15965 (linux_init_signals): New function.
15966 (initialize_low): Call it. Initialize using_threads.
15967 * regcache.c (inferior_regcache_data): Add valid
15969 (get_regcache): Fetch registers lazily. Add fetch argument
15970 and update all callers.
15971 (regcache_invalidate_one, regcache_invalidate): New
15973 (new_register_cache): Renamed from create_register_cache.
15974 Return the new regcache.
15975 (free_register_cache): Change argument to a void *.
15976 (registers_to_string, registers_from_string): Call get_regcache
15977 with fetch flag set.
15978 (register_data): Make static. Pass fetch flag to get_regcache.
15979 (supply_register): Call get_regcache with fetch flag clear.
15980 (collect_register): Call get_regcache with fetch flag set.
15981 (collect_register_as_string): New function.
15982 * regcache.h: Update.
15983 * remote-utils.c (putpkt): Flush after debug output and use
15985 Handle input interrupts while waiting for an ACK.
15986 (input_interrupt): Use signal_pid method.
15987 (getpkt): Flush after debug output and use stderr.
15988 (outreg): Use collect_register_as_string.
15989 (new_thread_notify, dead_thread_notify): New functions.
15990 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15991 and general_thread.
15992 (look_up_one_symbol): Flush after debug output.
15993 * server.c (step_thread, server_waiting): New variables.
15994 (start_inferior): Don't use signal_pid. Update call to mywait.
15995 (attach_inferior): Update call to mywait.
15996 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15997 (main): Don't fetch/store registers explicitly. Use
15998 set_desired_inferior. Support proposed ``Hs'' packet. Update
16000 * server.h: Update.
16001 (struct inferior_list, struct_inferior_list_entry): New.
16002 * target.c (set_desired_inferior): New.
16003 (write_inferior_memory): Constify.
16004 (mywait): New function.
16005 * target.h: Update.
16006 (struct target_ops): New signal_pid method.
16007 (mywait): Removed macro, added prototype.
16009 * linux-low.h (regset_func): Removed.
16010 (regset_fill_func, regset_store_func): New.
16011 (enum regset_type): New.
16012 (struct regset_info): Add type field. Use new operation types.
16013 (struct linux_target_ops): stop_pc renamed to get_pc.
16014 Add decr_pc_after_break and breakpoint_at.
16015 (get_process, get_thread_proess, get_process_thread)
16016 (strut process_info, all_processes, linux_attach_lwp)
16017 (thread_db_init): New.
16019 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16020 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16021 (the_low_target): Add new members.
16022 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16023 (i386_store_fpxregset): Constify.
16024 (target_regsets): Add new kind identifier.
16025 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16026 (i386_set_pc): Add debugging.
16027 (i386_breakpoint_at): New function.
16028 (the_low_target): Add new members.
16029 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16030 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16031 (mips_breakpoint_at): New.
16032 (the_low_target): Add new members.
16033 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16034 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16035 (the_low_target): Add new members.
16036 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16037 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16038 (the_low_target): Add new members.
16039 * linux-x86-64-low.c (target_regsets): Add new kind
16042 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16044 From Martin Pool <mbp@samba.org>:
16045 * server.c (gdbserver_usage): New function.
16048 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16050 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16051 stop_at -> stop_pc.
16053 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16055 * Makefile.in: Remove obsolete code.
16057 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16059 * linux-low.c (regsets_fetch_inferior_registers),
16060 (regsets_store_inferior_registers): Removed cast to int from
16062 * regcache.h: Added declaration of struct inferior_info.
16064 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16066 * inferiors.c (struct inferior_info): Add regcache_data.
16067 (add_inferior): Call create_register_cache.
16068 (clear_inferiors): Call free_register_cache.
16069 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16070 * regcache.c (struct inferior_regcache_data): New.
16071 (registers): Remove.
16072 (get_regcache): New function.
16073 (create_register_cache, free_register_cache): New functions.
16074 (set_register_cache): Don't initialize the register cache here.
16075 (registers_to_string, registers_from_string, register_data): Call
16077 * regcache.h: Add prototypes.
16078 * server.h: Likewise.
16080 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16082 * mem-break.c: New file.
16083 * mem-break.h: New file.
16084 * Makefile.in: Add mem-break.o rule; update server.h
16086 * inferiors.c (struct inferior_info): Add target_data
16088 (clear_inferiors): Free target_data member if set.
16089 (inferior_target_data, set_inferior_target_data): New functions.
16090 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16091 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16092 * linux-low.c (linux_bp_reinsert): New variable.
16093 (struct inferior_linux_data): New.
16094 (linux_create_inferior): Use set_inferior_target_data.
16095 (linux_attach): Likewise. Call add_inferior.
16096 (linux_wait_for_one_inferior): New function.
16097 (linux_wait): Call it.
16098 (linux_write_memory): Add const.
16099 (initialize_low): Call set_breakpoint_data.
16100 * linux-low.h (struct linux_target_ops): Add breakpoint
16102 * server.c (attach_inferior): Remove extra add_inferior
16104 * server.h: Include mem-break.h. Update inferior.c
16106 * target.c (read_inferior_memory)
16107 (write_inferior_memory): New functions.
16108 * target.h (read_inferior_memory)
16109 (write_inferior_memory): Change macros to prototypes.
16110 (struct target_ops): Update comments. Add const to write_memory
16113 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16115 * linux-low.c (usr_store_inferior_registers): Support
16116 registers which are allowed to fail to store.
16117 * linux-low.h (linux_target_ops): Likewise.
16118 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16119 (ppc_cannot_store_register): FPSCR may not be storable.
16121 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16123 * server.h: Include <string.h> if HAVE_STRING_H.
16124 * ChangeLog: Correct paths in last ChangeLog entry.
16126 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16128 * linux-low.h: Remove obsolete prototypes.
16129 (struct linux_target_ops): New.
16130 (extern the_low_target): New.
16131 * linux-low.c (num_regs, regmap): Remove declarations.
16132 (register_addr): Use the_low_target explicitly.
16133 (fetch_register): Likewise.
16134 (usr_fetch_inferior_registers): Likewise.
16135 (usr_store_inferior_registers): Likewise.
16136 * linux-arm-low.c (num_regs): Remove.
16137 (arm_num_regs): Define.
16138 (arm_regmap): Renamed from regmap, made static.
16139 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16141 (arm_cannot_store_register): Renamed from cannot_store_register,
16143 (the_low_target): New.
16144 * linux-i386-low.c (num_regs): Remove.
16145 (i386_num_regs): Define.
16146 (i386_regmap): Renamed from regmap, made static.
16147 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16149 (i386_cannot_store_register): Renamed from cannot_store_register,
16151 (the_low_target): New.
16152 * linux-ia64-low.c (num_regs): Remove.
16153 (ia64_num_regs): Define.
16154 (ia64_regmap): Renamed from regmap, made static.
16155 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16157 (ia64_cannot_store_register): Renamed from cannot_store_register,
16159 (the_low_target): New.
16160 * linux-m68k-low.c (num_regs): Remove.
16161 (m68k_num_regs): Define.
16162 (m68k_regmap): Renamed from regmap, made static.
16163 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16165 (m68k_cannot_store_register): Renamed from cannot_store_register,
16167 (the_low_target): New.
16168 * linux-mips-low.c (num_regs): Remove.
16169 (mips_num_regs): Define.
16170 (mips_regmap): Renamed from regmap, made static.
16171 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16173 (mips_cannot_store_register): Renamed from cannot_store_register,
16175 (the_low_target): New.
16176 * linux-ppc-low.c (num_regs): Remove.
16177 (ppc_num_regs): Define.
16178 (ppc_regmap): Renamed from regmap, made static.
16179 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16181 (ppc_cannot_store_register): Renamed from cannot_store_register,
16183 (the_low_target): New.
16184 * linux-s390-low.c (num_regs): Remove.
16185 (s390_num_regs): Define.
16186 (s390_regmap): Renamed from regmap, made static.
16187 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16189 (s390_cannot_store_register): Renamed from cannot_store_register,
16191 (the_low_target): New.
16192 * linux-sh-low.c (num_regs): Remove.
16193 (sh_num_regs): Define.
16194 (sh_regmap): Renamed from regmap, made static.
16195 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16197 (sh_cannot_store_register): Renamed from cannot_store_register,
16199 (the_low_target): New.
16200 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16201 (the_low_target): New.
16203 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16205 * Makefile.in: Add stamp-h target.
16206 * configure.in: Create stamp-h.
16207 * configure: Regenerated.
16209 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16211 * inferiors.c: New file.
16212 * target.c: New file.
16213 * target.h: New file.
16214 * Makefile.in: Add target.o and inferiors.o. Update
16216 * linux-low.c (inferior_pid): New static variable,
16217 moved from server.c.
16218 (linux_create_inferior): Renamed from create_inferior.
16219 Call add_inferior. Return 0 on success instead of a PID.
16220 (linux_attach): Renamed from myattach.
16221 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16222 (linux_thread_alive): Renamed from mythread_alive.
16223 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16225 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16226 (regsets_store_inferior_registers): Correct error message.
16227 Add missing ``return 0''.
16228 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16229 (linux_store_registers): Renamed from store_inferior_registers.
16230 (linux_read_memory): Renamed from read_inferior_memory.
16231 (linux_write_memory): Renamed from write_inferior_memory.
16232 (linux_target_ops): New structure.
16233 (initialize_low): Call set_target_ops ().
16234 * remote-utils.c (unhexify): New function.
16235 (hexify): New function.
16236 (input_interrupt): Send signals to ``signal_pid''.
16237 * server.c (inferior_pid): Remove.
16238 (start_inferior): Update create_inferior call.
16239 (attach_inferior): Call add_inferior.
16240 (handle_query): New function.
16241 (main): Call handle_query for `q' packets.
16242 * server.h: Include "target.h". Remove obsolete prototypes.
16243 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16245 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16247 * Makefile.in: Add WARN_CFLAGS. Update configury
16249 * configure.in: Check for <string.h>
16250 * configure: Regenerate.
16251 * config.in: Regenerate.
16252 * gdbreplay.c: Include needed system headers.
16253 (remote_open): Remove strchr prototype.
16254 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16255 * regcache.c (supply_register): Change buf argument to const void *.
16256 (supply_register_by_name): Likewise.
16257 (collect_register): Change buf argument to void *.
16258 (collect_register_by_name): Likewise.
16259 * regcache.h: Add missing prototypes.
16260 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16261 * server.c (handle_query): New function.
16262 (attached): New static variable, moved out of main.
16263 (main): Quiet longjmp clobber warnings.
16264 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16265 * utils.c (error): Remove NORETURN.