1 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3 * target.h (target_enable_btrace, target_disable_btrace)
4 (target_read_btrace, target_read_btrace_conf): Turn macro into
5 inline function. Throw error if target method is not defined.
6 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
7 check for btrace target method. Be prepared to handle exceptions
8 from btrace target methods.
10 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12 * server.c (captured_main): Change order of error message printed
13 when the current working directory cannot be found.
15 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
17 * server.c: Include "filenames.h" and "pathstuff.h".
18 (program_name): Delete variable.
19 (program_path): New anonymous class.
20 (get_exec_wrapper): Use "program_path" instead of
22 (handle_v_run): Likewise.
23 (captured_main): Likewise.
24 (process_serial_event): Likewise.
26 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
28 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
29 (OBJS): Add "pathstuff.o".
30 * server.c (current_directory): New global variable.
31 (captured_main): Initialize "current_directory".
33 2018-02-26 Alan Hayward <alan.hayward@arm.com>
35 * tdesc.c: Use common/tdesc.h.
38 2018-02-20 Alan Hayward <alan.hayward@arm.com>
39 Simon Marchi <simon.marchi@ericsson.com>
41 * Makefile.in: Switch order of make rules.
43 2018-02-19 Alan Hayward <alan.hayward@arm.com>
45 * Makefile.in: Add common directory in build.
46 * configure.ac: Add common reference.
47 * configure: Regenerate.
49 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
51 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
52 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
53 * spu-low.c (spu_target_ops): Likewise.
54 * win32-low.c (win32_target_ops): Likewise.
55 * server.c (supported_btrace_packets): Report packets unconditionally.
56 * target.h (target_ops) <supports_btrace>: Remove.
57 (target_supports_btrace): Remove.
59 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
61 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
62 (handle_btrace_disable): Change return type to void. Use exceptions
64 (handle_btrace_general_set): Catch exception and copy message to
67 2018-02-08 Tom Tromey <tom@tromey.com>
69 * linux-low.c (install_software_single_step_breakpoints): Use
71 * inferiors.c (make_cleanup_restore_current_thread): Remove.
72 (do_restore_current_thread_cleanup): Remove.
73 * gdbthread.h (make_cleanup_restore_current_thread): Don't
76 2018-02-08 Tom Tromey <tom@tromey.com>
78 * mem-break.c (set_raw_breakpoint_at): Use
79 gdb::unique_xmalloc_ptr.
81 2018-01-30 Pedro Alves <palves@redhat.com>
84 * target.c (target_terminal::terminal_state): Rename to ...
85 (target_terminal::m_terminal_state): ... this.
87 2018-01-19 James Clarke <jrtc27@jrtc27.com>
89 * linux-low.c (handle_extended_wait): Surround call to
90 thread_db_notice_clone with #ifdef USE_THREAD_DB.
92 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
94 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
95 linux_ptrace_attach_fail_reason_string now returning an
97 (linux_attach): Likewise.
98 * thread-db.c (attach_thread): Likewise.
100 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
103 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
104 checking for fs_base/gs_base fields in struct user_regs_struct.
105 * configure: Regenerate.
107 2018-01-16 Yao Qi <yao.qi@linaro.org>
110 * linux-low.c (fetch_register): Call supply_register instead of
113 2018-01-08 Yao Qi <yao.qi@linaro.org>
114 Simon Marchi <simon.marchi@ericsson.com>
116 * Makefile.in (OBS): Remove selftest.o.
117 * configure.ac: Set srv_selftest_objs if $development is true.
118 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
119 * configure: Re-generated.
120 * server.c (captured_main): Wrap variable selftest_filter with
123 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
125 * server.c (parse_debug_format_options): Return std::string.
126 (handle_monitor_command, captured_main): Adjust.
128 2018-01-05 Pedro Alves <palves@redhat.com>
131 * server.c (captured_main): Pass quiet=false to
132 save_original_signals_state.
134 2018-01-01 Joel Brobecker <brobecker@adacore.com>
136 * gdbreplay.c (gdbreplay_version): Update copyright year in
138 * server.c (gdbserver_version): Likewise.
140 2017-12-08 Tom Tromey <tom@tromey.com>
142 * ax.c (ax_printf): Update.
144 2017-12-07 Yao Qi <yao.qi@linaro.org>
146 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
147 aarch64_linux_read_description.
148 * linux-amd64-ipa.c (idx2mask): New array.
149 (get_ipa_tdesc): Move idx2mask out.
150 (initialize_low_tracepoint): Initialize target descriptions.
151 * linux-i386-ipa.c (idx2mask): New array.
152 (get_ipa_tdesc): Move idx2mask out.
153 (initialize_low_tracepoint): Initialize target descriptions.
155 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
157 * tdesc.c (struct tdesc_type): Change return type.
158 (tdesc_add_flag): Change parameter type.
159 (tdesc_add_bitfield): Likewise.
160 (tdesc_add_field): Likewise.
161 (tdesc_set_struct_size): Likewise.
163 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
165 * regcache.c (registers_to_string): Remove unused variable.
167 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
169 * inferiors.c (for_each_inferior_with_data): Remove.
170 * inferiors.h (for_each_inferior_with_data): Remove.
171 * server.c (handle_qxfer_threads_worker): Change parameter type.
172 (handle_qxfer_threads_proper): Use for_each_thread.
174 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
176 * inferiors.c (for_each_inferior): Remove.
177 (clear_inferiors): Use for_each_thread.
178 * inferiors.h (for_each_inferior): Remove.
179 * linux-low.c (linux_wait_for_event_filtered): Use
181 (linux_stabilize_threads): Likewise.
182 * regcache.c (regcache_release): Likewise.
183 * server.c (gdb_wants_all_threads_stopped): Likewise.
184 (clear_pending_status_callback): Remove.
185 (handle_status): Use for_each_thread.
186 (captured_main): Likewise.
187 * win32-low.c (child_init_thread_list): Likewise.
188 (win32_clear_inferiors): Likewise.
189 (fake_breakpoint_event): Likewise.
191 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
193 * inferiors.h (find_inferior): Remove.
194 * inferiors.c (find_inferior): Remove.
196 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
198 * linux-low.c (resume_status_pending_p): Update comment.
199 (need_step_over_p): Update comment.
201 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
203 * linux-low.c (proceed_one_lwp): Return void, change parameter
205 (unsuspend_and_proceed_one_lwp): Likewise.
206 (proceed_all_lwps): Use for_each_thread.
207 (unstop_all_lwps): Likewise.
209 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
211 * linux-low.c (linux_resume_one_thread): Return void, take
213 (linux_resume): Use for_each_thread.
215 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
217 * linux-low.c (send_sigstop_callback): Return void, change
218 parameter type. Rename to...
219 (send_sigstop): ... this.
220 (suspend_and_send_sigstop_callback): Return void, change parameter
222 (suspend_and_send_sigstop): ... this.
223 (stop_all_lwps): Use for_each_thread.
225 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
227 * linux-low.c (lwp_running): Return bool, remove unused
229 (linux_stabilize_threads): Use find_thread.
231 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
233 * linux-low.c (select_singlestep_lwp_callback): Remove.
234 (count_events_callback): Remove.
235 (select_event_lwp_callback): Remove.
236 (select_event_lwp): Use find_thread/for_each_thread.
238 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
240 * linux-low.c (not_stopped_callback): Return bool, take filter
242 (linux_wait_for_event_filtered): Use find_thread.
243 (linux_wait_1): Likewise.
245 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
247 * linux-low.c (same_lwp): Remove.
248 (find_lwp_pid): Use find_thread.
250 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
252 * linux-low.c (delete_lwp_callback): Remove.
253 (linux_mourn): Use for_each_thread.
255 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
257 * linux-low.c (linux_detach_lwp_callback): Return void, remove
258 args parameter, don't check for pid.
259 (linux_detach): Use for_each_thread.
261 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
263 * linux-low.c (struct counter): Remove.
264 (second_thread_of_pid_p): Remove.
265 (last_thread_of_process_p): Use find_thread.
267 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
269 * inferiors.c (find_inferior_in_random): Remove.
270 * inferiors.h (find_inferior_in_random): Remove.
271 * linux-low.c (status_pending_p_callback): Return bool, accept
272 parameter ptid directly.
273 (linux_wait_for_event_filtered): Use find_thread_in_random.
274 (linux_wait_1): Likewise.
276 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
278 * inferiors.c (find_inferior_id): Remove.
279 (find_thread_ptid): Move implemention from find_inferior_id to
281 * inferiors.h (find_inferior_id): Remove.
282 * server.c (handle_status): Use find_thread_ptid.
283 (process_serial_event): Likewise.
284 * thread-db.c (find_one_thread): Likewise.
285 (thread_db_thread_handle): Likewise.
286 * win32-low.c (thread_rec): Likewise.
287 (child_delete_thread): Likewise.
288 (win32_thread_alive): Likewise.
289 (get_child_debug_event): Likewise.
291 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
293 * linux-mips-low.c (update_watch_registers_callback): Return
294 void, remove pid_p parameter, don't check for pid.
295 (mips_insert_point, mips_remove_point): Use for_each_thread.
297 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
299 * lynx.low (lynx_delete_thread_callback): Remove.
300 (lynx_mourn): Use for_each_thread.
302 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
304 * regcache.c (regcache_invalidate_one): Remove.
305 (regcache_invalidate_pid): use for_each_thread.
307 2017-11-26 Tom Tromey <tom@tromey.com>
309 * linux-low.c (linux_create_inferior): Update.
311 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
313 * spu-low.c (spu_create_inferior): Fix typo in argument name.
315 2017-11-24 Alan Hayward <alan.hayward@arm.com>
317 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
318 * linux-aarch64-low.c (initialize_low_arch): Call init func.
319 * linux-aarch64-tdesc-selftest.c: New file.
320 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
322 2017-11-24 Alan Hayward <alan.hayward@arm.com>
324 * configure.srv: Add new file.
325 * linux-aarch64-low.c (initialize_low_arch): Call init func.
326 * linux-aarch64-tdesc-selftest.c: New file.
327 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
329 2017-11-24 Alan Hayward <alan.hayward@arm.com>
331 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
332 * linux-aarch64-low.c (initialize_low_arch): Remove init.
333 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
335 2017-11-24 Alan Hayward <alan.hayward@arm.com>
337 * configure.srv: Add new files.
338 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
339 aarch64_linux_read_description.
340 * linux-aarch64-low.c (aarch64_linux_read_description):
341 Merge with aarch64_arch_setup.
342 (aarch64_arch_setup): Call aarch64_linux_read_description.
343 * linux-aarch64-tdesc.c: New file.
344 * linux-aarch64-tdesc.h: New file.
346 2017-11-24 Yao Qi <yao.qi@linaro.org>
348 * configure.srv: Set $srv_regobj for tic6x-linux.
349 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
350 (tic6x_read_description): Move some code to tic6x_arch_setup.
351 (tic6x_tdesc_test): New function.
352 (initialize_low_arch): Call selftests::register_test.
354 2017-11-22 Yao Qi <yao.qi@linaro.org>
356 * remote-utils.c (prepare_resume_reply): Use memcpy.
358 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
360 * linux-low.c (kill_one_lwp_callback): Return void, take
361 argument directly, don't filter on pid.
362 (linux_kill): Use for_each_thread.
364 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
366 * linux-low.c (need_step_over_p): Return bool, remove dummy
368 (linux_resume, proceed_all_lwps): Use find_thread.
370 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
372 * linux-low.c (resume_status_pending_p): Return bool, remove
374 (linux_resume): Use find_thread.
376 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
378 * linux-low.c (struct thread_resume_array): Remove.
379 (linux_set_resume_request): Return void, take arguments
381 (linux_resume): Use for_each_thread.
383 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
385 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
386 return bool, remove data argument.
387 (linux_stabilize_threads): Use find_thread.
389 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
391 * linux-low.c (unsuspend_one_lwp): Remove.
392 (unsuspend_all_lwps): Use for_each_thread, inline code from
395 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
397 * gdbthread.h (find_thread): Add overload with ptid_t filter.
398 * linux-low.c (struct iterate_over_lwps_args): Remove.
399 (iterate_over_lwps_filter): Remove.
400 (iterate_over_lwps): Use find_thread.
402 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
404 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
405 (linux_handle_new_gdb_connection): Use for_each_thread, inline
406 code from reset_lwp_ptrace_options_callback.
408 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
410 * linux-arm-low.c (struct update_registers_data): Remove.
411 (update_registers_callback): Return void, take arguments
412 directly, don't check thread's pid.
413 (arm_insert_point, arm_remove_point): Use for_each_thread.
415 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
417 * win32-low.c (continue_one_thread): Return void, take argument
419 (child_continue): Use for_each_thread.
421 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
423 * win32-i386-low.c (update_debug_registers_callback): Rename
425 (update_debug_registers): ... this, return void, remove pid_p arg.
426 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
428 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
430 * inferiors.h (struct process_info): Add constructor, initialize
432 <syscalls_to_catch>: Change type to std::vector<int>.
433 * inferiors.c (add_process): Allocate process_info with new.
434 (remove_process): Free process_info with delete.
435 * linux-low.c (handle_extended_wait): Adjust.
436 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
437 * server.c (handle_general_set): Adjust.
439 2017-11-16 Pedro Alves <palves@redhat.com>
441 * remote-utils.c (remote_close): Block SIGIO signals instead of
442 uninstalling the SIGIO handler.
444 2017-11-16 Alan Hayward <alan.hayward@arm.com>
446 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
448 2017-11-16 Yao Qi <yao.qi@linaro.org>
450 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
451 (tic6x_store_gregset): Likewise.
452 (tic6x_usrregs_info): Move it up.
454 2017-11-15 Alan Hayward <alan.hayward@arm.com>
456 * Makefile.in: Update arch rules.
457 * configure.srv: Explicitly mark arch/ files.
459 2017-11-13 Andreas Schwab <schwab@suse.de>
461 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
463 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
465 2017-11-06 Pedro Alves <palves@redhat.com>
467 * config.in, configure: Regenerate.
469 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
471 * target.c (struct thread_search): Remove.
472 (thread_search_callback): Remove.
473 (prepare_to_access_memory): Use for_each_thread instead of
474 find_inferior. Inline code from thread_search_callback.
476 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
478 * server.c (struct visit_actioned_threads_data): Remove.
479 (visit_actioned_threads): Change prototype to take arguments
481 (resume): Use find_thread instead of find_inferior.
483 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
485 * server.c (queue_stop_reply_callback): Change prototype, return
487 (find_status_pending_thread_callback): Remove.
488 (handle_status): Replace find_inferior with find_thread and
491 2017-10-25 Alan Hayward <alan.hayward@arm.com>
493 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
495 (aarch64_store_gregset): Likewise.
496 (aarch64_fill_fpregset): Likewise.
497 (aarch64_store_fpregset): Likewise.
499 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
501 * gdbthread.h (find_thread, for_each_thread): New functions.
502 * inferiors.c (thread_of_pid): Remove.
503 (find_any_thread_of_pid): Use find_thread.
504 * linux-low.c (num_lwps): Use for_each_thread.
506 2017-10-17 Yao Qi <yao.qi@linaro.org>
508 * Makefile.in: Remove one rule.
509 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
511 2017-10-17 Yao Qi <yao.qi@linaro.org>
513 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
514 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
516 2017-10-17 Yao Qi <yao.qi@linaro.org>
518 * configure.srv: Rename arm.o with arch/arm.o.
520 2017-10-17 Yao Qi <yao.qi@linaro.org>
522 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
523 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
524 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
525 (arch-i386.o, arch-amd64.o): Remove rules.
526 (arch/%.o): New rule.
527 Update POSTCOMPILE and COMPILE.pre.
528 * configure.ac: Invoke AC_CONFIG_COMMANDS.
529 * configure: Re-generated.
530 * configure.srv: Replace arch-i386.o with arch/i386.o.
531 Replace arch-amd64.o with arch/amd64.o.
533 2017-10-16 Yao Qi <yao.qi@linaro.org>
535 * configure: Regenerated.
537 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
539 * inferiors.h: (struct inferior_list): Remove.
540 (struct inferior_list_entry); Remove.
541 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
542 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
543 get_first_inferior): Remove.
544 (for_each_inferior, for_each_inferior_with_data, find_inferior,
545 find_inferior_id, find_inferior_in_random): Change signature.
546 * inferiors.c (all_threads): Change type to
547 std::list<thread_info *>.
548 (get_thread): Remove macro.
549 (find_inferior, find_inferior_id): Change signature, implement
551 (find_inferior_in_random): Change signature, implement using
552 find_thread_in_random.
553 (for_each_inferior, for_each_inferior_with_data): Change
554 signature, implement using for_each_thread.
555 (add_inferior_to_list, remove_inferior): Remove.
556 (add_thread, get_first_thread, thread_of_pid,
557 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
558 (get_first_inferior, one_inferior_p, clear_inferior_list):
560 (clear_inferiors, get_thread_process): Update.
561 * gdbthread.h: Include <list>.
562 (struct thread_info) <entry>: Remove field.
564 (all_threads): Change type to std::list<thread_info *>.
565 (get_first_inferior): Add doc.
566 (find_thread, for_each_thread, find_thread_in_random): New
568 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
569 * linux-arm-low.c (update_registers_callback): Update.
570 * linux-low.c (second_thread_of_pid_p): Update.
571 (kill_one_lwp_callback, linux_detach_lwp_callback,
572 delete_lwp_callback, status_pending_p_callback, same_lwp,
573 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
574 iterate_over_lwps, not_stopped_callback,
575 resume_stopped_resumed_lwps, count_events_callback,
576 select_singlestep_lwp_callback, select_event_lwp_callback,
577 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
578 suspend_and_send_sigstop_callback, wait_for_sigstop,
579 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
580 lwp_running, linux_set_resume_request, resume_status_pending_p,
581 need_step_over_p, start_step_over, linux_resume_one_thread,
582 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
583 reset_lwp_ptrace_options_callback): Update.
584 * linux-mips-low.c (update_watch_registers_callback): Update.
585 * regcache.c (regcache_invalidate_one, regcache_invalidate):
587 (free_register_cache_thread_one): Remove.
588 (regcache_release): Update.
589 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
590 handle_qxfer_threads_worker): Update.
591 (handle_query): Update, use list iterator.
592 (visit_actioned_threads, handle_pending_status,
593 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
594 clear_pending_status_callback, set_pending_status_callback,
595 find_status_pending_thread_callback, handle_status,
596 process_serial_event): Update.
597 * target.c (thread_search_callback): Update.
598 * thread-db.c (thread_db_get_tls_address): Update.
599 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
601 * win32-i386-low.c (update_debug_registers_callback): Update.
602 * win32-low.c (delete_thread_info, child_delete_thread,
603 continue_one_thread, suspend_one_thread,
604 get_child_debug_event): Adjust.
606 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
608 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
609 * inferiors.h: Include <list>.
610 (struct process_info) <entry>: Remove field.
612 (pid_of): Change macro to function.
613 (ptid_of, lwpid_of): Remove macro.
614 (all_processes): Change type to std::list<process_info *>.
615 (ALL_PROCESSES): Remove macro.
616 (for_each_process, find_process): New function.
617 * inferiors.c (all_processes): Change type to
618 std::list<process_info *>.
619 (find_thread_process): Adjust.
620 (add_process): Likewise.
621 (remove_process): Likewise.
622 (find_process_pid): Likewise.
623 (get_first_process): Likewise.
624 (started_inferior_callback): Remove.
625 (have_started_inferiors_p): Adjust.
626 (attached_inferior_callback): Remove.
627 (have_attached_inferiors_p): Adjust.
628 * linux-low.c (check_zombie_leaders): Likewise.
629 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
630 (x86_linux_update_xmltarget): Adjust.
631 * server.c (handle_query): Likewise.
632 (gdb_reattached_process): Remove.
633 (handle_status): Adjust.
634 (kill_inferior_callback): Likewise.
635 (detach_or_kill_inferior): Remove.
636 (print_started_pid): Likewise.
637 (print_attached_pid): Likewise.
638 (detach_or_kill_for_exit): Update.
639 (process_serial_event): Likewise.
640 * linux-arm-low.c (arm_new_fork): Likewise.
642 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
644 * dll.h: Include <list>.
645 (struct dll_info): Add constructor.
646 <entry>: Remove field.
647 (all_dlls): Change type to std::list<dll_info>.
648 * dll.c: Include <algorithm>.
649 (get_dll): Remove macro.
650 (all_dlls): Change type to std::list<dll_info *>.
651 (free_one_dll): Remove.
652 (match_dll): Likewise.
653 (loaded_dll): Adjust.
654 (unloaded_dll): Adjust to all_dlls type change, use
655 std::find_if. Inline code from match_dll.
656 (clear_dlls): Adjust to all_dlls type change.
657 * server.c (emit_dll_description): Remove.
658 (handle_qxfer_libraries): Adjust to all_dlls type change,
659 integrate emit_dll_description's functionality.
661 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
663 * linux-low.h (struct linux_target_ops) <delete_process>: New
665 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
666 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
667 (struct linux_target_ops): Add delete_process callback.
668 * linux-arm-low.c (arm_delete_process): New.
669 (struct linux_target_ops): Add delete_process callback.
670 * linux-bfin-low.c (struct linux_target_ops): Likewise.
671 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
672 * linux-m32r-low.c (struct linux_target_ops): Likewise.
673 * linux-mips-low.c (mips_linux_delete_process): New.
674 (struct linux_target_ops): Add delete_process callback.
675 * linux-ppc-low.c (struct linux_target_ops): Likewise.
676 * linux-s390-low.c (struct linux_target_ops): Likewise.
677 * linux-sh-low.c (struct linux_target_ops): Likewise.
678 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
679 * linux-tile-low.c (struct linux_target_ops): Likewise.
680 * linux-x86-low.c (x86_linux_delete_process): New.
681 (struct linux_target_ops): Add delete_process callback.
682 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
684 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
686 * linux-aarch64-low.c (the_low_target): Add thread delete
688 * linux-arm-low.c (arm_delete_thread): New function.
689 (the_low_target): Add thread delete callback.
690 * linux-bfin-low.c (the_low_target): Likewise.
691 * linux-crisv32-low.c (the_low_target): Likewise.
692 * linux-low.c (delete_lwp): Invoke delete_thread callback if
694 * linux-low.h (struct linux_target_ops) <delete_thread>: New
696 * linux-m32r-low.c (the_low_target): Add thread delete callback.
697 * linux-mips-low.c (mips_linux_delete_thread): New function.
698 (the_low_target): Add thread delete callback.
699 * linux-ppc-low.c (the_low_target): Likewise.
700 * linux-s390-low.c (the_low_target): Likewise.
701 * linux-sh-low.c (the_low_target): Likewise.
702 * linux-tic6x-low.c (the_low_target): Likewise.
703 * linux-tile-low.c (the_low_target): Likewise.
704 * linux-x86-low.c (the_low_target): Likewise.
705 * linux-xtensa-low.c (the_low_target): Likewise.
707 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
709 * win32-low.c: Include "common-inferior.h".
711 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
713 * inferiors.c (set_inferior_cwd): New function.
714 * server.c (handle_general_set): Handle QSetWorkingDir packet.
715 (handle_query): Inform that QSetWorkingDir is supported.
716 * win32-low.c (create_process): Pass the inferior's cwd to
719 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
721 * inferiors.c (current_inferior_cwd): New global variable.
722 (get_inferior_cwd): New function.
723 * inferiors.h (struct process_info) <cwd>: New field.
725 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
727 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
728 (OBS): Add gdb_tilde_expand.o.
730 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
732 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
733 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
735 2017-09-29 Pedro Alves <palves@redhat.com>
737 * ax.c (gdb_parse_agent_expr): Constify.
738 * ax.h (gdb_parse_agent_expr): Constify.
739 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
741 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
742 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
743 * remote-utils.h (read_ptid): Constify.
744 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
745 (process_point_options, process_serial_event): Constify.
746 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
747 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
748 (cmd_qtbuffer): Constify.
750 2017-09-29 Pedro Alves <palves@redhat.com>
752 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
755 2017-09-29 Pedro Alves <palves@redhat.com>
757 * linux-low.c (handle_extended_wait): Pass parent thread instead
758 of process to thread_db_notice_clone.
759 * linux-low.h (thread_db_notice_clone): Replace parent process
760 parameter with parent thread parameter.
761 * thread-db.c (find_one_thread): Add comment.
762 (thread_db_notice_clone): Replace parent process parameter with
763 parent thread parameter. Temporarily switch to the parent thread.
765 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
767 * gdbthread.h: Include "common-gdbthread.h".
768 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
769 "if" when validating the ptid.
770 * remote-utils.c: Include "gdbthread.h".
771 (prepare_resume_reply): Use "switch_to_thread".
772 * target.c (done_accessing_memory): Likewise.
774 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
776 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
777 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
778 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
779 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
780 s390x-gs-linux64-ipa.o to ipa_obj.
781 * linux-s390-low.c (HWCAP_S390_GS): New define.
782 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
784 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
785 (s390_arch_setup): Check for guarded-storage support and choose
787 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
788 init_registers_s390x_gs_linux64.
789 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
791 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
792 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
794 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
796 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
798 2017-09-21 Kevin Buettner <kevinb@redhat.com>
800 * linux-low.h (struct lwp_info): Add new field, thread_handle.
801 (thread_db_thread_handle): Declare.
802 * linux-low.c (linux_target_ops): Initialize thread_handle.
803 * server.c (handle_qxfer_threads_worker): Add support for
805 * target.h (struct target_ops): Add new function pointer,
807 (target_thread_handle): Define.
808 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
810 (thread_db_thread_handle): New function.
812 2017-09-21 Kevin Buettner <kevinb@redhat.com>
814 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
815 * linux-low.h (thread_db_notice_clone): Declare.
816 * thread-db.c (thread_db_notice_clone): New function.
818 2017-09-21 Pedro Alves <palves@redhat.com>
820 * server.c (gdb_read_memory, handle_status, process_serial_event)
821 (handle_serial_event, handle_target_event): Adjust to
822 set_desired_thread prototype change.
823 * target.c (set_desired_thread): Remove 'use_general' parameter
825 * target.h (set_desired_thread): Remove 'use_general' parameter.
827 2017-09-20 Tom Tromey <tom@tromey.com>
829 * target.c (target_terminal::terminal_state): Define.
830 (target_terminal::init): Rename from target_terminal_init.
831 (target_terminal::inferior): Rename from
832 target_terminal_inferior.
833 (target_terminal::ours): Rename from target_terminal_ours.
834 (target_terminal::ours_for_output, target_terminal::info): New.
836 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
838 * server.c (accumulate_file_name_length): Remove.
839 (emit_dll_description): Adjust to std::string change.
840 (handle_qxfer_libraries): Use std::string to hold document.
842 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
844 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
845 return type of xml_escape_text.
846 * server.c (emit_dll_description): Likewise.
848 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
850 * server.c (captured_main): Accept argument for --selftest.
851 Update run_tests call.
852 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
853 when registering selftests.
855 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
857 * regcache.c (get_thread_regcache): Update code to use "std::vector"
858 instead of "VEC" for "target_desc.reg_defs".
859 (regcache_cpy): Likewise.
860 (registers_to_string): Likewise.
861 (registers_from_string): Likewise.
862 (find_regno): Likewise.
863 (supply_regblock): Likewise.
864 (regcache_raw_read_unsigned): Likewise.
865 * tdesc.c (init_target_desc): Likewise.
866 (tdesc_create_reg): Likewise.
867 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
868 (struct target_desc) <reg_defs>: Convert to "std::vector".
869 (target_desc): Do not initialize "reg_defs".
870 (~target_desc): Update code to use "std::vector" instead of "VEC"
871 for "target_desc.reg_defs".
872 (operator==): Likewise.
874 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
876 * inferiors.h (thread_to_gdb_id): Remove.
877 * inferiors.c (thread_to_gdb_id): Remove.
878 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
879 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
880 lynx_store_registers, lynx_read_memory, lynx_write_memory):
882 * nto-low.c (nto_fetch_registers, nto_store_registers,
883 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
885 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
887 * inferiors.h (gdb_id_to_thread_id): Remove.
888 * inferiors.c (gdb_id_to_thread_id): Remove.
889 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
890 removal. Move pid declaration closer to where it's used.
892 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
894 * server.c (handle_detach): New function.
895 (process_serial_event): Move code out, call handle_detach.
897 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
899 * server.c (require_running): Rename to ...
900 (require_running_or_return): ... this ...
901 (require_running_or_break): ... and this.
902 (handle_query, process_serial_event): Adjust.
904 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
906 * linux-low.c (linux_set_resume_request): Remove unused
909 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
911 * server.c (first_thread_of): Remove.
912 (process_serial_event): Replace usage of first_thread_of with
913 find_any_thread_of_pid.
914 * tracepoint.c (same_process_p): Remove.
915 (gdb_agent_about_to_close): Replace usage of same_process_p with
916 find_any_thread_of_pid.
917 * linux-x86-low.c (same_process_callback): Remove.
918 (x86_arch_setup_process_callback): Replace usage of
919 same_process_callback with find_any_thread_of_pid.
920 * thread-db.c (any_thread_of): Remove.
921 (switch_to_process): Replace usage of any_thread_of with
922 find_any_thread_of_pid.
923 * inferiors.c (thread_pid_matches_callback): Remove.
924 (find_thread_process): Adjust to use find_any_thread_of_pid.
926 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
928 * regcache.c (get_thread_regcache): Guard calls to "memset"
931 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
933 * linux-low.c (handle_extended_wait): Use
934 "allocate_target_description" instead of "XNEW".
935 * linux-x86-low.c (initialize_low_arch): Likewise.
937 2017-09-05 Yao Qi <yao.qi@linaro.org>
939 * configure.srv (srv_i386_regobj): Remove.
940 (srv_amd64_regobj): Remove.
941 (srv_regobj): Set it to "" for x86 non-linux targets.
942 * linux-x86-tdesc.c (i386_linux_read_description):
943 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
944 (init_registers_i386): Remove the declaration.
945 (tdesc_i386): Remove the declaration.
946 (lynx_i386_arch_setup): Call i386_create_target_description.
947 * nto-x86-low.c: Likewise.
948 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
949 [!__x86_64__]: include arch/i386.h.
950 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
952 2017-09-05 Yao Qi <yao.qi@linaro.org>
954 * configure.srv (srv_amd64_linux_xmlfiles): Remove
955 i386/amd64-XXX-linux from it.
957 2017-09-05 Yao Qi <yao.qi@linaro.org>
959 * configure.srv: Empty srv_amd64_linux_regobj if $development is
961 (ipa_amd64_linux_regobj): Remove.
962 (ipa_x32_linux_regobj): Remove.
964 2017-09-05 Yao Qi <yao.qi@linaro.org>
966 * Makefile.in (arch-amd64.o): New rule.
967 * configure.srv: Append arch-amd64.o.
968 * linux-amd64-ipa.c: Include common/x86-xstate.h.
969 (get_ipa_tdesc): Call amd64_linux_read_description.
970 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
971 and init_registers_amd64_XXX.
972 * linux-x86-low.c (x86_linux_read_description): Call
973 amd64_linux_read_description.
974 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
975 (initialize_low_arch): Don't call init_registers_x32_XXX and
976 init_registers_amd64_XXX.
977 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
979 [__x86_64__] (amd64_tdesc_test): New function.
980 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
981 and init_registers_amd64_XXX.
982 * linux-x86-tdesc.c: Include arch/amd64.h.
983 (xcr0_to_tdesc_idx): New function.
984 (i386_linux_read_description): New function.
985 (amd64_get_ipa_tdesc_idx): New function.
986 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
987 (amd64_get_ipa_tdesc): Declare.
989 2017-09-05 Yao Qi <yao.qi@linaro.org>
991 * configure.srv (srv_i386_linux_xmlfiles): Remove
992 i386/i386-XXX-linux.xml from it.
994 2017-09-05 Yao Qi <yao.qi@linaro.org>
996 * configure.srv: Set srv_i386_linux_regobj empty if $development
998 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
999 initialize_low_tdesc.
1000 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1001 with #if initialize_low_tdesc.
1002 * linux-x86-tdesc-selftest.c: New file.
1003 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1005 2017-09-05 Yao Qi <yao.qi@linaro.org>
1007 * Makefile.in (arch-i386.o): New rule.
1008 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1009 (x86_64-*-linux*): Likewise.
1010 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1011 include arch/i386.h.
1012 (i386_linux_read_description): Remove code and call
1013 i386_create_target_description.
1014 * tdesc.c (allocate_target_description): New function.
1015 * tdesc.h (set_tdesc_architecture): Remove declaration.
1016 (set_tdesc_osabi): Likewise.
1018 2017-09-05 Yao Qi <yao.qi@linaro.org>
1020 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1021 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1022 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1024 * server.c (get_features_xml): Call tdesc_get_features_xml.
1025 * tdesc.c (set_tdesc_architecture): New function.
1026 (set_tdesc_osabi): New function.
1027 (tdesc_get_features_xml): New function.
1028 (tdesc_create_feature): Add an argument.
1029 * tdesc.h (struct target_desc) <features>: New field.
1030 <arch, osabi>: New field.
1031 (~target_desc): xfree features, arch, and osabi.
1032 (target_desc::oerator==): Don't compare .xmltarget.
1033 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1034 (set_tdesc_osabi): Likewise.
1035 (tdesc_get_features_xml): Likewise.
1037 2017-09-05 Yao Qi <yao.qi@linaro.org>
1039 * linux-x86-tdesc.c: Include selftest.h.
1040 (i386_tdesc_test): New function.
1041 (initialize_low_tdesc): Call selftests::register_test.
1042 * tdesc.h: Include regdef.h.
1043 (target_desc): Override operator == and !=.
1045 2017-09-05 Yao Qi <yao.qi@linaro.org>
1047 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1048 (ipa_obj): Likewise.
1049 * linux-i386-ipa.c: Include common/x86-xstate.h
1050 (get_ipa_tdesc): Call i386_linux_read_description.
1051 (initialize_low_tracepoint): Don't call init_registers_XXX
1052 functions, call initialize_low_tdesc instead.
1053 * linux-x86-low.c (x86_linux_read_description): Call
1054 i386_linux_read_description.
1055 (initialize_low_arch): Don't call init_registers_i386_XXX
1056 functions, call initialize_low_tdesc.
1057 * linux-x86-tdesc.c: New file.
1058 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1059 (i386_get_ipa_tdesc_idx): Declare.
1060 (i386_get_ipa_tdesc): Declare.
1061 (initialize_low_tdesc): Declare.
1063 2017-09-05 Yao Qi <yao.qi@linaro.org>
1065 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1068 2017-09-05 Yao Qi <yao.qi@linaro.org>
1070 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1071 * regcache.c (get_thread_regcache): Use VEC_length.
1072 (init_register_cache): Likewise.
1073 (regcache_cpy): Likewise.
1074 (registers_to_string): Iterate reg_defs via VEC_iterate.
1075 (find_regno): Likewise.
1076 (find_register_by_number): Use VEC_index.
1077 (register_size): Call find_register_by_number.
1078 (register_data): Call find_register_by_number.
1079 (supply_regblock): Use VEC_length.
1080 (regcache_raw_read_unsigned): Likewise.
1081 * tdesc.c (init_target_desc): Iterate reg_defs via
1083 (default_description): Update initializer.
1084 (copy_target_description): Don't update field num_registers.
1085 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1086 <num_registers>: Remove.
1088 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1090 * Makefile.in (.SECONDARY): Define target.
1092 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1094 * linux-low.c (linux_wait_1): Adjust.
1095 * server.c (queue_stop_reply_callback): Adjust.
1097 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1099 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1100 QEnvironmentUnset and QEnvironmentReset packets.
1101 (handle_query): Inform remote that QEnvironmentHexEncoded,
1102 QEnvironmentUnset and QEnvironmentReset are supported.
1104 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1106 * inferiors.h (inferior_target_data): Rename to ...
1107 (thread_target_data): ... this.
1108 (inferior_regcache_data): Rename to ...
1109 (thread_regcache_data): ... this.
1110 (set_inferior_regcache_data): Rename to ...
1111 (set_thread_regcache_data): ... this.
1112 * inferiors.c (inferior_target_data): Rename to ...
1113 (thread_target_data): ... this.
1114 (inferior_regcache_data): Rename to ...
1115 (thread_regcache_data): ... this.
1116 (set_inferior_regcache_data): Rename to ...
1117 (set_thread_regcache_data): ... this.
1118 (free_one_thread): Update.
1119 * linux-low.h (get_thread_lwp): Update.
1120 * regcache.c (get_thread_regcache): Update.
1121 (regcache_invalidate_thread): Update.
1122 (free_register_cache_thread): Update.
1123 * win32-i386-low.c (update_debug_registers_callback): Update.
1124 (win32_get_current_dr): Update.
1125 * win32-low.c (thread_rec): Update.
1126 (delete_thread_info): Update.
1127 (continue_one_thread): Update.
1128 (suspend_one_thread): Update.
1130 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1132 * inferiors.c (set_inferior_target_data): Remove.
1133 * inferiors.h (set_inferior_target_data): Remove.
1135 2017-08-18 Yao Qi <yao.qi@linaro.org>
1137 * Makefile.in (OBS): Add selftest.o.
1138 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1139 * configure, config.in: Re-generated.
1140 * server.c: Include common/sefltest.h.
1141 (captured_main): Handle option --selftest.
1143 2017-08-09 Yao Qi <yao.qi@linaro.org>
1145 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1146 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1147 i386-avx-mpx.o and i386-mmx.o.
1148 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1149 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1150 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1151 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1152 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1153 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1154 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1155 i386/amd64-avx-mpx.xml.
1157 2017-08-09 Yao Qi <yao.qi@linaro.org>
1159 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1160 and x32-avx-avx512.o.
1161 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1162 i386/x32-avx-avx512.xml.
1164 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1166 * tracepoint.h (enum class fast_tpoint_collect_result): New
1168 (fast_tracepoint_collecting): Change return type to
1169 fast_tpoint_collect_result.
1170 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1171 * linux-low.h: Include tracepoint.h.
1172 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1173 fast_tpoint_collect_result.
1174 * linux-low.c (handle_tracepoints): Adjust.
1175 (linux_fast_tracepoint_collecting): Change return type to
1176 fast_tpoint_collect_result.
1177 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1178 linux_wait_1, stuck_in_jump_pad_callback,
1179 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1180 proceed_one_lwp): Adjust to type change.
1182 2017-07-10 Yao Qi <yao.qi@linaro.org>
1184 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1186 2017-06-29 Yao Qi <yao.qi@linaro.org>
1188 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1190 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1192 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1194 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1196 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1198 * linux-low.c (linux_create_inferior): Adjust code to access the
1199 environment information via 'gdb_environ' class.
1200 * lynx-low.c (lynx_create_inferior): Likewise.
1201 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1202 (get_environ): Return a pointer to 'our_environ'.
1203 (captured_main): Initialize 'our_environ'.
1204 * server.h (get_environ): Adjust prototype.
1205 * spu-low.c (spu_create_inferior): Adjust code to access the
1206 environment information via 'gdb_environ' class.
1208 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1210 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1211 usage of "register" keyword.
1213 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1215 * configure: Re-generate.
1217 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1219 * configure: Re-generate.
1221 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1223 * Makefile.in (COMPILE.pre): Add "-x c++".
1225 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1227 * fork-child.c: Conditionally include <signal.h>.
1229 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1231 * server.c (handle_general_set): Handle new packet
1232 "QStartupWithShell".
1233 (handle_query): Add "QStartupWithShell" to the list of supported
1235 (gdbserver_usage): Add help text explaining the
1236 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1238 (captured_main): Recognize and act upon the presence of the new
1241 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1242 Pedro Alves <palves@redhat.com>
1244 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1245 * configure: Regenerate.
1246 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1248 (i[34567]86-*-lynxos*): Likewise.
1249 (spu*-*-*): Likewise.
1250 * fork-child.c: New file.
1251 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1253 (linux_ptrace_fun): New function.
1254 (linux_create_inferior): Adjust function prototype to reflect
1255 change on "target.h". Adjust function code to use
1257 (linux_request_interrupt): Delete "signal_pid".
1258 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1259 (lynx_ptrace_fun): New function.
1260 (lynx_create_inferior): Adjust function prototype to reflect
1261 change on "target.h". Adjust function code to use
1263 * nto-low.c (nto_create_inferior): Adjust function prototype and
1264 code to reflect change on "target.h". Update comments.
1265 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1266 "common-terminal.h" and "environ.h".
1267 (terminal_fd): Moved to fork-child.c.
1268 (old_foreground_pgrp): Likewise.
1269 (restore_old_foreground_pgrp): Likewise.
1270 (last_status): Make it global.
1271 (last_ptid): Likewise.
1272 (our_environ): New variable.
1273 (startup_with_shell): Likewise.
1274 (program_name): Likewise.
1275 (program_argv): Rename to...
1276 (program_args): ...this.
1277 (wrapper_argv): New variable.
1278 (start_inferior): Delete function.
1279 (get_exec_wrapper): New function.
1280 (get_exec_file): Likewise.
1281 (get_environ): Likewise.
1282 (prefork_hook): Likewise.
1283 (post_fork_inferior): Likewise.
1284 (postfork_hook): Likewise.
1285 (postfork_child_hook): Likewise.
1286 (handle_v_run): Update code to deal with arguments coming from the
1287 remote host. Update calls from "start_inferior" to
1289 (captured_main): Likewise. Initialize environment variable. Call
1291 * server.h (post_fork_inferior): New prototype.
1292 (get_environ): Likewise.
1293 (last_status): Declare.
1294 (last_ptid): Likewise.
1295 (signal_pid): Likewise.
1296 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1297 (spu_ptrace_fun): New function.
1298 (spu_create_inferior): Adjust function prototype to reflect change
1299 on "target.h". Adjust function code to use "fork_inferior".
1300 * target.c (target_terminal_init): New function.
1301 (target_terminal_inferior): Likewise.
1302 (target_terminal_ours): Likewise.
1303 * target.h: Include <vector>.
1304 (struct target_ops) <create_inferior>: Update prototype.
1305 (create_inferior): Update macro.
1306 * utils.c (gdb_flush_out_err): New function.
1307 * win32-low.c (win32_create_inferior): Adjust function prototype
1308 and code to reflect change on "target.h".
1310 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1312 * inferiors.c (switch_to_thread): New function.
1314 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1316 * Makefile.in (SFILE): Add "common/job-control.c".
1317 (OBS): Add "job-control.o".
1319 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1321 * Makefile: Remove "@host_makefile_frag@".
1323 2017-05-05 Pedro Alves <palves@redhat.com>
1325 * configure: Regenerate.
1327 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1329 * configure: Regenerate.
1331 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1333 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1334 software_single_step change of return type to
1335 std::vector<CORE_ADDR>.
1336 * linux-low.c (install_software_single_step_breakpoints):
1338 * linux-low.h (install_software_single_step_breakpoints):
1341 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1343 * remote-utils.c: Include "gdb_termios.h" instead of
1345 * terminal.h: Delete file.
1347 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1349 * server.c: Include <vector>.
1350 <program_argv, wrapper_argv>: Convert to std::vector.
1351 (start_inferior): Rewrite function to use C++.
1352 (handle_v_run): Likewise. Update code that calculates the argv
1353 based on the vRun packet; use C++.
1354 (captured_main): Likewise.
1356 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1358 * server.c (handle_v_cont): Initialize thread_resume::thread
1361 2017-04-05 Pedro Alves <palves@redhat.com>
1363 * configure: Regenerate.
1365 2017-04-05 Pedro Alves <palves@redhat.com>
1367 * gdbreplay.c (sync_error): Constify.
1368 * linux-x86-low.c (push_opcode): Constify.
1370 2017-04-05 Pedro Alves <palves@redhat.com>
1372 * win32-low.c (get_child_debug_event)
1373 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1374 Report TARGET_WAITKIND_SPURIOUS instead.
1376 2017-04-05 Pedro Alves <palves@redhat.com>
1378 * remote-utils.c (remote_prepare, remote_open): Constify.
1379 * remote-utils.h (remote_prepare, remote_open): Constify.
1380 * server.c (captured_main): Constify 'port' handling.
1382 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1384 * Makefile.in (clean): Clear .deps.
1386 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1388 * .gitignore: Remove generated files, replace with wildcard.
1389 * (clean): Replace removal of generated files with wildcard.
1390 (version.c): Replace with...
1391 (version-generated.c): ...this.
1392 (xml-builtin.c): Replace with...
1393 (xml-builtin-generated.c): ...this.
1394 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1395 (%.c: *regformats*): Replace with...
1396 (%-generated.c: *regformats*): ...this.
1398 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1400 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1401 (xtensa_fill_gregset): Call collect_register_by_name for
1403 (xtensa_store_gregset): Call supply_register_by_name for
1406 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1408 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1409 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1410 (xtensa_store_gregset): Call supply_register for all registers in
1411 a0_regnum..a0_regnum + C0_NREGS range.
1413 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1415 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1416 (ax-ipa.o: ax.c): Remove.
1417 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1418 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1419 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1420 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1421 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1423 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1425 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1426 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1427 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1428 (errors-ipa.o: ../common/errors.c): Remove.
1429 (format-ipa.o: ../common/format.c): Remove.
1430 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1432 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1434 * Makefile.in (%-ipa.o: %.c): New rule.
1435 (tracepoint-ipa.o: tracepoint.c): Remove.
1436 (utils-ipa.o: utils.c): Remove.
1437 (remote-utils-ipa.o: remote-utils.c): Remove.
1438 (regcache-ipa.o: regcache.c): Remove.
1439 (i386-linux-ipa.o: i386-linux.c): Remove.
1440 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1441 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1442 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1443 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1444 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1445 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1446 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1447 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1448 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1449 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1450 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1451 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1452 (aarch64-ipa.o: aarch64.c): Remove.
1453 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1454 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1455 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1456 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1457 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1458 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1459 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1460 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1461 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1462 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1463 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1464 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1465 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1466 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1467 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1468 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1469 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1470 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1471 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1472 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1473 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1474 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1475 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1476 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1477 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1478 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1479 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1480 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1481 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1482 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1483 (tdesc-ipa.o: tdesc.c): Remove.
1484 (x32-linux-ipa.o: x32-linux.c): Remove.
1485 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1486 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1488 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1490 * Makefile.in (%.o: ../arch/%.c): New rule.
1491 (arm.o: ../arch/arm.c): Remove.
1492 (arm-linux.o: ../arch/arm-linux.c): Remove.
1493 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1494 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1496 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1498 * Makefile.in (%.o: ../nat/%.c): New rule.
1499 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1500 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1501 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1502 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1503 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1504 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1505 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1506 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1507 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1508 (linux-personality.o: ../nat/linux-personality.c): Remove.
1509 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1510 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1511 (x86-linux.o: ../nat/x86-linux.c): Remove.
1512 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1513 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1515 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1517 * Makefile.in (%.o: ../common/%.c): New rule.
1518 (signals.o: ../common/signals.c): Remove.
1519 (print-utils.o: ../common/print-utils.c): Remove.
1520 (rsp-low.o: ../common/rsp-low.c): Remove.
1521 (common-utils.o: ../common/common-utils.c): Remove.
1522 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1523 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1524 (vec.o: ../common/vec.c): Remove.
1525 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1526 (xml-utils.o: ../common/xml-utils.c): Remove.
1527 (ptid.o: ../common/ptid.c): Remove.
1528 (buffer.o: ../common/buffer.c): Remove.
1529 (format.o: ../common/format.c): Remove.
1530 (filestuff.o: ../common/filestuff.c): Remove.
1531 (agent.o: ../common/agent.c): Remove.
1532 (errors.o: ../common/errors.c): Remove.
1533 (environ.o: ../common/environ.c): Remove.
1534 (common-debug.o: ../common/common-debug.c): Remove.
1535 (cleanups.o: ../common/cleanups.c): Remove.
1536 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1537 (fileio.o: ../common/fileio.c): Remove.
1538 (common-regcache.o: ../common/common-regcache.c): Remove.
1539 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1540 (new-op.o: ../common/new-op.c): Remove.
1541 (btrace-common.o: ../common/btrace-common.c): Remove.
1543 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1545 * Makefile.in (%.o: ../target/%.c): New rule.
1546 (waitstatus.o: ../target/waitstatus.c): Remove.
1548 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1551 (%.c: ../regformats/%.dat,
1552 (%.c: ../regformats/arm/%.dat,
1553 (%.c: ../regformats/i386/%.dat,
1554 (%.c: ../regformats/rs6000/%.dat): New rules.
1555 (aarch64.c): Remove.
1556 (reg-arm.c): Remove.
1557 (arm-with-iwmmxt.c): Remove.
1558 (arm-with-vfpv2.c): Remove.
1559 (arm-with-vfpv3.c): Remove.
1560 (arm-with-neon.c): Remove.
1561 (reg-bfin.c): Remove.
1562 (reg-cris.c): Remove.
1563 (reg-crisv32.c): Remove.
1565 (i386-linux.c): Remove.
1566 (i386-avx.c): Remove.
1567 (i386-avx-linux.c): Remove.
1568 (i386-avx-avx512.c): Remove.
1569 (i386-avx-avx512-linux.c): Remove.
1570 (i386-mpx.c): Remove.
1571 (i386-mpx-linux.c): Remove.
1572 (i386-avx-mpx-avx512-pku.c): Remove.
1573 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1574 (i386-avx-mpx.c): Remove.
1575 (i386-avx-mpx-linux.c): Remove.
1576 (i386-mmx.c): Remove.
1577 (i386-mmx-linux.c): Remove.
1578 (reg-ia64.c): Remove.
1579 (reg-m32r.c): Remove.
1580 (reg-m68k.c): Remove.
1582 (mips-linux.c): Remove.
1583 (mips-dsp-linux.c): Remove.
1584 (mips64-linux.c): Remove.
1585 (mips64-dsp-linux.c): Remove.
1586 (nios2-linux.c): Remove.
1587 (powerpc-32.c): Remove.
1588 (powerpc-32l.c): Remove.
1589 (powerpc-altivec32l.c): Remove.
1590 (powerpc-cell32l.c): Remove.
1591 (powerpc-vsx32l.c): Remove.
1592 (powerpc-isa205-32l.c): Remove.
1593 (powerpc-isa205-altivec32l.c): Remove.
1594 (powerpc-isa205-vsx32l.c): Remove.
1595 (powerpc-e500l.c): Remove.
1596 (powerpc-64l.c): Remove.
1597 (powerpc-altivec64l.c): Remove.
1598 (powerpc-cell64l.c): Remove.
1599 (powerpc-vsx64l.c): Remove.
1600 (powerpc-isa205-64l.c): Remove.
1601 (powerpc-isa205-altivec64l.c): Remove.
1602 (powerpc-isa205-vsx64l.c): Remove.
1603 (s390-linux32.c): Remove.
1604 (s390-linux32v1.c): Remove.
1605 (s390-linux32v2.c): Remove.
1606 (s390-linux64.c): Remove.
1607 (s390-linux64v1.c): Remove.
1608 (s390-linux64v2.c): Remove.
1609 (s390-te-linux64.c): Remove.
1610 (s390-vx-linux64.c): Remove.
1611 (s390-tevx-linux64.c): Remove.
1612 (s390x-linux64.c): Remove.
1613 (s390x-linux64v1.c): Remove.
1614 (s390x-linux64v2.c): Remove.
1615 (s390x-te-linux64.c): Remove.
1616 (s390x-vx-linux64.c): Remove.
1617 (s390x-tevx-linux64.c): Remove.
1618 (tic6x-c64xp-linux.c): Remove.
1619 (tic6x-c64x-linux.c): Remove.
1620 (tic6x-c62x-linux.c): Remove.
1622 (reg-sparc64.c): Remove.
1623 (reg-spu.c): Remove.
1625 (amd64-linux.c): Remove.
1626 (amd64-avx.c): Remove.
1627 (amd64-avx-linux.c): Remove.
1628 (amd64-avx-avx512.c): Remove.
1629 (amd64-avx-avx512-linux.c): Remove.
1630 (amd64-mpx.c): Remove.
1631 (amd64-mpx-linux.c): Remove.
1632 (amd64-avx-mpx-avx512-pku.c): Remove.
1633 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1634 (amd64-avx-mpx.c): Remove.
1635 (amd64-avx-mpx-linux.c): Remove.
1637 (x32-linux.c): Remove.
1638 (x32-avx.c): Remove.
1639 (x32-avx-linux.c): Remove.
1640 (x32-avx-avx512.c): Remove.
1641 (x32-avx-avx512-linux.c): Remove.
1642 (reg-xtensa.c): Remove.
1643 (reg-tilegx.c): Remove.
1644 (reg-tilegx32.c): Remove.
1646 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1648 * Makefile.in (SFILES): Add "common/environ.c".
1649 (OBJS): Add "common/environ.h".
1651 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1653 * configure.ac: Check if the fs_base and gs_base members of
1654 `struct user_regs_struct' exist.
1655 * config.in: Regenerated.
1656 * configure: Likewise.
1658 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1660 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1662 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1663 (get_next_pcs_syscall_next_pc): Likewise.
1665 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1667 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1668 * nto-x86-low.c: Likewise.
1670 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1672 * Makefile.in: Include disable-implicit-rules.mk.
1674 2016-11-23 Pedro Alves <palves@redhat.com>
1676 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1677 (debug_vprintf): Use std::chrono::steady_clock instead of
1678 gettimeofday. Use '.' instead of ':'.
1679 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1680 (get_timestamp): Use std::chrono::steady_clock instead of
1683 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1685 * Makefile.in: Fix whitespace formatting.
1687 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1689 * Makefile.in (SFILES, OBS): Flatten list and order
1692 2016-11-23 Pedro Alves <palves@redhat.com>
1694 * event-loop.c (handle_file_event): Use warning.
1695 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1696 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1699 2016-11-23 Pedro Alves <palves@redhat.com>
1701 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1703 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1704 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1705 debug_printf and debug_flush for debug output.
1706 * server.c (handle_general_set): Likewise.
1707 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1710 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1712 * Makefile.in (.c.o): Replace rule with ...
1713 (%.o: %.c): ... this one.
1715 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1717 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1718 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1720 * configure.ac: Remove checks for the make program.
1721 * configure: Re-generate.
1723 2016-10-28 Pedro Alves <palves@redhat.com>
1725 * Makefile.in (CXX_DIALECT): Get from configure.
1726 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1727 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1728 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1729 * config.in: Regenerate.
1730 * configure: Regenerate.
1732 2016-10-27 Yao Qi <yao.qi@linaro.org>
1734 * linux-low.c (linux_supports_range_stepping): Return true if
1735 can_software_single_step return true.
1737 2016-10-27 Yao Qi <yao.qi@linaro.org>
1739 * inferiors.c (find_inferior_in_random): New function.
1740 * inferiors.h (find_inferior_in_random): Declare.
1741 * linux-low.c (linux_wait_for_event_filtered): Call
1742 find_inferior_in_random instead of find_inferior.
1744 2016-10-27 Yao Qi <yao.qi@linaro.org>
1746 * linux-low.c (linux_wait_1): If single-step breakpoints are
1747 inserted, remove them.
1749 2016-10-26 Pedro Alves <palves@redhat.com>
1751 * linux-low.c (handle_extended_wait): Link parent/child fork
1753 (linux_wait_1): Unlink them.
1754 (linux_set_resume_request): Ignore resume requests for
1755 already-resumed and unhandled fork child threads.
1756 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1757 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1759 (handle_v_requests) <vCont>: Don't call require_running.
1760 * server.h (in_queued_stop_replies): New declaration.
1762 2016-10-24 Yao Qi <yao.qi@linaro.org>
1765 * linux-aarch64-low.c (append_insns): Cast the return value to
1768 2016-10-10 Yao Qi <yao.qi@linaro.org>
1770 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1772 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1774 * target.c (target_supports_multi_process): New function, moved
1776 * target.h (target_supports_multi_process): ... here. Remove
1779 2016-10-05 Tom Tromey <tom@tromey.com>
1782 * tracepoint.c (handle_tracepoint_bkpts): Check
1783 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1785 2016-10-05 Yao Qi <yao.qi@linaro.org>
1787 * configure.srv: Update the path of arm-*.xml files.
1789 2016-10-05 Terry Guo <terry.guo@arm.com>
1790 Yao Qi <yao.qi@linaro.org>
1792 * Makefile.in: Adjust the path of rules.
1793 * configure.srv: Update the path of xml files.
1794 * regformats/arm-with-iwmmxt.dat: Regenerated.
1795 * regformats/arm-with-neon.dat: Likewise.
1796 * regformats/arm-with-vfpv2.dat: Likewise.
1797 * regformats/arm-with-vfpv3.dat Likewise.
1799 2016-09-30 Yao Qi <yao.qi@linaro.org>
1802 * target.c (target_stop_and_wait): Don't call
1803 target_continue_no_signal, use resume_stop instead.
1805 2016-09-26 Yao Qi <yao.qi@linaro.org>
1807 * linux-low.c (linux_wait_1): Call debug_exit.
1809 2016-09-23 Pedro Alves <palves@redhat.com>
1811 * Makefile.in (SFILES): Add common/new-op.c.
1812 (OBS): Add common/new-op.o.
1813 (new-op.o): New rule.
1815 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1817 * .gitinore: Ignore more files.
1819 2016-09-21 Yao Qi <yao.qi@linaro.org>
1821 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1824 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1826 * server.c (start_inferior): Call target_mourn_inferior instead of
1827 mourn_inferior; pass ptid_t argument to it.
1829 (handle_target_event): Likewise.
1830 * target.c (target_mourn_inferior): New function.
1831 * target.h (mourn_inferior): Delete macro.
1833 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1835 * linux-low.c (lwp_is_stepping): New function.
1837 2016-09-06 Carl Love <cel@us.ibm.com>
1839 * server.c (start_inferior): Fixed comment, requested comment change
1840 didn't get updated correctly. Removed reference to ptrace () call as
1841 it is only true on Linux systems.
1843 2016-09-06 Carl Love <cel@us.ibm.com>
1845 * server.c (start_inferior): Do not call
1846 function target_post_create_inferior () if the
1847 inferior process has already exited.
1849 2016-09-05 Pedro Alves <palves@redhat.com>
1851 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1852 (COMPILE.pre, CC_LD): Use CXX directly.
1853 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1854 * acinclude.m4: Don't include build-with-cxx.m4.
1855 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1856 * configure: Regenerate.
1858 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1861 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1862 call writing data to own_buf.
1864 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1866 * target.c (mywait): Call target_wait instead of
1868 (target_wait): New function.
1870 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1872 * server.c (start_inferior): New variable 'ptid'. Replace calls
1873 to the_target->resume by target_continue{,_no_signal}, depending
1875 * target.c (target_stop_and_wait): Call target_continue_no_signal
1876 instead of the_target->resume.
1877 (target_continue): New function.
1879 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1881 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1883 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1886 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1888 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1889 * linux-arm-low.c (ps_get_thread_area): Likewise.
1890 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1891 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1892 * linux-mips-low.c (ps_get_thread_area): Likewise.
1893 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1894 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1895 * linux-x86-low.c (ps_get_thread_area): Likewise.
1896 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1898 2016-08-19 Pedro Alves <palves@redhat.com>
1900 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1902 2016-08-19 Pedro Alves <palves@redhat.com>
1904 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1905 comment. Use memcpy instead of casting through unsigned long.
1907 2016-08-19 Pedro Alves <palves@redhat.com>
1909 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1910 allocating around 0x80000000.
1912 2016-08-19 Pedro Alves <palves@redhat.com>
1915 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1916 (x32-avx512-linux-ipa.o): New rules.
1917 * configure.ac (x86_64-*-linux*): New x32 check.
1918 * configure.srv (ipa_x32_linux_regobj): New.
1919 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1920 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1922 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1924 * configure: Regenerate.
1926 2016-08-09 Pedro Alves <palves@redhat.com>
1929 * Makefile.in (OBS): Add signals-state-save-restore.o.
1930 (signals-state-save-restore.o): New rule.
1931 * config.in: Regenerate.
1932 * configure: Regenerate.
1933 * linux-low.c: Include "signals-state-save-restore.h".
1934 (linux_create_inferior): Call
1935 restore_original_signals_state.
1936 * server.c: Include "dispositions-save-restore.h".
1937 (captured_main): Call save_original_signals_state.
1939 2016-08-05 Pedro Alves <palves@redhat.com>
1941 * configure: Regenerate.
1943 2016-08-04 Yao Qi <yao.qi@linaro.org>
1945 * linux-low.c (regsets_fetch_inferior_registers): Check
1946 errno is ESRCH or not.
1948 2016-08-02 Yao Qi <yao.qi@linaro.org>
1950 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1951 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1952 (thread_db_load_search): Update.
1953 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1954 td_ta_set_event and td_ta_event_getmsg.
1956 2016-07-26 Pedro Alves <palves@redhat.com>
1959 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1960 of unsigned long for 64-bit registers and use uint32_t instead of
1961 unsigned int for 32-bit registers.
1963 2016-07-26 Pedro Alves <palves@redhat.com>
1965 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1968 2016-07-21 Tom Tromey <tom@tromey.com>
1970 * configure: Rebuild.
1972 2016-07-21 Yao Qi <yao.qi@linaro.org>
1974 * mem-break.c (find_gdb_breakpoint): Cast bp to
1975 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1977 2016-07-21 Yao Qi <yao.qi@linaro.org>
1979 * server.c (handle_v_requests): Support s and S actions
1980 if target_supports_software_single_step return true.
1982 2016-07-21 Yao Qi <yao.qi@linaro.org>
1984 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1985 is resume_step, call maybe_hw_step.
1986 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1988 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1990 (proceed_one_lwp): If resume request is resume_step, install
1991 reinsert breakpoints and call maybe_hw_step.
1993 2016-07-21 Yao Qi <yao.qi@linaro.org>
1995 * linux-low.c (proceed_one_lwp): Declare.
1996 (linux_resume_one_thread): Remove local variable 'step'.
1997 Lift code enqueue signal. Call proceed_one_lwp instead of
1998 linux_resume_one_lwp.
2000 2016-07-21 Yao Qi <yao.qi@linaro.org>
2002 * linux-low.c (linux_resume_one_thread): Call
2003 enqueue_pending_signal.
2005 2016-07-21 Yao Qi <yao.qi@linaro.org>
2007 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2008 * inferiors.c (do_restore_current_thread_cleanup): New function.
2009 (make_cleanup_restore_current_thread): Likewise.
2010 * linux-low.c (install_software_single_step_breakpoints): Call
2011 make_cleanup_restore_current_thread. Switch current_thread to
2014 2016-07-21 Yao Qi <yao.qi@linaro.org>
2016 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2017 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2018 (clone_one_breakpoint): Likewise.
2019 (delete_reinsert_breakpoints): Change parameter to thread.
2021 (has_reinsert_breakpoints): Likewise.
2022 (uninsert_reinsert_breakpoints): Likewise.
2023 (reinsert_reinsert_breakpoints): Likewise.
2024 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2025 (delete_reinsert_breakpoints): Likewise.
2026 (reinsert_reinsert_breakpoints): Likewise.
2027 (uninsert_reinsert_breakpoints): Likewise.
2028 (has_reinsert_breakpoints): Likewise.
2030 2016-07-21 Yao Qi <yao.qi@linaro.org>
2032 * inferiors.c (get_thread_process): Make parameter const.
2033 * inferiors.h (get_thread_process): Update declaration.
2034 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2035 Add new parameters child_thread and parent_thread. Callers
2037 * mem-break.h (clone_all_breakpoints): Update declaration.
2039 2016-07-21 Yao Qi <yao.qi@linaro.org>
2041 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2042 <command_list, handler>: Remove.
2043 (struct gdb_breakpoint): New.
2044 (struct other_breakpoint): New.
2045 (struct reinsert_breakpoint): New.
2046 (is_gdb_breakpoint): New function.
2047 (any_persistent_commands): Update command_list if
2048 is_gdb_breakpoint returns true.
2049 (set_breakpoint): Create breakpoints according to their types.
2050 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2051 (set_gdb_breakpoint_1): Likewise.
2052 (set_gdb_breakpoint): Likewise.
2053 (clear_breakpoint_conditions): Change parameter type to
2054 'struct gdb_breakpoint *'.
2055 (clear_breakpoint_commands): Likewise.
2056 (clear_breakpoint_conditions_and_commands): Likewise.
2057 (add_condition_to_breakpoint): Likewise.
2058 (add_breakpoint_condition): Likewise.
2059 (add_commands_to_breakpoint): Likewise.
2060 (check_breakpoints): Check other_breakpoint.
2061 (clone_one_breakpoint): Clone breakpopint according to its type.
2062 * mem-break.h (struct gdb_breakpoint): Declare.
2063 (set_gdb_breakpoint): Update declaration.
2064 (clear_breakpoint_conditions_and_commands): Likewise.
2065 (add_breakpoint_condition): Likewise.
2066 (add_breakpoint_commands): Likewise.
2067 * server.c (process_point_options): Change parameter type to
2068 'struct gdb_breakpoint *'.
2070 2016-07-21 Yao Qi <yao.qi@linaro.org>
2072 * mem-break.c (set_breakpoint_at): Rename it to ...
2073 (set_breakpoint_type_at): ... it.
2074 (set_breakpoint_at): Call set_breakpoint_type_at.
2075 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2076 * mem-break.h (set_breakpoint_at): Update comments.
2078 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2080 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2082 (nios2_store_gregset): Likewise.
2084 2016-07-01 Pedro Alves <palves@redhat.com>
2085 Antoine Tremblay <antoine.tremblay@ericsson.com>
2087 * linux-low.c: Change interface to take the target lwp_info
2088 pointer directly and return void. Handle detaching from a zombie
2090 (linux_detach_lwp_callback): New function.
2091 (linux_detach): Detach from the leader thread after detaching from
2094 2016-06-28 Yao Qi <yao.qi@linaro.org>
2096 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2097 for variable new_offset.
2098 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2099 (aarch64_ftrace_insn_reloc_cb): Likewise.
2100 (aarch64_ftrace_insn_reloc_tb): Likewise.
2101 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2102 PRIx64 instead of PRIx32.
2104 2016-06-28 Yao Qi <yao.qi@linaro.org>
2106 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2107 (the_low_target): Install arm_get_syscall_trapinfo.
2109 2016-06-28 Yao Qi <yao.qi@linaro.org>
2111 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2113 (the_low_target): Install aarch64_get_syscall_trapinfo.
2115 2016-06-28 Yao Qi <yao.qi@linaro.org>
2117 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2119 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2120 Remove parameter sysno.
2121 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2124 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2126 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2127 (s390_emit_ne_goto): Likewise.
2128 (s390_emit_lt_goto): Likewise.
2129 (s390_emit_le_goto): Likewise.
2130 (s390_emit_gt_goto): Likewise.
2131 (s390_emit_ge_goto): Likewise.
2132 (s390x_emit_eq_goto): Likewise.
2133 (s390x_emit_ne_goto): Likewise.
2134 (s390x_emit_lt_goto): Likewise.
2135 (s390x_emit_le_goto): Likewise.
2136 (s390x_emit_gt_goto): Likewise.
2137 (s390x_emit_ge_goto): Likewise.
2138 (s390_emit_ops_impl): Mark variable static.
2139 (s390x_emit_ops): Likewise.
2141 2016-06-17 Yao Qi <yao.qi@linaro.org>
2143 * linux-low.c (handle_extended_wait): Call
2144 uninsert_reinsert_breakpoints for the parent process. Remove
2145 reinsert breakpoints from the child process. Reinsert them to
2146 the parent process when vfork is done.
2147 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2148 (reinsert_reinsert_breakpoints): New function.
2149 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2150 (reinsert_reinsert_breakpoints): Declare.
2152 2016-06-17 Yao Qi <yao.qi@linaro.org>
2154 * linux-low.c (handle_extended_wait): If the parent is doing
2155 step-over, remove the reinsert breakpoints from the forked child.
2157 2016-06-17 Yao Qi <yao.qi@linaro.org>
2159 * linux-low.c (unsuspend_all_lwps): Declare.
2160 (linux_low_filter_event): If thread exited, call finish_step_over.
2161 If step-over is finished, unsuspend other threads.
2163 2016-06-17 Yao Qi <yao.qi@linaro.org>
2165 * linux-low.c (linux_resume_one_lwp_throw): Assert
2166 has_reinsert_breakpoints returns false.
2167 * mem-break.c (delete_disabled_breakpoints): Assert
2168 bp type isn't reinsert_breakpoint.
2170 2016-06-17 Yao Qi <yao.qi@linaro.org>
2172 * linux-low.c (maybe_hw_step): New function.
2173 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2174 (finish_step_over): Switch current_thread to lwp temporarily,
2175 and assert has_reinsert_breakpoints returns true.
2176 (proceed_one_lwp): Call maybe_hw_step.
2177 * mem-break.c (has_reinsert_breakpoints): New function.
2178 * mem-break.h (has_reinsert_breakpoints): Declare.
2180 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2182 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2184 2016-05-17 Yao Qi <yao.qi@linaro.org>
2186 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2187 instead of find_inferior.
2189 2016-05-05 Yao Qi <yao.qi@linaro.org>
2191 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2192 Initialize res to zero.
2194 2016-05-05 Yao Qi <yao.qi@linaro.org>
2196 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2199 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2201 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2202 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2203 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2205 2016-04-28 Par Olsson <par.olsson@windriver.com>
2206 Simon Marchi <simon.marchi@ericsson.com>
2208 * tracepoint.c (write_inferior_int8): New function.
2209 (cmd_qtenable_disable): Write enable flag using
2210 write_inferior_int8.
2212 2016-04-25 Yao Qi <yao.qi@linaro.org>
2214 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2215 (need_step_over_p): Return zero if the LWP has pending signals
2216 can be delivered on software single step target.
2218 2016-04-25 Yao Qi <yao.qi@linaro.org>
2220 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2221 return instead of error.
2223 2016-04-22 Yao Qi <yao.qi@linaro.org>
2225 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2228 2016-04-22 Yao Qi <yao.qi@linaro.org>
2230 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2231 signal when stepping over breakpoint with software single
2234 2016-04-21 Pedro Alves <palves@redhat.com>
2236 * linux-s390-low.c (s390_collect_ptrace_register)
2237 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2239 (s390_check_regset): Use void * instead of gdb_byte *.
2241 2016-04-20 Pedro Alves <palves@redhat.com>
2243 * configure: Renegerate.
2245 2016-04-20 Yao Qi <yao.qi@linaro.org>
2247 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2248 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2250 (arm_store_gregset): Likewise.
2252 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2254 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2255 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2256 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2257 (amd64-avx-mpx-linux.c): New rules.
2258 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2259 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2260 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2261 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2262 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2263 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2264 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2265 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2266 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2267 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2268 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2269 * linux-x86-low.c (x86_linux_read_description): Add case for
2270 X86_XSTATE_AVX_MPX_MASK.
2271 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2272 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2273 init_registers_i386_avx_mpx_linux.
2274 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2275 (initialize_low_tracepoint): Call
2276 init_registers_i386_avx_mpx_linux.
2277 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2278 (initialize_low_tracepoint): Call
2279 init_registers_amd64_avx_mpx_linux.
2280 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2281 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2282 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2285 2016-04-18 Pedro Alves <palves@redhat.com>
2287 * configure: Regenerate.
2289 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2291 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2292 (aarch64_emit_sub): Likewise.
2294 2016-04-12 Pedro Alves <palves@redhat.com>
2296 * utils.c (prepare_to_throw_exception): Delete.
2298 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2300 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2302 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2304 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2306 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2308 * linux-aarch64-ipa.c: Add <elf.h> include.
2309 * linux-ppc-ipa.c: Add <elf.h> include.
2310 * linux-s390-ipa.c: Add <elf.h> include.
2312 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2314 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2315 (get_raw_reg_ptr): Likewise.
2316 (get_trace_state_variable_value_ptr): Likewise.
2317 (set_trace_state_variable_value_ptr): Likewise.
2318 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2321 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2322 Marcin Kościelnicki <koriakin@0x04.net>
2325 * linux-ppc-low.c (emit_insns): New function.
2326 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2327 (ppc_emit_prologue): New function.
2328 (ppc_emit_epilogue): New function.
2329 (ppc_emit_add): New function.
2330 (ppc_emit_sub): New function.
2331 (ppc_emit_mul): New function.
2332 (ppc_emit_lsh): New function.
2333 (ppc_emit_rsh_signed): New function.
2334 (ppc_emit_rsh_unsigned): New function.
2335 (ppc_emit_ext): New function.
2336 (ppc_emit_zero_ext): New function.
2337 (ppc_emit_log_not): New function.
2338 (ppc_emit_bit_and): New function.
2339 (ppc_emit_bit_or): New function.
2340 (ppc_emit_bit_xor): New function.
2341 (ppc_emit_bit_not): New function.
2342 (ppc_emit_equal): New function.
2343 (ppc_emit_less_signed): New function.
2344 (ppc_emit_less_unsigned): New function.
2345 (ppc_emit_ref): New function.
2346 (ppc_emit_const): New function.
2347 (ppc_emit_reg): New function.
2348 (ppc_emit_pop): New function.
2349 (ppc_emit_stack_flush): New function.
2350 (ppc_emit_swap): New function.
2351 (ppc_emit_stack_adjust): New function.
2352 (ppc_emit_call): New function.
2353 (ppc_emit_int_call_1): New function.
2354 (ppc_emit_void_call_2): New function.
2355 (ppc_emit_if_goto): New function.
2356 (ppc_emit_goto): New function.
2357 (ppc_emit_eq_goto): New function.
2358 (ppc_emit_ne_goto): New function.
2359 (ppc_emit_lt_goto): New function.
2360 (ppc_emit_le_goto): New function.
2361 (ppc_emit_gt_goto): New function.
2362 (ppc_emit_ge_goto): New function.
2363 (ppc_write_goto_address): New function.
2364 (ppc_emit_ops_impl): New static variable.
2365 (ppc64v1_emit_prologue): New function.
2366 (ppc64v2_emit_prologue): New function.
2367 (ppc64_emit_epilogue): New function.
2368 (ppc64_emit_add): New function.
2369 (ppc64_emit_sub): New function.
2370 (ppc64_emit_mul): New function.
2371 (ppc64_emit_lsh): New function.
2372 (ppc64_emit_rsh_signed): New function.
2373 (ppc64_emit_rsh_unsigned): New function.
2374 (ppc64_emit_ext): New function.
2375 (ppc64_emit_zero_ext): New function.
2376 (ppc64_emit_log_not): New function.
2377 (ppc64_emit_bit_and): New function.
2378 (ppc64_emit_bit_or): New function.
2379 (ppc64_emit_bit_xor): New function.
2380 (ppc64_emit_bit_not): New function.
2381 (ppc64_emit_equal): New function.
2382 (ppc64_emit_less_signed): New function.
2383 (ppc64_emit_less_unsigned): New function.
2384 (ppc64_emit_ref): New function.
2385 (ppc64_emit_const): New function.
2386 (ppc64v1_emit_reg): New function.
2387 (ppc64v2_emit_reg): New function.
2388 (ppc64_emit_pop): New function.
2389 (ppc64_emit_stack_flush): New function.
2390 (ppc64_emit_swap): New function.
2391 (ppc64v1_emit_call): New function.
2392 (ppc64v2_emit_call): New function.
2393 (ppc64v1_emit_int_call_1): New function.
2394 (ppc64v2_emit_int_call_1): New function.
2395 (ppc64v1_emit_void_call_2): New function.
2396 (ppc64v2_emit_void_call_2): New function.
2397 (ppc64_emit_if_goto): New function.
2398 (ppc64_emit_eq_goto): New function.
2399 (ppc64_emit_ne_goto): New function.
2400 (ppc64_emit_lt_goto): New function.
2401 (ppc64_emit_le_goto): New function.
2402 (ppc64_emit_gt_goto): New function.
2403 (ppc64_emit_ge_goto): New function.
2404 (ppc64v1_emit_ops_impl): New static variable.
2405 (ppc64v2_emit_ops_impl): New static variable.
2406 (ppc_emit_ops): New function.
2407 (linux_low_target): Wire in ppc_emit_ops.
2409 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2410 Marcin Kościelnicki <koriakin@0x04.net>
2413 * Makefile.in: Add powerpc-*-ipa.o
2414 * configure.srv: Add ipa_obj for powerpc*-linux.
2415 * linux-ppc-ipa.c: New file.
2416 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2418 (PPC_FIELD): New macro.
2419 (PPC_SEXT): New macro.
2420 (PPC_OP6): New macro.
2421 (PPC_BO): New macro.
2422 (PPC_LI): New macro.
2423 (PPC_BD): New macro.
2424 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2425 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2426 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2427 (ppc_get_thread_area): New function.
2428 (is_elfv2_inferior): New function.
2429 (gen_ds_form): New function.
2430 (GEN_STD): New macro.
2431 (GEN_STDU): New macro.
2432 (GEN_LD): New macro.
2433 (GEN_LDU): New macro.
2434 (gen_d_form): New function.
2435 (GEN_ADDI): New macro.
2436 (GEN_ADDIS): New macro.
2437 (GEN_LI): New macro.
2438 (GEN_LIS): New macro.
2439 (GEN_ORI): New macro.
2440 (GEN_ORIS): New macro.
2441 (GEN_LWZ): New macro.
2442 (GEN_STW): New macro.
2443 (GEN_STWU): New macro.
2444 (gen_xfx_form): New function.
2445 (GEN_MFSPR): New macro.
2446 (GEN_MTSPR): New macro.
2447 (GEN_MFCR): New macro.
2448 (GEN_MTCR): New macro.
2449 (GEN_SYNC): New macro.
2450 (GEN_LWSYNC): New macro.
2451 (gen_x_form): New function.
2452 (GEN_OR): New macro.
2453 (GEN_MR): New macro.
2454 (GEN_LWARX): New macro.
2455 (GEN_STWCX): New macro.
2456 (GEN_CMPW): New macro.
2457 (gen_md_form): New function.
2458 (GEN_RLDICL): New macro.
2459 (GEN_RLDICR): New macro.
2460 (gen_i_form): New function.
2462 (GEN_BL): New macro.
2463 (gen_b_form): New function.
2464 (GEN_BNE): New macro.
2465 (GEN_LOAD): New macro.
2466 (GEN_STORE): New macro.
2467 (gen_limm): New function.
2468 (gen_atomic_xchg): New function.
2469 (gen_call): New function.
2470 (ppc_relocate_instruction): New function.
2471 (ppc_install_fast_tracepoint_jump_pad): New function.
2472 (ppc_get_min_fast_tracepoint_insn_len): New function.
2473 (ppc_get_ipa_tdesc_idx): New function.
2474 (the_low_target): Wire in the new functions.
2475 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2477 * linux-ppc-tdesc.h: New file.
2479 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2481 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2482 (alloc_jump_pad_buffer): New function.
2483 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2484 (alloc_jump_pad_buffer): New function.
2485 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2486 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2487 (alloc_jump_pad_buffer): New function.
2488 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2489 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2490 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2491 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2493 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2495 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2496 * linux-amd64-ipa.c: Likewise.
2497 * linux-i386-ipa.c: Likewise.
2498 * linux-s390-ipa.c: Likewise.
2499 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2500 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2501 set_trace_state_variable_value_ptr.
2502 (struct ipa_sym_addresses): Likewise.
2503 (symbol_list): Likewise.
2504 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2505 accessing gdb_collect directly.
2506 (gdb_collect_ptr_type): New typedef.
2507 (get_raw_reg_ptr_type): New typedef.
2508 (get_trace_state_variable_value_ptr_type): New typedef.
2509 (set_trace_state_variable_value_ptr_type): New typedef.
2510 (gdb_collect_ptr): New global.
2511 (get_raw_reg_ptr): New global.
2512 (get_trace_state_variable_value_ptr): New global.
2513 (set_trace_state_variable_value_ptr): New global.
2514 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2515 accessing get_raw_reg directly.
2516 (get_get_tsv_func_addr): Likewise for
2517 get_trace_state_variable_value_ptr.
2518 (get_set_tsv_func_addr): Likewise for
2519 set_trace_state_variable_value_ptr.
2520 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2522 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2524 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2526 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2528 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2530 (relocate_instruction): Remove own_buf.
2531 * server.c (own_buf): Make global.
2532 (handle_v_requests): Make global.
2533 * server.h (own_buf): New declaration.
2534 (handle_v_requests): New prototype.
2536 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2539 * linux-s390-low.c (add_insns): New function.
2540 (s390_emit_prologue): New function.
2541 (s390_emit_epilogue): New function.
2542 (s390_emit_add): New function.
2543 (s390_emit_sub): New function.
2544 (s390_emit_mul): New function.
2545 (s390_emit_lsh): New function.
2546 (s390_emit_rsh_signed): New function.
2547 (s390_emit_rsh_unsigned): New function.
2548 (s390_emit_ext): New function.
2549 (s390_emit_log_not): New function.
2550 (s390_emit_bit_and): New function.
2551 (s390_emit_bit_or): New function.
2552 (s390_emit_bit_xor): New function.
2553 (s390_emit_bit_not): New function.
2554 (s390_emit_equal): New function.
2555 (s390_emit_less_signed): New function.
2556 (s390_emit_less_unsigned): New function.
2557 (s390_emit_ref): New function.
2558 (s390_emit_if_goto): New function.
2559 (s390_emit_goto): New function.
2560 (s390_write_goto_address): New function.
2561 (s390_emit_litpool): New function.
2562 (s390_emit_const): New function.
2563 (s390_emit_call): New function.
2564 (s390_emit_reg): New function.
2565 (s390_emit_pop): New function.
2566 (s390_emit_stack_flush): New function.
2567 (s390_emit_zero_ext): New function.
2568 (s390_emit_swap): New function.
2569 (s390_emit_stack_adjust): New function.
2570 (s390_emit_set_r2): New function.
2571 (s390_emit_int_call_1): New function.
2572 (s390_emit_void_call_2): New function.
2573 (s390_emit_eq_goto): New function.
2574 (s390_emit_ne_goto): New function.
2575 (s390_emit_lt_goto): New function.
2576 (s390_emit_le_goto): New function.
2577 (s390_emit_gt_goto): New function.
2578 (s390_emit_ge_goto): New function.
2579 (s390x_emit_prologue): New function.
2580 (s390x_emit_epilogue): New function.
2581 (s390x_emit_add): New function.
2582 (s390x_emit_sub): New function.
2583 (s390x_emit_mul): New function.
2584 (s390x_emit_lsh): New function.
2585 (s390x_emit_rsh_signed): New function.
2586 (s390x_emit_rsh_unsigned): New function.
2587 (s390x_emit_ext): New function.
2588 (s390x_emit_log_not): New function.
2589 (s390x_emit_bit_and): New function.
2590 (s390x_emit_bit_or): New function.
2591 (s390x_emit_bit_xor): New function.
2592 (s390x_emit_bit_not): New function.
2593 (s390x_emit_equal): New function.
2594 (s390x_emit_less_signed): New function.
2595 (s390x_emit_less_unsigned): New function.
2596 (s390x_emit_ref): New function.
2597 (s390x_emit_if_goto): New function.
2598 (s390x_emit_const): New function.
2599 (s390x_emit_call): New function.
2600 (s390x_emit_reg): New function.
2601 (s390x_emit_pop): New function.
2602 (s390x_emit_stack_flush): New function.
2603 (s390x_emit_zero_ext): New function.
2604 (s390x_emit_swap): New function.
2605 (s390x_emit_stack_adjust): New function.
2606 (s390x_emit_int_call_1): New function.
2607 (s390x_emit_void_call_2): New function.
2608 (s390x_emit_eq_goto): New function.
2609 (s390x_emit_ne_goto): New function.
2610 (s390x_emit_lt_goto): New function.
2611 (s390x_emit_le_goto): New function.
2612 (s390x_emit_gt_goto): New function.
2613 (s390x_emit_ge_goto): New function.
2614 (s390_emit_ops): New function.
2615 (struct linux_target_ops): Fill in emit_ops hook.
2617 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2620 * Makefile.in: Add s390 IPA files.
2621 * configure.srv: Build IPA for s390.
2622 * linux-s390-ipa.c: New file.
2623 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2624 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2625 (tdesc_s390_linux32): Likewise.
2626 (init_registers_s390_linux32v1): Likewise.
2627 (tdesc_s390_linux32v1): Likewise.
2628 (init_registers_s390_linux32v2): Likewise.
2629 (tdesc_s390_linux32v2): Likewise.
2630 (init_registers_s390_linux64): Likewise.
2631 (tdesc_s390_linux64): Likewise.
2632 (init_registers_s390_linux64v1): Likewise.
2633 (tdesc_s390_linux64v1): Likewise.
2634 (init_registers_s390_linux64v2): Likewise.
2635 (tdesc_s390_linux64v2): Likewise.
2636 (init_registers_s390_te_linux64): Likewise.
2637 (tdesc_s390_te_linux64): Likewise.
2638 (init_registers_s390_vx_linux64): Likewise.
2639 (tdesc_s390_vx_linux64): Likewise.
2640 (init_registers_s390_tevx_linux64): Likewise.
2641 (tdesc_s390_tevx_linux64): Likewise.
2642 (init_registers_s390x_linux64): Likewise.
2643 (tdesc_s390x_linux64): Likewise.
2644 (init_registers_s390x_linux64v1): Likewise.
2645 (tdesc_s390x_linux64v1): Likewise.
2646 (init_registers_s390x_linux64v2): Likewise.
2647 (tdesc_s390x_linux64v2): Likewise.
2648 (init_registers_s390x_te_linux64): Likewise.
2649 (tdesc_s390x_te_linux64): Likewise.
2650 (init_registers_s390x_vx_linux64): Likewise.
2651 (tdesc_s390x_vx_linux64): Likewise.
2652 (init_registers_s390x_tevx_linux64): Likewise.
2653 (tdesc_s390x_tevx_linux64): Likewise.
2654 (have_hwcap_s390_vx): New static variable.
2655 (s390_arch_setup): Fill have_hwcap_s390_vx.
2656 (s390_get_thread_area): New function.
2657 (s390_ft_entry_gpr_esa): New const.
2658 (s390_ft_entry_gpr_zarch): New const.
2659 (s390_ft_entry_misc): New const.
2660 (s390_ft_entry_fr): New const.
2661 (s390_ft_entry_vr): New const.
2662 (s390_ft_main_31): New const.
2663 (s390_ft_main_64): New const.
2664 (s390_ft_exit_fr): New const.
2665 (s390_ft_exit_vr): New const.
2666 (s390_ft_exit_misc): New const.
2667 (s390_ft_exit_gpr_esa): New const.
2668 (s390_ft_exit_gpr_zarch): New const.
2669 (append_insns): New function.
2670 (s390_relocate_instruction): New function.
2671 (s390_install_fast_tracepoint_jump_pad): New function.
2672 (s390_get_min_fast_tracepoint_insn_len): New function.
2673 (s390_get_ipa_tdesc_idx): New function.
2674 (struct linux_target_ops): Wire in the above functions.
2675 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2676 * linux-s390-tdesc.h: New file.
2678 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2680 * linux-s390-low.c (s390_supports_tracepoints): New function.
2681 (struct linux_target_ops): Fill supports_tracepoints hook.
2683 2016-03-18 Yao Qi <yao.qi@linaro.org>
2685 * linux-low.c (lwp_signal_can_be_delivered): New function.
2686 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2688 2016-03-18 Yao Qi <yao.qi@linaro.org>
2690 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2691 0 if signal is enqueued. Remove 'signal' from one debugging
2692 message. Move one debugging message to some lines below.
2693 Remove code setting 'signal' to 0.
2695 2016-03-18 Yao Qi <yao.qi@linaro.org>
2697 * linux-low.c (linux_low_filter_event): Remove redundant
2698 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2700 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2702 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2703 (struct linux_target_ops): Wire in the above.
2705 2016-03-03 Yao Qi <yao.qi@linaro.org>
2707 * linux-low.c: Update comments to start_step_over.
2709 2016-03-03 Yao Qi <yao.qi@linaro.org>
2712 * linux-low.c (handle_extended_wait): Set child suspended
2713 if event_lwp->bp_reinsert isn't zero.
2715 2016-03-02 Yao Qi <yao.qi@linaro.org>
2717 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2718 enqueue_pending_signal.
2720 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2722 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2725 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2727 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2728 (s390_regmap_3264) [!__s390x__]: New global.
2729 (s390_collect_ptrace_register): Skip map entries containing -1.
2730 (s390_supply_ptrace_register): Ditto.
2731 (s390_fill_gprs_high): New function.
2732 (s390_store_gprs_high): New function.
2733 (s390_regsets): Add NT_S390_HIGH_GPRS.
2734 (s390_get_hwcap): Enable on 31-bit.
2735 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2736 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2737 Detect NT_S390_HIGH_GPRS.
2738 (s390_usrregs_info_3264): Enable on 31-bit.
2739 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2740 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2742 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2745 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2746 * configure.srv: Ditto.
2747 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2748 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2749 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2750 (init_registers_amd64_linux): Remove prototype.
2751 (tdesc_amd64_linux): Remove declaration.
2752 (get_ipa_tdesc): New function.
2753 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2754 initialize remaining tdescs.
2755 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2756 (init_registers_i386_linux): Remove prototype.
2757 (tdesc_i386_linux): Remove declaration.
2758 (get_ipa_tdesc): New function.
2759 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2760 initialize remaining tdescs.
2761 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2762 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2763 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2764 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2765 (x86_get_ipa_tdesc_idx): New function.
2766 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2767 * linux-x86-tdesc.h: New file.
2768 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2769 (target_get_ipa_tdesc_idx): New macro.
2770 * tracepoint.c (ipa_tdesc_idx): New macro.
2771 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2772 (symbol_list): Add ipa_tdesc_idx.
2773 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2774 (ipa_tdesc): Remove.
2775 (ipa_tdesc_idx): New variable.
2776 (get_context_regcache): Use get_ipa_tdesc.
2777 (gdb_collect): Ditto.
2779 * tracepoint.h (get_ipa_tdesc): New prototype.
2780 (ipa_tdesc): Remove.
2782 2016-02-24 Pedro Alves <palves@redhat.com>
2784 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2785 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2786 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2787 Factor out common code between the USE_SIGTRAP_SIGINFO and
2788 !USE_SIGTRAP_SIGINFO blocks.
2789 (linux_low_filter_event): Call save_stop_reason instead of
2790 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2792 (linux_wait_1): Update comments.
2794 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2796 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2797 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2798 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2799 ppc_insert_point, ppc_remove_point.
2801 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2803 * linux-s390-low.c (s390_supports_z_point_type): New function.
2804 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2806 2016-02-16 Yao Qi <yao.qi@linaro.org>
2808 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2809 PC. Get pc from regcache_read_pc.
2811 2016-02-12 Yao Qi <yao.qi@linaro.org>
2813 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2814 or linux_get_pc_32bit.
2815 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2817 2016-02-12 Yao Qi <yao.qi@linaro.org>
2819 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2820 arm_linux_get_next_pcs_fixup.
2822 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2824 * tracepoint.c (x_tracepoint_action_download): Change
2825 write_inferior_data_ptr to write_inferior_data_pointer.
2826 (cmd_qtstart): Likewise.
2827 (write_inferior_data_ptr): Remove.
2828 (download_agent_expr): Change write_inferior_data_ptr to
2829 write_inferior_data_pointer.
2830 (download_tracepoint_1): Likewise.
2831 (download_tracepoint): Likewise.
2832 (download_trace_state_variables): Likewise.
2834 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2835 Marcin Kościelnicki <koriakin@0x04.net>
2837 * tracepoint.c (struct tracepoint_action_ops): Remove.
2838 (struct tracepoint_action): Remove ops.
2839 (m_tracepoint_action_download, r_tracepoint_action_download)
2840 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2841 size and offset accordingly.
2842 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2843 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2844 (tracepoint_action_send, tracepoint_action_download): New functions.
2845 Helpers for trace action handlers.
2846 (add_tracepoint_action): Remove setup actions ops.
2847 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2849 2016-02-10 Yao Qi <yao.qi@linaro.org>
2851 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2853 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2855 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2857 * configure: Regenerate.
2859 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2861 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2862 void * to gdb_byte *.
2863 * linux-low.c (siginfo_fixup): Likewise.
2864 (linux_xfer_siginfo): Likewise.
2865 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2867 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2869 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2871 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2873 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2875 * linux-x86-low.c [__x86_64__]: Include
2876 "nat/amd64-linux-siginfo.h".
2877 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2878 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2879 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2880 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2881 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2882 (cpt_si_fd, si_timerid, si_overrun): Move from
2883 nat/amd64-linux-siginfo.c.
2884 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2886 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2888 * server.c (skip_to_semicolon): Remove.
2889 (process_point_options): Use strchrnul instead of
2892 2016-01-26 Yao Qi <yao.qi@linaro.org>
2894 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2895 * linux-low.c (install_software_single_step_breakpoints): Don't
2896 call regcache_read_pc.
2897 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2900 2016-01-26 Yao Qi <yao.qi@linaro.org>
2902 * linux-low.c (install_software_single_step_breakpoints): Call
2903 regcache_read_pc instead of get_pc.
2905 2016-01-26 Yao Qi <yao.qi@linaro.org>
2907 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2908 (unblock_async_io): Rename to ...
2909 (block_unblock_async_io): ... it. New function.
2910 (enable_async_io): Don't install SIGIO handler. Unblock it
2912 (disable_async_io): Don't ignore SIGIO. Block it instead.
2913 (initialize_async_io): Install SIGIO handler. Don't call
2916 2016-01-26 Yao Qi <yao.qi@linaro.org>
2918 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2919 first character is '\003', call *the_target->request_interrupt.
2921 2016-01-25 Yao Qi <yao.qi@linaro.org>
2923 * remote-utils.c (new_thread_notify): Remove.
2924 (dead_thread_notify): Likewise.
2925 * remote-utils.h (new_thread_notify): Remove declaration.
2926 (dead_thread_notify): Likewise.
2928 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2930 * gdb.trace/pending.exp: Fix expected message on continue.
2932 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2934 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2935 it works properly on big-endian machines where sizeof (CORE_ADDR)
2938 2016-01-21 Pedro Alves <palves@redhat.com>
2940 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2941 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2942 * configure: Regenerate.
2944 2016-01-21 Yao Qi <yao.qi@linaro.org>
2946 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2947 is_thumb and set it according to CPSR saved on the stack.
2948 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2949 arm_sigreturn_next_pc.
2951 2016-01-18 Yao Qi <yao.qi@linaro.org>
2953 * linux-low.c (linux_set_pc_64bit): New function.
2954 (linux_get_pc_64bit): New function.
2955 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2957 * linux-sparc-low.c (debug_threads): Remove declaration.
2958 (sparc_get_pc): Remove.
2959 (the_low_target): Use linux_get_pc_64bit instead of
2961 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2962 (the_low_target): Use linux_get_pc_64bit and
2965 2016-01-18 Yao Qi <yao.qi@linaro.org>
2967 * linux-arm-low.c (debug_threads): Remove declaration.
2968 (arm_get_pc, arm_set_pc): Remove.
2969 (the_low_target): Use linux_get_pc_32bit and
2971 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2972 (the_low_target): Use linux_get_pc_32bit and
2974 * linux-cris-low.c (debug_threads): Remove declaration.
2975 (cris_get_pc, cris_set_pc,): Remove.
2976 (the_low_target): Use linux_get_pc_32bit and
2978 * linux-crisv32-low.c (debug_threads): Remove declaration.
2979 (cris_get_pc, cris_set_pc): Remove.
2980 (the_low_target): Use linux_get_pc_32bit and
2982 * linux-low.c: Include inttypes.h.
2983 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2984 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2985 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2986 (the_low_target): Use linux_get_pc_32bit and
2988 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2989 (the_low_target): Use linux_get_pc_32bit and
2991 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2992 (the_low_target): Use linux_get_pc_32bit and
2994 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2995 (the_low_target): Use linux_get_pc_32bit and
2997 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2998 (the_low_target): Use linux_get_pc_32bit and
3001 2016-01-18 Gary Benson <gbenson@redhat.com>
3003 * configure.ac (AC_FUNC_FORK): New check.
3004 * config.in: Regenerate.
3005 * configure: Likewise.
3007 2016-01-14 Yao Qi <yao.qi@linaro.org>
3009 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3010 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3011 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3012 arm_get_next_pcs_ctor.
3014 2016-01-12 Josh Stone <jistone@redhat.com>
3015 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3017 * inferiors.h: Include "gdb_vecs.h".
3018 (struct process_info): Add syscalls_to_catch.
3019 * inferiors.c (remove_process): Free syscalls_to_catch.
3020 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3021 syscall_return stops.
3022 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3023 * server.c (handle_general_set): Handle QCatchSyscalls.
3024 (handle_query): Report support for QCatchSyscalls.
3025 * target.h (struct target_ops): Add supports_catch_syscall.
3026 (target_supports_catch_syscall): New macro.
3027 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3028 (struct lwp_info): Add syscall_state.
3029 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3030 Maintain syscall_state and syscalls_to_catch across exec.
3031 (get_syscall_trapinfo): New function, proxy to the_low_target.
3032 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3033 (linux_low_filter_event): Toggle syscall_state entry/return for
3034 syscall traps, and set it ignored for all others.
3035 (gdb_catching_syscalls_p): New function.
3036 (gdb_catch_this_syscall_p): New function.
3037 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3038 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3039 (linux_supports_catch_syscall): New function.
3040 (linux_target_ops): Install it.
3041 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3042 (the_low_target): Install it.
3044 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3046 * acinclude.m4: Include new ../warning.m4 file.
3047 * configure: Regenerated.
3048 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3050 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3052 * ax.c (is_goto_target): Mark static.
3053 * linux-low.c (register_addr): Likewise.
3054 (linux_fetch_registers, linux_store_registers): Likewise.
3055 * mem-break.c (any_persistent_commands): Fix old prototype.
3056 (add_commands_to_breakpoint): Mark static.
3057 * regcache.c (find_register_by_name): Delete unused func.
3058 * remote-utils.c (hex_or_minus_one): Mark static.
3059 * server.c (monitor_show_help): Mark static.
3060 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3061 handle_v_requests): Likewise.
3063 2016-01-12 Pedro Alves <palves@redhat.com>
3065 Remove use of the registered trademark symbol throughout.
3067 2016-01-08 Yao Qi <yao.qi@linaro.org>
3069 * remote-utils.c (getpkt): If c is '\003', call target hook
3072 2016-01-06 Yao Qi <yao.qi@linaro.org>
3074 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3075 linux-aarch32-low.c.
3076 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3077 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3078 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3079 (thumb2_breakpoint): Declare.
3080 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3081 linux-aarch32-low.h.
3082 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3083 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3084 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3086 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3088 * gdbreplay.c (gdbreplay_version): Change copyright year in
3090 * server.c (gdbserver_version): Likewise.
3092 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3094 * server.c (crc32_table): Delete.
3095 (crc32): Use libiberty's xcrc32 function.
3097 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3099 * lynx-low.c (lynx_delete_thread_callback): New function.
3100 (lynx_mourn): Properly delete our process and all of its
3101 threads. Remove call to clear_inferiors.
3103 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3105 * target.c (thread_search_callback): Add check that
3106 the thread_stopped target callback is not NULL before
3109 2015-12-21 Yao Qi <yao.qi@linaro.org>
3111 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3114 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3116 * server.c (handle_query): Call target_supports_software_single_step.
3118 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3120 * linux-low.c (single_step): New function.
3121 (linux_resume_one_lwp_throw): Call single_step.
3122 (start_step_over): Likewise.
3124 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3126 * Makefile.in (SFILES): Append arch/arm-linux.c,
3127 arch/arm-get-next-pcs.c.
3128 (arm-linux.o): New rule.
3129 (arm-get-next-pcs.o): New rule.
3130 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3132 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3133 to linux-aarch32-low.c.
3134 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3135 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3136 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3137 (thumb2_breakpoint_len): Likewise.
3138 (arm_is_thumb_mode): Make non-static.
3139 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3140 from linux-aarch32-low.c.
3141 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3142 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3143 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3144 (thumb2_breakpoint_len): Likewise.
3145 (arm_is_thumb_mode): New declaration.
3146 * linux-arm-low.c: Include arch/arm-linux.h
3147 aarch/arm-get-next-pcs.h, sys/syscall.h.
3148 (get_next_pcs_ops): New struct.
3149 (get_next_pcs_addr_bits_remove): New function.
3150 (get_next_pcs_is_thumb): New function.
3151 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3152 (arm_sigreturn_next_pc): Likewise.
3153 (get_next_pcs_syscall_next_pc): Likewise.
3154 (arm_gdbserver_get_next_pcs): Likewise.
3155 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3157 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3158 * server.h: Include gdb_vecs.h.
3160 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3162 * Makefile.in (SFILES): Append common/common-regcache.c.
3163 (OBS): Append common-regcache.o.
3164 (common-regcache.o): New rule.
3165 * regcache.c (init_register_cache): Initialize cache to
3167 (regcache_raw_read_unsigned): New function.
3168 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3169 register_status enum.
3171 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3173 * linux-aarch64-low.c (the_low_targets): Rename
3174 breakpoint_reinsert_addr to get_next_pcs.
3175 * linux-arm-low.c (the_low_targets): Likewise.
3176 * linux-bfin-low.c (the_low_targets): Likewise.
3177 * linux-cris-low.c (the_low_targets): Likewise.
3178 * linux-crisv32-low.c (the_low_targets): Likewise.
3179 * linux-low.c (can_software_single_step): Likewise.
3180 (install_software_single_step_breakpoints): New function.
3181 (start_step_over): Use install_software_single_step_breakpoints.
3182 * linux-low.h: New CORE_ADDR vector.
3183 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3185 * linux-mips-low.c (the_low_targets): Likewise.
3186 * linux-nios2-low.c (the_low_targets): Likewise.
3187 * linux-sparc-low.c (the_low_targets): Likewise.
3189 2015-12-17 Pedro Alves <palves@redhat.com>
3191 * linux-low.c (linux_kill_one_lwp): Remove references to
3193 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3195 (linux_init_signals): Delete.
3196 (initialize_low): Adjust.
3197 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3199 2015-12-16 Pedro Alves <palves@redhat.com>
3201 * configure.ac (compiler warning flags): When testing a
3202 -Wno-foo option, check whether -Wfoo works instead.
3203 * configure: Regenerate.
3205 2015-12-11 Don Breazeal <donb@codesourcery.com>
3207 * server.c (process_serial_event): Don't exit from gdbserver
3208 in remote mode if there are still active inferiors.
3210 2015-12-11 Yao Qi <yao.qi@linaro.org>
3212 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3213 arm_breakpoint_at if the process is 32-bit.
3215 2015-12-11 Yao Qi <yao.qi@linaro.org>
3217 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3220 2015-12-07 Yao Qi <yao.qi@linaro.org>
3222 * configure.srv: Append arm.o to srv_tgtobj for
3223 aarch64*-*-linux* target.
3224 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3225 from linux-arm-low.c.
3226 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3227 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3228 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3229 (thumb2_breakpoint_len): Likewise.
3230 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3231 (arm_breakpoint_kinds): Likewise.
3232 (arm_breakpoint_kind_from_pc): Likewise.
3233 (arm_sw_breakpoint_from_kind): Likewise.
3234 (arm_breakpoint_kind_from_current_state): Likewise.
3235 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3236 (arm_sw_breakpoint_from_kind): Declare.
3237 (arm_breakpoint_kind_from_current_state): Declare.
3238 (arm_breakpoint_at): Declare.
3239 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3240 arm_sw_breakpoint_from_kind if process is 32-bit.
3241 (aarch64_breakpoint_kind_from_pc): New function.
3242 (aarch64_breakpoint_kind_from_current_state): New function.
3243 (the_low_target): Initialize fields breakpoint_kind_from_pc
3244 and breakpoint_kind_from_current_state.
3245 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3246 linux-aarch32-low.c.
3247 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3248 (arm_breakpoint, arm_breakpoint_len): Likewise.
3249 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3250 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3251 (arm_is_thumb_mode): Likewise.
3252 (arm_breakpoint_at): Likewise.
3253 (arm_breakpoint_kind_from_pc): Likewise.
3254 (arm_sw_breakpoint_from_kind): Likewise.
3255 (arm_breakpoint_kind_from_current_state): Likewise.
3258 2015-08-04 Yao Qi <yao.qi@linaro.org>
3260 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3261 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3262 * server.c (extended_protocol): Remove "static".
3263 * server.h (extended_protocol): Declare it.
3265 2015-12-04 Josh Stone <jistone@redhat.com>
3267 * target.h (struct target_ops) <arch_setup>: Rename to ...
3268 (struct target_ops) <post_create_inferior>: ... this.
3269 (target_arch_setup): Rename to ...
3270 (target_post_create_inferior): ... this, calling post_create_inferior.
3271 * server.c (start_inferior): Update target_arch_setup calls to
3272 target_post_create_inferior.
3273 * linux-low.c (linux_low_ptrace_options): Forward declare.
3274 (linux_arch_setup): Update its comment for general use.
3275 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3276 (struct linux_target_ops): Use linux_post_create_inferior.
3277 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3278 to post_create_inferior.
3279 * nto-low.c (struct nto_target_ops): Likewise.
3280 * spu-low.c (struct spu_target_ops): Likewise.
3281 * win32-low.c (struct win32_target_ops): Likewise.
3283 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3285 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3287 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3289 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3290 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3291 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3292 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3293 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3294 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3295 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3296 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3297 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3298 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3299 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3300 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3302 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3304 * linux-low.c (linux_look_up_symbols): Don't call
3305 linux_supports_traceclone.
3306 * linux-low.h (thread_db_init): Remove use_events argument.
3307 * thread-db.c (thread_db_use_event): Remove global variable.
3308 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3309 (struct thread_db) <td_create_bp>: Remove field.
3310 (thread_db_create_event): Remove function.
3311 (thread_db_enable_reporting): Likewise.
3312 (find_one_thread): Don't check for thread_db_use_events.
3313 (attach_thread): Likewise.
3314 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3315 (try_thread_db_load_1): Don't check for thread_db_use_events.
3316 (thread_db_init): Remove use_events argument and thread events
3318 (remove_thread_event_breakpoints): Remove function.
3319 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3321 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3323 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3325 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3326 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3327 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3328 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3329 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3331 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3333 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3334 * linux-low.c (can_hardware_single_step): Use
3335 supports_hardware_single_step.
3336 (can_software_single_step): New function.
3337 (start_step_over): Call can_software_single_step.
3338 (linux_supports_hardware_single_step): New function.
3339 (struct target_ops) <supports_software_single_step>: Initialize.
3340 * linux-low.h (struct linux_target_ops)
3341 <supports_hardware_single_step>: Initialize.
3342 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3343 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3344 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3345 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3346 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3347 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3348 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3349 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3350 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3351 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3353 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3354 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3356 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3357 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3358 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3360 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3361 * target.h (struct target_ops): <supports_software_single_step>:
3363 (target_supports_software_single_step): New macro.
3365 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3367 * linux-low.c (linux_wait_1): Fix pc advance condition.
3368 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3369 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3371 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3373 * linux-arm-low.c (arm_is_thumb_mode): New function.
3374 (arm_breakpoint_at): Use arm_is_thumb_mode.
3375 (arm_breakpoint_kind_from_current_state): New function.
3376 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3378 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3379 (linux_breakpoint_kind_from_current_state): New function.
3380 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3381 * linux-low.h (struct linux_target_ops)
3382 <breakpoint_kind_from_current_state>: New field.
3383 * target.h (struct target_ops): Likewise.
3384 (target_breakpoint_kind_from_current_state): New macro.
3386 2015-11-30 Pedro Alves <palves@redhat.com>
3388 * linux-low.c (linux_resume): Wake up the event loop before
3391 2015-11-30 Pedro Alves <palves@redhat.com>
3393 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3395 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3397 * target.c (struct thread_search): New structure.
3398 (thread_search_callback): New function.
3399 (prev_general_thread): New global.
3400 (prepare_to_access_memory, done_accessing_memory): New functions.
3401 * target.h (prepare_to_access_memory, done_accessing_memory):
3402 Replace macros with function declarations.
3404 2015-11-30 Pedro Alves <palves@redhat.com>
3407 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3408 report TARGET_WAITKIND_NO_RESUMED.
3409 * remote-utils.c (prepare_resume_reply): Handle
3410 TARGET_WAITKIND_NO_RESUMED.
3411 * server.c (report_no_resumed): New global.
3412 (handle_query) <qSupported>: Handle "no-resumed+". Report
3413 "no-resumed+" support.
3414 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3415 return error if the client doesn't support no-resumed events.
3416 (push_stop_notification): New function.
3417 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3418 events if the client supports them.
3420 2015-11-30 Pedro Alves <palves@redhat.com>
3422 * linux-low.c (thread_still_has_status_pending_p): Don't check
3424 (lwp_resumed): New function.
3425 (status_pending_p_callback): Return early if the LWP is not
3426 supposed to be resumed.
3428 2015-11-30 Pedro Alves <palves@redhat.com>
3430 * linux-low.c (handle_extended_wait): Assert that the LWP's
3431 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3432 thread create events, leave the new child's status pending.
3433 (linux_low_filter_event): If GDB wants to hear about thread exit
3434 events, leave the LWP marked dead and don't delete it.
3435 (linux_wait_for_event_filtered): Don't check for thread exit.
3436 (filter_exit_event): New function.
3437 (linux_wait_1): Use it, when returning an exit event.
3438 (linux_resume_one_lwp_throw): Assert that the LWP's
3439 waitstatus is TARGET_WAITKIND_IGNORE.
3440 * remote-utils.c (prepare_resume_reply): Handle
3441 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3442 * server.c (report_thread_events): New global.
3443 (handle_general_set): Handle QThreadEvents.
3444 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3445 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3446 TARGET_WAITKIND_THREAD_EXITED.
3447 * server.h (report_thread_events): Declare.
3449 2015-11-30 Pedro Alves <palves@redhat.com>
3451 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3452 the thread's last_resume_kind was resume_stop.
3454 2015-11-30 Pedro Alves <palves@redhat.com>
3456 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3459 2015-11-30 Pedro Alves <palves@redhat.com>
3461 * server.c (handle_v_requests): Handle vCtrlC.
3463 2015-11-30 Pedro Alves <palves@redhat.com>
3465 * gdbthread.h (find_any_thread_of_pid): Declare.
3466 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3468 * server.c (handle_query): If current_thread is NULL, look for
3469 another thread of the selected process.
3471 2015-11-26 Daniel Colascione <dancol@dancol.org>
3472 Simon Marchi <simon.marchi@ericsson.com>
3474 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3475 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3477 * target.h (struct target_ops) <thread_name>: New field.
3478 (target_thread_name): New macro.
3480 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3482 * regcache.h (regcache_invalidate_pid): Add declaration.
3483 * regcache.c (regcache_invalidate_pid): New function, extracted
3484 from regcache_invalidate.
3485 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3486 Add trivial documentation comment.
3487 * lynx-low.c: Use regcache_invalidate_pid instead of
3488 regcache_invalidate.
3490 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3492 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3493 and Elf64_auxv_t if the target is Android.
3495 2015-11-22 Doug Evans <xdje42@gmail.com>
3497 * target.h: #include <sys/types.h>.
3499 2015-11-19 Pedro Alves <palves@redhat.com>
3501 * linux-low.c (linux_process_qsupported): Change prototype.
3503 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3505 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3506 and adjust to loop over all features.
3507 * server.c (handle_query) <qSupported>: Adjust to call
3508 target_process_qsupported once, passing it a vector of unprocessed
3510 * target.h (struct target_ops) <process_qsupported>: Change
3512 (target_process_qsupported): Adjust.
3514 2015-11-19 Pedro Alves <palves@redhat.com>
3516 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3518 * configure: Regenerate.
3520 2015-11-19 Pedro Alves <palves@redhat.com>
3522 * configure: Regenerate.
3524 2015-11-19 Yao Qi <yao.qi@linaro.org>
3526 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3529 2015-11-19 Yao Qi <yao.qi@linaro.org>
3531 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3532 (struct aarch64_operand): Move enum out.
3534 2015-11-19 Yao Qi <yao.qi@linaro.org>
3536 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3537 struct user_fpsimd_state *.
3538 (aarch64_store_fpregset): Likewise.
3540 2015-11-19 Yao Qi <yao.qi@linaro.org>
3542 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3543 struct user_pt_regs *.
3544 (aarch64_store_gregset): Likewise.
3546 2015-11-18 Pedro Alves <palves@redhat.com>
3548 * Makefile.in (all_object_files): Add $IPA_OBJS.
3550 2015-11-17 Pedro Alves <palves@redhat.com>
3552 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3553 GDB_SIGNAL_0 and gdb_signal_to_string.
3555 2015-11-17 Pedro Alves <palves@redhat.com>
3557 * win32-low.c (handle_output_debug_string): Remove parameter.
3558 (win32_kill): Remove our_status local and adjust call to
3559 handle_output_debug_string.
3560 (get_child_debug_event): Adjust call to
3561 handle_output_debug_string.
3563 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3565 * linux-mips-low.c (mips_fill_gregset): Add cast.
3566 (mips_store_gregset): Likewise.
3567 (mips_fill_fpregset): Likewise.
3568 (mips_store_fpregset): Likewise.
3570 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3572 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3575 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3577 * linux-mips-low.c (mips_linux_new_thread): Change type of
3578 watch_type to enum target_hw_bp_type.
3580 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3582 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3583 Change return type to arm_hwbp_type.
3585 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3587 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3588 (arm_store_gregset): Likewise.
3589 * linux-arm-low.c (arm_get_hwcap): Likewise.
3590 (arm_read_description): Likewise.
3592 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3594 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3596 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3598 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3599 (ppc_fill_vsxregset): Likewise.
3600 (ppc_store_vsxregset): Likewise.
3601 (ppc_fill_vrregset): Likewise.
3602 (ppc_store_vrregset): Likewise.
3603 (ppc_fill_evrregset): Likewise.
3604 (ppc_store_evrregset): Likewise.
3606 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3608 * linux-ppc-low.c (ppc_usrregs_info): Remove
3609 forward-declaration.
3610 (ppc_arch_setup): Move lower in file.
3612 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3614 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3615 (ps_pdwrite): Likewise.
3617 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3619 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3620 to after assert checks.
3622 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3624 * proc-service.c (ps_pdread): Add/adjust casts.
3625 (ps_pdwrite): Add/adjust casts.
3627 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3629 * server.c (handle_search_memory_1): Cast return value of
3632 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3634 * server.c (write_qxfer_response): Change type of data to
3637 2015-10-29 Pedro Alves <palves@redhat.com>
3639 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3641 2015-10-29 Pedro Alves <palves@redhat.com>
3643 * tracepoint.c (clear_installed_tracepoints): Add casts.
3645 2015-10-29 Pedro Alves <palves@redhat.com>
3647 * server.c (handle_v_cont, process_serial_event): Add enum
3648 gdb_signal casts to signal parsing code.
3650 2015-10-29 Pedro Alves <palves@redhat.com>
3652 * linux-low.h (NULL_REGSET): Define.
3653 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3654 * linux-arm-low.c (arm_regsets): Likewise.
3655 * linux-crisv32-low.c (cris_regsets): Likewise.
3656 * linux-m68k-low.c (m68k_regsets): Likewise.
3657 * linux-mips-low.c (mips_regsets): Likewise.
3658 * linux-nios2-low.c (nios2_regsets): Likewise.
3659 * linux-ppc-low.c (ppc_regsets): Likewise.
3660 * linux-s390-low.c (s390_regsets): Likewise.
3661 * linux-sh-low.c (sh_regsets): Likewise.
3662 * linux-sparc-low.c (sparc_regsets): Likewise.
3663 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3664 * linux-tile-low.c (tile_regsets): Likewise.
3665 * linux-x86-low.c (x86_regsets): Likewise.
3666 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3668 2015-10-29 Pedro Alves <palves@redhat.com>
3670 * linux-low.h (NULL_REGSET): Define.
3671 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3672 * linux-arm-low.c (arm_regsets): Likewise.
3673 * linux-crisv32-low.c (cris_regsets): Likewise.
3674 * linux-m68k-low.c (m68k_regsets): Likewise.
3675 * linux-mips-low.c (mips_regsets): Likewise.
3676 * linux-nios2-low.c (nios2_regsets): Likewise.
3677 * linux-ppc-low.c (ppc_regsets): Likewise.
3678 * linux-s390-low.c (s390_regsets): Likewise.
3679 * linux-sh-low.c (sh_regsets): Likewise.
3680 * linux-sparc-low.c (sparc_regsets): Likewise.
3681 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3682 * linux-tile-low.c (tile_regsets): Likewise.
3683 * linux-x86-low.c (x86_regsets): Likewise.
3684 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3686 2015-10-26 Doug Evans <dje@google.com>
3688 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3690 2015-10-26 Doug Evans <dje@google.com>
3692 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3694 2015-10-26 Doug Evans <dje@google.com>
3696 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3698 (attach_thread, find_new_threads_callback): Ditto.
3700 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3702 * mem-break.h (set_breakpoint_data): Remove.
3704 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3706 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3707 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3708 (initialize_low): Remove set_breakpoint_data call.
3709 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3710 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3711 (initialize_low): Remove set_breakpoint_data call.
3712 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3713 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3714 (initialize_low): Remove set_breakpoint_data call.
3716 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3718 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3719 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3720 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3721 * target.h (target_breakpoint_kind_from_pc): New macro.
3723 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3725 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3726 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3727 the default breakpoint kind.
3729 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3731 * linux-arm-low.c (arm_supports_z_point_type): Add software
3734 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3736 * linux-arm-low.c: Refactor breakpoint definitions.
3737 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3738 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3740 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3742 * Makefile.in: Add arm.c/o.
3743 * configure.srv: Likewise.
3744 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3745 (arm_breakpoint_kind_from_pc): New function.
3746 (arm_sw_breakpoint_from_kind): Return proper kind.
3747 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3749 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3751 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3753 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3754 (struct raw_breakpoint) <size>: Remove.
3755 (struct raw_breakpoint) <kind>: Add.
3756 (bp_size): New function.
3757 (bp_opcode): Likewise.
3758 (find_raw_breakpoint_at): Adjust for kind.
3759 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3760 (remove_memory_breakpoint): Adjust for kind call bp_size.
3761 (set_raw_breakpoint_at): Adjust for kind.
3762 (set_breakpoint): Likewise.
3763 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3764 (delete_raw_breakpoint): Adjust for kind.
3765 (delete_breakpoint): Likewise.
3766 (find_gdb_breakpoint): Likewise.
3767 (set_gdb_breakpoint_1): Likewise.
3768 (set_gdb_breakpoint): Likewise.
3769 (delete_gdb_breakpoint_1): Likewise.
3770 (delete_gdb_breakpoint): Likewise.
3771 (uninsert_raw_breakpoint): Likewise.
3772 (reinsert_raw_breakpoint): Likewise.
3773 (set_breakpoint_data): Remove.
3774 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3775 (check_mem_read): Adjust for kind call bp_size.
3776 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3777 (clone_one_breakpoint): Adjust for kind.
3778 * mem-break.h (set_gdb_breakpoint): Likewise.
3779 (delete_gdb_breakpoint): Likewise.
3780 * server.c (process_serial_event): Likewise.
3782 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3784 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3785 (struct linux_target_ops) <breakpoint>: Remove.
3786 (struct linux_target_ops) <breakpoint_len>: Remove.
3787 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3788 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3789 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3790 (arm_sw_breakpoint_from_kind): New function.
3791 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3792 (struct linux_target_ops) <breakpoint>: Remove.
3793 (struct linux_target_ops) <breakpoint_len>: Remove.
3794 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3795 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3796 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3797 (struct linux_target_ops) <breakpoint>: Remove.
3798 (struct linux_target_ops) <breakpoint_len>: Remove.
3799 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3800 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3801 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3802 (struct linux_target_ops) <breakpoint>: Remove.
3803 (struct linux_target_ops) <breakpoint_len>: Remove.
3804 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3805 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3806 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3807 and sw_breakpoint_from_kind to increment the pc.
3808 (linux_breakpoint_kind_from_pc): New function.
3809 (linux_sw_breakpoint_from_kind): New function.
3810 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3811 (initialize_low): Call breakpoint_kind_from_pc and
3812 sw_breakpoint_from_kind to replace breakpoint_data/len.
3813 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3815 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3816 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3817 (struct linux_target_ops) <breakpoint>: Remove.
3818 (struct linux_target_ops) <breakpoint_len>: Remove.
3819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3820 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3821 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3822 (struct linux_target_ops) <breakpoint>: Remove.
3823 (struct linux_target_ops) <breakpoint_len>: Remove.
3824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3826 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3827 (struct linux_target_ops) <breakpoint>: Remove.
3828 (struct linux_target_ops) <breakpoint_len>: Remove.
3829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3831 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3832 (struct linux_target_ops) <breakpoint>: Remove.
3833 (struct linux_target_ops) <breakpoint_len>: Remove.
3834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3836 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3837 (struct linux_target_ops) <breakpoint>: Remove.
3838 (struct linux_target_ops) <breakpoint_len>: Remove.
3839 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3840 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3841 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3842 (struct linux_target_ops) <breakpoint>: Remove.
3843 (struct linux_target_ops) <breakpoint_len>: Remove.
3844 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3845 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3846 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3847 (struct linux_target_ops) <breakpoint>: Remove.
3848 (struct linux_target_ops) <breakpoint_len>: Remove.
3849 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3850 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3851 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3852 (struct linux_target_ops) <breakpoint>: Remove.
3853 (struct linux_target_ops) <breakpoint_len>: Remove.
3854 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3855 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3856 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3857 (struct linux_target_ops) <breakpoint>: Remove.
3858 (struct linux_target_ops) <breakpoint_len>: Remove.
3859 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3860 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3861 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3862 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3863 (struct linux_target_ops) <breakpoint>: Remove.
3864 (struct linux_target_ops) <breakpoint_len>: Remove.
3865 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3866 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3867 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3868 (struct linux_target_ops) <breakpoint>: Remove.
3869 (struct linux_target_ops) <breakpoint_len>: Remove.
3870 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3871 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3873 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3875 * linux-cris-low.c (cris_get_pc): Remove void arg.
3877 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3879 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3882 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3884 * inferiors.c (thread_pid_matches_callback): New function.
3885 (find_thread_process): New function.
3886 (remove_thread): Reset current_thread.
3887 (remove_process): Assert threads have been removed first.
3889 2015-10-15 Yao Qi <yao.qi@linaro.org>
3891 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3893 (aarch64_remove_point): Likewise.
3894 * regcache.c (regcache_register_size): New function.
3896 2015-10-12 Yao Qi <yao.qi@linaro.org>
3898 * linux-aarch64-low.c: Update all callers as emit_load_store
3899 is renamed to aarch64_emit_load_store.
3901 2015-10-12 Yao Qi <yao.qi@linaro.org>
3903 * linux-aarch64-low.c: Update all callers of function renaming
3904 from emit_insn to aarch64_emit_insn.
3906 2015-10-12 Yao Qi <yao.qi@linaro.org>
3908 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3909 arch/aarch64-insn.h.
3910 (struct aarch64_memory_operand): Likewise.
3912 (emit_insn): Move to arch/aarch64-insn.c.
3913 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3914 (emit_load_store): Move to arch/aarch64-insn.c.
3915 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3916 (can_encode_int32): Remove.
3918 2015-10-12 Yao Qi <yao.qi@linaro.org>
3920 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3921 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3922 (aarch64_relocate_instruction): Likewise.
3923 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3924 (struct aarch64_insn_visitor): Likewise.
3926 2015-10-12 Yao Qi <yao.qi@linaro.org>
3928 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3929 (struct aarch64_insn_visitor): New.
3930 (struct aarch64_insn_relocation_data): New.
3931 (aarch64_ftrace_insn_reloc_b): New function.
3932 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3933 (aarch64_ftrace_insn_reloc_cb): Likewise.
3934 (aarch64_ftrace_insn_reloc_tb): Likewise.
3935 (aarch64_ftrace_insn_reloc_adr): Likewise.
3936 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3937 (aarch64_ftrace_insn_reloc_others): Likewise.
3939 (aarch64_relocate_instruction): Use visitor.
3941 2015-10-12 Yao Qi <yao.qi@linaro.org>
3943 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3944 int. Add argument buf.
3945 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3946 aarch64_relocate_instruction.
3948 2015-10-12 Yao Qi <yao.qi@linaro.org>
3950 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3951 argument insn. Remove local variable insn. Don't call
3953 (aarch64_install_fast_tracepoint_jump_pad): Call
3956 2015-09-30 Yao Qi <yao.qi@linaro.org>
3958 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3959 (emit_load_store_pair): Likewise.
3961 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3963 * dll.c (match_dll): Add cast(s).
3964 (unloaded_dll): Likewise.
3965 * linux-low.c (second_thread_of_pid_p): Likewise.
3966 (delete_lwp_callback): Likewise.
3967 (count_events_callback): Likewise.
3968 (select_event_lwp_callback): Likewise.
3969 (linux_set_resume_request): Likewise.
3970 * server.c (accumulate_file_name_length): Likewise.
3971 (emit_dll_description): Likewise.
3972 (handle_qxfer_threads_worker): Likewise.
3973 (visit_actioned_threads): Likewise.
3974 * thread-db.c (any_thread_of): Likewise.
3975 * tracepoint.c (same_process_p): Likewise.
3976 (match_blocktype): Likewise.
3977 (build_traceframe_info_xml): Likewise.
3979 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3981 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3983 (gdb_unparse_agent_expr): Likewise.
3984 * hostio.c (require_data): Likewise.
3985 (handle_pread): Likewise.
3986 * linux-low.c (disable_regset): Likewise.
3987 (fetch_register): Likewise.
3988 (store_register): Likewise.
3989 (get_dynamic): Likewise.
3990 (linux_qxfer_libraries_svr4): Likewise.
3991 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3992 (set_fast_tracepoint_jump): Likewise.
3993 (uninsert_fast_tracepoint_jumps_at): Likewise.
3994 (reinsert_fast_tracepoint_jumps_at): Likewise.
3995 (validate_inserted_breakpoint): Likewise.
3996 (clone_agent_expr): Likewise.
3997 * regcache.c (init_register_cache): Likewise.
3998 * remote-utils.c (putpkt_binary_1): Likewise.
3999 (decode_M_packet): Likewise.
4000 (decode_X_packet): Likewise.
4001 (look_up_one_symbol): Likewise.
4002 (relocate_instruction): Likewise.
4003 (monitor_output): Likewise.
4004 * server.c (handle_search_memory): Likewise.
4005 (handle_qxfer_exec_file): Likewise.
4006 (handle_qxfer_libraries): Likewise.
4007 (handle_qxfer): Likewise.
4008 (handle_query): Likewise.
4009 (handle_v_cont): Likewise.
4010 (handle_v_run): Likewise.
4011 (captured_main): Likewise.
4012 * target.c (write_inferior_memory): Likewise.
4013 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4014 * tracepoint.c (init_trace_buffer): Likewise.
4015 (add_tracepoint_action): Likewise.
4016 (add_traceframe): Likewise.
4017 (add_traceframe_block): Likewise.
4018 (cmd_qtdpsrc): Likewise.
4019 (cmd_qtdv): Likewise.
4020 (cmd_qtstatus): Likewise.
4021 (response_source): Likewise.
4022 (response_tsv): Likewise.
4023 (cmd_qtnotes): Likewise.
4024 (gdb_collect): Likewise.
4025 (initialize_tracepoint): Likewise.
4027 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4029 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4030 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4031 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4033 (enum aarch64_condition_codes): New enum.
4034 (w0): New static global.
4037 (struct aarch64_memory_operand) <type>: New
4038 MEMORY_OPERAND_POSTINDEX type.
4039 (postindex_memory_operand): New helper function.
4040 (emit_ret): New function.
4041 (emit_load_store_pair): New function, factored out of emit_stp
4042 with support for MEMORY_OPERAND_POSTINDEX.
4043 (emit_stp): Rewrite using emit_load_store_pair.
4044 (emit_ldp): New function.
4045 (emit_load_store): Likewise.
4046 (emit_ldr): Mention post-index instruction in comment.
4047 (emit_ldrh): New function.
4048 (emit_ldrb): New function.
4049 (emit_ldrsw): Mention post-index instruction in comment.
4050 (emit_str): Likewise.
4051 (emit_subs): New function.
4052 (emit_cmp): Likewise.
4053 (emit_and): Likewise.
4054 (emit_orr): Likewise.
4055 (emit_orn): Likewise.
4056 (emit_eor): Likewise.
4057 (emit_mvn): Likewise.
4058 (emit_lslv): Likewise.
4059 (emit_lsrv): Likewise.
4060 (emit_asrv): Likewise.
4061 (emit_mul): Likewise.
4062 (emit_sbfm): Likewise.
4063 (emit_sbfx): Likewise.
4064 (emit_ubfm): Likewise.
4065 (emit_ubfx): Likewise.
4066 (emit_csinc): Likewise.
4067 (emit_cset): Likewise.
4068 (emit_nop): Likewise.
4069 (emit_ops_insns): New helper function.
4070 (emit_pop): Likewise.
4071 (emit_push): Likewise.
4072 (aarch64_emit_prologue): New function.
4073 (aarch64_emit_epilogue): Likewise.
4074 (aarch64_emit_add): Likewise.
4075 (aarch64_emit_sub): Likewise.
4076 (aarch64_emit_mul): Likewise.
4077 (aarch64_emit_lsh): Likewise.
4078 (aarch64_emit_rsh_signed): Likewise.
4079 (aarch64_emit_rsh_unsigned): Likewise.
4080 (aarch64_emit_ext): Likewise.
4081 (aarch64_emit_log_not): Likewise.
4082 (aarch64_emit_bit_and): Likewise.
4083 (aarch64_emit_bit_or): Likewise.
4084 (aarch64_emit_bit_xor): Likewise.
4085 (aarch64_emit_bit_not): Likewise.
4086 (aarch64_emit_equal): Likewise.
4087 (aarch64_emit_less_signed): Likewise.
4088 (aarch64_emit_less_unsigned): Likewise.
4089 (aarch64_emit_ref): Likewise.
4090 (aarch64_emit_if_goto): Likewise.
4091 (aarch64_emit_goto): Likewise.
4092 (aarch64_write_goto_address): Likewise.
4093 (aarch64_emit_const): Likewise.
4094 (aarch64_emit_call): Likewise.
4095 (aarch64_emit_reg): Likewise.
4096 (aarch64_emit_pop): Likewise.
4097 (aarch64_emit_stack_flush): Likewise.
4098 (aarch64_emit_zero_ext): Likewise.
4099 (aarch64_emit_swap): Likewise.
4100 (aarch64_emit_stack_adjust): Likewise.
4101 (aarch64_emit_int_call_1): Likewise.
4102 (aarch64_emit_void_call_2): Likewise.
4103 (aarch64_emit_eq_goto): Likewise.
4104 (aarch64_emit_ne_goto): Likewise.
4105 (aarch64_emit_lt_goto): Likewise.
4106 (aarch64_emit_le_goto): Likewise.
4107 (aarch64_emit_gt_goto): Likewise.
4108 (aarch64_emit_ge_got): Likewise.
4109 (aarch64_emit_ops_impl): New static global variable.
4110 (aarch64_emit_ops): New target function, return
4111 &aarch64_emit_ops_impl.
4112 (struct linux_target_ops): Install it.
4114 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4116 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4117 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4119 * linux-aarch64-ipa.c: New file.
4120 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4122 (aarch64_get_thread_area): New target method.
4123 (extract_signed_bitfield): New helper function.
4124 (aarch64_decode_ldr_literal): New function.
4125 (enum aarch64_opcodes): New enum.
4126 (struct aarch64_register): New struct.
4127 (struct aarch64_operand): New struct.
4128 (x0): New static global.
4137 (aarch64_register): New helper function.
4138 (register_operand): Likewise.
4139 (immediate_operand): Likewise.
4140 (struct aarch64_memory_operand): New struct.
4141 (offset_memory_operand): New helper function.
4142 (preindex_memory_operand): Likewise.
4143 (enum aarch64_system_control_registers): New enum.
4144 (ENCODE): New macro.
4145 (emit_insn): New helper function.
4146 (emit_b): New function.
4147 (emit_bcond): Likewise.
4148 (emit_cb): Likewise.
4149 (emit_tb): Likewise.
4150 (emit_blr): Likewise.
4151 (emit_stp): Likewise.
4152 (emit_ldp_q_offset): Likewise.
4153 (emit_stp_q_offset): Likewise.
4154 (emit_load_store): Likewise.
4155 (emit_ldr): Likewise.
4156 (emit_ldrsw): Likewise.
4157 (emit_str): Likewise.
4158 (emit_ldaxr): Likewise.
4159 (emit_stxr): Likewise.
4160 (emit_stlr): Likewise.
4161 (emit_data_processing_reg): Likewise.
4162 (emit_data_processing): Likewise.
4163 (emit_add): Likewise.
4164 (emit_sub): Likewise.
4165 (emit_mov): Likewise.
4166 (emit_movk): Likewise.
4167 (emit_mov_addr): Likewise.
4168 (emit_mrs): Likewise.
4169 (emit_msr): Likewise.
4170 (emit_sevl): Likewise.
4171 (emit_wfe): Likewise.
4172 (append_insns): Likewise.
4173 (can_encode_int32_in): New helper function.
4174 (aarch64_relocate_instruction): New function.
4175 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4176 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4177 (struct linux_target_ops): Install aarch64_get_thread_area,
4178 aarch64_install_fast_tracepoint_jump_pad and
4179 aarch64_get_min_fast_tracepoint_insn_len.
4181 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4183 * Makefile.in (aarch64-insn.o): New rule.
4184 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4186 2015-09-21 Yao Qi <yao.qi@linaro.org>
4188 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4190 2015-09-21 Yao Qi <yao.qi@linaro.org>
4192 * tracepoint.c (max_jump_pad_size): Remove.
4194 2015-09-18 Yao Qi <yao.qi@linaro.org>
4196 * linux-aarch64-low.c: Don't include sys/uio.h.
4197 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4199 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4201 * tracepoint.c (eval_result_type): Change prototype.
4202 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4204 2015-09-15 Pedro Alves <palves@redhat.com>
4206 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4207 Check whether to report exec events instead of checking whether
4208 multiprocess is enabled.
4210 2015-09-15 Pedro Alves <palves@redhat.com>
4213 * remote-utils.c (prepare_resume_reply): Merge
4214 TARGET_WAITKIND_VFORK_DONE switch case with the
4215 TARGET_WAITKIND_FORKED case.
4217 2015-09-15 Yao Qi <yao.qi@linaro.org>
4219 * server.c (handle_query): Check string comparison using
4220 "else if" instead of "if".
4222 2015-09-15 Yao Qi <yao.qi@linaro.org>
4224 * server.c (vCont_supported): New global variable.
4225 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4226 matches. Append ";vContSupported+" to own_buf.
4227 (handle_v_requests): Append ";s;S" to own_buf if target supports
4228 hardware single step or vCont_supported is false.
4229 (capture_main): Set vCont_supported to zero.
4231 2015-09-15 Yao Qi <yao.qi@linaro.org>
4233 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4235 (linux_supports_hardware_single_step): ... New function.
4236 (linux_target_ops): Update.
4237 * lynx-low.c (lynx_target_ops): Set field
4238 supports_hardware_single_step to target_can_do_hardware_single_step.
4239 * nto-low.c (nto_target_ops): Likewise.
4240 * spu-low.c (spu_target_ops): Likewise.
4241 * win32-low.c (win32_target_ops): Likewise.
4242 * target.c (target_can_do_hardware_single_step): New function.
4243 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4244 Remove. <supports_hardware_single_step>: New field.
4245 (target_supports_conditional_breakpoints): Remove.
4246 (target_supports_hardware_single_step): New macro.
4247 (target_can_do_hardware_single_step): Declare.
4248 * server.c (handle_query): Use target_supports_hardware_single_step
4249 instead of target_supports_conditional_breakpoints.
4251 2015-09-15 Yao Qi <yao.qi@linaro.org>
4253 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4255 (struct linux_target_ops the_low_target): Install
4256 aarch64_linux_siginfo_fixup.
4258 2015-09-11 Don Breazeal <donb@codesourcery.com>
4259 Luis Machado <lgustavo@codesourcery.com>
4261 * linux-low.c (linux_mourn): Static declaration.
4262 (linux_arch_setup): Move in front of
4263 handle_extended_wait.
4264 (linux_arch_setup_thread): New function.
4265 (handle_extended_wait): Handle exec events. Call
4266 linux_arch_setup_thread. Make event_lwp argument a
4267 pointer-to-a-pointer.
4268 (check_zombie_leaders): Do not check stopped threads.
4269 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4270 (linux_low_filter_event): Add lwp and thread for exec'ing
4271 non-leader thread if leader thread has been deleted.
4272 Refactor code into linux_arch_setup_thread and call it.
4273 Pass child lwp pointer by reference to handle_extended_wait.
4274 (linux_wait_for_event_filtered): Update comment.
4275 (linux_wait_1): Prevent clobbering exec event status.
4276 (linux_supports_exec_events): New function.
4277 (linux_target_ops) <supports_exec_events>: Initialize new member.
4278 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4280 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4281 * server.c (report_exec_events): New global variable.
4282 (handle_query): Handle qSupported query for exec-events feature.
4283 (captured_main): Initialize report_exec_events.
4284 * server.h (report_exec_events): Declare new global variable.
4285 * target.h (struct target_ops) <supports_exec_events>: New
4287 (target_supports_exec_events): New macro.
4288 * win32-low.c (win32_target_ops) <supports_exec_events>:
4289 Initialize new member.
4291 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4293 * linux-low.c (linux_low_enable_btrace): Remove.
4294 (linux_target_ops): Replace linux_low_enable_btrace with
4295 linux_enable_btrace.
4297 2015-09-03 Yao Qi <yao.qi@linaro.org>
4299 * linux-aarch64-low.c (aarch64_insert_point): Call
4300 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4303 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4305 * linux-low.c (check_stopped_by_breakpoint): Use
4306 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4308 2015-08-27 Pedro Alves <palves@redhat.com>
4310 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4312 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4314 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4315 the XNEW-family equivalent.
4316 (compile_bytecodes): Likewise.
4317 * dll.c (loaded_dll): Likewise.
4318 * event-loop.c (append_callback_event): Likewise.
4319 (create_file_handler): Likewise.
4320 (create_file_event): Likewise.
4321 * hostio.c (handle_open): Likewise.
4322 * inferiors.c (add_thread): Likewise.
4323 (add_process): Likewise.
4324 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4325 * linux-arm-low.c (arm_new_process): Likewise.
4326 (arm_new_thread): Likewise.
4327 * linux-low.c (add_to_pid_list): Likewise.
4328 (linux_add_process): Likewise.
4329 (handle_extended_wait): Likewise.
4330 (add_lwp): Likewise.
4331 (enqueue_one_deferred_signal): Likewise.
4332 (enqueue_pending_signal): Likewise.
4333 (linux_resume_one_lwp_throw): Likewise.
4334 (linux_resume_one_thread): Likewise.
4335 (linux_read_memory): Likewise.
4336 (linux_write_memory): Likewise.
4337 * linux-mips-low.c (mips_linux_new_process): Likewise.
4338 (mips_linux_new_thread): Likewise.
4339 (mips_add_watchpoint): Likewise.
4340 * linux-x86-low.c (initialize_low_arch): Likewise.
4341 * lynx-low.c (lynx_add_process): Likewise.
4342 * mem-break.c (set_raw_breakpoint_at): Likewise.
4343 (set_breakpoint): Likewise.
4344 (add_condition_to_breakpoint): Likewise.
4345 (add_commands_to_breakpoint): Likewise.
4346 (clone_agent_expr): Likewise.
4347 (clone_one_breakpoint): Likewise.
4348 * regcache.c (new_register_cache): Likewise.
4349 * remote-utils.c (look_up_one_symbol): Likewise.
4350 * server.c (queue_stop_reply): Likewise.
4351 (start_inferior): Likewise.
4352 (queue_stop_reply_callback): Likewise.
4353 (handle_target_event): Likewise.
4354 * spu-low.c (fetch_ppc_memory): Likewise.
4355 (store_ppc_memory): Likewise.
4356 * target.c (set_target_ops): Likewise.
4357 * thread-db.c (thread_db_load_search): Likewise.
4358 (try_thread_db_load_1): Likewise.
4359 * tracepoint.c (add_tracepoint): Likewise.
4360 (add_tracepoint_action): Likewise.
4361 (create_trace_state_variable): Likewise.
4362 (cmd_qtdpsrc): Likewise.
4363 (cmd_qtro): Likewise.
4364 (add_while_stepping_state): Likewise.
4365 * win32-low.c (child_add_thread): Likewise.
4366 (get_image_name): Likewise.
4368 2015-08-25 Yao Qi <yao.qi@linaro.org>
4370 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4372 2015-08-25 Yao Qi <yao.qi@linaro.org>
4374 * Makefile.in (aarch64-linux.o): New rule.
4375 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4377 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4378 (aarch64_init_debug_reg_state): Make it extern.
4379 (aarch64_linux_prepare_to_resume): Remove.
4381 2015-08-25 Yao Qi <yao.qi@linaro.org>
4383 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4384 lwp_arch_private_info and ptid_of_lwp.
4386 2015-08-25 Yao Qi <yao.qi@linaro.org>
4388 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4389 Find proc_info by find_process_pid. All callers updated.
4391 2015-08-25 Yao Qi <yao.qi@linaro.org>
4393 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4395 (debug_reg_change_callback): Remove.
4396 (aarch64_notify_debug_reg_change): Remove.
4398 2015-08-25 Yao Qi <yao.qi@linaro.org>
4400 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4401 Call current_lwp_ptid.
4403 2015-08-25 Yao Qi <yao.qi@linaro.org>
4405 * linux-aarch64-low.c (debug_reg_change_callback): Use
4408 2015-08-25 Yao Qi <yao.qi@linaro.org>
4410 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4412 2015-08-25 Yao Qi <yao.qi@linaro.org>
4414 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4416 2015-08-25 Yao Qi <yao.qi@linaro.org>
4418 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4421 2015-08-25 Yao Qi <yao.qi@linaro.org>
4423 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4425 (debug_reg_change_callback): Remove argument entry and add argument
4426 lwp. Remove local variable thread. Don't print thread id in the
4427 debugging output. Don't check whether pid of thread equals to pid.
4428 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4429 iterate_over_lwps instead find_inferior.
4431 2015-08-24 Pedro Alves <palves@redhat.com>
4433 * inferiors.c (get_first_process): New function.
4434 * inferiors.h (get_first_process): New declaration.
4435 * remote-utils.c (read_ptid): Default to the first process in the
4436 list, instead of to the current thread's process.
4438 2015-08-24 Pedro Alves <palves@redhat.com>
4440 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4441 * event-loop.c: Likewise.
4442 * remote-utils.c: Likewise.
4443 * tracepoint.c: Likewise.
4445 2015-08-24 Pedro Alves <palves@redhat.com>
4447 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4450 2015-08-21 Pedro Alves <palves@redhat.com>
4452 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4453 instead of literal 1.
4455 2015-08-21 Pedro Alves <palves@redhat.com>
4457 * tdesc.c (default_description): Explicitly zero-initialize.
4459 2015-08-21 Pedro Alves <palves@redhat.com>
4462 * inferiors.c (remove_thread): Discard any pending stop reply for
4464 * server.c (remove_all_on_match_pid): Rename to ...
4465 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4467 (discard_queued_stop_replies): Change parameter to a ptid. Now
4469 (handle_v_kill, kill_inferior_callback, captured_main)
4470 (process_serial_event): Adjust.
4471 * server.h (discard_queued_stop_replies): Declare.
4473 2015-08-21 Pedro Alves <palves@redhat.com>
4475 * linux-low.c (wait_for_sigstop): Always switch to no thread
4476 selected if the previously current thread dies.
4477 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4478 process instead of the current thread's.
4479 * remote-utils.c (input_interrupt): Don't check if there's no
4481 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4482 current thread to the general thread fails, error out.
4483 (handle_qxfer_auxv, handle_qxfer_libraries)
4484 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4485 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4486 (handle_query): Check if there's a thread selected instead of
4487 checking whether there's any thread in the thread list.
4488 (handle_qxfer_threads, handle_qxfer_btrace)
4489 (handle_qxfer_btrace_conf): Don't error out early if there's no
4490 thread in the thread list.
4491 (handle_v_cont, myresume): Don't set the current thread to the
4493 (process_serial_event) <Hg handling>: Also set thread_id if the
4494 previous general thread is still alive.
4495 (process_serial_event) <g/G handling>: If setting the current
4496 thread to the general thread fails, error out.
4497 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4498 thread's lwp instead of the current thread's.
4499 * target.c (set_desired_thread): If the desired thread was not
4500 found, leave the current thread pointing to NULL. Return an int
4501 (boolean) indicating success.
4502 * target.h (set_desired_thread): Change return type to int.
4504 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4506 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4507 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4509 (ps_get_thread_area): New function.
4511 2015-08-19 Gary Benson <gbenson@redhat.com>
4513 * hostio.c (handle_pread): Do not attempt to read more data
4514 than hostio_reply_with_data can fit in a packet.
4516 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4518 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4520 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4522 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4524 2015-08-06 Pedro Alves <palves@redhat.com>
4526 * tracepoint.c (expr_eval_result): Now an int.
4528 2015-08-06 Pedro Alves <palves@redhat.com>
4530 * gdbthread.h (struct regcache): Forward declare.
4531 (struct thread_info) <regcache_data>: Now a struct regcache
4533 * inferiors.c (inferior_regcache_data)
4534 (set_inferior_regcache_data): Now work with struct regcache
4536 * inferiors.h (struct regcache): Forward declare.
4537 (inferior_regcache_data, set_inferior_regcache_data): Now work
4538 with struct regcache pointers.
4539 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4540 (free_register_cache_thread): Remove struct regcache pointer
4543 2015-08-06 Pedro Alves <palves@redhat.com>
4545 * server.c (captured_main): On error, print the exception message
4546 to stderr, and if run_once is set, throw a quit.
4548 2015-08-06 Pedro Alves <palves@redhat.com>
4550 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4553 2015-08-06 Pedro Alves <palves@redhat.com>
4555 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4556 reading beyond the passed in buffer length.
4558 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4560 * tracepoint.c (symbol_list) <required>: Remove.
4562 2015-08-06 Pedro Alves <palves@redhat.com>
4564 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4565 count if stopping and suspending threads.
4566 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4567 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4568 (linux_detach): Complete an ongoing step-over.
4569 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4571 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4572 (linux_wait_1): If passing a signal to the inferior after
4573 finishing a step-over, unsuspend and re-resume all lwps. If we
4574 see a single-step event but the thread should be continuing, don't
4575 pass the trap to gdb.
4576 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4577 internal_error instead of gdb_assert.
4578 (enqueue_pending_signal): New function.
4579 (check_ptrace_stopped_lwp_gone): Add debug output.
4580 (start_step_over): Use internal_error instead of gdb_assert.
4581 (complete_ongoing_step_over): New function.
4582 (linux_resume_one_thread): Don't resume a suspended thread.
4583 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4586 2015-08-06 Pedro Alves <palves@redhat.com>
4588 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4589 (linux_thread_alive): Use lwp_is_marked_dead.
4590 (extended_event_reported): Delete.
4591 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4592 instead of extended_event_reported.
4593 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4595 (lwp_is_marked_dead): New function.
4596 (lwp_running): Use lwp_is_marked_dead.
4597 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4600 2015-08-06 Pedro Alves <palves@redhat.com>
4602 * linux-low.c (linux_wait_1): Move fork event output out of the
4603 !report_to_gdb check. Pass event_child->waitstatus to
4604 target_waitstatus_to_string instead of ourstatus.
4606 2015-08-04 Yao Qi <yao.qi@linaro.org>
4608 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4609 if current_thread is 32 bit.
4611 2015-08-04 Yao Qi <yao.qi@linaro.org>
4613 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4614 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4615 * server.c (extended_protocol): Remove "static".
4616 * server.h (extended_protocol): Declare it.
4618 2015-08-04 Yao Qi <yao.qi@linaro.org>
4620 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4621 both aarch64 and aarch32.
4622 (aarch64_set_pc): Likewise.
4624 2015-08-04 Yao Qi <yao.qi@linaro.org>
4626 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4627 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4628 arm-with-neon.xml to srv_xmlfiles.
4629 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4630 (is_64bit_tdesc): New function.
4631 (aarch64_linux_read_description): New function.
4632 (aarch64_arch_setup): Call aarch64_linux_read_description.
4633 (regs_info): Rename to regs_info_aarch64.
4634 (aarch64_regs_info): Return right regs_info.
4635 (initialize_low_arch): Call initialize_low_arch_aarch32.
4637 2015-08-04 Yao Qi <yao.qi@linaro.org>
4639 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4640 * linux-aarch32-low.c: New file.
4641 * linux-aarch32-low.h: New file.
4642 * linux-arm-low.c (arm_fill_gregset): Move it to
4643 linux-aarch32-low.c.
4644 (arm_store_gregset): Likewise.
4645 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4646 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4647 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4648 (regs_info): Rename to regs_info_arm.
4649 (arm_regs_info): Return regs_info_aarch32 if
4650 have_ptrace_getregset is 1 and target description is
4651 arm_with_neon or arm_with_vfpv3.
4652 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4653 Call initialize_low_arch_aarch32 instead.
4655 2015-08-04 Yao Qi <yao.qi@linaro.org>
4657 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4658 * linux-low.c: ... here.
4659 * linux-low.h (have_ptrace_getregset): Declare it.
4661 2015-08-04 Pedro Alves <palves@redhat.com>
4663 * thread-db.c (struct thread_db): Use new typedefs.
4664 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4666 (disable_thread_event_reporting): Cast result of dlsym to
4667 destination function pointer type.
4668 (thread_db_mourn): Use td_ta_delete_ftype.
4670 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4672 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4674 (CDX_BREAKPOINT): Define for R2.
4675 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4676 (the_low_target): Add comments.
4678 2015-07-30 Yao Qi <yao.qi@linaro.org>
4680 * linux-arm-low.c (arm_hwcap): Remove it.
4681 (arm_read_description): New local variable arm_hwcap. Don't
4682 set arm_hwcap to zero.
4684 2015-07-30 Yao Qi <yao.qi@linaro.org>
4686 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4687 Use regcache->tdesc instead.
4688 (arm_store_wmmxregset): Likewise.
4689 (arm_fill_vfpregset): Likewise.
4690 (arm_store_vfpregset): Likewise.
4692 2015-07-30 Yao Qi <yao.qi@linaro.org>
4694 * linux-arm-low.c: Include arch/arm.h.
4695 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4696 (arm_store_gregset): Likewise.
4698 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4700 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4701 ptrace's 4th parameter.
4703 2015-07-27 Yao Qi <yao.qi@linaro.org>
4705 * configure.srv (case aarch64*-*-linux*): Don't set
4708 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4710 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4712 * linux-arm-low.c: Likewise.
4713 * linux-cris-low.c: Likewise.
4714 * linux-crisv32-low.c: Likewise.
4715 * linux-low.c: Likewise.
4716 * linux-m68k-low.c: Likewise.
4717 * linux-mips-low.c: Likewise.
4718 * linux-nios2-low.c: Likewise.
4719 * linux-s390-low.c: Likewise.
4720 * linux-sparc-low.c: Likewise.
4721 * linux-tic6x-low.c: Likewise.
4722 * linux-tile-low.c: Likewise.
4723 * linux-x86-low.c: Likewise.
4725 2015-07-24 Pedro Alves <palves@redhat.com>
4727 * config.in: Regenerate.
4728 * configure: Regenerate.
4730 2015-07-24 Pedro Alves <palves@redhat.com>
4732 * acinclude.m4: Include ../ptrace.m4.
4733 * configure.ac: Call GDB_AC_PTRACE.
4734 * config.in, configure: Regenerate.
4736 2015-07-24 Yao Qi <yao.qi@linaro.org>
4738 * linux-low.c (linux_create_inferior): Remove setting to
4739 proc->priv->new_inferior.
4740 (linux_attach): Likewise.
4741 (linux_low_filter_event): Likewise.
4742 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4744 2015-07-24 Yao Qi <yao.qi@linaro.org>
4746 * linux-low.c (linux_arch_setup): New function.
4747 (linux_low_filter_event): If proc->tdesc is NULL and
4748 proc->attached is true, call the_low_target.arch_setup.
4749 Otherwise, keep status pending, and return.
4750 (linux_resume_one_lwp_throw): Don't call get_pc if
4751 thread->while_stepping isn't NULL. Don't call
4752 get_thread_regcache if proc->tdesc is NULL.
4753 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4754 (linux_target_ops): Install arch_setup.
4755 * server.c (start_inferior): Call the_target->arch_setup.
4756 * target.h (struct target_ops) <arch_setup>: New field.
4757 (target_arch_setup): New marco.
4758 * lynx-low.c (lynx_target_ops): Update.
4759 * nto-low.c (nto_target_ops): Update.
4760 * spu-low.c (spu_target_ops): Update.
4761 * win32-low.c (win32_target_ops): Update.
4763 2015-07-24 Yao Qi <yao.qi@linaro.org>
4765 * linux-low.c (linux_add_process): Don't set
4766 proc->priv->new_inferior.
4767 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4768 (linux_attach): Likewise.
4770 2015-07-24 Yao Qi <yao.qi@linaro.org>
4772 * server.c (start_inferior): Code refactor.
4774 2015-07-24 Yao Qi <yao.qi@linaro.org>
4776 * server.c (process_serial_event): Set general_thread.
4778 2015-07-21 Yao Qi <yao.qi@linaro.org>
4780 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4781 aarch64_linux_get_debug_reg_capacity.
4783 2015-07-17 Yao Qi <yao.qi@linaro.org>
4785 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4786 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4787 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4788 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4789 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4790 (AARCH64_HWP_ALIGNMENT): Likewise.
4791 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4792 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4793 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4794 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4795 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4796 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4797 (struct aarch64_debug_reg_state): Likewise.
4798 (struct arch_lwp_info): Likewise.
4799 (aarch64_align_watchpoint): Likewise.
4800 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4801 (aarch64_watchpoint_length): Likewise.
4802 (aarch64_point_encode_ctrl_reg): Likewise
4803 (aarch64_point_is_aligned): Likewise.
4804 (aarch64_align_watchpoint): Likewise.
4805 (aarch64_linux_set_debug_regs):
4806 (aarch64_dr_state_insert_one_point): Likewise.
4807 (aarch64_dr_state_remove_one_point): Likewise.
4808 (aarch64_handle_breakpoint): Likewise.
4809 (aarch64_handle_aligned_watchpoint): Likewise.
4810 (aarch64_handle_unaligned_watchpoint): Likewise.
4811 (aarch64_handle_watchpoint): Likewise.
4813 2015-07-17 Yao Qi <yao.qi@linaro.org>
4815 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4816 and don't aarch64_get_debug_reg_state. All callers update.
4817 (aarch64_handle_aligned_watchpoint): Likewise.
4818 (aarch64_handle_unaligned_watchpoint): Likewise.
4819 (aarch64_handle_watchpoint): Likewise.
4820 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4821 (aarch64_remove_point): Likewise.
4823 2015-07-17 Yao Qi <yao.qi@linaro.org>
4825 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4827 (aarch64_handle_unaligned_watchpoint): Likewise.
4829 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4831 Revert the previous 3 commits:
4832 Move gdb_regex* to common/
4833 Move linux_find_memory_regions_full & co.
4834 gdbserver build-id attribute generator
4836 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4837 Jan Kratochvil <jan.kratochvil@redhat.com>
4839 gdbserver build-id attribute generator.
4840 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4841 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4842 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4844 (get_dynamic): Use find_pdhr to traverse program headers.
4845 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4846 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4847 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4848 (get_hex_build_id): New.
4849 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4850 to reply XML document.
4852 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4853 Jan Kratochvil <jan.kratochvil@redhat.com>
4855 * target.c: Include target/target-utils.h and fcntl.h.
4856 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4857 (target_fileio_read_stralloc): New functions.
4859 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4861 * Makefile.in (OBS): Add gdb_regex.o.
4863 * config.in: Rebuilt.
4864 * configure: Rebuilt.
4866 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4867 Jan Kratochvil <jan.kratochvil@redhat.com>
4869 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4870 * Makefile.in (OBS): Add target-utils.o.
4871 (linux-maps.o, target-utils.o): New.
4872 * configure.srv (srv_linux_obj): Add linux-maps.o.
4874 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4876 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4878 (the_low_target): Install it.
4880 2015-07-14 Pedro Alves <palves@redhat.com>
4882 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4883 Instead, ignore ECHILD, and throw an error for other errnos.
4885 2015-07-10 Pedro Alves <palves@redhat.com>
4887 * event-loop.c (struct callback_event) <data>: Change type to
4888 gdb_client_data instance instead of gdb_client_data pointer.
4889 (append_callback_event): Adjust.
4891 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4893 * linux-aarch64-low.c: Add comments for each linux_target_ops
4894 method. Remove comments already covered in target_ops and
4895 linux_target_ops definitions.
4896 (the_low_target): Add comments for each unimplemented method.
4898 2015-07-09 Yao Qi <yao.qi@linaro.org>
4900 * linux-aarch64-low.c (aarch64_regmap): Remove.
4901 (aarch64_usrregs_info): Remove.
4902 (regs_info): Set field usrregs to NULL.
4904 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4906 * linux-low.c: Include "rsp-low.h"
4907 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4908 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4909 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4910 (handle_btrace_enable_pt): New.
4911 (handle_btrace_general_set): Support "pt".
4912 (handle_btrace_conf_general_set): Support "pt:size".
4914 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4916 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4919 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4921 * linux-aarch64-low.c: Remove comment about endianness.
4922 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4923 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4926 2015-06-24 Gary Benson <gbenson@redhat.com>
4928 * linux-i386-ipa.c (stdint.h): Do not include.
4929 * lynx-i386-low.c (stdint.h): Likewise.
4930 * lynx-ppc-low.c (stdint.h): Likewise.
4931 * mem-break.c (stdint.h): Likewise.
4932 * thread-db.c (stdint.h): Likewise.
4933 * tracepoint.c (stdint.h): Likewise.
4934 * win32-low.c (stdint.h): Likewise.
4936 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4938 * server.c (write_qxfer_response): Update call to
4939 remote_escape_output.
4941 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4942 Jan Kratochvil <jan.kratochvil@redhat.com>
4944 Merge multiple hex conversions.
4945 * gdbreplay.c (tohex): Rename to 'fromhex'.
4946 (logchar): Use fromhex.
4948 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4950 * server.c (handle_qxfer_libraries): Set `version' attribute for
4953 2015-06-10 Gary Benson <gbenson@redhat.com>
4955 * target.h (struct target_ops) <multifs_open>: New field.
4956 <multifs_unlink>: Likewise.
4957 <multifs_readlink>: Likewise.
4958 * linux-low.c (nat/linux-namespaces.h): New include.
4959 (linux_target_ops): Initialize the_target->multifs_open,
4960 the_target->multifs_unlink and the_target->multifs_readlink.
4961 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4962 * hostio.c (hostio_fs_pid): New static variable.
4963 (hostio_handle_new_gdb_connection): New function.
4964 (handle_setfs): Likewise.
4965 (handle_open): Use the_target->multifs_open as appropriate.
4966 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4967 (handle_readlink): Use the_target->multifs_readlink as
4969 (handle_vFile): Handle vFile:setfs packets.
4970 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4971 after target_handle_new_gdb_connection.
4973 2015-06-10 Gary Benson <gbenson@redhat.com>
4975 * configure.ac (AC_CHECK_FUNCS): Add setns.
4976 * config.in: Regenerate.
4977 * configure: Likewise.
4978 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4979 (linux-namespaces.o): New rule.
4980 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4982 2015-06-09 Gary Benson <gbenson@redhat.com>
4984 * hostio.c (handle_open): Process mode argument with
4985 fileio_to_host_mode.
4987 2015-06-01 Yao Qi <yao.qi@linaro.org>
4989 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4990 * linux-x86-low.c: Likewise.
4992 2015-05-28 Don Breazeal <donb@codesourcery.com>
4994 * linux-low.c (handle_extended_wait): Initialize
4995 thread_info.last_resume_kind for new fork children.
4997 2015-05-15 Pedro Alves <palves@redhat.com>
4999 * target.h (target_handle_new_gdb_connection): Rewrite using if
5000 wrapped in do/while.
5002 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5004 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5005 * configure, config.in: Regenerate.
5006 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5009 2015-05-12 Don Breazeal <donb@codesourcery.com>
5011 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5012 PTRACE_EVENT_VFORK_DONE.
5013 (linux_low_ptrace_options, extended_event_reported): Add vfork
5015 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5016 and "vforkdone" for RSP 'T' Stop Reply Packet.
5017 * server.h (report_vfork_events): Declare
5020 2015-05-12 Don Breazeal <donb@codesourcery.com>
5022 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5023 (the_low_target) <new_fork>: Initialize new member.
5024 * linux-arm-low.c (arm_new_fork): New function.
5025 (the_low_target) <new_fork>: Initialize new member.
5026 * linux-low.c (handle_extended_wait): Call new target function
5028 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5029 * linux-mips-low.c (mips_add_watchpoint): New function
5030 extracted from mips_insert_point.
5031 (the_low_target) <new_fork>: Initialize new member.
5032 (mips_linux_new_fork): New function.
5033 (mips_insert_point): Call mips_add_watchpoint.
5034 * linux-x86-low.c (x86_linux_new_fork): New function.
5035 (the_low_target) <new_fork>: Initialize new member.
5037 2015-05-12 Don Breazeal <donb@codesourcery.com>
5039 * linux-low.c (handle_extended_wait): Implement return value,
5040 rename argument 'event_child' to 'event_lwp', handle
5041 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5042 (linux_low_ptrace_options): New function.
5043 (linux_low_filter_event): Call linux_low_ptrace_options,
5044 use different argument fo linux_enable_event_reporting,
5045 use return value from handle_extended_wait.
5046 (extended_event_reported): New function.
5047 (linux_wait_1): Call extended_event_reported and set
5048 status to report fork events.
5049 (linux_write_memory): Add pid to debug message.
5050 (reset_lwp_ptrace_options_callback): New function.
5051 (linux_handle_new_gdb_connection): New function.
5052 (linux_target_ops): Initialize new structure member.
5053 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5054 * lynx-low.c: Initialize new structure member.
5055 * remote-utils.c (prepare_resume_reply): Implement stop reason
5056 "fork" for "T" stop message.
5057 * server.c (handle_query): Call handle_new_gdb_connection.
5058 * server.h (report_fork_events): Declare global flag.
5059 * target.h (struct target_ops) <handle_new_gdb_connection>:
5061 (target_handle_new_gdb_connection): New macro.
5062 * win32-low.c: Initialize new structure member.
5064 2015-05-12 Don Breazeal <donb@codesourcery.com>
5066 * mem-break.c (APPEND_TO_LIST): Define macro.
5067 (clone_agent_expr): New function.
5068 (clone_one_breakpoint): New function.
5069 (clone_all_breakpoints): New function.
5070 * mem-break.h: Declare new functions.
5072 2015-05-12 Don Breazeal <donb@codesourcery.com>
5074 * linux-low.c (linux_supports_fork_events): New function.
5075 (linux_supports_vfork_events): New function.
5076 (linux_target_ops): Initialize new structure members.
5077 (initialize_low): Call linux_check_ptrace_features.
5078 * lynx-low.c (lynx_target_ops): Initialize new structure
5080 * server.c (report_fork_events, report_vfork_events):
5082 (handle_query): Add new features to qSupported packet and
5084 (captured_main): Initialize new global variables.
5085 * target.h (struct target_ops) <supports_fork_events>:
5087 <supports_vfork_events>: New member.
5088 (target_supports_fork_events): New macro.
5089 (target_supports_vfork_events): New macro.
5090 * win32-low.c (win32_target_ops): Initialize new structure
5093 2015-05-12 Gary Benson <gbenson@redhat.com>
5095 * server.c (handle_qxfer_exec_file): Use current process
5098 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5100 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5101 Remove HAVE_PTRACE_GETREGS conditionals.
5102 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5103 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5105 2015-05-08 Yao Qi <yao.qi@linaro.org>
5107 * linux-low.c (linux_supports_conditional_breakpoints): New
5109 (linux_target_ops): Install new target method.
5110 * lynx-low.c (lynx_target_ops): Install NULL hook for
5111 supports_conditional_breakpoints.
5112 * nto-low.c (nto_target_ops): Likewise.
5113 * spu-low.c (spu_target_ops): Likewise.
5114 * win32-low.c (win32_target_ops): Likewise.
5115 * server.c (handle_query): Check
5116 target_supports_conditional_breakpoints.
5117 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5119 (target_supports_conditional_breakpoints): New macro.
5121 2015-05-06 Pedro Alves <palves@redhat.com>
5124 * server.c (start_inferior): If the process exits, mourn it.
5126 2015-04-21 Gary Benson <gbenson@redhat.com>
5128 * hostio.c (fileio_open_flags_to_host): Factored out to
5129 fileio_to_host_openflags in common/fileio.c. Single use
5132 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5134 * linux-xtensa-low.c (xtensa_fill_gregset)
5135 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5138 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5140 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5141 (regs_info): Replace usrregs pointer with NULL.
5143 2015-04-17 Gary Benson <gbenson@redhat.com>
5145 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5146 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5147 * server.c (handle_qxfer_exec_file): New function.
5148 (qxfer_packets): Add exec-file entry.
5149 (handle_query): Report qXfer:exec-file:read as supported packet.
5151 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5153 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5155 2015-04-09 Gary Benson <gbenson@redhat.com>
5157 * hostio-errno.c (errno_to_fileio_error): Remove function.
5158 Update caller to use remote_fileio_to_fio_error.
5160 2015-04-09 Yao Qi <yao.qi@linaro.org>
5162 * linux-low.c (linux_insert_point): Call
5163 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5164 (linux_remove_point): Call remove_memory_breakpoint if type is
5166 * linux-x86-low.c (x86_insert_point): Don't call
5167 insert_memory_breakpoint.
5168 (x86_remove_point): Don't call remove_memory_breakpoint.
5170 2015-04-01 Pedro Alves <palves@redhat.com>
5171 Cleber Rosa <crosa@redhat.com>
5173 * server.c (gdbserver_usage): Reorganize and extend the usage
5176 2015-03-24 Pedro Alves <palves@redhat.com>
5178 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5179 output. Also dump TRAP_TRACE.
5180 (linux_low_filter_event): In debug output, distinguish a
5181 resume_stop SIGSTOP from a delayed SIGSTOP.
5183 2015-03-24 Gary Benson <gbenson@redhat.com>
5185 * linux-x86-low.c (x86_linux_new_thread): Moved to
5187 (x86_linux_prepare_to_resume): Likewise.
5189 2015-03-24 Gary Benson <gbenson@redhat.com>
5191 * Makefile.in (x86-linux-dregs.o): New rule.
5192 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5193 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5194 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5195 (x86_linux_dr_get): Likewise.
5196 (x86_linux_dr_set): Likewise.
5197 (update_debug_registers_callback): Likewise.
5198 (x86_linux_dr_set_addr): Likewise.
5199 (x86_linux_dr_get_addr): Likewise.
5200 (x86_linux_dr_set_control): Likewise.
5201 (x86_linux_dr_get_control): Likewise.
5202 (x86_linux_dr_get_status): Likewise.
5203 (x86_linux_update_debug_registers): Likewise.
5205 2015-03-24 Gary Benson <gbenson@redhat.com>
5207 * linux-x86-low.c (x86_linux_update_debug_registers):
5208 New function, factored out from...
5209 (x86_linux_prepare_to_resume): ...this.
5211 2015-03-24 Gary Benson <gbenson@redhat.com>
5213 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5214 (x86_linux_dr_set): Likewise.
5215 (update_debug_registers_callback): Likewise.
5216 (x86_linux_dr_set_addr): Likewise.
5217 (x86_linux_dr_get_addr): Likewise.
5218 (x86_linux_dr_set_control): Likewise.
5219 (x86_linux_dr_get_control): Likewise.
5220 (x86_linux_dr_get_status): Likewise.
5221 (x86_linux_prepare_to_resume): Likewise.
5223 2015-03-24 Gary Benson <gbenson@redhat.com>
5225 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5226 Use perror_with_name. Pass string through gettext.
5227 (x86_linux_dr_set): Likewise.
5229 2015-03-24 Gary Benson <gbenson@redhat.com>
5231 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5232 (x86_linux_dr_set_addr): ...this.
5233 (x86_dr_low_get_addr): Rename to...
5234 (x86_linux_dr_get_addr): ...this.
5235 (x86_dr_low_set_control): Rename to...
5236 (x86_linux_dr_set_control): ...this.
5237 (x86_dr_low_get_control): Rename to...
5238 (x86_linux_dr_get_control): ...this.
5239 (x86_dr_low_get_status): Rename to...
5240 (x86_linux_dr_get_status): ...this.
5241 (x86_dr_low): Update with new function names.
5243 2015-03-24 Gary Benson <gbenson@redhat.com>
5245 * Makefile.in (x86-linux.o): New rule.
5246 * configure.srv: Add x86-linux.o to relevant targets.
5247 * linux-low.c (lwp_set_arch_private_info): New function.
5248 (lwp_arch_private_info): Likewise.
5249 * linux-x86-low.c: Include nat/x86-linux.h.
5250 (arch_lwp_info): Removed structure.
5251 (update_debug_registers_callback):
5252 Use lwp_set_debug_registers_changed.
5253 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5254 and lwp_set_debug_registers_changed.
5255 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5257 2015-03-24 Gary Benson <gbenson@redhat.com>
5259 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5260 * linux-arm-low.c (arm_new_thread): Likewise.
5261 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5262 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5263 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5264 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5266 2015-03-24 Gary Benson <gbenson@redhat.com>
5268 * linux-low.c (ptid_of_lwp): New function.
5269 (lwp_is_stopped): Likewise.
5270 (lwp_stop_reason): Likewise.
5271 * linux-x86-low.c (update_debug_registers_callback):
5273 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5276 2015-03-24 Gary Benson <gbenson@redhat.com>
5278 * linux-low.h (linux_stop_lwp): Remove declaration.
5280 2015-03-24 Gary Benson <gbenson@redhat.com>
5282 * linux-low.h: Include nat/linux-nat.h.
5283 * linux-low.c (iterate_over_lwps_args): New structure.
5284 (iterate_over_lwps_filter): New function.
5285 (iterate_over_lwps): Likewise.
5286 * linux-x86-low.c (update_debug_registers_callback):
5287 Update signature to what iterate_over_lwps expects.
5288 Remove PID check that iterate_over_lwps now performs.
5289 (x86_dr_low_set_addr): Use iterate_over_lwps.
5290 (x86_dr_low_set_control): Likewise.
5292 2015-03-24 Gary Benson <gbenson@redhat.com>
5294 * linux-x86-low.c (x86_debug_reg_state): New function.
5295 (x86_linux_prepare_to_resume): Use the above.
5297 2015-03-24 Gary Benson <gbenson@redhat.com>
5299 * linux-low.c (current_lwp_ptid): New function.
5300 * linux-x86-low.c: Include nat/linux-nat.h.
5301 (x86_dr_low_get_addr): Use current_lwp_ptid.
5302 (x86_dr_low_get_control): Likewise.
5303 (x86_dr_low_get_status): Likewise.
5305 2015-03-20 Pedro Alves <palves@redhat.com>
5307 * tracepoint.c (cmd_qtstatus): Make "str" const.
5309 2015-03-20 Pedro Alves <palves@redhat.com>
5311 * server.c (handle_general_set): Make "req_str" const.
5313 2015-03-19 Pedro Alves <palves@redhat.com>
5315 * linux-low.c (linux_resume_one_lwp): Rename to ...
5316 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5317 instead call perror_with_name.
5318 (check_ptrace_stopped_lwp_gone): New function.
5319 (linux_resume_one_lwp): Reimplement as wrapper around
5320 linux_resume_one_lwp_throw that swallows errors if the LWP is
5323 2015-03-19 Pedro Alves <palves@redhat.com>
5325 * linux-low.c (count_events_callback, select_event_lwp_callback):
5326 No longer check whether the thread has resume_stop as last resume
5329 2015-03-19 Pedro Alves <palves@redhat.com>
5331 * linux-low.c (count_events_callback, select_event_lwp_callback):
5332 Use the lwp's status_pending_p field, not the thread's.
5334 2015-03-19 Pedro Alves <palves@redhat.com>
5336 * linux-low.c (select_event_lwp_callback): Update comments to
5337 no longer mention SIGTRAP.
5339 2015-03-18 Gary Benson <gbenson@redhat.com>
5341 * server.c (handle_query): Do not report vFile:fstat as supported.
5343 2015-03-11 Gary Benson <gbenson@redhat.com>
5345 * hostio.c (sys/types.h): New include.
5346 (sys/stat.h): Likewise.
5347 (common-remote-fileio.h): Likewise.
5348 (handle_fstat): New function.
5349 (handle_vFile): Handle vFile:fstat packets.
5351 2015-03-11 Gary Benson <gbenson@redhat.com>
5353 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5354 struct stat.st_blocks and struct stat.st_blksize.
5355 * configure: Regenerate.
5356 * config.in: Likewise.
5357 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5358 (OBS): Add common-remote-fileio.o.
5359 (common-remote-fileio.o): New rule.
5361 2015-03-09 Pedro Alves <palves@redhat.com>
5363 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5364 'struct sockaddr' pointer in 'accept' call.
5366 2015-03-09 Pedro Alves <palves@redhat.com>
5369 2015-03-07 Pedro Alves <palves@redhat.com>
5370 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5371 or <winsock2.h> here. Instead include "gdb_socket.h".
5372 (remote_open): Use union gdb_sockaddr_u.
5373 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5374 or <winsock2.h> here. Instead include "gdb_socket.h".
5375 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5376 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5378 (init_named_socket, gdb_agent_helper_thread): Use union
5381 2015-03-07 Pedro Alves <palves@redhat.com>
5383 * configure.ac (build_warnings): Move
5384 -Wdeclaration-after-statement to the C-specific set.
5385 * configure: Regenerate.
5387 2015-03-07 Pedro Alves <palves@redhat.com>
5389 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5390 or <winsock2.h> here. Instead include "gdb_socket.h".
5391 (remote_open): Use union gdb_sockaddr_u.
5392 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5393 or <winsock2.h> here. Instead include "gdb_socket.h".
5394 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5395 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5397 (init_named_socket, gdb_agent_helper_thread): Use union
5400 2015-03-07 Pedro Alves <palves@redhat.com>
5402 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5405 2015-03-06 Yao Qi <yao.qi@linaro.org>
5407 * linux-aarch64-low.c (aarch64_insert_point): Use
5408 show_debug_regs as a boolean.
5409 (aarch64_remove_point): Likewise.
5411 2015-03-05 Pedro Alves <palves@redhat.com>
5413 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5414 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5415 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5416 * nto-low.c (nto_target_ops): Likewise.
5417 * spu-low.c (spu_target_ops): Likewise.
5418 * win32-low.c (win32_target_ops): Likewise.
5420 2015-03-04 Pedro Alves <palves@redhat.com>
5422 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5423 Decide whether a breakpoint triggered based on the SIGTRAP's
5425 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5426 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5427 (linux_low_filter_event): Check for breakpoints before checking
5429 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5431 (linux_stopped_by_sw_breakpoint)
5432 (linux_supports_stopped_by_sw_breakpoint)
5433 (linux_stopped_by_hw_breakpoint)
5434 (linux_supports_stopped_by_hw_breakpoint): New functions.
5435 (linux_target_ops): Install new target methods.
5437 2015-03-04 Pedro Alves <palves@redhat.com>
5439 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5440 * server.c (swbreak_feature, hwbreak_feature): New globals.
5441 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5442 (captured_main): Clear swbreak_feature and hwbreak_feature.
5443 * server.h (swbreak_feature, hwbreak_feature): Declare.
5444 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5445 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5446 supports_stopped_by_hw_breakpoint>: New fields.
5447 (target_supports_stopped_by_sw_breakpoint)
5448 (target_stopped_by_sw_breakpoint)
5449 (target_supports_stopped_by_hw_breakpoint)
5450 (target_stopped_by_hw_breakpoint): Declare.
5452 2015-03-04 Pedro Alves <palves@redhat.com>
5454 enum lwp_stop_reason -> enum target_stop_reason
5455 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5456 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5457 (linux_wait_1, stuck_in_jump_pad_callback)
5458 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5459 (linux_stopped_by_watchpoint):
5460 * linux-low.h (enum lwp_stop_reason): Delete.
5461 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5462 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5464 2015-03-04 Yao Qi <yao.qi@linaro.org>
5466 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5468 2015-03-03 Gary Benson <gbenson@redhat.com>
5470 * hostio.c (handle_vFile): Fix prefix lengths.
5472 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5474 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5477 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5479 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5480 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5481 (clean): Add "rm -f" for above C files.
5482 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5483 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5484 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5485 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5486 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5487 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5488 (init_registers_s390x_vx_linux64)
5489 (init_registers_s390x_tevx_linux64)
5490 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5491 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5493 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5494 (s390_store_vxrs_high): New functions.
5495 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5497 (s390_arch_setup): Add logic for selecting one of the new target
5498 descriptions. Activate the new vector regsets if applicable.
5499 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5500 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5501 and init_registers_s390x_tevx_linux64.
5503 2015-03-01 Pedro Alves <palves@redhat.com>
5505 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5508 2015-02-27 Pedro Alves <palves@redhat.com>
5510 * linux-x86-low.c (u_debugreg_offset): New function.
5511 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5513 2015-02-27 Pedro Alves <palves@redhat.com>
5515 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5516 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5517 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5518 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5519 (ps_lsetfpregs, ps_getpid)
5520 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5521 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5522 (ps_lsetxregs, ps_plog): Declare.
5524 2015-02-27 Pedro Alves <palves@redhat.com>
5526 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5527 IP_AGENT_EXPORT_FUNC.
5528 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5529 IP_AGENT_EXPORT_FUNC.
5530 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5531 (IP_AGENT_EXPORT): Delete.
5532 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5533 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5534 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5535 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5536 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5537 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5538 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5539 (traceframe_read_count, traceframe_write_count)
5540 (traceframes_created, trace_state_variables, get_raw_reg)
5541 (get_trace_state_variable_value, set_trace_state_variable_value)
5542 (ust_loaded, helper_thread_id, cmd_buf): Use
5543 IPA_SYM_EXPORTED_NAME.
5544 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5545 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5546 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5547 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5548 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5549 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5550 EXTERN_C_PUSH/EXTERN_C_POP.
5551 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5552 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5553 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5554 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5555 (traceframe_write_count, traceframe_read_count)
5556 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5557 (about_to_request_buffer_space, get_trace_state_variable_value)
5558 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5559 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5560 EXTERN_C_PUSH/EXTERN_C_POP.
5561 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5562 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5563 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5564 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5565 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5566 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5567 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5568 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5570 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5571 (IP_AGENT_EXPORT_VAR_DECL): Define.
5573 (gdb_agent_get_raw_reg): Declare.
5575 2015-02-27 Tom Tromey <tromey@redhat.com>
5576 Pedro Alves <palves@redhat.com>
5578 Rename symbols whose names are reserved C++ keywords throughout.
5580 2015-02-27 Pedro Alves <palves@redhat.com>
5582 * Makefile.in (COMPILER): New, get it from autoconf.
5583 (CXX): Get from autoconf instead.
5584 (COMPILE.pre): Use COMPILER.
5585 (CC-LD): Rename to ...
5586 (CC_LD): ... this. Use COMPILER.
5587 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5588 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5589 * acinclude.m4: Include build-with-cxx.m4.
5590 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5591 Disable -Werror by default if building in C++ mode.
5592 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5593 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5594 the C++ compiler. Save/restore CXXFLAGS too.
5595 * configure: Regenerate.
5597 2015-02-27 Pedro Alves <palves@redhat.com>
5599 * acinclude.m4: Include libiberty.m4.
5600 * configure.ac: Call libiberty_INIT.
5601 * config.in, configure: Regenerate.
5603 2015-02-26 Pedro Alves <palves@redhat.com>
5605 * linux-low.c (linux_wait_1): When incrementing the PC past a
5606 program breakpoint always use the_low_target.breakpoint_len as
5607 increment, rather than the maximum between that and
5608 the_low_target.decr_pc_after_break.
5610 2015-02-23 Pedro Alves <palves@redhat.com>
5612 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5613 thread was doing a step-over; always adjust the PC if
5614 we stepped over a permanent breakpoint.
5615 (linux_wait_1): If we stepped over breakpoint that was on top of a
5616 permanent breakpoint, manually advance the PC past it.
5618 2015-02-23 Pedro Alves <palves@redhat.com>
5620 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5622 (x86_fill_gregset, x86_store_gregset): Use it when handling
5625 2015-02-20 Pedro Alves <palves@redhat.com>
5627 * thread-db.c: Include "nat/linux-procfs.h".
5628 (thread_db_init): Skip listing new threads if the kernel supports
5629 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5631 2015-02-20 Pedro Alves <palves@redhat.com>
5633 * linux-low.c (status_pending_p_callback): Use ptid_match.
5635 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5637 PR breakpoints/16812
5638 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5639 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5640 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5642 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5644 PR breakpoints/15956
5645 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5647 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5649 * linux-low.c (linux_low_btrace_conf): Print size.
5650 * server.c (handle_btrace_conf_general_set): New.
5651 (hanle_general_set): Call handle_btrace_conf_general_set.
5652 (handle_query): Report Qbtrace-conf:bts:size as supported.
5654 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5656 * linux-low.c (linux_low_enable_btrace): Update parameters.
5657 (linux_low_btrace_conf): New.
5658 (linux_target_ops)<to_btrace_conf>: Initialize.
5659 * server.c (current_btrace_conf): New.
5660 (handle_btrace_enable): Rename to ...
5661 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5662 to target_enable_btrace. Update comment. Update users.
5663 (handle_qxfer_btrace_conf): New.
5664 (qxfer_packets): Add btrace-conf entry.
5665 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5666 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5667 (target_ops)<read_btrace_conf>: New.
5668 (target_enable_btrace): Update parameters.
5669 (target_read_btrace_conf): New.
5671 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5673 * server.c (handle_btrace_general_set): Remove call to
5674 target_supports_btrace.
5675 (supported_btrace_packets): New.
5676 (handle_query): Call supported_btrace_packets.
5677 * target.h: include btrace-common.h.
5678 (btrace_target_info): Removed.
5679 (supports_btrace, target_supports_btrace): Update parameters.
5681 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5683 * Makefile.in (SFILES): Add common/btrace-common.c.
5684 (OBS): Add common/btrace-common.o.
5685 (btrace-common.o): Add build rules.
5686 * linux-low: Include btrace-common.h.
5687 (linux_low_read_btrace): Use struct btrace_data. Call
5688 btrace_data_init and btrace_data_fini.
5690 2015-02-06 Pedro Alves <palves@redhat.com>
5692 * thread-db.c (find_new_threads_callback): Add debug output.
5694 2015-02-04 Pedro Alves <palves@redhat.com>
5696 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5697 (resume_stopped_resumed_lwps): New function.
5698 (linux_wait_for_event_filtered): Use it.
5700 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5702 * Makefile.in (SFILES): Add linux-personality.c.
5703 (linux-personality.o): New rule.
5704 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5705 list of objects to be built.
5706 * linux-low.c: Include nat/linux-personality.h.
5707 (linux_create_inferior): Remove code to disable address space
5708 randomization (moved to ../nat/linux-personality.c). Create
5709 cleanup to disable address space randomization.
5711 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5713 * Makefile.in (posix-strerror.o): New rule.
5714 (mingw-strerror.o): Likewise.
5715 * configure: Regenerated.
5716 * configure.ac: Source file ../common/common.host. Initialize new
5717 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5719 2015-01-14 Yao Qi <yao@codesourcery.com>
5721 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5722 (ppc-linux.o): New rule.
5723 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5724 * configure.ac: AC_CHECK_FUNCS(getauxval).
5725 * config.in: Re-generated.
5726 * configure: Re-generated.
5727 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5728 ppc64_64bit_inferior_p
5730 2015-01-14 Yao Qi <yao@codesourcery.com>
5732 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5733 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5734 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5735 (PT_ORIG_R3, PT_TRAP): Likewise.
5736 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5737 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5738 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5740 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5742 * i387-fp.c (i387_cache_to_xsave): In look over
5743 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5744 zmmh_low_space field by use of zmmh_high_space.
5746 2015-01-09 Pedro Alves <palves@redhat.com>
5748 * linux-low.c (step_over_bkpt): Move higher up in the file.
5749 (handle_extended_wait): Don't store the stop_pc here.
5750 (get_stop_pc): Adjust comments and rename to ...
5751 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5752 stopped for a software breakpoint or hardware breakpoint.
5753 (thread_still_has_status_pending_p): New function.
5754 (status_pending_p_callback): Use
5755 thread_still_has_status_pending_p. If the event is no longer
5756 interesting, resume the LWP.
5757 (handle_tracepoints): Add assert.
5758 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5759 (wstatus_maybe_breakpoint): New function.
5760 (cancel_breakpoint): Delete function.
5761 (check_stopped_by_watchpoint): New function, factored out from
5762 linux_low_filter_event.
5763 (lp_status_maybe_breakpoint): Delete function.
5764 (linux_low_filter_event): Remove filter_ptid argument.
5765 Leave thread group exits pending here. Store the LWP's stop PC.
5766 Always leave events pending.
5767 (linux_wait_for_event_filtered): Pull all events out of the
5768 kernel, and leave them all pending.
5769 (count_events_callback, select_event_lwp_callback): Consider all
5771 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5772 (select_event_lwp): Only give preference to the stepping LWP in
5773 all-stop mode. Adjust comments.
5774 (ignore_event): New function.
5775 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5776 references to cancel_breakpoints. Adjust to renames. Also give
5777 equal priority to all LWPs that have had events in non-stop mode.
5778 If reporting a software breakpoint event, unadjust the LWP's PC.
5779 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5780 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5782 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5783 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5784 (linux_stopped_by_watchpoint): Adjust.
5785 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5786 * linux-low.h (enum lwp_stop_reason): New.
5787 (struct lwp_info) <stop_pc>: Adjust comment.
5788 <stopped_by_watchpoint>: Delete field.
5789 <stop_reason>: New field.
5790 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5791 * mem-break.c (software_breakpoint_inserted_here)
5792 (hardware_breakpoint_inserted_here): New function.
5793 * mem-break.h (software_breakpoint_inserted_here)
5794 (hardware_breakpoint_inserted_here): Declare.
5795 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5796 (cancel_breakpoints): Delete.
5797 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5798 (upload_fast_traceframes): Remove references to
5801 2015-01-09 Pedro Alves <palves@redhat.com>
5803 * thread-db.c (find_new_threads_callback): Ignore thread if the
5804 kernel thread ID is -1.
5806 2015-01-09 Pedro Alves <palves@redhat.com>
5808 * linux-low.c (linux_attach_fail_reason_string): Move to
5809 nat/linux-ptrace.c, and rename.
5810 (linux_attach_lwp): Update comment.
5811 (attach_proc_task_lwp_callback): New function.
5812 (linux_attach): Adjust to rename and use
5813 linux_proc_attach_tgid_threads.
5814 (linux_attach_fail_reason_string): Delete declaration.
5816 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5818 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5819 * server.c (gdbserver_version): Likewise.
5821 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5823 * remote-utils.c: Include ctype.h.
5824 (input_interrupt): Explicitly handle the case when the char
5825 received is the NUL byte. Improve the printing of non-ASCII
5828 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5830 * linux-low.c (linux_low_filter_event): Update call to
5831 linux_enable_event_reporting following the addition of
5832 a new parameter to that function.
5834 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5837 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5838 (AARCH64_FPCR_REGNO): Likewise.
5839 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5840 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5841 (aarch64_store_fpregset): Likewise.
5843 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5845 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5846 Remove FIXME comment about assumption about N.
5848 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5850 * configure.ac: If large-file support is disabled in GDBserver,
5851 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5852 * configure: Regenerate.
5854 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5856 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5857 warning upon ENODATA from ptrace.
5858 * linux-s390-low.c (s390_store_tdb): New.
5859 (s390_regsets): Add regset for NT_S390_TDB.
5861 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5863 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5864 without a fill_function.
5865 * linux-s390-low.c (s390_fill_last_break): Remove.
5866 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5867 (s390_arch_setup): Use regset's size instead of fill_function for
5870 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5872 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5873 the regset's store function when ptrace returned an error.
5874 * regcache.c (get_thread_regcache): Invalidate register cache
5875 before fetching inferior's registers.
5877 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5879 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5880 while-loop as for-loop.
5881 (regsets_store_inferior_registers): Likewise.
5883 2014-11-28 Yao Qi <yao@codesourcery.com>
5885 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5886 * config.in, configure: Re-generate.
5887 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5890 2014-11-21 Yao Qi <yao@codesourcery.com>
5892 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5893 (AC_CHECK_HEADERS): Remove malloc.h.
5894 * configure: Re-generated.
5895 * config.in: Re-generated.
5896 * server.h: Don't include alloca.h and malloc.h.
5897 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5898 Don't include malloc.h.
5900 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5902 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5903 corresponding ERRNO check in same block.
5905 2014-11-12 Pedro Alves <palves@redhat.com>
5907 * server.c (cont_thread): Update comment.
5908 (start_inferior, attach_inferior): No longer clear cont_thread.
5909 (handle_v_cont): No longer set cont_thread.
5910 (captured_main): Clear cont_thread each time a GDB connects.
5912 2014-11-12 Pedro Alves <palves@redhat.com>
5914 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5915 thread, and don't resume all threads if the Hc thread has exited.
5917 2014-11-12 Pedro Alves <palves@redhat.com>
5919 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5920 the process group instead of to a specific LWP.
5922 2014-10-15 Pedro Alves <palves@redhat.com>
5925 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5927 (arm_set_thread_context): Delete.
5928 (the_low_target): Adjust.
5929 * win32-i386-low.c (debug_registers_changed)
5930 (debug_registers_used): Delete.
5931 (update_debug_registers_callback): New function.
5932 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5933 needing to update their debug registers.
5934 (win32_get_current_dr): New function.
5935 (x86_dr_low_get_addr, x86_dr_low_get_control)
5936 (x86_dr_low_get_status): Fetch the debug register from the thread
5938 (i386_initial_stuff): Adjust.
5939 (i386_get_thread_context): Remove current_event parameter. Don't
5940 clear debug_registers_changed nor copy DR values to
5942 (i386_set_thread_context): Delete.
5943 (i386_prepare_to_resume): New function.
5944 (i386_thread_added): Mark the thread as needing to update irs
5946 (the_low_target): Remove i386_set_thread_context and install
5947 i386_prepare_to_resume.
5948 * win32-low.c (win32_get_thread_context): Adjust.
5949 (win32_set_thread_context): Use SetThreadContext
5951 (win32_prepare_to_resume): New function.
5952 (win32_require_context): New function, factored out from ...
5953 (thread_rec): ... this.
5954 (continue_one_thread): Call win32_prepare_to_resume on each thread
5955 we're about to continue.
5956 (win32_resume): Call win32_prepare_to_resume on the event thread.
5957 * win32-low.h (struct win32_thread_info)
5958 <debug_registers_changed>: New field.
5959 (struct win32_target_ops): Change prototype of set_thread_context,
5960 delete set_thread_context and add prepare_to_resume.
5961 (win32_require_context): New declaration.
5963 2014-10-08 Gary Benson <gbenson@redhat.com>
5965 * server.h: Do not include common-exceptions.h.
5967 2014-10-08 Gary Benson <gbenson@redhat.com>
5969 * server.h: Do not include cleanups.h.
5971 2014-09-30 James Hogan <james.hogan@imgtec.com>
5973 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5976 2014-09-23 Yao Qi <yao@codesourcery.com>
5978 * linux-low.c (lp_status_maybe_breakpoint): New function.
5979 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5980 (count_events_callback): Likewise.
5981 (select_event_lwp_callback): Likewise.
5982 (cancel_breakpoints_callback): Likewise.
5984 2014-09-19 Don Breazeal <donb@codesourcery.com>
5986 * linux-low.c (handle_extended_wait): Call
5987 linux_ptrace_get_extended_event.
5988 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5989 linux_is_extended_waitstatus.
5991 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5993 * Makefile.in (CPPFLAGS): Define.
5994 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5995 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5997 2014-09-16 Gary Benson <gbenson@redhat.com>
5999 * inferiors.h (current_inferior): Renamed as...
6000 (current_thread): New variable. All uses updated.
6001 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6002 (maybe_move_out_of_jump_pad): Likewise.
6003 (cancel_breakpoint): Likewise.
6004 (linux_low_filter_event): Likewise.
6005 (wait_for_sigstop): Likewise.
6006 (linux_resume_one_lwp): Likewise.
6007 (need_step_over_p): Likewise.
6008 (start_step_over): Likewise.
6009 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6010 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6011 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6012 and save_inferior as saved_thread.
6013 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6015 (regcache_invalidate_thread): Likewise.
6016 * remote-utils.c (prepare_resume_reply): Likewise.
6017 * thread-db.c (thread_db_get_tls_address): Likewise.
6018 (disable_thread_event_reporting): Likewise.
6019 (remove_thread_event_breakpoints): Likewise.
6020 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6022 * target.h (set_desired_inferior): Renamed as...
6023 (set_desired_thread): New declaration. All uses updated.
6024 * server.c (myresume): Updated comment to reference thread instead
6026 (handle_serial_event): Likewise.
6027 (handle_target_event): Likewise.
6029 2014-09-12 Tom Tromey <tromey@redhat.com>
6030 Gary Benson <gbenson@redhat.com>
6032 * regcache.h: Include common-regcache.h.
6033 (regcache_read_pc): Don't declare.
6034 * regcache.c (get_thread_regcache_for_ptid): New function.
6036 2014-09-11 Tom Tromey <tromey@redhat.com>
6037 Gary Benson <gbenson@redhat.com>
6039 * symbol.c: New file.
6040 * Makefile.in (SFILES): Add symbol.c.
6041 (OBS): Add symbol.o.
6043 2014-09-11 Gary Benson <gbenson@redhat.com>
6045 * target.c (target_stop_ptid, target_continue_ptid): New
6048 2014-09-11 Tom Tromey <tromey@redhat.com>
6049 Gary Benson <gbenson@redhat.com>
6051 * target.h: Include target/target.h.
6052 * target.c (target_read_memory, target_read_uint32)
6053 (target_write_memory): New functions.
6055 2014-09-11 Gary Benson <gbenson@redhat.com>
6057 * server.h (debug_hw_points): Don't declare.
6058 * server.c (debug_hw_points): Don't define. Replace all uses
6059 with show_debug_regs.
6060 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6061 all uses with show_debug_regs.
6063 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6065 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6066 endianness into account.
6067 (ppc_supply_ptrace_register): Likewise.
6069 2014-09-03 James Hogan <james.hogan@imgtec.com>
6071 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6072 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6074 2014-09-03 Gary Benson <gbenson@redhat.com>
6076 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6077 ALL_DEBUG_ADDRESS_REGISTERS.
6079 2014-09-02 Gary Benson <gbenson@redhat.com>
6081 * i386-low.h: Renamed as...
6082 * x86-low.h: New file. All type, function and variable name
6083 prefixes changed from "i386_" to "x86_". All references updated.
6084 * i386-low.c: Renamed as...
6085 * x86-low.c: New file. All type, function and variable name
6086 prefixes changed from "i386_" to "x86_". All references updated.
6088 2014-09-02 Gary Benson <gbenson@redhat.com>
6090 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6091 (x86_linux_new_thread): Likewise.
6093 2014-08-29 Gary Benson <gbenson@redhat.com>
6095 * server.h (setjmp.h): Do not include.
6096 (toplevel): Do not declare.
6097 (common-exceptions.h): Include.
6098 (cleanups.h): Likewise.
6099 * server.c (toplevel): Do not define.
6100 (exit_code): New static global.
6101 (detach_or_kill_for_exit_cleanup): New function.
6102 (main): New function. Original main renamed to...
6103 (captured_main): New function.
6104 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6106 2014-08-29 Gary Benson <gbenson@redhat.com>
6108 * Makefile.in (SFILES): Add common/common-exceptions.c.
6109 (OBS): Add common-exceptions.o.
6110 (common-exceptions.o): New rule.
6111 * utils.c (prepare_to_throw_exception): New function.
6113 2014-08-29 Gary Benson <gbenson@redhat.com>
6115 * config.in: Regenerate.
6116 * configure: Likewise.
6118 2014-08-29 Gary Benson <gbenson@redhat.com>
6120 * Makefile.in (SFILES): Add common/cleanups.c.
6122 (cleanups.o): New rule.
6124 2014-08-29 Gary Benson <gbenson@redhat.com>
6126 * utils.c (internal_vwarning): New function.
6128 2014-08-28 Gary Benson <gbenson@redhat.com>
6130 * utils.h (fatal): Remove declaration.
6131 * utils.c (fatal): Remove function.
6133 2014-08-28 Gary Benson <gbenson@redhat.com>
6135 * tracepoint.c (gdb_agent_init): Replace fatal with
6137 (initialize_tracepoint): Likewise.
6139 2014-08-28 Gary Benson <gbenson@redhat.com>
6141 * remote-utils.c (remote_prepare): Replace fatal with error.
6143 2014-08-28 Gary Benson <gbenson@redhat.com>
6145 * linux-low.c (linux_async): Replace fatal with warning.
6147 (linux_start_non_stop): Return -1 if linux_async failed.
6149 2014-08-28 Gary Benson <gbenson@redhat.com>
6151 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6153 (i386_dr_low_get_addr): Remove vague comment.
6154 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6157 2014-08-28 Gary Benson <gbenson@redhat.com>
6159 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6160 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6162 (linux_resume_one_lwp): Likewise.
6163 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6165 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6166 with internal_error.
6167 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6168 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6169 (find_register_by_name): Replace fatal with internal_error.
6170 (find_regno): Likewise.
6171 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6172 * thread-db.c (thread_db_create_event): Likewise.
6173 (thread_db_load_search): Likewise.
6174 (try_thread_db_load_1): Likewise.
6175 * tracepoint.c (get_jump_space_head): Replace fatal with
6177 (claim_trampoline_space): Likewise.
6178 (have_fast_tracepoint_trampoline_buffer): Likewise.
6179 (cmd_qtstart): Likewise.
6180 (stop_tracing): Likewise.
6181 (fast_tracepoint_collecting): Likewise.
6182 (target_malloc): Likewise.
6183 (download_tracepoint): Likewise.
6184 (download_trace_state_variables): Replace check with gdb_assert.
6185 (upload_fast_traceframes): Replace fatal with internal_error.
6187 2014-08-19 Tom Tromey <tromey@redhat.com>
6188 Gary Benson <gbenson@redhat.com>
6190 * Makefile.in (SFILES): Add common/common-debug.c.
6191 (OBS): Add common-debug.o.
6192 (common-debug.o): New rule.
6193 * debug.h (debug_printf): Don't declare.
6194 * debug.c (debug_printf): Renamed and rewritten as...
6195 (debug_vprintf): New function.
6197 2014-08-19 Gary Benson <gbenson@redhat.com>
6199 * utils.h: Do not include print-utils.h.
6201 2014-08-19 Tom Tromey <tromey@redhat.com>
6202 Gary Benson <gbenson@redhat.com>
6204 * server.h: Add static assertion.
6205 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6207 2014-08-19 Tom Tromey <tromey@redhat.com>
6208 Gary Benson <gbenson@redhat.com>
6210 * Makefile.in (SFILES): Add common/errors.c.
6211 (OBS): Add errors.o.
6212 (IPA_OBS): Add errors-ipa.o.
6213 (errors.o): New rule.
6214 (errors-ipa.o): Likewise.
6215 * utils.h (perror_with_name, error, warning): Don't declare.
6216 * utils.c (warning): Renamed and rewritten as...
6217 (vwarning): New function.
6218 (error): Renamed and rewritten as...
6219 (verror): New function.
6220 (internal_error): Renamed and rewritten as...
6221 (internal_verror): New function.
6223 2014-08-07 Gary Benson <gbenson@redhat.com>
6225 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6226 * configure: Regenerate.
6227 * config.in: Likewise.
6228 * server.h: Do not include errno.h.
6229 * event-loop.c: Likewise.
6230 * hostio-errno.c: Likewise.
6231 * linux-low.c: Likewise.
6232 * remote-utils.c: Likewise.
6233 * spu-low.c: Likewise.
6234 * utils.c: Likewise.
6235 * gdbreplay.c: Unconditionally include errno.h.
6237 2014-08-07 Gary Benson <gbenson@redhat.com>
6239 * server.h: Do not include string.h.
6240 * event-loop.c: Likewise.
6241 * linux-low.c: Likewise.
6242 * regcache.c: Likewise.
6243 * remote-utils.c: Likewise.
6244 * spu-low.c: Likewise.
6245 * utils.c: Likewise.
6247 2014-08-07 Gary Benson <gbenson@redhat.com>
6249 * server.h: Do not include gdb_assert.h.
6251 2014-08-07 Gary Benson <gbenson@redhat.com>
6253 * server.h: Do not include common-utils.h.
6255 2014-08-07 Gary Benson <gbenson@redhat.com>
6257 * server.h: Do not include ptid.h.
6258 * notif.h: Likewise.
6260 2014-08-07 Gary Benson <gbenson@redhat.com>
6262 * server.h: Do not include gdb_locale.h.
6264 2014-08-07 Gary Benson <gbenson@redhat.com>
6266 * server.h: Do not include gdb/signals.h.
6267 * win32-low.c: Likewise.
6269 2014-08-07 Gary Benson <gbenson@redhat.com>
6271 * server.h: Do not include pathmax.h.
6273 2014-08-07 Gary Benson <gbenson@redhat.com>
6275 * server.h: Do not include libiberty.h.
6276 * linux-bfin-low.c: Likewise.
6278 2014-08-07 Gary Benson <gbenson@redhat.com>
6280 * server.h: Do not include ansidecl.h.
6282 2014-08-07 Gary Benson <gbenson@redhat.com>
6284 * linux-x86-low.c: Do not include stddef.h.
6285 * lynx-ppc-low.c: Likewise.
6286 * tracepoint.c: Likewise.
6288 2014-08-07 Gary Benson <gbenson@redhat.com>
6290 * server.h: Do not include stdarg.h.
6291 * nto-low.c: Likewise.
6293 2014-08-07 Gary Benson <gbenson@redhat.com>
6295 * server.h: Do not include stdlib.h.
6296 * inferiors.c: Likewise.
6297 * linux-low.c: Likewise.
6298 * regcache.c: Likewise.
6299 * spu-low.c: Likewise.
6300 * tracepoint.c: Likewise.
6301 * utils.c: Likewise.
6303 2014-08-07 Gary Benson <gbenson@redhat.com>
6305 * server.h: Do not include stdio.h.
6306 * linux-low.c: Likewise.
6307 * remote-utils.c: Likewise.
6308 * spu-low.c: Likewise.
6309 * utils.c: Likewise.
6310 * wincecompat.c: Likewise.
6312 2014-08-06 Gary Benson <gbenson@redhat.com>
6314 * regcache.c (init_register_cache): Move conditionals inside if.
6316 2014-08-06 Gary Benson <gbenson@redhat.com>
6318 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6320 2014-07-31 Gary Benson <gbenson@redhat.com>
6322 * ax.h: Do not include server.h.
6323 * gdbthread.h: Likewise.
6324 * lynx-low.h: Likewise.
6325 * notif.h: Likewise.
6327 2014-07-30 Gary Benson <gbenson@redhat.com>
6329 * server.h: Include common-defs.h.
6330 Do not include config.h or build-gnulib-gdbserver/config.h.
6332 2014-07-30 Gary Benson <gbenson@redhat.com>
6334 * hostio-errno.c: Move server.h to top of includes list.
6335 * inferiors.c: Likewise.
6336 * linux-x86-low.c: Likewise.
6337 * notif.c: Include server.h.
6339 2014-07-24 Tom Tromey <tromey@redhat.com>
6340 Gary Benson <gbenson@redhat.com>
6342 * server.h (CORE_ADDR): Now unsigned.
6344 2014-07-16 Pedro Alves <palves@redhat.com>
6346 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6348 2014-07-15 Pedro Alves <palves@redhat.com>
6350 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6353 2014-07-11 Pedro Alves <palves@redhat.com>
6355 * linux-low.c (kill_wait_lwp): New function, based on
6356 kill_one_lwp_callback, but use my_waitpid directly.
6357 (kill_one_lwp_callback, linux_kill): Use it.
6359 2014-06-23 Pedro Alves <palves@redhat.com>
6361 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6362 before setting DR0..DR3.
6364 2014-06-20 Gary Benson <gbenson@redhat.com>
6366 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6367 * configure: Regenerated.
6368 * config.in: Likewise.
6370 2014-06-20 Gary Benson <gbenson@redhat.com>
6372 * Makefile.in (SFILES): Update locations for files moved
6374 (object file files): Reordered.
6376 2014-06-20 Gary Benson <gbenson@redhat.com>
6378 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6379 (i386_dr_low_set_addr): Likewise.
6380 (i386_dr_low_get_addr): Likewise.
6381 (i386_dr_low_can_set_control): Likewise.
6382 (i386_dr_low_set_control): Likewise.
6383 (i386_dr_low_get_control): Likewise.
6384 (i386_dr_low_get_status): Likewise.
6385 (i386_get_debug_register_length): Likewise.
6386 * linux-x86-low.c (i386_dr_low_set_addr):
6387 Changed signature. Made static.
6388 (i386_dr_low_get_addr): Likewise.
6389 (i386_dr_low_set_control): Likewise.
6390 (i386_dr_low_get_control): Likewise.
6391 (i386_dr_low_get_status): Likewise.
6392 (i386_dr_low): New global variable.
6393 * win32-i386-low.c (i386_dr_low_set_addr):
6394 Changed signature. Made static.
6395 (i386_dr_low_get_addr): Likewise.
6396 (i386_dr_low_set_control): Likewise.
6397 (i386_dr_low_get_control): Likewise.
6398 (i386_dr_low_get_status): Likewise.
6399 (i386_dr_low): New global variable.
6401 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6403 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6404 * Makefile.in (AR, AR_FLAGS): Define.
6405 * configure: Regenerate.
6407 2014-06-19 Gary Benson <gbenson@redhat.com>
6409 * Makefile.in (i386-dregs.o): New rule.
6410 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6411 * i386-low.c (target.h): Remove include.
6412 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6413 (DR_CONTROL_SHIFT): Likewise.
6414 (DR_CONTROL_SIZE): Likewise.
6415 (DR_RW_EXECUTE): Likewise.
6416 (DR_RW_WRITE): Likewise.
6417 (DR_RW_READ): Likewise.
6418 (DR_RW_IORW): Likewise.
6419 (DR_LEN_1): Likewise.
6420 (DR_LEN_2): Likewise.
6421 (DR_LEN_4): Likewise.
6422 (DR_LEN_8): Likewise.
6423 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6424 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6425 (DR_ENABLE_SIZE): Likewise.
6426 (DR_LOCAL_SLOWDOWN): Likewise.
6427 (DR_GLOBAL_SLOWDOWN): Likewise.
6428 (DR_CONTROL_RESERVED): Likewise.
6429 (I386_DR_CONTROL_MASK): Likewise.
6430 (I386_DR_VACANT): Likewise.
6431 (I386_DR_LOCAL_ENABLE): Likewise.
6432 (I386_DR_GLOBAL_ENABLE): Likewise.
6433 (I386_DR_DISABLE): Likewise.
6434 (I386_DR_SET_RW_LEN): Likewise.
6435 (I386_DR_GET_RW_LEN): Likewise.
6436 (I386_DR_WATCH_HIT): Likewise.
6437 (i386_wp_op_t): Likewise.
6438 (i386_show_dr): Likewise.
6439 (i386_length_and_rw_bits): Likewise.
6440 (i386_insert_aligned_watchpoint): Likewise.
6441 (i386_remove_aligned_watchpoint): Likewise.
6442 (i386_handle_nonaligned_watchpoint): Likewise.
6443 i386_update_inferior_debug_regs(): Likewise.
6444 (i386_dr_insert_watchpoint): Likewise.
6445 (i386_dr_remove_watchpoint): Likewise.
6446 (i386_dr_region_ok_for_watchpoint): Likewise.
6447 (i386_dr_stopped_data_address): Likewise.
6448 (i386_dr_stopped_by_watchpoint): Likewise.
6450 2014-06-19 Gary Benson <gbenson@redhat.com>
6452 * i386-low.c (i386_dr_show): Renamed to
6453 i386_show_dr and made static. All uses updated.
6454 (i386_dr_length_and_rw_bits): Renamed to
6455 i386_length_and_rw_bits and made static.
6457 (i386_dr_insert_aligned_watchpoint): Renamed to
6458 i386_insert_aligned_watchpoint and made static.
6460 (i386_dr_remove_aligned_watchpoint): Renamed to
6461 i386_remove_aligned_watchpoint and made static.
6463 (i386_dr_update_inferior_debug_regs): Renamed to
6464 i386_update_inferior_debug_regs and made static.
6467 2014-06-18 Gary Benson <gbenson@redhat.com>
6469 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6470 (i386_dr_low_can_set_control): Likewise.
6471 (i386_get_debug_register_length): Likewise.
6472 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6473 (i386_dr_low_can_set_control): Likewise.
6474 (i386_get_debug_register_length): Likewise.
6476 2014-06-17 Gary Benson <gbenson@redhat.com>
6478 * i386-low.h (i386-dregs.h): New include.
6479 (DR_FIRSTADDR): Now in i386-dregs.h.
6480 (DR_LASTADDR): Likewise.
6481 (DR_NADDR): Likewise.
6482 (DR_STATUS): Likewise.
6483 (DR_CONTROL): Likewise.
6484 (i386_debug_reg_state): Likewise.
6485 (i386_dr_insert_watchpoint): Likewise.
6486 (i386_dr_remove_watchpoint): Likewise.
6487 (i386_dr_region_ok_for_watchpoint): Likewise.
6488 (i386_dr_stopped_data_address): Likewise.
6489 (i386_dr_stopped_by_watchpoint): Likewise.
6490 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6492 2014-06-18 Gary Benson <gbenson@redhat.com>
6494 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6495 i386_dr_insert_watchpoint.
6496 (i386_low_remove_watchpoint): Renamed to
6497 i386_dr_remove_watchpoint.
6498 (i386_low_region_ok_for_watchpoint): Renamed to
6499 i386_dr_region_ok_for_watchpoint.
6500 (i386_low_stopped_data_address): Renamed to
6501 i386_dr_stopped_data_address.
6502 (i386_low_stopped_by_watchpoint): Renamed to
6503 i386_dr_stopped_by_watchpoint.
6504 * i386-low.c (i386_show_dr): Renamed to
6505 i386_dr_show and made nonstatic. All uses updated.
6506 (i386_length_and_rw_bits): Renamed to
6507 i386_dr_length_and_rw_bits and made nonstatic.
6509 (i386_insert_aligned_watchpoint): Renamed to
6510 i386_dr_insert_aligned_watchpoint and made nonstatic.
6512 (i386_remove_aligned_watchpoint): Renamed to
6513 i386_dr_remove_aligned_watchpoint and made nonstatic.
6515 (i386_update_inferior_debug_regs): Renamed to
6516 i386_dr_update_inferior_debug_regs and made nonstatic.
6518 (i386_low_insert_watchpoint): Renamed to
6519 i386_dr_insert_watchpoint. All uses updated.
6520 (i386_low_remove_watchpoint): Renamed to
6521 i386_dr_remove_watchpoint. All uses updated.
6522 (i386_low_region_ok_for_watchpoint): Renamed to
6523 i386_dr_region_ok_for_watchpoint. All uses updated.
6524 (i386_low_stopped_data_address): Renamed to
6525 i386_dr_stopped_data_address. All uses updated.
6526 (i386_low_stopped_by_watchpoint): Renamed to
6527 i386_dr_stopped_by_watchpoint. All uses updated.
6529 2014-06-18 Gary Benson <gbenson@redhat.com>
6531 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6532 (i386_dr_low_can_set_control): Likewise.
6533 (i386_insert_aligned_watchpoint): New check.
6535 2014-06-18 Gary Benson <gbenson@redhat.com>
6537 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6540 2014-06-18 Gary Benson <gbenson@redhat.com>
6542 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6543 instead of fatal and error.
6544 (i386_handle_nonaligned_watchpoint): Likewise.
6546 2014-06-18 Gary Benson <gbenson@redhat.com>
6548 * i386-low.c (i386_get_debug_register_length): New macro.
6549 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6550 (i386_show_dr): Use debug_printf instead of fprintf. Use
6551 phex to format values.
6553 2014-06-18 Gary Benson <gbenson@redhat.com>
6555 * i386-low.h: Comment changes.
6556 * i386-low.c: Likewise.
6558 2014-06-18 Gary Benson <gbenson@redhat.com>
6560 * i386-low.c: Whitespace changes.
6562 2014-06-12 Tom Tromey <tromey@redhat.com>
6564 * utils.c (freeargv): Remove.
6566 2014-06-12 Tom Tromey <tromey@redhat.com>
6568 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6569 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6570 (parse_debug_format_options): Likewise.
6571 (gdbserver_usage): Likewise.
6572 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6573 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6574 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6576 ($(LIBGNU)): Depend on libiberty.
6577 (all-lib): Recurse into all subdirs.
6578 (install-only): Invoke "install" target in subdirs.
6579 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6581 * configure: Rebuild.
6582 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6583 for vasprintf, vsnprintf, or gettimeofday.
6584 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6587 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6589 * development.sh: Delete.
6590 * Makefile.in (config.status): Adjust dependency on development.sh.
6591 * configure.ac: Adjust development.sh source call.
6592 * configure: Regenerate.
6594 2014-06-02 Pedro Alves <palves@redhat.com>
6596 * ax.c (gdb_free_agent_expr): New function.
6597 * ax.h (gdb_free_agent_expr): New declaration.
6598 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6600 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6602 (clear_breakpoint_conditions_and_commands): New function.
6603 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6604 (clear_breakpoint_conditions_and_commands): New declaration.
6606 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6608 * linux-aarch64-low.c (asm/ptrace.h): Include.
6610 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6612 Fix TLS access for -static -pthread.
6613 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6614 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6615 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6617 2014-05-20 Pedro Alves <palves@redhat.com>
6619 * linux-aarch64-low.c (aarch64_insert_point)
6620 (aarch64_remove_point): No longer check whether the type is
6621 supported here. Adjust to new interface.
6622 (the_low_target): Install aarch64_supports_z_point_type as
6623 supports_z_point_type method.
6624 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6625 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6626 instead of a Z packet char. Adjust.
6627 (arm_supports_z_point_type): New function.
6628 (arm_insert_point, arm_remove_point): Adjust to new interface.
6629 (the_low_target): Install arm_supports_z_point_type.
6630 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6631 (cris_insert_point, cris_remove_point): Adjust to new interface.
6632 Don't check whether the type is supported here.
6633 (the_low_target): Install cris_supports_z_point_type.
6634 * linux-low.c (linux_supports_z_point_type): New function.
6635 (linux_insert_point, linux_remove_point): Adjust to new interface.
6636 * linux-low.h (struct linux_target_ops) <insert_point,
6637 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6638 raw_breakpoint pointer parameter.
6639 <supports_z_point_type>: New method.
6640 * linux-mips-low.c (mips_supports_z_point_type): New function.
6641 (mips_insert_point, mips_remove_point): Adjust to new interface.
6642 Use mips_supports_z_point_type.
6643 (the_low_target): Install mips_supports_z_point_type.
6644 * linux-ppc-low.c (the_low_target): Install NULL as
6645 supports_z_point_type method.
6646 * linux-s390-low.c (the_low_target): Install NULL as
6647 supports_z_point_type method.
6648 * linux-sparc-low.c (the_low_target): Install NULL as
6649 supports_z_point_type method.
6650 * linux-x86-low.c (x86_supports_z_point_type): New function.
6651 (x86_insert_point): Adjust to new insert_point interface. Use
6652 insert_memory_breakpoint. Adjust to new
6653 i386_low_insert_watchpoint interface.
6654 (x86_remove_point): Adjust to remove_point interface. Use
6655 remove_memory_breakpoint. Adjust to new
6656 i386_low_remove_watchpoint interface.
6657 (the_low_target): Install x86_supports_z_point_type.
6658 * lynx-low.c (lynx_target_ops): Install NULL as
6659 supports_z_point_type callback.
6660 * nto-low.c (nto_supports_z_point_type): New.
6661 (nto_insert_point, nto_remove_point): Adjust to new interface.
6662 (nto_target_ops): Install nto_supports_z_point_type.
6663 * mem-break.c: Adjust intro comment.
6664 (struct raw_breakpoint) <raw_type, size>: New fields.
6665 <inserted>: Update comment.
6666 <shlib_disabled>: Delete field.
6667 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6668 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6669 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6670 (raw_bkpt_type_to_target_hw_bp_type): New function.
6671 (find_enabled_raw_code_breakpoint_at): New function.
6672 (find_raw_breakpoint_at): New type and size parameters. Use them.
6673 (insert_memory_breakpoint): New function, based off
6674 set_raw_breakpoint_at.
6675 (remove_memory_breakpoint): New function.
6676 (set_raw_breakpoint_at): Reimplement.
6677 (set_breakpoint): New, based on set_breakpoint_at.
6678 (set_breakpoint_at): Reimplement.
6679 (delete_raw_breakpoint): Go through the_target->remove_point
6680 instead of assuming memory breakpoints.
6681 (find_gdb_breakpoint_at): Delete.
6682 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6683 (find_gdb_breakpoint): New function.
6684 (set_gdb_breakpoint_at): Delete.
6685 (z_type_supported): New function.
6686 (set_gdb_breakpoint_1): New function, loosely based off
6687 set_gdb_breakpoint_at.
6688 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6689 (delete_gdb_breakpoint_at): Delete.
6690 (delete_gdb_breakpoint_1): New function, loosely based off
6691 delete_gdb_breakpoint_at.
6692 (delete_gdb_breakpoint): New function.
6693 (clear_gdb_breakpoint_conditions): Rename to ...
6694 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6696 (add_condition_to_breakpoint): Make static.
6697 (add_breakpoint_condition): Take a struct breakpoint pointer
6698 instead of an address. Adjust.
6699 (gdb_condition_true_at_breakpoint): Rename to ...
6700 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6702 (gdb_condition_true_at_breakpoint): Reimplement.
6703 (add_breakpoint_commands): Take a struct breakpoint pointer
6704 instead of an address. Adjust.
6705 (gdb_no_commands_at_breakpoint): Rename to ...
6706 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6707 parameter. Return true if no breakpoint was found. Change debug
6709 (gdb_no_commands_at_breakpoint): Reimplement.
6710 (run_breakpoint_commands): Rename to ...
6711 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6712 and change return type to boolean.
6713 (run_breakpoint_commands): New function.
6714 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6715 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6716 breakpoint. Go through the_target->remove_point instead of
6717 assuming memory breakpoint.
6718 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6719 software and hardware breakpoints.
6720 (reinsert_raw_breakpoint): Go through the_target->insert_point
6721 instead of assuming memory breakpoint.
6722 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6723 software and hardware breakpoints.
6724 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6725 Check both software and hardware breakpoints.
6726 (validate_inserted_breakpoint): Assert the breakpoint is a
6727 software breakpoint. Set the inserted flag to -1 instead of
6728 setting shlib_disabled.
6729 (delete_disabled_breakpoints): Adjust.
6730 (validate_breakpoints): Only validate software breakpoints.
6731 Adjust to inserted flag change.
6732 (check_mem_read, check_mem_write): Skip breakpoint types other
6733 than software breakpoints. Adjust to inserted flag change.
6734 * mem-break.h (enum raw_bkpt_type): New enum.
6735 (raw_breakpoint, struct process_info): Forward declare.
6736 (Z_packet_to_target_hw_bp_type): Delete declaration.
6737 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6738 (set_gdb_breakpoint, delete_gdb_breakpoint)
6739 (clear_breakpoint_conditions): New declarations.
6740 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6741 (breakpoint_inserted_here): Update comment.
6742 (add_breakpoint_condition, add_breakpoint_commands): Replace
6743 address parameter with a breakpoint pointer parameter.
6744 (gdb_breakpoint_here): Update comment.
6745 (delete_gdb_breakpoint_at): Delete.
6746 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6747 * server.c (process_point_options): Take a struct breakpoint
6748 pointer instead of an address. Adjust.
6749 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6750 delete_gdb_breakpoint.
6751 * spu-low.c (spu_target_ops): Install NULL as
6752 supports_z_point_type method.
6753 * target.h: Include mem-break.h.
6754 (struct target_ops) <prepare_to_access_memory>: Update comment.
6755 <supports_z_point_type>: New field.
6756 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6757 instead of a char. Also take a raw breakpoint pointer.
6758 * win32-arm-low.c (the_low_target): Install NULL as
6759 supports_z_point_type.
6760 * win32-i386-low.c (i386_supports_z_point_type): New function.
6761 (i386_insert_point, i386_remove_point): Adjust to new interface.
6762 (the_low_target): Install i386_supports_z_point_type.
6763 * win32-low.c (win32_supports_z_point_type): New function.
6764 (win32_insert_point, win32_remove_point): Adjust to new interface.
6765 (win32_target_ops): Install win32_supports_z_point_type.
6766 * win32-low.h (struct win32_target_ops):
6767 <supports_z_point_type>: New method.
6768 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6769 instead of a char. Also take a raw breakpoint pointer.
6771 2014-05-20 Pedro Alves <palves@redhat.com>
6773 * mem-break.h: Include break-common.h.
6774 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6775 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6776 (Z_packet_to_target_hw_bp_type): New declaration.
6777 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6778 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6779 (Z_PACKET_ACCESS_WP): Delete macros.
6780 (Z_packet_to_hw_type): Delete function.
6781 * i386-low.h: Don't include break-common.h here.
6782 (Z_packet_to_hw_type): Delete declaration.
6783 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6784 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6785 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6786 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6787 * linux-aarch64-low.c: Don't include break-common.h here.
6788 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6789 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6790 (Z_packet_to_target_hw_bp_type): Delete function.
6791 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6793 (mips_insert_point, mips_remove_point): Use
6794 Z_packet_to_target_hw_bp_type.
6796 2014-05-20 Pedro Alves <palves@redhat.com>
6798 * linux-aarch64-low.c: Include break-common.h.
6799 (enum target_point_type): Delete.
6800 (Z_packet_to_point_type): Rename to ...
6801 (Z_packet_to_target_hw_bp_type): ... this, and return a
6802 target_hw_bp_type instead.
6803 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6804 instead of an enum target_point_type.
6805 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6807 (aarch64_dr_state_insert_one_point)
6808 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6809 (aarch64_handle_aligned_watchpoint)
6810 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6811 Take an enum target_hw_bp_type instead of an enum
6813 (aarch64_supports_z_point_type): New function.
6814 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6815 use Z_packet_to_target_hw_bp_type.
6817 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6819 * configure.ac: Only use -Werror by default when DEVELOPMENT
6821 * configure: Regenerate.
6823 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6825 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6826 * linux-x86-low.c (X86_64_USER_REGS): New.
6827 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6829 2014-04-28 Yao Qi <yao@codesourcery.com>
6831 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6834 2014-04-25 Pedro Alves <palves@redhat.com>
6837 * linux-low.c (linux_attach_fail_reason_string): New function.
6838 (linux_attach_lwp): Delete.
6839 (linux_attach_lwp_1): Rename to ...
6840 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6841 argument. Remove "initial" parameter. Return int instead of
6842 void. Don't error or warn here.
6843 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6844 failure to attach to the tgid. Call warning when failing to
6846 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6847 argument. Remove "initial" parameter. Return int instead of
6848 void. Don't error or warn here.
6849 (linux_attach_fail_reason_string): New declaration.
6850 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6851 interface change. Use linux_attach_fail_reason_string.
6853 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6854 Walfred Tedeschi <walfred.tedeschi@intel.com>
6856 * Makefile.in: Added rules to handle new files
6857 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6858 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6859 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6860 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6861 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6862 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6864 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6865 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6866 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6867 i386/x32-avx512.xml.
6868 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6869 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6870 i386/x32-avx512-linux.xml.
6871 * i387-fp.c (num_avx512_k_registers): New constant for number
6873 (num_avx512_zmmh_low_registers): New constant for number of
6874 lower ZMM registers (0-15).
6875 (num_avx512_zmmh_high_registers): New constant for number of
6876 higher ZMM registers (16-31).
6877 (num_avx512_ymmh_registers): New contant for number of higher
6878 YMM registers (ymm16-31 added by avx521 on x86_64).
6879 (num_avx512_xmm_registers): New constant for number of higher
6880 XMM registers (xmm16-31 added by AVX512 on x86_64).
6881 (struct i387_xsave): Add space for AVX512 registers.
6882 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6883 Add code to handle AVX512 registers.
6884 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6885 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6886 prototypei from generated file.
6887 (tdesc_amd64_avx512_linux): Likewise.
6888 (init_registers_x32_avx512_linux): Likewise.
6889 (tdesc_x32_avx512_linux): Likewise.
6890 (init_registers_i386_avx512_linux): Likewise.
6891 (tdesc_i386_avx512_linux): Likewise.
6892 (x86_64_regmap): Add AVX512 registers.
6893 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6895 (initialize_low_arch): Add code to initialize AVX512 registers.
6897 2014-04-23 Pedro Alves <palves@redhat.com>
6899 * mem-break.c (find_gdb_breakpoint_at): Make static.
6900 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6902 2014-04-23 Pedro Alves <palves@redhat.com>
6904 * i386-low.c: Don't include break-common.h here.
6905 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6906 prototype to take target_hw_bp_type as argument instead of a Z
6908 * i386-low.h: Include break-common.h here.
6909 (Z_packet_to_hw_type): Declare.
6910 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6912 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6913 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6914 (x86_remove_point): Convert the packet number to a
6915 target_hw_bp_type before calling i386_low_remove_watchpoint.
6916 * win32-i386-low.c (i386_insert_point): Convert the packet number
6917 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6918 (i386_remove_point): Convert the packet number to a
6919 target_hw_bp_type before calling i386_low_remove_watchpoint.
6921 2014-04-23 Pedro Alves <palves@redhat.com>
6923 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6925 2014-04-10 Pedro Alves <palves@redhat.com>
6927 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6928 Check if the condition or command is NULL before checking if the
6929 breakpoint is known. On success, return true.
6930 * mem-break.h (add_breakpoint_condition): Document return.
6931 (add_breakpoint_commands): Add describing comment.
6932 * server.c (skip_to_semicolon): New function.
6933 (process_point_options): Use it.
6935 2014-04-09 Pedro Alves <palves@redhat.com>
6937 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6940 2014-02-27 Pedro Alves <palves@redhat.com>
6943 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6945 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6947 (last_thread_of_process_p): Take a PID argument instead of a
6949 (linux_wait_for_lwp): Delete.
6950 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6952 (linux_low_filter_event): New function, party factored out from
6953 linux_wait_for_event.
6954 (linux_wait_for_event): Rename to ...
6955 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6956 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6957 sigsuspend. Check for zombie leaders.
6958 (linux_wait_for_event): Reimplement as wrapper around
6959 linux_wait_for_event_filtered.
6960 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6961 a normal or signal exit is seen, it's the whole process exiting.
6962 (wait_for_sigstop): No longer a for_each_inferior callback.
6963 Rewrite on top of linux_wait_for_event_filtered.
6964 (stop_all_lwps): Call wait_for_sigstop directly.
6965 * server.c (resume, handle_target_event): Handle
6966 TARGET_WAITKIND_NO_RESUMED.
6968 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6970 * win32-low.c (psapi_get_dll_name,
6971 * win32_CreateToolhelp32Snapshot): Delete.
6972 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6973 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6975 (handle_load_dll): Add function description.
6976 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6978 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6980 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6982 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6983 base address when calling win32_add_one_solib.
6984 (handle_load_dll): Delete local variable load_addr.
6985 Remove 0x1000 offset applied to DLL base address when calling
6986 win32_add_one_solib.
6987 (handle_unload_dll): Add comment.
6989 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6991 * win32-low.c (win32_add_all_dlls): Renames
6992 win32_ensure_ntdll_loaded. Rewrite function documentation.
6993 Adjust implementation to always load all DLLs.
6994 Add 0x1000 offset to DLL base address when calling
6995 win32_add_one_solib.
6996 (child_initialization_done): New static global.
6997 (do_initial_child_stuff): Set child_initialization_done to
6998 zero during child initialization, and 1 after. Replace call
6999 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7001 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7002 (handle_unload_dll): Add function documentation.
7003 (get_child_debug_event): Ignore load and unload DLL events
7004 during child initialization.
7006 2014-02-20 Doug Evans <dje@google.com>
7008 Remove global all_lwps.
7009 * inferiors.h (ptid_of): Move here from linux-low.h.
7010 (pid_of, lwpid_of): Ditto.
7011 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7012 parameter is a struct thread_info * now.
7013 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7014 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7015 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7017 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7018 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7019 * linux-arm-low.c (update_registers_callback): Update, "entry"
7020 parameter is a struct thread_info * now.
7021 Fetch lwpid from current_inferior directly.
7022 (arm_insert_point): Pass &all_threads to find_inferior instead of
7024 (arm_remove_point): Ditto.
7025 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7026 (arm_prepare_to_resume): Fetch pid from thread.
7027 (arm_read_description): Fetch lwpid from current_inferior directly.
7028 * linux-low.c (all_lwps): Delete.
7029 (delete_lwp): Delete call to remove_inferior.
7030 (handle_extended_wait): Fetch lwpid from thread.
7031 (add_lwp): Don't set lwp->entry.id. Remove call to
7032 add_inferior_to_list.
7033 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7034 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7035 (kill_one_lwp_callback): Ditto.
7036 (linux_kill): Don't dereference NULL pointer.
7037 Fetch ptid,lwpid from thread.
7038 (get_detach_signal): Fetch ptid from thread.
7039 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7040 Simplify call to regcache_invalidate_thread.
7041 (delete_lwp_callback): Update, "entry" parameter is a
7042 struct thread_info * now. Fetch pid from thread.
7043 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7044 (status_pending_p_callback): Update, "entry" parameter is a
7045 struct thread_info * now. Fetch ptid from thread.
7046 (find_lwp_pid): Update, "entry" parameter is a
7047 struct thread_info * now.
7048 (linux_wait_for_lwp): Fetch pid from thread.
7049 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7050 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7051 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7052 (dequeue_one_deferred_signal): Ditto.
7053 (cancel_breakpoint): Fetch ptid from current_inferior.
7054 (linux_wait_for_event): Pass &all_threads to find_inferior,
7055 not &all_lwps. Fetch ptid, lwpid from thread.
7056 (count_events_callback): Update, "entry" parameter is a
7057 struct thread_info * now.
7058 (select_singlestep_lwp_callback): Ditto.
7059 (select_event_lwp_callback): Ditto.
7060 (cancel_breakpoints_callback): Ditto.
7061 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7063 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7064 (unsuspend_one_lwp): Update, "entry" parameter is a
7065 struct thread_info * now.
7066 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7068 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7069 Fetch lwpid from thread, not lwp.
7070 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7071 Pass &all_threads to find_inferior, not &all_lwps.
7072 (send_sigstop): Fetch lwpid from thread, not lwp.
7073 (send_sigstop_callback): Update, "entry" parameter is a
7074 struct thread_info * now.
7075 (suspend_and_send_sigstop_callback): Ditto.
7076 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7077 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7078 struct thread_info * now.
7079 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7081 (lwp_running): Update, "entry" parameter is a
7082 struct thread_info * now.
7083 (stop_all_lwps): Fetch ptid from thread.
7084 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7085 (linux_resume_one_lwp): Fetch lwpid from thread.
7086 (linux_set_resume_request): Update, "entry" parameter is a
7087 struct thread_info * now. Fetch pid, lwpid from thread.
7088 (resume_status_pending_p): Update, "entry" parameter is a
7089 struct thread_info * now.
7090 (need_step_over_p): Ditto. Fetch lwpid from thread.
7091 (start_step_over): Fetch lwpid from thread.
7092 (linux_resume_one_thread): Update, "entry" parameter is a
7093 struct thread_info * now. Fetch lwpid from thread.
7094 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7095 (proceed_one_lwp): Update, "entry" parameter is a
7096 struct thread_info * now. Fetch lwpid from thread.
7097 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7098 struct thread_info * now.
7099 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7100 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7101 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7103 (regsets_store_inferior_registers): Ditto.
7104 (fetch_register, store_register): Ditto.
7105 (linux_read_memory, linux_write_memory): Ditto.
7106 (linux_request_interrupt): Ditto.
7107 (linux_read_auxv): Ditto.
7108 (linux_xfer_siginfo): Ditto.
7109 (linux_qxfer_spu): Ditto.
7110 (linux_qxfer_libraries_svr4): Ditto.
7111 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7112 moved to inferiors.h.
7114 (get_thread_lwp): Update.
7115 (struct lwp_info): Delete member "entry". Simplify comment for
7118 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7119 current_inferior directly.
7120 (update_watch_registers_callback): Update, "entry" parameter is a
7121 struct thread_info * now. Fetch pid from thread.
7122 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7123 (mips_insert_point): Fetch lwpid from current_inferior.
7124 Pass &all_threads to find_inferior, not &all_lwps.
7125 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7126 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7128 (mips_stopped_data_address): Ditto.
7129 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7131 * linux-tile-low.c (tile_arch_setup): Ditto.
7132 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7133 (update_debug_registers_callback): Update, "entry" parameter is a
7134 struct thread_info * now. Fetch pid from thread.
7135 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7136 Pass &all_threads to find_inferior, not &all_lwps.
7137 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7138 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7139 Pass &all_threads to find_inferior, not &all_lwps.
7140 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7141 (i386_dr_low_get_status): Ditto.
7142 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7143 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7144 (x86_linux_read_description): Ditto.
7145 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7147 2014-02-20 Doug Evans <dje@google.com>
7149 * inferiors.c (get_first_inferior): Fix buglet.
7151 2014-02-19 Doug Evans <dje@google.com>
7153 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7154 * inferiors.c (add_thread): Change result type to struct thread_info *.
7155 All callers updated.
7156 (add_lwp): Call add_thread here instead of in callers.
7157 All callers updated.
7158 * linux-low.h (get_lwp_thread): Rewrite.
7159 (struct lwp_info): New member "thread".
7161 2014-02-19 Doug Evans <dje@google.com>
7163 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7164 All callers updated.
7166 2014-02-19 Doug Evans <dje@google.com>
7168 * inferiors.c (add_thread): Fix whitespace.
7170 2014-02-19 Doug Evans <dje@google.com>
7172 * dll.c (clear_dlls): Replace accessing list implemention details
7174 * gdbthread.h (get_first_thread): Declare.
7175 * inferiors.c (for_each_inferior_with_data): New function.
7176 (get_first_thread): New function.
7177 (find_thread_ptid): Simplify.
7178 (get_first_inferior): New function.
7179 (clear_list): Delete.
7180 (one_inferior_p): New function.
7181 (clear_inferior_list): New function.
7182 (clear_inferiors): Update.
7183 * inferiors.h (for_each_inferior_with_data): Declare.
7184 (clear_inferior_list): Declare.
7185 (one_inferior_p): Declare.
7186 (get_first_inferior): Declare.
7187 * linux-low.c (linux_wait_for_event): Replace accessing list
7188 implemention details with API function.
7189 * server.c (target_running): Ditto.
7190 (accumulate_file_name_length): New function.
7191 (emit_dll_description): New function.
7192 (handle_qxfer_libraries): Replace accessing list implemention
7193 details with API function.
7194 (handle_qxfer_threads_worker): New function.
7195 (handle_qxfer_threads_proper): Replace accessing list implemention
7196 details with API function.
7197 (handle_query): Ditto.
7198 (visit_actioned_threads_callback_ftype): New typedef.
7199 (visit_actioned_threads_data): New struct.
7200 (visit_actioned_threads): Rewrite to be find_inferior callback.
7201 (resume): Call find_inferior.
7202 (handle_status): Replace accessing list implemention
7203 details with API function.
7204 (process_serial_event): Replace accessing list implemention details
7206 * target.c (set_desired_inferior): Replace accessing list implemention
7207 details with API function.
7208 * tracepoint.c (same_process_p): New function.
7209 (gdb_agent_about_to_close): Replace accessing list implemention
7210 details with API function.
7211 * win32-low.c (child_delete_thread): Replace accessing list
7212 implemention details with API function.
7213 (match_dll_by_basename): New function.
7214 (dll_is_loaded_by_basename): New function.
7215 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7216 details call to dll_is_loaded_by_basename.
7218 2014-02-19 Doug Evans <dje@google.com>
7220 * dll.h (struct dll_info): Add comment.
7221 * gdbthread.h (struct thread_info): Add comment.
7222 (current_ptid): Simplify.
7223 * inferiors.c (add_process): Update.
7224 (remove_process): Update.
7225 * inferiors.h (struct process_info): Rename member "head" to "entry".
7226 * linux-low.c (delete_lwp): Update.
7228 (last_thread_of_process_p): Update.
7229 (kill_one_lwp_callback, linux_kill): Update.
7230 (status_pending_p_callback): Update.
7231 (wait_for_sigstop): Update. Simplify read of ptid.
7232 (start_step_over): Update.
7233 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7234 (get_lwp_thread): Update.
7235 (struct lwp_info): Rename member "head" to "entry".
7236 * regcache.h (inferior_list_entry): Delete.
7237 * server.c (kill_inferior_callback): Update.
7238 (detach_or_kill_inferior_callback): Update.
7239 (print_started_pid): Update.
7240 (print_attached_pid): Update.
7241 (process_serial_event): Simplify read of ptid.
7242 * thread-db.c (thread_db_create_event): Update.
7243 (thread_db_get_tls_address): Update.
7244 * win32-low.c (current_inferior_ptid): Simplify.
7246 2014-02-19 Tom Tromey <tromey@redhat.com>
7248 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7250 (target_supports_btrace): Update.
7252 2014-02-14 Yao Qi <yao@codesourcery.com>
7254 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7255 (rsp-low-ipa.o): New target.
7257 2014-02-12 Tom Tromey <tromey@redhat.com>
7259 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7260 convert_ascii_to_int.
7261 * regcache.c (registers_to_string): Likewise.
7262 * remote-utils.c (decode_M_packet): Likewise.
7263 * server.c (process_serial_event): Likewise.
7265 2014-02-12 Tom Tromey <tromey@redhat.com>
7267 * server.c (handle_query, handle_v_run): Use hex2bin, not
7269 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7271 2014-02-12 Tom Tromey <tromey@redhat.com>
7273 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7274 convert_int_to_ascii.
7275 * regcache.c (registers_to_string, collect_register_as_string):
7277 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7279 * server.c (process_serial_event): Likewise.
7280 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7281 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7283 2014-02-12 Tom Tromey <tromey@redhat.com>
7285 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7286 bin2hex, not hexify.
7287 * tracepoint.c (cmd_qtstatus): Likewise.
7289 2014-02-12 Tom Tromey <tromey@redhat.com>
7291 * remote-utils.c (monitor_output): Pass explicit length to
7294 2014-02-12 Tom Tromey <tromey@redhat.com>
7296 * tracepoint.c: Include rsp-low.h.
7297 * server.c: Include rsp-low.h.
7298 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7299 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7301 * remote-utils.c: Include rsp-low.h.
7302 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7303 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7304 (convert_int_to_ascii, convert_ascii_to_int): Move to
7306 * regcache.c: Include rsp-low.h.
7307 * ax.c: Include rsp-low.h.
7308 * Makefile.in (SFILES): Add common/rsp-low.c.
7309 (OBS): Add rsp-low.o.
7310 (rsp-low.o): New target.
7312 2014-02-12 Tom Tromey <tromey@redhat.com>
7314 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7315 Include print-utils.h.
7316 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7317 (plongest, thirty_two, phex_nz): Remove.
7318 * Makefile.in (SFILES): Add common/print-utils.c.
7319 (OBS): Add print-utils.o.
7320 (print-utils-ipa.o): New target.
7321 (print-utils.o): New target.
7322 (IPA_OBJS): Add print-utils-ipa.o.
7324 2014-02-06 Tom Tromey <tromey@redhat.com>
7326 * Makefile.in (SFILES): Fix indentation.
7328 2014-02-05 Doug Evans <dje@google.com>
7330 * linux-low.c (linux_wait_for_event): Improve comment.
7331 (linux_wait_1): Keep current_inferior in sync with event_child.
7333 2014-01-22 Doug Evans <dje@google.com>
7335 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7337 2014-01-22 Doug Evans <dje@google.com>
7339 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7340 * configure: Regenerate.
7341 * config.in: Regenerate.
7342 * Makefile.in (SFILES): Add debug.c.
7344 * debug.c: New file.
7345 * debug.h: New file.
7346 * linux-aarch64-low.c (*): Update all debugging printfs to use
7347 debug_printf instead of fprintf.
7348 * linux-arm-low.c (*): Ditto.
7349 * linux-cris-low.c (*): Ditto.
7350 * linux-crisv32-low.c (*): Ditto.
7351 * linux-m32r-low.c (*): Ditto.
7352 * linux-sparc-low.c (*): Ditto.
7353 * linux-x86.c (*): Ditto.
7354 * linux-low.c (*): Ditto.
7355 (linux_wait_1): Add calls to debug_enter, debug_exit.
7356 (linux_wait): Remove redundant debugging printf.
7357 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7358 (linux_resume, unstop_all_lwps): Ditto.
7359 * mem-break.c (*): Update all debugging printfs to use
7360 debug_printf instead of fprintf.
7361 * remote-utils.c (*): Ditto.
7362 * thread-db.c (*): Ditto.
7363 * server.c #include <ctype.h>, "gdb_vecs.h".
7364 (debug_threads): Moved to debug.c.
7365 (*): Update all debugging printfs to use debug_printf instead of
7367 (start_inferior): Replace call to fflush with call to debug_flush.
7368 (monitor_show_help): Mention set debug-format.
7369 (parse_debug_format_options): New function.
7370 (handle_monitor_command): Handle "monitor set debug-format".
7371 (gdbserver_usage): Mention --debug-format.
7372 (main): Parse --debug-format.
7373 * server.h (debug_threads): Declaration moved to debug.h.
7375 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7376 trace_debug_1 that uses debug_printf.
7377 (tracepoint_look_up_symbols): Update all debugging printfs to use
7378 debug_printf instead of fprintf.
7380 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7382 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7385 2014-01-17 Pedro Alves <palves@redhat.com>
7388 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7389 defined after including gdb_proc_service.h.
7391 2014-01-16 Doug Evans <dje@google.com>
7393 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7394 (match_dll): Use it.
7396 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7398 * target.h (target_ops) <read_btrace>: Change parameters and
7399 return type to allow error reporting.
7400 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7401 trace reading errors on.
7402 * linux-low.c (linux_low_read_btrace): Pass trace reading
7404 (linux_low_disable_btrace): New.
7406 2014-01-15 Doug Evans <dje@google.com>
7408 * inferiors.c (thread_id_to_gdb_id): Delete.
7409 * inferiors.h (thread_id_to_gdb_id): Delete.
7411 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7413 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7414 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7417 2014-01-08 Pedro Alves <palves@redhat.com>
7419 * server.c (handle_status): Don't discard previous queued stop
7420 replies or thread's pending status here.
7421 (main) <disconnection>: Do it here instead.
7423 2014-01-08 Pedro Alves <palves@redhat.com>
7425 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7426 * server.c (visit_actioned_threads, handle_pending_status): New
7428 (handle_v_cont): Factor out parts to ...
7429 (resume): ... this new function. If in all-stop, and a thread
7430 being resumed has a pending status, report it without actually
7432 (myresume): Adjust to use the new 'resume' function.
7433 (clear_pending_status_callback, set_pending_status_callback)
7434 (find_status_pending_thread_callback): New functions.
7435 (handle_status): Handle the case of multiple threads having
7436 interesting statuses to report. Report threads' real last signal
7437 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7438 with an interesting thread to report the status for, instead of
7439 always reporting the status of the first thread.
7441 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7443 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7444 * gdbreplay.c (gdbreplay_version): Likewise.
7446 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7448 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7449 iov.iov_len with the real length in use.
7451 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7453 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7454 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7455 for all targets that use win32-low.c.
7456 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7457 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7459 2013-12-13 Pedro Alves <palves@redhat.com>
7461 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7462 if equal to TARGET_WAITKIND_LOADED.
7463 * win32-low.c (cached_status): New static global.
7464 (win32_wait): Add declaration.
7465 (do_initial_child_stuff): Flush all initial pending debug events
7466 up to the initial breakpoint.
7467 (win32_wait): If CACHED_STATUS was set, return that instead
7468 of doing a real wait. Remove the code resuming the execution
7469 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7470 during the initial phase. Also remove the code changing
7471 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7472 TARGET_WAITKIND_STOPPED.
7474 2013-12-11 Yao Qi <yao@codesourcery.com>
7476 * notif.c (handle_notif_ack): Return 0 if no notification
7479 2013-11-20 Doug Evans <dje@google.com>
7481 * linux-low.c (linux_set_resume_request): Fix comment.
7483 2013-11-20 Doug Evans <dje@google.com>
7485 * linux-low.c (resume_status_pending_p): Tweak comment.
7487 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7489 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7490 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7491 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7492 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7493 (srv_amd64_regobj): Add amd64-mpx.o.
7494 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7495 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7496 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7497 * i387-fp.c (num_pl_bnd_register) Added constant.
7498 (num_pl_bnd_cfg_registers) Added constant.
7499 (struct i387_xsave) Added reserved area and MPX fields.
7500 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7501 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7503 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7504 (init_registers_amd64_mpx_linux): Declare new function.
7505 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7506 (x86_64_regmap): Add MPX registers.
7507 (x86_linux_read_description): Add MPX case.
7508 (initialize_low_arch): Initialize MPX targets.
7510 2013-11-18 Tom Tromey <tromey@redhat.com>
7512 * configure: Rebuild.
7513 * configure.ac: Don't check for stdlib.h.
7514 * gdbreplay.c: Unconditionally include stdlib.h.
7516 2013-11-18 Tom Tromey <tromey@redhat.com>
7518 * config.in: Rebuild.
7519 * configure: Rebuild.
7520 * configure.ac: Don't use AC_HEADER_DIRENT.
7522 2013-11-18 Tom Tromey <tromey@redhat.com>
7524 * server.h: Don't check HAVE_STRING_H.
7525 * gdbreplay.c: Don't check HAVE_STRING_H.
7526 * configure: Rebuild.
7528 2013-11-18 Tom Tromey <tromey@redhat.com>
7530 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7533 2013-11-08 Tom Tromey <tromey@redhat.com>
7535 * configure, config.in: Rebuild.
7536 * configure.ac: Remove unused configury.
7538 2013-11-08 Tom Tromey <tromey@redhat.com>
7540 * acinclude.m4: Include common.m4, codeset.m4.
7541 * configure, config.in: Rebuild.
7542 * configure.ac: Use GDB_AC_COMMON.
7544 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7546 * linux-s390-low.c (HWCAP_S390_TE): New define.
7547 (s390_arch_setup): Consider the TE field in the HWCAP for
7548 determining 'have_regset_tdb'.
7550 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7553 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7556 2013-10-02 Pedro Alves <palves@redhat.com>
7558 * server.c (process_serial_event): Don't output "GDBserver
7559 exiting" if GDB is connected through stdio.
7560 * target.c (mywait): Likewise, be silent if GDB is connected
7563 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7565 * lynx-low.c (lynx_add_threads_after_attach): New function.
7566 (lynx_attach): Remove call to add_thread. Add call to
7567 lynx_add_threads_after_attach instead.
7569 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7571 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7572 * config.in, configure: Regenerated.
7574 2013-09-18 Yao Qi <yao@codesourcery.com>
7577 * server.c (start_inferior): Clear 'resume_info'.
7579 2013-09-16 Jiong Wang <jiwang@tilera.com>
7581 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7584 2013-09-16 Jiong Wang <jiwang@tilera.com>
7586 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7587 linux-tile-low.o to srv_tgtobj.
7589 2013-09-16 Will Newton <will.newton@linaro.org>
7591 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7594 2013-09-06 Pedro Alves <palves@redhat.com>
7596 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7597 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7598 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7599 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7600 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7601 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7603 2013-09-06 Pedro Alves <palves@redhat.com>
7605 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7606 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7608 2013-09-06 Pedro Alves <palves@redhat.com>
7610 * linux-amd64-ipa.c: Include tracepoint.h.
7611 * linux-i386-ipa.c: Include tracepoint.h.
7613 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7615 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7616 (ps_get_thread_area): New function.
7618 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7620 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7621 (initialize_low_arch): Call init_registers_crisv32 rather than
7622 init_register_crisv32.
7624 2013-09-05 Pedro Alves <palves@redhat.com>
7626 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7628 * hostio.h: ... this new file.
7629 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7630 win32-low.c: Include hostio.h.
7632 2013-09-05 Pedro Alves <palves@redhat.com>
7634 * server.h (gdb_client_data, handler_func, callback_handler_func)
7635 (delete_file_handler, add_file_handler, append_callback_event)
7636 (delete_callback_event, start_event_loop, initialize_event_loop):
7637 Move to event-loop.h and include it.
7638 * event-loop.h: New file.
7640 2013-09-05 Pedro Alves <palves@redhat.com>
7642 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7643 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7644 (loaded_dll, unloaded_dll): Move to ...
7645 * dll.h: ... this new file.
7646 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7648 2013-09-05 Pedro Alves <palves@redhat.com>
7650 * server.h (current_process, get_thread_process, all_processes)
7651 (add_inferior_to_list, for_each_inferior, current_inferior)
7652 (remove_inferior, add_process, remove_process, find_process_pid)
7653 (have_started_inferiors_p, have_attached_inferiors_p)
7654 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7655 (clear_inferiors, find_inferior, find_inferior_id)
7656 (inferior_target_data, set_inferior_target_data)
7657 (inferior_regcache_data, set_inferior_regcache_data): Move to
7658 inferiors.h, and include it.
7659 * inferiors.h: New file.
7661 2013-09-05 Pedro Alves <palves@redhat.com>
7663 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7667 2013-09-05 Pedro Alves <palves@redhat.com>
7669 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7671 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7672 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7673 (handle_tracepoint_general_set, handle_tracepoint_query)
7674 (tracepoint_finished_step, tracepoint_was_hit)
7675 (release_while_stepping_state_list, current_traceframe)
7676 (in_readonly_region, traceframe_read_mem)
7677 (fetch_traceframe_registers, traceframe_read_sdata)
7678 (traceframe_read_info, struct fast_tpoint_collect_status)
7679 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7680 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7681 (supply_fast_tracepoint_registers)
7682 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7683 (ipa_tdesc, claim_trampoline_space)
7684 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7685 (agent_mem_read, agent_get_trace_state_variable_value)
7686 (agent_set_trace_state_variable_value, agent_tsv_read)
7687 (agent_mem_read_string, get_raw_reg_func_addr)
7688 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7689 * tracepoint.h: ... this new file.
7691 2013-09-05 Pedro Alves <palves@redhat.com>
7693 * server.h (perror_with_name, error, fatal, warning, paddress)
7694 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7696 * utils.h: New file.
7698 2013-09-05 Pedro Alves <palves@redhat.com>
7700 * server.h (remote_debug, noack_mode, transport_is_reliable)
7701 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7702 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7703 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7704 (write_enn, initialize_async_io, enable_async_io)
7705 (disable_async_io, check_remote_input_interrupt_request)
7706 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7707 (dead_thread_notify, prepare_resume_reply)
7708 (decode_address_to_semicolon, decode_address, decode_m_packet)
7709 (decode_M_packet, decode_X_packet, decode_xfer_write)
7710 (decode_search_memory_packet, unhexify, hexify)
7711 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7712 (look_up_one_symbol, relocate_instruction)
7713 (monitor_output): Move to remote-utils.h, and include it.
7714 * remote-utils.h: New file.
7716 2013-09-05 Pedro Alves <palves@redhat.com>
7718 * server.h (_): Delete.
7720 2013-09-02 Pedro Alves <palves@redhat.com>
7722 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7723 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7725 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7727 2013-09-02 Pierre Muller <muller@sourceware.org>
7729 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7730 or WriteProcessMemory complete successfully and handle
7731 ERROR_PARTIAL_COPY error.
7733 2013-09-02 Pedro Alves <palves@redhat.com>
7735 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7736 error instead of EIO.
7738 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7741 * linux-low.c: Include filestuff.h.
7742 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7743 * lynx-low.c: Include filestuff.h.
7744 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7745 * server.c: Include filestuff.h.
7746 (main): Call notice_open_fds.
7747 * spu-low.c: Include filestuff.h.
7748 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7750 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7752 * Makefile.in: Explain why ../target and ../nat are not
7753 listed as include file search paths.
7754 (linux-waitpid.o): New object file rule.
7755 * configure.srv (srv_native_linux_obj): New variable.
7756 Replace all occurrences of linux native object files with
7757 $srv_native_linux_obj.
7758 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7759 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7760 (linux_enable_event_reporting): Remove declaration.
7761 (my_waitpid): Moved to common/linux-waitpid.c.
7762 (linux_wait_for_event): Pass ptid when calling
7763 linux_enable_event_reporting.
7764 (linux_supports_tracefork_flag): Remove.
7765 (linux_enable_event_reporting): Likewise.
7766 (linux_tracefork_grandchild): Remove.
7767 (STACK_SIZE): Moved to common/linux-ptrace.c.
7768 (linux_tracefork_child): Remove.
7769 (linux_test_for_tracefork): Remove.
7770 (linux_look_up_symbols): Call linux_supports_traceclone.
7771 (initialize_low): Remove call to linux_test_for_tracefork.
7772 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7773 common/linux-ptrace.h.
7774 (PTRACE_TYPE_ARG4): Likewise.
7775 Include linux-ptrace.h.
7777 2013-08-21 Pedro Alves <palves@redhat.com>
7779 * config.in: Renegerate.
7781 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7783 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7784 (SFILES): Remove $(srcdir)/common/target-common.c and
7785 add $(srcdir)/target/waitstatus.c.
7786 (OBS): Remove target-common.o and add waitstatus.o.
7787 (server_h): Remove $(srcdir)/../common/target-common.h and
7788 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7789 and $(srcdir)/../target/waitstatus.h.
7790 (target-common.o): Remove.
7791 (waitstatus.o): New target object file.
7792 * target.h: Do not include target-common.h and
7793 include target/resume.h, target/wait.h and
7794 target/waitstatus.h.
7796 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7798 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7799 to PTRACE_TYPE_ARG3.
7800 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7801 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7803 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7804 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7806 2013-07-27 Jie Zhang <jie@codesourcery.com>
7807 Daniel Jacobowitz <dan@codesourcery.com>
7808 Yao Qi <yao@codesourcery.com>
7810 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7811 (mips-linux-watch.o): New rule.
7812 (mips_linux_watch_h): New variable.
7813 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7815 * linux-mips-low.c: Include mips-linux-watch.h.
7816 (struct arch_process_info, struct arch_lwp_info): New.
7817 (update_watch_registers_callback): New function.
7818 (mips_linux_new_process, mips_linux_new_thread) New functions.
7819 (mips_linux_prepare_to_resume, mips_insert_point): New
7821 (mips_remove_point, mips_stopped_by_watchpoint): New
7823 (rsp_bp_type_to_target_hw_bp_type): New function.
7824 (mips_stopped_data_address): New function.
7825 (the_low_target): Add watchpoint support functions.
7827 2013-07-27 Yao Qi <yao@codesourcery.com>
7829 * i386-low.c: Include break-common.h.
7830 (enum target_hw_bp_type): Remove.
7832 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7834 * Makefile.in (SFILES): /common/target-common.c.
7835 (OBS): Add target-common.o.
7836 (server_h): Add $(srcdir)/../common/target-common.h.
7837 (target-common.o): New target.
7838 * server.c (queue_stop_reply_callback): Free
7839 status string after use.
7840 * target.c (target_waitstatus_to_string): Remove.
7841 * target.h: Include target-common.h.
7842 (resume_kind): Likewise.
7843 (target_waitkind): Likewise.
7844 (target_waitstatus): Likewise.
7845 (TARGET_WNOHANG): Likewise.
7847 2013-07-04 Yao Qi <yao@codesourcery.com>
7849 * Makefile.in (host_alias): Use @host_noncanonical@.
7850 (target_alias): Use @target_noncanonical@.
7851 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7852 ACX_NONCANONICAL_HOST.
7853 * configure: Regenerated.
7856 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7858 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7859 * configure: Rebuild.
7860 * Makefile.in (version_host, version_target): Get from configure.
7861 (version.c): Use $(version_host) and $(version_target).
7863 2013-07-03 Pedro Alves <palves@redhat.com>
7865 * Makefile.in (config.status): Depend on development.sh.
7866 * acinclude.m4: Include libmcheck.m4.
7867 * configure: Regenerate.
7869 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7871 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7872 attribute inside the parentheses.
7873 (winapi_DebugSetProcessKillOnExit): Ditto.
7874 (winapi_DebugBreakProcess): Ditto.
7875 (winapi_GenerateConsoleCtrlEvent): Ditto.
7877 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7879 * notif.h (notif_event): Add a dummy member to avoid compiler
7882 2013-07-01 Pedro Alves <palves@redhat.com>
7884 * hostio.c (HOSTIO_PATH_MAX): Define.
7885 (require_filename, handle_open, handle_unlink, handle_readlink):
7888 2013-07-01 Pedro Alves <palves@redhat.com>
7890 * server.h: Include "pathmax.h".
7891 * linux-low.c: Don't include sys/param.h.
7892 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7894 * win32-low.c: Don't include sys/param.h.
7895 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7897 2013-07-01 Pedro Alves <palves@redhat.com>
7899 * event-loop.c: Don't check HAVE_UNISTD_H before including
7901 * gdbreplay.c: Likewise.
7902 * remote-utils.c: Likewise.
7903 * server.c: Likewise.
7904 * configure.ac: Don't check for unistd.h.
7905 * configure: Regenerate.
7907 2013-06-28 Tom Tromey <tromey@redhat.com>
7909 * Makefile.in (version.c): Use version.in, not
7912 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7914 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7915 * configure: Rebuild.
7916 * Makefile.in (version_host, version_target): Get from configure.
7917 (version.c): Use $(version_host) and $(version_target).
7919 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7921 Fix trace-status to output user name without trailing colon.
7922 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7924 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7926 Fix trace-status to output proper start-time and stop-time.
7927 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7928 output start time and stop time in hex as gdb expects.
7930 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7932 * tracepoint.c (build_traceframe_info_xml): Output trace state
7933 variables present in the trace buffer.
7935 2013-06-24 Tom Tromey <tromey@redhat.com>
7937 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7939 (version.o): Remove.
7940 * gdbreplay.c: Include version.h.
7941 (version, host_name): Don't declare.
7942 * server.h: Include version.h.
7943 (version, host_name): Don't declare.
7945 2013-06-12 Pedro Alves <palves@redhat.com>
7947 * linux-x86-low.c (linux_is_elf64): Delete global.
7948 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7949 with local linux_pid_exe_is_elf_64_file use.
7951 2013-06-11 Pedro Alves <palves@redhat.com>
7953 * linux-low.c (regset_disabled, disable_regset): New functions.
7954 (regsets_fetch_inferior_registers)
7955 (regsets_store_inferior_registers): Use them.
7956 (initialize_regsets_info); Don't allocate the disabled_regsets
7958 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7961 2013-06-11 Pedro Alves <palves@redhat.com>
7963 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7966 2013-06-11 Pedro Alves <palves@redhat.com>
7968 * linux-x86-low.c (initialize_low_arch): Call
7969 init_registers_x32_avx_linux.
7971 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7973 Fix compatibility with Android Bionic.
7974 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7977 2013-06-07 Pedro Alves <palves@redhat.com>
7980 * Makefile.in (OBS): Add tdesc.o.
7981 (IPA_OBJS): Add tdesc-ipa.o.
7982 (tdesc-ipa.o): New rule.
7983 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7985 * linux-low.c (new_inferior): Delete.
7986 (disabled_regsets, num_regsets): Delete.
7987 (linux_add_process): Adjust to set the new per-process
7989 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7990 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7991 was a stop. When calling arch_setup, switch the current inferior
7992 to the thread that got an event.
7993 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7994 (regsets_fetch_inferior_registers)
7995 (regsets_store_inferior_registers): New regsets_info parameter.
7997 (linux_register_in_regsets): New regs_info parameter. Adjust to
7999 (register_addr, fetch_register, store_register): New usrregs_info
8000 parameter. Adjust to use it.
8001 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8002 parameter regs_info. Adjust to use it.
8003 (linux_fetch_registers): Get the current inferior's regs_info, and
8005 (linux_store_registers): Ditto.
8006 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8007 (initialize_low): Don't initialize the target_regsets here. Call
8008 initialize_low_arch.
8009 * linux-low.h (target_regsets): Delete declaration.
8010 (struct regsets_info): New.
8011 (struct usrregs_info): New.
8012 (struct regs_info): New.
8013 (struct process_info_private) <new_inferior>: New field.
8014 (struct linux_target_ops): Delete the num_regs, regmap, and
8015 regset_bitmap fields. New field regs_info.
8016 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8017 * i387-fp.c (num_xmm_registers): Delete.
8018 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8019 calls to new interface.
8020 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8021 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8022 Infer the number of xmm registers from the regcache's target
8024 * i387-fp.h (num_xmm_registers): Delete.
8025 * inferiors.c (add_thread): Don't install the thread's regcache
8027 * proc-service.c (gregset_info): Fetch the current inferior's
8028 regs_info. Adjust to use it.
8029 * regcache.c: Include tdesc.h.
8030 (register_bytes, reg_defs, num_registers)
8031 (gdbserver_expedite_regs): Delete.
8032 (get_thread_regcache): If the thread doesn't have a regcache yet,
8033 create one, instead of aborting gdbserver.
8034 (regcache_invalidate_one): Rename to ...
8035 (regcache_invalidate_thread): ... this.
8036 (regcache_invalidate_one): New.
8037 (regcache_invalidate): Only invalidate registers of the current
8039 (init_register_cache): Add target_desc parameter, and use it.
8040 (new_register_cache): Ditto. Assert the target description has a
8041 non zero registers_size.
8042 (regcache_cpy): Add assertions. Adjust.
8043 (realloc_register_cache, set_register_cache): Delete.
8044 (registers_to_string, registers_from_string): Adjust.
8045 (find_register_by_name, find_regno, find_register_by_number)
8046 (register_cache_size): Add target_desc parameter, and use it.
8047 (free_register_cache_thread, free_register_cache_thread_one)
8048 (regcache_release, register_cache_size): New.
8049 (register_size): Add target_desc parameter, and use it.
8050 (register_data, supply_register, supply_register_zeroed)
8051 (supply_regblock, supply_register_by_name, collect_register)
8052 (collect_register_as_string, collect_register_by_name): Adjust.
8053 * regcache.h (struct target_desc): Forward declare.
8054 (struct regcache) <tdesc>: New field.
8055 (init_register_cache, new_register_cache): Add target_desc
8057 (regcache_invalidate_thread): Declare.
8058 (regcache_invalidate_one): Delete declaration.
8059 (regcache_release): Declare.
8060 (find_register_by_number, register_cache_size, register_size)
8061 (find_regno): Add target_desc parameter.
8062 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8064 * remote-utils.c: Include tdesc.h.
8065 (outreg, prepare_resume_reply): Adjust.
8066 * server.c: Include tdesc.h.
8067 (gdbserver_xmltarget): Delete declaration.
8068 (get_features_xml, process_serial_event): Adjust.
8069 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8071 (struct process_info) <tdesc>: New field.
8072 (ipa_tdesc): Declare.
8073 * tdesc.c: New file.
8074 * tdesc.h: New file.
8075 * tracepoint.c: Include tdesc.h.
8076 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8077 (get_context_regcache): Adjust to pass ipa_tdesc down.
8078 (do_action_at_tracepoint): Adjust to get the register cache size
8079 from the context regcache's description.
8080 (traceframe_walk_blocks): Adjust to get the register cache size
8081 from the current trace frame's description.
8082 (traceframe_get_pc): Adjust to get current trace frame's
8083 description and pass it down.
8084 (gdb_collect): Adjust to get the register cache size from the
8086 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8087 (gdbserver_xmltarget): Delete.
8088 (initialize_low_tracepoint): Set the ipa's target description.
8089 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8090 (initialize_low_tracepoint): Set the ipa's target description.
8091 * linux-x86-low.c: Include tdesc.h.
8092 [__x86_64__] (is_64bit_tdesc): New.
8093 (ps_get_thread_area, x86_get_thread_area): Use it.
8094 (i386_cannot_store_register): Rename to ...
8095 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8096 (i386_cannot_fetch_register): Rename to ...
8097 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8098 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8100 (target_regsets): Rename to ...
8101 (x86_regsets): ... this.
8102 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8104 (x86_siginfo_fixup): Use is_64bit_tdesc.
8105 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8106 (tdesc_x32_avx_linux, tdesc_x32_linux)
8107 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8109 (x86_linux_update_xmltarget): Delete.
8110 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8111 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8112 (AMD64_LINUX_USER64_CS): New.
8113 (x86_linux_read_description): New, based on
8114 x86_linux_update_xmltarget.
8115 (same_process_callback): New.
8116 (x86_arch_setup_process_callback): New.
8117 (x86_linux_update_xmltarget): New.
8118 (x86_regsets_info): New.
8119 (amd64_linux_regs_info): New.
8120 (i386_linux_usrregs_info): New.
8121 (i386_linux_regs_info): New.
8122 (x86_linux_regs_info): New.
8123 (x86_arch_setup): Reimplement.
8124 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8125 (x86_emit_ops): Ditto.
8126 (the_low_target): Adjust. Install x86_linux_regs_info,
8127 x86_cannot_fetch_register, and x86_cannot_store_register.
8128 (initialize_low_arch): New.
8129 * linux-ia64-low.c (tdesc_ia64): Declare.
8130 (ia64_fetch_register): Adjust.
8131 (ia64_usrregs_info, regs_info): New globals.
8132 (ia64_regs_info): New function.
8133 (the_low_target): Adjust.
8134 (initialize_low_arch): New function.
8135 * linux-sparc-low.c (tdesc_sparc64): Declare.
8136 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8138 (sparc_arch_setup): New function.
8139 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8140 (the_low_target): Adjust.
8141 (initialize_low_arch): New function.
8142 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8143 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8144 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8145 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8146 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8147 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8148 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8149 (tdesc_powerpc_isa205_vsx64l): Declare.
8150 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8151 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8152 (ppc_set_pc, ppc_get_hwcap): Adjust.
8153 (ppc_usrregs_info): Forward declare.
8154 (!__powerpc64__) ppc_regmap_adjusted: New global.
8155 (ppc_arch_setup): Adjust to the current process'es target
8157 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8158 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8159 (ppc_store_evrregset): Adjust.
8160 (target_regsets): Rename to ...
8161 (ppc_regsets): ... this, and make static.
8162 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8163 (ppc_regs_info): New function.
8164 (the_low_target): Adjust.
8165 (initialize_low_arch): New function.
8166 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8167 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8168 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8169 (tdesc_s390x_linux64v2): Declare.
8170 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8171 (s390_fill_gregset, s390_store_last_break): Adjust.
8172 (target_regsets): Rename to ...
8173 (s390_regsets): ... this, and make static.
8174 (s390_get_pc, s390_set_pc): Adjust.
8175 (s390_get_hwcap): New target_desc parameter, and use it.
8176 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8177 (s390_arch_setup): Adjust to set the current process'es target
8178 description. Don't adjust the regmap.
8179 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8180 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8181 (regs_info_3264): New globals.
8182 (s390_regs_info): New function.
8183 (the_low_target): Adjust.
8184 (initialize_low_arch): New function.
8185 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8186 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8187 [__mips64] (init_registers_mips_linux)
8188 (init_registers_mips_dsp_linux): Delete defines.
8189 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8190 (have_dsp): New global.
8191 (mips_read_description): New, based on mips_arch_setup.
8192 (mips_arch_setup): Reimplement.
8193 (get_usrregs_info): New function.
8194 (mips_cannot_fetch_register, mips_cannot_store_register)
8195 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8196 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8197 (target_regsets): Rename to ...
8198 (mips_regsets): ... this, and make static.
8199 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8200 (dsp_regs_info, regs_info): New globals.
8201 (mips_regs_info): New function.
8202 (the_low_target): Adjust.
8203 (initialize_low_arch): New function.
8204 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8205 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8207 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8208 (arm_read_description): New, with bits factored from
8210 (arm_arch_setup): Reimplement.
8211 (target_regsets): Rename to ...
8212 (arm_regsets): ... this, and make static.
8213 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8214 (arm_regs_info): New function.
8215 (the_low_target): Adjust.
8216 (initialize_low_arch): New function.
8217 * linux-m68k-low.c (tdesc_m68k): Declare.
8218 (target_regsets): Rename to ...
8219 (m68k_regsets): ... this, and make static.
8220 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8221 (m68k_regs_info): New function.
8222 (m68k_arch_setup): New function.
8223 (the_low_target): Adjust.
8224 (initialize_low_arch): New function.
8225 * linux-sh-low.c (tdesc_sharch): Declare.
8226 (target_regsets): Rename to ...
8227 (sh_regsets): ... this, and make static.
8228 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8229 (sh_regs_info, sh_arch_setup): New functions.
8230 (the_low_target): Adjust.
8231 (initialize_low_arch): New function.
8232 * linux-bfin-low.c (tdesc_bfin): Declare.
8233 (bfin_arch_setup): New function.
8234 (bfin_usrregs_info, regs_info): New globals.
8235 (bfin_regs_info): New function.
8236 (the_low_target): Adjust.
8237 (initialize_low_arch): New function.
8238 * linux-cris-low.c (tdesc_cris): Declare.
8239 (cris_arch_setup): New function.
8240 (cris_usrregs_info, regs_info): New globals.
8241 (cris_regs_info): New function.
8242 (the_low_target): Adjust.
8243 (initialize_low_arch): New function.
8244 * linux-cris-low.c (tdesc_crisv32): Declare.
8245 (cris_arch_setup): New function.
8246 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8247 (cris_regs_info): New function.
8248 (the_low_target): Adjust.
8249 (initialize_low_arch): New function.
8250 * linux-m32r-low.c (tdesc_m32r): Declare.
8251 (m32r_arch_setup): New function.
8252 (m32r_usrregs_info, regs_info): New globals.
8253 (m32r_regs_info): Adjust.
8254 (initialize_low_arch): New function.
8255 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8256 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8257 (tic6x_usrregs_info): Forward declare.
8258 (tic6x_read_description): New function, based on ...
8259 (tic6x_arch_setup): ... this. Reimplement.
8260 (target_regsets): Rename to ...
8261 (tic6x_regsets): ... this, and make static.
8262 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8263 (tic6x_regs_info): New function.
8264 (the_low_target): Adjust.
8265 (initialize_low_arch): New function.
8266 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8267 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8268 (target_regsets): Rename to ...
8269 (xtensa_regsets): ... this, and make static.
8270 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8272 (xtensa_arch_setup, xtensa_regs_info): New functions.
8273 (the_low_target): Adjust.
8274 (initialize_low_arch): New function.
8275 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8276 (nios2_arch_setup): Set the current process'es tdesc.
8277 (target_regsets): Rename to ...
8278 (nios2_regsets): ... this.
8279 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8280 (nios2_regs_info): New function.
8281 (the_low_target): Adjust.
8282 (initialize_low_arch): New function.
8283 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8284 (aarch64_arch_setup): Set the current process'es tdesc.
8285 (target_regsets): Rename to ...
8286 (aarch64_regsets): ... this.
8287 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8288 (aarch64_regs_info): New function.
8289 (the_low_target): Adjust.
8290 (initialize_low_arch): New function.
8291 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8293 (target_regsets): Rename to ...
8294 (tile_regsets): ... this.
8295 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8296 (tile_regs_info): New function.
8297 (tile_arch_setup): Set the current process'es tdesc.
8298 (the_low_target): Adjust.
8299 (initialize_low_arch): New function.
8300 * spu-low.c (tdesc_spu): Declare.
8301 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8302 * win32-arm-low.c (tdesc_arm): Declare.
8303 (arm_arch_setup): New function.
8304 (the_low_target): Install arm_arch_setup instead of
8306 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8307 (init_windows_x86): Rename to ...
8308 (i386_arch_setup): ... this. Set `win32_tdesc'.
8309 (the_low_target): Adjust.
8310 * win32-low.c (win32_tdesc): New global.
8311 (child_add_thread): Don't create the thread cache here.
8312 (do_initial_child_stuff): Set the new process'es tdesc.
8313 * win32-low.h (struct target_desc): Forward declare.
8314 (win32_tdesc): Declare.
8315 * lynx-i386-low.c (tdesc_i386): Declare global.
8316 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8317 * lynx-low.c (lynx_tdesc): New global.
8318 (lynx_add_process): Set the new process'es tdesc.
8319 * lynx-low.h (struct target_desc): Forward declare.
8320 (lynx_tdesc): Declare global.
8321 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8322 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8323 * nto-low.c (nto_tdesc): New global.
8324 (do_attach): Set the new process'es tdesc.
8325 * nto-low.h (struct target_desc): Forward declare.
8326 (nto_tdesc): Declare.
8327 * nto-x86-low.c (tdesc_i386): Declare.
8328 (nto_x86_arch_setup): Set `nto_tdesc'.
8330 2013-06-04 Gary Benson <gbenson@redhat.com>
8332 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8333 to qSupported response when appropriate.
8334 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8335 with nonzero-length annex.
8336 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8337 arguments supplied in annex.
8339 2013-05-31 Doug Evans <dje@google.com>
8342 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8343 64 bits in 64-cross-32 environment.
8345 2013-05-28 Pedro Alves <palves@redhat.com>
8347 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8348 (aarch64-without-fpu.c): Delete rule.
8349 * configure.srv (aarch64*-*-linux*): Remove references to
8350 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8351 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8354 2013-05-24 Pedro Alves <palves@redhat.com>
8356 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8357 instead of strchr/decode_address. Error if the range isn't split
8358 with a ','. Don't assume there's be a ':' in the action.
8360 2013-05-23 Yao Qi <yao@codesourcery.com>
8361 Pedro Alves <palves@redhat.com>
8363 * linux-low.c (lwp_in_step_range): New function.
8364 (linux_wait_1): If the thread was range stepping and stopped
8365 outside the stepping range, report the stop to GDB. Otherwise,
8366 continue stepping. Add range stepping debug output.
8367 (linux_set_resume_request): Copy the step range from the resume
8369 (linux_supports_range_stepping): New.
8370 (linux_target_ops) <supports_range_stepping>: Set to
8371 linux_supports_range_stepping.
8372 * linux-low.h (struct linux_target_ops)
8373 <supports_range_stepping>: New field.
8374 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8375 * linux-x86-low.c (x86_supports_range_stepping): New.
8376 (the_low_target) <supports_range_stepping>: Set to
8377 x86_supports_range_stepping.
8378 * server.c (handle_v_cont): Handle 'r' action.
8379 (handle_v_requests): Append ";r" if the target supports range
8381 * target.h (struct thread_resume) <step_range_start,
8382 step_range_end>: New fields.
8383 (struct target_ops) <supports_range_stepping>:
8385 (target_supports_range_stepping): New macro.
8387 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8389 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8390 confusion in comment.
8392 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8394 * lynx-low.c (struct process_info_private): New type.
8395 (lynx_add_process): New function.
8396 (lynx_create_inferior, lynx_attach): Replace calls to
8397 add_process by calls to lynx_add_process.
8398 (lynx_resume): If PTID is null, then try using
8399 current_process()->private->last_wait_event_ptid.
8401 (lynx_clear_inferiors): Delete. The contents of that function
8402 has been inlined in lynx_mourn;
8403 (lynx_wait_1): Save the ptid in the process's private data.
8404 (lynx_mourn): Free the process' private data. Replace call
8405 to lynx_clear_inferiors by call to clear_inferiors.
8407 2013-05-17 Yao Qi <yao@codesourcery.com>
8409 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8412 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8414 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8415 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8416 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8417 PT_TEXT_END_ADDR guards. Update comments.
8418 (linux_target_op) <read_offsets>: Conditionally define to
8419 linux_read_offsets if the target is UCLIBC and if it defines
8420 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8422 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8423 Andrew Jenner <andrew@codesourcery.com>
8425 * Makefile.in (SFILES): Add linux-nios2-low.c.
8426 (clean): Add action to delete nios2-linux.c.
8427 (nios2-linux.c): New rule.
8428 * configure.srv: Add nios2*-*-linux*.
8429 * linux-nios2-low.c: New.
8431 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8433 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8435 2013-04-25 Hui Zhu <hui@codesourcery.com>
8438 * ax.c (ax_printf): Add fflush.
8440 2013-04-22 Tom Tromey <tromey@redhat.com>
8442 * Makefile.in (SFILES): Add filestuff.c.
8443 (OBS): Add filestuff.o.
8444 (filestuff.o): New target.
8445 * config.in, configure: Rebuild.
8446 * configure.ac: Check for fdwalk, pipe2.
8448 2013-04-17 Pedro Alves <palves@redhat.com>
8450 * configure.ac (USE_THREAD_DB): Delete variable.
8451 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8452 Don't AC_SUBST USE_THREAD_DB.
8453 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8454 * config.in, configure: Regenerate.
8456 2013-04-16 Pedro Alves <palves@redhat.com>
8458 * linux-low.h (struct lwp_info) <thread_known>: Move under
8459 the USE_THREAD_DB #ifdef.
8461 2013-04-16 Pedro Alves <palves@redhat.com>
8463 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8464 (linux-low.o): Delete rule.
8465 * linux-low.h: Always include "gdb_thread_db.h" instead of
8466 conditionally including thread_db.h.
8467 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8470 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8472 * Makefile.in (install-only): Fix make install regression.
8474 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8476 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8477 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8479 * gdbserver.1: Remove.
8481 2013-03-22 Pedro Alves <palves@redhat.com>
8483 * linux-low.c (handle_extended_wait): Don't call
8484 linux_enable_event_reporting.
8486 2013-03-15 Tony Theodore <tonyt@logyst.com>
8489 * Makefile.in (SHELL): Use @SHELL@.
8491 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8493 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8496 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8498 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8499 Remove extraneous NULL element.
8501 2013-03-13 Yao Qi <yao@codesourcery.com>
8503 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8504 'V' block in trace frame.
8506 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8508 * target.h (struct target_ops): Add btrace ops.
8509 (target_supports_btrace): New macro.
8510 (target_enable_btrace): New macro.
8511 (target_disable_btrace): New macro.
8512 (target_read_btrace): New macro.
8513 * gdbthread.h (struct thread_info): Add btrace field.
8514 * server.c: Include btrace-common.h.
8515 (handle_btrace_general_set): New function.
8516 (handle_btrace_enable): New function.
8517 (handle_btrace_disable): New function.
8518 (handle_general_set): Call handle_btrace_general_set.
8519 (handle_qxfer_btrace): New function.
8520 (struct qxfer qxfer_packets[]): Add btrace entry.
8521 * inferiors.c (remove_thread): Disable btrace.
8522 * linux-low: Include linux-btrace.h.
8523 (linux_low_enable_btrace): New function.
8524 (linux_low_read_btrace): New function.
8525 (linux_target_ops): Add btrace ops.
8526 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8527 Add srv_linux_btrace=yes.
8528 (x86_64-*-linux*): Add linux-btrace.o.
8529 Add srv_linux_btrace=yes.
8530 * configure.ac: Define HAVE_LINUX_BTRACE.
8531 * config.in: Regenerated.
8532 * configure: Regenerated.
8534 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8536 * server.c (handle_qxfer): Preserve error message if -3 is
8538 (qxfer): Document the -3 return value.
8540 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8542 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8543 (linux_btrace_h): New variable.
8544 (linux-btrace.o): New rule.
8546 2013-03-08 Stan Shebs <stan@codesourcery.com>
8547 Hafiz Abid Qadeer <abidh@codesourcery.com>
8549 * tracepoint.c (trace_buffer_size): New global.
8550 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8551 (init_trace_buffer): Change to one-argument function. Allocate
8552 trace buffer memory.
8553 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8554 handle QTBuffer:size packet.
8555 (cmd_bigqtbuffer_size): New function.
8556 (initialize_tracepoint): Call init_trace_buffer with
8557 DEFAULT_TRACE_BUFFER_SIZE.
8558 * server.c (handle_query): Add QTBuffer:size in the
8561 2013-03-07 Yao Qi <yao@codesourcery.com>
8563 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8564 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8566 (cmd_qtsp): Adjust condition. Do post increment.
8567 Set cur_action and cur_step_action back to 0.
8569 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8572 * linux-low.c (linux_write_memory): Return early success if LEN is
8575 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8577 * configure.srv: Add x86_64-*-cygwin* as target.
8579 2013-02-28 Tom Tromey <tromey@redhat.com>
8581 * configure.ac: Invoke AC_SYS_LARGEFILE.
8582 * configure, config.in: Rebuild.
8584 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8586 * win32-low.c: Throughout, fix format strings and casts of
8587 printf-like functions to avoid type related warnings on all
8589 (get_child_debug_event): Print dwDebugEventCode as hex since
8590 that's how it's usually documented.
8592 2013-02-28 Yao Qi <yao@codesourcery.com>
8594 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8597 2013-02-27 Jiong Wang <jiwang@tilera.com>
8599 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8600 (reg-tilegx32.c): New rule.
8601 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8602 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8603 different register info initializer according to elf class.
8604 (init_registers_tilgx32): New function. The tilegx32 register info
8606 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8607 (tile_store_gregset): Likewise.
8609 2013-02-27 Yao Qi <yao@codesourcery.com>
8611 * server.c (process_point_options): Print debug message when
8612 debug_threads is true.
8614 2013-02-26 Yao Qi <yao@codesourcery.com>
8616 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8618 2013-02-19 Pedro Alves <palves@redhat.com>
8619 Kai Tietz <ktietz@redhat.com>
8623 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8624 instead of strtoul to extract address from packet.
8625 (process_serial_event) <'z'>: Likewise.
8627 2013-02-18 Yao Qi <yao@codesourcery.com>
8629 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8631 2013-02-14 Pedro Alves <palves@redhat.com>
8635 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8636 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8638 2013-02-14 Pedro Alves <palves@redhat.com>
8640 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8642 2013-02-14 Pedro Alves <palves@redhat.com>
8644 * tracepoint.c (save_string): Delete.
8645 (add_tracepoint_action): Use savestring instead of save_string.
8647 2013-02-12 Pedro Alves <palves@redhat.com>
8649 * linux-xtensa-low.c: Ditto.
8650 * xtensa-xtregs.c: Ditto.
8652 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8654 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8657 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8659 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8660 aarch64_num_wp_regs and aarch64_num_bp_regs to
8661 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8663 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8665 * linux-aarch64-low.c (ps_get_thread_area): Replace
8666 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8668 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8669 Marcus Shawcroft <marcus.shawcroft@arm.com>
8670 Nigel Stephens <nigel.stephens@arm.com>
8671 Yufeng Zhang <yufeng.zhang@arm.com>
8673 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8674 (aarch64.c, aarch64-without-fpu.c): New targets.
8675 * configure.srv (aarch64*-*-linux*): New.
8676 * linux-aarch64-low.c: New file.
8678 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8680 * linux-low.c (handle_extended_wait, linux_create_inferior)
8681 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8682 (dequeue_one_deferred_signal, linux_resume_one_thread)
8683 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8684 (linux_tracefork_grandchild, linux_test_for_tracefork)
8685 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8686 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8687 where the argument is 0.
8689 2013-01-25 Yao Qi <yao@codesourcery.com>
8691 * event-loop.c: Include "queue.h".
8692 (gdb_event_p): New typedef.
8693 (struct gdb_event) <next_event>: Remove.
8694 (event_queue): Change to QUEUE(gdb_event_p).
8695 (async_queue_event): Remove.
8696 (gdb_event_xfree): New.
8697 (initialize_event_loop): New.
8698 (process_event): Use API from QUEUE.
8699 (wait_for_event): Likewise.
8700 * server.c (main): Call initialize_event_loop.
8701 * server.h (initialize_event_loop): Declare.
8703 2013-01-18 Yao Qi <yao@codesourcery.com>
8705 * ax.h (struct eval_agent_expr_context): New.
8706 (gdb_eval_agent_expr): Update declaration.
8707 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8708 TFRAME. Add new argument CTX.
8709 * server.h (struct eval_agent_expr_context): Declare.
8710 (agent_mem_read, agent_tsv_read): Update declaration.
8711 (agent_mem_read_string): Likewise.
8712 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8713 (add_traceframe_block): Add new argument TPOINT.
8714 Increase TPOINT->traceframe_usage.
8715 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8716 eval_tracepoint_agent_expr.
8717 (condition_true_at_tracepoint): Likewise.
8718 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8719 (agent_mem_read_string, agent_tsv_read): Likewise.
8721 2013-01-16 Yao Qi <yao@codesourcery.com>
8723 * linux-low.c (linux_resume_one_lwp): Don't check
8724 'lwp->bp_reinsert != 0'.
8726 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8727 Pedro Alves <palves@redhat.com>
8729 * lynx-low.c (ptrace_request_to_str): Define a temporary
8730 macro and use it to simplify this function's implementation.
8732 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8734 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8737 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8739 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8741 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8743 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8745 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8747 * lynx-low.c (lynx_resume): Use the resume_info parameter
8748 to determine the ptid for the lynx_ptrace call, unless
8749 it is equal to minus_one_ptid, in which case we use the
8750 ptid of the current_inferior.
8751 (lynx_wait_1): After having received a thread create/exit
8752 event, resume the inferior's execution using the signaling
8753 thread's ptid, rather than the old ptid.
8755 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8757 * lynx-low.c (lynx_resume): Delete variable ret.
8759 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8761 * gdbreplay.c (gdbreplay_version): Update copyright year.
8762 * server.c (gdbserver_version): Likewise.
8764 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8766 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8769 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8771 * lynx-low.c (ptrace_request_to_str): Add handling for
8774 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8776 * lynx-low.c (lynx_attach): Delete variable new_process.
8778 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8780 * lynx-low.c (lynx_create_inferior): Delete variable
8783 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8785 * lynx-low.c (ptrace_request_to_str): Do not handle
8786 PTRACE_GETTHREADLIST if this macro does not exist.
8788 2012-12-15 Yao Qi <yao@codesourcery.com>
8790 * Makefile.in (OBS): Add notif.o.
8791 * notif.c, notif.h: New.
8792 * server.c: Include "notif.h".
8793 (struct vstop_notif) <next>: Remove.
8795 (queue_stop_reply): Update.
8796 (push_event, send_next_stop_reply): Remove.
8797 (discard_queued_stop_replies): Update.
8798 (notif_stop): New variable.
8799 (handle_v_stopped): Remove.
8800 (handle_v_requests): Don't call handle_v_stopped. Call
8801 handle_ack_notif instead.
8802 (queue_stop_reply_callback): Call notif_event_enque instead
8803 of queue_stop_reply.
8804 (handle_status): Don't call send_next_stop_reply, call
8805 notif_write_event instead.
8806 (kill_inferior_callback): Likewise.
8807 (detach_or_kill_inferior_callback): Likewise.
8808 (main): Call initialize_notif.
8809 (process_serial_event): Call QUEUE_is_empty.
8810 (handle_target_event): Call notif_push instead of push event.
8811 * server.h (push_event): Remove declaration.
8813 2012-12-10 Tom Tromey <tromey@redhat.com>
8815 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8816 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8819 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8820 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8821 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8822 (amd64-linux-ipa.o, ax.o): Rewrite.
8823 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8824 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8825 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8826 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8827 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8828 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8829 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8830 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8831 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8832 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8833 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8834 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8835 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8836 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8837 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8838 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8839 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8840 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8841 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8842 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8843 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8844 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8845 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8846 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8847 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8848 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8849 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8850 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8851 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8852 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8853 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8854 (reg-tilegx.o): Remove.
8855 (all_object_files): New macro.
8856 Include .deps files.
8857 * aclocal.m4, configure: Rebuild.
8858 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8859 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8860 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8862 2012-12-05 Tom Tromey <tromey@redhat.com>
8865 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8867 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8869 * configure.ac: Check for linux/perf_event.h.
8870 * config.in: Regenerated.
8871 * configure: Regenerated.
8873 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8875 * hostio.c (handle_readlink): Decrease buffer size
8876 parameter passed to readlink by one byte.
8878 2012-11-26 Yao Qi <yao@codesourcery.com>
8880 * configure.ac (build_warnings): Append '-Wempty-body'.
8881 * configure: Regenerated.
8882 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8885 2012-11-15 Pierre Muller <muller@sourceware.org>
8887 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8888 * config.in: Regenerate.
8889 * configure: Regenerate.
8890 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8891 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8892 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8893 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8895 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8896 instead of <sys/wait.h> header.
8897 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8899 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8901 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8902 (various make rules): Remove -DGDBSERVER
8904 2012-11-09 Yao Qi <yao@codesourcery.com>
8906 * spu-low.c (current_ptid): Move it to ..
8907 * gdbthread.h: ... here. New.
8908 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8909 * server.c (myresume, process_serial_event): Likewise.
8910 * thread-db.c (thread_db_find_new_threads): Likewise.
8911 * tracepoint.c (run_inferior_command): Likewise.
8913 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8915 * server.c (handle_search_memory_1): Include access length in
8918 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8920 * linux-crisv32-low.c: Fix compile errors.
8922 2012-09-04 Yao Qi <yao@codesourcery.com>
8924 * tracepoint.c (cmd_qtsv): Adjust debug message.
8925 Don't check CUR_TPOINT.
8927 2012-08-28 Yao Qi <yao@codesourcery.com>
8929 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8930 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8931 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8932 Remove declarations of xmalloc, xreallloc, xstrdup and
8934 * Makefile.in (libiberty_h): New.
8935 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8936 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8938 2012-08-23 Yao Qi <yao@codesourcery.com>
8940 * server.h: Remove declaration of 'xsnprintf'.
8942 2012-08-22 Keith Seitz <keiths@redhat.com>
8944 * server.h: Include build-gnulib-gbserver/config.h.
8945 * gdbreplay.c: Likewise.
8947 2012-08-08 Doug Evans <dje@google.com>
8949 * Makefile.in (SFILES): Add gdb_vecs.c.
8950 (OBS): Add gdb_vecs.o.
8951 (gdb_vecs_h, host_defs_h): New variables.
8952 (thread-db.o): Add $(gdb_vecs_h) dependency.
8953 (gdb_vecs.o): New rule.
8954 * thread-db.c: #include "gdb_vecs.h".
8955 (thread_db_load_search): Use a vector to iterate over path elements.
8956 Handle text appearing after "$pdir".
8958 * configure.ac: Add check for strstr.
8959 * config.in: Regenerate.
8960 * configure: Regenerate.
8962 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8964 * hostio.c (handle_pread): If pread fails, fall back to attempting
8966 (handle_pwrite): Likewise for pwrite.
8968 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8970 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8971 between unsupported TYPE and unimplementable ADDR/LEN combination.
8972 (arm_insert_point): Act on new return value.
8974 2012-07-31 Pedro Alves <palves@redhat.com>
8976 * server.c (process_point_options): Only skip tokens if we find
8977 one that is unrecognized. Don't treat 'X' specially while
8978 skipping unrecognized tokens.
8980 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8982 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8983 to 4-byte-align HW breakpoint addresses for Thumb.
8985 2012-07-27 Yao Qi <yao@codesourcery.com>
8989 * server.h: Declare gdb_agent_about_to_close.
8990 * target.c (kill_inferior): Include "agent.h".
8991 New. Send command 'kill'.
8992 * target.h (kill_inferior): Removed macro.
8993 * tracepoint.c (gdb_agent_about_to_close): New.
8994 (gdb_agent_helper_thread): Handle command 'close'.
8995 Wait endlessly until the inferior stops.
8996 Install gdb_agent_remove_socket to atexit hook.
8997 (agent_socket_name): New static variable.
8998 (gdb_agent_socket_init): Replace local variable 'name' with
8999 'agent_socket_name'.
9000 (gdb_agent_remove_socket): New.
9002 2012-07-27 Yao Qi <yao@codesourcery.com>
9004 * server.c (process_point_options): Stop at 'X' when parsing.
9006 2012-07-19 Michael Eager <eager@eagercon.com>
9008 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9010 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9011 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9012 hardware breakpoint.
9014 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9016 * gdbserver/linux-low.c (initialize_low): Call
9017 linux_ptrace_init_warnings.
9019 2012-07-02 Doug Evans <dje@google.com>
9021 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9024 2012-07-02 Stan Shebs <stan@codesourcery.com>
9026 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9027 (ax.o): Add it to build rule.
9029 (OBS): Add format.o.
9030 (IPA_OBS): Add format.o.
9031 * server.c (handle_query): Claim support for breakpoint commands.
9032 (process_point_options): Add command case.
9033 (process_serial_event): Leave running if there are printfs in
9035 * mem-break.h (any_persistent_commands): Declare.
9036 (add_breakpoint_commands): Declare.
9037 (gdb_no_commands_at_breakpoint): Declare.
9038 (run_breakpoint_commands): Declare.
9039 * mem-break.c (struct point_command_list): New struct.
9040 (struct breakpoint): New field command_list.
9041 (any_persistent_commands): New function.
9042 (add_commands_to_breakpoint): New function.
9043 (add_breakpoint_commands): New function.
9044 (gdb_no_commands_at_breakpoint): New function.
9045 (run_breakpoint_commands): New function.
9046 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9048 * ax.c: Include format.h.
9049 (ax_printf): New function.
9050 (gdb_eval_agent_expr): Add printf opcode.
9052 2012-06-13 Yao Qi <yao@codesourcery.com>
9054 * server.c (start_inferior): Remove duplicated writes to fields
9055 'last_resume_kind' and 'last_status' of 'current_inferior'.
9057 2012-06-12 Yao Qi <yao@codesourcery.com>
9058 Pedro Alves <palves@redhat.com>
9060 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9062 * server.c (handle_v_cont): Extend comment.
9064 2012-06-11 Yao Qi <yao@codesourcery.com>
9066 * linux-low.c (linux_attach): Add 'static'.
9068 2012-06-06 Yao Qi <yao@codesourcery.com>
9070 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9072 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9074 Fix gcc -flto compilation warning.
9075 * server.c (main): Make variable multi_mode and attach volatile.
9077 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9079 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9080 if the platform doesn't know about it.
9082 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9084 * Makefile.in (SFILES): Add linux-tile-low.c.
9085 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9086 * configure.srv: Handle tilegx-*-linux*.
9087 * linux-tile-low.c: New file.
9089 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9091 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9093 2012-05-24 Pedro Alves <palves@redhat.com>
9097 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9099 2012-05-24 Pedro Alves <palves@redhat.com>
9103 Replace target_signal with gdb_signal throughout.
9105 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9107 * linux-low.c (linux_store_registers): Avoid the copying sequence
9108 when no data has been retrieved by ptrace.
9110 2012-05-22 Will Deacon <will.deacon@arm.com>
9112 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9113 Include asm/ptrace.h.
9114 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9117 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9119 * linux-low.c (linux_store_registers): Don't re-retrieve data
9120 with ptrace that has already been obtained from /proc. Always
9121 copy any data retrieved with ptrace to the buffer supplied.
9123 2012-05-11 Yao Qi <yao@codesourcery.com>
9124 Pedro Alves <palves@redhat.com>
9126 * linux-low.c (enum stopping_threads_kind): New.
9127 (stopping_threads): Change type to `enum stopping_threads_kind'.
9128 (handle_extended_wait): If stopping and suspending threads, leave
9129 the new_lwp suspended too.
9130 (linux_wait_for_event): Adjust.
9131 (stop_all_lwps): Set `stopping_threads' to
9132 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9133 whether we're suspending threads or just stopping them. Assert no
9136 2012-04-29 Yao Qi <yao@codesourcery.com>
9138 * server.h: Move some code to ...
9139 * gdbthread.h: ... here. New.
9140 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9141 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9142 (nto-low.o, win32-low.o): Likewise.
9143 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9144 * regcache.c, remote-utils.c, server.c: Likewise.
9145 * target.c, tracepoint.c, win32-low.c: Likewise.
9147 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9149 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9150 (PTRACE_ARG4_TYPE): Likewise.
9151 (PTRACE_XFER_TYPE): Likewise.
9152 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9153 ptrace to PTRACE_ARG3_TYPE.
9154 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9155 (PTRACE_ARG4_TYPE): Likewise.
9156 (PTRACE_XFER_TYPE): Likewise.
9157 (linux_detach_one_lwp): Cast fourth argument of
9158 ptrace to long then PTRACE_ARG4_TYPE.
9159 (regsets_fetch_inferior_registers): Cast third argument of
9160 ptrace to long then PTRACE_ARG3_TYPE.
9161 (regsets_store_inferior_registers): Likewise.
9163 2012-04-20 Pedro Alves <palves@redhat.com>
9165 * configure: Regenerate.
9167 2012-04-19 Pedro Alves <palves@redhat.com>
9169 * Makefile.in (GNULIB_BUILDDIR): New.
9170 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9171 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9172 (all, install-only, uninstall, clean-info, all-lib, clean): No
9173 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9174 (maintainer-clean realclean distclean): Use subdir_do.
9176 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9177 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9178 * acinclude.m4: Include acx_configure_dir.m4.
9179 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9180 calls. Call AC_PROG_RANLIB. Configure gnulib using
9183 (GNULIB_STDINT_H): Adjust.
9184 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9185 * gdbreplay.c: Include build-gnulib/config.h.
9186 * server.h: Likewise.
9187 * aclocal.m4: Regenerate.
9188 * config.in: Regenerate.
9189 * configure: Regenerate.
9191 2012-04-19 Pedro Alves <palves@redhat.com>
9193 * Makefile.in (LIBGNU, INCGNU): Adjust.
9194 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9195 (all, install-only, uninstall, clean-info, all-lib, clean)
9196 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9197 * configure.ac: Adjust AC_OUTPUT output.
9198 * aclocal.m4: Regenerate.
9199 * configure: Regenerate.
9201 2012-04-19 Pedro Alves <palves@redhat.com>
9203 * Makefile.in (generated_files): New.
9204 (server_h): Remove the explicit dependency on config.h, and depend
9205 on $generated_files.
9207 2012-04-19 Pedro Alves <palves@redhat.com>
9209 * Makefile.in (INCGNU): Add -Ignulib.
9211 2012-04-19 Pedro Alves <palves@redhat.com>
9213 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9214 (INCGNU): ... this, and spell out -I here.
9215 (GNULIB_LIB): Rename to ...
9217 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9219 2012-04-19 Pedro Alves <palves@redhat.com>
9221 * config.in: Regenerate.
9223 2012-04-19 Pedro Alves <palves@redhat.com>
9225 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9226 * server.h (memmem): Remove declaration.
9227 * config.in: Regenerate.
9228 * configure: Regenerate.
9230 2012-04-19 Yao Qi <yao@codesourcery.com>
9232 * Makefile.in (SFILES): Add common/vec.c.
9236 2012-04-19 Yao Qi <yao@codesourcery.com>
9238 * remote-utils.c (prepare_resume_reply): Replace with macro
9239 target_core_of_thread.
9240 * server.c (handle_qxfer_threads_proper): Likewise.
9241 * target.h (traget_core_of_thread): New macro.
9243 2012-04-18 Pedro Alves <palves@redhat.com>
9245 * aclocal.m4: Regenerate.
9246 * configure: Regenerate.
9248 2012-04-16 Yao Qi <yao@codesourcery.com>
9250 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9251 duplicated on address.
9253 2012-04-16 Yao Qi <yao@codesourcery.com>
9255 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9256 (struct tracepoint_action_ops) <send>: New field.
9257 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9258 (agent_expr_send, x_tracepoint_action_send): New.
9259 (l_tracepoint_action_send): New.
9260 (cmd_qtdp): Download and install tracepoint
9261 according to `use_agent'.
9262 (run_inferior_command): Add one more parameter `len'.
9264 (tracepoint_send_agent): New.
9265 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9267 2012-04-16 Yao Qi <yao@codesourcery.com>
9269 * tracepoint.c (download_tracepoints): Moved to ...
9270 (cmd_qtstart): ... here.
9272 2012-04-14 Yao Qi <yao@codesourcery.com>
9274 * tracepoint.c: Include inttypes.h.
9275 (struct collect_memory_action): Use sized types.
9276 (struct tracepoint): Likewise.
9277 (cmd_qtdp, stop_tracing): Update print specifiers.
9278 (cmd_qtp, response_tracepoint): Likewise.
9279 (collect_data_at_tracepoint): Likewise.
9280 (collect_data_at_step): Likewise.
9282 2012-04-14 Yao Qi <yao@codesourcery.com>
9284 Import gnulib module inttypes.
9285 * aclocal.m4, config.in, configure: Regenerated.
9287 2012-04-14 Yao Qi <yao@codesourcery.com>
9289 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9290 Makefile and config.status at last.
9292 2012-04-13 Yao Qi <yao@codesourcery.com>
9294 * tracepoint.c: Include stdint.h unconditionally.
9296 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9298 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9299 on BFD_HAVE_SYS_PROCFS_TYPE.
9300 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9301 * configure: Regenerate.
9302 * config.in: Likewise.
9304 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9306 * Makefile.in (clean): Also remove x32.c x32-linux.c
9307 x32-avx.c x32-avx-linux.c.
9308 (x32.o): New target.
9310 (x32-linux.o): Likewise.
9311 (x32-linux.c): Likewise.
9312 (x32-avx.o): Likewise.
9313 (x32-avx.c): Likewise.
9314 (x32-avx-linux.o): Likewise.
9315 (x32-avx-linux.c): Likewise.
9317 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9318 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9319 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9320 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9321 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9322 i386/x32-avx-linux.xml.
9324 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9325 (init_registers_x32_avx_linux): Likwise.
9326 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9327 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9329 2012-04-13 Pedro Alves <palves@redhat.com>
9331 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9332 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9333 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9334 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9337 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9339 * linux-x86-low.c (compat_x32_clock_t): New.
9340 (compat_x32_siginfo_t): Likewise.
9341 (compat_x32_siginfo_from_siginfo): Likewise.
9342 (siginfo_from_compat_x32_siginfo): Likewise.
9343 (linux_is_elf64): Likewise.
9344 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9345 and siginfo_from_compat_x32_siginfo for x32.
9346 (x86_arch_setup): Set linux_is_elf64.
9348 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9351 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9353 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9354 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9355 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9356 compatible with process.
9358 2012-04-12 Yao Qi <yao@codesourcery.com>
9360 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9361 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9362 (install-only, install-info, clean): Handle sub dir gnulib.
9363 (all-lib, am--refresh): New targets.
9364 (memmem.o): Remove target.
9365 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9366 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9367 (AC_REPLACE_FUNCS): Remove memmem.
9368 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9369 (AC_OUTPUT): Generate Makefile in gnulib/.
9370 * aclocal.m4, config.in, configure: Regenerated.
9372 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9374 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9376 2012-04-05 Pedro Alves <palves@redhat.com>
9378 -Werror=strict-aliasing
9380 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9383 2012-04-04 Pedro Alves <palves@redhat.com>
9385 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9386 (sparc_store_gregset_from_stack, sparc_store_gregset)
9387 (sparc_breakpoint_at): Fix formatting.
9389 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9391 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9393 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9394 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9395 * config.in: Regenerate.
9396 * configure: Likewise.
9398 2012-03-29 Pedro Alves <palves@redhat.com>
9400 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9401 Correct ptrace arguments.
9403 2012-03-28 Pedro Alves <palves@redhat.com>
9405 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9406 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9407 (IA64_FR1_REGNUM): New defines.
9408 (ia64_fetch_register): New.
9409 (the_low_target): Install it.
9410 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9412 * linux-low.c (linux_fetch_registers): Try the
9413 the_low_target.fetch_register hook first.
9415 * linux-arm-low.c (the_low_target): Adjust.
9416 * linux-bfin-low.c (the_low_target): Adjust.
9417 * linux-cris-low.c (the_low_target): Adjust.
9418 * linux-crisv32-low.c (the_low_target): Adjust.
9419 * linux-m32r-low.c (the_low_target): Adjust.
9420 * linux-m68k-low.c (the_low_target): Adjust.
9421 * linux-mips-low.c (the_low_target): Adjust.
9422 * linux-ppc-low.c (the_low_target): Adjust.
9423 * linux-s390-low.c (the_low_target): Adjust.
9424 * linux-sh-low.c (the_low_target): Adjust.
9425 * linux-sparc-low.c (the_low_target): Adjust.
9426 * linux-tic6x-low.c (the_low_target): Adjust.
9427 * linux-x86-low.c (the_low_target): Adjust.
9428 * linux-xtensa-low.c (the_low_target): Adjust.
9430 2012-03-26 Pedro Alves <palves@redhat.com>
9432 * server.c (handle_qxfer_libraries): Don't bail early if
9433 the_target->qxfer_libraries_svr4 is not NULL.
9435 2012-03-26 Pedro Alves <palves@redhat.com>
9437 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9439 2012-03-23 Pedro Alves <palves@redhat.com>
9441 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9442 "library-list-svr4" element's start tag when the the DSO list is
9445 2012-03-23 Pedro Alves <palves@redhat.com>
9447 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9448 a variable whose type size is the same as the inferior's pointer
9451 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9453 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9455 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9456 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9457 * linux-low.h: Include <signal.h>.
9458 (struct siginfo): Remove forward declaration.
9459 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9462 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9464 * .gitignore: Ignore more files.
9466 2012-03-19 Pedro Alves <palves@redhat.com>
9467 Jan Kratochvil <jan.kratochvil@redhat.com>
9469 * server.c (cont_thread, general_thread): Add describing comments.
9470 (start_inferior): Clear `cont_thread'.
9471 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9474 2012-03-15 Yao Qi <yao@codesourcery.com>
9476 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9478 (cmd_qtdp): ... here.
9480 2012-03-15 Yao Qi <yao@codesourcery.com>
9482 * tracepoint.c (struct tracepoint_action_ops): New.
9483 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9484 (m_tracepoint_action_download): New.
9485 (r_tracepoint_action_download): New.
9486 (x_tracepoint_action_download): New.
9487 (l_tracepoint_action_download): New.
9488 (add_tracepoint_action): Install `action->ops' according type.
9489 (download_tracepoint_1): Move code `download' function pointer
9490 of various tracepoint_action_ops.
9492 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9494 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9495 linux_ptrace_attach_warnings.
9497 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9499 * Makefile.in (linux-ptrace.o): New.
9500 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9501 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9502 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9503 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9504 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9506 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9508 2012-03-08 Yao Qi <yao@codesourcery.com>
9509 Pedro Alves <palves@redhat.com>
9511 Fix PR server/13392.
9512 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9514 * tracepoint.c (remove_tracepoint): New.
9515 (cmd_qtdp): Call remove_tracepoint when failed to install.
9517 2012-03-07 Pedro Alves <palves@redhat.com>
9519 * linux-low.c (get_detach_signal): New.
9520 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9521 Pass on pending signals to PTRACE_DETACH. Check the result of the
9523 * server.c (program_signals, program_signals_p): New.
9524 (handle_general_set): Handle QProgramSignals.
9525 * server.h (program_signals, program_signals_p): Declare.
9527 2012-03-05 Pedro Alves <palves@redhat.com>
9528 Jan Kratochvil <jan.kratochvil@redhat.com>
9530 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9533 2012-03-03 Yao Qi <yao@codesourcery.com>
9535 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9536 agent_look_up_symbols.
9538 2012-03-03 Yao Qi <yao@codesourcery.com>
9540 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9541 (linux-x86-low.o): Likewise.
9542 * server.h: Remove in_process_agent_loaded.
9543 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9547 2012-03-03 Yao Qi <yao@codesourcery.com>
9549 * tracepoint.c (gdb_agent_capability): New global.
9550 (in_process_agent_loaded_ust): Renamed to
9551 `in_process_agent_supports_ust'.
9553 (in_process_agent_supports_ust): Call agent_capability_check.
9554 (clear_installed_tracepoints): Assert that agent supports
9557 2012-03-03 Yao Qi <yao@codesourcery.com>
9559 * linux-low.c (linux_supports_agent): New.
9560 (linux_target_ops): Initialize field `supports_agent' with
9561 linux_supports_agent.
9562 * target.h (struct target_ops) <supports_agent>: New.
9563 (target_supports_agent): New macro.
9564 * server.c (handle_general_set): Handle packet 'QAgent'.
9565 (handle_query): Send `QAgent+'.
9566 * Makefile.in (server.o): Depends on agent.h.
9568 2012-03-03 Yao Qi <yao@codesourcery.com>
9570 * Makefile.in (OBS): Add agent.o.
9571 Add new rule for agent.o.
9572 Track dependence of tracepoint.c on agent.h.
9573 * tracepoint.c (run_inferior_command_1):
9574 (run_inferior_command): Call agent_run_command.
9575 (gdb_ust_connect_sync_socket): Deleted. Move it to
9577 (resume_thread, stop_thread): Likewise.
9578 (gdb_ust_socket_init): Renamed to ...
9579 (gdb_agent_socket_init): ... New.
9580 (gdb_ust_thread): Renamed to ...
9581 (gdb_agent_helper_thread): ... New.
9582 (gdb_ust_init): Move some code to ...
9583 (gdb_agent_init): ... here. New.
9584 [HAVE_UST]: Call gdb_ust_init.
9585 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9586 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9587 * config.in, configure: Regenerated.
9589 2012-03-02 Pedro Alves <palves@redhat.com>
9591 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9592 * linux-low.c (struct simple_pid_list): New.
9593 (stopped_pids): New a struct simple_pid_list pointer.
9594 (add_to_pid_list, pull_pid_from_list): New.
9595 (handle_extended_wait): Don't assume the first signal new children
9596 report is SIGSTOP. Adjust call to pull_pid_from_list.
9597 (linux_wait_for_lwp): Adjust.
9599 2012-03-02 Yao Qi <yao@codesourcery.com>
9601 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9604 2012-03-02 Yao Qi <yao@codesourcery.com>
9606 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9607 `stop_pc' and `tpoint'. Update caller.
9609 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9611 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9612 * linux-low.c (use_linux_regsets): New macro.
9613 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9614 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9615 (linux_register_in_regsets): New function.
9616 (usr_fetch_inferior_registers): Skip registers covered by
9618 (usr_store_inferior_registers): Likewise.
9619 (usr_fetch_inferior_registers): New macro.
9620 (usr_store_inferior_registers): Likewise.
9621 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9622 (linux_store_registers): Likewise.
9623 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9625 (init_registers_mips64_dsp_linux): Likewise.
9626 (init_registers_mips_linux): New macro.
9627 (init_registers_mips_dsp_linux): Likewise.
9628 (mips_dsp_num_regs): Likewise.
9629 (DSP_BASE, DSP_CONTROL): New fallback macros.
9630 (mips_base_regs): New macro.
9631 (mips_regmap): Use it. Fix the size.
9632 (mips_dsp_regmap): New variable.
9633 (mips_dsp_regset_bitmap): Likewise.
9634 (mips_arch_setup): New function.
9635 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9637 (mips_cannot_store_register): Likewise.
9638 (the_low_target): Update .arch_setup, .num_regs and .regmap
9639 initializers. Add .regset_bitmap initializer.
9640 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9642 * linux-bfin-low.c (the_low_target): Likewise.
9643 * linux-cris-low.c (the_low_target): Likewise.
9644 * linux-crisv32-low.c (the_low_target): Likewise.
9645 * linux-ia64-low.c (the_low_target): Likewise.
9646 * linux-m32r-low.c (the_low_target): Likewise.
9647 * linux-m68k-low.c (the_low_target): Likewise.
9648 * linux-ppc-low.c (the_low_target): Likewise.
9649 * linux-s390-low.c (the_low_target): Likewise.
9650 * linux-sh-low.c (the_low_target): Likewise.
9651 * linux-sparc-low.c (the_low_target): Likewise.
9652 * linux-tic6x-low.c (the_low_target): Likewise.
9653 * linux-x86-low.c (the_low_target): Likewise.
9654 * linux-xtensa-low.c (the_low_target): Likewise.
9655 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9656 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9657 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9659 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9660 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9662 2012-02-29 Yao Qi <yao@codesourcery.com>
9663 Pedro Alves <palves@redhat.com>
9665 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9666 `step_over_finished' is true.
9668 2012-02-27 Pedro Alves <palves@redhat.com>
9670 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9671 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9673 2012-02-27 Pedro Alves <palves@redhat.com>
9676 * linux-low.c (pid_is_stopped): New.
9677 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9679 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9681 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9684 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9686 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9688 2012-02-24 Luis Machado <lgustavo@codesourcery>
9690 * server.c (handle_query): Advertise support for target-side
9691 breakpoint condition evaluation.
9692 (process_point_options): New function.
9693 (process_serial_event): When inserting a breakpoint, check for
9694 a target-side condition that should be evaluated.
9696 * mem-break.c: Include regcache.h and ax.h.
9697 (point_cond_list_t): New data structure.
9698 (breakpoint) <cond_list>: New field.
9699 (find_gdb_breakpoint_at): Make non-static.
9700 (delete_gdb_breakpoint_at): Clear any target-side
9702 (clear_gdb_breakpoint_conditions): New function.
9703 (add_condition_to_breakpoint): Likewise.
9704 (add_breakpoint_condition): Likewise.
9705 (gdb_condition_true_at_breakpoint): Likewise.
9706 (gdb_breakpoint_here): Return result directly instead
9707 of going through a local variable.
9709 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9710 (clear_gdb_breakpoint_conditions): Likewise.
9711 (add_breakpoint_condition): Likewise.
9712 (gdb_condition_true_at_breakpoint): Likewise.
9714 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9715 (need_step_over_p): Take target-side breakpoint condition into
9718 2012-02-24 Luis Machado <lgustavo@codesourcery>
9720 * server.h: Include tracepoint.h.
9721 (agent_mem_read, agent_get_trace_state_variable_value,
9722 agent_set_trace_state_variable_value,
9723 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9724 get_set_tsv_func_addr): New prototypes.
9726 * ax.h: New include file.
9727 * ax.c: New source file.
9729 * tracepoint.c: Include ax.h.
9730 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9731 agent_expr, eval_result_type): Move to ax.h.
9732 (parse_agent_expr): Rename to ...
9733 (gdb_parse_agent_expr): ... this, make it non-static and move
9735 (unparse_agent_expr) Rename to ...
9736 (gdb_unparse_agent_expr): ... this, make it non-static and move
9738 (eval_agent_expr): Rename to ...
9739 (eval_tracepoint_agent_expr): ... this.
9740 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9741 forward declarations.
9742 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9743 (agent_get_trace_state_variable_value): New function.
9744 (agent_set_trace_state_variable_value): New function.
9745 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9746 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9747 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9748 (condition_true_at_tracepoint): Likewise.
9749 (parse_agent_expr): Rename to ...
9750 (gdb_parse_agent_expr): ... this and move to ax.c.
9751 (unparse_agent_expr): Rename to ...
9752 (gdb_unparse_agent_expr): ... this and move to ax.c.
9753 (gdb_agent_op_name): Move to ax.c.
9754 (eval_agent_expr): Rename to ...
9755 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9757 (eval_tracepoint_agent_expr): New function.
9758 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9760 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9762 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9763 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9764 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9765 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9766 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9767 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9768 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9769 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9770 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9771 (compile_bytecodes): Remove forward declaration.
9772 (is_goto_target): Move to ax.c.
9773 (compile_bytecodes): Move to ax.c and call
9774 agent_get_trace_state_variable_value (...) and
9775 agent_set_trace_state_variable_value (...).
9777 * Makefile.in: Update ax.c and IPA dependencies.
9779 2012-02-24 Pedro Alves <palves@redhat.com>
9781 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9782 (cmd_bigqtbuffer_circular): ... this. Only handle
9783 'QTBuffer:circular:'.
9784 (handle_tracepoint_general_set): Adjust.
9786 2012-02-16 Yao Qi <yao@codesourcery.com>
9788 * inferiors.c: Move code to ...
9789 * dll.c: .... here. New.
9790 * server.h: Declare clear_dlls.
9791 * Makefile.in (SFILES): Add dll.c.
9795 2012-02-11 Yao Qi <yao@codesourcery.com>
9797 * server.c: (handle_monitor_command): Add a new parameter
9799 (handle_query): Update caller.
9801 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9803 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9804 * configure, config.in: Regenerate.
9805 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9808 2012-02-02 Pedro Alves <palves@redhat.com>
9810 Try SIGKILL first, then PTRACE_KILL.
9811 * linux-low.c (linux_kill_one_lwp): New.
9812 (linux_kill_one_lwp): Rename to ...
9813 (kill_one_lwp_callback): ... this. Use the new
9816 2012-02-02 Pedro Alves <palves@redhat.com>
9818 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9821 2012-01-27 Pedro Alves <palves@redhat.com>
9823 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9824 (elf_64_file_p): Make static.
9825 (linux_pid_exe_is_elf_64_file): New.
9826 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9827 Delete declarations.
9828 (linux_pid_exe_is_elf_64_file): Declare.
9829 * linux-x86-low.c (x86_arch_setup): Use
9830 linux_pid_exe_is_elf_64_file.
9832 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9834 * linux-low.c (linux_wait_for_event_1): Rename to ...
9835 (linux_wait_for_event): ... here and merge it with former
9836 linux_wait_for_event - new variable wait_ptid, use it.
9837 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9839 2012-01-23 Pedro Alves <palves@redhat.com>
9841 * server.c (main): Avoid yet another case of infinite loop while
9842 detaching/killing after a longjmp.
9844 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9847 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9849 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9851 * hostio.c (handle_readlink): New function.
9852 (handle_vFile): Call it to handle "vFile:readlink" packets.
9854 2012-01-20 Pedro Alves <palves@redhat.com>
9855 Ulrich Weigand <ulrich.weigand@linaro.org>
9857 * server.c (handle_v_requests): Only support vAttach and vRun to
9858 start multiple processes when in extended protocol mode.
9860 2012-01-17 Pedro Alves <palves@redhat.com>
9862 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9863 memalign plus mprotect to allocate the scratch buffer.
9865 2012-01-13 Pedro Alves <palves@redhat.com>
9867 * server.c (attach_inferior): Clear `cont_thread'.
9869 2012-01-13 Pedro Alves <palves@redhat.com>
9871 * server.c (main): Avoid infinite loop while detaching/killing
9874 2012-01-09 Doug Evans <dje@google.com>
9876 * server.c (start_inferior): Set last_ptid in --wrapper case.
9878 2012-01-06 Yao Qi <yao@codesourcery.com>
9880 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9882 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9884 2012-01-04 Yao Qi <yao@codesourcery.com>
9886 * tracepoint.c (cmd_qtdp): Print debug message
9887 for static tracepoint.
9889 2012-01-04 Yao Qi <yao@codesourcery.com>
9891 * tracepoint.c (trace_vdebug): Differentiate debug message
9892 between gdbserver and IPA.
9894 2012-01-03 Yao Qi <yao@codesourcery.com>
9896 * tracepoint.c (tracepoint_was_hit): Don't collect for
9899 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9901 * terminal.h: Reformat copyright header.
9903 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9905 * server.c (gdbserver_version): Update copyright year.
9906 * gdbreplay.c (gdbreplay_version): Likewise.
9908 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9910 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9913 2011-12-18 Hui Zhu <teawater@gmail.com>
9914 * linux-low.c (linux_create_inferior): Save return value to ret.
9916 2011-12-18 Hui Zhu <teawater@gmail.com>
9918 * linux-low.c (linux_create_inferior): Save return value to ret.
9920 2011-12-16 Doug Evans <dje@google.com>
9922 * linux-low.c (linux_create_inferior): If stdio connection,
9923 redirect stdin from /dev/null, stdout to stderr.
9924 * remote-utils.c (remote_is_stdio): New static global.
9925 (remote_connection_is_stdio): New function.
9926 (remote_prepare): Handle stdio connection.
9927 (remote_open): Ditto.
9928 (remote_close): Don't close stdin for stdio connections.
9929 (read_prim,write_prim): New functions. Replace all calls to
9930 read/write to these.
9931 * server.c (main): Watch for "-" argument. Move call to
9932 remote_prepare before start_inferior.
9933 * server.h (STDIO_CONNECTION_NAME): New macro.
9934 (remote_connection_is_stdio): Declare.
9936 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9937 in debugging output.
9939 2011-12-15 Yao Qi <yao@codesourcery.com>
9941 * tracepoint.c: Include sys/syscall.h.
9942 (gdb_ust_thread): Remove preprocessor conditional.
9944 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9946 * linux-low.c (linux_detach_one_lwp): Call
9947 the_low_target.prepare_to_resume before detaching.
9949 2011-12-14 Yao Qi <yao@codesourcery.com>
9951 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9954 2011-12-14 Yao Qi <yao@codesourcery.com>
9956 * i386-low.c (i386_low_stopped_data_address): Initialize local
9959 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9963 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9964 DR_CONTROL unless necessary. Extend comments.
9965 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9966 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9968 2011-12-13 Yao Qi <yao@codesourcery.com>
9970 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9972 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9974 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9976 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9977 Print new debug message for such case.
9979 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9981 Fix overlapping memcpy.
9982 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9983 the read_inferior_memory transfer.
9984 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9985 write_inferior_memory transfer.
9986 (set_fast_tracepoint_jump): New variable buf. Use it for the
9987 read_inferior_memory and write_inferior_memory transfers.
9988 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9989 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9990 Use it for the write_inferior_memory transfer.
9991 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9994 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9996 * linux-low.c (fetch_register, store_register): Make code
9997 consistent, fix formatting.
9999 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10001 * linux-low.c (usr_store_inferior_registers): Factor out code
10002 to handle individual registers into...
10003 (store_register): ... this new function.
10005 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10007 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10008 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10009 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10010 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10011 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10012 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10013 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10014 (srv_xmlfiles): Add new XML files.
10016 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10018 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10019 (init_registers_s390_linux32v1): Add prototype.
10020 (init_registers_s390_linux32v2): Likewise.
10021 (init_registers_s390_linux64v1): Likewise.
10022 (init_registers_s390_linux64v2): Likewise.
10023 (init_registers_s390x_linux64v1): Likewise.
10024 (init_registers_s390x_linux64v2): Likewise.
10025 (s390_num_regs): Increment to 52.
10026 (s390_regmap): Add orig_r2 register.
10027 (s390_num_regs_3264): Increment to 68.
10028 (s390_regmap_3264): Add orig_r2 register.
10029 (s390_collect_ptrace_register): Handle orig_r2 register.
10030 (s390_supply_ptrace_register): Likewise.
10031 (s390_fill_last_break): New function.
10032 (s390_store_last_break): Likewise.
10033 (s390_fill_system_call): New function.
10034 (s390_store_system_call): Likewise.
10035 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10037 (s390_check_regset): New function.
10038 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10039 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10040 Update target_regsets for available register sets.
10042 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10043 Jan Kratochvil <jan.kratochvil@redhat.com>
10045 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10046 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10048 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10049 * linux-low.h (struct process_info_private): New member r_debug.
10050 * server.c (handle_qxfer_libraries): Call
10051 the_target->qxfer_libraries_svr4.
10052 (handle_qxfer_libraries_svr4): New function.
10053 (qxfer_packets): New entry "libraries-svr4".
10054 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10055 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10056 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10057 PACKET_qXfer_libraries_svr4.
10059 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10061 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10062 PSW address/mask between 8-byte and 16-byte formats.
10063 (s390_supply_ptrace_register): Likewise.
10064 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10065 basic addressing mode bit.
10067 2011-11-24 Stan Shebs <stan@codesourcery.com>
10069 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10071 2011-11-17 Stan Shebs <stan@codesourcery.com>
10073 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10074 (tracing_start_time): New global.
10075 (tracing_stop_time): New global.
10076 (tracing_user_name): New global.
10077 (tracing_notes): New global.
10078 (tracing_stop_note): New global.
10079 (cmd_qtstart): Set traceframe_usage, start_time.
10080 (stop_tracing): Set stop_time.
10081 (cmd_qtstatus): Report additional status.
10082 (cmd_qtp): New function.
10083 (handle_tracepoint_query): Call it.
10084 (cmd_qtnotes): New function.
10085 (handle_tracepoint_general_set): Call it.
10086 (get_timestamp): Rename from tsv_get_timestamp.
10088 2011-11-14 Stan Shebs <stan@codesourcery.com>
10089 Kwok Cheung Yeung <kcy@codesourcery.com>
10091 * linux-x86-low.c (small_jump_insn): New.
10092 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10093 trampoline and error message, build a trampoline and issue a small
10094 jump instruction to it.
10095 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10096 trampoline and error message.
10097 (x86_get_min_fast_tracepoint_insn_len): New.
10098 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10099 * linux-low.h (struct linux_target_ops): Add arguments to
10100 install_fast_tracepoint_jump_pad operation, add new operation.
10101 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10103 (linux_get_min_fast_tracepoint_insn_len): New function.
10104 (linux_target_op): Add new operation.
10105 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10106 (gdb_trampoline_buffer_end): Ditto.
10107 (gdb_trampoline_buffer_error): Ditto.
10108 (struct ipa_sym_addresses): Add fields for new IPA variables.
10109 (symbol_list): Add entries for new IPA variables.
10110 (struct tracepoint): Add fields to hold the address range of the
10111 trampoline used by the tracepoint.
10112 (trampoline_buffer_head): New static variable.
10113 (trampoline_buffer_tail): Ditto.
10114 (claim_trampoline_space): New function.
10115 (have_fast_tracepoint_trampoline_buffer): New function.
10116 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10118 (install_fast_tracepoint): Ditto, also add error buffer argument.
10119 (cmd_qtminftpilen): New function.
10120 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10121 (fast_tracepoint_from_trampoline_address): New function.
10122 (fast_tracepoint_collecting): Handle trampoline as part of jump
10124 (set_trampoline_buffer_space): New function.
10125 (initialize_tracepoint): Initialize new IPA variables.
10126 * target.h (struct target_ops): Add arguments to
10127 install_fast_tracepoint_jump_pad operation, add new
10128 get_min_fast_tracepoint_insn_len operation.
10129 (target_get_min_fast_tracepoint_insn_len): New.
10130 (install_fast_tracepoint_jump_pad): Add arguments.
10131 * server.h (IPA_BUFSIZ): Define.
10132 * linux-i386-ipa.c: Include extra header files.
10133 (initialize_fast_tracepoint_trampoline_buffer): New function.
10134 (initialize_low_tracepoint): Call it.
10135 * server.h (set_trampoline_buffer_space): Declare.
10136 (claim_trampoline_space): Ditto.
10137 (have_fast_tracepoint_trampoline_buffer): Ditto.
10139 2011-11-14 Yao Qi <yao@codesourcery.com>
10141 * server.c (handle_query): Handle InstallInTrace for qSupported.
10142 * tracepoint.c (add_tracepoint): Sort list.
10143 (install_tracepoint, download_tracepoint): New.
10144 (cmd_qtdp): Call them to install and download tracepoints.
10145 (sort_tracepoints): Removed.
10146 (cmd_qtstart): Update.
10148 2011-11-14 Yao Qi <yao@codesourcery.com>
10150 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10151 * mem-break.h: Declare.
10152 * tracepoint.c (cmd_qtstart): Move some code to ...
10153 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10155 (download_tracepoints): Move some code to ...
10156 (download_tracepoint_1): ... here. New.
10158 2011-11-08 Yao Qi <yao@codesourcery.com>
10160 * remote-utils.c (relocate_instruction): A comment fix.
10162 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10164 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10165 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10166 dr_status_mirror and dr_control_mirror from debug_reg_state.
10167 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10168 (i386_initial_stuff): Remove use of deleted globals.
10169 (i386_get_thread_context, i386_set_thread_context,
10170 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10171 from debug_reg_state.
10173 2011-11-05 Yao Qi <yao@codesourcery.com>
10175 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10176 address as TPOINT's.
10178 2011-11-02 Stan Shebs <stan@codesourcery.com>
10180 * tracepoint.c (agent_mem_read_string): New function.
10181 (eval_agent_expr): Call it for tracenz.
10182 * server.c (handle_query): Report support for tracenz.
10184 2011-11-02 Yao Qi <yao@codesourcery.com>
10186 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10188 2011-11-02 Yao Qi <yao@codesourcery.com>
10190 * target.h: Fix a typo in comment.
10192 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10194 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10195 clobber the breakpoints' shadows with fast tracepoint jumps.
10196 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10197 * target.c (write_inferior_memory): Also pass MYADDR down to
10200 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10202 * configure.ac: Check support for personality routine.
10203 * configure: Regenerate.
10204 * config.in: Likewise.
10205 * linux-low.c: Include <sys/personality.h>.
10206 Define ADDR_NO_RANDOMIZE if necessary.
10207 (linux_create_inferior): Disable address space randomization when
10208 forking inferior, if requested.
10209 (linux_supports_disable_randomization): New function.
10210 (linux_target_ops): Install it.
10211 * server.h (disable_randomization): Declare.
10212 * server.c (disable_randomization): New global variable.
10213 (handle_general_set): Handle QDisableRandomization.
10214 (handle_query): Likewise for qSupported.
10215 (main): Support --disable-randomization and --no-disable-randomization
10216 command line arguments.
10217 * target.h (struct target_ops): Add supports_disable_randomization.
10218 (target_supports_disable_randomization): New macro.
10220 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10222 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10224 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10225 [!PT_GETDSBT] (target_loadmap): New definition.
10226 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10227 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10228 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10229 and PT_GETDSBT to LINUX_LOADMAP.
10230 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10231 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10233 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10235 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10236 (arm_linux_hwbp_cap): New static variable.
10237 (arm_linux_get_hwbp_cap): Replace by ...
10238 (arm_linux_init_hwbp_cap): ... this new function.
10239 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10240 (arm_linux_get_hw_watchpoint_count): Likewise.
10241 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10242 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10243 (arm_prepare_to_resume): Use perror_with_name instead of error.
10245 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10247 * linux-arm-low.c: Include <signal.h>.
10248 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10249 (struct arm_linux_hwbp_cap): New data type.
10250 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10251 (struct arm_linux_hw_breakpoint): New data type.
10252 (MAX_BPTS, MAX_WPTS): Define.
10253 (struct arch_process_info, struct arch_lwp_info): New data types.
10254 (arm_linux_get_hwbp_cap): New function.
10255 (arm_linux_get_hw_breakpoint_count): Likewise.
10256 (arm_linux_get_hw_watchpoint_count): Likewise.
10257 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10258 (arm_hwbp_control_initialize): Likewise.
10259 (arm_hwbp_control_is_enabled): Likewise.
10260 (arm_hwbp_control_is_initialized): Likewise.
10261 (arm_hwbp_control_disable): Likewise.
10262 (arm_linux_hw_breakpoint_equal): Likewise.
10263 (arm_linux_hw_point_initialize): Likewise.
10264 (struct update_registers_data): New data structure.
10265 (update_registers_callback: New function.
10266 (arm_insert_point): Likewise.
10267 (arm_remove_point): Likewise.
10268 (arm_stopped_by_watchpoint): Likewise.
10269 (arm_stopped_data_address): Likewise.
10270 (arm_new_process): Likewise.
10271 (arm_new_thread): Likewise.
10272 (arm_prepare_to_resume): Likewise.
10273 (the_low_target): Register arm_insert_point, arm_remove_point,
10274 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10275 arm_new_thread, and arm_prepare_to_resume.
10277 2011-09-15 Stan Shebs <stan@codesourcery.com>
10279 * server.h (struct emit_ops): Add compare-goto fields.
10280 * tracepoint.c (gdb_agent_op_sizes): New table.
10281 (emit_eq_goto): New function.
10282 (emit_ne_goto): New function.
10283 (emit_lt_goto): New function.
10284 (emit_le_goto): New function.
10285 (emit_gt_goto): New function.
10286 (emit_ge_goto): New function.
10287 (is_goto_target): New function.
10288 (compile_bytecodes): Recognize special cases of compare-goto
10289 combinations and call specialized emitters for them.
10290 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10291 (amd64_emit_ne_goto): New function.
10292 (amd64_emit_lt_goto): New function.
10293 (amd64_emit_le_goto): New function.
10294 (amd64_emit_gt_goto): New function.
10295 (amd64_emit_ge_goto): New function.
10296 (amd64_emit_ops): Add the new functions.
10297 (i386_emit_eq_goto): New function.
10298 (i386_emit_ne_goto): New function.
10299 (i386_emit_lt_goto): New function.
10300 (i386_emit_le_goto): New function.
10301 (i386_emit_gt_goto): New function.
10302 (i386_emit_ge_goto): New function.
10303 (i386_emit_ops): Add the new functions.
10305 2011-09-08 Stan Shebs <stan@codesourcery.com>
10307 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10308 (i386_emit_epilogue): Restore %ebx.
10310 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10312 * server.c (step_thread): Remove definition.
10313 (process_serial_event): Don't handle Hs.
10314 * server.h (step_thread): Remove declaration.
10315 * target.c (set_desired_inferior): Remove use of step_thread.
10317 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10319 * linux-low.c: Include linux-procfs.h.
10320 (linux_attach_lwp_1): Update comments.
10321 (linux_attach): Scan for existing threads when attaching to a
10322 process that is the tgid.
10323 * Makefile.in: Update dependencies.
10325 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10327 * configure.srv: Add linux-procfs.o dependencies.
10329 2011-08-14 Yao Qi <yao@codesourcery.com>
10331 * target.h (struct target_ops): Fix indent.
10332 * win32-low.c (win32_target_ops): Fix comment.
10334 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10335 Yao Qi <yao@codesourcery.com>
10337 * Makefile.in (clean): Remove tic6x-*.c files.
10338 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10339 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10340 (tic6x-c64xp-linux.c): Likewise.
10341 * configure.srv: Add support for tic6x-*-uclinux.
10342 * linux-tic6x-low.c: New.
10343 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10345 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10346 Yao Qi <yao@codesourcery.com>
10348 * target.h (struct target_ops): Add read_loadmap.
10349 * linux-low.c (struct target_loadseg): New type.
10350 (struct target_loadmap): New type.
10351 (linux_read_loadmap): New function.
10352 (linux_target_ops): Add linux_read_loadmap.
10353 * server.c (handle_query): Support qXfer:fdpic:read packet.
10354 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10357 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10359 * win32-low.c: Include <stdint.h>.
10361 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10363 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10364 to the inferior here.
10365 (i386_remove_aligned_watchpoint): Ditto.
10366 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10367 fit part of the watchpoint in the debug registers.
10368 (i386_update_inferior_debug_regs): New.
10369 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10370 registers, and only update the inferior on success.
10371 (i386_low_remove_watchpoint): Ditto.
10373 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10375 * linux-low.c (compare_ints, unique, list_threads, show_process,
10376 linux_core_of_thread): Delete.
10377 (linux_target_ops): Change linux_core_of_thread to
10378 linux_common_core_of_thread.
10379 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10380 * utils.c (malloc_failure): Change type of argument.
10381 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10382 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10383 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10384 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10385 (IPA_OBJS): Add common-utils-ipa.o.
10386 (ptid_h, linux_osdata_h): New macros.
10387 (server_h): Add common/common-utils.h, common/xml-utils.h,
10388 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10390 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10391 ptid.o, buffer.o): New rules.
10392 (linux-low.o): Add common/linux-osdata.h as a dependency.
10393 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10394 * configure.ac: Add AC_HEADER_DIRENT check.
10395 * config.in: Regenerate.
10396 * configure: Regenerate.
10397 * remote-utils.c (xml_escape_text): Delete.
10398 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10399 buffer_xml_printf): Move to common/buffer.c.
10400 * server.c (main): Remove call to initialize_inferiors.
10401 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10402 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10403 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10404 internal_error, gdb_assert, gdb_assert_fail): Delete.
10405 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10406 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10408 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10409 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10410 initialize_inferiors): Delete.
10412 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10414 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10417 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10419 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10421 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10423 2011-05-26 Yao Qi <yao@codesourcery.com>
10425 * Makefile.in (thread-db.o): Track dependence to
10426 common/gdb_thread_db.h.
10427 * thread-db.c: include gdb_thread_db.h from right place.
10429 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10431 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10432 __FILE__ and __LINE__ to internal_error.
10434 2011-05-13 Doug Evans <dje@google.com>
10436 * thread-db.c (try_thread_db_load_from_sdir): New function.
10437 (try_thread_db_load_from_dir): New function.
10438 (thread_db_load_search): Handle $sdir, ignore $pdir.
10439 Remove trying of system directories if search of
10440 libthread-db-search-path fails, that is now done via $sdir.
10442 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10444 * server.c (handle_query): Add EnableDisableTracepoints to the list
10445 of supported features.
10446 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10448 (cmd_qtenable_disable): New.
10449 (cmd_qtstart): Install tracepoints even if disabled.
10450 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10451 receiving a QTEnable or QTDisable packet.
10452 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10453 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10455 (gdb_probe): Skip data collection if static tracepoint is disabled.
10457 2011-05-10 Doug Evans <dje@google.com>
10459 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10461 2011-05-04 Doug Evans <dje@google.com>
10463 * linux-low.c (linux_join): Skip process lookup.
10464 * spu-low.c (spu_join): Ditto.
10465 * server.c (join_inferiors_callback): Delete.
10466 (process_serial_event): For 'D' packet (detach) call join_inferior
10469 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10471 * README: Don't mention xscale*-*-linux*.
10472 * configure.srv (xscale*-*-linux*): Don't handle target.
10474 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10476 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10478 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10479 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10480 (i386_emit_void_call_2): Likewise.
10482 2011-04-26 Yao Qi <yao@codesourcery.com>
10484 * linux-low.c: Move common macros to linux-ptrace.h.
10485 Include linux-ptrace.h.
10486 * Makefile.in (linux_ptrace_h): New.
10487 (linux-low.o): Depends on linux-ptrace.h.
10489 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10491 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10492 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10493 (remote_prepare): New function with most of the TCP code from ...
10494 (remote_open): ... here. Detect PORT here unconditionally. Move also
10495 setting transport_is_reliable.
10496 * server.c (run_once): New variable.
10497 (gdbserver_usage): Document it.
10498 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10499 the first run if RUN_ONCE.
10500 * server.h (run_once, remote_prepare): New declarations.
10502 2011-04-19 Tom Tromey <tromey@redhat.com>
10504 * win32-low.c (handle_load_dll): Remove duplicate "the".
10506 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10508 Remove support for old Cygwin 1.5 versions.
10509 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10510 function to avoid warning.
10511 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10514 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10516 * gdbserver/server.h (Macro _): Define it if not available.
10518 2011-03-14 Michael Snyder <msnyder@vmware.com>
10520 * hostio.c (handle_close): Remove unnecessary null test.
10522 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10524 * Makefile.in (maintainer-clean realclean distclean): Remove
10525 "make ... subdir_do" command.
10527 2011-03-10 Michael Snyder <msnyder@vmware.com>
10529 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10531 * server.c (handle_v_run): Free alloced buffer on early return.
10533 2011-03-09 Yao Qi <yao@codesourcery.com>
10536 2011-03-04 Yao Qi <yao@codesourcery.com>
10538 * Makefile.in: Remove GNU make feature --directory.
10540 2011-03-05 Yao Qi <yao@codesourcery.com>
10542 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10543 (subdir_do): New make target. Copied from gdb/Makefile.
10544 (maintainer-clean, realclean, distclean, clean): Call corresponding
10545 make targets in common/Makefile.
10547 2011-02-11 Yao Qi <yao@codesourcery.com>
10549 * configure.ac: Call AC_PROG_RANLIB.
10550 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10551 * configure: Regenerate.
10553 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10555 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10557 2011-03-06 Yao Qi <yao@codesourcery.com>
10559 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10561 2011-03-05 Yao Qi <yao@codesourcery.com>
10563 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10564 (subdir_do): New make target. Copied from gdb/Makefile.
10565 (maintainer-clean, realclean, distclean, clean): Call corresponding
10566 make targets in common/Makefile.
10568 2011-03-04 Yao Qi <yao@codesourcery.com>
10570 * Makefile.in: Remove GNU make feature --directory.
10572 2011-03-04 Michael Snyder <msnyder@vmware.com>
10574 * server.c (queue_stop_reply): Call xmalloc not malloc.
10576 2011-03-02 Michael Snyder <msnyder@vmware.com>
10578 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10580 2011-02-28 Michael Snyder <msnyder@vmware.com>
10582 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10583 (cmd_qtframe): Ditto.
10584 (cmd_qtbuffer): Ditto.
10585 (cmd_bigqtbuffer): Ditto.
10587 * utils.c (decimal2str): Initialize 'width' to nine, then
10588 don't mess with it.
10590 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10592 * hostio.c (require_data): Free *data, not data.
10594 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10596 * hostio.c (require_data): Use free, not xfree.
10598 2011-02-27 Michael Snyder <msnyder@vmware.com>
10600 * server.c (handle_query): Discard unused value.
10602 * hostio.c (require_data): Free malloc memory before returning
10605 2011-02-26 Michael Snyder <msnyder@vmware.com>
10607 * linux-low.c (list_threads): Call closedir for dirent.
10609 2011-02-27 Michael Snyder <msnyder@vmware.com>
10611 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10612 a case statement falls through.
10614 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10616 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10619 2011-02-26 Michael Snyder <msnyder@vmware.com>
10621 * utils.c (decimal2str): Eliminate dead code and dead param.
10622 (pulongest): Drop dead param from call to decimal2str.
10625 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10627 Revert the following patch (not approved yet):
10628 2011-02-21 Hui Zhu <teawater@gmail.com>
10629 * tracepoint.c (tp_printf): New function.
10630 (eval_agent_expr): Handle gdb_agent_op_printf.
10632 2011-02-21 Hui Zhu <teawater@gmail.com>
10634 * tracepoint.c (tp_printf): New function.
10635 (eval_agent_expr): Handle gdb_agent_op_printf.
10637 2011-02-18 Tom Tromey <tromey@redhat.com>
10639 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10640 (tracepoint.o): Likewise.
10641 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10642 (gdb_agent_op_names): Likewise.
10644 2011-02-18 Tom Tromey <tromey@redhat.com>
10646 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10647 gdb_agent_op_rot>: New constants.
10648 (gdb_agent_op_names): Add pick and roll.
10649 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10652 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10654 * aclocal.m4: Regenerated with aclocal-1.11.1.
10656 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10658 * server.c (handle_qxfer_traceframe_info): New.
10659 (qxfer_packets): Register "traceframe-info".
10660 (handle_query): Report support for qXfer:traceframe-info:read+.
10661 * tracepoint.c (match_blocktype): New.
10662 (traceframe_find_block_type): Rename to ...
10663 (traceframe_walk_blocks): ... this. Add callback filter argument,
10665 (traceframe_find_block_type): New, reimplemented on top of
10666 traceframe_walk_blocks.
10667 (build_traceframe_info_xml): New.
10668 (traceframe_read_info): New.
10669 * server.h (traceframe_read_info): Declare.
10671 2011-02-11 Yao Qi <yao@codesourcery.com>
10673 * configure.ac: Call AC_PROG_RANLIB.
10674 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10675 * configure: Regenerate.
10677 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10679 * server.c (gdb_read_memory): Change return semantics to allow
10681 (handle_search_memory_1): Adjust.
10682 (process_serial_event) <'m' packet>: Handle partial transfers.
10683 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10685 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10687 * regcache.c (init_register_cache): Initialize
10688 regcache->register_status.
10689 (free_register_cache): Release regcache->register_status.
10690 (regcache_cpy): Copy register_status.
10691 (registers_to_string): Print 'x's for unavailable registers.
10692 (supply_register): Mark the register's status valid or
10693 unavailable, depending on whether a buffer was passed in or not.
10694 (supply_register_zeroed): New.
10695 (supply_regblock): Mark the registers' status valid or
10696 unavailable, depending on whether a buffer was passed in or not.
10697 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10698 (struct regcache): New `register_status' field.
10699 (supply_register_zeroed): Declare.
10700 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10701 supply_register_zeroed, rather than passing a NULL buffer to
10703 * tracepoint.c (fetch_traceframe_registers): Update comment.
10705 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10707 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10710 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10712 * server.h (decode_xfer_write): Change prototype.
10713 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10714 and don't extract the annex here.
10715 * server.c (decode_xfer_read): Remove `annex' parameter,
10716 and don't extract the annex here.
10717 (decode_xfer): New.
10718 (struct qxfer): New.
10719 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10720 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10721 (handle_qxfer_statictrace): New functions, abstracted out from
10722 handle_query, and made to use the struct qxfer interface.
10723 (handle_threads_qxfer_proper): Rename to ...
10724 (handle_qxfer_threads_proper): ... this.
10725 (handle_threads_qxfer): Rename to ...
10726 (handle_qxfer_threads): ... this. Adjust.
10727 (qxfer_packets): New array.
10728 (handle_qxfer): New function.
10729 (handle_query): Use handle_qxfer.
10731 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10733 * gdbreplay.c: Shorten lines of >= 80 columns.
10734 * linux-low.c: Ditto.
10735 * linux-ppc-low.c: Ditto.
10736 * linux-s390-low.c: Ditto.
10737 * linux-sparc-low.c: Ditto.
10738 * linux-x86-low.c: Ditto.
10739 * linux-xtensa-low.c: Ditto.
10740 * mem-break.c: Ditto.
10741 * nto-low.c: Ditto.
10742 * regcache.h: Ditto.
10743 * remote-utils.c: Ditto.
10746 * thread-db.c: Ditto.
10747 * tracepoint.c: Ditto.
10749 * win32-low.h: Ditto.
10751 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10753 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10756 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10758 * server.c (gdbserver_version): Update copyright year in version
10760 * gdbreplay.c (gdbreplay_version): Ditto.
10762 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10764 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10765 * linux-bfin-low.c: New file.
10766 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10767 PT_DATA_ADDR for BFIN targets.
10768 * Makefile.in (SFILES): Add linux-bfin-low.c.
10769 (clean): Remove reg-bfin.c.
10770 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10771 * README: Mention supported Blackfin targets.
10773 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10775 * .gitignore: New file.
10777 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10779 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10781 2010-10-22 Jie Zhang <jie@codesourcery.com>
10783 * Makefile.in: Add FLAGS_TO_PASS variable.
10784 (install): Remove dependency of install-only and recursively
10785 invoke make for install-only.
10787 2010-10-04 Doug Evans <dje@google.com>
10789 * Makefile.in (uninstall): Use $(DESTDIR).
10791 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10795 * linux-x86-low.c (compat_siginfo_from_siginfo)
10796 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10797 si_code is < 0. Check for si_code == SI_TIMER before checking for
10800 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10802 * lynx-i386-low.c: New file.
10803 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10805 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10807 * lynx-low.c (ptrace_request_to_str): Remove handling for
10808 request values that have been removed in LynxOS 5.x.
10810 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10812 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10815 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10817 * configure.ac: Add --enable-inprocess-agent option.
10818 * configure: Rebuilt.
10820 2010-09-06 Yao Qi <yao@codesourcery.com>
10822 * linux-low.c (linux_kill): Remove unused variable.
10823 (linux_stabilize_threads): Likewise.
10824 * server.c (start_inferior): Likewise.
10825 (queue_stop_reply_callback): Likewise.
10826 * tracepoint.c (do_action_at_tracepoint): Likewise.
10828 2010-09-06 Yao Qi <yao@codesourcery.com>
10830 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10833 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10835 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10837 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10839 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10842 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10844 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10845 gdbserver/lynx-ppc-low.c: New files.
10846 * Makefile.in (lynx_low_h): New variable.
10847 (lynx-low.o, lynx-ppc-low.o): New rules.
10848 * configure.ac: On LynxOS, link with -lnetinet.
10849 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10850 * configure: regenerate.
10852 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10854 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10855 * configure.ac: Add check for vasprintf and vsnprintf.
10856 * configure, config.in: Regenerate.
10857 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10859 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10861 * gdbreplay.c: Move include of alloca.h up, next to include of
10863 * server.h: Add include of malloc.h.
10864 * mem-break.c: Remove include of malloc.h.
10865 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10867 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10869 * Makefile.in (memmem.o): Build with -Wno-error.
10871 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10873 * utils.c (xsnprintf): Make non-static.
10874 * server.h: Add xsnprintf declaration.
10875 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10876 replace calls to snprintf by calls to xsnprintf throughout.
10878 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10880 * configure.ac: Add configure check for alloca.
10881 * configure, config.in: Regenerate.
10882 * server.h: Include alloca.h if it exists.
10883 * gdbreplay.c: Include alloca.h if it exists.
10885 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10887 * linux-low.c (__SIGRTMIN): Define if not already defined.
10888 (linux_create_inferior): Check for __ANDROID__ rather than
10890 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10891 are already deferred.
10892 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10893 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10894 stopped and already has a pending signal to report.
10895 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10896 a pending signal to report or is moving out of a jump pad.
10897 (linux_init_signals): Check for __ANDROID__ rather than
10900 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10902 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10903 debug_threads check. Avoid a linear search when not doing debug
10906 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10908 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10909 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10910 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10911 (process_event): Change local fd's type to gdb_fildes_t.
10912 (create_file_handler): Adjust prototype.
10913 (delete_file_handler): Adjust prototype.
10914 (handle_file_event): Adjust prototype. Use pfildes.
10915 (create_file_event): Adjsut prototype.
10916 * remote-utils.c (remote_desc, listen_desc): Change type to
10918 * server.h: New gdb_fildes_t typedef.
10919 [USE_WIN32API]: Include winsock2.h.
10920 (delete_file_handler, add_file_handler): Adjust prototypes.
10921 (pfildes): Declare.
10922 * utils.c (pfildes): New.
10924 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10926 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10927 * configure: Regenerate.
10929 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10931 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10932 (linux_done_accessing_memory): ... this.
10933 (linux_target_ops): Adjust.
10934 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10935 * nto-low.c (nto_target_ops): Adjust comment.
10936 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10937 * spu-low.c (spu_target_ops): Adjust comment.
10938 * target.h (target_ops): Rename unprepare_to_access_memory field
10939 to done_accessing_memory.
10940 (unprepare_to_access_memory): Rename to ...
10941 (done_accessing_memory): ... this.
10943 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10945 * linux-low.c (linux_prepare_to_access_memory): New.
10946 (linux_unprepare_to_access_memory): New.
10947 (linux_target_ops): Install them.
10948 * server.c (read_memory): Rename to ...
10949 (gdb_read_memory): ... this. Use
10950 prepare_to_access_memory/prepare_to_access_memory.
10951 (write_memory): Rename to ...
10952 (gdb_write_memory): ... this. Use
10953 prepare_to_access_memory/prepare_to_access_memory.
10954 (handle_search_memory_1): Adjust.
10955 (process_serial_event): Adjust.
10956 * target.h (struct target_ops): New fields
10957 prepare_to_access_memory and unprepare_to_access_memory.
10958 (prepare_to_access_memory, unprepare_to_access_memory): New.
10959 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10960 prepare_to_access_memory/prepare_to_access_memory.
10961 * nto-low.c (nto_target_ops): Adjust.
10962 * spu-low.c (spu_target_ops): Adjust.
10963 * win32-low.c (win32_target_ops): Adjust.
10965 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10967 * Makefile.in (WARN_CFLAGS): Get it from configure.
10968 (WERROR_CFLAGS): New.
10969 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10970 * configure.ac: Introduce --enable-werror, which adds -Werror to
10971 the compiler command line. Enabled by default. Disable with
10972 --disable-werror. Add -Wdeclaration-after-statement
10973 Wpointer-arith and -Wformat-nonliteral to warning flags.
10974 * configure: Regenerate.
10976 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10978 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10980 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10982 * gdbreplay.c (remote_error): New.
10984 (expect): Use gdbchar. Check for error reading from GDB.
10985 Clarify sync error output.
10986 (play): Check for errors writing to GDB.
10987 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10988 * remote-utils.c (getpkt): Check for errors writing to the remote
10991 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10993 * linux-low.c (linux_wait_1): Move non-debugging code out of
10994 `debug_threads' control.
10996 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10998 * linux-low.c (linux_wait_1): Don't set last_status here.
10999 * server.c (push_event, queue_stop_reply_callback): Assert we're
11000 not pushing a TARGET_WAITKIND_IGNORE event.
11001 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11002 (myresume, handle_target_event): Set the thread's last_resume_kind
11003 and last_status from the target returned status.
11005 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11009 * linux-x86-low.c (update_debug_registers_callback): New.
11010 (i386_dr_low_set_addr): Use it.
11011 (i386_dr_low_get_addr): New.
11012 (i386_dr_low_set_control): Use update_debug_registers_callback.
11013 (i386_dr_low_get_control): New.
11014 (i386_dr_low_get_status): Adjust.
11015 * linux-low.c (linux_stop_lwp): New.
11016 * linux-low.h (linux_stop_lwp): Declare.
11018 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11019 argument instead of a i386_debug_reg_state.
11020 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11021 a i386_debug_reg_state.
11022 (i386_insert_aligned_watchpoint): Adjust.
11023 (i386_remove_aligned_watchpoint): Adjust.
11024 (i386_low_stopped_data_address): Read the debug registers from the
11025 inferior instead of from the mirrors.
11026 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11027 (i386_dr_low_get_addr): Declare.
11028 (i386_dr_low_get_control): Declare.
11029 (i386_dr_low_get_status): Change prototype.
11031 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11032 (i386_dr_low_get_addr): New.
11033 (i386_dr_low_get_control): New.
11034 (i386_dr_low_get_status): Adjust prototype. Return
11036 (i386_initial_stuff): Clear dr_status_mirror and
11038 (i386_get_thread_context): Adjust.
11039 (i386_set_thread_context): Adjust.
11040 (i386_thread_added): Adjust.
11042 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11044 * linux-low.h (linux_thread_area): Delete declaration.
11046 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11048 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11049 after its termination.
11051 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11053 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11054 (gdb_wants_all_stopped): Delete.
11055 (linux_wait_1): Don't call them.
11056 * server.c (handle_v_cont): Tag all threads as want-stopped.
11057 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11058 stopped as "client-wants-stopped".
11060 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11062 * Makefile.in (signals_h): New.
11063 (server_h): Depend on it.
11064 (server.o): Don't depend on $(signals_def).
11065 (signals.o): Depend on $(signals_def).
11067 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11069 * Makefile.in (signals_def): New.
11070 (server_h): Append include/gdb/signals.h and signals_def.
11071 (server.o): Append signals_def.
11073 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11075 * server.c (handle_target_event): Use target_signal_to_host for
11076 resume_info.sig initialization.
11077 * target.h (struct thread_resume) <sig>: New comment.
11079 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11081 * server.c (handle_query): strcpy() the returned string from paddress()
11082 instead of sprintf().
11083 * utils.c (paddress): Return phex_nz().
11085 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11087 * server.c (handle_v_cont): Call mourn_inferior if process
11089 (myresume): Likewise.
11091 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11093 Static tracepoints, and integration with UST.
11095 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11096 * mem-break.c (uninsert_all_breakpoints)
11097 (reinsert_all_breakpoints): New.
11098 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11099 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11100 (gdb_agent_ust_loaded, helper_thread_id)
11101 (gdb_agent_helper_thread_id): New macros.
11102 (struct ipa_sym_addresses): Add addr_ust_loaded,
11103 addr_helper_thread_id, addr_cmd_buf.
11104 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11105 (in_process_agent_loaded_ust): New.
11106 (write_e_ust_not_loaded): New.
11107 (maybe_write_ipa_ust_not_loaded): New.
11108 (struct collect_static_trace_data_action): New.
11109 (enum tracepoint_type) <static_tracepoint>: New.
11110 (struct tracepoint) <handle>: Mention static tracepoints.
11111 (struct static_tracepoint_ctx): New.
11112 (CMD_BUF_SIZE): New.
11113 (add_tracepoint_action): Handle static tracepoint actions.
11114 (unprobe_marker_at): New.
11115 (clear_installed_tracepoints): Handle static tracepoints.
11116 (cmd_qtdp): Handle static tracepoints.
11117 (probe_marker_at): New.
11118 (cmd_qtstart): Handle static tracepoints.
11119 (response_tracepoint): Handle static tracepoints.
11120 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11121 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11122 (get_context_regcache): Handle static tracepoints.
11123 (do_action_at_tracepoint): Handle static tracepoint actions.
11124 (traceframe_find_block_type): Handle static trace data blocks.
11125 (traceframe_read_sdata): New.
11126 (download_tracepoints): Download static tracepoint actions.
11127 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11128 (GDB_PROBE_NAME): New.
11130 (GET_UST_SYM): New.
11133 (ust_marker_to_static_tracepoint): New.
11135 (collect_ust_data_at_tracepoint): New.
11136 (gdb_ust_probe): New.
11137 (UNIX_PATH_MAX, SOCK_DIR): New.
11138 (gdb_ust_connect_sync_socket): New.
11139 (resume_thread, stop_thread): New.
11140 (run_inferior_command): New.
11141 (init_named_socket): New.
11142 (gdb_ust_socket_init): New.
11143 (cstr_to_hexstr): New.
11145 (first_marker, next_marker): New.
11146 (response_ust_marker): New.
11147 (cmd_qtfstm, cmd_qtsstm): New.
11148 (unprobe_marker_at, probe_marker_at): New.
11149 (cmd_qtstmat, gdb_ust_thread): New.
11150 (gdb_ust_init): New.
11151 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11152 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11153 (ST_REGENTRY): New.
11154 (x86_64_st_collect_regmap): New.
11155 (X86_64_NUM_ST_COLLECT_GREGS): New.
11156 (AMD64_RIP_REGNUM): New.
11157 (supply_static_tracepoint_registers): New.
11158 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11159 (ST_REGENTRY): New.
11160 (i386_st_collect_regmap): New.
11161 (i386_NUM_ST_COLLECT_GREGS): New.
11162 (supply_static_tracepoint_registers): New.
11163 * server.c (handle_query): Handle qXfer:statictrace:read.
11164 <qSupported>: Report support for StaticTracepoints, and
11165 qXfer:statictrace:read features.
11166 * server.h (traceframe_read_sdata)
11167 (supply_static_tracepoint_registers): Declare.
11168 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11169 (unpack_varlen_hex): Include in IPA build.
11170 * Makefile.in (ustlibs, ustinc): New.
11171 (IPA_OBJS): Add remote-utils-ipa.o.
11172 ($(IPA_LIB)): Link -ldl and -lpthread.
11174 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11175 * config.in, configure: Regenerate.
11177 2010-06-20 Ian Lance Taylor <iant@google.com>
11178 Pedro Alves <pedro@codesourcery.com>
11180 * linux-x86-low.c (always_true): Delete.
11181 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11182 trying to fool the compiler with always_true.
11184 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11186 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11187 conditions in gdbserver.
11189 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11191 * spu-low.c (spu_read_memory): Wrap around local store limit.
11192 (spu_write_memory): Likewise.
11194 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11196 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11197 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11199 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11201 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11202 uses with LONGEST uses.
11204 2010-06-14 Stan Shebs <stan@codesourcery.com>
11205 Pedro Alves <pedro@codesourcery.com>
11209 * linux-x86-low.c: Include limits.h.
11211 (always_true): New.
11214 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11215 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11216 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11217 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11218 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11219 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11220 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11221 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11222 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11223 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11224 (amd64_emit_void_call_2): New.
11225 (amd64_emit_ops): New.
11226 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11227 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11228 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11229 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11230 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11231 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11232 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11233 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11234 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11235 (i386_emit_stack_adjust, i386_emit_int_call_1)
11236 (i386_emit_void_call_2): New.
11237 (i386_emit_ops): New.
11238 (x86_emit_ops): New.
11239 (the_low_target): Install x86_emit_ops.
11240 * server.h (struct emit_ops): New.
11241 (get_raw_reg_func_addr): Declare.
11242 (current_insn_ptr, emit_error): Declare.
11243 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11244 (set_trace_state_variable_value): New defines.
11245 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11246 addr_get_trace_state_variable_value and
11247 addr_set_trace_state_variable_value.
11248 (symbol_list): New fields for get_raw_reg,
11249 get_trace_state_variable_value and set_trace_state_variable_value.
11250 (condfn): New typedef.
11251 (struct tracepoint): New field `compiled_cond'.
11252 (do_action_at_tracepoint): Clear compiled_cond.
11253 (get_trace_state_variable_value, set_trace_state_variable_value):
11255 (condition_true_at_tracepoint): If there's a compiled condition,
11257 (current_insn_ptr, emit_error): New globals.
11258 (struct bytecode_address): New.
11259 (get_raw_reg_func_addr): New.
11260 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11261 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11262 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11263 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11264 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11265 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11266 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11267 (compile_tracepoint_condition, compile_bytecodes): New.
11268 * target.h (emit_ops): Forward declare.
11269 (struct target_ops): New field emit_ops.
11270 (target_emit_ops): New.
11271 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11272 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11273 * linux-low.c (linux_emit_ops): New.
11274 (linux_target_ops): Install it.
11275 * linux-low.h (struct linux_target_ops): New field emit_ops.
11277 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11279 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11280 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11282 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11283 Stan Shebs <stan@codesourcery.com>
11285 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11286 (all): Depend on $(extra_libraries).
11287 (install-only): Install the IPA.
11288 (IPA_OBJS, IPA_LIB): New.
11289 (clean): Remove the IPA lib.
11290 (IPAGENT_CFLAGS): New.
11291 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11292 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11293 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11294 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11295 * configure.ac: Check for atomic builtins support in the compiler.
11296 (IPA_DEPFILES, extra_libraries): Define.
11297 * configure.srv (ipa_obj): Add description.
11298 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11299 (i[34567]86-*-linux*): Set ipa_obj.
11300 (x86_64-*-linux*): Set ipa_obj.
11301 * linux-low.c (stabilizing_threads): New.
11302 (supports_fast_tracepoints): New.
11303 (linux_detach): Stabilize threads before detaching.
11304 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11305 the lwp is either not stabilizing, or is moving out of a jump pad.
11306 (linux_fast_tracepoint_collecting): New.
11307 (maybe_move_out_of_jump_pad): New.
11308 (enqueue_one_deferred_signal): New.
11309 (dequeue_one_deferred_signal): New.
11310 (linux_wait_for_event_1): If moving out of a jump pad, defer
11311 pending signals to later.
11312 (linux_stabilize_threads): New.
11313 (linux_wait_1): Check if threads need moving out of jump pads, and
11315 (stuck_in_jump_pad_callback): New.
11316 (move_out_of_jump_pad_callback): New.
11317 (lwp_running): New.
11318 (linux_resume_one_lwp): Handle moving out of jump pads.
11319 (linux_set_resume_request): Dequeue deferred signals.
11320 (need_step_over_p): Also step over fast tracepoint jumps.
11321 (start_step_over): Also uninsert fast tracepoint jumps.
11322 (finish_step_over): Also reinsert fast tracepoint jumps.
11323 (linux_install_fast_tracepoint_jump): New.
11324 (linux_target_ops): Install linux_stabilize_threads and
11325 linux_install_fast_tracepoint_jump_pad.
11326 * linux-low.h (linux_target_ops) <get_thread_area,
11327 install_fast_tracepoint_jump_pad>: New fields.
11328 (struct lwp_info) <collecting_fast_tracepoint,
11329 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11330 (linux_get_thread_area): Declare.
11331 * linux-x86-low.c (jump_insn): New.
11332 (x86_get_thread_area): New.
11333 (append_insns): New.
11334 (push_opcode): New.
11335 (amd64_install_fast_tracepoint_jump_pad): New.
11336 (i386_install_fast_tracepoint_jump_pad): New.
11337 (x86_install_fast_tracepoint_jump_pad): New.
11338 (the_low_target): Install x86_get_thread_area and
11339 x86_install_fast_tracepoint_jump_pad.
11340 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11341 (struct fast_tracepoint_jump): New.
11342 (fast_tracepoint_jump_insn): New.
11343 (fast_tracepoint_jump_shadow): New.
11344 (find_fast_tracepoint_jump_at): New.
11345 (fast_tracepoint_jump_here): New.
11346 (delete_fast_tracepoint_jump): New.
11347 (set_fast_tracepoint_jump): New.
11348 (uninsert_fast_tracepoint_jumps_at): New.
11349 (reinsert_fast_tracepoint_jumps_at): New.
11350 (set_breakpoint_at): Use write_inferior_memory.
11351 (uninsert_raw_breakpoint): Use write_inferior_memory.
11352 (check_mem_read): Mask out fast tracepoint jumps.
11353 (check_mem_write): Mask out fast tracepoint jumps.
11354 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11355 (set_fast_tracepoint_jump): Declare.
11356 (delete_fast_tracepoint_jump)
11357 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11358 (reinsert_fast_tracepoint_jumps_at): Declare.
11359 * regcache.c: Don't compile many functions when building the
11360 in-process agent library.
11361 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11362 the register buffer in the heap.
11363 (free_register_cache): If the register buffer isn't owned by the
11364 regcache, don't free it.
11365 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11366 pre-existing register caches.
11367 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11369 (convert_ascii_to_int): : Constify `from' parameter type.
11370 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11371 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11372 the needed buffer in-place.
11373 (relocate_instruction): New.
11374 * server.c (handle_query) <qSymbols>: If the target supports
11375 tracepoints, give it a chance of looking up symbols. Report
11376 support for fast tracepoints.
11377 (handle_status): Stabilize threads.
11378 (process_serial_event): Adjust.
11379 * server.h (struct fast_tracepoint_jump): Forward declare.
11380 (struct process_info) <fast_tracepoint_jumps>: New field.
11381 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11382 (decode_X_packet, decode_M_packet): Adjust.
11383 (relocate_instruction): Declare.
11384 (in_process_agent_loaded): Declare.
11385 (tracepoint_look_up_symbols): Declare.
11386 (struct fast_tpoint_collect_status): Declare.
11387 (fast_tracepoint_collecting): Declare.
11388 (force_unlock_trace_buffer): Declare.
11389 (handle_tracepoint_bkpts): Declare.
11390 (initialize_low_tracepoint)
11391 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11392 * target.h (struct target_ops) <stabilize_threads,
11393 install_fast_tracepoint_jump_pad>: New fields.
11394 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11395 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11396 [HAVE_STDINT_H]: Include stdint.h.
11397 (trace_debug_1): Rename to ...
11398 (trace_vdebug): ... this.
11399 (trace_debug): Rename to ...
11400 (trace_debug_1): ... this. Add `level' parameter.
11401 (trace_debug): New.
11402 (ATTR_USED, ATTR_NOINLINE): New.
11403 (IP_AGENT_EXPORT): New.
11404 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11405 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11406 (about_to_request_buffer_space, trace_buffer_is_full)
11407 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11408 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11409 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11410 (traceframe_write_count, traceframes_created)
11411 (trace_state_variables)
11412 New renaming defines.
11413 (struct ipa_sym_addresses): New.
11414 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11415 (symbol_list): New.
11416 (ipa_sym_addrs): New.
11417 (all_tracepoint_symbols_looked_up): New.
11418 (in_process_agent_loaded): New.
11419 (write_e_ipa_not_loaded): New.
11420 (maybe_write_ipa_not_loaded): New.
11421 (tracepoint_look_up_symbols): New.
11422 (debug_threads) [IN_PROCESS_AGENT]: New.
11423 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11424 (UNKNOWN_SIDE_EFFECTS): New.
11425 (stop_tracing): New.
11426 (flush_trace_buffer): New.
11427 (stop_tracing_bkpt): New.
11428 (flush_trace_buffer_bkpt): New.
11429 (read_inferior_integer): New.
11430 (read_inferior_uinteger): New.
11431 (read_inferior_data_pointer): New.
11432 (write_inferior_data_pointer): New.
11433 (write_inferior_integer): New.
11434 (write_inferior_uinteger): New.
11435 (struct collect_static_trace_data_action): Delete.
11436 (enum tracepoint_type): New.
11437 (struct tracepoint) <type>: New field `type'.
11438 <actions_str, step_actions, step_actions_str>: Only include in
11440 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11441 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11442 (tracepoints): Use IP_AGENT_EXPORT.
11443 (last_tracepoint): Don't include in the IPA.
11444 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11445 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11446 (alloced_trace_state_variables): New.
11447 (trace_state_variables): Use IP_AGENT_EXPORT.
11448 (traceframe_t): Delete unused variable.
11449 (circular_trace_buffer): Don't include in the IPA.
11450 (trace_buffer_start): Delete.
11451 (struct trace_buffer_control): New.
11452 (trace_buffer_free): Delete.
11453 (struct ipa_trace_buffer_control): New.
11454 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11455 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11457 (trace_buffer_ctrl): New.
11458 (TRACE_BUFFER_CTRL_CURR): New.
11459 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11460 Reimplement as macros.
11461 (trace_buffer_wrap): Delete.
11462 (traceframe_write_count, traceframe_read_count)
11463 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11464 (struct tracepoint_hit_ctx) <type>: New field.
11465 (struct fast_tracepoint_ctx): New.
11466 (memory_barrier): New.
11468 (record_tracepoint_error): Update atomically in the IPA.
11469 (clear_inferior_trace_buffer): New.
11470 (about_to_request_buffer_space): New.
11471 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11472 updating the same buffer.
11473 (add_tracepoint): Default the tracepoint's type to trap
11474 tracepoint, and orig_size to -1.
11475 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11476 internal variables.
11477 (create_trace_state_variable): New parameter `gdb'. Handle it.
11478 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11479 (cmd_qtdp): Handle fast tracepoints.
11480 (cmd_qtdv): Adjust.
11481 (max_jump_pad_size): New.
11482 (gdb_jump_pad_head): New.
11483 (get_jump_space_head): New.
11484 (claim_jump_space): New.
11485 (sort_tracepoints): New.
11486 (MAX_JUMP_SIZE): New.
11487 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11489 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11490 support. Upload fast traceframes, and delete internal IPA
11492 (stop_tracing_handler): New.
11493 (flush_trace_buffer_handler): New.
11494 (cmd_qtstop): Upload fast tracepoints.
11495 (response_tracepoint): Handle fast tracepoints.
11496 (tracepoint_finished_step): Upload fast traceframes. Set the
11497 tracepoint hit context's tracepoint type.
11498 (handle_tracepoint_bkpts): New.
11499 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11500 type. Add comment about fast tracepoints.
11501 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11502 non-existing action_str field.
11503 (get_context_regcache): Handle fast tracepoints.
11504 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11506 (fast_tracepoint_from_jump_pad_address): New.
11507 (fast_tracepoint_from_ipa_tpoint_address): New.
11508 (collecting_t): New.
11509 (force_unlock_trace_buffer): New.
11510 (fast_tracepoint_collecting): New.
11512 (gdb_collect): New.
11513 (write_inferior_data_ptr): New.
11514 (target_tp_heap): New.
11515 (target_malloc): New.
11516 (download_agent_expr): New.
11518 (download_tracepoints): New.
11519 (download_trace_state_variables): New.
11520 (upload_fast_traceframes): New.
11521 (IPA_FIRST_TRACEFRAME): New.
11522 (IPA_NEXT_TRACEFRAME_1): New.
11523 (IPA_NEXT_TRACEFRAME): New.
11524 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11525 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11526 (gdb_jump_pad_buffer_end): New.
11527 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11528 (initialize_tracepoint): Adjust.
11529 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11530 buffer. Initialize the low module.
11531 * utils.c (PREFIX, TOOLNAME): New.
11532 (malloc_failure): Use PREFIX.
11533 (error): In the IPA, an error causes an exit.
11534 (fatal, warning): Use PREFIX.
11535 (internal_error): Use TOOLNAME.
11536 (NUMCELLS): Increase to 10.
11537 * configure, config.in: Regenerate.
11539 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11541 * server.c (handle_query) <qSupported>: Do two passes over the
11542 qSupported string to avoid nesting strtok.
11544 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11546 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11548 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11549 -Wl,--dynamic-list.
11550 * configure: Regenerate.
11551 * proc-service.list: New.
11553 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11555 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11558 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11560 * gdbreplay.c (remote_open): Check error return from socket() call by
11561 its equality to -1 not by it being negative.
11562 * remote-utils.c (remote_open): Likewise.
11564 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11566 * config.h: Regenerate.
11568 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11570 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11571 doesn't provide PTRACE_GET_THREAD_AREA.
11573 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11575 * linux-m68k-low.c: Include <asm/ptrace.h>
11576 (ps_get_thread_area): Implement.
11578 2010-05-03 Doug Evans <dje@google.com>
11580 * event-loop.c (struct callback_event): New struct.
11581 (callback_list): New global.
11582 (append_callback_event, delete_callback_event): New functions.
11583 (process_callback): New function.
11584 (start_event_loop): Call it.
11585 * remote-utils.c (NOT_SCHEDULED): Define.
11586 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11587 moved out of readchar.
11588 (readchar): Rewrite. Call reschedule before returning.
11589 (reset_readchar): New function.
11590 (remote_close): Call it.
11591 (process_remaining, reschedule): New functions.
11592 * server.h (callback_handler_func): New typedef.
11593 (append_callback_event, delete_callback_event): Declare.
11595 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11597 * proc-service.c (ps_pglobal_lookup): Use
11598 thread_db_look_up_one_symbol.
11599 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11600 parameter. Use it instead of all_symbols_looked_up.
11601 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11603 (all_symbols_looked_up): Don't declare.
11604 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11605 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11607 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11608 Set all_symbols_looked_up here.
11609 (thread_db_look_up_one_symbol): New.
11610 (thread_db_get_tls_address): Adjust.
11611 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11612 thread_db object on the heap, and tentatively set it in the
11614 (thread_db_init): Don't set all_symbols_looked_up here.
11615 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11617 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11619 * linux-low.c (linux_kill, linux_detach): Adjust.
11620 (status_pending_p_callback): Remove redundant statement. Check
11621 for !TARGET_WAITIKIND_IGNORE, instead of
11622 TARGET_WAITKIND_STOPPED.
11623 (handle_tracepoints): Make sure LWP is locked. Adjust.
11624 (linux_wait_for_event_1): Adjust.
11625 (linux_cancel_breakpoints): New.
11626 (unsuspend_one_lwp): New.
11627 (unsuspend_all_lwps): New.
11628 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11629 (send_sigstop_callback): Change return type to int, add new
11630 `except' parameter and handle it.
11631 (suspend_and_send_sigstop_callback): New.
11632 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11633 pass them down. If SUSPEND, also increment the lwp's suspend
11635 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11636 (need_step_over_p): Don't consider suspended LWPs.
11637 (start_step_over): Adjust.
11638 (proceed_one_lwp): Change return type to int, add new `except'
11639 parameter and handle it.
11640 (unsuspend_and_proceed_one_lwp): New.
11641 (proceed_all_lwps): Use find_inferior instead of
11643 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11644 also decrement the suspend count of LWPs. Pass `except' down,
11645 instead of hacking its suspend count.
11646 (linux_pause_all): Add `freeze' parameter. Adjust.
11647 (linux_unpause_all): New.
11648 (linux_target_ops): Install linux_unpause_all.
11649 * server.c (handle_status): Adjust.
11650 * target.h (struct target_ops): New fields `unpause_all' and
11651 `cancel_breakpoints'. Add new parameter to `pause_all'.
11652 (pause_all): Add new `freeze' parameter.
11653 (unpause_all): New.
11654 (cancel_breakpoints): New.
11655 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11656 cancel breakpoints.
11657 (cmd_qtstart): Pause threads.
11658 (stop_tracing): Pause threads, and cancel breakpoints.
11659 * win32-low.c (win32_target_ops): Adjust.
11661 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11663 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11664 the inferior right away from here...
11665 (linux_wait_1): ... to here, and adjust to check the thread's
11666 last_resume_kind instead of the lwp's step or stop_expected flags.
11668 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11670 * README: Use consistent `GDB' and `GDBserver' spellings.
11672 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11674 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11675 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11676 (linux_detach_one_lwp): Assume the lwp is stopped.
11677 (any_thread_of): Delete.
11678 (linux_detach): Stop all lwps here. Don't blindly delete all
11680 (delete_lwp_callback): New.
11681 (linux_mourn): Delete all lwps of the process that is gone.
11682 (linux_wait_1): Don't delete the last lwp of the process here.
11683 * mem-break.h (mark_breakpoints_out): Declare.
11684 * mem-break.c (mark_breakpoints_out): New.
11685 (free_all_breakpoints): Use it.
11686 * server.c (handle_target_event): If the process is gone, mark
11688 * thread-db.c (struct thread_db) <create_bp>: New field.
11689 (thread_db_enable_reporting): Fix prototype. Store a thread event
11690 breakpoint reference in the thread_db struct.
11691 (thread_db_load_search): Clear the thread_db object.
11692 (try_thread_db_load_1): Ditto.
11693 (switch_to_process): New.
11694 (disable_thread_event_reporting): Use it.
11695 (remove_thread_event_breakpoints): New.
11696 (thread_db_detach, thread_db_mourn): Use it.
11698 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11700 * linux-low.c (linux_enable_event_reporting): New.
11701 (linux_wait_for_event_1, handle_extended_wait): Use it.
11703 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11705 * linux-low.c (linux_kill_one_lwp, linux_kill)
11706 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11707 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11708 SIGSTOP even if the LWP is stopped.
11709 (send_sigstop_callback): New.
11710 (stop_all_lwps): Use send_sigstop_callback instead.
11711 (linux_resume_one_thread): Adjust.
11712 (proceed_one_lwp): Still proceed an LWP that the client has
11713 requested to stop, if we haven't reported it as stopped yet. Make
11714 sure that LWPs the client want stopped, have a pending SIGSTOP.
11716 2010-04-26 Doug Evans <dje@google.com>
11718 * server.c (handle_general_set): Make static.
11720 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11721 Print received char after testing for error/eof instead of before.
11722 (input_interrupt): Tweak comment.
11724 2010-04-23 Doug Evans <dje@google.com>
11726 * server.c (start_inferior): Print inferior argv if --debug.
11728 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11730 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11731 * nto-x86-low.c: Include server.h
11733 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11735 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11736 be consistent with other sources of this directory.
11737 (init_registers_amd64): Correct name of source file of this function
11740 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11742 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11743 64-bit executables.
11745 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11747 * win32-i386-low.c: Add 64-bit support.
11748 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11749 (init_registers_amd64): Declare.
11750 (mappings): Add 64-bit version of array.
11751 (init_windows_x86): New function.
11752 (the_low_target): Change init_arch field to init_windows_x86.
11754 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11756 * win32-low.c: Adapt to support also 64-bit architecture.
11757 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11758 (get_image_name): Use SIZE_T type for local variable `done'.
11759 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11760 (toolhelp_get_dll_name): Idem.
11761 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11762 Use uintptr_t typecast to avoid warning.
11763 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11764 (handle_exception): Use phex_nz to avoid warning.
11765 (win32_wait): Remove unused local variable `process'.
11767 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11769 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11772 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11774 * configure.ac: Use `ws2_32' library for srv_mingw.
11775 * configure: Regenerate.
11776 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11777 * remote-utils.c: Likewise.
11779 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11781 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11782 if __x86_64__ is defined.
11784 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11786 * configure: Regenerate.
11788 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11790 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11791 * target.h (target_ops): New get_tib_address field.
11792 * win32-low.h (win32_thread_info): Add thread_local_base field.
11793 * win32-low.c (child_add_thread): Add tlb argument.
11794 Set thread_local_base field to TLB.
11795 (get_child_debug_event): Adapt to child_add_thread change.
11796 (win32_get_tib_address): New function.
11797 (win32_target_ops): Set get_tib_address field to
11798 win32_get_tib_address.
11799 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11801 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11803 * linux-low.c (linux_mourn): Also remove the process.
11804 * server.c (handle_target_event): Don't remove the process here.
11805 * nto-low.c (nto_mourn): New.
11806 (nto_target_ops): Install it.
11807 * spu-low.c (spu_mourn): New.
11808 (spu_target_ops): Install it.
11809 * win32-low.c (win32_mourn): New.
11810 (win32_target_ops): Install it.
11812 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11814 * server.h (buffer_xml_printf): Remove redundant `;'.
11816 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11818 * regcache.c (set_register_cache): Invalidate regcaches before
11819 changing the register cache layout.
11820 (regcache_invalidate_one): Allow a NULL regcache.
11821 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11822 regcaches before changing the register cache layout or the target
11825 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11827 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11828 variable warning on Linux/x86-64.
11830 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11832 GDBserver disconnected tracing support.
11834 * linux-low.c (linux_remove_process): Delete.
11835 (add_lwp): Don't set last_resume_kind here.
11836 (linux_kill): Use `mourn'.
11837 (linux_detach): Use `thread_db_detach', and `mourn'.
11838 (linux_mourn): New.
11839 (linux_attach_lwp_1): Adjust comment.
11840 (linux_attach): last_resume_kind moved the thread_info; adjust.
11841 (status_pending_p_callback): Adjust.
11842 (linux_wait_for_event_1): Adjust.
11843 (count_events_callback, select_singlestep_lwp_callback)
11844 (select_event_lwp_callback, cancel_breakpoints_callback)
11845 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11846 (proceed_one_lwp): Adjust.
11847 (linux_async): Add debug output.
11848 (linux_thread_stopped): New.
11849 (linux_pause_all): New.
11850 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11852 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11853 (thread_db_free): Delete declaration.
11854 (thread_db_detach, thread_db_mourn): Declare.
11855 * thread-db.c (thread_db_init): Use thread_db_mourn.
11856 (thread_db_free): Delete, split in two.
11857 (disable_thread_event_reporting): New.
11858 (thread_db_detach): New.
11859 (thread_db_mourn): New.
11861 * server.h (struct thread_info) <last_resume_kind>: New field.
11862 <attached>: Add comment.
11863 <gdb_detached>: New field.
11864 (handler_func): Change return type to int.
11865 (handle_serial_event, handle_target_event): Ditto.
11866 (gdb_connected): Declare.
11868 (disconnected_tracing): Declare.
11869 (stop_tracing): Declare.
11871 * server.c (handle_query) <qSupported>: Report support for
11872 disconnected tracing.
11873 (queue_stop_reply_callback): Account for running threads.
11874 (gdb_wants_thread_stopped): New.
11875 (gdb_wants_all_threads_stopped): New.
11876 (gdb_reattached_process): New.
11877 (handle_status): Clear the `gdb_detached' flag of all processes.
11878 In all-stop, stop all threads.
11879 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11880 (process_serial_event): If the remote connection breaks, or if an
11881 exit was forced with "monitor exit", force an event loop exit.
11882 Handle disconnected tracing on detach.
11883 (handle_serial_event): Adjust.
11884 (handle_target_event): If GDB isn't connected, forward events back
11885 to the inferior, unless the last process exited, in which case,
11886 exit gdbserver. Adjust interface.
11888 * remote-utils.c (remote_open): Don't block in accept. Instead
11889 register an event loop source on the listen socket file
11890 descriptor. Refactor bits into ...
11891 (listen_desc): ... this new global.
11892 (gdb_connected): ... this new function.
11893 (enable_async_notification): ... this new function.
11894 (handle_accept_event): ... this new function.
11895 (remote_close): Clear remote_desc.
11897 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11899 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11901 (mourn_inferior): Define.
11902 (target_process_qsupported): Avoid the dangling else problem.
11903 (thread_stopped): Define.
11904 (pause_all): Define.
11905 (target_waitstatus_to_string): Declare.
11906 * target.c (target_waitstatus_to_string): New.
11908 * tracepoint.c (tracing): Make extern.
11909 (disconnected_tracing): New.
11910 (stop_tracing): Make extern. Handle tracing stops due to GDB
11912 (cmd_qtdisconnected): New.
11913 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11914 (handle_tracepoint_general_set): Handle QTDisconnected.
11916 * event-loop.c (event_handler_func): Change return type to int.
11917 (process_event): Bail out if the event handler wants the event
11919 (handle_file_event): Ditto.
11920 (start_event_loop): Bail out if the event handler wants the event
11923 * nto-low.c (nto_target_ops): Adjust.
11924 * spu-low.c (spu_wait): Don't remove the process here.
11925 (spu_target_ops): Adjust.
11926 * win32-low.c (win32_wait): Don't remove the process here.
11927 (win32_target_ops): Adjust.
11929 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11931 * regcache.c (realloc_register_cache): Invalidate inferior's
11932 regcache before recreating it.
11934 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11936 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11938 2010-04-09 Stan Shebs <stan@codesourcery.com>
11939 Pedro Alves <pedro@codesourcery.com>
11941 * server.h (LONGEST): New.
11942 (struct thread_info) <while_stepping>: New field.
11943 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11945 (initialize_tracepoint, handle_tracepoint_general_set)
11946 (handle_tracepoint_query, tracepoint_finished_step)
11947 (tracepoint_was_hit, release_while_stepping_state_list):
11948 (current_traceframe): Declare.
11949 * server.c (handle_general_set): Handle tracepoint packets.
11950 (read_memory): New.
11951 (write_memory): New.
11952 (handle_search_memory_1): Use read_memory.
11953 (handle_query): Report support for conditional tracepoints, trace
11954 state variables, and tracepoint sources. Handle tracepoint
11956 (main): Initialize the tracepoints module.
11957 (process_serial_event): Handle traceframe reads/writes.
11959 * linux-low.c (handle_tracepoints): New.
11960 (linux_wait_1): Call it.
11961 (linux_resume_one_lwp): Handle while-stepping.
11962 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11963 (linux_target_ops): Install them.
11964 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11966 * linux-x86-low.c (x86_supports_tracepoints): New.
11967 (the_low_target). Install it.
11969 * mem-break.h (delete_breakpoint): Declare.
11970 * mem-break.c (delete_breakpoint): Make external.
11972 * target.h (struct target_ops): Add `supports_tracepoints',
11973 `read_pc', and `write_pc' fields.
11974 (target_supports_tracepoints): Define.
11975 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11978 * regcache.h (struct regcache) <registers_owned>: New field.
11979 (init_register_cache, regcache_cpy): Declare.
11980 (regcache_read_pc, regcache_write_pc): Declare.
11981 (register_cache_size): Declare.
11982 (supply_regblock): Declare.
11983 * regcache.c (init_register_cache): New.
11984 (new_register_cache): Use it.
11985 (regcache_cpy): New.
11986 (register_cache_size): New.
11987 (supply_regblock): New.
11988 (regcache_read_pc, regcache_write_pc): New.
11990 * tracepoint.c: New.
11992 * Makefile.in (OBS): Add tracepoint.o.
11993 (tracepoint.o): New rule.
11995 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11997 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11999 (i386-mmx.c): Likewise.
12000 (i386-mmx-linux.o): Likewise.
12001 (i386-mmx-linux.c): Likewise.
12003 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12004 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12005 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12006 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12008 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12009 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12010 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12012 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12014 * Makefile.in (clean): Updated.
12016 (i386-avx.c): Likewise.
12017 (i386-avx-linux.o): Likewise.
12018 (i386-avx-linux.c): Likewise.
12019 (amd64-avx.o): Likewise.
12020 (amd64-avx.c): Likewise.
12021 (amd64-avx-linux.o): Likewise.
12022 (amd64-avx-linux.c): Likewise.
12024 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12025 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12026 (srv_amd64_regobj): Add amd64-avx.o.
12027 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12028 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12029 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12030 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12031 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12032 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12033 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12035 * i387-fp.c: Include "i386-xstate.h".
12037 (i387_cache_to_xsave): Likewise.
12038 (i387_xsave_to_cache): Likewise.
12039 (x86_xcr0): Likewise.
12041 * i387-fp.h (i387_cache_to_xsave): Likewise.
12042 (i387_xsave_to_cache): Likewise.
12043 (x86_xcr0): Likewise.
12045 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12046 * linux-crisv32-low.c (target_regsets): Likewise.
12047 * linux-m68k-low.c (target_regsets): Likewise.
12048 * linux-mips-low.c (target_regsets): Likewise.
12049 * linux-ppc-low.c (target_regsets): Likewise.
12050 * linux-s390-low.c (target_regsets): Likewise.
12051 * linux-sh-low.c (target_regsets): Likewise.
12052 * linux-sparc-low.c (target_regsets): Likewise.
12053 * linux-xtensa-low.c (target_regsets): Likewise.
12055 * linux-low.c: Include <sys/uio.h>.
12056 (regsets_fetch_inferior_registers): Support nt_type.
12057 (regsets_store_inferior_registers): Likewise.
12058 (linux_process_qsupported): New.
12059 (linux_target_ops): Add linux_process_qsupported.
12061 * linux-low.h (regset_info): Add nt_type.
12062 (linux_target_ops): Add process_qsupported.
12064 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12066 (init_registers_i386_avx_linux): New.
12067 (init_registers_amd64_avx_linux): Likewise.
12068 (xmltarget_i386_linux_no_xml): Likewise.
12069 (xmltarget_amd64_linux_no_xml): Likewise.
12070 (PTRACE_GETREGSET): Likewise.
12071 (PTRACE_SETREGSET): Likewise.
12072 (x86_fill_xstateregset): Likewise.
12073 (x86_store_xstateregset): Likewise.
12074 (use_xml): Likewise.
12075 (x86_linux_update_xmltarget): Likewise.
12076 (x86_linux_process_qsupported): Likewise.
12077 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12078 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12079 init_registers_i386_linux here. Call
12080 x86_linux_update_xmltarget.
12081 (the_low_target): Add x86_linux_process_qsupported.
12083 * server.c (handle_query): Call target_process_qsupported.
12085 * target.h (target_ops): Add process_qsupported.
12086 (target_process_qsupported): New.
12088 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12090 * inferiors.c (add_thread): Set last_status kind to
12091 TARGET_WAITKIND_IGNORE.
12092 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12093 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12094 (linux_wait_1): Move `thread' local definition to block that uses
12095 it. Don't NULL initialize `event_child'.
12096 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12097 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12098 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12100 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12102 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12103 an extended waitstatus, or by a watchpoint.
12104 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12105 thread was stepping or has been stopped by a watchpoint.
12107 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12109 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12110 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12111 of another, then delete the previous, and validate all
12113 (validate_inserted_breakpoint): New.
12114 (delete_disabled_breakpoints): New.
12115 (validate_breakpoints): New.
12116 (check_mem_read): Validate breakpoints before trusting their
12117 shadow. Delete disabled breakpoints.
12118 (check_mem_write): Validate breakpoints before trusting they
12119 should be inserted. Delete disabled breakpoints.
12120 * mem-break.h (validate_breakpoints):
12121 * server.c (handle_query): Validate breakpoints when we see a
12124 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12126 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12127 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12128 if we could tell there's a GDB breakpoint at stop_pc.
12129 (need_step_over_p): Don't do a step over if we find a GDB
12130 breakpoint at the resume PC.
12132 * mem-break.c (struct raw_breakpoint): New.
12133 (enum bkpt_type): New type `gdb_breakpoint'.
12134 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12135 fields. New field `raw'.
12136 (find_raw_breakpoint_at): New.
12137 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12138 breakpoint instead.
12139 (set_breakpoint_at): Adjust.
12140 (delete_raw_breakpoint): New.
12141 (release_breakpoint): New.
12142 (delete_breakpoint): Rename to...
12143 (delete_breakpoint_1): ... this. Add proc parameter. Use
12144 release_breakpoint. Return ENOENT.
12145 (delete_breakpoint): Reimplement.
12146 (find_breakpoint_at): Delete.
12147 (find_gdb_breakpoint_at): New.
12148 (delete_breakpoint_at): Delete.
12149 (set_gdb_breakpoint_at): New.
12150 (delete_gdb_breakpoint_at): New.
12151 (gdb_breakpoint_here): New.
12152 (set_reinsert_breakpoint): Use release_breakpoint.
12153 (uninsert_breakpoint): Rename to ...
12154 (uninsert_raw_breakpoint): ... this.
12155 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12156 (reinsert_raw_breakpoint): Change parameter type to
12158 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12160 (check_breakpoints): Adjust. Use release_breakpoint.
12161 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12162 (breakpoint_inserted_here): Ditto.
12163 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12164 Don't trust the breakpoint's shadow if it is not inserted.
12165 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12166 (delete_all_breakpoints): Adjust.
12167 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12168 use delete_breakpoint_1.
12170 * mem-break.h (breakpoints_supported): Delete declaration.
12171 (set_gdb_breakpoint_at): Declare.
12172 (gdb_breakpoint_here): Declare.
12173 (delete_breakpoint_at): Delete.
12174 (delete_gdb_breakpoint_at): Declare.
12176 * server.h (struct raw_breakpoint): Forward declare.
12177 (struct process_info): New field `raw_breakpoints'.
12179 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12182 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12184 * linux-low.c (status_pending_p_callback): Fix comment.
12185 (linux_wait_for_event_1): Move most of the internal breakpoint
12186 handling from here...
12187 (linux_wait_1): ... to here.
12188 (count_events_callback): New.
12189 (select_singlestep_lwp_callback): New.
12190 (select_event_lwp_callback): New.
12191 (cancel_breakpoints_callback): New.
12192 (select_event_lwp): New.
12193 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12194 priority to all LWPs that have had events that should be reported
12195 to the client. Cancel breakpoints when about to reporting the
12196 event to the client, not while stopping lwps. No longer cancel
12197 finished single-steps here.
12198 (cancel_finished_single_step): Delete.
12199 (cancel_finished_single_steps): Delete.
12201 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12203 * mem-break.c (enum bkpt_type): New.
12204 (struct breakpoint): New field `type'.
12205 (set_breakpoint_at): Change return type to struct breakpoint
12206 pointer. Set type to `other_breakpoint' by default.
12207 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12208 in the breakpoint list.
12209 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12210 (reinsert_breakpoint): Rename to ...
12211 (reinsert_raw_breakpoint): ... this.
12212 (reinsert_breakpoints_at): Adjust.
12213 * mem-break.h (struct breakpoint): Declare.
12214 (set_breakpoint_at): Change return type to struct breakpoint
12217 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12219 * server.c (handle_query): Assign, not compare.
12221 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12223 Teach linux gdbserver to step-over-breakpoints.
12225 * linux-low.c (can_hardware_single_step): New.
12226 (supports_breakpoints): New.
12227 (handle_extended_wait): If stopping threads, read the stop pc of
12228 the new cloned LWP.
12230 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12231 low target doesn't support retrieving the PC.
12232 (add_lwp): Set last_resume_kind to resume_continue.
12233 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12234 (linux_attach): Don't clear stop_expected. Set the lwp's
12235 last_resume_kind to resume_stop.
12236 (linux_detach_one_lwp): Don't check for removed breakpoints.
12237 (check_removed_breakpoint): Delete.
12238 (status_pending_p): Rename to ...
12239 (status_pending_p_callback): ... this. Don't check for removed
12240 breakpoints. Don't consider threads that are stopped from GDB's
12242 (linux_wait_for_lwp): Always read the stop_pc here.
12243 (cancel_breakpoint): New.
12244 (step_over_bkpt): New global.
12245 (linux_wait_for_event_1): Implement stepping over breakpoints.
12246 (gdb_wants_lwp_stopped): New.
12247 (gdb_wants_all_stopped): New.
12248 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12249 single-step traps here. Store the thread's last reported target
12251 (send_sigstop): Don't clear stop_expected. Always set it,
12253 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12254 (cancel_finished_single_step): New.
12255 (cancel_finished_single_steps): New.
12256 (wait_for_sigstop): Don't cancel finished single-step traps here.
12257 (linux_resume_one_lwp): Don't check for removed breakpoints.
12258 Don't set `step' on non-hardware step archs.
12259 (linux_set_resume_request): Ignore resume_stop requests if already
12260 stopping or stopped. Set the lwp's last_resume_kind.
12261 (resume_status_pending_p): Don't check for removed breakpoints.
12262 (need_step_over_p): New.
12263 (start_step_over): New.
12264 (finish_step_over): New.
12265 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12266 requests. Clear the thread's last reported target waitstatus.
12267 Don't use the `suspended' flag. Don't consider pending breakpoints.
12268 (linux_resume): Start a step-over if necessary.
12269 (proceed_one_lwp): New.
12270 (proceed_all_lwps): New.
12271 (unstop_all_lwps): New.
12272 * linux-low.h (struct lwp_info): Rewrite comment for the
12273 `suspended' flag. Add the `stop_pc' field. Delete the
12274 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12275 Add `'last_resume_kind' and `need_step_over' fields.
12276 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12277 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12278 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12279 (set_raw_breakpoint_at): New.
12280 (set_breakpoint_at): Rewrite to use it.
12281 (reinsert_breakpoint_handler): Delete.
12282 (set_reinsert_breakpoint): New.
12283 (reinsert_breakpoint_by_bp): Delete.
12284 (delete_reinsert_breakpoints): New.
12285 (uninsert_breakpoint): Rewrite.
12286 (uninsert_breakpoints_at): New.
12287 (reinsert_breakpoint): Rewrite.
12288 (reinsert_breakpoints_at): New.
12289 (check_breakpoints): Rewrite.
12290 (breakpoint_here): New.
12291 (breakpoint_inserted_here): New.
12292 (check_mem_read): Adjust.
12293 * mem-break.h (breakpoints_supported, breakpoint_here)
12294 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12295 (reinsert_breakpoint_by_bp): Delete declaration.
12296 (delete_reinsert_breakpoints): Declare.
12297 (reinsert_breakpoint): Delete declaration.
12298 (reinsert_breakpoints_at): Declare.
12299 (uninsert_breakpoint): Delete declaration.
12300 (uninsert_breakpoints_at): Declare.
12301 (check_breakpoints): Adjust prototype.
12302 * server.h: Adjust include order.
12303 (struct thread_info): Declare here. Add a `last_status' field.
12305 2010-03-23 Michael Snyder <msnyder@vmware.com>
12307 * server.c (crc32): New function.
12308 (handle_query): Add handling for 'qCRC:' request.
12310 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12312 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12313 lwp had been stopped by a watchpoint.
12315 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12317 * server.h (internal_error): Declare.
12318 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12319 * utils.c (internal_error): New function.
12321 2010-03-15 Andreas Schwab <schwab@redhat.com>
12323 * configure.srv: Fix typo setting srv_regobj.
12325 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12327 * linux-low.c (fetch_register): Avoid passing a non string literal
12329 (usr_store_inferior_registers): Ditto.
12331 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12333 * linux-low.c (linux_write_memory): Bail out early if peeking
12336 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12338 * linux-low.h (struct lwp_info): New fields
12339 `stopped_by_watchpoint' and `stopped_data_address'.
12340 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12341 here, and cache them in the lwp object.
12342 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12344 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12346 (linux_stopped_by_watchpoint): Rewrite.
12347 (linux_stopped_data_address): Rewrite.
12349 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12351 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12352 switching the current inferior, not before.
12354 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12356 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12357 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12358 i386-linux.c and amd64-linux.c.
12359 (reg-i386.o): Removed.
12360 (reg-i386.c): Likewise.
12361 (reg-i386-linux.o): Likewise.
12362 (reg-i386-linux.c): Likewise.
12363 (reg-x86-64.o): Likewise.
12364 (reg-x86-64.c): Likewise.
12365 (reg-x86-64-linux.o): Likewise.
12366 (reg-x86-64-linux.c): Likewise.
12368 (i386.c): Likewise.
12369 (i386-linux.o): Likewise.
12370 (i386-linux.c): Likewise.
12371 (amd64.o): Likewise.
12372 (amd64.c): Likewise.
12373 (amd64-linux.o): Likewise.
12374 (amd64-linux.c): Likewise.
12376 * configure.srv (srv_i386_regobj): New.
12377 (srv_i386_linux_regobj): Likewise.
12378 (srv_amd64_regobj): Likewise.
12379 (srv_amd64_linux_regobj): Likewise.
12380 (srv_i386_32bit_xmlfiles): Likewise.
12381 (srv_i386_64bit_xmlfiles): Likewise.
12382 (srv_i386_xmlfiles): Likewise.
12383 (srv_amd64_xmlfiles): Likewise.
12384 (srv_i386_linux_xmlfiles): Likewise.
12385 (srv_amd64_linux_xmlfiles): Likewise.
12386 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12387 srv_xmlfiles to $srv_i386_xmlfiles.
12388 (i[34567]86-*-mingw32ce*): Likewise.
12389 (i[34567]86-*-mingw*): Likewise.
12390 (i[34567]86-*-nto*): Likewise.
12391 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12392 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12393 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12394 (x86_64-*-linux*): Likewise.
12396 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12397 (init_registers_amd64_linux): New.
12398 (x86_arch_setup): Replace init_registers_x86_64_linux with
12399 init_registers_amd64_linux.
12401 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12403 * configure.ac: Check for libdl. If it is not available link against
12404 static libthread_db.
12405 * configure: Regenerate.
12407 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12411 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12412 handing a read watchpoint.
12413 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12415 2010-02-12 Doug Evans <dje@google.com>
12417 * linux-low.c (linux_supports_tracefork_flag): Document.
12418 (linux_look_up_symbols): Add comment.
12420 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12422 * regcache.c (supply_register): Clear regcache if buf is NULL.
12424 2010-02-02 Nicolas Roche <roche@sourceware.org>
12425 Joel Brobecker <brobecker@adacore.com>
12427 * inferiors.c (find_inferior): Add function documentation.
12428 (unloaded_dll): Handle the case where the unloaded dll has not
12429 been previously registered in the dll list.
12431 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12433 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12434 (thumb2_breakpoint): New.
12435 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12437 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12439 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12440 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12443 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12445 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12447 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12449 * linux-s390-low.c (s390_collect_ptrace_register)
12450 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12452 2010-01-21 Doug Evans <dje@google.com>
12454 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12455 (PTRACE_ARG4_TYPE): New macro.
12456 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12457 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12458 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12459 (usr_store_inferior_registers): Ditto.
12460 (linux_read_memory, linux_write_memory): Ditto.
12461 (linux_test_for_tracefork): Ditto.
12463 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12464 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12466 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12468 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12471 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12473 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12474 prototype to take a regcache. Adjust.
12476 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12478 * regcache.h (struct thread_info): Forward declare.
12479 (struct regcache): New.
12480 (new_register_cache): Adjust prototype.
12481 (get_thread_regcache): Declare.
12482 (free_register_cache): Adjust prototype.
12483 (registers_to_string, registers_from_string): Ditto.
12484 (supply_register, supply_register_by_name, collect_register)
12485 (collect_register_as_string, collect_register_by_name): Ditto.
12486 * regcache.c (struct inferior_regcache_data): Delete.
12487 (get_regcache): Rename to ...
12488 (get_thread_regcache): ... this. Adjust. Switch inferior before
12489 fetching registers.
12490 (regcache_invalidate_one): Adjust.
12491 (regcache_invalidate): Fix prototype.
12492 (new_register_cache): Return the new register cache.
12493 (free_register_cache): Change prototype.
12494 (realloc_register_cache): Adjust.
12495 (registers_to_string): Change prototype to take a regcache. Adjust.
12496 (registers_from_string): Ditto.
12497 (register_data): Ditto.
12498 (supply_register): Ditto.
12499 (supply_register_by_name): Ditto.
12500 (collect_register): Ditto.
12501 (collect_register_as_string): Ditto.
12502 (collect_register_by_name): Ditto.
12503 * server.c (process_serial_event): Adjust.
12504 * linux-low.h (regset_fill_func, regset_store_func): Change
12506 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12508 * linux-low.c (get_stop_pc): Adjust.
12509 (check_removed_breakpoint): Adjust.
12510 (linux_wait_for_event): Adjust.
12511 (linux_resume_one_lwp): Adjust.
12512 (fetch_register): Add regcache parameter. Adjust.
12513 (usr_store_inferior_registers): Ditto.
12514 (regsets_fetch_inferior_registers): Ditto.
12515 (regsets_store_inferior_registers): Ditto.
12516 (linux_fetch_registers, linux_store_registers): Ditto.
12517 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12519 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12521 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12522 prototype to take a regcache.
12523 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12524 * remote-utils.c (convert_ascii_to_int, outreg)
12525 (prepare_resume_reply): Change prototype to take a regcache.
12527 * target.h (struct target_ops) <fetch_registers, store_registers>:
12528 Change prototype to take a regcache.
12529 (fetch_inferior_registers, store_inferior_registers): Change
12530 prototype to take a regcache. Adjust.
12531 * proc-service.c (ps_lgetregs): Adjust.
12532 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12533 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12534 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12535 take a regcache. Adjust.
12536 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12537 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12538 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12539 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12540 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12541 (cris_cannot_fetch_register):
12542 (cris_breakpoint_at): Change prototype to take a regcache.
12544 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12545 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12546 to take a regcache. Adjust.
12547 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12549 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12550 take a regcache. Adjust.
12551 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12552 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12553 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12554 * linux-mips-low.c (mips_get_pc):
12555 (mips_set_pc): Change prototype to take a regcache. Adjust.
12556 (mips_reinsert_addr): Adjust.
12557 (mips_collect_register): Change prototype to take a regcache.
12559 (mips_supply_register):
12560 (mips_collect_register_32bit, mips_supply_register_32bit)
12561 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12562 (mips_store_fpregset): Ditto.
12563 * linux-ppc-low.c (ppc_supply_ptrace_register)
12564 (ppc_supply_ptrace_register): Ditto.
12565 (parse_spufs_run): Adjust.
12566 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12567 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12568 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12569 take a regcache. Adjust.
12570 * linux-s390-low.c (s390_collect_ptrace_register)
12571 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12572 (s390_set_pc): Change prototype to take a regcache. Adjust.
12573 (s390_arch_setup): Adjust.
12574 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12575 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12576 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12577 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12578 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12580 (sparc_breakpoint_at): Adjust.
12581 * linux-xtensa-low.c (xtensa_fill_gregset):
12582 (xtensa_store_gregset):
12583 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12584 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12585 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12586 prototype to take a regcache. Adjust.
12587 * win32-arm-low.c (arm_fetch_inferior_register)
12588 (arm_store_inferior_register): Change prototype to take a
12590 * win32-i386-low.c (i386_fetch_inferior_register)
12591 (i386_store_inferior_register): Change prototype to take a
12593 * win32-low.c (child_fetch_inferior_registers)
12594 (child_store_inferior_registers): Change prototype to take a
12596 (win32_wait): Adjust.
12597 (win32_fetch_inferior_registers): Change prototype to take a
12599 (win32_store_inferior_registers): Adjust.
12600 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12601 store_inferior_register>: Change prototype to take a regcache.
12603 2010-01-20 Doug Evans <dje@google.com>
12605 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12607 (linux_wait_for_event1, linux_init_signals): Ditto.
12608 (W_STOPCODE): Provide definition if missing.
12610 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12612 * linux-low.c (linux_core_of_thread): New.
12613 (compare_ints, show_process, list_threads): New.
12614 (linux_qxfer_osdata): Report threads and cores.
12615 (linux_target_op): Register linux_core_of_thread.
12616 * remote-utils.c (prepare_resume_reply): Report the core.
12617 (buffer_xml_printf): Support %d specifier.
12618 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12620 (handle_query): Handle qXfer:threads. Announce availability
12622 * target.h (struct target_ops): New field core_of_thread.
12624 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12626 * Makefile.in (clean): Remove new generated files.
12627 (reg-s390.o, reg-s390.c): Remove rules.
12628 (reg-s390x.o, reg-s390x.c): Likewise.
12629 (s390-linux32.o, s390-linux32.c): Add rules.
12630 (s390-linux64.o, s390-linux64.c): Likewise.
12631 (s390x-linux64.o, s390x-linux64.c): Likewise.
12632 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12633 * linux-s390-low.c: Include <elf.h>.
12634 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12635 (init_registers_s390): Remove prototype.
12636 (init_registers_s390x): Likewise.
12637 (init_registers_s390_linux32): Add prototype.
12638 (init_registers_s390_linux64): Likewise.
12639 (init_registers_s390x_linux64): Likewise.
12640 (s390_num_regs_3264): New define.
12641 (s390_regmap_3264): New global variable.
12642 (s390_cannot_fetch_register): Remove obsolete check.
12643 (s390_cannot_store_register): Likewise.
12644 (s390_collect_ptrace_register): Handle upper/lower register halves.
12645 (s390_supply_ptrace_register): Likewise.
12646 (s390_fill_gregset): Update to register number changes.
12647 (s390_get_hwcap): New routine.
12648 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12649 Install appropriate regmap and register set.
12651 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12653 * server.c (gdbserver_version): Update copyright year to 2010.
12654 * gdbreplay.c (gdbreplay_version): Likewise.
12656 2009-12-28 Doug Evans <dje@google.com>
12658 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12659 elf/external.h. Include <elf.h> instead but only if necessary.
12661 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12663 * linux-low.c (linux_remove_process): Remove `detaching'
12664 parameter. Don't release/detach from thread_db here.
12665 (linux_kill): Release/detach from thread_db here, ...
12666 (linux_detach): ... and here, before actually detaching.
12667 (linux_wait_1): ... and here, when a process exits.
12668 * thread-db.c (any_thread_of): New.
12669 (thread_db_free): Switch the current inferior to a thread of the
12672 2009-12-21 Doug Evans <dje@google.com>
12674 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12676 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12677 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12678 warning ifndef __NR_tkill. Move setting of errno there too.
12679 Delete unnecessary resetting of errno after syscall.
12680 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12682 * configure.ac: Check for dladdr.
12683 * config.in: Regenerate.
12684 * configure: Regenerate.
12685 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12686 (try_thread_db_load): Update.
12688 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12690 2009-12-18 Doug Evans <dje@google.com>
12692 * event-loop.c: Include unistd.h if it exists.
12694 * linux-low.c (my_waitpid): Move definition away from being in
12695 between linux_tracefork_child/linux_test_for_tracefork.
12697 * gdb_proc_service.h (psaddr_t): Fix type.
12698 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12699 signature to match glibc.
12701 2009-12-16 Doug Evans <dje@google.com>
12703 * linux-low.c (linux_read_memory): Fix argument to read.
12705 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12707 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12708 events, don't leave current_inferior pointing at null.
12710 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12712 * win32-low.c (LOG): Delete.
12713 (OUTMSG): Output to stderr.
12714 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12715 on compile time LOG macro.
12716 (win32_wait): Fix debug output.
12718 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12720 * win32-low.c (win32_add_one_solib): If the dll name is
12721 "ntdll.dll", prepend the system directory to the dll path.
12723 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12725 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12727 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12728 Vladimir Prus <vladimir@codesourcery.com>
12730 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12731 * configure.ac: Check for __mcoldfire__ and set
12732 gdb_cv_m68k_is_coldfire.
12733 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12734 reg-cf.o and reg-m68k.o.
12735 * configure: Regenerated.
12737 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12739 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12740 Pass it to thread_db_free.
12741 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12742 proper `detaching' argument to linux_remove_process.
12743 * linux-low.h (thread_db_free): Add `detaching' parameter.
12744 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12746 (thread_db_free): Add `detaching' parameter. Only
12747 call td_ta_clear_event if detaching from process.
12749 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12751 * thread-db.c (thread_db_free): Fix typo.
12753 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12756 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12758 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12760 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12761 with an i686 compiler.
12762 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12764 * configure: Rebuilt.
12766 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12770 * server.c (handle_search_memory_1): Correct read_addr initialization
12771 in loop for searching subsequent chunks.
12773 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12775 * configure.ac: New --with-libthread-db option.
12776 * thread-db.c: Allow direct dependence on libthread_db.
12777 (thread_db_free): Adjust.
12778 * config.in: Regenerate.
12779 * configure: Likewise.
12781 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12784 * thread-db.c (attach_thread): New function.
12785 (maybe_attach_thread): Return success/failure.
12786 (find_new_threads_callback): Adjust.
12787 (thread_db_find_new_threads): Loop until no new threads.
12789 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12791 * proc-service.c (ps_lgetregs): Formatting.
12793 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12795 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12796 * configure.ac: Adjust.
12797 * linux-low.h (struct process_info_private): Move members to struct
12799 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12800 * linux-low.c (linux_remove_process): Adjust.
12801 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12802 * server.c (handle_query): Move code ...
12803 (handle_monitor_command): ... here. New function.
12804 * target.h (struct target_ops): New member.
12805 * thread-db.c (struct thread_db): New.
12806 (libthread_db_search_path): New variable.
12807 (thread_db_create_event, thread_db_enable_reporting)
12808 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12809 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12810 (try_thread_db_load_1, dladdr_to_soname): New functions.
12811 (try_thread_db_load, thread_db_load_search): New functions.
12812 (thread_db_init): Search for libthread_db.
12813 (thread_db_free): New function.
12814 (thread_db_handle_monitor_command): Likewise.
12815 * config.in: Regenerate.
12816 * configure: Regenerate.
12818 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12820 * spu-low.c (spu_kill): Wait for inferior to terminate.
12821 Call clear_inferiors.
12822 (spu_detach): Call clear_inferiors.
12824 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12826 * aclocal.m4: Regenerate.
12827 * config.in: Likewise.
12828 * configure: Likewise.
12830 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12832 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12833 (parse_spufs_run): New function.
12834 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12835 (ppc_breakpoint_at): Handle SPU breakpoints.
12837 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12839 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12840 (SPUFS_MAGIC): Define.
12841 (spu_enumerate_spu_ids): New function.
12842 (linux_qxfer_spu): New function.
12843 (linux_target_ops): Install linux_qxfer_spu.
12845 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12847 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12848 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12849 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12850 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12851 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12852 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12853 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12854 (init_registers_powerpc_cell32l): Add prototype.
12855 (init_registers_powerpc_cell64l): Likewise.
12856 (ppc_arch_setup): Detect Cell/B.E. architecture.
12858 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12860 * Makefile.in (datarootdir): New variable.
12862 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12864 * linux-low.c (linux_write_memory): Update debugging output.
12865 * Makefile.in (clean): Add new descriptions.
12866 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12867 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12868 * configure.srv: Add new files for arm*-*-linux*.
12869 * linux-arm-low.c: Add new declarations.
12870 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12871 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12872 (HWCAP_VFPv3D16): New.
12873 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12874 instead of __IWMMXT__.
12875 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12876 (arm_arch_setup): New.
12877 (target_regsets): Remove #ifdef. Add VFP regset.
12878 (the_low_target): Use arm_arch_setup.
12880 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12882 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12883 the main thread again.
12885 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12887 Adding Neutrino gdbserver.
12888 * configure: Regenerated.
12889 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12890 * configure.srv (i[34567]86-*-nto*): New target.
12891 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12892 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12893 (nto_comctrl) [__QNX__]: New function.
12894 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12896 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12898 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12901 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12902 Pedro Alves <pedro@codesourcery.com>
12904 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12905 don't support CONTEXT_EXTENDED_REGISTERS.
12906 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12907 (the_low_target): Install them.
12908 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12909 failing with ERROR_PIPE_NOT_CONNECTED.
12911 2009-06-30 Doug Evans <dje@google.com>
12912 Pierre Muller <muller@ics.u-strasbg.fr>
12914 Add h/w watchpoint support to x86-linux, win32-i386.
12915 * Makefile.in (SFILES): Add i386-low.c
12916 (i386_low_h): Define.
12917 (i386-low.o): Add dependencies.
12918 (linux-x86-low.o): Add i386-low.h dependency.
12919 (win32-i386-low.o): Ditto.
12920 * i386-low.c: New file.
12921 * i386-low.h: New file.
12922 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12923 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12924 * linux-low.c (linux_add_process): Initialize arch_private.
12925 (linux_remove_process): Free arch_private.
12926 (add_lwp): Initialize arch_private.
12927 (delete_lwp): Free arch_private.
12928 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12930 * linux-low.h (process_info_private): New member arch_private.
12931 (lwp_info): New member arch_private.
12932 (linux_target_ops): New members new_process, new_thread,
12934 (ptid_of): New macro.
12935 * linux-x86-low.c: Include stddef.h, i386-low.h.
12936 (arch_process_info): New struct.
12937 (arch_lwp_info): New struct.
12938 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12939 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12940 (i386_dr_low_get_status): New function.
12941 (x86_insert_point, x86_remove_point): New functions.
12942 (x86_stopped_by_watchpoint): New function.
12943 (x86_stopped_data_address): New function.
12944 (x86_linux_new_process, x86_linux_new_thread): New functions.
12945 (x86_linux_prepare_to_resume): New function.
12946 (the_low_target): Add entries for insert_point, remove_point,
12947 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12949 * server.c (debug_hw_points): New global.
12950 (monitor_show_help): Document set debug-hw-points.
12951 (handle_query): Process "set debug-hw-points".
12952 * server.h (debug_hw_points): Declare.
12953 (paddress): Declare.
12954 * utils.c (NUMCELLS, CELLSIZE): New macros.
12955 (get_sell, xsnprintf, paddress): New functions.
12956 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12957 remove_point, stopped_by_watchpoint, stopped_data_address.
12958 * win32-i386-low.c: Include i386-low.h.
12959 (debug_reg_state): Replaces dr.
12960 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12961 (i386_dr_low_get_status): New function.
12962 (i386_insert_point, i386_remove_point): New functions.
12963 (i386_stopped_by_watchpoint): New function.
12964 (i386_stopped_data_address): New function.
12965 (i386_initial_stuff): Update.
12966 (get_thread_context,set_thread_context,i386_thread_added): Update.
12967 (the_low_target): Add entries for insert_point,
12968 remove_point, stopped_by_watchpoint, stopped_data_address.
12969 * win32-low.c (win32_insert_watchpoint): New function.
12970 (win32_remove_watchpoint): New function.
12971 (win32_stopped_by_watchpoint): New function.
12972 (win32_stopped_data_address): New function.
12973 (win32_target_ops): Add entries for insert_watchpoint,
12974 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12975 * win32-low.h (win32_target_ops): New members insert_point,
12976 remove_point, stopped_by_watchpoint, stopped_data_address.
12978 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12980 * server.c (process_serial_event): Re-return unsupported, not
12981 error, if the type isn't recognized. Re-allow supporting only
12982 insert or remove packets. Also call require_running for
12983 breakpoints. Add missing break statement to default case. Tidy.
12984 * target.h (struct target_ops): Rename insert_watchpoint to
12985 insert_point, and remove_watchpoint to remove_point.
12987 * linux-low.h (struct linux_target_ops): Likewise.
12988 * linux-low.c (linux_insert_watchpoint): Rename to ...
12989 (linux_insert_point): ... this. Adjust.
12990 (linux_remove_watchpoint): Rename to ...
12991 (linux_remove_point): ... this. Adjust.
12992 (linux_target_ops): Adjust.
12993 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12994 (cris_insert_point): ... this.
12995 (cris_remove_watchpoint): Rename to ...
12996 (cris_remove_point): ... this.
12997 (the_low_target): Adjust.
12999 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13001 * server.c (handle_v_kill): Pass signal_pid to
13002 kill_inferior if multi_process is zero.
13004 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13006 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13007 * target.h (target_ops): Comment for *_watchpoint to make it clear
13008 the functions can get types '0' and '1'.
13010 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13012 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13013 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13014 * regcache.c (get_regcache): Likewise.
13015 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13016 * win32-low.c (child_fetch_inferior_registers): Remove check for
13019 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13020 Pedro Alves <pedro@codesourcery.com>
13022 * target.h (struct target_ops) <supports_multi_process>: New
13024 (target_supports_multi_process): New.
13025 * server.c (handle_query): Even if GDB reports support, only
13026 enable multi-process if the target also supports it. Report
13027 multi-process support only if the target backend supports it.
13028 * linux-low.c (linux_supports_multi_process): New function.
13029 (linux_target_ops): Install it as target_supports_multi_process
13032 2009-05-24 Doug Evans <dje@google.com>
13034 Global renaming of find_thread_pid to find_thread_ptid.
13035 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13036 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13037 All callers updated.
13039 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13040 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13043 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13044 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13045 (linux_resume_one_lwp): Ditto.
13047 2009-05-23 Doug Evans <dje@google.com>
13049 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13050 from struct inferior_list_entry * to struct lwp_info *.
13051 All callers updated.
13053 2009-05-13 Doug Evans <dje@google.com>
13055 * linux-x86-low.c: Don't include assert.h.
13056 (x86_siginfo_fixup): Use fatal, not assert.
13057 (x86_arch_setup): Fix comment.
13059 2009-05-12 Doug Evans <dje@google.com>
13061 Biarch support for i386/amd64 gdbserver.
13062 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13063 Add linux-x86-low.c.
13064 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13065 (linux-x86-low.o): Add.
13066 * linux-x86-64-low.c: Delete.
13067 * linux-i386-low.c: Delete.
13068 * linux-x86-low.c: New file.
13069 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13071 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13073 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13074 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13075 (linux_child_pid_to_exec_file): New function.
13076 (elf_64_header_p, elf_64_file_p): New functions.
13077 (siginfo_fixup): New function.
13078 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13079 give target a chance to convert layout.
13080 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13081 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13083 2009-05-07 Doug Evans <dje@google.com>
13085 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13086 (regsets_store_inferior_registers): Ditto.
13088 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13092 * linux-low.c (must_set_ptrace_flags): Delete.
13093 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13095 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13096 `lwp->must_set_ptrace_flags' instead.
13097 (linux_wait_for_event_1): Set ptrace options here.
13098 (linux_wait_1): ... not here.
13100 2009-04-30 Doug Evans <dje@google.com>
13102 * inferiors.c (started_inferior_callback): New function.
13103 (attached_inferior_callback): New function.
13104 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13105 * server.c (print_started_pid, print_attached_pid): New functions.
13106 (detach_or_kill_for_exit): New function.
13107 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13108 * server.h (have_started_inferiors_p): Declare.
13109 (have_attached_inferiors_p): Declare.
13111 * inferiors.c (remove_process): Fix memory leak, free process.
13112 * linux-low.c (linux_remove_process): New function.
13113 (linux_kill): Call it instead of remove_process.
13114 (linux_detach, linux_wait_1): Ditto.
13116 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13118 * configure.srv: Add x86 Windows CE target.
13120 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13122 * inferiors.c (get_thread_process): Make global.
13123 * server.h (get_thread_process): Add prototype.
13124 * thread-db.c (find_one_thread): Use get_thread_process
13125 instead of current_process.
13126 (thread_db_get_tls_address): Do not crash if called when
13127 thread layer is not yet initialized.
13129 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13131 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13132 * spu-low.c (current_tid): Rename to ...
13133 (current_ptid): ... this.
13134 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13135 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13136 ptid_get_lwp (current_ptid) instead of current_tid.
13137 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13138 instead of current_tid. Use find_process_pid to verify pid
13139 argument is valid. Pass proper argument to remove_process.
13140 (spu_thread_alive): Compare current_ptid instead of current_tid.
13141 (spu_resume): Likewise.
13143 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13145 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13148 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13150 Implement the multiprocess extensions, and add linux multiprocess
13153 * server.h (ULONGEST): Declare.
13154 (struct ptid, ptid_t): New.
13155 (minus_one_ptid, null_ptid): Declare.
13156 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13157 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13158 (struct inferior_list_entry): Change `id' type from unsigned from
13160 (struct sym_cache, struct breakpoint, struct
13161 process_info_private): Forward declare.
13162 (struct process_info): Declare.
13163 (current_process): Declare.
13164 (all_processes): Declare.
13165 (initialize_inferiors): Declare.
13166 (add_thread): Adjust to use ptid_t.
13167 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13168 (add_process, remove_process, find_thread_pid): Declare.
13169 (find_inferior_id): Adjust to use ptid_t.
13170 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13171 (multi_process): Declare.
13172 (push_event): Adjust to use ptid_t.
13173 (read_ptid, write_ptid): Declare.
13174 (prepare_resume_reply): Adjust to use ptid_t.
13175 (clear_symbol_cache): Declare.
13176 * inferiors.c (all_processes): New.
13177 (null_ptid, minus_one_ptid): New.
13178 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13179 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13180 (add_thread): Change unsigned long to ptid. Remove gdb_id
13182 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13183 (gdb_id_to_thread): Rename to ...
13184 (find_thread_pid): ... this. Change unsigned long to ptid.
13185 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13186 (loaded_dll, pull_pid_from_list): Adjust.
13187 (add_process, remove_process, find_process_pid)
13188 (get_thread_process, current_process, initialize_inferiors): New.
13189 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13190 (struct target_waitstatus) <related_pid>: Ditto.
13191 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13192 return type to int.
13193 (struct target_ops) <join>: Add `pid' argument.
13194 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13195 (struct target_ops) <wait>: Add `ptid' field. Change return type
13197 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13198 (mywait): Add `ptid' argument. Change return type to ptid_t.
13199 (target_pid_to_str): Declare.
13200 * target.c (set_desired_inferior): Adjust to use ptids.
13201 (mywait): Add new `ptid' argument. Adjust.
13202 (target_pid_to_str): New.
13203 * mem-break.h (free_all_breakpoints): Declare.
13204 * mem-break.c (breakpoints): Delelete.
13205 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13206 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13207 to use per-process breakpoint list.
13208 (free_all_breakpoints): New.
13209 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13210 (symbol_cache, all_symbols_looked_up): Delete.
13212 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13214 (prepare_resume_reply): Change ptid argument's type from unsigned
13215 long to ptid_t. Adjust. Implement W;process and X;process.
13216 (free_sym_cache, clear_symbol_cache): New.
13217 (look_up_one_symbol): Adjust to per-process symbol cache. *
13218 * server.c (cont_thread, general_thread, step_thread): Change type
13220 (attached): Delete.
13221 (multi_process): New.
13222 (last_ptid): Change type to ptid_t.
13223 (struct vstop_notif) <ptid>: Change type to ptid_t.
13224 (queue_stop_reply, push_event): Change `ptid' argument's type to
13226 (discard_queued_stop_replies): Add `pid' argument.
13227 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13228 changes. Don't reference the `attached' global.
13229 (attach_inferior): Adjust to mywait interface changes.
13230 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13231 features. Handle and report "multiprocess+". Handle
13233 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13235 (handle_v_kill): New.
13236 (handle_v_stopped): Adjust to use target_pid_to_str.
13237 (handle_v_requests): Allow multiple attaches and runs when
13238 multiprocess extensions are in effect. Handle "vKill".
13239 (myresume): Adjust to use ptids.
13240 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13241 (handle_status): Adjust to discard_queued_stop_replies interface
13243 (first_thread_of, kill_inferior_callback)
13244 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13245 (main): Call initialize_inferiors. Adjust to use ptids, killing
13246 and detaching from all inferiors. Handle multiprocess packet
13248 * linux-low.h: Include gdb_proc_service.h.
13249 (struct process_info_private): New.
13250 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13251 <lwpid_of>: Use ptid_get_lwp.
13252 (get_lwp_thread): Adjust.
13253 (struct lwp_info): Add `dead' member.
13254 (find_lwp_pid): Declare.
13255 * linux-low.c (thread_db_active): Delete.
13256 (new_inferior): Adjust comment.
13257 (inferior_pid): Delete.
13258 (linux_add_process): New.
13259 (handle_extended_wait): Adjust.
13260 (add_lwp): Change unsigned long to ptid.
13261 (linux_create_inferior): Add process to processes table. Adjust
13262 to use ptids. Don't set new_inferior here.
13263 (linux_attach_lwp): Rename to ...
13264 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13265 it. Adjust to use ptids.
13266 (linux_attach_lwp): New.
13267 (linux_attach): Add process to processes table. Don't set
13269 (struct counter): New.
13270 (second_thread_of_pid_p, last_thread_of_process_p): New.
13271 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13272 multiple processes.
13273 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13274 processes. Remove process from process table.
13275 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13276 to multiple processes.
13277 (any_thread_of): New.
13278 (linux_detach): Add `pid' argument, and handle it. Remove process
13279 from processes table.
13280 (linux_join): Add `pid' argument. Handle it.
13281 (linux_thread_alive): Change unsighed long argument to ptid_t.
13282 Consider dead lwps as not being alive.
13283 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13284 threads we're not interested in.
13285 (same_lwp, find_lwp_pid): New.
13286 (linux_wait_for_lwp): Change `pid' argument's type from int to
13288 (linux_wait_for_event): Rename to ...
13289 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13290 from int to ptid_t. Adjust.
13291 (linux_wait_for_event): New.
13292 (linux_wait_1): Add `ptid' argument. Change return type to
13293 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13294 that exit from the process table.
13295 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13297 (mark_lwp_dead): New.
13298 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13299 stopping all threads, mark its main lwp as dead.
13300 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13302 (fetch_register, usr_store_inferior_registers)
13303 (regsets_fetch_inferior_registers)
13304 (regsets_store_inferior_registers, linux_read_memory)
13305 (linux_write_memory): Inline `inferior_pid'.
13306 (linux_look_up_symbols): Adjust to use per-process
13307 `thread_db_active'.
13308 (linux_request_interrupt): Adjust to use ptids.
13309 (linux_read_auxv): Inline `inferior_pid'.
13310 (initialize_low): Don't reference thread_db_active.
13311 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13312 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13313 (ps_getpid): Return the pid of the current inferior.
13314 * thread-db.c (proc_handle, thread_agent): Delete.
13315 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13317 (find_one_thread): Change argument type to ptid_t. Adjust to
13319 (maybe_attach_thread): Adjust to per-process data and ptids.
13320 (thread_db_find_new_threads): Ditto.
13321 (thread_db_init): Ditto.
13322 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13323 processes table. Adjust to use ptids.
13324 (spu_kill, spu_detach): Adjust interface. Remove process from
13326 (spu_join, spu_thread_alive): Adjust interface.
13327 (spu_wait): Adjust interface. Remove process from processes
13328 table. Adjust to use ptids.
13329 * win32-low.c (current_inferior_tid): Delete.
13330 (current_inferior_ptid): New.
13331 (debug_event_ptid): New.
13332 (thread_rec): Take a ptid. Adjust.
13333 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13334 (child_delete_thread): Ditto.
13335 (do_initial_child_stuff): Add `attached' argument. Add process to
13337 (child_fetch_inferior_registers, child_store_inferior_registers):
13339 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13340 (win32_attach): Pass 1 to do_initial_child_stuff.
13341 (win32_kill): Adjust interface. Remove process from processes
13343 (win32_detach): Ditto.
13344 (win32_join): Adjust interface.
13345 (win32_thread_alive): Take a ptid.
13346 (win32_resume): Adjust to use ptids.
13347 (get_child_debug_event): Ditto.
13348 (win32_wait): Adjust interface. Remove exiting process from
13351 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13353 Non-stop mode support.
13355 * server.h (non_stop): Declare.
13356 (gdb_client_data, handler_func): Declare.
13357 (delete_file_handler, add_file_handler, start_event_loop):
13359 (handle_serial_event, handle_target_event, push_event)
13360 (putpkt_notif): Declare.
13361 * target.h (enum resume_kind): New.
13362 (struct thread_resume): Replace `step' field by `kind' field.
13363 (TARGET_WNOHANG): Define.
13364 (struct target_ops) <wait>: Add `options' argument.
13365 <supports_non_stop, async, start_non_stop>: New fields.
13366 (target_supports_non_stop, target_async): New.
13367 (start_non_stop): Declare.
13368 (mywait): Add `options' argument.
13369 * target.c (mywait): Add `options' argument. Print child exit
13370 notifications here.
13371 (start_non_stop): New.
13372 * server.c (non_stop, own_buf, mem_buf): New globals.
13373 (struct vstop_notif): New.
13374 (notif_queue): New global.
13375 (queue_stop_reply, push_event, discard_queued_stop_replies)
13376 (send_next_stop_reply): New.
13377 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13379 (attach_inferior): In non-stop mode, don't wait for the target
13381 (handle_general_set): Handle QNonStop.
13382 (handle_query): When handling qC, return the current general
13383 thread, instead of the first thread of the list.
13384 (handle_query): If the backend supports non-stop mode, include
13385 QNonStop+ in the qSupported query response.
13386 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13388 (handle_v_attach, handle_v_run): Handle non-stop mode.
13389 (handle_v_stopped): New.
13390 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13391 (myresume): Adjust to use resume_kind. Handle non-stop.
13392 (queue_stop_reply_callback): New.
13393 (handle_status): Handle non-stop mode.
13394 (main): Clear non_stop flag on reconnection. Use the event-loop.
13395 Refactor serial protocol handling from here ...
13396 (process_serial_event): ... to this new function. When GDB
13397 selects any thread, select one here. In non-stop mode, wait until
13398 GDB acks all pending events before exiting.
13399 (handle_serial_event, handle_target_event): New.
13400 * remote-utils.c (remote_open): Install remote_desc in the event
13402 (remote_close): Remove remote_desc from the event loop.
13403 (putpkt_binary): Rename to...
13404 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13405 (putpkt_binary): New as wrapper around putpkt_binary_1.
13406 (putpkt_notif): New.
13407 (prepare_resume_reply): In non-stop mode, don't change the
13409 * event-loop.c: New.
13410 * Makefile.in (OBJ): Add event-loop.o.
13411 (event-loop.o): New rule.
13413 * linux-low.h (pid_of): Moved here.
13415 (get_lwp_thread): Use lwpid_of.
13416 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13417 * linux-low.c (pid_of): Delete.
13418 (inferior_pid): Use lwpid_of.
13419 (linux_event_pipe): New.
13420 (target_is_async_p): New.
13422 (handle_extended_wait): Use lwpid_of.
13423 (add_lwp): Don't set lwpid field.
13424 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13425 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13426 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13427 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13428 first. Adjust to linux_wait_for_event interface changes. Use
13430 (linux_detach): Don't delete the main lwp here.
13431 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13432 (status_pending_p): Don't consider explicitly suspended lwps.
13433 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13434 pointer. Add OPTIONS argument. Change return type to int. Use
13435 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13436 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13437 pointer. Add status pointer argument. Return a pid instead of a
13438 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13439 changes. In non-stop mode, don't switch to a random thread.
13440 (linux_wait): Rename to...
13441 (linux_wait_1): ... this. Add target_options argument, and handle
13442 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13443 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13444 clean exit and signal exit code. Don't stop all threads in
13445 non-stop mode. In all-stop mode, only stop all threads when
13446 reporting a stop to GDB. Handle explicit thread stop requests.
13447 (async_file_flush, async_file_mark): New.
13449 (send_sigstop): Use lwpid_of.
13450 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13451 interface changes. In non-stop mode, don't switch to a random
13453 (linux_resume_one_lwp): Use lwpid_of.
13454 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13455 (linux_resume_one_thread): ... this. Handle resume_stop. In
13456 non-stop mode, don't look for pending flag in all threads.
13457 (resume_status_pending_p): Don't consider explicitly suspended
13459 (my_waitpid): Reimplement. Emulate __WALL.
13460 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13462 (sigchld_handler, linux_supports_non_stop, linux_async)
13463 (linux_start_non_stop): New.
13464 (linux_target_ops): Register linux_supports_non_stop, linux_async
13465 and linux_start_non_stop.
13466 (initialize_low): Install SIGCHLD handler.
13467 * thread-db.c (thread_db_create_event, find_one_thread)
13468 (thread_db_get_tls_address): Use lwpid_of.
13469 * win32-low.c (win32_detach): Adjust to use resume_kind.
13470 (win32_wait): Add `options' argument.
13471 * spu-low.c (spu_resume): Adjust to use resume_kind.
13472 (spu_wait): Add `options' argument.
13474 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13476 Decouple target code from remote protocol.
13478 * target.h (enum target_waitkind): New.
13479 (struct target_waitstatus): New.
13480 (struct target_ops) <wait>: Return an unsigned long. Take a
13481 target_waitstatus pointer instead of a char pointer.
13482 (mywait): Likewise.
13483 * target.c (mywait): Change prototype to return an unsigned long.
13484 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13485 * server.h (thread_from_wait, old_thread_from_wait): Delete
13487 (prepare_resume_reply): Change prototype to take a
13489 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13490 (last_status, last_ptid): New.
13491 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13492 pid instead of a signal.
13493 (attach_inferior): Remove "status" and "signal" parameters.
13495 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13497 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13498 (handle_v_requests, myresume): Remove "status" and "signal"
13499 parameters. Adjust.
13500 (handle_status): New.
13501 (main): Delete local `status'. Adjust.
13502 * remote-utils.c: Include target.h.
13503 (prepare_resume_reply): Change prototype to take a
13504 target_waitstatus. Adjust.
13506 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13508 * spu-low.c (spu_wait): Adjust.
13509 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13511 (win32_wait): Adjust.
13513 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13515 * target.h (struct thread_resume): Delete leave_stopped member.
13516 (struct target_ops): Add a `n' argument to the `resume' callback.
13517 * server.c (start_inferior): Adjust.
13518 (handle_v_cont, myresume): Adjust.
13519 * linux-low.c (check_removed_breakpoint): Adjust to resume
13520 interface change, and to removed leave_stopped field.
13521 (resume_ptr): Delete.
13522 (struct thread_resume_array): New.
13523 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13524 resume interface change.
13525 (linux_continue_one_thread, linux_queue_one_thread)
13526 (resume_status_pending_p): Check if the resume field is NULL
13527 instead of checking the leave_stopped member.
13528 (linux_resume): Adjust to the target resume interface change.
13529 * spu-low.c (spu_resume): Adjust to the target resume interface
13531 * win32-low.c (win32_detach, win32_resume): Ditto.
13533 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13535 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13537 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13539 (linux_continue_one_thread): Only preserve the stepping flag if
13540 there's a pending breakpoint.
13542 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13544 * server.c (main): After the inferior having exited, call
13545 remote_close before exiting gdbserver.
13547 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13549 Fix size of FPSCR in Power 7 processors.
13550 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13551 (PPC_FEATURE_HAS_DFP): New #define.
13552 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13555 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13557 * server.c (handle_query) Whitespace and formatting.
13559 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13561 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13562 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13563 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13564 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13565 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13566 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13567 Makefile.in, configure.ac: Fix whitespace throughout.
13568 * configure: Regenerate.
13570 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13572 * inferiors.c (find_inferior): Make it safe for the callback
13573 function to delete the currently iterated inferior.
13575 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13577 * Makefile.in (linuw_low_h): Move higher.
13578 (thread-db.o): Depend on $(linux_low_h).
13580 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13582 Rename "process" to "lwp" throughout.
13584 * linux-low.c (all_processes): Rename to...
13585 (all_lwps): ... this.
13586 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13587 (add_process): Rename to ...
13588 (add_lwp): ... this. Adjust.
13589 (linux_create_inferior): Adjust.
13590 (linux_attach_lwp): Adjust.
13591 (linux_attach): Adjust.
13592 (linux_kill_one_process): Rename to ...
13593 (linux_kill_one_lwp): ... this. Adjust.
13594 (linux_kill): Adjust.
13595 (linux_detach_one_process): Rename to ...
13596 (linux_detach_one_lwp): ... this. Adjust.
13597 (linux_detach): Adjust.
13598 (check_removed_breakpoint): Adjust.
13599 (status_pending_p): Adjust.
13600 (linux_wait_for_process): Rename to ...
13601 (linux_wait_for_lwp): ... this. Adjust.
13602 (linux_wait_for_event): Adjust.
13603 (send_sigstop): Adjust.
13604 (wait_for_sigstop): Adjust.
13605 (stop_all_processes): Rename to ...
13606 (stop_all_lwps): ... this.
13607 (linux_resume_one_process): Rename to ...
13608 (linux_resume_one_lwp): ... this. Adjust.
13609 (linux_set_resume_request, linux_continue_one_thread)
13610 (linux_queue_one_thread, resume_status_pending_p)
13611 (usr_store_inferior_registers, regsets_store_inferior_registers)
13612 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13614 * linux-low.h (get_process): Rename to ...
13615 (get_lwp): ... this. Adjust.
13616 (get_thread_process): Rename to ...
13617 (get_thread_lwp): ... this. Adjust.
13618 (get_process_thread): Rename to ...
13619 (get_lwp_thread): ... this. Adjust.
13620 (struct process_info): Rename to ...
13621 (struct lwp_info): ... this.
13622 (all_processes): Rename to ...
13623 (all_lwps): ... this.
13624 * proc-service.c (ps_lgetregs): Adjust.
13625 * thread-db.c (thread_db_create_event, find_one_thread)
13626 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13628 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13630 * server.c (handle_query): Handle "qAttached".
13632 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13634 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13635 GPLv3, update license URL.
13637 2009-03-01 Doug Evans <dje@google.com>
13639 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13640 (server_h): Add gdb_signals.h.
13641 (signals.o): Update.
13642 * server.h (target_signal_from_host,target_signal_to_host_p)
13643 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13645 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13647 * remote-utils.c (getpkt): Also generate remote-debug
13648 information if noack_mode is set.
13650 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13652 * server.c (handle_query): Report qXfer:siginfo:read and
13653 qXfer:siginfo:write as supported and handle them.
13654 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13655 * linux-low.c (linux_xfer_siginfo): New.
13656 (linux_target_ops): Set it.
13658 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13660 * server.c (gdbserver_usage): Mention --remote-debug.
13661 (main): Accept '--remote-debug' switch.
13663 2009-01-18 Doug Evans <dje@google.com>
13665 * regcache.c (new_register_cache): No need to check result of xcalloc.
13666 * server.c (handle_search_memory): Back out calls to xmalloc,
13667 result is checked and error is returned to user upon failure.
13668 (handle_query): Ditto. Add more checks for result of malloc.
13669 (handle_v_cont): Check result of malloc, report error back to
13671 (handle_v_run): Ditto. Call freeargv.
13672 * server.h (freeargv): Declare.
13673 * utils.c (freeargv): New fn.
13675 2009-01-15 Doug Evans <dje@google.com>
13677 * gdbreplay.c (perror_with_name): Make arg const char *.
13678 * server.h (target_signal_to_name): Make return type const char *.
13679 * thread-db.c (thread_db_err_str): Make return type const char *.
13680 * utils.c (perror_with_name): Make arg const char *.
13682 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13684 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13685 when handling a EXIT_PROCESS_DEBUG_EVENT.
13687 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13689 * gdbreplay.c (gdbreplay_version): Update copyright year.
13690 * server.c (gdbserver_version): Likewise.
13692 2009-01-05 Doug Evans <dje@google.com>
13694 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13695 (handle_extended_wait): Improve comment.
13697 2008-12-13 Doug Evans <dje@google.com>
13699 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13700 * server.h (ATTR_MALLOC): New macro.
13701 (xmalloc,xcalloc,xstrdup): Declare.
13702 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13703 * inferiors.c: Ditto.
13704 * linux-low.c: Ditto.
13705 * mem-break.c: Ditto.
13706 * regcache.c: Ditto.
13707 * remote-utils.c: Ditto.
13710 * win32-low.c: Ditto.
13712 2008-12-12 Doug Evans <dje@google.com>
13714 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13715 in debugging printf.
13717 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13719 2008-12-09 Doug Evans <dje@google.com>
13721 * linux-low.h (struct process_info): Delete member tid, unused.
13722 * thread-db.c (find_one_thread): Update.
13723 (maybe_attach_thread): Update.
13725 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13727 * target.h (struct target_ops): Add qxfer_osdata member.
13728 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13730 (linux_qxfer_osdata): New functions.
13731 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13733 * server.c (handle_query): Handle "qXfer:osdata:read:".
13734 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13735 (buffer_xml_printf): New functions.
13736 * server.h (struct buffer): New.
13737 (buffer_grow_str, buffer_grow_str0): New macros.
13738 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13739 (buffer_xml_printf): Declare.
13741 2008-11-24 Doug Evans <dje@google.com>
13743 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13745 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13747 * server.c (handle_v_run): Always use the supplied argument list.
13749 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13751 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13752 (xtensa_regmap_table): Add entry for scompare1.
13754 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13756 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13757 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13758 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13759 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13760 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13761 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13762 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13763 XML target descriptions.
13764 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13765 when inferior is running on an ISA 2.05 or later processor. Add
13766 special case to return offset for full 64-bit slot of FPSCR when
13769 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13771 * Makefile.in (SFILES, clean): Added sparc64 files.
13772 (reg-sparc64.o, reg-sparc64.c): New.
13773 * configure.srv (sparc*-*-linux*): New configuration.
13774 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13775 syscall arguments for SPARC.
13776 (regsets_store_inferior_registers): Likewise.
13777 * linux-sparc-low.c: New file.
13779 2008-10-21 Doug Evans <dje@google.com>
13781 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13782 (READLINE_DIR,READLINE_DEP): Delete.
13783 (INTERNAL_CFLAGS): Update.
13784 (LINTFLAGS): Update.
13786 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13788 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13789 whole argv from the last run, not just argv[0].
13791 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13793 * regcache.c (new_register_cache): Return NULL if the register
13794 cache size isn't known yet.
13795 (free_register_cache): Avoid dereferencing a NULL regcache.
13797 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13799 * configure.srv: Merge MIPS and MIPS64.
13801 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13803 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13805 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13807 * Makefile.in: Add required vsx dependencies.
13809 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13810 Declare init_registers_powerpc_vsx32l.
13811 Declare init_registers_powerpc_vsx64l.
13812 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13813 (ppc_arch_setup): Check for VSX in hwcap.
13814 (ppc_fill_vsxregset): New function.
13815 (ppc_store_vsxregset): New function.
13816 Add new VSX entry in regset_info target_regsets.
13818 * configure.srv: Add new VSX dependencies.
13820 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13822 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13823 (remote_open): Set or clear transport_is_reliable.
13824 (putpkt_binary): Don't expect acks in noack mode.
13825 (getpkt): Don't send ack/nac in noack mode.
13826 * server.c (handle_general_set): Handle QStartNoAckMode.
13827 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13829 (main): Reset noack_mode on every connection.
13830 * server.h (noack_mode): Declare.
13832 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13834 * Makefile.in (GDBREPLAY_OBS): New variable.
13835 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13837 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13838 Daniel Jacobowitz <dan@codesourcery.com>
13840 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13841 (usr_store_inferior_registers): Likewise.
13842 (regsets_store_inferior_registers): Likewise.
13844 2008-07-31 Rolf Jansen <rj@surtec.com>
13845 Pedro Alves <pedro@codesourcery.com>
13847 * configure.ac: Check for memmem declaration.
13848 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13849 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13850 (disable_packet_qfThreadInfo): Unconditionally compile.
13851 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13852 * configure, config.in: Regenerate.
13854 2008-07-28 Doug Kwan <dougkwan@google.com>
13856 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13857 (linux_write_memory): Remove declaration of errno.
13859 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13861 * linux-low.c (handle_extended_wait): Do not use "status"
13862 variable uninitialized.
13864 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13866 * server.c (handle_v_attach): Inhibit reporting dll changes.
13868 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13870 * remote-utils.c (prepare_resume_reply): If requested, don't
13871 output "thread:TID" in the T stop reply.
13873 * server.c (disable_packet_vCont, disable_packet_Tthread)
13874 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13875 (handle_query): If requested, disable support for qC, qfThreadInfo
13877 (handle_v_requests): If requested, disable support for vCont.
13878 (gdbserver_show_disableable): New.
13879 (main): Handle --disable-packet and --disable-packet=LIST.
13881 * server.h (disable_packet_vCont, disable_packet_Tthread)
13882 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13884 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13886 * server.c (gdbserver_usage): Mention --version.
13888 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13890 * Makefile.in (gdbreplay.o): New rule.
13892 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13894 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13895 message, not gdbserver.
13897 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13898 Nathan Sidwell <nathan@codesourcery.com>
13899 Joseph Myers <joseph@codesourcery.com>
13901 * acinclude.m4: Include ../../config/acx.m4.
13902 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13903 * configure, config.in: Regenerate.
13904 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13905 * server.c (gdbserver_version): Print PKGVERSION.
13906 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13907 (main): Adjust gdbserver_usage calls.
13908 * gdbreplay.c (version, host_name): Add declarations.
13909 (gdbreplay_version, gdbreplay_usage): New.
13910 (main): Accept --version and --help options.
13912 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13914 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13915 (arm_breakpoint_at): Handle Thumb.
13916 (the_low_target): Add comment.
13918 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13920 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13922 2008-05-09 Doug Evans <dje@google.com>
13924 * server.h (decode_search_memory_packet): Declare.
13925 * remote-utils.c (decode_search_memory_packet): New fn.
13926 * server.c (handle_search_memory_1): New fn.
13927 (handle_search_memory): New fn.
13928 (handle_query): Process qSearch:memory packets.
13930 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13932 * regcache.c (registers_length): Remove.
13933 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13934 full register packet.
13935 * regcache.h (registers_length): Remove prototype.
13936 * server.h (PBUFSIZ): Define to 16384.
13938 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13940 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13941 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13942 powerpc-64l.o, and powerpc-altivec64l.o.
13943 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13944 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13945 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13946 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13947 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13950 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13951 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13952 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13953 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13954 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13955 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13956 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13957 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13958 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13959 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13962 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13963 (init_registers_powerpc_32l): ... this new prototype.
13964 (init_registers_powerpc_32): Remove, replace by ...
13965 (init_registers_powerpc_altivec32l): ... this new prototype.
13966 (init_registers_powerpc_e500): Remove, replace by ...
13967 (init_registers_powerpc_e500l): ... this new prototype.
13968 (init_registers_ppc64): Remove, replace by ...
13969 (init_registers_powerpc_64l): ... this new prototype.
13970 (init_registers_powerpc_64): Remove, replace by ...
13971 (init_registers_powerpc_altivec64l): ... this new prototype.
13972 (ppc_num_regs): Set to 73.
13973 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13974 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13975 (ppc_cannot_store_register): Handle orig_r3 and trap.
13976 (ppc_arch_setup): Update init_registers_... calls.
13977 (ppc_fill_gregset): Handle orig_r3 and trap.
13979 * inferiors.c (clear_inferiors): Reset current_inferior.
13981 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13983 * acinclude.m4: Add override.m4.
13984 * configure: Regenerate.
13986 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13988 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13989 initial call to init_register_ppc64.
13991 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13993 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13994 single powerpc*-*-linux* case.
13995 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13997 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13999 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14000 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14002 * linux-ppc-low.c: Include <elf.h>.
14003 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14004 (ppc_hwcap): New global variable.
14005 (ppc_regmap): Remove __SPE__ #ifdef sections.
14006 (ppc_regmap_e500): New global variable.
14007 (ppc_cannot_store_register): Update __SPE__ special case.
14008 (ppc_get_hwcap): New function.
14009 (ppc_arch_setup): Use it to determine whether inferior supports
14010 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14011 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14012 Do not access registers if target does not support AltiVec.
14013 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14014 Do not access registers if target does not support SPE.
14015 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14017 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14019 * linux-low.c (disabled_regsets, num_regsets): New.
14020 (use_regsets_p): Delete.
14021 (linux_wait_for_process): Clear disabled_regsets.
14022 (regsets_fetch_inferior_registers): Check and set it.
14023 (regsets_store_inferior_registers): Likewise.
14024 (linux_fetch_registers, linux_store_registers): Do not use
14026 (initialize_low): Allocate disabled_regsets.
14028 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14030 * Makefile.in (LIBOBJS): New.
14031 (OBS): Use LIBOBJS.
14032 (memmem.o): New rule.
14033 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14034 * configure: Regenerated.
14036 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14038 * server.c (handle_query): Never return "unsupported" for
14039 qXfer:features:read queries.
14041 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14043 * server.c (get_features_xml): Fix inverted condition.
14044 (handle_query): Always support qXfer:feature:read.
14046 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14048 * server.c (wrapper_argv): New.
14049 (start_inferior): Handle wrapper_argv. If set, expect an extra
14051 (gdbserver_usage): Document --wrapper.
14052 (main): Parse --wrapper.
14054 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14056 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14057 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14058 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14059 (ppc_set_pc): Likewise.
14060 (ppc_arch_setup): New function.
14061 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14062 of collect_register.
14063 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14065 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14067 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14068 instead of linux-ppc64-low.o.
14069 * linux-ppc64-low.c: Remove file.
14070 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14071 (linux-ppc64-low.o): Remove rule.
14073 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14074 (init_registers_powerpc_64): Likewise.
14075 (ppc_regmap): Conditionally define depending on __powerpc64__.
14076 (ppc_cannot_store_register): Do not special-case "fpscr" when
14077 compiled on __powerpc64__.
14078 (ppc_collect_ptrace_register): New function.
14079 (ppc_supply_ptrace_register): New function.
14080 (ppc_breakpoint): Change type to "unsigned int".
14081 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14082 (the_low_target): Conditionally provide initializers for the
14083 arch_setup member depending on __powerpc64__. Install
14084 collect_ptrace_register and supply_ptrace_register members.
14086 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14088 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14089 * server.c (gdbserver_xmltarget): Define.
14090 (get_features_xml): Use it to replace "target.xml" and arch_string.
14092 * configure.srv: Remove srv_xmltarget. Add XML files that were
14093 mentioned there to srv_xmlfiles instead. Remove conditional tests
14094 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14095 srv_xmlfiles and srv_regobj to include all possible choices.
14096 * configure.ac (srv_xmltarget): Remove.
14097 (srv_xmlfiles): Do not add "target.xml".
14098 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14099 checks for supplementary target information.
14100 * configure: Regenerate.
14101 * Makefile.in (XML_TARGET): Remove.
14102 (target.xml): Remove rule.
14103 (clean): Do not clean up target.xml.
14104 (.PRECIOUS): Do not mention target.xml.
14106 * target.h (struct target_ops): Remove arch_string member.
14107 * linux-low.c (linux_arch_string): Remove.
14108 (linux_target_ops): Remove arch_string initializer.
14109 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14110 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14111 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14112 * spu-low.c (spu_arch_string): Remove.
14113 (spu_target_ops): Remove arch_string initializer.
14114 * win32-low.c (win32_arch_string): Remove.
14115 (win32_target_ops): Remove arch_string initializer.
14116 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14117 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14118 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14120 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14122 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14123 by collect_ptrace_register and supply_ptrace_register hooks.
14124 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14125 instead of checking for the_low_target.left_pad_xfer.
14126 (usr_store_inferior_registers): Use collect_ptrace_register callback
14127 instead of checking for the_low_target.left_pad_xfer.
14129 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14130 (s390_supply_ptrace_register): Likewise.
14131 (s390_fill_gregset): Call s390_collect_ptrace_register.
14132 (the_low_target): Update.
14134 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14135 (ppc_supply_ptrace_register): Likewise.
14136 (the_low_target): Update.
14138 * linux-i386-low.c (the_low_target): Update.
14139 * linux-x86-64-low.c (the_low_target): Update.
14141 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14143 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14144 reg-s390.o and reg-s390x.o.
14146 * linux-low.c (new_inferior): New global variable.
14147 (linux_create_inferior, linux_attach): Set it.
14148 (linux_wait_for_process): Call the_low_target.arch_setup after the
14149 target has stopped for the first time.
14150 (initialize_low): Do not call the_low_target.arch_setup.
14152 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14153 (s390_set_pc): Likewise.
14154 (s390_arch_setup): New function.
14155 (the_low_target): Use s390_arch_setup as arch_setup routine.
14157 * regcache.c (realloc_register_cache): New function.
14158 (set_register_cache): Call it for each existing regcache.
14160 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14162 * server.h (init_registers): Remove prototype.
14164 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14165 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14166 instead of init_registers ().
14167 * linux-arm-low.c (init_registers_arm): Add prototype.
14168 (init_registers_arm_with_iwmmxt): Likewise.
14169 (the_low_target): Add initializer for arch_setup field.
14170 * linux-cris-low.c (init_registers_cris): Add prototype.
14171 (the_low_target): Add initializer for arch_setup field.
14172 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14173 (the_low_target): Add initializer for arch_setup field.
14174 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14175 (the_low_target): Add initializer for arch_setup field.
14176 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14177 (the_low_target): Add initializer for arch_setup field.
14178 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14179 (the_low_target): Add initializer for arch_setup field.
14180 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14181 (the_low_target): Add initializer for arch_setup field.
14182 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14183 (init_registers_mips64_linux): Likewise.
14184 (the_low_target): Add initializer for arch_setup field.
14185 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14186 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14187 (the_low_target): Add initializer for arch_setup field.
14188 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14189 (init_registers_powerpc_64): Likewise.
14190 (the_low_target): Add initializer for arch_setup field.
14191 * linux-s390-low.c (init_registers_s390): Add prototype.
14192 (init_registers_s390x): Likewise.
14193 (the_low_target): Add initializer for arch_setup field.
14194 * linux-sh-low.c (init_registers_sh): Add prototype.
14195 (the_low_target): Add initializer for arch_setup field.
14196 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14197 (the_low_target): Add initializer for arch_setup field.
14198 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14199 (the_low_target): Add initializer for arch_setup field.
14201 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14202 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14203 instead of init_registers ().
14204 * win32-arm-low.c (init_registers_arm): Add prototype.
14205 (the_low_target): Add initializer for arch_setup field.
14206 * win32-i386-low.c (init_registers_i386): Add prototype.
14207 (the_low_target): Add initializer for arch_setup field.
14209 * spu-low.c (init_registers_spu): Add prototype.
14210 (initialize_low): Call initialie_registers_spu () instead of
14211 initialize_registers ().
14213 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14215 * server.c (handle_v_requests): When handling the vRun and vAttach
14216 packets, if already debugging a process, don't kill it. Return an
14219 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14221 * server.c (handle_query): Correct length check.
14223 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14225 * win32-low.c (do_initial_child_stuff): Add process handle
14226 parameter. Set current_process_handle and current_process_id from the
14227 parameters. Clear globals.
14228 (win32_create_inferior): Don't set current_process_handle and
14229 current_process_id here. Instead pass them on the call to
14230 do_initial_child_stuff.
14231 (win32_attach): Likewise.
14232 (win32_clear_inferiors): New.
14233 (win32_kill): Don't close the current process handle or the
14234 current thread handle here. Instead call win32_clear_inferiors.
14235 (win32_detach): Don't open a new handle to the process. Call
14236 win32_clear_inferiors.
14237 (win32_join): Don't rely on current_process_handle; open a new
14238 handle using the process id.
14239 (win32_wait): Call win32_clear_inferiors when the inferior process
14242 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14244 * server.c (monitor_show_help): Add "exit".
14246 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14248 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14249 (clean): Add reg-xtensa.c.
14250 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14251 * configure.srv (xtensa*-*-linux*) New target.
14252 * linux-xtensa-low.c: New.
14253 * xtensa-xtregs.c: New.
14255 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14257 * hostio.c: Don't include errno.h.
14258 (errno_to_fileio_errno): Move to hostio-errno.
14259 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14260 error number outputting to the target->hostio_last_error callback.
14261 (hostio_packet_error): Use FILEIO_EINVAL directly.
14262 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14263 calls to hostio_error.
14264 * hostio-errno.c: New.
14265 * server.h (hostio_last_error_from_errno): Declare.
14266 * target.h (target_ops): Add hostio_last_error member.
14267 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14268 as hostio_last_error handler.
14269 * spu-low.c (spu_target_ops): Likewise.
14270 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14271 (wince_hostio_last_error): New functions.
14272 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14273 as hostio_last_error handler.
14274 (win32_target_ops) [!_WIN32_WCE]: Register
14275 hostio_last_error_from_errno as hostio_last_error handler.
14276 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14277 (hostio-errno.o): New rule.
14278 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14279 * configure.srv (srv_hostio_err_objs): New variable. Default to
14281 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14282 * configure: Regenerate.
14284 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14286 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14287 (linux_kill, linux_detach): Clean up the process list.
14288 * remote-utils.c (remote_open): Improve port number parsing.
14289 (putpkt_binary, input_interrupt): Only send interrupts if the target
14291 * server.c (extended_protocol): Make static.
14292 (attached): Define earlier.
14293 (exit_requested, response_needed, program_argv): New variables.
14294 (target_running): New.
14295 (start_inferior): Clear attached here.
14296 (attach_inferior): Set attached here.
14297 (require_running): Define.
14298 (handle_query): Use require_running and target_running. Implement
14300 (handle_v_attach, handle_v_run): New.
14301 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14302 (gdbserver_usage): Update.
14303 (main): Redo argument parsing. Handle --debug and --multi. Handle
14304 --attach along with other options or after the port. Save
14305 program_argv. Support no initial program. Resynchronize
14306 communication with GDB after an error. Handle "monitor exit".
14307 Use require_running and target_running. Always allow the extended
14308 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14309 restart in extended mode.
14310 * README: Refer to the GDB manual. Update --attach usage.
14312 2007-12-20 Andreas Schwab <schwab@suse.de>
14314 * linux-low.c (STACK_SIZE): Define.
14315 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14316 (linux_test_for_tracefork): Likewise.
14318 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14320 * linux-low.c (linux_wait_for_event): Update messages. Do not
14321 reinsert auto-delete breakpoints.
14322 * mem-break.c (struct breakpoint): Change return type of handler to
14324 (set_breakpoint_at): Update handler type.
14325 (reinsert_breakpoint_handler): Return 1 instead of calling
14327 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14329 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14330 * mem-break.h (set_breakpoint_at): Update handler type.
14331 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14332 * win32-low.c (auto_delete_breakpoint): New.
14333 (get_child_debug_event): Use it.
14335 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14337 * configure.ac: Check for pread and pwrite.
14338 * hostio.c (handle_pread): Fall back to lseek and read.
14339 (handle_pwrite): Fall back to lseek and write.
14340 * config.in, configure: Regenerated.
14342 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14344 * server.c (myresume): Add own_buf argument.
14345 (main): Update calls.
14347 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14349 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14350 * remote-utils.c (remote_open): Do not call disable_async_io.
14351 (block_async_io): Delete.
14352 (unblock_async_io): Make static.
14353 (initialize_async_io): New.
14354 * server.c (handle_v_cont): Handle async I/O here.
14355 (myresume): Likewise. Move other common resume tasks here...
14356 (main): ... from here. Call initialize_async_io. Disable async
14357 I/O before the main loop.
14358 * server.h (initialize_async_io): Declare.
14359 (block_async_io, unblock_async_io): Delete prototypes.
14360 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14362 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14364 * remote-utils.c (readchar): Allow binary data in received messages.
14366 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14368 * win32-low.c (attaching): New global.
14369 (win32_create_inferior): Clear the `attaching' global.
14370 (win32_attach): Set the `attaching' global.
14371 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14372 attaching. Only set a breakpoint at the entry point if not
14375 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14377 * server.c (main): Don't report dll events on the initial
14378 connection on attaches.
14380 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14382 * server.c (main): Relax numerical bases supported for the pid of
14383 the --attach command line argument.
14385 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14387 * win32-low.c (win32_attach): Call OpenProcess before
14388 DebugActiveProcess, not after. Add last error output to error
14391 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14393 * win32-low.c (win32_get_thread_context)
14394 (win32_set_thread_context): New functions.
14395 (thread_rec): Use win32_get_thread_context.
14396 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14397 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14400 2007-12-03 Leo Zayas
14401 Pedro Alves <pedro_alves@portugalmail.pt>
14403 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14405 (child_add_thread): Minor cleanup.
14406 (child_continue): Resume artificially suspended threads before
14407 calling ContinueDebugEvent.
14408 (suspend_one_thread): New.
14409 (fake_breakpoint_event): New.
14410 (get_child_debug_event): Change return type to int. Check here if
14411 gdb sent an interrupt request. If a soft interrupt was requested,
14412 fake a breakpoint event. Return 0 if there is no event to handle,
14414 (win32_wait): Don't check here if gdb sent an interrupt request.
14415 Ensure there is a valid event to handle.
14416 (win32_request_interrupt): Add soft interruption method as last
14419 2007-12-03 Leo Zayas
14420 Pedro Alves <pedro_alves@portugalmail.pt>
14422 * win32-low.h (win32_thread_info): Add descriptions to the
14423 structure members. Replace `suspend_count' counter by a
14425 * win32-low.c (thread_rec): Update condition of when to get the
14426 context from the inferior. Rely on ContextFlags being set if it
14427 has already been retrieved. Only suspend the inferior thread if
14428 we haven't already. Warn if that fails.
14429 (continue_one_thread): s/suspend_count/suspended/. Only call
14430 ResumeThread once. Warn if that fails.
14432 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14434 * win32-low.c (win32_wait): Don't read from the inferior when it
14435 has already exited.
14437 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14439 * Makefile.in (win32_low_h): New variable.
14440 (win32-low.o): Add dependency on $(win32_low_h).
14441 (win32-arm-low.o, win32-i386-low.o): New rules.
14443 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14445 * hostio.c: Correct copyright year.
14447 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14449 * Makefile.in (OBS): Add hostio.o.
14450 (hostio.o): New rule.
14451 * server.h (handle_vFile): Declare.
14452 * hostio.c: New file.
14453 * server.c (handle_v_requests): Take packet_len and new_packet_len
14454 for binary packets. Call handle_vFile.
14455 (main): Update call to handle_v_requests.
14457 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14459 * linux-low.c: Include <sched.h>.
14461 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14463 * linux-low.c (linux_tracefork_grandchild): New.
14464 (linux_tracefork_child): Use clone.
14465 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14467 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14469 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14471 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14473 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14475 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14477 * inferiors.c (change_inferior_id): Delete.
14478 (add_pid_to_list, pull_pid_from_list): New.
14479 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14480 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14481 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14482 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14483 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14484 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14485 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14486 (using_threads): Always set to 1.
14487 (handle_extended_wait): New.
14488 (add_process): Do not set TID.
14489 (linux_create_inferior): Set must_set_ptrace_flags.
14490 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14491 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14492 (linux_thread_alive): Rename TID argument to LWPID.
14493 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14494 (linux_wait_for_event): Do not use TID or check using_threads. Update
14495 call to dead_thread_notify. Call handle_extended_wait.
14496 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14497 (send_sigstop): Delete sigstop_sent.
14498 (wait_for_sigstop): Avoid TID.
14499 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14500 (linux_test_for_tracefork): New.
14501 (linux_lookup_signals): Use thread_db_active and
14502 linux_supports_tracefork_flag.
14503 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14504 * linux-low.h (get_process_thread): Avoid TID.
14505 (struct process_ifo): Move thread_known and tid to the end. Remove
14507 (linux_attach_lwp, thread_db_init): Update prototypes.
14508 * server.h (change_inferior_id): Delete prototype.
14509 (add_pid_to_list, pull_pid_from_list): New prototypes.
14510 * thread-db.c (thread_db_use_events): New.
14511 (find_first_thread): Rename to...
14512 (find_one_thread): ...this. Update callers and messages. Do not
14513 call fatal. Check thread_db_use_events. Do not call
14514 change_inferior_id or new_thread_notify.
14515 (maybe_attach_thread): Update. Do not call new_thread_notify.
14516 (thread_db_init): Set thread_db_use_events. Check use_events.
14517 * utils.c (fatal, warning): Correct message prefix.
14519 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14521 * Makefile.in (clean): Remove new files.
14522 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14523 (powerpc-64.o, powerpc-64.c): New rules.
14524 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14525 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14527 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14529 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14530 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14531 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14532 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14533 (target_regsets): Add AltiVec and SPE register sets.
14534 * configure.ac: Check for AltiVec and SPE.
14535 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14536 (ppc_fill_vrregset, ppc_store_vrregset): New.
14537 (target_regsets): Add AltiVec register set.
14538 * configure: Regenerated.
14540 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14542 * linux-low.c (O_LARGEFILE): Define.
14543 (linux_read_memory): Use /proc/PID/mem.
14544 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14545 * configure, config.in: Regenerated.
14547 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14549 * linux-low.c (linux_wait_for_event): Do not pass signals while
14552 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14554 * win32-low.c (create_process): New.
14555 (win32_create_inferior): Use create_process instead of
14556 CreateProcess. If create_process failed retry appending an ".exe"
14557 suffix. Store the GetLastError result immediatelly after
14558 create_process calls and use it on the call to error.
14560 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14562 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14564 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14566 * configure.ac: Switch license to GPLv3.
14568 2007-08-01 Michael Snyder <msnyder@access-company.com>
14570 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14572 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14574 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14576 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14577 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14578 CloseToolhelp32Snapshot.
14579 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14580 CloseToolhelp32Snapshot.
14582 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14584 * server.c (main): Check for inferior exit before main loop.
14586 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14588 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14589 instead of on tmp_desc.
14591 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14592 Daniel Jacobowitz <dan@codesourcery.com>
14594 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14595 (add_thread): Minor cleanups.
14596 (clear_inferiors): Move lower in the file. Clear the DLL
14598 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14599 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14600 (xml_escape_text): New.
14601 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14603 (handle_v_cont): Report errors.
14604 (gdbserver_version): Update.
14605 (main): Correct size of own_buf. Do not report initial DLL events.
14606 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14607 (unloaded_dll, xml_escape_text): New.
14608 * win32-low.c (enum target_waitkind): Update comments.
14609 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14610 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14611 (win32_EnumProcessModules, win32_GetModuleInformation)
14612 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14613 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14614 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14615 (win32_Module32First, win32_Module32Next, load_toolhelp)
14616 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14617 (get_child_debug_event): Handle DLL events.
14618 (win32_wait): Likewise.
14620 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14622 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14623 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14625 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14627 * win32-low.c (handle_output_debug_string): Ignore event if not
14630 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14632 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14634 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14636 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14638 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14640 * inferiors.c (change_inferior_id): Add comment.
14641 * linux-low.c (check_removed_breakpoint): Add an early
14642 prototype. Improve debug output.
14643 (linux_attach): Doc update.
14644 (linux_detach_one_process, linux_detach): Clean up before releasing
14646 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14647 * linux-low.h (struct process_info): Doc improvement.
14648 * mem-break.c (delete_all_breakpoints): New.
14649 * mem-break.h (delete_all_breakpoints): New prototype.
14650 * thread-db.c (find_first_thread): New.
14651 (thread_db_create_event): Call it instead of
14652 thread_db_find_new_threads. Clean up unused variables.
14653 (maybe_attach_thread): Remove first thread handling.
14654 (thread_db_find_new_threads): Use find_first_thread.
14655 (thread_db_get_tls_address): Likewise.
14657 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14659 * thread-db.c (thread_db_find_new_threads): Add prototype.
14660 (thread_db_create_event): Check for the main thread before adding
14662 (maybe_attach_thread): Only enable event reporting if TID == 0.
14663 (thread_db_get_tls_address): Check for new threads.
14665 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14667 * linux-low.c (linux_create_inferior): Try execv before execvp.
14668 * spu-low.c (spu_create_inferior): Likewise.
14670 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14672 * linux-low.c (linux_create_inferior): Change execv to execvp.
14673 * spu-low.c (spu_create_inferior): Likewies.
14675 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14677 * Makefile.in (clean): Clean new files instead of deleted ones.
14678 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14679 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14681 * configure.srv: Specify XML files and new regformats for MIPS and
14683 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14684 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14685 an entry for the restart register.
14686 (mips_cannot_fetch_register, mips_cannot_store_register)
14687 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14688 register names to match the XML descriptions.
14689 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14690 restart register instead of $0.
14692 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14693 Markus Deuling <deuling@de.ibm.com>
14695 * remote-utils.c (decode_xfer_write): New function.
14696 * server.h (decode_xfer_write): Add prototype.
14697 * server.c (handle_query): Add PACKET_LEN argument. Support
14698 qXfer:spu:read and qXfer:spu:write packets.
14699 (main): Pass packet_len to handle_query.
14700 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14701 * target.h (target_ops): Add qxfer_spu.
14703 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14705 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14706 accessing non-seekable spufs files.
14708 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14710 * server.c (handle_query): Add reply for qC packet.
14712 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14713 Leo Zayas <lerele@champenstudios@com>
14715 * server.h (check_remote_input_interrupt_request): New function.
14716 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14717 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14718 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14719 (check_remote_input_interrupt_request): New function.
14720 * server.h (check_remote_input_interrupt_request): Declare.
14721 * win32-low.c (winapi_DebugBreakProcess,
14722 winapi_GenerateConsoleCtrlEvent): New typedefs.
14723 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14725 (win32_wait): Check for remote interrupt request
14726 with check_remote_input_interrupt_request.
14727 (win32_request_interrupt): New function.
14728 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14730 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14732 * win32-low.c (debug_registers_changed,
14733 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14734 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14735 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14736 (thread_rec): Get context using the low target.
14737 (child_add_thread): Call thread_added on the low target,
14738 which does the same thing.
14740 (do_initial_child_stuff): Remove debug registers references.
14741 Set context using the low target. Resume threads after
14742 setting the contexts.
14743 (child_continue): Remove dead variable. Remove debug
14744 registers references.
14745 (child_fetch_inferior_registers): Go through the low target.
14746 (do_child_store_inferior_registers): Remove.
14747 (child_store_inferior_registers): Go through the low target.
14748 (win32_resume): Remove debug registers references.
14749 Set context using the low target.
14750 (handle_exception): Change return type to void. Don't record
14751 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14752 first chance exception.
14753 (get_child_debug_event): Change return type to void. Remove
14754 goto loop. Always return after waiting for debug event.
14755 (win32_wait): Convert to switch statement. Handle spurious
14758 * win32-i386-low.c (debug_registers_changed,
14759 debug_registers_used): New.
14760 (initial_stuff): Rename to ...
14761 (i386_initial_stuff): ... this. Clear debug registers
14763 (store_debug_registers): Delete.
14764 (i386_get_thread_context): New.
14765 (load_debug_registers): Delete.
14766 (i386_set_thread_context): New.
14767 (i386_thread_added): New.
14768 (single_step): Rename to ...
14769 (i386_single_step): ... this.
14770 (do_fetch_inferior_registers): Rename to ...
14771 (i386_fetch_inferior_register): ... this.
14772 (i386_store_inferior_register): New.
14773 (the_low_target): Adapt to new interface.
14775 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14776 (arm_get_thread_context): New.
14777 (arm_set_thread_context): New.
14779 (do_fetch_inferior_registers): Rename to ...
14780 (arm_fetch_inferior_register): ... this.
14781 (arm_store_inferior_register): New.
14782 (arm_wince_breakpoint): Reimplement as unsigned long.
14783 (arm_wince_breakpoint_len): Define.
14784 (the_low_target): Adapt to new interface.
14786 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14787 load_debug_registers. Add get_thread_context, set_thread_context,
14788 thread_added and store_inferior_register. Rename
14789 fetch_inferior_registers to fetch_inferior_register.
14790 (regptr): Remove declaration.
14792 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14794 * linux-low.c (linux_detach): Change return type to int. Return 0.
14795 * spu-low.c (spu_detach): Likewise.
14797 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14799 * target.h (target_ops): Change return type of detach to int.
14801 (join_inferior): New.
14802 * server.c (main): Don't skip detach support on mingw32.
14803 If the inferior doesn't support detaching return error.
14804 Call join_inferior instead of using waitpid.
14805 * linux-low.c (linux_join): New.
14806 (linux_target_op): Add linux_join.
14807 * spu-low.c (spu_join): New.
14808 (spu_target_ops): Add spu_join.
14809 * win32-low.c (win32_detach): Adapt to new interface.
14810 Reopen current_process_handle before detaching. Issue a child
14811 resume before detaching.
14813 (win32_target_op): Add win32_join.
14815 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14817 * win32-low.c (win32-attach): Fix return value.
14818 * target.h (target_ops): Describe ATTACH return values.
14820 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14822 * win32-low.c (GETPROCADDRESS): Define.
14823 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14824 (winapi_DebugSetProcessKillOnExit): Likewise.
14825 (win32_create_inferior): Force usage of ansi CreateProcessA.
14826 (win32_attach): Use GETPROCADDRESS.
14827 (win32_detach): Likewise.
14829 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14831 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14833 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14835 * win32-low.c: Commit leftover changes from 2007-03-29.
14837 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14839 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14840 fields short instead of int. Add explicit padding.
14841 (i387_cache_to_fsave): Remove unnecessary casts.
14842 (i387_fsave_to_cache): Doc fix.
14843 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14845 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14847 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14848 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14850 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14852 * configure.srv (arm*-*-mingw32ce*): Move near the other
14855 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14857 * configure.ac: Add errno checking.
14858 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14859 sys/file.h and malloc.h.
14860 (AC_CHECK_DECLS): Add perror.
14861 (srv_mingwce): Handle.
14862 * configure.srv (i[34567]86-*-cygwin*): Add
14863 win32-i386-low.o to srv_tgtobj.
14864 (i[34567]86-*-mingw*): Likewise.
14865 (arm*-*-mingw32ce*): Add case.
14866 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14867 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14868 [__MINGW32CE__] (strerror): New function.
14869 [__MINGW32CE__] (errno): Define to GetLastError.
14870 [__MINGW32CE__] (COUNTOF): New macro.
14871 (remote_open): Remove extra close call.
14872 * mem-break.c (delete_breakpoint_at): New function.
14873 * mem-break.h (delete_breakpoint_at): Declare.
14874 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14875 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14876 [USE_WIN32API] (read, write): Add char* casts.
14877 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14878 * server.h: Include wincecompat.h on Windows CE.
14879 [HAVE_ERRNO_H]: Check.
14880 (perror): Declare if not declared.
14881 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14882 (perror_with_name): Remove errno declaration.
14883 * wincecompat.h: New.
14884 * wincecompat.c: New.
14885 * win32-low.h: New.
14886 * win32-arm-low.c: New.
14887 * win32-i386-low.c: New.
14888 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14889 (OUTMSG2): Make it safe.
14891 (COUNTOF): New macro.
14892 (NUM_REGS): Get it from the low target.
14893 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14894 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14895 (thread_rec): Let low target handle debug registers.
14896 (child_add_thread): Likewise.
14897 (child_init_thread_list): Likewise.
14898 (continue_one_thread): Likewise.
14900 (do_child_fetch_inferior_registers): Move to ...
14901 * win32-i386-low.c: ... here, and rename to ...
14902 (do_fetch_inferior_registers): ... this.
14903 * win32-low.c (child_fetch_inferior_registers):
14904 Go through the low target.
14905 (do_child_store_inferior_registers): Use regptr.
14906 (strwinerror): New function.
14907 (win32_create_inferior): Handle Windows CE.
14908 Use strwinerror instead of strerror on Windows error
14909 codes. Add program to the error output.
14910 Don't close the main thread handle on Windows CE.
14911 (win32_attach): Use coredll.dll on Windows CE.
14912 (win32_kill): Close current process and current
14914 (win32_detach): Use coredll.dll on Windows CE.
14915 (win32_resume): Let low target handle debug registers, and
14917 (handle_exception): Add/Remove initial breakpoint. Avoid
14918 non-existant WSTOPSIG on Windows CE.
14919 (win32_read_inferior_memory): Cast to remove warning.
14920 (win32_arch_string): Go through the low target.
14921 (initialize_low): Call set_breakpoint_data with the low
14922 target's breakpoint.
14923 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14924 FOP_REGNUM, mappings): Move to ...
14925 * win32-i386-low.c: ... here.
14926 * win32-low.c (win32_thread_info): Move to ...
14927 * win32-low.h: ... here.
14928 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14929 win32-arm-low.c and wincecompat.c.
14930 (all:): Add $EXEEXT.
14931 (install-only:): Likewise.
14932 (gdbserver:): Likewise.
14933 (gdbreplay:): Likewise.
14934 * config.in: Regenerate.
14935 * configure: Regenerate.
14937 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14939 * win32-low.c: Rename typedef thread_info to
14940 win32_thread_info throughout.
14942 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14944 * win32-i386-low.c: Rename to ...
14945 * win32-low.c: ... this.
14946 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14947 * Makefile.in: Likewise.
14949 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14951 * remote-utils.c (monitor_output): Constify msg parameter.
14952 * server.h (monitor_output): Likewise.
14953 * win32-i386-low.c (handle_output_debug_string): New.
14954 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14955 handle_output_debug_string.
14956 (get_child_debug_event): Likewise.
14958 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14960 * server.c (main): Correct strtoul check.
14962 2007-03-27 Jon Ringle <jon@ringle.org>
14964 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14966 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14968 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14970 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14972 * terminal.h: Check HAVE_SGTTY_H.
14974 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14976 * remote-utils.c (remote_open): Print out the assigned port number.
14978 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14980 * remote-utils.c (monitor_output): New function.
14981 * server.c (debug_threads): Define here.
14982 (monitor_show_help): New function.
14983 (handle_query): Handle qRcmd.
14984 (main): Do not handle 'd' packet.
14985 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14986 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14989 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14991 * Makefile.in (EXEEXT): New.
14992 (clean): Use $(EXEEXT).
14994 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14996 * target.h (target_ops): Rename send_signal to request_interrupt,
14997 and remove enum target_signal parameter.
14998 * linux-low.c (linux_request_interrupt): Rename from
14999 linux_send_signal, and always send SIGINT.
15000 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15001 and always send SIGINT.
15002 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15004 (input_interrupt): Likewise.
15006 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15008 * server.c (get_features_xml): Check if target implemented
15010 * win32-i386-low.c (win32_arch_string): New.
15011 (win32_target_ops): Add win32_arch_string as arch_string member.
15013 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15015 * spu-low.c (spu_arch_string): New.
15016 (spu_target_ops): Add spu_arch_string.
15018 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15020 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15021 * configure.ac: Do not check for terminal.h.
15022 * configure, config.in: Regenerated.
15024 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15026 * Makefile.in (OBS): Add $(XML_BUILTIN).
15027 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15029 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15030 (arm-with-iwmmxt.c): New.
15031 * config.in, configure: Regenerate.
15032 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15033 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15034 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15035 (arm*-*-linux*): Add iWMMXt and regset support.
15036 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15037 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15038 (arm_store_wmmxregset, target_regsets): New.
15039 * server.c (get_features_xml): Take annex argument. Check builtin
15041 (handle_query): Handle multiple annexes.
15043 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15045 * remote-utils.c [USE_WIN32API] (read, write): Define.
15046 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15049 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15051 * linux-i386-low.c (the_low_target): Set arch_string.
15052 * linux-x86-64-low.c (the_low_target): Likewise.
15053 * linux-low.c (linux_arch_string): New.
15054 (linux_target_ops): Add it.
15055 * linux-low.h (struct linux_target_ops): Add arch_string.
15056 * server.c (write_qxfer_response): Use const void * for DATA.
15057 (get_features_xml): New.
15058 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15059 * target.h (struct target_ops): Add arch_string method.
15061 2007-01-03 Denis Pilat <denis.pilat@st.com>
15062 Daniel Jacobowitz <dan@codesourcery.com>
15064 * linux-low.c (linux_kill): Handle being called with no threads.
15065 * win32-i386-low.c (win32_kill): Likewise.
15066 (get_child_debug_event): Clear current_process_handle.
15068 2006-12-30 Denis PILAT <denis.pilat@st.com>
15069 Daniel Jacobowitz <dan@codesourcery.com>
15071 * remote-utils.c (remote_open): Check the type of specified
15072 serial port devices before opening them.
15073 * server.c (main): Kill the inferior if an error occurs during
15074 the first remote_open.
15076 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15078 * README: Update supported targets.
15080 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15082 * Makefile.in (clean): Remove reg-mips64.c.
15083 (reg-mips64.c, reg-mips64.o): New rules.
15084 * configure.srv: Handle mips64. Include regset support for mips.
15085 * linux-mips-low.c (union mips_register): New.
15086 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15087 (mips_breakpoint, mips_breakpoint_at): Use int.
15088 (mips_collect_register, mips_supply_register)
15089 (mips_collect_register_32bit, mips_supply_register_32bit)
15090 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15091 (mips_store_fpregset, target_regsets): New.
15092 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15094 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15096 * configure.srv: Add target "spu*-*-*".
15097 * Makefile.in (clean): Remove reg-spu.c.
15098 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15099 * spu-low.c: New file.
15101 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15103 * configure.ac: Correct td_thr_tls_get_addr test.
15104 * configure: Regenerated.
15106 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15108 * linux-low.c (linux_wait_for_event): Reformat. Use the
15109 pass_signals array.
15110 * remote-utils.c (decode_address_to_semicolon): New.
15111 * server.c (pass_signals, handle_general_set): New.
15112 (handle_query): Mention QPassSignals for qSupported.
15113 (main): Call handle_general_set.
15114 * server.h (pass_signals, decode_address_to_semicolon): New.
15116 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15118 * server.c (handle_query): Correct error handling for read_auxv.
15120 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15122 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15123 and srv_linux_thread_db to yes.
15124 * linux-s390-low.c (s390_fill_gregset): New function.
15125 (target_regsets): Define data structure.
15127 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15129 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15130 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15131 * config.in, configure: Regenerated.
15132 * inferiors.c (gdb_id_to_thread): New function.
15133 (gdb_id_to_thread_id): Use it.
15134 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15135 * linux-low.h (struct process_info): Add th member.
15136 (thread_db_get_tls_address): New prototype.
15137 * remote-utils.c (decode_address): Make non-static.
15138 * server.c (handle_query): Handle qGetTLSAddr.
15139 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15140 * target.h (struct target_ops): Add get_tls_address.
15141 * thread-db.c (maybe_attach_thread): Save the thread handle.
15142 (thread_db_get_tls_address): New.
15144 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15146 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15147 (linux_resume_one_process): Take a siginfo_t *. Update all
15148 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15149 (struct pending_signals): Add a siginfo_t.
15150 (linux_wait_for_process): Always set last_status.
15151 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15152 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15153 * linux-low.h (struct process_info): Add last_status.
15155 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15157 * remote-utils.c (try_rle): New function.
15158 (putpkt_binary): Use it.
15160 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15162 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15163 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15164 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15165 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15166 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15169 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15171 * server.c (terminal_fd): New variable.
15172 (old_foreground_pgrp): Likewise.
15173 (restore_old_foreground_pgrp): New function.
15174 (start_inferior): Record the terminal file descriptor in terminal_fd
15175 and its original foreground group in old_foreground_pgrp. Register
15176 restore_old_foreground_pgrp with atexit().
15178 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15180 * server.c (handle_query): Correct qPart to qXfer.
15182 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15184 * configure.ac: Check for more headers which are missing on
15185 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15186 * configure.srv: Add Cygwin and mingw32.
15187 * remote-utils.c: Don't include headers unconditionally which
15188 are missing on mingw32. Include <winsock.h> for mingw32.
15189 (remote_open): Adjust for mingw32 support. Flush
15190 standard error after writing to it.
15191 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15192 (unblock_async_io, enable_async_io, disable_async_io)
15193 (readchar, getpkt): Update for Winsock support.
15194 (prepare_resume_reply): Expect a protocol signal number.
15195 * server.c: Disable <sys/wait.h> on mingw32.
15196 (start_inferior): Adjust for mingw32 support. Flush
15197 standard error after writing to it.
15198 (attach_inferior): Likewise. Use protocol signal
15200 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15202 * win32-i386-low.c: New file.
15203 * Makefile.in (XM_CLIBS): Set.
15204 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15205 (win32-i386-low.o): New dependency rule.
15206 * linux-low.c (linux_wait): Use target signal numbers.
15207 * target.h (struct target_ops): Doc fix.
15208 * server.h (target_signal_to_name): New prototype.
15209 * gdbreplay.c: Don't include headers unconditionally which
15210 are missing on mingw32. Include <winsock.h> for mingw32.
15211 (remote_close, remote_open): Adjust for Winsock support.
15212 * configure, config.in: Regenerated.
15214 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15216 * server.c (decode_xfer_read, write_qxfer_response): New.
15217 (handle_query): Take a packet length argument. Handle
15218 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15219 the qSupported response.
15220 (main): Update call to handle_query.
15222 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15224 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15225 (putpkt_binary): Renamed from putpkt and adjusted for binary
15227 (putpkt): New wrapper for putpkt_binary.
15228 (readchar): Don't mask off the high bit.
15229 (decode_X_packet): New function.
15230 * server.c (main): Call putpkt_binary if a handler sets the packet
15231 length. Save the length of the incoming packet. Handle 'X'.
15232 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15234 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15236 * server.c (handle_query): Handle qSupported.
15238 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15240 * remote-utils.c (all_symbols_looked_up): New variable.
15241 (look_up_one_symbol): Check it.
15242 * server.h (look_up_one_symbol): New declaration.
15243 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15245 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15247 * Makefile.in (linux-arm-low.o): Update dependencies.
15248 * linux-arm-low.c: Include "gdb_proc_service.h".
15249 (PTRACE_GET_THREAD_AREA): Define.
15250 (ps_get_thread_area): New function.
15252 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15254 * configure.srv (m68k*-*-uclinux*): New target.
15255 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15256 (linux_resume_one_process): Remove extraneous cast.
15257 (linux_read_offsets): New.
15258 (linux_target_op): Add linux_read_offsets on mmuless systems.
15259 * server.c (handle_query): Add qOffsets logic.
15260 * target.h (struct target_ops): Add read_offsets.
15262 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15264 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15265 (PTRACE_GET_THREAD_AREA): Define.
15266 (ps_get_thread_area): New function.
15267 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15268 (linux-x86-64-low.o): Update.
15270 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15272 * configure.ac: Remove checks for prfpregset_t.
15273 * gdb_proc_service.h: New file.
15274 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15275 new "gdb_proc_service.h".
15276 * proc-service.c: Likewise.
15277 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15278 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15279 * Makefile.in (gdb_proc_service_h): Updated.
15280 * configure, config.in: Regenerated.
15282 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15284 * remote-utils.c (prepare_resume_reply): Move declaration
15285 of gdb_id_from_wait to the top of the block.
15287 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15289 * linux-low.c (regsets_store_inferior_registers): Read the regset
15290 from the target before filling it.
15292 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15294 * server.c (attach_inferior): Return SIGTRAP for a successful
15297 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15299 * Makefile.in (OBS): Add version.o.
15300 (STAGESTUFF): Delete.
15301 (version.o): Add dependencies.
15302 (version.c): Replace rule.
15303 (clean): Remove version.c.
15304 * server.c (gdbserver_version): New.
15305 (gdbserver_usage): Use printf.
15306 (main): Handle --version and --help.
15307 * server.h (version, host_name): Add declarations.
15309 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15321 * linux-x86-64-low.c:
15323 * linux-s390-low.c:
15324 * linux-ppc64-low.c:
15326 * linux-mips-low.c:
15327 * linux-m68k-low.c:
15328 * linux-m32r-low.c:
15331 * linux-ia64-low.c:
15332 * linux-i386-low.c:
15333 * linux-crisv32-low.c:
15345 * gdbserver.1: Add (C) after Copyright. Update the FSF
15348 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15350 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15351 (arm_breakpoint_at): Recognize both breakpoints.
15352 (the_low_target): Use the correct breakpoint instruction.
15354 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15356 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15357 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15358 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15359 (the_low_target): Update.
15361 2005-10-25 Andreas Schwab <schwab@suse.de>
15363 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15365 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15366 (ia64_num_regs): Reduce to 462.
15368 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15370 * acinclude.m4: Correct quoting.
15371 * aclocal.m4: Regenerated.
15373 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15374 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15375 (thread_db_init): Call thread_db_err_str.
15376 * configure.ac: Check for TD_VERSION.
15377 * config.in, configure: Regenerated.
15379 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15381 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15383 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15385 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15386 is not available. Define HAVE_PTRACE_GETREGS if it is.
15387 * config.in, configure: Regenerated.
15388 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15389 * linux-i386-low.c, linux-m68k-low.c: Update to use
15390 HAVE_PTRACE_GETREGS.
15391 * linux-low.c (regsets_fetch_inferior_registers)
15392 (regsets_store_inferior_registers): Only return 0 if we processed
15394 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15395 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15397 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15399 * inferiors.c (struct thread_info): Add gdb_id.
15400 (add_thread): Add gdb_id argument.
15401 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15402 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15403 calls to add_thread.
15404 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15405 * server.c (handle_query): Use thread_to_gdb_id.
15406 (handle_v_cont, main): Use gdb_id_to_thread_id.
15407 * server.h (add_thread): Update prototype.
15408 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15411 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15413 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15414 left-padded registers.
15415 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15416 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15418 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15420 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15421 * configure: Regenerate.
15422 * config.in: Regenerate.
15423 * server.h (NEED_DECLARATION_STRERROR):
15424 Replace with !HAVE_DECL_STRERROR.
15426 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15428 * linux-low.c (linux_wait, linux_send_signal): Don't test
15429 an unsigned long variable for > 0 if it could be MAX_ULONG.
15430 * server.c (myresume): Likewise.
15431 * target.c (set_desired_inferior): Likewise.
15433 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15435 * configure.ac: Simplify and improve check for socklen_t.
15436 * configure, config.in: Regenerate.
15438 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15440 * acconfig.h: Remove.
15441 * configure.ac: Add a test for socklen_t. Use three-argument
15442 AC_DEFINE throughout.
15443 * config.in: Regenerated using autoheader 2.59.
15444 * configure: Regenerated.
15446 * gdbreplay.c (socklen_t): Provide a default.
15447 (remote_open): Use socklen_t.
15448 * remote-utils.c (socklen_t): Provide a default.
15449 (remote_open): Use socklen_t.
15450 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15453 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15455 * linux-low.c (linux_read_memory, linux_write_memory)
15456 (linux_read_auxv): Likewise.
15457 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15458 (check_mem_write): Likewise.
15459 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15461 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15462 (registers_from_string, register_data): Likewise.
15463 * server.c (handle_query, main): Likewise.
15464 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15465 (decode_M_packet): Likewise.
15466 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15467 * target.h (struct target_ops): Update read_memory, write_memory,
15469 (read_inferior_memory, write_inferior_memory): Update.
15470 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15471 to unsigned char *.
15472 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15473 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15474 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15475 linux-s390-low.c, linux-sh-low.c: Update for changes in
15476 read_inferior_memory and the_low_target->breakpoint.
15478 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15480 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15481 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15482 * configure.srv: Add powerpc64-*-linux*.
15483 * linux-ppc64-low.c: New file.
15485 2005-05-23 Orjan Friberg <orjanf@axis.com>
15487 * linux-cris-low.c: New file with support for CRIS.
15488 * linux-crisv32-low.c: Ditto for CRISv32.
15489 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15490 (clean): Add reg-cris.c and reg-crisv32.c.
15491 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15492 reg-crisv32.o, and reg-crisv32.c to make rules.
15493 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15494 recognized targets.
15496 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15498 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15499 of sizeof (PTRACE_XFER_TYPE).
15500 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15502 2005-05-12 Orjan Friberg <orjanf@axis.com>
15504 * target.h (struct target_ops): Add insert_watchpoint,
15505 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15506 pointers for hardware watchpoint support.
15507 * linux-low.h (struct linux_target_ops): Ditto.
15508 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15509 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15510 to linux_target_ops.
15511 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15513 * server.c (main): Recognize 'Z' and 'z' packets.
15515 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15517 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15518 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15519 (the_low_target): Add new members.
15521 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15523 * proc-service.c (ps_lgetregs): Search all_processes instead of
15526 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15528 * server.c (start_inferior): Change return type to int.
15529 (attach_inferior): Change sigptr to int *.
15530 (handle_v_cont, handle_v_requests): Change signal to int *.
15531 (main): Change signal to int.
15533 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15535 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15536 * configure.srv: Add m32r*-*-linux*.
15537 * linux-m32r-low.c: New file.
15539 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15541 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15543 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15545 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15546 Take unsigned long arguments for PIDs.
15547 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15548 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15549 (wait_for_sigstop, linux_resume_one_process)
15550 (regsets_fetch_inferior_registers, linux_send_signal)
15551 (linux_read_auxv): Likewise. Update the types of variables holding
15552 PIDs. Update format string specifiers.
15553 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15554 * remote-utils.c (prepare_resume_reply): Likewise.
15555 * server.c (cont_thread, general_thread, step_thread)
15556 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15558 (handle_query): Update format specifiers.
15559 (handle_v_cont, main): Use strtoul for thread IDs.
15560 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15561 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15562 (general_thread, step_thread, thread_from_wait)
15563 (old_thread_from_wait): Update.
15564 * target.h (struct thread_resume): Use unsigned long for THREAD.
15565 (struct target_ops): Use unsigned long for arguments to attach and
15568 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15570 * acinclude.m4: Include bfd/bfd.m4 directly.
15571 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15572 <agriffis@toolchain.org>.
15573 * aclocal.m4, configure: Regenerated.
15575 2005-01-07 Andrew Cagney <cagney@gnu.org>
15577 * configure.ac: Rename configure.in, require autoconf 2.59.
15578 * configure: Re-generate.
15580 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15582 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15583 LIBS when finished.
15584 * aclocal.m4: Regenerated.
15585 * configure: Regenerated.
15587 2004-11-21 Andreas Schwab <schwab@suse.de>
15589 * linux-m68k-low.c (m68k_num_gregs): Define.
15590 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15591 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15592 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15593 (m68k_breakpoint_at): New. Add to the_low_target.
15595 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15596 srv_linux_thread_db to yes.
15598 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15600 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15601 (ARCH_SET_FS): Likewise.
15602 (ARCH_GET_FS): Likewise.
15603 (ARCH_GET_GS): Likewise.
15605 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15607 * linux-i386-low.c (ps_get_thread_area): New.
15608 * linux-x86-64-low.c (ps_get_thread_area): New.
15609 * linux-low.c: Include <sys/syscall.h>.
15610 (linux_kill_one_process): Don't kill the first thread here.
15611 (linux_kill): Kill the first thread here.
15612 (kill_lwp): New function.
15613 (send_sigstop, linux_send_signal): Use it.
15614 * proc-service.c: Clean up #ifdefs.
15615 (fpregset_info): Delete.
15616 (ps_lgetregs): Update and enable implementation.
15617 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15619 * remote-utils.c (struct sym_cache, symbol_cache): New.
15620 (input_interrupt): Print a clearer message.
15621 (async_io_enabled): New variable.
15622 (enable_async_io, disable_async_io): Use it. Update comments.
15623 (look_up_one_symbol): Use the symbol cache.
15624 * thread-db.c (thread_db_look_up_symbols): New function.
15625 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15627 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15629 * configure.in: Test for -rdynamic.
15630 * configure: Regenerated.
15631 * Makefile (INTERNAL_LDFLAGS): New.
15632 (gdbserver, gdbreplay): Use it.
15634 2004-09-02 Andrew Cagney <cagney@gnu.org>
15636 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15638 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15640 * linux-low.c (linux_wait): Clear all_processes list also.
15642 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15644 * linux-low.c: Include <errno.h>. Remove extern declaration of
15647 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15649 * gdbreplay.c, server.h, utils.c: Update copyright years.
15651 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15653 * server.c (main): Print child status or termination signal from
15654 variable 'signal', not 'sig'.
15656 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15658 * linux-low.c (linux_read_memory): Change return type to
15659 int. Check for and return error from ptrace().
15660 * target.c (read_inferior_memory): Change return type to int. Pass
15661 back return status from the_target->read_memory().
15662 * target.h (struct target_ops): Adapt *read_memory() prototype.
15664 (read_inferior_memory): Adapt prototype.
15665 * server.c (main): Return an error packet if
15666 read_inferior_memory() returns an error.
15668 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15670 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15671 Unify with other clean targets.
15673 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15675 * server.c (handle_v_cont): Call set_desired_inferior.
15677 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15679 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15681 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15683 * linux-low.c (linux_wait): Unblock async I/O.
15684 (linux_resume): Block and enable async I/O.
15685 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15686 * server.h (block_async_io, unblock_async_io): Add prototypes.
15688 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15690 * remote-utils.c (remote_open): Print a status notice after
15691 opening a TCP port.
15692 * server.c (attach_inferior): Print a status notice after
15695 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15697 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15699 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15701 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15703 * server.c, target.h: Update copyright years.
15705 2004-02-25 Roland McGrath <roland@redhat.com>
15707 * target.h (struct target_ops): New member `read_auxv'.
15708 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15709 * linux-low.c (linux_read_auxv): New function.
15710 (linux_target_ops): Initialize `read_auxv' member to that.
15712 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15714 Committed by Jim Blandy <jimb@redhat.com>.
15716 * linux-s390-low.c (s390_num_regs): Update.
15717 (s390_regmap): Remove control registers. Use __s390x__ predefine
15718 instead of GPR_SIZE to distiguish s390 and s390x targets.
15720 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15722 * linux-low.c: Update copyright year.
15723 (check_removed_breakpoint): Clear pending_is_breakpoint.
15724 (linux_set_resume_request, linux_queue_one_thread)
15725 (resume_status_pending_p): New functions.
15726 (linux_continue_one_thread): Use process->resume.
15727 (linux_resume): Only resume threads if there are no pending events.
15728 * linux-low.h (struct process_info): Add resume request
15731 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15733 * regcache.c (new_register_cache): Clear the allocated register
15734 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15736 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15738 * linux-low.c (linux_resume): Take a struct thread_resume *
15740 (linux_wait): Update call.
15741 (resume_ptr): New static variable.
15742 (linux_continue_one_thread): Renamed from
15743 linux_continue_one_process. Use resume_ptr.
15744 (linux_resume): Use linux_continue_one_thread.
15745 * server.c (handle_v_cont, handle_v_requests): New functions.
15746 (myresume): New function.
15747 (main): Handle 'v' case.
15748 * target.h (struct thread_resume): New type.
15749 (struct target_ops): Change argument of "resume" to struct
15751 (myresume): Delete macro.
15753 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15755 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15756 (uninstall): Support DESTDIR.
15758 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15760 * configure.srv: Add xscale*linux copy of arm*linux entry.
15762 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15764 * linux-arm-low.c (arm_reinsert_addr): New function.
15765 (the_low_target): Add arm_reinsert_addr.
15767 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15769 * mem-break.c: Remove whitespace at end of file.
15771 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15773 * configure.in: Check whether we need to prototype strerror.
15774 * server.h: Optionally prototype strerror.
15775 * gdbreplay.c (perror_with_name): Use strerror.
15776 * linux-low.c (linux_attach_lwp): Use strerror.
15777 * utils.c (perror_with_name): Use strerror.
15778 * config.in, configure: Regenerated.
15780 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15782 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15783 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15785 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15787 * Makefile.in (SFILES): Update.
15788 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15789 low-sun3.c: Remove files.
15791 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15793 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15794 (linux_detach_one_process, linux_detach): New functions.
15795 (linux_target_ops): Add linux_detach.
15796 * server.c (main): Handle 'D' packet.
15797 * target.h (struct target_ops): Add "detach" member.
15798 (detach_inferior): Define.
15800 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15802 From Kelley Cook <kelleycook@wideopenwest.com>:
15803 * configure.srv: Accept i[34567]86 variants.
15805 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15807 * linux-low.c (linux_wait_for_event): Correct comment typos.
15808 (linux_resume_one_process): Call check_removed_breakpoint.
15809 (linux_send_signal): New function.
15810 (linux_target_ops): Add linux_send_signal.
15811 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15813 * target.h (struct target_ops): Add send_signal.
15815 2003-05-29 Jim Blandy <jimb@redhat.com>
15817 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15818 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15819 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15820 away part of the register's value.
15822 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15824 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15825 (linux_wait_for_event, linux_init_signals): Likewise.
15827 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15829 * configure.in: Check for stdlib.h.
15830 * configure: Regenerated.
15831 * config.in: Regenerated.
15833 2003-01-04 Andreas Schwab <schwab@suse.de>
15835 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15837 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15839 * Makefile.in: Remove obsolete code.
15841 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15843 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15844 defined(PT_FPR0_HI).
15846 2002-11-17 Stuart Hughes <seh@zee2.com>
15848 * linux-arm-low.c (arm_num_regs): Increase.
15849 (arm_regmap): Include status register.
15851 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15853 * linux-low.c (register_addr): Remove incorrect -1 check.
15855 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15857 * linux-low.c (linux_create_inferior): Call setpgid. Return
15859 (unstopped_p, linux_signal_pid): Remove.
15860 (linux_target_ops): Remove linux_signal_pid.
15861 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15862 global instead of target method.
15863 * target.h (struct target_ops): Remove signal_pid. Update comment
15864 for create_inferior.
15865 * server.c (signal_pid): New variable.
15866 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15867 gdbserver. Set the child to be the foreground process group.
15868 (attach_inferior): Set signal_pid.
15870 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15872 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15874 2002-08-20 Jim Blandy <jimb@redhat.com>
15876 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15879 2002-08-01 Andrew Cagney <cagney@redhat.com>
15881 * Makefile.in: Make chill references obsolete.
15883 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15885 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15886 * configure: Regenerate.
15887 * config.in: Regenerate.
15889 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15891 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15892 (perror_with_name, remote_close, remote_open, expect, play): Static.
15894 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15896 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15897 byte offsets instead of an array of indexes.
15898 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15900 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15902 * regcache.c: Add comment.
15904 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15906 * thread-db.c: New file.
15907 * proc-service.c: New file.
15908 * acinclude.m4: New file.
15909 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15910 proc-service.o, and thread-db.o.
15911 (linux-low.o): Add USE_THREAD_DB.
15912 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15913 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15914 * aclocal.m4: Regenerated.
15915 * config.in: Regenerated.
15916 * configure: Regenerated.
15917 * configure.in: Check for proc_service.h, sys/procfs.h,
15918 thread_db.h, and linux/elf.h headrs.
15919 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15920 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15921 Check for -lthread_db and thread support.
15922 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15923 PowerPC, and SuperH.
15924 * i387-fp.c: Constify arguments.
15925 * i387-fp.h: Likewise.
15926 * inferiors.c: (struct thread_info): Renamed from
15927 `struct inferior_info'. Remove PID member. Use generic inferior
15928 list header. All uses updated.
15929 (inferiors, signal_pid): Removed.
15930 (all_threads): New variable.
15931 (get_thread): Define.
15932 (add_inferior_to_list): New function.
15933 (for_each_inferior): New function.
15934 (change_inferior_id): New function.
15935 (add_inferior): Removed.
15936 (remove_inferior): New function.
15937 (add_thread): New function.
15938 (free_one_thread): New function.
15939 (remove_thread): New function.
15940 (clear_inferiors): Use for_each_inferior and free_one_thread.
15941 (find_inferior): New function.
15942 (find_inferior_id): New function.
15943 (inferior_target_data): Update argument type.
15944 (set_inferior_target_data): Likewise.
15945 (inferior_regcache_data): Likewise.
15946 (set_inferior_regcache_data): Likewise.
15947 * linux-low.c (linux_bp_reinsert): Remove.
15948 (all_processes, stopping_threads, using_thrads)
15949 (struct pending_signals, debug_threads, pid_of): New.
15950 (inferior_pid): Replace with macro.
15951 (struct inferior_linux_data): Remove.
15952 (get_stop_pc, add_process): New functions.
15953 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15954 Use add_process and add_thread.
15955 (linux_attach_lwp): New function, based on old linux_attach. Use
15956 add_process and add_thread. Set stop_expected for new threads.
15957 (linux_attach): New function.
15958 (linux_kill_one_process): New function.
15959 (linux_kill): Kill all LWPs.
15960 (linux_thread_alive): Use find_inferior_id.
15961 (check_removed_breakpoints, status_pending_p): New functions.
15962 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15963 Update. Use WNOHANG. Wait for cloned processes also. Update process
15964 struct for the found process.
15965 (linux_wait_for_event): New function.
15966 (linux_wait): Use it. Support LWPs.
15967 (send_sigstop, wait_for_sigstop, stop_all_processes)
15968 (linux_resume_one_process, linux_continue_one_process): New functions.
15969 (linux_resume): Support LWPs.
15970 (REGISTER_RAW_SIZE): Remove.
15971 (fetch_register): Use register_size instead. Call supply_register.
15972 (usr_store_inferior_registers): Likewise. Call collect_register.
15973 Fix recursive case.
15974 (regsets_fetch_inferior_registers): Improve error message.
15975 (regsets_store_inferior_registers): Add debugging.
15976 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15977 (unstopped_p, linux_signal_pid): New functions.
15978 (linux_target_ops): Add linux_signal_pid.
15979 (linux_init_signals): New function.
15980 (initialize_low): Call it. Initialize using_threads.
15981 * regcache.c (inferior_regcache_data): Add valid
15983 (get_regcache): Fetch registers lazily. Add fetch argument
15984 and update all callers.
15985 (regcache_invalidate_one, regcache_invalidate): New
15987 (new_register_cache): Renamed from create_register_cache.
15988 Return the new regcache.
15989 (free_register_cache): Change argument to a void *.
15990 (registers_to_string, registers_from_string): Call get_regcache
15991 with fetch flag set.
15992 (register_data): Make static. Pass fetch flag to get_regcache.
15993 (supply_register): Call get_regcache with fetch flag clear.
15994 (collect_register): Call get_regcache with fetch flag set.
15995 (collect_register_as_string): New function.
15996 * regcache.h: Update.
15997 * remote-utils.c (putpkt): Flush after debug output and use
15999 Handle input interrupts while waiting for an ACK.
16000 (input_interrupt): Use signal_pid method.
16001 (getpkt): Flush after debug output and use stderr.
16002 (outreg): Use collect_register_as_string.
16003 (new_thread_notify, dead_thread_notify): New functions.
16004 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16005 and general_thread.
16006 (look_up_one_symbol): Flush after debug output.
16007 * server.c (step_thread, server_waiting): New variables.
16008 (start_inferior): Don't use signal_pid. Update call to mywait.
16009 (attach_inferior): Update call to mywait.
16010 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16011 (main): Don't fetch/store registers explicitly. Use
16012 set_desired_inferior. Support proposed ``Hs'' packet. Update
16014 * server.h: Update.
16015 (struct inferior_list, struct_inferior_list_entry): New.
16016 * target.c (set_desired_inferior): New.
16017 (write_inferior_memory): Constify.
16018 (mywait): New function.
16019 * target.h: Update.
16020 (struct target_ops): New signal_pid method.
16021 (mywait): Removed macro, added prototype.
16023 * linux-low.h (regset_func): Removed.
16024 (regset_fill_func, regset_store_func): New.
16025 (enum regset_type): New.
16026 (struct regset_info): Add type field. Use new operation types.
16027 (struct linux_target_ops): stop_pc renamed to get_pc.
16028 Add decr_pc_after_break and breakpoint_at.
16029 (get_process, get_thread_proess, get_process_thread)
16030 (strut process_info, all_processes, linux_attach_lwp)
16031 (thread_db_init): New.
16033 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16034 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16035 (the_low_target): Add new members.
16036 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16037 (i386_store_fpxregset): Constify.
16038 (target_regsets): Add new kind identifier.
16039 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16040 (i386_set_pc): Add debugging.
16041 (i386_breakpoint_at): New function.
16042 (the_low_target): Add new members.
16043 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16044 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16045 (mips_breakpoint_at): New.
16046 (the_low_target): Add new members.
16047 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16048 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16049 (the_low_target): Add new members.
16050 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16051 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16052 (the_low_target): Add new members.
16053 * linux-x86-64-low.c (target_regsets): Add new kind
16056 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16058 From Martin Pool <mbp@samba.org>:
16059 * server.c (gdbserver_usage): New function.
16062 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16064 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16065 stop_at -> stop_pc.
16067 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16069 * Makefile.in: Remove obsolete code.
16071 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16073 * linux-low.c (regsets_fetch_inferior_registers),
16074 (regsets_store_inferior_registers): Removed cast to int from
16076 * regcache.h: Added declaration of struct inferior_info.
16078 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16080 * inferiors.c (struct inferior_info): Add regcache_data.
16081 (add_inferior): Call create_register_cache.
16082 (clear_inferiors): Call free_register_cache.
16083 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16084 * regcache.c (struct inferior_regcache_data): New.
16085 (registers): Remove.
16086 (get_regcache): New function.
16087 (create_register_cache, free_register_cache): New functions.
16088 (set_register_cache): Don't initialize the register cache here.
16089 (registers_to_string, registers_from_string, register_data): Call
16091 * regcache.h: Add prototypes.
16092 * server.h: Likewise.
16094 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16096 * mem-break.c: New file.
16097 * mem-break.h: New file.
16098 * Makefile.in: Add mem-break.o rule; update server.h
16100 * inferiors.c (struct inferior_info): Add target_data
16102 (clear_inferiors): Free target_data member if set.
16103 (inferior_target_data, set_inferior_target_data): New functions.
16104 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16105 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16106 * linux-low.c (linux_bp_reinsert): New variable.
16107 (struct inferior_linux_data): New.
16108 (linux_create_inferior): Use set_inferior_target_data.
16109 (linux_attach): Likewise. Call add_inferior.
16110 (linux_wait_for_one_inferior): New function.
16111 (linux_wait): Call it.
16112 (linux_write_memory): Add const.
16113 (initialize_low): Call set_breakpoint_data.
16114 * linux-low.h (struct linux_target_ops): Add breakpoint
16116 * server.c (attach_inferior): Remove extra add_inferior
16118 * server.h: Include mem-break.h. Update inferior.c
16120 * target.c (read_inferior_memory)
16121 (write_inferior_memory): New functions.
16122 * target.h (read_inferior_memory)
16123 (write_inferior_memory): Change macros to prototypes.
16124 (struct target_ops): Update comments. Add const to write_memory
16127 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16129 * linux-low.c (usr_store_inferior_registers): Support
16130 registers which are allowed to fail to store.
16131 * linux-low.h (linux_target_ops): Likewise.
16132 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16133 (ppc_cannot_store_register): FPSCR may not be storable.
16135 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16137 * server.h: Include <string.h> if HAVE_STRING_H.
16138 * ChangeLog: Correct paths in last ChangeLog entry.
16140 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16142 * linux-low.h: Remove obsolete prototypes.
16143 (struct linux_target_ops): New.
16144 (extern the_low_target): New.
16145 * linux-low.c (num_regs, regmap): Remove declarations.
16146 (register_addr): Use the_low_target explicitly.
16147 (fetch_register): Likewise.
16148 (usr_fetch_inferior_registers): Likewise.
16149 (usr_store_inferior_registers): Likewise.
16150 * linux-arm-low.c (num_regs): Remove.
16151 (arm_num_regs): Define.
16152 (arm_regmap): Renamed from regmap, made static.
16153 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16155 (arm_cannot_store_register): Renamed from cannot_store_register,
16157 (the_low_target): New.
16158 * linux-i386-low.c (num_regs): Remove.
16159 (i386_num_regs): Define.
16160 (i386_regmap): Renamed from regmap, made static.
16161 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16163 (i386_cannot_store_register): Renamed from cannot_store_register,
16165 (the_low_target): New.
16166 * linux-ia64-low.c (num_regs): Remove.
16167 (ia64_num_regs): Define.
16168 (ia64_regmap): Renamed from regmap, made static.
16169 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16171 (ia64_cannot_store_register): Renamed from cannot_store_register,
16173 (the_low_target): New.
16174 * linux-m68k-low.c (num_regs): Remove.
16175 (m68k_num_regs): Define.
16176 (m68k_regmap): Renamed from regmap, made static.
16177 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16179 (m68k_cannot_store_register): Renamed from cannot_store_register,
16181 (the_low_target): New.
16182 * linux-mips-low.c (num_regs): Remove.
16183 (mips_num_regs): Define.
16184 (mips_regmap): Renamed from regmap, made static.
16185 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16187 (mips_cannot_store_register): Renamed from cannot_store_register,
16189 (the_low_target): New.
16190 * linux-ppc-low.c (num_regs): Remove.
16191 (ppc_num_regs): Define.
16192 (ppc_regmap): Renamed from regmap, made static.
16193 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16195 (ppc_cannot_store_register): Renamed from cannot_store_register,
16197 (the_low_target): New.
16198 * linux-s390-low.c (num_regs): Remove.
16199 (s390_num_regs): Define.
16200 (s390_regmap): Renamed from regmap, made static.
16201 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16203 (s390_cannot_store_register): Renamed from cannot_store_register,
16205 (the_low_target): New.
16206 * linux-sh-low.c (num_regs): Remove.
16207 (sh_num_regs): Define.
16208 (sh_regmap): Renamed from regmap, made static.
16209 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16211 (sh_cannot_store_register): Renamed from cannot_store_register,
16213 (the_low_target): New.
16214 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16215 (the_low_target): New.
16217 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16219 * Makefile.in: Add stamp-h target.
16220 * configure.in: Create stamp-h.
16221 * configure: Regenerated.
16223 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16225 * inferiors.c: New file.
16226 * target.c: New file.
16227 * target.h: New file.
16228 * Makefile.in: Add target.o and inferiors.o. Update
16230 * linux-low.c (inferior_pid): New static variable,
16231 moved from server.c.
16232 (linux_create_inferior): Renamed from create_inferior.
16233 Call add_inferior. Return 0 on success instead of a PID.
16234 (linux_attach): Renamed from myattach.
16235 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16236 (linux_thread_alive): Renamed from mythread_alive.
16237 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16239 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16240 (regsets_store_inferior_registers): Correct error message.
16241 Add missing ``return 0''.
16242 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16243 (linux_store_registers): Renamed from store_inferior_registers.
16244 (linux_read_memory): Renamed from read_inferior_memory.
16245 (linux_write_memory): Renamed from write_inferior_memory.
16246 (linux_target_ops): New structure.
16247 (initialize_low): Call set_target_ops ().
16248 * remote-utils.c (unhexify): New function.
16249 (hexify): New function.
16250 (input_interrupt): Send signals to ``signal_pid''.
16251 * server.c (inferior_pid): Remove.
16252 (start_inferior): Update create_inferior call.
16253 (attach_inferior): Call add_inferior.
16254 (handle_query): New function.
16255 (main): Call handle_query for `q' packets.
16256 * server.h: Include "target.h". Remove obsolete prototypes.
16257 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16259 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16261 * Makefile.in: Add WARN_CFLAGS. Update configury
16263 * configure.in: Check for <string.h>
16264 * configure: Regenerate.
16265 * config.in: Regenerate.
16266 * gdbreplay.c: Include needed system headers.
16267 (remote_open): Remove strchr prototype.
16268 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16269 * regcache.c (supply_register): Change buf argument to const void *.
16270 (supply_register_by_name): Likewise.
16271 (collect_register): Change buf argument to void *.
16272 (collect_register_by_name): Likewise.
16273 * regcache.h: Add missing prototypes.
16274 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16275 * server.c (handle_query): New function.
16276 (attached): New static variable, moved out of main.
16277 (main): Quiet longjmp clobber warnings.
16278 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16279 * utils.c (error): Remove NORETURN.