1 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
4 the word size. Add comment.
5 (s390_get_wordsize): New function.
6 (s390_arch_setup): No longer select a temporary tdesc to fetch the
7 pswm with it. Instead, use s390_get_wordsize to determine the
8 word size first and derive the correct tdesc from that directly.
10 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12 * Makefile.in: Include silent-rules.mk.
13 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
14 (COMPILE): Add ECHO_CXX.
15 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
16 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
17 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
18 (version-generated.c): Add ECHO_GEN.
19 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
20 (IPAGENT_COMPILE): Add ECHO_CXX.
21 (%-generated.c): Add ECHO_REGDAT.
23 2018-03-14 Tom Tromey <tom@tromey.com>
26 * ax.c (ax_printf): Special case for NULL.
28 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
30 * linux-low.c (linux_qxfer_libraries_svr4): Use
31 xml_escape_text_append.
33 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
35 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
37 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
39 * server.c (handle_general_set): Remove unnecessary xstrdup.
41 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
43 * server.c (parse_debug_format_options): Adjust to
44 delim_string_to_char_ptr_vec changes.
45 * thread-db.c (thread_db_load_search): Adjust to
46 dirnames_to_char_ptr_vec changes.
48 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
50 * target.h (target_enable_btrace, target_disable_btrace)
51 (target_read_btrace, target_read_btrace_conf): Turn macro into
52 inline function. Throw error if target method is not defined.
53 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
54 check for btrace target method. Be prepared to handle exceptions
55 from btrace target methods.
57 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
59 * server.c (captured_main): Change order of error message printed
60 when the current working directory cannot be found.
62 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
64 * server.c: Include "filenames.h" and "pathstuff.h".
65 (program_name): Delete variable.
66 (program_path): New anonymous class.
67 (get_exec_wrapper): Use "program_path" instead of
69 (handle_v_run): Likewise.
70 (captured_main): Likewise.
71 (process_serial_event): Likewise.
73 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
75 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
76 (OBJS): Add "pathstuff.o".
77 * server.c (current_directory): New global variable.
78 (captured_main): Initialize "current_directory".
80 2018-02-26 Alan Hayward <alan.hayward@arm.com>
82 * tdesc.c: Use common/tdesc.h.
85 2018-02-20 Alan Hayward <alan.hayward@arm.com>
86 Simon Marchi <simon.marchi@ericsson.com>
88 * Makefile.in: Switch order of make rules.
90 2018-02-19 Alan Hayward <alan.hayward@arm.com>
92 * Makefile.in: Add common directory in build.
93 * configure.ac: Add common reference.
94 * configure: Regenerate.
96 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
98 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
99 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
100 * spu-low.c (spu_target_ops): Likewise.
101 * win32-low.c (win32_target_ops): Likewise.
102 * server.c (supported_btrace_packets): Report packets unconditionally.
103 * target.h (target_ops) <supports_btrace>: Remove.
104 (target_supports_btrace): Remove.
106 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
108 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
109 (handle_btrace_disable): Change return type to void. Use exceptions
111 (handle_btrace_general_set): Catch exception and copy message to
114 2018-02-08 Tom Tromey <tom@tromey.com>
116 * linux-low.c (install_software_single_step_breakpoints): Use
118 * inferiors.c (make_cleanup_restore_current_thread): Remove.
119 (do_restore_current_thread_cleanup): Remove.
120 * gdbthread.h (make_cleanup_restore_current_thread): Don't
123 2018-02-08 Tom Tromey <tom@tromey.com>
125 * mem-break.c (set_raw_breakpoint_at): Use
126 gdb::unique_xmalloc_ptr.
128 2018-01-30 Pedro Alves <palves@redhat.com>
131 * target.c (target_terminal::terminal_state): Rename to ...
132 (target_terminal::m_terminal_state): ... this.
134 2018-01-19 James Clarke <jrtc27@jrtc27.com>
136 * linux-low.c (handle_extended_wait): Surround call to
137 thread_db_notice_clone with #ifdef USE_THREAD_DB.
139 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
141 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
142 linux_ptrace_attach_fail_reason_string now returning an
144 (linux_attach): Likewise.
145 * thread-db.c (attach_thread): Likewise.
147 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
150 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
151 checking for fs_base/gs_base fields in struct user_regs_struct.
152 * configure: Regenerate.
154 2018-01-16 Yao Qi <yao.qi@linaro.org>
157 * linux-low.c (fetch_register): Call supply_register instead of
160 2018-01-08 Yao Qi <yao.qi@linaro.org>
161 Simon Marchi <simon.marchi@ericsson.com>
163 * Makefile.in (OBS): Remove selftest.o.
164 * configure.ac: Set srv_selftest_objs if $development is true.
165 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
166 * configure: Re-generated.
167 * server.c (captured_main): Wrap variable selftest_filter with
170 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
172 * server.c (parse_debug_format_options): Return std::string.
173 (handle_monitor_command, captured_main): Adjust.
175 2018-01-05 Pedro Alves <palves@redhat.com>
178 * server.c (captured_main): Pass quiet=false to
179 save_original_signals_state.
181 2018-01-01 Joel Brobecker <brobecker@adacore.com>
183 * gdbreplay.c (gdbreplay_version): Update copyright year in
185 * server.c (gdbserver_version): Likewise.
187 2017-12-08 Tom Tromey <tom@tromey.com>
189 * ax.c (ax_printf): Update.
191 2017-12-07 Yao Qi <yao.qi@linaro.org>
193 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
194 aarch64_linux_read_description.
195 * linux-amd64-ipa.c (idx2mask): New array.
196 (get_ipa_tdesc): Move idx2mask out.
197 (initialize_low_tracepoint): Initialize target descriptions.
198 * linux-i386-ipa.c (idx2mask): New array.
199 (get_ipa_tdesc): Move idx2mask out.
200 (initialize_low_tracepoint): Initialize target descriptions.
202 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
204 * tdesc.c (struct tdesc_type): Change return type.
205 (tdesc_add_flag): Change parameter type.
206 (tdesc_add_bitfield): Likewise.
207 (tdesc_add_field): Likewise.
208 (tdesc_set_struct_size): Likewise.
210 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
212 * regcache.c (registers_to_string): Remove unused variable.
214 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
216 * inferiors.c (for_each_inferior_with_data): Remove.
217 * inferiors.h (for_each_inferior_with_data): Remove.
218 * server.c (handle_qxfer_threads_worker): Change parameter type.
219 (handle_qxfer_threads_proper): Use for_each_thread.
221 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
223 * inferiors.c (for_each_inferior): Remove.
224 (clear_inferiors): Use for_each_thread.
225 * inferiors.h (for_each_inferior): Remove.
226 * linux-low.c (linux_wait_for_event_filtered): Use
228 (linux_stabilize_threads): Likewise.
229 * regcache.c (regcache_release): Likewise.
230 * server.c (gdb_wants_all_threads_stopped): Likewise.
231 (clear_pending_status_callback): Remove.
232 (handle_status): Use for_each_thread.
233 (captured_main): Likewise.
234 * win32-low.c (child_init_thread_list): Likewise.
235 (win32_clear_inferiors): Likewise.
236 (fake_breakpoint_event): Likewise.
238 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
240 * inferiors.h (find_inferior): Remove.
241 * inferiors.c (find_inferior): Remove.
243 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
245 * linux-low.c (resume_status_pending_p): Update comment.
246 (need_step_over_p): Update comment.
248 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
250 * linux-low.c (proceed_one_lwp): Return void, change parameter
252 (unsuspend_and_proceed_one_lwp): Likewise.
253 (proceed_all_lwps): Use for_each_thread.
254 (unstop_all_lwps): Likewise.
256 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
258 * linux-low.c (linux_resume_one_thread): Return void, take
260 (linux_resume): Use for_each_thread.
262 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
264 * linux-low.c (send_sigstop_callback): Return void, change
265 parameter type. Rename to...
266 (send_sigstop): ... this.
267 (suspend_and_send_sigstop_callback): Return void, change parameter
269 (suspend_and_send_sigstop): ... this.
270 (stop_all_lwps): Use for_each_thread.
272 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
274 * linux-low.c (lwp_running): Return bool, remove unused
276 (linux_stabilize_threads): Use find_thread.
278 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
280 * linux-low.c (select_singlestep_lwp_callback): Remove.
281 (count_events_callback): Remove.
282 (select_event_lwp_callback): Remove.
283 (select_event_lwp): Use find_thread/for_each_thread.
285 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
287 * linux-low.c (not_stopped_callback): Return bool, take filter
289 (linux_wait_for_event_filtered): Use find_thread.
290 (linux_wait_1): Likewise.
292 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
294 * linux-low.c (same_lwp): Remove.
295 (find_lwp_pid): Use find_thread.
297 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
299 * linux-low.c (delete_lwp_callback): Remove.
300 (linux_mourn): Use for_each_thread.
302 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
304 * linux-low.c (linux_detach_lwp_callback): Return void, remove
305 args parameter, don't check for pid.
306 (linux_detach): Use for_each_thread.
308 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
310 * linux-low.c (struct counter): Remove.
311 (second_thread_of_pid_p): Remove.
312 (last_thread_of_process_p): Use find_thread.
314 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
316 * inferiors.c (find_inferior_in_random): Remove.
317 * inferiors.h (find_inferior_in_random): Remove.
318 * linux-low.c (status_pending_p_callback): Return bool, accept
319 parameter ptid directly.
320 (linux_wait_for_event_filtered): Use find_thread_in_random.
321 (linux_wait_1): Likewise.
323 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
325 * inferiors.c (find_inferior_id): Remove.
326 (find_thread_ptid): Move implemention from find_inferior_id to
328 * inferiors.h (find_inferior_id): Remove.
329 * server.c (handle_status): Use find_thread_ptid.
330 (process_serial_event): Likewise.
331 * thread-db.c (find_one_thread): Likewise.
332 (thread_db_thread_handle): Likewise.
333 * win32-low.c (thread_rec): Likewise.
334 (child_delete_thread): Likewise.
335 (win32_thread_alive): Likewise.
336 (get_child_debug_event): Likewise.
338 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
340 * linux-mips-low.c (update_watch_registers_callback): Return
341 void, remove pid_p parameter, don't check for pid.
342 (mips_insert_point, mips_remove_point): Use for_each_thread.
344 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
346 * lynx.low (lynx_delete_thread_callback): Remove.
347 (lynx_mourn): Use for_each_thread.
349 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
351 * regcache.c (regcache_invalidate_one): Remove.
352 (regcache_invalidate_pid): use for_each_thread.
354 2017-11-26 Tom Tromey <tom@tromey.com>
356 * linux-low.c (linux_create_inferior): Update.
358 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
360 * spu-low.c (spu_create_inferior): Fix typo in argument name.
362 2017-11-24 Alan Hayward <alan.hayward@arm.com>
364 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
365 * linux-aarch64-low.c (initialize_low_arch): Call init func.
366 * linux-aarch64-tdesc-selftest.c: New file.
367 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
369 2017-11-24 Alan Hayward <alan.hayward@arm.com>
371 * configure.srv: Add new file.
372 * linux-aarch64-low.c (initialize_low_arch): Call init func.
373 * linux-aarch64-tdesc-selftest.c: New file.
374 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
376 2017-11-24 Alan Hayward <alan.hayward@arm.com>
378 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
379 * linux-aarch64-low.c (initialize_low_arch): Remove init.
380 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
382 2017-11-24 Alan Hayward <alan.hayward@arm.com>
384 * configure.srv: Add new files.
385 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
386 aarch64_linux_read_description.
387 * linux-aarch64-low.c (aarch64_linux_read_description):
388 Merge with aarch64_arch_setup.
389 (aarch64_arch_setup): Call aarch64_linux_read_description.
390 * linux-aarch64-tdesc.c: New file.
391 * linux-aarch64-tdesc.h: New file.
393 2017-11-24 Yao Qi <yao.qi@linaro.org>
395 * configure.srv: Set $srv_regobj for tic6x-linux.
396 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
397 (tic6x_read_description): Move some code to tic6x_arch_setup.
398 (tic6x_tdesc_test): New function.
399 (initialize_low_arch): Call selftests::register_test.
401 2017-11-22 Yao Qi <yao.qi@linaro.org>
403 * remote-utils.c (prepare_resume_reply): Use memcpy.
405 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
407 * linux-low.c (kill_one_lwp_callback): Return void, take
408 argument directly, don't filter on pid.
409 (linux_kill): Use for_each_thread.
411 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
413 * linux-low.c (need_step_over_p): Return bool, remove dummy
415 (linux_resume, proceed_all_lwps): Use find_thread.
417 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
419 * linux-low.c (resume_status_pending_p): Return bool, remove
421 (linux_resume): Use find_thread.
423 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
425 * linux-low.c (struct thread_resume_array): Remove.
426 (linux_set_resume_request): Return void, take arguments
428 (linux_resume): Use for_each_thread.
430 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
432 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
433 return bool, remove data argument.
434 (linux_stabilize_threads): Use find_thread.
436 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
438 * linux-low.c (unsuspend_one_lwp): Remove.
439 (unsuspend_all_lwps): Use for_each_thread, inline code from
442 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
444 * gdbthread.h (find_thread): Add overload with ptid_t filter.
445 * linux-low.c (struct iterate_over_lwps_args): Remove.
446 (iterate_over_lwps_filter): Remove.
447 (iterate_over_lwps): Use find_thread.
449 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
451 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
452 (linux_handle_new_gdb_connection): Use for_each_thread, inline
453 code from reset_lwp_ptrace_options_callback.
455 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
457 * linux-arm-low.c (struct update_registers_data): Remove.
458 (update_registers_callback): Return void, take arguments
459 directly, don't check thread's pid.
460 (arm_insert_point, arm_remove_point): Use for_each_thread.
462 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
464 * win32-low.c (continue_one_thread): Return void, take argument
466 (child_continue): Use for_each_thread.
468 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
470 * win32-i386-low.c (update_debug_registers_callback): Rename
472 (update_debug_registers): ... this, return void, remove pid_p arg.
473 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
475 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
477 * inferiors.h (struct process_info): Add constructor, initialize
479 <syscalls_to_catch>: Change type to std::vector<int>.
480 * inferiors.c (add_process): Allocate process_info with new.
481 (remove_process): Free process_info with delete.
482 * linux-low.c (handle_extended_wait): Adjust.
483 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
484 * server.c (handle_general_set): Adjust.
486 2017-11-16 Pedro Alves <palves@redhat.com>
488 * remote-utils.c (remote_close): Block SIGIO signals instead of
489 uninstalling the SIGIO handler.
491 2017-11-16 Alan Hayward <alan.hayward@arm.com>
493 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
495 2017-11-16 Yao Qi <yao.qi@linaro.org>
497 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
498 (tic6x_store_gregset): Likewise.
499 (tic6x_usrregs_info): Move it up.
501 2017-11-15 Alan Hayward <alan.hayward@arm.com>
503 * Makefile.in: Update arch rules.
504 * configure.srv: Explicitly mark arch/ files.
506 2017-11-13 Andreas Schwab <schwab@suse.de>
508 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
510 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
512 2017-11-06 Pedro Alves <palves@redhat.com>
514 * config.in, configure: Regenerate.
516 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
518 * target.c (struct thread_search): Remove.
519 (thread_search_callback): Remove.
520 (prepare_to_access_memory): Use for_each_thread instead of
521 find_inferior. Inline code from thread_search_callback.
523 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
525 * server.c (struct visit_actioned_threads_data): Remove.
526 (visit_actioned_threads): Change prototype to take arguments
528 (resume): Use find_thread instead of find_inferior.
530 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
532 * server.c (queue_stop_reply_callback): Change prototype, return
534 (find_status_pending_thread_callback): Remove.
535 (handle_status): Replace find_inferior with find_thread and
538 2017-10-25 Alan Hayward <alan.hayward@arm.com>
540 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
542 (aarch64_store_gregset): Likewise.
543 (aarch64_fill_fpregset): Likewise.
544 (aarch64_store_fpregset): Likewise.
546 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
548 * gdbthread.h (find_thread, for_each_thread): New functions.
549 * inferiors.c (thread_of_pid): Remove.
550 (find_any_thread_of_pid): Use find_thread.
551 * linux-low.c (num_lwps): Use for_each_thread.
553 2017-10-17 Yao Qi <yao.qi@linaro.org>
555 * Makefile.in: Remove one rule.
556 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
558 2017-10-17 Yao Qi <yao.qi@linaro.org>
560 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
561 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
563 2017-10-17 Yao Qi <yao.qi@linaro.org>
565 * configure.srv: Rename arm.o with arch/arm.o.
567 2017-10-17 Yao Qi <yao.qi@linaro.org>
569 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
570 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
571 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
572 (arch-i386.o, arch-amd64.o): Remove rules.
573 (arch/%.o): New rule.
574 Update POSTCOMPILE and COMPILE.pre.
575 * configure.ac: Invoke AC_CONFIG_COMMANDS.
576 * configure: Re-generated.
577 * configure.srv: Replace arch-i386.o with arch/i386.o.
578 Replace arch-amd64.o with arch/amd64.o.
580 2017-10-16 Yao Qi <yao.qi@linaro.org>
582 * configure: Regenerated.
584 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
586 * inferiors.h: (struct inferior_list): Remove.
587 (struct inferior_list_entry); Remove.
588 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
589 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
590 get_first_inferior): Remove.
591 (for_each_inferior, for_each_inferior_with_data, find_inferior,
592 find_inferior_id, find_inferior_in_random): Change signature.
593 * inferiors.c (all_threads): Change type to
594 std::list<thread_info *>.
595 (get_thread): Remove macro.
596 (find_inferior, find_inferior_id): Change signature, implement
598 (find_inferior_in_random): Change signature, implement using
599 find_thread_in_random.
600 (for_each_inferior, for_each_inferior_with_data): Change
601 signature, implement using for_each_thread.
602 (add_inferior_to_list, remove_inferior): Remove.
603 (add_thread, get_first_thread, thread_of_pid,
604 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
605 (get_first_inferior, one_inferior_p, clear_inferior_list):
607 (clear_inferiors, get_thread_process): Update.
608 * gdbthread.h: Include <list>.
609 (struct thread_info) <entry>: Remove field.
611 (all_threads): Change type to std::list<thread_info *>.
612 (get_first_inferior): Add doc.
613 (find_thread, for_each_thread, find_thread_in_random): New
615 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
616 * linux-arm-low.c (update_registers_callback): Update.
617 * linux-low.c (second_thread_of_pid_p): Update.
618 (kill_one_lwp_callback, linux_detach_lwp_callback,
619 delete_lwp_callback, status_pending_p_callback, same_lwp,
620 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
621 iterate_over_lwps, not_stopped_callback,
622 resume_stopped_resumed_lwps, count_events_callback,
623 select_singlestep_lwp_callback, select_event_lwp_callback,
624 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
625 suspend_and_send_sigstop_callback, wait_for_sigstop,
626 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
627 lwp_running, linux_set_resume_request, resume_status_pending_p,
628 need_step_over_p, start_step_over, linux_resume_one_thread,
629 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
630 reset_lwp_ptrace_options_callback): Update.
631 * linux-mips-low.c (update_watch_registers_callback): Update.
632 * regcache.c (regcache_invalidate_one, regcache_invalidate):
634 (free_register_cache_thread_one): Remove.
635 (regcache_release): Update.
636 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
637 handle_qxfer_threads_worker): Update.
638 (handle_query): Update, use list iterator.
639 (visit_actioned_threads, handle_pending_status,
640 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
641 clear_pending_status_callback, set_pending_status_callback,
642 find_status_pending_thread_callback, handle_status,
643 process_serial_event): Update.
644 * target.c (thread_search_callback): Update.
645 * thread-db.c (thread_db_get_tls_address): Update.
646 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
648 * win32-i386-low.c (update_debug_registers_callback): Update.
649 * win32-low.c (delete_thread_info, child_delete_thread,
650 continue_one_thread, suspend_one_thread,
651 get_child_debug_event): Adjust.
653 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
655 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
656 * inferiors.h: Include <list>.
657 (struct process_info) <entry>: Remove field.
659 (pid_of): Change macro to function.
660 (ptid_of, lwpid_of): Remove macro.
661 (all_processes): Change type to std::list<process_info *>.
662 (ALL_PROCESSES): Remove macro.
663 (for_each_process, find_process): New function.
664 * inferiors.c (all_processes): Change type to
665 std::list<process_info *>.
666 (find_thread_process): Adjust.
667 (add_process): Likewise.
668 (remove_process): Likewise.
669 (find_process_pid): Likewise.
670 (get_first_process): Likewise.
671 (started_inferior_callback): Remove.
672 (have_started_inferiors_p): Adjust.
673 (attached_inferior_callback): Remove.
674 (have_attached_inferiors_p): Adjust.
675 * linux-low.c (check_zombie_leaders): Likewise.
676 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
677 (x86_linux_update_xmltarget): Adjust.
678 * server.c (handle_query): Likewise.
679 (gdb_reattached_process): Remove.
680 (handle_status): Adjust.
681 (kill_inferior_callback): Likewise.
682 (detach_or_kill_inferior): Remove.
683 (print_started_pid): Likewise.
684 (print_attached_pid): Likewise.
685 (detach_or_kill_for_exit): Update.
686 (process_serial_event): Likewise.
687 * linux-arm-low.c (arm_new_fork): Likewise.
689 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
691 * dll.h: Include <list>.
692 (struct dll_info): Add constructor.
693 <entry>: Remove field.
694 (all_dlls): Change type to std::list<dll_info>.
695 * dll.c: Include <algorithm>.
696 (get_dll): Remove macro.
697 (all_dlls): Change type to std::list<dll_info *>.
698 (free_one_dll): Remove.
699 (match_dll): Likewise.
700 (loaded_dll): Adjust.
701 (unloaded_dll): Adjust to all_dlls type change, use
702 std::find_if. Inline code from match_dll.
703 (clear_dlls): Adjust to all_dlls type change.
704 * server.c (emit_dll_description): Remove.
705 (handle_qxfer_libraries): Adjust to all_dlls type change,
706 integrate emit_dll_description's functionality.
708 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
710 * linux-low.h (struct linux_target_ops) <delete_process>: New
712 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
713 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
714 (struct linux_target_ops): Add delete_process callback.
715 * linux-arm-low.c (arm_delete_process): New.
716 (struct linux_target_ops): Add delete_process callback.
717 * linux-bfin-low.c (struct linux_target_ops): Likewise.
718 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
719 * linux-m32r-low.c (struct linux_target_ops): Likewise.
720 * linux-mips-low.c (mips_linux_delete_process): New.
721 (struct linux_target_ops): Add delete_process callback.
722 * linux-ppc-low.c (struct linux_target_ops): Likewise.
723 * linux-s390-low.c (struct linux_target_ops): Likewise.
724 * linux-sh-low.c (struct linux_target_ops): Likewise.
725 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
726 * linux-tile-low.c (struct linux_target_ops): Likewise.
727 * linux-x86-low.c (x86_linux_delete_process): New.
728 (struct linux_target_ops): Add delete_process callback.
729 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
731 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
733 * linux-aarch64-low.c (the_low_target): Add thread delete
735 * linux-arm-low.c (arm_delete_thread): New function.
736 (the_low_target): Add thread delete callback.
737 * linux-bfin-low.c (the_low_target): Likewise.
738 * linux-crisv32-low.c (the_low_target): Likewise.
739 * linux-low.c (delete_lwp): Invoke delete_thread callback if
741 * linux-low.h (struct linux_target_ops) <delete_thread>: New
743 * linux-m32r-low.c (the_low_target): Add thread delete callback.
744 * linux-mips-low.c (mips_linux_delete_thread): New function.
745 (the_low_target): Add thread delete callback.
746 * linux-ppc-low.c (the_low_target): Likewise.
747 * linux-s390-low.c (the_low_target): Likewise.
748 * linux-sh-low.c (the_low_target): Likewise.
749 * linux-tic6x-low.c (the_low_target): Likewise.
750 * linux-tile-low.c (the_low_target): Likewise.
751 * linux-x86-low.c (the_low_target): Likewise.
752 * linux-xtensa-low.c (the_low_target): Likewise.
754 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
756 * win32-low.c: Include "common-inferior.h".
758 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
760 * inferiors.c (set_inferior_cwd): New function.
761 * server.c (handle_general_set): Handle QSetWorkingDir packet.
762 (handle_query): Inform that QSetWorkingDir is supported.
763 * win32-low.c (create_process): Pass the inferior's cwd to
766 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
768 * inferiors.c (current_inferior_cwd): New global variable.
769 (get_inferior_cwd): New function.
770 * inferiors.h (struct process_info) <cwd>: New field.
772 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
774 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
775 (OBS): Add gdb_tilde_expand.o.
777 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
779 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
780 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
782 2017-09-29 Pedro Alves <palves@redhat.com>
784 * ax.c (gdb_parse_agent_expr): Constify.
785 * ax.h (gdb_parse_agent_expr): Constify.
786 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
788 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
789 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
790 * remote-utils.h (read_ptid): Constify.
791 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
792 (process_point_options, process_serial_event): Constify.
793 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
794 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
795 (cmd_qtbuffer): Constify.
797 2017-09-29 Pedro Alves <palves@redhat.com>
799 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
802 2017-09-29 Pedro Alves <palves@redhat.com>
804 * linux-low.c (handle_extended_wait): Pass parent thread instead
805 of process to thread_db_notice_clone.
806 * linux-low.h (thread_db_notice_clone): Replace parent process
807 parameter with parent thread parameter.
808 * thread-db.c (find_one_thread): Add comment.
809 (thread_db_notice_clone): Replace parent process parameter with
810 parent thread parameter. Temporarily switch to the parent thread.
812 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
814 * gdbthread.h: Include "common-gdbthread.h".
815 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
816 "if" when validating the ptid.
817 * remote-utils.c: Include "gdbthread.h".
818 (prepare_resume_reply): Use "switch_to_thread".
819 * target.c (done_accessing_memory): Likewise.
821 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
823 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
824 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
825 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
826 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
827 s390x-gs-linux64-ipa.o to ipa_obj.
828 * linux-s390-low.c (HWCAP_S390_GS): New define.
829 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
831 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
832 (s390_arch_setup): Check for guarded-storage support and choose
834 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
835 init_registers_s390x_gs_linux64.
836 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
838 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
839 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
841 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
843 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
845 2017-09-21 Kevin Buettner <kevinb@redhat.com>
847 * linux-low.h (struct lwp_info): Add new field, thread_handle.
848 (thread_db_thread_handle): Declare.
849 * linux-low.c (linux_target_ops): Initialize thread_handle.
850 * server.c (handle_qxfer_threads_worker): Add support for
852 * target.h (struct target_ops): Add new function pointer,
854 (target_thread_handle): Define.
855 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
857 (thread_db_thread_handle): New function.
859 2017-09-21 Kevin Buettner <kevinb@redhat.com>
861 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
862 * linux-low.h (thread_db_notice_clone): Declare.
863 * thread-db.c (thread_db_notice_clone): New function.
865 2017-09-21 Pedro Alves <palves@redhat.com>
867 * server.c (gdb_read_memory, handle_status, process_serial_event)
868 (handle_serial_event, handle_target_event): Adjust to
869 set_desired_thread prototype change.
870 * target.c (set_desired_thread): Remove 'use_general' parameter
872 * target.h (set_desired_thread): Remove 'use_general' parameter.
874 2017-09-20 Tom Tromey <tom@tromey.com>
876 * target.c (target_terminal::terminal_state): Define.
877 (target_terminal::init): Rename from target_terminal_init.
878 (target_terminal::inferior): Rename from
879 target_terminal_inferior.
880 (target_terminal::ours): Rename from target_terminal_ours.
881 (target_terminal::ours_for_output, target_terminal::info): New.
883 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
885 * server.c (accumulate_file_name_length): Remove.
886 (emit_dll_description): Adjust to std::string change.
887 (handle_qxfer_libraries): Use std::string to hold document.
889 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
891 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
892 return type of xml_escape_text.
893 * server.c (emit_dll_description): Likewise.
895 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
897 * server.c (captured_main): Accept argument for --selftest.
898 Update run_tests call.
899 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
900 when registering selftests.
902 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
904 * regcache.c (get_thread_regcache): Update code to use "std::vector"
905 instead of "VEC" for "target_desc.reg_defs".
906 (regcache_cpy): Likewise.
907 (registers_to_string): Likewise.
908 (registers_from_string): Likewise.
909 (find_regno): Likewise.
910 (supply_regblock): Likewise.
911 (regcache_raw_read_unsigned): Likewise.
912 * tdesc.c (init_target_desc): Likewise.
913 (tdesc_create_reg): Likewise.
914 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
915 (struct target_desc) <reg_defs>: Convert to "std::vector".
916 (target_desc): Do not initialize "reg_defs".
917 (~target_desc): Update code to use "std::vector" instead of "VEC"
918 for "target_desc.reg_defs".
919 (operator==): Likewise.
921 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
923 * inferiors.h (thread_to_gdb_id): Remove.
924 * inferiors.c (thread_to_gdb_id): Remove.
925 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
926 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
927 lynx_store_registers, lynx_read_memory, lynx_write_memory):
929 * nto-low.c (nto_fetch_registers, nto_store_registers,
930 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
932 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
934 * inferiors.h (gdb_id_to_thread_id): Remove.
935 * inferiors.c (gdb_id_to_thread_id): Remove.
936 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
937 removal. Move pid declaration closer to where it's used.
939 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
941 * server.c (handle_detach): New function.
942 (process_serial_event): Move code out, call handle_detach.
944 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
946 * server.c (require_running): Rename to ...
947 (require_running_or_return): ... this ...
948 (require_running_or_break): ... and this.
949 (handle_query, process_serial_event): Adjust.
951 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
953 * linux-low.c (linux_set_resume_request): Remove unused
956 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
958 * server.c (first_thread_of): Remove.
959 (process_serial_event): Replace usage of first_thread_of with
960 find_any_thread_of_pid.
961 * tracepoint.c (same_process_p): Remove.
962 (gdb_agent_about_to_close): Replace usage of same_process_p with
963 find_any_thread_of_pid.
964 * linux-x86-low.c (same_process_callback): Remove.
965 (x86_arch_setup_process_callback): Replace usage of
966 same_process_callback with find_any_thread_of_pid.
967 * thread-db.c (any_thread_of): Remove.
968 (switch_to_process): Replace usage of any_thread_of with
969 find_any_thread_of_pid.
970 * inferiors.c (thread_pid_matches_callback): Remove.
971 (find_thread_process): Adjust to use find_any_thread_of_pid.
973 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
975 * regcache.c (get_thread_regcache): Guard calls to "memset"
978 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
980 * linux-low.c (handle_extended_wait): Use
981 "allocate_target_description" instead of "XNEW".
982 * linux-x86-low.c (initialize_low_arch): Likewise.
984 2017-09-05 Yao Qi <yao.qi@linaro.org>
986 * configure.srv (srv_i386_regobj): Remove.
987 (srv_amd64_regobj): Remove.
988 (srv_regobj): Set it to "" for x86 non-linux targets.
989 * linux-x86-tdesc.c (i386_linux_read_description):
990 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
991 (init_registers_i386): Remove the declaration.
992 (tdesc_i386): Remove the declaration.
993 (lynx_i386_arch_setup): Call i386_create_target_description.
994 * nto-x86-low.c: Likewise.
995 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
996 [!__x86_64__]: include arch/i386.h.
997 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
999 2017-09-05 Yao Qi <yao.qi@linaro.org>
1001 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1002 i386/amd64-XXX-linux from it.
1004 2017-09-05 Yao Qi <yao.qi@linaro.org>
1006 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1008 (ipa_amd64_linux_regobj): Remove.
1009 (ipa_x32_linux_regobj): Remove.
1011 2017-09-05 Yao Qi <yao.qi@linaro.org>
1013 * Makefile.in (arch-amd64.o): New rule.
1014 * configure.srv: Append arch-amd64.o.
1015 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1016 (get_ipa_tdesc): Call amd64_linux_read_description.
1017 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1018 and init_registers_amd64_XXX.
1019 * linux-x86-low.c (x86_linux_read_description): Call
1020 amd64_linux_read_description.
1021 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1022 (initialize_low_arch): Don't call init_registers_x32_XXX and
1023 init_registers_amd64_XXX.
1024 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1025 and tdesc_amd64_XXX.
1026 [__x86_64__] (amd64_tdesc_test): New function.
1027 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1028 and init_registers_amd64_XXX.
1029 * linux-x86-tdesc.c: Include arch/amd64.h.
1030 (xcr0_to_tdesc_idx): New function.
1031 (i386_linux_read_description): New function.
1032 (amd64_get_ipa_tdesc_idx): New function.
1033 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1034 (amd64_get_ipa_tdesc): Declare.
1036 2017-09-05 Yao Qi <yao.qi@linaro.org>
1038 * configure.srv (srv_i386_linux_xmlfiles): Remove
1039 i386/i386-XXX-linux.xml from it.
1041 2017-09-05 Yao Qi <yao.qi@linaro.org>
1043 * configure.srv: Set srv_i386_linux_regobj empty if $development
1045 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1046 initialize_low_tdesc.
1047 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1048 with #if initialize_low_tdesc.
1049 * linux-x86-tdesc-selftest.c: New file.
1050 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1052 2017-09-05 Yao Qi <yao.qi@linaro.org>
1054 * Makefile.in (arch-i386.o): New rule.
1055 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1056 (x86_64-*-linux*): Likewise.
1057 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1058 include arch/i386.h.
1059 (i386_linux_read_description): Remove code and call
1060 i386_create_target_description.
1061 * tdesc.c (allocate_target_description): New function.
1062 * tdesc.h (set_tdesc_architecture): Remove declaration.
1063 (set_tdesc_osabi): Likewise.
1065 2017-09-05 Yao Qi <yao.qi@linaro.org>
1067 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1068 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1069 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1071 * server.c (get_features_xml): Call tdesc_get_features_xml.
1072 * tdesc.c (set_tdesc_architecture): New function.
1073 (set_tdesc_osabi): New function.
1074 (tdesc_get_features_xml): New function.
1075 (tdesc_create_feature): Add an argument.
1076 * tdesc.h (struct target_desc) <features>: New field.
1077 <arch, osabi>: New field.
1078 (~target_desc): xfree features, arch, and osabi.
1079 (target_desc::oerator==): Don't compare .xmltarget.
1080 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1081 (set_tdesc_osabi): Likewise.
1082 (tdesc_get_features_xml): Likewise.
1084 2017-09-05 Yao Qi <yao.qi@linaro.org>
1086 * linux-x86-tdesc.c: Include selftest.h.
1087 (i386_tdesc_test): New function.
1088 (initialize_low_tdesc): Call selftests::register_test.
1089 * tdesc.h: Include regdef.h.
1090 (target_desc): Override operator == and !=.
1092 2017-09-05 Yao Qi <yao.qi@linaro.org>
1094 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1095 (ipa_obj): Likewise.
1096 * linux-i386-ipa.c: Include common/x86-xstate.h
1097 (get_ipa_tdesc): Call i386_linux_read_description.
1098 (initialize_low_tracepoint): Don't call init_registers_XXX
1099 functions, call initialize_low_tdesc instead.
1100 * linux-x86-low.c (x86_linux_read_description): Call
1101 i386_linux_read_description.
1102 (initialize_low_arch): Don't call init_registers_i386_XXX
1103 functions, call initialize_low_tdesc.
1104 * linux-x86-tdesc.c: New file.
1105 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1106 (i386_get_ipa_tdesc_idx): Declare.
1107 (i386_get_ipa_tdesc): Declare.
1108 (initialize_low_tdesc): Declare.
1110 2017-09-05 Yao Qi <yao.qi@linaro.org>
1112 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1115 2017-09-05 Yao Qi <yao.qi@linaro.org>
1117 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1118 * regcache.c (get_thread_regcache): Use VEC_length.
1119 (init_register_cache): Likewise.
1120 (regcache_cpy): Likewise.
1121 (registers_to_string): Iterate reg_defs via VEC_iterate.
1122 (find_regno): Likewise.
1123 (find_register_by_number): Use VEC_index.
1124 (register_size): Call find_register_by_number.
1125 (register_data): Call find_register_by_number.
1126 (supply_regblock): Use VEC_length.
1127 (regcache_raw_read_unsigned): Likewise.
1128 * tdesc.c (init_target_desc): Iterate reg_defs via
1130 (default_description): Update initializer.
1131 (copy_target_description): Don't update field num_registers.
1132 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1133 <num_registers>: Remove.
1135 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1137 * Makefile.in (.SECONDARY): Define target.
1139 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1141 * linux-low.c (linux_wait_1): Adjust.
1142 * server.c (queue_stop_reply_callback): Adjust.
1144 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1146 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1147 QEnvironmentUnset and QEnvironmentReset packets.
1148 (handle_query): Inform remote that QEnvironmentHexEncoded,
1149 QEnvironmentUnset and QEnvironmentReset are supported.
1151 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1153 * inferiors.h (inferior_target_data): Rename to ...
1154 (thread_target_data): ... this.
1155 (inferior_regcache_data): Rename to ...
1156 (thread_regcache_data): ... this.
1157 (set_inferior_regcache_data): Rename to ...
1158 (set_thread_regcache_data): ... this.
1159 * inferiors.c (inferior_target_data): Rename to ...
1160 (thread_target_data): ... this.
1161 (inferior_regcache_data): Rename to ...
1162 (thread_regcache_data): ... this.
1163 (set_inferior_regcache_data): Rename to ...
1164 (set_thread_regcache_data): ... this.
1165 (free_one_thread): Update.
1166 * linux-low.h (get_thread_lwp): Update.
1167 * regcache.c (get_thread_regcache): Update.
1168 (regcache_invalidate_thread): Update.
1169 (free_register_cache_thread): Update.
1170 * win32-i386-low.c (update_debug_registers_callback): Update.
1171 (win32_get_current_dr): Update.
1172 * win32-low.c (thread_rec): Update.
1173 (delete_thread_info): Update.
1174 (continue_one_thread): Update.
1175 (suspend_one_thread): Update.
1177 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1179 * inferiors.c (set_inferior_target_data): Remove.
1180 * inferiors.h (set_inferior_target_data): Remove.
1182 2017-08-18 Yao Qi <yao.qi@linaro.org>
1184 * Makefile.in (OBS): Add selftest.o.
1185 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1186 * configure, config.in: Re-generated.
1187 * server.c: Include common/sefltest.h.
1188 (captured_main): Handle option --selftest.
1190 2017-08-09 Yao Qi <yao.qi@linaro.org>
1192 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1193 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1194 i386-avx-mpx.o and i386-mmx.o.
1195 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1196 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1197 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1198 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1199 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1200 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1201 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1202 i386/amd64-avx-mpx.xml.
1204 2017-08-09 Yao Qi <yao.qi@linaro.org>
1206 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1207 and x32-avx-avx512.o.
1208 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1209 i386/x32-avx-avx512.xml.
1211 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1213 * tracepoint.h (enum class fast_tpoint_collect_result): New
1215 (fast_tracepoint_collecting): Change return type to
1216 fast_tpoint_collect_result.
1217 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1218 * linux-low.h: Include tracepoint.h.
1219 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1220 fast_tpoint_collect_result.
1221 * linux-low.c (handle_tracepoints): Adjust.
1222 (linux_fast_tracepoint_collecting): Change return type to
1223 fast_tpoint_collect_result.
1224 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1225 linux_wait_1, stuck_in_jump_pad_callback,
1226 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1227 proceed_one_lwp): Adjust to type change.
1229 2017-07-10 Yao Qi <yao.qi@linaro.org>
1231 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1233 2017-06-29 Yao Qi <yao.qi@linaro.org>
1235 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1237 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1239 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1241 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1243 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1245 * linux-low.c (linux_create_inferior): Adjust code to access the
1246 environment information via 'gdb_environ' class.
1247 * lynx-low.c (lynx_create_inferior): Likewise.
1248 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1249 (get_environ): Return a pointer to 'our_environ'.
1250 (captured_main): Initialize 'our_environ'.
1251 * server.h (get_environ): Adjust prototype.
1252 * spu-low.c (spu_create_inferior): Adjust code to access the
1253 environment information via 'gdb_environ' class.
1255 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1257 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1258 usage of "register" keyword.
1260 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1262 * configure: Re-generate.
1264 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1266 * configure: Re-generate.
1268 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1270 * Makefile.in (COMPILE.pre): Add "-x c++".
1272 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1274 * fork-child.c: Conditionally include <signal.h>.
1276 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1278 * server.c (handle_general_set): Handle new packet
1279 "QStartupWithShell".
1280 (handle_query): Add "QStartupWithShell" to the list of supported
1282 (gdbserver_usage): Add help text explaining the
1283 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1285 (captured_main): Recognize and act upon the presence of the new
1288 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1289 Pedro Alves <palves@redhat.com>
1291 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1292 * configure: Regenerate.
1293 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1295 (i[34567]86-*-lynxos*): Likewise.
1296 (spu*-*-*): Likewise.
1297 * fork-child.c: New file.
1298 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1300 (linux_ptrace_fun): New function.
1301 (linux_create_inferior): Adjust function prototype to reflect
1302 change on "target.h". Adjust function code to use
1304 (linux_request_interrupt): Delete "signal_pid".
1305 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1306 (lynx_ptrace_fun): New function.
1307 (lynx_create_inferior): Adjust function prototype to reflect
1308 change on "target.h". Adjust function code to use
1310 * nto-low.c (nto_create_inferior): Adjust function prototype and
1311 code to reflect change on "target.h". Update comments.
1312 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1313 "common-terminal.h" and "environ.h".
1314 (terminal_fd): Moved to fork-child.c.
1315 (old_foreground_pgrp): Likewise.
1316 (restore_old_foreground_pgrp): Likewise.
1317 (last_status): Make it global.
1318 (last_ptid): Likewise.
1319 (our_environ): New variable.
1320 (startup_with_shell): Likewise.
1321 (program_name): Likewise.
1322 (program_argv): Rename to...
1323 (program_args): ...this.
1324 (wrapper_argv): New variable.
1325 (start_inferior): Delete function.
1326 (get_exec_wrapper): New function.
1327 (get_exec_file): Likewise.
1328 (get_environ): Likewise.
1329 (prefork_hook): Likewise.
1330 (post_fork_inferior): Likewise.
1331 (postfork_hook): Likewise.
1332 (postfork_child_hook): Likewise.
1333 (handle_v_run): Update code to deal with arguments coming from the
1334 remote host. Update calls from "start_inferior" to
1336 (captured_main): Likewise. Initialize environment variable. Call
1338 * server.h (post_fork_inferior): New prototype.
1339 (get_environ): Likewise.
1340 (last_status): Declare.
1341 (last_ptid): Likewise.
1342 (signal_pid): Likewise.
1343 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1344 (spu_ptrace_fun): New function.
1345 (spu_create_inferior): Adjust function prototype to reflect change
1346 on "target.h". Adjust function code to use "fork_inferior".
1347 * target.c (target_terminal_init): New function.
1348 (target_terminal_inferior): Likewise.
1349 (target_terminal_ours): Likewise.
1350 * target.h: Include <vector>.
1351 (struct target_ops) <create_inferior>: Update prototype.
1352 (create_inferior): Update macro.
1353 * utils.c (gdb_flush_out_err): New function.
1354 * win32-low.c (win32_create_inferior): Adjust function prototype
1355 and code to reflect change on "target.h".
1357 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1359 * inferiors.c (switch_to_thread): New function.
1361 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1363 * Makefile.in (SFILE): Add "common/job-control.c".
1364 (OBS): Add "job-control.o".
1366 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1368 * Makefile: Remove "@host_makefile_frag@".
1370 2017-05-05 Pedro Alves <palves@redhat.com>
1372 * configure: Regenerate.
1374 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1376 * configure: Regenerate.
1378 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1380 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1381 software_single_step change of return type to
1382 std::vector<CORE_ADDR>.
1383 * linux-low.c (install_software_single_step_breakpoints):
1385 * linux-low.h (install_software_single_step_breakpoints):
1388 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1390 * remote-utils.c: Include "gdb_termios.h" instead of
1392 * terminal.h: Delete file.
1394 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1396 * server.c: Include <vector>.
1397 <program_argv, wrapper_argv>: Convert to std::vector.
1398 (start_inferior): Rewrite function to use C++.
1399 (handle_v_run): Likewise. Update code that calculates the argv
1400 based on the vRun packet; use C++.
1401 (captured_main): Likewise.
1403 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1405 * server.c (handle_v_cont): Initialize thread_resume::thread
1408 2017-04-05 Pedro Alves <palves@redhat.com>
1410 * configure: Regenerate.
1412 2017-04-05 Pedro Alves <palves@redhat.com>
1414 * gdbreplay.c (sync_error): Constify.
1415 * linux-x86-low.c (push_opcode): Constify.
1417 2017-04-05 Pedro Alves <palves@redhat.com>
1419 * win32-low.c (get_child_debug_event)
1420 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1421 Report TARGET_WAITKIND_SPURIOUS instead.
1423 2017-04-05 Pedro Alves <palves@redhat.com>
1425 * remote-utils.c (remote_prepare, remote_open): Constify.
1426 * remote-utils.h (remote_prepare, remote_open): Constify.
1427 * server.c (captured_main): Constify 'port' handling.
1429 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1431 * Makefile.in (clean): Clear .deps.
1433 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1435 * .gitignore: Remove generated files, replace with wildcard.
1436 * (clean): Replace removal of generated files with wildcard.
1437 (version.c): Replace with...
1438 (version-generated.c): ...this.
1439 (xml-builtin.c): Replace with...
1440 (xml-builtin-generated.c): ...this.
1441 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1442 (%.c: *regformats*): Replace with...
1443 (%-generated.c: *regformats*): ...this.
1445 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1447 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1448 (xtensa_fill_gregset): Call collect_register_by_name for
1450 (xtensa_store_gregset): Call supply_register_by_name for
1453 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1455 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1456 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1457 (xtensa_store_gregset): Call supply_register for all registers in
1458 a0_regnum..a0_regnum + C0_NREGS range.
1460 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1462 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1463 (ax-ipa.o: ax.c): Remove.
1464 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1465 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1466 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1467 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1468 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1470 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1472 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1473 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1474 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1475 (errors-ipa.o: ../common/errors.c): Remove.
1476 (format-ipa.o: ../common/format.c): Remove.
1477 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1479 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1481 * Makefile.in (%-ipa.o: %.c): New rule.
1482 (tracepoint-ipa.o: tracepoint.c): Remove.
1483 (utils-ipa.o: utils.c): Remove.
1484 (remote-utils-ipa.o: remote-utils.c): Remove.
1485 (regcache-ipa.o: regcache.c): Remove.
1486 (i386-linux-ipa.o: i386-linux.c): Remove.
1487 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1488 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1489 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1490 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1491 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1492 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1493 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1494 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1495 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1496 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1497 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1498 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1499 (aarch64-ipa.o: aarch64.c): Remove.
1500 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1501 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1502 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1503 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1504 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1505 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1506 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1507 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1508 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1509 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1510 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1511 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1512 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1513 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1514 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1515 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1516 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1517 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1518 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1519 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1520 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1521 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1522 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1523 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1524 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1525 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1526 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1527 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1528 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1529 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1530 (tdesc-ipa.o: tdesc.c): Remove.
1531 (x32-linux-ipa.o: x32-linux.c): Remove.
1532 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1533 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1535 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1537 * Makefile.in (%.o: ../arch/%.c): New rule.
1538 (arm.o: ../arch/arm.c): Remove.
1539 (arm-linux.o: ../arch/arm-linux.c): Remove.
1540 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1541 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1543 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1545 * Makefile.in (%.o: ../nat/%.c): New rule.
1546 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1547 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1548 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1549 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1550 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1551 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1552 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1553 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1554 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1555 (linux-personality.o: ../nat/linux-personality.c): Remove.
1556 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1557 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1558 (x86-linux.o: ../nat/x86-linux.c): Remove.
1559 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1560 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1562 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1564 * Makefile.in (%.o: ../common/%.c): New rule.
1565 (signals.o: ../common/signals.c): Remove.
1566 (print-utils.o: ../common/print-utils.c): Remove.
1567 (rsp-low.o: ../common/rsp-low.c): Remove.
1568 (common-utils.o: ../common/common-utils.c): Remove.
1569 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1570 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1571 (vec.o: ../common/vec.c): Remove.
1572 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1573 (xml-utils.o: ../common/xml-utils.c): Remove.
1574 (ptid.o: ../common/ptid.c): Remove.
1575 (buffer.o: ../common/buffer.c): Remove.
1576 (format.o: ../common/format.c): Remove.
1577 (filestuff.o: ../common/filestuff.c): Remove.
1578 (agent.o: ../common/agent.c): Remove.
1579 (errors.o: ../common/errors.c): Remove.
1580 (environ.o: ../common/environ.c): Remove.
1581 (common-debug.o: ../common/common-debug.c): Remove.
1582 (cleanups.o: ../common/cleanups.c): Remove.
1583 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1584 (fileio.o: ../common/fileio.c): Remove.
1585 (common-regcache.o: ../common/common-regcache.c): Remove.
1586 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1587 (new-op.o: ../common/new-op.c): Remove.
1588 (btrace-common.o: ../common/btrace-common.c): Remove.
1590 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1592 * Makefile.in (%.o: ../target/%.c): New rule.
1593 (waitstatus.o: ../target/waitstatus.c): Remove.
1595 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1598 (%.c: ../regformats/%.dat,
1599 (%.c: ../regformats/arm/%.dat,
1600 (%.c: ../regformats/i386/%.dat,
1601 (%.c: ../regformats/rs6000/%.dat): New rules.
1602 (aarch64.c): Remove.
1603 (reg-arm.c): Remove.
1604 (arm-with-iwmmxt.c): Remove.
1605 (arm-with-vfpv2.c): Remove.
1606 (arm-with-vfpv3.c): Remove.
1607 (arm-with-neon.c): Remove.
1608 (reg-bfin.c): Remove.
1609 (reg-cris.c): Remove.
1610 (reg-crisv32.c): Remove.
1612 (i386-linux.c): Remove.
1613 (i386-avx.c): Remove.
1614 (i386-avx-linux.c): Remove.
1615 (i386-avx-avx512.c): Remove.
1616 (i386-avx-avx512-linux.c): Remove.
1617 (i386-mpx.c): Remove.
1618 (i386-mpx-linux.c): Remove.
1619 (i386-avx-mpx-avx512-pku.c): Remove.
1620 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1621 (i386-avx-mpx.c): Remove.
1622 (i386-avx-mpx-linux.c): Remove.
1623 (i386-mmx.c): Remove.
1624 (i386-mmx-linux.c): Remove.
1625 (reg-ia64.c): Remove.
1626 (reg-m32r.c): Remove.
1627 (reg-m68k.c): Remove.
1629 (mips-linux.c): Remove.
1630 (mips-dsp-linux.c): Remove.
1631 (mips64-linux.c): Remove.
1632 (mips64-dsp-linux.c): Remove.
1633 (nios2-linux.c): Remove.
1634 (powerpc-32.c): Remove.
1635 (powerpc-32l.c): Remove.
1636 (powerpc-altivec32l.c): Remove.
1637 (powerpc-cell32l.c): Remove.
1638 (powerpc-vsx32l.c): Remove.
1639 (powerpc-isa205-32l.c): Remove.
1640 (powerpc-isa205-altivec32l.c): Remove.
1641 (powerpc-isa205-vsx32l.c): Remove.
1642 (powerpc-e500l.c): Remove.
1643 (powerpc-64l.c): Remove.
1644 (powerpc-altivec64l.c): Remove.
1645 (powerpc-cell64l.c): Remove.
1646 (powerpc-vsx64l.c): Remove.
1647 (powerpc-isa205-64l.c): Remove.
1648 (powerpc-isa205-altivec64l.c): Remove.
1649 (powerpc-isa205-vsx64l.c): Remove.
1650 (s390-linux32.c): Remove.
1651 (s390-linux32v1.c): Remove.
1652 (s390-linux32v2.c): Remove.
1653 (s390-linux64.c): Remove.
1654 (s390-linux64v1.c): Remove.
1655 (s390-linux64v2.c): Remove.
1656 (s390-te-linux64.c): Remove.
1657 (s390-vx-linux64.c): Remove.
1658 (s390-tevx-linux64.c): Remove.
1659 (s390x-linux64.c): Remove.
1660 (s390x-linux64v1.c): Remove.
1661 (s390x-linux64v2.c): Remove.
1662 (s390x-te-linux64.c): Remove.
1663 (s390x-vx-linux64.c): Remove.
1664 (s390x-tevx-linux64.c): Remove.
1665 (tic6x-c64xp-linux.c): Remove.
1666 (tic6x-c64x-linux.c): Remove.
1667 (tic6x-c62x-linux.c): Remove.
1669 (reg-sparc64.c): Remove.
1670 (reg-spu.c): Remove.
1672 (amd64-linux.c): Remove.
1673 (amd64-avx.c): Remove.
1674 (amd64-avx-linux.c): Remove.
1675 (amd64-avx-avx512.c): Remove.
1676 (amd64-avx-avx512-linux.c): Remove.
1677 (amd64-mpx.c): Remove.
1678 (amd64-mpx-linux.c): Remove.
1679 (amd64-avx-mpx-avx512-pku.c): Remove.
1680 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1681 (amd64-avx-mpx.c): Remove.
1682 (amd64-avx-mpx-linux.c): Remove.
1684 (x32-linux.c): Remove.
1685 (x32-avx.c): Remove.
1686 (x32-avx-linux.c): Remove.
1687 (x32-avx-avx512.c): Remove.
1688 (x32-avx-avx512-linux.c): Remove.
1689 (reg-xtensa.c): Remove.
1690 (reg-tilegx.c): Remove.
1691 (reg-tilegx32.c): Remove.
1693 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1695 * Makefile.in (SFILES): Add "common/environ.c".
1696 (OBJS): Add "common/environ.h".
1698 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1700 * configure.ac: Check if the fs_base and gs_base members of
1701 `struct user_regs_struct' exist.
1702 * config.in: Regenerated.
1703 * configure: Likewise.
1705 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1707 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1709 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1710 (get_next_pcs_syscall_next_pc): Likewise.
1712 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1714 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1715 * nto-x86-low.c: Likewise.
1717 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1719 * Makefile.in: Include disable-implicit-rules.mk.
1721 2016-11-23 Pedro Alves <palves@redhat.com>
1723 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1724 (debug_vprintf): Use std::chrono::steady_clock instead of
1725 gettimeofday. Use '.' instead of ':'.
1726 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1727 (get_timestamp): Use std::chrono::steady_clock instead of
1730 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1732 * Makefile.in: Fix whitespace formatting.
1734 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1736 * Makefile.in (SFILES, OBS): Flatten list and order
1739 2016-11-23 Pedro Alves <palves@redhat.com>
1741 * event-loop.c (handle_file_event): Use warning.
1742 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1743 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1746 2016-11-23 Pedro Alves <palves@redhat.com>
1748 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1750 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1751 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1752 debug_printf and debug_flush for debug output.
1753 * server.c (handle_general_set): Likewise.
1754 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1757 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1759 * Makefile.in (.c.o): Replace rule with ...
1760 (%.o: %.c): ... this one.
1762 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1764 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1765 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1767 * configure.ac: Remove checks for the make program.
1768 * configure: Re-generate.
1770 2016-10-28 Pedro Alves <palves@redhat.com>
1772 * Makefile.in (CXX_DIALECT): Get from configure.
1773 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1774 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1775 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1776 * config.in: Regenerate.
1777 * configure: Regenerate.
1779 2016-10-27 Yao Qi <yao.qi@linaro.org>
1781 * linux-low.c (linux_supports_range_stepping): Return true if
1782 can_software_single_step return true.
1784 2016-10-27 Yao Qi <yao.qi@linaro.org>
1786 * inferiors.c (find_inferior_in_random): New function.
1787 * inferiors.h (find_inferior_in_random): Declare.
1788 * linux-low.c (linux_wait_for_event_filtered): Call
1789 find_inferior_in_random instead of find_inferior.
1791 2016-10-27 Yao Qi <yao.qi@linaro.org>
1793 * linux-low.c (linux_wait_1): If single-step breakpoints are
1794 inserted, remove them.
1796 2016-10-26 Pedro Alves <palves@redhat.com>
1798 * linux-low.c (handle_extended_wait): Link parent/child fork
1800 (linux_wait_1): Unlink them.
1801 (linux_set_resume_request): Ignore resume requests for
1802 already-resumed and unhandled fork child threads.
1803 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1804 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1806 (handle_v_requests) <vCont>: Don't call require_running.
1807 * server.h (in_queued_stop_replies): New declaration.
1809 2016-10-24 Yao Qi <yao.qi@linaro.org>
1812 * linux-aarch64-low.c (append_insns): Cast the return value to
1815 2016-10-10 Yao Qi <yao.qi@linaro.org>
1817 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1819 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1821 * target.c (target_supports_multi_process): New function, moved
1823 * target.h (target_supports_multi_process): ... here. Remove
1826 2016-10-05 Tom Tromey <tom@tromey.com>
1829 * tracepoint.c (handle_tracepoint_bkpts): Check
1830 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1832 2016-10-05 Yao Qi <yao.qi@linaro.org>
1834 * configure.srv: Update the path of arm-*.xml files.
1836 2016-10-05 Terry Guo <terry.guo@arm.com>
1837 Yao Qi <yao.qi@linaro.org>
1839 * Makefile.in: Adjust the path of rules.
1840 * configure.srv: Update the path of xml files.
1841 * regformats/arm-with-iwmmxt.dat: Regenerated.
1842 * regformats/arm-with-neon.dat: Likewise.
1843 * regformats/arm-with-vfpv2.dat: Likewise.
1844 * regformats/arm-with-vfpv3.dat Likewise.
1846 2016-09-30 Yao Qi <yao.qi@linaro.org>
1849 * target.c (target_stop_and_wait): Don't call
1850 target_continue_no_signal, use resume_stop instead.
1852 2016-09-26 Yao Qi <yao.qi@linaro.org>
1854 * linux-low.c (linux_wait_1): Call debug_exit.
1856 2016-09-23 Pedro Alves <palves@redhat.com>
1858 * Makefile.in (SFILES): Add common/new-op.c.
1859 (OBS): Add common/new-op.o.
1860 (new-op.o): New rule.
1862 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1864 * .gitinore: Ignore more files.
1866 2016-09-21 Yao Qi <yao.qi@linaro.org>
1868 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1871 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1873 * server.c (start_inferior): Call target_mourn_inferior instead of
1874 mourn_inferior; pass ptid_t argument to it.
1876 (handle_target_event): Likewise.
1877 * target.c (target_mourn_inferior): New function.
1878 * target.h (mourn_inferior): Delete macro.
1880 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1882 * linux-low.c (lwp_is_stepping): New function.
1884 2016-09-06 Carl Love <cel@us.ibm.com>
1886 * server.c (start_inferior): Fixed comment, requested comment change
1887 didn't get updated correctly. Removed reference to ptrace () call as
1888 it is only true on Linux systems.
1890 2016-09-06 Carl Love <cel@us.ibm.com>
1892 * server.c (start_inferior): Do not call
1893 function target_post_create_inferior () if the
1894 inferior process has already exited.
1896 2016-09-05 Pedro Alves <palves@redhat.com>
1898 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1899 (COMPILE.pre, CC_LD): Use CXX directly.
1900 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1901 * acinclude.m4: Don't include build-with-cxx.m4.
1902 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1903 * configure: Regenerate.
1905 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1908 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1909 call writing data to own_buf.
1911 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1913 * target.c (mywait): Call target_wait instead of
1915 (target_wait): New function.
1917 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1919 * server.c (start_inferior): New variable 'ptid'. Replace calls
1920 to the_target->resume by target_continue{,_no_signal}, depending
1922 * target.c (target_stop_and_wait): Call target_continue_no_signal
1923 instead of the_target->resume.
1924 (target_continue): New function.
1926 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1928 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1930 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1933 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1935 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1936 * linux-arm-low.c (ps_get_thread_area): Likewise.
1937 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1938 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1939 * linux-mips-low.c (ps_get_thread_area): Likewise.
1940 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1941 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1942 * linux-x86-low.c (ps_get_thread_area): Likewise.
1943 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1945 2016-08-19 Pedro Alves <palves@redhat.com>
1947 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1949 2016-08-19 Pedro Alves <palves@redhat.com>
1951 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1952 comment. Use memcpy instead of casting through unsigned long.
1954 2016-08-19 Pedro Alves <palves@redhat.com>
1956 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1957 allocating around 0x80000000.
1959 2016-08-19 Pedro Alves <palves@redhat.com>
1962 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1963 (x32-avx512-linux-ipa.o): New rules.
1964 * configure.ac (x86_64-*-linux*): New x32 check.
1965 * configure.srv (ipa_x32_linux_regobj): New.
1966 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1967 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1969 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1971 * configure: Regenerate.
1973 2016-08-09 Pedro Alves <palves@redhat.com>
1976 * Makefile.in (OBS): Add signals-state-save-restore.o.
1977 (signals-state-save-restore.o): New rule.
1978 * config.in: Regenerate.
1979 * configure: Regenerate.
1980 * linux-low.c: Include "signals-state-save-restore.h".
1981 (linux_create_inferior): Call
1982 restore_original_signals_state.
1983 * server.c: Include "dispositions-save-restore.h".
1984 (captured_main): Call save_original_signals_state.
1986 2016-08-05 Pedro Alves <palves@redhat.com>
1988 * configure: Regenerate.
1990 2016-08-04 Yao Qi <yao.qi@linaro.org>
1992 * linux-low.c (regsets_fetch_inferior_registers): Check
1993 errno is ESRCH or not.
1995 2016-08-02 Yao Qi <yao.qi@linaro.org>
1997 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1998 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1999 (thread_db_load_search): Update.
2000 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2001 td_ta_set_event and td_ta_event_getmsg.
2003 2016-07-26 Pedro Alves <palves@redhat.com>
2006 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2007 of unsigned long for 64-bit registers and use uint32_t instead of
2008 unsigned int for 32-bit registers.
2010 2016-07-26 Pedro Alves <palves@redhat.com>
2012 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2015 2016-07-21 Tom Tromey <tom@tromey.com>
2017 * configure: Rebuild.
2019 2016-07-21 Yao Qi <yao.qi@linaro.org>
2021 * mem-break.c (find_gdb_breakpoint): Cast bp to
2022 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2024 2016-07-21 Yao Qi <yao.qi@linaro.org>
2026 * server.c (handle_v_requests): Support s and S actions
2027 if target_supports_software_single_step return true.
2029 2016-07-21 Yao Qi <yao.qi@linaro.org>
2031 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2032 is resume_step, call maybe_hw_step.
2033 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2035 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2037 (proceed_one_lwp): If resume request is resume_step, install
2038 reinsert breakpoints and call maybe_hw_step.
2040 2016-07-21 Yao Qi <yao.qi@linaro.org>
2042 * linux-low.c (proceed_one_lwp): Declare.
2043 (linux_resume_one_thread): Remove local variable 'step'.
2044 Lift code enqueue signal. Call proceed_one_lwp instead of
2045 linux_resume_one_lwp.
2047 2016-07-21 Yao Qi <yao.qi@linaro.org>
2049 * linux-low.c (linux_resume_one_thread): Call
2050 enqueue_pending_signal.
2052 2016-07-21 Yao Qi <yao.qi@linaro.org>
2054 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2055 * inferiors.c (do_restore_current_thread_cleanup): New function.
2056 (make_cleanup_restore_current_thread): Likewise.
2057 * linux-low.c (install_software_single_step_breakpoints): Call
2058 make_cleanup_restore_current_thread. Switch current_thread to
2061 2016-07-21 Yao Qi <yao.qi@linaro.org>
2063 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2064 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2065 (clone_one_breakpoint): Likewise.
2066 (delete_reinsert_breakpoints): Change parameter to thread.
2068 (has_reinsert_breakpoints): Likewise.
2069 (uninsert_reinsert_breakpoints): Likewise.
2070 (reinsert_reinsert_breakpoints): Likewise.
2071 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2072 (delete_reinsert_breakpoints): Likewise.
2073 (reinsert_reinsert_breakpoints): Likewise.
2074 (uninsert_reinsert_breakpoints): Likewise.
2075 (has_reinsert_breakpoints): Likewise.
2077 2016-07-21 Yao Qi <yao.qi@linaro.org>
2079 * inferiors.c (get_thread_process): Make parameter const.
2080 * inferiors.h (get_thread_process): Update declaration.
2081 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2082 Add new parameters child_thread and parent_thread. Callers
2084 * mem-break.h (clone_all_breakpoints): Update declaration.
2086 2016-07-21 Yao Qi <yao.qi@linaro.org>
2088 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2089 <command_list, handler>: Remove.
2090 (struct gdb_breakpoint): New.
2091 (struct other_breakpoint): New.
2092 (struct reinsert_breakpoint): New.
2093 (is_gdb_breakpoint): New function.
2094 (any_persistent_commands): Update command_list if
2095 is_gdb_breakpoint returns true.
2096 (set_breakpoint): Create breakpoints according to their types.
2097 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2098 (set_gdb_breakpoint_1): Likewise.
2099 (set_gdb_breakpoint): Likewise.
2100 (clear_breakpoint_conditions): Change parameter type to
2101 'struct gdb_breakpoint *'.
2102 (clear_breakpoint_commands): Likewise.
2103 (clear_breakpoint_conditions_and_commands): Likewise.
2104 (add_condition_to_breakpoint): Likewise.
2105 (add_breakpoint_condition): Likewise.
2106 (add_commands_to_breakpoint): Likewise.
2107 (check_breakpoints): Check other_breakpoint.
2108 (clone_one_breakpoint): Clone breakpopint according to its type.
2109 * mem-break.h (struct gdb_breakpoint): Declare.
2110 (set_gdb_breakpoint): Update declaration.
2111 (clear_breakpoint_conditions_and_commands): Likewise.
2112 (add_breakpoint_condition): Likewise.
2113 (add_breakpoint_commands): Likewise.
2114 * server.c (process_point_options): Change parameter type to
2115 'struct gdb_breakpoint *'.
2117 2016-07-21 Yao Qi <yao.qi@linaro.org>
2119 * mem-break.c (set_breakpoint_at): Rename it to ...
2120 (set_breakpoint_type_at): ... it.
2121 (set_breakpoint_at): Call set_breakpoint_type_at.
2122 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2123 * mem-break.h (set_breakpoint_at): Update comments.
2125 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2127 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2129 (nios2_store_gregset): Likewise.
2131 2016-07-01 Pedro Alves <palves@redhat.com>
2132 Antoine Tremblay <antoine.tremblay@ericsson.com>
2134 * linux-low.c: Change interface to take the target lwp_info
2135 pointer directly and return void. Handle detaching from a zombie
2137 (linux_detach_lwp_callback): New function.
2138 (linux_detach): Detach from the leader thread after detaching from
2141 2016-06-28 Yao Qi <yao.qi@linaro.org>
2143 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2144 for variable new_offset.
2145 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2146 (aarch64_ftrace_insn_reloc_cb): Likewise.
2147 (aarch64_ftrace_insn_reloc_tb): Likewise.
2148 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2149 PRIx64 instead of PRIx32.
2151 2016-06-28 Yao Qi <yao.qi@linaro.org>
2153 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2154 (the_low_target): Install arm_get_syscall_trapinfo.
2156 2016-06-28 Yao Qi <yao.qi@linaro.org>
2158 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2160 (the_low_target): Install aarch64_get_syscall_trapinfo.
2162 2016-06-28 Yao Qi <yao.qi@linaro.org>
2164 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2166 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2167 Remove parameter sysno.
2168 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2171 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2173 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2174 (s390_emit_ne_goto): Likewise.
2175 (s390_emit_lt_goto): Likewise.
2176 (s390_emit_le_goto): Likewise.
2177 (s390_emit_gt_goto): Likewise.
2178 (s390_emit_ge_goto): Likewise.
2179 (s390x_emit_eq_goto): Likewise.
2180 (s390x_emit_ne_goto): Likewise.
2181 (s390x_emit_lt_goto): Likewise.
2182 (s390x_emit_le_goto): Likewise.
2183 (s390x_emit_gt_goto): Likewise.
2184 (s390x_emit_ge_goto): Likewise.
2185 (s390_emit_ops_impl): Mark variable static.
2186 (s390x_emit_ops): Likewise.
2188 2016-06-17 Yao Qi <yao.qi@linaro.org>
2190 * linux-low.c (handle_extended_wait): Call
2191 uninsert_reinsert_breakpoints for the parent process. Remove
2192 reinsert breakpoints from the child process. Reinsert them to
2193 the parent process when vfork is done.
2194 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2195 (reinsert_reinsert_breakpoints): New function.
2196 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2197 (reinsert_reinsert_breakpoints): Declare.
2199 2016-06-17 Yao Qi <yao.qi@linaro.org>
2201 * linux-low.c (handle_extended_wait): If the parent is doing
2202 step-over, remove the reinsert breakpoints from the forked child.
2204 2016-06-17 Yao Qi <yao.qi@linaro.org>
2206 * linux-low.c (unsuspend_all_lwps): Declare.
2207 (linux_low_filter_event): If thread exited, call finish_step_over.
2208 If step-over is finished, unsuspend other threads.
2210 2016-06-17 Yao Qi <yao.qi@linaro.org>
2212 * linux-low.c (linux_resume_one_lwp_throw): Assert
2213 has_reinsert_breakpoints returns false.
2214 * mem-break.c (delete_disabled_breakpoints): Assert
2215 bp type isn't reinsert_breakpoint.
2217 2016-06-17 Yao Qi <yao.qi@linaro.org>
2219 * linux-low.c (maybe_hw_step): New function.
2220 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2221 (finish_step_over): Switch current_thread to lwp temporarily,
2222 and assert has_reinsert_breakpoints returns true.
2223 (proceed_one_lwp): Call maybe_hw_step.
2224 * mem-break.c (has_reinsert_breakpoints): New function.
2225 * mem-break.h (has_reinsert_breakpoints): Declare.
2227 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2229 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2231 2016-05-17 Yao Qi <yao.qi@linaro.org>
2233 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2234 instead of find_inferior.
2236 2016-05-05 Yao Qi <yao.qi@linaro.org>
2238 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2239 Initialize res to zero.
2241 2016-05-05 Yao Qi <yao.qi@linaro.org>
2243 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2246 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2248 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2249 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2250 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2252 2016-04-28 Par Olsson <par.olsson@windriver.com>
2253 Simon Marchi <simon.marchi@ericsson.com>
2255 * tracepoint.c (write_inferior_int8): New function.
2256 (cmd_qtenable_disable): Write enable flag using
2257 write_inferior_int8.
2259 2016-04-25 Yao Qi <yao.qi@linaro.org>
2261 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2262 (need_step_over_p): Return zero if the LWP has pending signals
2263 can be delivered on software single step target.
2265 2016-04-25 Yao Qi <yao.qi@linaro.org>
2267 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2268 return instead of error.
2270 2016-04-22 Yao Qi <yao.qi@linaro.org>
2272 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2275 2016-04-22 Yao Qi <yao.qi@linaro.org>
2277 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2278 signal when stepping over breakpoint with software single
2281 2016-04-21 Pedro Alves <palves@redhat.com>
2283 * linux-s390-low.c (s390_collect_ptrace_register)
2284 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2286 (s390_check_regset): Use void * instead of gdb_byte *.
2288 2016-04-20 Pedro Alves <palves@redhat.com>
2290 * configure: Renegerate.
2292 2016-04-20 Yao Qi <yao.qi@linaro.org>
2294 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2295 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2297 (arm_store_gregset): Likewise.
2299 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2301 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2302 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2303 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2304 (amd64-avx-mpx-linux.c): New rules.
2305 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2306 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2307 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2308 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2309 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2310 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2311 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2312 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2313 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2314 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2315 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2316 * linux-x86-low.c (x86_linux_read_description): Add case for
2317 X86_XSTATE_AVX_MPX_MASK.
2318 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2319 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2320 init_registers_i386_avx_mpx_linux.
2321 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2322 (initialize_low_tracepoint): Call
2323 init_registers_i386_avx_mpx_linux.
2324 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2325 (initialize_low_tracepoint): Call
2326 init_registers_amd64_avx_mpx_linux.
2327 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2328 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2329 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2332 2016-04-18 Pedro Alves <palves@redhat.com>
2334 * configure: Regenerate.
2336 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2338 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2339 (aarch64_emit_sub): Likewise.
2341 2016-04-12 Pedro Alves <palves@redhat.com>
2343 * utils.c (prepare_to_throw_exception): Delete.
2345 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2347 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2349 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2351 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2353 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2355 * linux-aarch64-ipa.c: Add <elf.h> include.
2356 * linux-ppc-ipa.c: Add <elf.h> include.
2357 * linux-s390-ipa.c: Add <elf.h> include.
2359 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2361 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2362 (get_raw_reg_ptr): Likewise.
2363 (get_trace_state_variable_value_ptr): Likewise.
2364 (set_trace_state_variable_value_ptr): Likewise.
2365 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2368 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2369 Marcin Kościelnicki <koriakin@0x04.net>
2372 * linux-ppc-low.c (emit_insns): New function.
2373 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2374 (ppc_emit_prologue): New function.
2375 (ppc_emit_epilogue): New function.
2376 (ppc_emit_add): New function.
2377 (ppc_emit_sub): New function.
2378 (ppc_emit_mul): New function.
2379 (ppc_emit_lsh): New function.
2380 (ppc_emit_rsh_signed): New function.
2381 (ppc_emit_rsh_unsigned): New function.
2382 (ppc_emit_ext): New function.
2383 (ppc_emit_zero_ext): New function.
2384 (ppc_emit_log_not): New function.
2385 (ppc_emit_bit_and): New function.
2386 (ppc_emit_bit_or): New function.
2387 (ppc_emit_bit_xor): New function.
2388 (ppc_emit_bit_not): New function.
2389 (ppc_emit_equal): New function.
2390 (ppc_emit_less_signed): New function.
2391 (ppc_emit_less_unsigned): New function.
2392 (ppc_emit_ref): New function.
2393 (ppc_emit_const): New function.
2394 (ppc_emit_reg): New function.
2395 (ppc_emit_pop): New function.
2396 (ppc_emit_stack_flush): New function.
2397 (ppc_emit_swap): New function.
2398 (ppc_emit_stack_adjust): New function.
2399 (ppc_emit_call): New function.
2400 (ppc_emit_int_call_1): New function.
2401 (ppc_emit_void_call_2): New function.
2402 (ppc_emit_if_goto): New function.
2403 (ppc_emit_goto): New function.
2404 (ppc_emit_eq_goto): New function.
2405 (ppc_emit_ne_goto): New function.
2406 (ppc_emit_lt_goto): New function.
2407 (ppc_emit_le_goto): New function.
2408 (ppc_emit_gt_goto): New function.
2409 (ppc_emit_ge_goto): New function.
2410 (ppc_write_goto_address): New function.
2411 (ppc_emit_ops_impl): New static variable.
2412 (ppc64v1_emit_prologue): New function.
2413 (ppc64v2_emit_prologue): New function.
2414 (ppc64_emit_epilogue): New function.
2415 (ppc64_emit_add): New function.
2416 (ppc64_emit_sub): New function.
2417 (ppc64_emit_mul): New function.
2418 (ppc64_emit_lsh): New function.
2419 (ppc64_emit_rsh_signed): New function.
2420 (ppc64_emit_rsh_unsigned): New function.
2421 (ppc64_emit_ext): New function.
2422 (ppc64_emit_zero_ext): New function.
2423 (ppc64_emit_log_not): New function.
2424 (ppc64_emit_bit_and): New function.
2425 (ppc64_emit_bit_or): New function.
2426 (ppc64_emit_bit_xor): New function.
2427 (ppc64_emit_bit_not): New function.
2428 (ppc64_emit_equal): New function.
2429 (ppc64_emit_less_signed): New function.
2430 (ppc64_emit_less_unsigned): New function.
2431 (ppc64_emit_ref): New function.
2432 (ppc64_emit_const): New function.
2433 (ppc64v1_emit_reg): New function.
2434 (ppc64v2_emit_reg): New function.
2435 (ppc64_emit_pop): New function.
2436 (ppc64_emit_stack_flush): New function.
2437 (ppc64_emit_swap): New function.
2438 (ppc64v1_emit_call): New function.
2439 (ppc64v2_emit_call): New function.
2440 (ppc64v1_emit_int_call_1): New function.
2441 (ppc64v2_emit_int_call_1): New function.
2442 (ppc64v1_emit_void_call_2): New function.
2443 (ppc64v2_emit_void_call_2): New function.
2444 (ppc64_emit_if_goto): New function.
2445 (ppc64_emit_eq_goto): New function.
2446 (ppc64_emit_ne_goto): New function.
2447 (ppc64_emit_lt_goto): New function.
2448 (ppc64_emit_le_goto): New function.
2449 (ppc64_emit_gt_goto): New function.
2450 (ppc64_emit_ge_goto): New function.
2451 (ppc64v1_emit_ops_impl): New static variable.
2452 (ppc64v2_emit_ops_impl): New static variable.
2453 (ppc_emit_ops): New function.
2454 (linux_low_target): Wire in ppc_emit_ops.
2456 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2457 Marcin Kościelnicki <koriakin@0x04.net>
2460 * Makefile.in: Add powerpc-*-ipa.o
2461 * configure.srv: Add ipa_obj for powerpc*-linux.
2462 * linux-ppc-ipa.c: New file.
2463 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2465 (PPC_FIELD): New macro.
2466 (PPC_SEXT): New macro.
2467 (PPC_OP6): New macro.
2468 (PPC_BO): New macro.
2469 (PPC_LI): New macro.
2470 (PPC_BD): New macro.
2471 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2472 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2473 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2474 (ppc_get_thread_area): New function.
2475 (is_elfv2_inferior): New function.
2476 (gen_ds_form): New function.
2477 (GEN_STD): New macro.
2478 (GEN_STDU): New macro.
2479 (GEN_LD): New macro.
2480 (GEN_LDU): New macro.
2481 (gen_d_form): New function.
2482 (GEN_ADDI): New macro.
2483 (GEN_ADDIS): New macro.
2484 (GEN_LI): New macro.
2485 (GEN_LIS): New macro.
2486 (GEN_ORI): New macro.
2487 (GEN_ORIS): New macro.
2488 (GEN_LWZ): New macro.
2489 (GEN_STW): New macro.
2490 (GEN_STWU): New macro.
2491 (gen_xfx_form): New function.
2492 (GEN_MFSPR): New macro.
2493 (GEN_MTSPR): New macro.
2494 (GEN_MFCR): New macro.
2495 (GEN_MTCR): New macro.
2496 (GEN_SYNC): New macro.
2497 (GEN_LWSYNC): New macro.
2498 (gen_x_form): New function.
2499 (GEN_OR): New macro.
2500 (GEN_MR): New macro.
2501 (GEN_LWARX): New macro.
2502 (GEN_STWCX): New macro.
2503 (GEN_CMPW): New macro.
2504 (gen_md_form): New function.
2505 (GEN_RLDICL): New macro.
2506 (GEN_RLDICR): New macro.
2507 (gen_i_form): New function.
2509 (GEN_BL): New macro.
2510 (gen_b_form): New function.
2511 (GEN_BNE): New macro.
2512 (GEN_LOAD): New macro.
2513 (GEN_STORE): New macro.
2514 (gen_limm): New function.
2515 (gen_atomic_xchg): New function.
2516 (gen_call): New function.
2517 (ppc_relocate_instruction): New function.
2518 (ppc_install_fast_tracepoint_jump_pad): New function.
2519 (ppc_get_min_fast_tracepoint_insn_len): New function.
2520 (ppc_get_ipa_tdesc_idx): New function.
2521 (the_low_target): Wire in the new functions.
2522 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2524 * linux-ppc-tdesc.h: New file.
2526 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2528 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2529 (alloc_jump_pad_buffer): New function.
2530 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2531 (alloc_jump_pad_buffer): New function.
2532 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2533 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2534 (alloc_jump_pad_buffer): New function.
2535 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2536 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2537 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2538 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2540 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2542 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2543 * linux-amd64-ipa.c: Likewise.
2544 * linux-i386-ipa.c: Likewise.
2545 * linux-s390-ipa.c: Likewise.
2546 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2547 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2548 set_trace_state_variable_value_ptr.
2549 (struct ipa_sym_addresses): Likewise.
2550 (symbol_list): Likewise.
2551 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2552 accessing gdb_collect directly.
2553 (gdb_collect_ptr_type): New typedef.
2554 (get_raw_reg_ptr_type): New typedef.
2555 (get_trace_state_variable_value_ptr_type): New typedef.
2556 (set_trace_state_variable_value_ptr_type): New typedef.
2557 (gdb_collect_ptr): New global.
2558 (get_raw_reg_ptr): New global.
2559 (get_trace_state_variable_value_ptr): New global.
2560 (set_trace_state_variable_value_ptr): New global.
2561 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2562 accessing get_raw_reg directly.
2563 (get_get_tsv_func_addr): Likewise for
2564 get_trace_state_variable_value_ptr.
2565 (get_set_tsv_func_addr): Likewise for
2566 set_trace_state_variable_value_ptr.
2567 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2569 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2571 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2573 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2575 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2577 (relocate_instruction): Remove own_buf.
2578 * server.c (own_buf): Make global.
2579 (handle_v_requests): Make global.
2580 * server.h (own_buf): New declaration.
2581 (handle_v_requests): New prototype.
2583 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2586 * linux-s390-low.c (add_insns): New function.
2587 (s390_emit_prologue): New function.
2588 (s390_emit_epilogue): New function.
2589 (s390_emit_add): New function.
2590 (s390_emit_sub): New function.
2591 (s390_emit_mul): New function.
2592 (s390_emit_lsh): New function.
2593 (s390_emit_rsh_signed): New function.
2594 (s390_emit_rsh_unsigned): New function.
2595 (s390_emit_ext): New function.
2596 (s390_emit_log_not): New function.
2597 (s390_emit_bit_and): New function.
2598 (s390_emit_bit_or): New function.
2599 (s390_emit_bit_xor): New function.
2600 (s390_emit_bit_not): New function.
2601 (s390_emit_equal): New function.
2602 (s390_emit_less_signed): New function.
2603 (s390_emit_less_unsigned): New function.
2604 (s390_emit_ref): New function.
2605 (s390_emit_if_goto): New function.
2606 (s390_emit_goto): New function.
2607 (s390_write_goto_address): New function.
2608 (s390_emit_litpool): New function.
2609 (s390_emit_const): New function.
2610 (s390_emit_call): New function.
2611 (s390_emit_reg): New function.
2612 (s390_emit_pop): New function.
2613 (s390_emit_stack_flush): New function.
2614 (s390_emit_zero_ext): New function.
2615 (s390_emit_swap): New function.
2616 (s390_emit_stack_adjust): New function.
2617 (s390_emit_set_r2): New function.
2618 (s390_emit_int_call_1): New function.
2619 (s390_emit_void_call_2): New function.
2620 (s390_emit_eq_goto): New function.
2621 (s390_emit_ne_goto): New function.
2622 (s390_emit_lt_goto): New function.
2623 (s390_emit_le_goto): New function.
2624 (s390_emit_gt_goto): New function.
2625 (s390_emit_ge_goto): New function.
2626 (s390x_emit_prologue): New function.
2627 (s390x_emit_epilogue): New function.
2628 (s390x_emit_add): New function.
2629 (s390x_emit_sub): New function.
2630 (s390x_emit_mul): New function.
2631 (s390x_emit_lsh): New function.
2632 (s390x_emit_rsh_signed): New function.
2633 (s390x_emit_rsh_unsigned): New function.
2634 (s390x_emit_ext): New function.
2635 (s390x_emit_log_not): New function.
2636 (s390x_emit_bit_and): New function.
2637 (s390x_emit_bit_or): New function.
2638 (s390x_emit_bit_xor): New function.
2639 (s390x_emit_bit_not): New function.
2640 (s390x_emit_equal): New function.
2641 (s390x_emit_less_signed): New function.
2642 (s390x_emit_less_unsigned): New function.
2643 (s390x_emit_ref): New function.
2644 (s390x_emit_if_goto): New function.
2645 (s390x_emit_const): New function.
2646 (s390x_emit_call): New function.
2647 (s390x_emit_reg): New function.
2648 (s390x_emit_pop): New function.
2649 (s390x_emit_stack_flush): New function.
2650 (s390x_emit_zero_ext): New function.
2651 (s390x_emit_swap): New function.
2652 (s390x_emit_stack_adjust): New function.
2653 (s390x_emit_int_call_1): New function.
2654 (s390x_emit_void_call_2): New function.
2655 (s390x_emit_eq_goto): New function.
2656 (s390x_emit_ne_goto): New function.
2657 (s390x_emit_lt_goto): New function.
2658 (s390x_emit_le_goto): New function.
2659 (s390x_emit_gt_goto): New function.
2660 (s390x_emit_ge_goto): New function.
2661 (s390_emit_ops): New function.
2662 (struct linux_target_ops): Fill in emit_ops hook.
2664 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2667 * Makefile.in: Add s390 IPA files.
2668 * configure.srv: Build IPA for s390.
2669 * linux-s390-ipa.c: New file.
2670 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2671 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2672 (tdesc_s390_linux32): Likewise.
2673 (init_registers_s390_linux32v1): Likewise.
2674 (tdesc_s390_linux32v1): Likewise.
2675 (init_registers_s390_linux32v2): Likewise.
2676 (tdesc_s390_linux32v2): Likewise.
2677 (init_registers_s390_linux64): Likewise.
2678 (tdesc_s390_linux64): Likewise.
2679 (init_registers_s390_linux64v1): Likewise.
2680 (tdesc_s390_linux64v1): Likewise.
2681 (init_registers_s390_linux64v2): Likewise.
2682 (tdesc_s390_linux64v2): Likewise.
2683 (init_registers_s390_te_linux64): Likewise.
2684 (tdesc_s390_te_linux64): Likewise.
2685 (init_registers_s390_vx_linux64): Likewise.
2686 (tdesc_s390_vx_linux64): Likewise.
2687 (init_registers_s390_tevx_linux64): Likewise.
2688 (tdesc_s390_tevx_linux64): Likewise.
2689 (init_registers_s390x_linux64): Likewise.
2690 (tdesc_s390x_linux64): Likewise.
2691 (init_registers_s390x_linux64v1): Likewise.
2692 (tdesc_s390x_linux64v1): Likewise.
2693 (init_registers_s390x_linux64v2): Likewise.
2694 (tdesc_s390x_linux64v2): Likewise.
2695 (init_registers_s390x_te_linux64): Likewise.
2696 (tdesc_s390x_te_linux64): Likewise.
2697 (init_registers_s390x_vx_linux64): Likewise.
2698 (tdesc_s390x_vx_linux64): Likewise.
2699 (init_registers_s390x_tevx_linux64): Likewise.
2700 (tdesc_s390x_tevx_linux64): Likewise.
2701 (have_hwcap_s390_vx): New static variable.
2702 (s390_arch_setup): Fill have_hwcap_s390_vx.
2703 (s390_get_thread_area): New function.
2704 (s390_ft_entry_gpr_esa): New const.
2705 (s390_ft_entry_gpr_zarch): New const.
2706 (s390_ft_entry_misc): New const.
2707 (s390_ft_entry_fr): New const.
2708 (s390_ft_entry_vr): New const.
2709 (s390_ft_main_31): New const.
2710 (s390_ft_main_64): New const.
2711 (s390_ft_exit_fr): New const.
2712 (s390_ft_exit_vr): New const.
2713 (s390_ft_exit_misc): New const.
2714 (s390_ft_exit_gpr_esa): New const.
2715 (s390_ft_exit_gpr_zarch): New const.
2716 (append_insns): New function.
2717 (s390_relocate_instruction): New function.
2718 (s390_install_fast_tracepoint_jump_pad): New function.
2719 (s390_get_min_fast_tracepoint_insn_len): New function.
2720 (s390_get_ipa_tdesc_idx): New function.
2721 (struct linux_target_ops): Wire in the above functions.
2722 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2723 * linux-s390-tdesc.h: New file.
2725 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2727 * linux-s390-low.c (s390_supports_tracepoints): New function.
2728 (struct linux_target_ops): Fill supports_tracepoints hook.
2730 2016-03-18 Yao Qi <yao.qi@linaro.org>
2732 * linux-low.c (lwp_signal_can_be_delivered): New function.
2733 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2735 2016-03-18 Yao Qi <yao.qi@linaro.org>
2737 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2738 0 if signal is enqueued. Remove 'signal' from one debugging
2739 message. Move one debugging message to some lines below.
2740 Remove code setting 'signal' to 0.
2742 2016-03-18 Yao Qi <yao.qi@linaro.org>
2744 * linux-low.c (linux_low_filter_event): Remove redundant
2745 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2747 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2749 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2750 (struct linux_target_ops): Wire in the above.
2752 2016-03-03 Yao Qi <yao.qi@linaro.org>
2754 * linux-low.c: Update comments to start_step_over.
2756 2016-03-03 Yao Qi <yao.qi@linaro.org>
2759 * linux-low.c (handle_extended_wait): Set child suspended
2760 if event_lwp->bp_reinsert isn't zero.
2762 2016-03-02 Yao Qi <yao.qi@linaro.org>
2764 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2765 enqueue_pending_signal.
2767 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2769 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2772 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2774 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2775 (s390_regmap_3264) [!__s390x__]: New global.
2776 (s390_collect_ptrace_register): Skip map entries containing -1.
2777 (s390_supply_ptrace_register): Ditto.
2778 (s390_fill_gprs_high): New function.
2779 (s390_store_gprs_high): New function.
2780 (s390_regsets): Add NT_S390_HIGH_GPRS.
2781 (s390_get_hwcap): Enable on 31-bit.
2782 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2783 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2784 Detect NT_S390_HIGH_GPRS.
2785 (s390_usrregs_info_3264): Enable on 31-bit.
2786 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2787 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2789 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2792 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2793 * configure.srv: Ditto.
2794 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2795 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2796 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2797 (init_registers_amd64_linux): Remove prototype.
2798 (tdesc_amd64_linux): Remove declaration.
2799 (get_ipa_tdesc): New function.
2800 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2801 initialize remaining tdescs.
2802 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2803 (init_registers_i386_linux): Remove prototype.
2804 (tdesc_i386_linux): Remove declaration.
2805 (get_ipa_tdesc): New function.
2806 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2807 initialize remaining tdescs.
2808 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2809 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2810 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2811 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2812 (x86_get_ipa_tdesc_idx): New function.
2813 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2814 * linux-x86-tdesc.h: New file.
2815 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2816 (target_get_ipa_tdesc_idx): New macro.
2817 * tracepoint.c (ipa_tdesc_idx): New macro.
2818 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2819 (symbol_list): Add ipa_tdesc_idx.
2820 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2821 (ipa_tdesc): Remove.
2822 (ipa_tdesc_idx): New variable.
2823 (get_context_regcache): Use get_ipa_tdesc.
2824 (gdb_collect): Ditto.
2826 * tracepoint.h (get_ipa_tdesc): New prototype.
2827 (ipa_tdesc): Remove.
2829 2016-02-24 Pedro Alves <palves@redhat.com>
2831 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2832 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2833 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2834 Factor out common code between the USE_SIGTRAP_SIGINFO and
2835 !USE_SIGTRAP_SIGINFO blocks.
2836 (linux_low_filter_event): Call save_stop_reason instead of
2837 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2839 (linux_wait_1): Update comments.
2841 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2843 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2844 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2845 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2846 ppc_insert_point, ppc_remove_point.
2848 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2850 * linux-s390-low.c (s390_supports_z_point_type): New function.
2851 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2853 2016-02-16 Yao Qi <yao.qi@linaro.org>
2855 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2856 PC. Get pc from regcache_read_pc.
2858 2016-02-12 Yao Qi <yao.qi@linaro.org>
2860 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2861 or linux_get_pc_32bit.
2862 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2864 2016-02-12 Yao Qi <yao.qi@linaro.org>
2866 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2867 arm_linux_get_next_pcs_fixup.
2869 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2871 * tracepoint.c (x_tracepoint_action_download): Change
2872 write_inferior_data_ptr to write_inferior_data_pointer.
2873 (cmd_qtstart): Likewise.
2874 (write_inferior_data_ptr): Remove.
2875 (download_agent_expr): Change write_inferior_data_ptr to
2876 write_inferior_data_pointer.
2877 (download_tracepoint_1): Likewise.
2878 (download_tracepoint): Likewise.
2879 (download_trace_state_variables): Likewise.
2881 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2882 Marcin Kościelnicki <koriakin@0x04.net>
2884 * tracepoint.c (struct tracepoint_action_ops): Remove.
2885 (struct tracepoint_action): Remove ops.
2886 (m_tracepoint_action_download, r_tracepoint_action_download)
2887 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2888 size and offset accordingly.
2889 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2890 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2891 (tracepoint_action_send, tracepoint_action_download): New functions.
2892 Helpers for trace action handlers.
2893 (add_tracepoint_action): Remove setup actions ops.
2894 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2896 2016-02-10 Yao Qi <yao.qi@linaro.org>
2898 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2900 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2902 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2904 * configure: Regenerate.
2906 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2908 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2909 void * to gdb_byte *.
2910 * linux-low.c (siginfo_fixup): Likewise.
2911 (linux_xfer_siginfo): Likewise.
2912 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2914 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2916 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2918 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2920 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2922 * linux-x86-low.c [__x86_64__]: Include
2923 "nat/amd64-linux-siginfo.h".
2924 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2925 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2926 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2927 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2928 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2929 (cpt_si_fd, si_timerid, si_overrun): Move from
2930 nat/amd64-linux-siginfo.c.
2931 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2933 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2935 * server.c (skip_to_semicolon): Remove.
2936 (process_point_options): Use strchrnul instead of
2939 2016-01-26 Yao Qi <yao.qi@linaro.org>
2941 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2942 * linux-low.c (install_software_single_step_breakpoints): Don't
2943 call regcache_read_pc.
2944 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2947 2016-01-26 Yao Qi <yao.qi@linaro.org>
2949 * linux-low.c (install_software_single_step_breakpoints): Call
2950 regcache_read_pc instead of get_pc.
2952 2016-01-26 Yao Qi <yao.qi@linaro.org>
2954 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2955 (unblock_async_io): Rename to ...
2956 (block_unblock_async_io): ... it. New function.
2957 (enable_async_io): Don't install SIGIO handler. Unblock it
2959 (disable_async_io): Don't ignore SIGIO. Block it instead.
2960 (initialize_async_io): Install SIGIO handler. Don't call
2963 2016-01-26 Yao Qi <yao.qi@linaro.org>
2965 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2966 first character is '\003', call *the_target->request_interrupt.
2968 2016-01-25 Yao Qi <yao.qi@linaro.org>
2970 * remote-utils.c (new_thread_notify): Remove.
2971 (dead_thread_notify): Likewise.
2972 * remote-utils.h (new_thread_notify): Remove declaration.
2973 (dead_thread_notify): Likewise.
2975 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2977 * gdb.trace/pending.exp: Fix expected message on continue.
2979 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2981 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2982 it works properly on big-endian machines where sizeof (CORE_ADDR)
2985 2016-01-21 Pedro Alves <palves@redhat.com>
2987 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2988 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2989 * configure: Regenerate.
2991 2016-01-21 Yao Qi <yao.qi@linaro.org>
2993 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2994 is_thumb and set it according to CPSR saved on the stack.
2995 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2996 arm_sigreturn_next_pc.
2998 2016-01-18 Yao Qi <yao.qi@linaro.org>
3000 * linux-low.c (linux_set_pc_64bit): New function.
3001 (linux_get_pc_64bit): New function.
3002 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3004 * linux-sparc-low.c (debug_threads): Remove declaration.
3005 (sparc_get_pc): Remove.
3006 (the_low_target): Use linux_get_pc_64bit instead of
3008 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3009 (the_low_target): Use linux_get_pc_64bit and
3012 2016-01-18 Yao Qi <yao.qi@linaro.org>
3014 * linux-arm-low.c (debug_threads): Remove declaration.
3015 (arm_get_pc, arm_set_pc): Remove.
3016 (the_low_target): Use linux_get_pc_32bit and
3018 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3019 (the_low_target): Use linux_get_pc_32bit and
3021 * linux-cris-low.c (debug_threads): Remove declaration.
3022 (cris_get_pc, cris_set_pc,): Remove.
3023 (the_low_target): Use linux_get_pc_32bit and
3025 * linux-crisv32-low.c (debug_threads): Remove declaration.
3026 (cris_get_pc, cris_set_pc): Remove.
3027 (the_low_target): Use linux_get_pc_32bit and
3029 * linux-low.c: Include inttypes.h.
3030 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3031 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3032 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3033 (the_low_target): Use linux_get_pc_32bit and
3035 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3036 (the_low_target): Use linux_get_pc_32bit and
3038 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3039 (the_low_target): Use linux_get_pc_32bit and
3041 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3042 (the_low_target): Use linux_get_pc_32bit and
3044 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3045 (the_low_target): Use linux_get_pc_32bit and
3048 2016-01-18 Gary Benson <gbenson@redhat.com>
3050 * configure.ac (AC_FUNC_FORK): New check.
3051 * config.in: Regenerate.
3052 * configure: Likewise.
3054 2016-01-14 Yao Qi <yao.qi@linaro.org>
3056 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3057 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3058 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3059 arm_get_next_pcs_ctor.
3061 2016-01-12 Josh Stone <jistone@redhat.com>
3062 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3064 * inferiors.h: Include "gdb_vecs.h".
3065 (struct process_info): Add syscalls_to_catch.
3066 * inferiors.c (remove_process): Free syscalls_to_catch.
3067 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3068 syscall_return stops.
3069 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3070 * server.c (handle_general_set): Handle QCatchSyscalls.
3071 (handle_query): Report support for QCatchSyscalls.
3072 * target.h (struct target_ops): Add supports_catch_syscall.
3073 (target_supports_catch_syscall): New macro.
3074 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3075 (struct lwp_info): Add syscall_state.
3076 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3077 Maintain syscall_state and syscalls_to_catch across exec.
3078 (get_syscall_trapinfo): New function, proxy to the_low_target.
3079 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3080 (linux_low_filter_event): Toggle syscall_state entry/return for
3081 syscall traps, and set it ignored for all others.
3082 (gdb_catching_syscalls_p): New function.
3083 (gdb_catch_this_syscall_p): New function.
3084 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3085 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3086 (linux_supports_catch_syscall): New function.
3087 (linux_target_ops): Install it.
3088 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3089 (the_low_target): Install it.
3091 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3093 * acinclude.m4: Include new ../warning.m4 file.
3094 * configure: Regenerated.
3095 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3097 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3099 * ax.c (is_goto_target): Mark static.
3100 * linux-low.c (register_addr): Likewise.
3101 (linux_fetch_registers, linux_store_registers): Likewise.
3102 * mem-break.c (any_persistent_commands): Fix old prototype.
3103 (add_commands_to_breakpoint): Mark static.
3104 * regcache.c (find_register_by_name): Delete unused func.
3105 * remote-utils.c (hex_or_minus_one): Mark static.
3106 * server.c (monitor_show_help): Mark static.
3107 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3108 handle_v_requests): Likewise.
3110 2016-01-12 Pedro Alves <palves@redhat.com>
3112 Remove use of the registered trademark symbol throughout.
3114 2016-01-08 Yao Qi <yao.qi@linaro.org>
3116 * remote-utils.c (getpkt): If c is '\003', call target hook
3119 2016-01-06 Yao Qi <yao.qi@linaro.org>
3121 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3122 linux-aarch32-low.c.
3123 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3124 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3125 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3126 (thumb2_breakpoint): Declare.
3127 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3128 linux-aarch32-low.h.
3129 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3130 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3131 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3133 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3135 * gdbreplay.c (gdbreplay_version): Change copyright year in
3137 * server.c (gdbserver_version): Likewise.
3139 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3141 * server.c (crc32_table): Delete.
3142 (crc32): Use libiberty's xcrc32 function.
3144 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3146 * lynx-low.c (lynx_delete_thread_callback): New function.
3147 (lynx_mourn): Properly delete our process and all of its
3148 threads. Remove call to clear_inferiors.
3150 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3152 * target.c (thread_search_callback): Add check that
3153 the thread_stopped target callback is not NULL before
3156 2015-12-21 Yao Qi <yao.qi@linaro.org>
3158 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3161 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3163 * server.c (handle_query): Call target_supports_software_single_step.
3165 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3167 * linux-low.c (single_step): New function.
3168 (linux_resume_one_lwp_throw): Call single_step.
3169 (start_step_over): Likewise.
3171 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3173 * Makefile.in (SFILES): Append arch/arm-linux.c,
3174 arch/arm-get-next-pcs.c.
3175 (arm-linux.o): New rule.
3176 (arm-get-next-pcs.o): New rule.
3177 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3179 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3180 to linux-aarch32-low.c.
3181 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3182 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3183 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3184 (thumb2_breakpoint_len): Likewise.
3185 (arm_is_thumb_mode): Make non-static.
3186 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3187 from linux-aarch32-low.c.
3188 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3189 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3190 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3191 (thumb2_breakpoint_len): Likewise.
3192 (arm_is_thumb_mode): New declaration.
3193 * linux-arm-low.c: Include arch/arm-linux.h
3194 aarch/arm-get-next-pcs.h, sys/syscall.h.
3195 (get_next_pcs_ops): New struct.
3196 (get_next_pcs_addr_bits_remove): New function.
3197 (get_next_pcs_is_thumb): New function.
3198 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3199 (arm_sigreturn_next_pc): Likewise.
3200 (get_next_pcs_syscall_next_pc): Likewise.
3201 (arm_gdbserver_get_next_pcs): Likewise.
3202 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3204 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3205 * server.h: Include gdb_vecs.h.
3207 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3209 * Makefile.in (SFILES): Append common/common-regcache.c.
3210 (OBS): Append common-regcache.o.
3211 (common-regcache.o): New rule.
3212 * regcache.c (init_register_cache): Initialize cache to
3214 (regcache_raw_read_unsigned): New function.
3215 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3216 register_status enum.
3218 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3220 * linux-aarch64-low.c (the_low_targets): Rename
3221 breakpoint_reinsert_addr to get_next_pcs.
3222 * linux-arm-low.c (the_low_targets): Likewise.
3223 * linux-bfin-low.c (the_low_targets): Likewise.
3224 * linux-cris-low.c (the_low_targets): Likewise.
3225 * linux-crisv32-low.c (the_low_targets): Likewise.
3226 * linux-low.c (can_software_single_step): Likewise.
3227 (install_software_single_step_breakpoints): New function.
3228 (start_step_over): Use install_software_single_step_breakpoints.
3229 * linux-low.h: New CORE_ADDR vector.
3230 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3232 * linux-mips-low.c (the_low_targets): Likewise.
3233 * linux-nios2-low.c (the_low_targets): Likewise.
3234 * linux-sparc-low.c (the_low_targets): Likewise.
3236 2015-12-17 Pedro Alves <palves@redhat.com>
3238 * linux-low.c (linux_kill_one_lwp): Remove references to
3240 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3242 (linux_init_signals): Delete.
3243 (initialize_low): Adjust.
3244 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3246 2015-12-16 Pedro Alves <palves@redhat.com>
3248 * configure.ac (compiler warning flags): When testing a
3249 -Wno-foo option, check whether -Wfoo works instead.
3250 * configure: Regenerate.
3252 2015-12-11 Don Breazeal <donb@codesourcery.com>
3254 * server.c (process_serial_event): Don't exit from gdbserver
3255 in remote mode if there are still active inferiors.
3257 2015-12-11 Yao Qi <yao.qi@linaro.org>
3259 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3260 arm_breakpoint_at if the process is 32-bit.
3262 2015-12-11 Yao Qi <yao.qi@linaro.org>
3264 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3267 2015-12-07 Yao Qi <yao.qi@linaro.org>
3269 * configure.srv: Append arm.o to srv_tgtobj for
3270 aarch64*-*-linux* target.
3271 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3272 from linux-arm-low.c.
3273 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3274 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3275 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3276 (thumb2_breakpoint_len): Likewise.
3277 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3278 (arm_breakpoint_kinds): Likewise.
3279 (arm_breakpoint_kind_from_pc): Likewise.
3280 (arm_sw_breakpoint_from_kind): Likewise.
3281 (arm_breakpoint_kind_from_current_state): Likewise.
3282 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3283 (arm_sw_breakpoint_from_kind): Declare.
3284 (arm_breakpoint_kind_from_current_state): Declare.
3285 (arm_breakpoint_at): Declare.
3286 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3287 arm_sw_breakpoint_from_kind if process is 32-bit.
3288 (aarch64_breakpoint_kind_from_pc): New function.
3289 (aarch64_breakpoint_kind_from_current_state): New function.
3290 (the_low_target): Initialize fields breakpoint_kind_from_pc
3291 and breakpoint_kind_from_current_state.
3292 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3293 linux-aarch32-low.c.
3294 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3295 (arm_breakpoint, arm_breakpoint_len): Likewise.
3296 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3297 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3298 (arm_is_thumb_mode): Likewise.
3299 (arm_breakpoint_at): Likewise.
3300 (arm_breakpoint_kind_from_pc): Likewise.
3301 (arm_sw_breakpoint_from_kind): Likewise.
3302 (arm_breakpoint_kind_from_current_state): Likewise.
3305 2015-08-04 Yao Qi <yao.qi@linaro.org>
3307 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3308 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3309 * server.c (extended_protocol): Remove "static".
3310 * server.h (extended_protocol): Declare it.
3312 2015-12-04 Josh Stone <jistone@redhat.com>
3314 * target.h (struct target_ops) <arch_setup>: Rename to ...
3315 (struct target_ops) <post_create_inferior>: ... this.
3316 (target_arch_setup): Rename to ...
3317 (target_post_create_inferior): ... this, calling post_create_inferior.
3318 * server.c (start_inferior): Update target_arch_setup calls to
3319 target_post_create_inferior.
3320 * linux-low.c (linux_low_ptrace_options): Forward declare.
3321 (linux_arch_setup): Update its comment for general use.
3322 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3323 (struct linux_target_ops): Use linux_post_create_inferior.
3324 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3325 to post_create_inferior.
3326 * nto-low.c (struct nto_target_ops): Likewise.
3327 * spu-low.c (struct spu_target_ops): Likewise.
3328 * win32-low.c (struct win32_target_ops): Likewise.
3330 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3332 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3334 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3336 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3337 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3338 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3339 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3340 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3341 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3342 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3343 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3344 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3345 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3346 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3347 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3349 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3351 * linux-low.c (linux_look_up_symbols): Don't call
3352 linux_supports_traceclone.
3353 * linux-low.h (thread_db_init): Remove use_events argument.
3354 * thread-db.c (thread_db_use_event): Remove global variable.
3355 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3356 (struct thread_db) <td_create_bp>: Remove field.
3357 (thread_db_create_event): Remove function.
3358 (thread_db_enable_reporting): Likewise.
3359 (find_one_thread): Don't check for thread_db_use_events.
3360 (attach_thread): Likewise.
3361 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3362 (try_thread_db_load_1): Don't check for thread_db_use_events.
3363 (thread_db_init): Remove use_events argument and thread events
3365 (remove_thread_event_breakpoints): Remove function.
3366 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3368 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3370 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3372 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3373 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3374 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3375 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3376 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3378 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3380 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3381 * linux-low.c (can_hardware_single_step): Use
3382 supports_hardware_single_step.
3383 (can_software_single_step): New function.
3384 (start_step_over): Call can_software_single_step.
3385 (linux_supports_hardware_single_step): New function.
3386 (struct target_ops) <supports_software_single_step>: Initialize.
3387 * linux-low.h (struct linux_target_ops)
3388 <supports_hardware_single_step>: Initialize.
3389 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3390 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3391 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3392 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3393 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3394 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3395 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3396 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3397 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3398 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3400 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3401 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3403 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3404 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3405 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3407 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3408 * target.h (struct target_ops): <supports_software_single_step>:
3410 (target_supports_software_single_step): New macro.
3412 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3414 * linux-low.c (linux_wait_1): Fix pc advance condition.
3415 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3416 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3418 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3420 * linux-arm-low.c (arm_is_thumb_mode): New function.
3421 (arm_breakpoint_at): Use arm_is_thumb_mode.
3422 (arm_breakpoint_kind_from_current_state): New function.
3423 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3425 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3426 (linux_breakpoint_kind_from_current_state): New function.
3427 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3428 * linux-low.h (struct linux_target_ops)
3429 <breakpoint_kind_from_current_state>: New field.
3430 * target.h (struct target_ops): Likewise.
3431 (target_breakpoint_kind_from_current_state): New macro.
3433 2015-11-30 Pedro Alves <palves@redhat.com>
3435 * linux-low.c (linux_resume): Wake up the event loop before
3438 2015-11-30 Pedro Alves <palves@redhat.com>
3440 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3442 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3444 * target.c (struct thread_search): New structure.
3445 (thread_search_callback): New function.
3446 (prev_general_thread): New global.
3447 (prepare_to_access_memory, done_accessing_memory): New functions.
3448 * target.h (prepare_to_access_memory, done_accessing_memory):
3449 Replace macros with function declarations.
3451 2015-11-30 Pedro Alves <palves@redhat.com>
3454 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3455 report TARGET_WAITKIND_NO_RESUMED.
3456 * remote-utils.c (prepare_resume_reply): Handle
3457 TARGET_WAITKIND_NO_RESUMED.
3458 * server.c (report_no_resumed): New global.
3459 (handle_query) <qSupported>: Handle "no-resumed+". Report
3460 "no-resumed+" support.
3461 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3462 return error if the client doesn't support no-resumed events.
3463 (push_stop_notification): New function.
3464 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3465 events if the client supports them.
3467 2015-11-30 Pedro Alves <palves@redhat.com>
3469 * linux-low.c (thread_still_has_status_pending_p): Don't check
3471 (lwp_resumed): New function.
3472 (status_pending_p_callback): Return early if the LWP is not
3473 supposed to be resumed.
3475 2015-11-30 Pedro Alves <palves@redhat.com>
3477 * linux-low.c (handle_extended_wait): Assert that the LWP's
3478 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3479 thread create events, leave the new child's status pending.
3480 (linux_low_filter_event): If GDB wants to hear about thread exit
3481 events, leave the LWP marked dead and don't delete it.
3482 (linux_wait_for_event_filtered): Don't check for thread exit.
3483 (filter_exit_event): New function.
3484 (linux_wait_1): Use it, when returning an exit event.
3485 (linux_resume_one_lwp_throw): Assert that the LWP's
3486 waitstatus is TARGET_WAITKIND_IGNORE.
3487 * remote-utils.c (prepare_resume_reply): Handle
3488 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3489 * server.c (report_thread_events): New global.
3490 (handle_general_set): Handle QThreadEvents.
3491 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3492 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3493 TARGET_WAITKIND_THREAD_EXITED.
3494 * server.h (report_thread_events): Declare.
3496 2015-11-30 Pedro Alves <palves@redhat.com>
3498 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3499 the thread's last_resume_kind was resume_stop.
3501 2015-11-30 Pedro Alves <palves@redhat.com>
3503 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3506 2015-11-30 Pedro Alves <palves@redhat.com>
3508 * server.c (handle_v_requests): Handle vCtrlC.
3510 2015-11-30 Pedro Alves <palves@redhat.com>
3512 * gdbthread.h (find_any_thread_of_pid): Declare.
3513 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3515 * server.c (handle_query): If current_thread is NULL, look for
3516 another thread of the selected process.
3518 2015-11-26 Daniel Colascione <dancol@dancol.org>
3519 Simon Marchi <simon.marchi@ericsson.com>
3521 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3522 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3524 * target.h (struct target_ops) <thread_name>: New field.
3525 (target_thread_name): New macro.
3527 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3529 * regcache.h (regcache_invalidate_pid): Add declaration.
3530 * regcache.c (regcache_invalidate_pid): New function, extracted
3531 from regcache_invalidate.
3532 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3533 Add trivial documentation comment.
3534 * lynx-low.c: Use regcache_invalidate_pid instead of
3535 regcache_invalidate.
3537 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3539 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3540 and Elf64_auxv_t if the target is Android.
3542 2015-11-22 Doug Evans <xdje42@gmail.com>
3544 * target.h: #include <sys/types.h>.
3546 2015-11-19 Pedro Alves <palves@redhat.com>
3548 * linux-low.c (linux_process_qsupported): Change prototype.
3550 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3552 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3553 and adjust to loop over all features.
3554 * server.c (handle_query) <qSupported>: Adjust to call
3555 target_process_qsupported once, passing it a vector of unprocessed
3557 * target.h (struct target_ops) <process_qsupported>: Change
3559 (target_process_qsupported): Adjust.
3561 2015-11-19 Pedro Alves <palves@redhat.com>
3563 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3565 * configure: Regenerate.
3567 2015-11-19 Pedro Alves <palves@redhat.com>
3569 * configure: Regenerate.
3571 2015-11-19 Yao Qi <yao.qi@linaro.org>
3573 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3576 2015-11-19 Yao Qi <yao.qi@linaro.org>
3578 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3579 (struct aarch64_operand): Move enum out.
3581 2015-11-19 Yao Qi <yao.qi@linaro.org>
3583 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3584 struct user_fpsimd_state *.
3585 (aarch64_store_fpregset): Likewise.
3587 2015-11-19 Yao Qi <yao.qi@linaro.org>
3589 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3590 struct user_pt_regs *.
3591 (aarch64_store_gregset): Likewise.
3593 2015-11-18 Pedro Alves <palves@redhat.com>
3595 * Makefile.in (all_object_files): Add $IPA_OBJS.
3597 2015-11-17 Pedro Alves <palves@redhat.com>
3599 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3600 GDB_SIGNAL_0 and gdb_signal_to_string.
3602 2015-11-17 Pedro Alves <palves@redhat.com>
3604 * win32-low.c (handle_output_debug_string): Remove parameter.
3605 (win32_kill): Remove our_status local and adjust call to
3606 handle_output_debug_string.
3607 (get_child_debug_event): Adjust call to
3608 handle_output_debug_string.
3610 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3612 * linux-mips-low.c (mips_fill_gregset): Add cast.
3613 (mips_store_gregset): Likewise.
3614 (mips_fill_fpregset): Likewise.
3615 (mips_store_fpregset): Likewise.
3617 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3619 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3622 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3624 * linux-mips-low.c (mips_linux_new_thread): Change type of
3625 watch_type to enum target_hw_bp_type.
3627 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3629 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3630 Change return type to arm_hwbp_type.
3632 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3634 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3635 (arm_store_gregset): Likewise.
3636 * linux-arm-low.c (arm_get_hwcap): Likewise.
3637 (arm_read_description): Likewise.
3639 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3641 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3643 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3645 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3646 (ppc_fill_vsxregset): Likewise.
3647 (ppc_store_vsxregset): Likewise.
3648 (ppc_fill_vrregset): Likewise.
3649 (ppc_store_vrregset): Likewise.
3650 (ppc_fill_evrregset): Likewise.
3651 (ppc_store_evrregset): Likewise.
3653 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3655 * linux-ppc-low.c (ppc_usrregs_info): Remove
3656 forward-declaration.
3657 (ppc_arch_setup): Move lower in file.
3659 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3661 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3662 (ps_pdwrite): Likewise.
3664 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3666 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3667 to after assert checks.
3669 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3671 * proc-service.c (ps_pdread): Add/adjust casts.
3672 (ps_pdwrite): Add/adjust casts.
3674 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3676 * server.c (handle_search_memory_1): Cast return value of
3679 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3681 * server.c (write_qxfer_response): Change type of data to
3684 2015-10-29 Pedro Alves <palves@redhat.com>
3686 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3688 2015-10-29 Pedro Alves <palves@redhat.com>
3690 * tracepoint.c (clear_installed_tracepoints): Add casts.
3692 2015-10-29 Pedro Alves <palves@redhat.com>
3694 * server.c (handle_v_cont, process_serial_event): Add enum
3695 gdb_signal casts to signal parsing code.
3697 2015-10-29 Pedro Alves <palves@redhat.com>
3699 * linux-low.h (NULL_REGSET): Define.
3700 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3701 * linux-arm-low.c (arm_regsets): Likewise.
3702 * linux-crisv32-low.c (cris_regsets): Likewise.
3703 * linux-m68k-low.c (m68k_regsets): Likewise.
3704 * linux-mips-low.c (mips_regsets): Likewise.
3705 * linux-nios2-low.c (nios2_regsets): Likewise.
3706 * linux-ppc-low.c (ppc_regsets): Likewise.
3707 * linux-s390-low.c (s390_regsets): Likewise.
3708 * linux-sh-low.c (sh_regsets): Likewise.
3709 * linux-sparc-low.c (sparc_regsets): Likewise.
3710 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3711 * linux-tile-low.c (tile_regsets): Likewise.
3712 * linux-x86-low.c (x86_regsets): Likewise.
3713 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3715 2015-10-29 Pedro Alves <palves@redhat.com>
3717 * linux-low.h (NULL_REGSET): Define.
3718 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3719 * linux-arm-low.c (arm_regsets): Likewise.
3720 * linux-crisv32-low.c (cris_regsets): Likewise.
3721 * linux-m68k-low.c (m68k_regsets): Likewise.
3722 * linux-mips-low.c (mips_regsets): Likewise.
3723 * linux-nios2-low.c (nios2_regsets): Likewise.
3724 * linux-ppc-low.c (ppc_regsets): Likewise.
3725 * linux-s390-low.c (s390_regsets): Likewise.
3726 * linux-sh-low.c (sh_regsets): Likewise.
3727 * linux-sparc-low.c (sparc_regsets): Likewise.
3728 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3729 * linux-tile-low.c (tile_regsets): Likewise.
3730 * linux-x86-low.c (x86_regsets): Likewise.
3731 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3733 2015-10-26 Doug Evans <dje@google.com>
3735 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3737 2015-10-26 Doug Evans <dje@google.com>
3739 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3741 2015-10-26 Doug Evans <dje@google.com>
3743 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3745 (attach_thread, find_new_threads_callback): Ditto.
3747 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3749 * mem-break.h (set_breakpoint_data): Remove.
3751 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3753 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3754 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3755 (initialize_low): Remove set_breakpoint_data call.
3756 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3757 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3758 (initialize_low): Remove set_breakpoint_data call.
3759 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3760 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3761 (initialize_low): Remove set_breakpoint_data call.
3763 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3765 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3766 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3767 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3768 * target.h (target_breakpoint_kind_from_pc): New macro.
3770 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3772 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3773 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3774 the default breakpoint kind.
3776 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3778 * linux-arm-low.c (arm_supports_z_point_type): Add software
3781 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3783 * linux-arm-low.c: Refactor breakpoint definitions.
3784 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3785 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3787 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3789 * Makefile.in: Add arm.c/o.
3790 * configure.srv: Likewise.
3791 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3792 (arm_breakpoint_kind_from_pc): New function.
3793 (arm_sw_breakpoint_from_kind): Return proper kind.
3794 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3796 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3798 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3800 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3801 (struct raw_breakpoint) <size>: Remove.
3802 (struct raw_breakpoint) <kind>: Add.
3803 (bp_size): New function.
3804 (bp_opcode): Likewise.
3805 (find_raw_breakpoint_at): Adjust for kind.
3806 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3807 (remove_memory_breakpoint): Adjust for kind call bp_size.
3808 (set_raw_breakpoint_at): Adjust for kind.
3809 (set_breakpoint): Likewise.
3810 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3811 (delete_raw_breakpoint): Adjust for kind.
3812 (delete_breakpoint): Likewise.
3813 (find_gdb_breakpoint): Likewise.
3814 (set_gdb_breakpoint_1): Likewise.
3815 (set_gdb_breakpoint): Likewise.
3816 (delete_gdb_breakpoint_1): Likewise.
3817 (delete_gdb_breakpoint): Likewise.
3818 (uninsert_raw_breakpoint): Likewise.
3819 (reinsert_raw_breakpoint): Likewise.
3820 (set_breakpoint_data): Remove.
3821 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3822 (check_mem_read): Adjust for kind call bp_size.
3823 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3824 (clone_one_breakpoint): Adjust for kind.
3825 * mem-break.h (set_gdb_breakpoint): Likewise.
3826 (delete_gdb_breakpoint): Likewise.
3827 * server.c (process_serial_event): Likewise.
3829 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3831 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3837 (arm_sw_breakpoint_from_kind): New function.
3838 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3839 (struct linux_target_ops) <breakpoint>: Remove.
3840 (struct linux_target_ops) <breakpoint_len>: Remove.
3841 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3842 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3843 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3844 (struct linux_target_ops) <breakpoint>: Remove.
3845 (struct linux_target_ops) <breakpoint_len>: Remove.
3846 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3847 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3848 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3849 (struct linux_target_ops) <breakpoint>: Remove.
3850 (struct linux_target_ops) <breakpoint_len>: Remove.
3851 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3852 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3853 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3854 and sw_breakpoint_from_kind to increment the pc.
3855 (linux_breakpoint_kind_from_pc): New function.
3856 (linux_sw_breakpoint_from_kind): New function.
3857 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3858 (initialize_low): Call breakpoint_kind_from_pc and
3859 sw_breakpoint_from_kind to replace breakpoint_data/len.
3860 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3862 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3863 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3864 (struct linux_target_ops) <breakpoint>: Remove.
3865 (struct linux_target_ops) <breakpoint_len>: Remove.
3866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3868 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3869 (struct linux_target_ops) <breakpoint>: Remove.
3870 (struct linux_target_ops) <breakpoint_len>: Remove.
3871 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3872 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3873 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3874 (struct linux_target_ops) <breakpoint>: Remove.
3875 (struct linux_target_ops) <breakpoint_len>: Remove.
3876 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3877 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3878 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3879 (struct linux_target_ops) <breakpoint>: Remove.
3880 (struct linux_target_ops) <breakpoint_len>: Remove.
3881 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3882 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3883 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3884 (struct linux_target_ops) <breakpoint>: Remove.
3885 (struct linux_target_ops) <breakpoint_len>: Remove.
3886 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3887 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3888 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3889 (struct linux_target_ops) <breakpoint>: Remove.
3890 (struct linux_target_ops) <breakpoint_len>: Remove.
3891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3893 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3894 (struct linux_target_ops) <breakpoint>: Remove.
3895 (struct linux_target_ops) <breakpoint_len>: Remove.
3896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3898 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3899 (struct linux_target_ops) <breakpoint>: Remove.
3900 (struct linux_target_ops) <breakpoint_len>: Remove.
3901 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3902 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3903 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3904 (struct linux_target_ops) <breakpoint>: Remove.
3905 (struct linux_target_ops) <breakpoint_len>: Remove.
3906 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3907 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3908 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3909 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3910 (struct linux_target_ops) <breakpoint>: Remove.
3911 (struct linux_target_ops) <breakpoint_len>: Remove.
3912 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3913 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3914 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3915 (struct linux_target_ops) <breakpoint>: Remove.
3916 (struct linux_target_ops) <breakpoint_len>: Remove.
3917 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3918 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3920 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3922 * linux-cris-low.c (cris_get_pc): Remove void arg.
3924 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3926 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3929 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3931 * inferiors.c (thread_pid_matches_callback): New function.
3932 (find_thread_process): New function.
3933 (remove_thread): Reset current_thread.
3934 (remove_process): Assert threads have been removed first.
3936 2015-10-15 Yao Qi <yao.qi@linaro.org>
3938 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3940 (aarch64_remove_point): Likewise.
3941 * regcache.c (regcache_register_size): New function.
3943 2015-10-12 Yao Qi <yao.qi@linaro.org>
3945 * linux-aarch64-low.c: Update all callers as emit_load_store
3946 is renamed to aarch64_emit_load_store.
3948 2015-10-12 Yao Qi <yao.qi@linaro.org>
3950 * linux-aarch64-low.c: Update all callers of function renaming
3951 from emit_insn to aarch64_emit_insn.
3953 2015-10-12 Yao Qi <yao.qi@linaro.org>
3955 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3956 arch/aarch64-insn.h.
3957 (struct aarch64_memory_operand): Likewise.
3959 (emit_insn): Move to arch/aarch64-insn.c.
3960 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3961 (emit_load_store): Move to arch/aarch64-insn.c.
3962 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3963 (can_encode_int32): Remove.
3965 2015-10-12 Yao Qi <yao.qi@linaro.org>
3967 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3968 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3969 (aarch64_relocate_instruction): Likewise.
3970 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3971 (struct aarch64_insn_visitor): Likewise.
3973 2015-10-12 Yao Qi <yao.qi@linaro.org>
3975 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3976 (struct aarch64_insn_visitor): New.
3977 (struct aarch64_insn_relocation_data): New.
3978 (aarch64_ftrace_insn_reloc_b): New function.
3979 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3980 (aarch64_ftrace_insn_reloc_cb): Likewise.
3981 (aarch64_ftrace_insn_reloc_tb): Likewise.
3982 (aarch64_ftrace_insn_reloc_adr): Likewise.
3983 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3984 (aarch64_ftrace_insn_reloc_others): Likewise.
3986 (aarch64_relocate_instruction): Use visitor.
3988 2015-10-12 Yao Qi <yao.qi@linaro.org>
3990 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3991 int. Add argument buf.
3992 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3993 aarch64_relocate_instruction.
3995 2015-10-12 Yao Qi <yao.qi@linaro.org>
3997 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3998 argument insn. Remove local variable insn. Don't call
4000 (aarch64_install_fast_tracepoint_jump_pad): Call
4003 2015-09-30 Yao Qi <yao.qi@linaro.org>
4005 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4006 (emit_load_store_pair): Likewise.
4008 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4010 * dll.c (match_dll): Add cast(s).
4011 (unloaded_dll): Likewise.
4012 * linux-low.c (second_thread_of_pid_p): Likewise.
4013 (delete_lwp_callback): Likewise.
4014 (count_events_callback): Likewise.
4015 (select_event_lwp_callback): Likewise.
4016 (linux_set_resume_request): Likewise.
4017 * server.c (accumulate_file_name_length): Likewise.
4018 (emit_dll_description): Likewise.
4019 (handle_qxfer_threads_worker): Likewise.
4020 (visit_actioned_threads): Likewise.
4021 * thread-db.c (any_thread_of): Likewise.
4022 * tracepoint.c (same_process_p): Likewise.
4023 (match_blocktype): Likewise.
4024 (build_traceframe_info_xml): Likewise.
4026 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4028 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4030 (gdb_unparse_agent_expr): Likewise.
4031 * hostio.c (require_data): Likewise.
4032 (handle_pread): Likewise.
4033 * linux-low.c (disable_regset): Likewise.
4034 (fetch_register): Likewise.
4035 (store_register): Likewise.
4036 (get_dynamic): Likewise.
4037 (linux_qxfer_libraries_svr4): Likewise.
4038 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4039 (set_fast_tracepoint_jump): Likewise.
4040 (uninsert_fast_tracepoint_jumps_at): Likewise.
4041 (reinsert_fast_tracepoint_jumps_at): Likewise.
4042 (validate_inserted_breakpoint): Likewise.
4043 (clone_agent_expr): Likewise.
4044 * regcache.c (init_register_cache): Likewise.
4045 * remote-utils.c (putpkt_binary_1): Likewise.
4046 (decode_M_packet): Likewise.
4047 (decode_X_packet): Likewise.
4048 (look_up_one_symbol): Likewise.
4049 (relocate_instruction): Likewise.
4050 (monitor_output): Likewise.
4051 * server.c (handle_search_memory): Likewise.
4052 (handle_qxfer_exec_file): Likewise.
4053 (handle_qxfer_libraries): Likewise.
4054 (handle_qxfer): Likewise.
4055 (handle_query): Likewise.
4056 (handle_v_cont): Likewise.
4057 (handle_v_run): Likewise.
4058 (captured_main): Likewise.
4059 * target.c (write_inferior_memory): Likewise.
4060 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4061 * tracepoint.c (init_trace_buffer): Likewise.
4062 (add_tracepoint_action): Likewise.
4063 (add_traceframe): Likewise.
4064 (add_traceframe_block): Likewise.
4065 (cmd_qtdpsrc): Likewise.
4066 (cmd_qtdv): Likewise.
4067 (cmd_qtstatus): Likewise.
4068 (response_source): Likewise.
4069 (response_tsv): Likewise.
4070 (cmd_qtnotes): Likewise.
4071 (gdb_collect): Likewise.
4072 (initialize_tracepoint): Likewise.
4074 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4076 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4077 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4078 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4080 (enum aarch64_condition_codes): New enum.
4081 (w0): New static global.
4084 (struct aarch64_memory_operand) <type>: New
4085 MEMORY_OPERAND_POSTINDEX type.
4086 (postindex_memory_operand): New helper function.
4087 (emit_ret): New function.
4088 (emit_load_store_pair): New function, factored out of emit_stp
4089 with support for MEMORY_OPERAND_POSTINDEX.
4090 (emit_stp): Rewrite using emit_load_store_pair.
4091 (emit_ldp): New function.
4092 (emit_load_store): Likewise.
4093 (emit_ldr): Mention post-index instruction in comment.
4094 (emit_ldrh): New function.
4095 (emit_ldrb): New function.
4096 (emit_ldrsw): Mention post-index instruction in comment.
4097 (emit_str): Likewise.
4098 (emit_subs): New function.
4099 (emit_cmp): Likewise.
4100 (emit_and): Likewise.
4101 (emit_orr): Likewise.
4102 (emit_orn): Likewise.
4103 (emit_eor): Likewise.
4104 (emit_mvn): Likewise.
4105 (emit_lslv): Likewise.
4106 (emit_lsrv): Likewise.
4107 (emit_asrv): Likewise.
4108 (emit_mul): Likewise.
4109 (emit_sbfm): Likewise.
4110 (emit_sbfx): Likewise.
4111 (emit_ubfm): Likewise.
4112 (emit_ubfx): Likewise.
4113 (emit_csinc): Likewise.
4114 (emit_cset): Likewise.
4115 (emit_nop): Likewise.
4116 (emit_ops_insns): New helper function.
4117 (emit_pop): Likewise.
4118 (emit_push): Likewise.
4119 (aarch64_emit_prologue): New function.
4120 (aarch64_emit_epilogue): Likewise.
4121 (aarch64_emit_add): Likewise.
4122 (aarch64_emit_sub): Likewise.
4123 (aarch64_emit_mul): Likewise.
4124 (aarch64_emit_lsh): Likewise.
4125 (aarch64_emit_rsh_signed): Likewise.
4126 (aarch64_emit_rsh_unsigned): Likewise.
4127 (aarch64_emit_ext): Likewise.
4128 (aarch64_emit_log_not): Likewise.
4129 (aarch64_emit_bit_and): Likewise.
4130 (aarch64_emit_bit_or): Likewise.
4131 (aarch64_emit_bit_xor): Likewise.
4132 (aarch64_emit_bit_not): Likewise.
4133 (aarch64_emit_equal): Likewise.
4134 (aarch64_emit_less_signed): Likewise.
4135 (aarch64_emit_less_unsigned): Likewise.
4136 (aarch64_emit_ref): Likewise.
4137 (aarch64_emit_if_goto): Likewise.
4138 (aarch64_emit_goto): Likewise.
4139 (aarch64_write_goto_address): Likewise.
4140 (aarch64_emit_const): Likewise.
4141 (aarch64_emit_call): Likewise.
4142 (aarch64_emit_reg): Likewise.
4143 (aarch64_emit_pop): Likewise.
4144 (aarch64_emit_stack_flush): Likewise.
4145 (aarch64_emit_zero_ext): Likewise.
4146 (aarch64_emit_swap): Likewise.
4147 (aarch64_emit_stack_adjust): Likewise.
4148 (aarch64_emit_int_call_1): Likewise.
4149 (aarch64_emit_void_call_2): Likewise.
4150 (aarch64_emit_eq_goto): Likewise.
4151 (aarch64_emit_ne_goto): Likewise.
4152 (aarch64_emit_lt_goto): Likewise.
4153 (aarch64_emit_le_goto): Likewise.
4154 (aarch64_emit_gt_goto): Likewise.
4155 (aarch64_emit_ge_got): Likewise.
4156 (aarch64_emit_ops_impl): New static global variable.
4157 (aarch64_emit_ops): New target function, return
4158 &aarch64_emit_ops_impl.
4159 (struct linux_target_ops): Install it.
4161 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4163 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4164 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4166 * linux-aarch64-ipa.c: New file.
4167 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4169 (aarch64_get_thread_area): New target method.
4170 (extract_signed_bitfield): New helper function.
4171 (aarch64_decode_ldr_literal): New function.
4172 (enum aarch64_opcodes): New enum.
4173 (struct aarch64_register): New struct.
4174 (struct aarch64_operand): New struct.
4175 (x0): New static global.
4184 (aarch64_register): New helper function.
4185 (register_operand): Likewise.
4186 (immediate_operand): Likewise.
4187 (struct aarch64_memory_operand): New struct.
4188 (offset_memory_operand): New helper function.
4189 (preindex_memory_operand): Likewise.
4190 (enum aarch64_system_control_registers): New enum.
4191 (ENCODE): New macro.
4192 (emit_insn): New helper function.
4193 (emit_b): New function.
4194 (emit_bcond): Likewise.
4195 (emit_cb): Likewise.
4196 (emit_tb): Likewise.
4197 (emit_blr): Likewise.
4198 (emit_stp): Likewise.
4199 (emit_ldp_q_offset): Likewise.
4200 (emit_stp_q_offset): Likewise.
4201 (emit_load_store): Likewise.
4202 (emit_ldr): Likewise.
4203 (emit_ldrsw): Likewise.
4204 (emit_str): Likewise.
4205 (emit_ldaxr): Likewise.
4206 (emit_stxr): Likewise.
4207 (emit_stlr): Likewise.
4208 (emit_data_processing_reg): Likewise.
4209 (emit_data_processing): Likewise.
4210 (emit_add): Likewise.
4211 (emit_sub): Likewise.
4212 (emit_mov): Likewise.
4213 (emit_movk): Likewise.
4214 (emit_mov_addr): Likewise.
4215 (emit_mrs): Likewise.
4216 (emit_msr): Likewise.
4217 (emit_sevl): Likewise.
4218 (emit_wfe): Likewise.
4219 (append_insns): Likewise.
4220 (can_encode_int32_in): New helper function.
4221 (aarch64_relocate_instruction): New function.
4222 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4223 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4224 (struct linux_target_ops): Install aarch64_get_thread_area,
4225 aarch64_install_fast_tracepoint_jump_pad and
4226 aarch64_get_min_fast_tracepoint_insn_len.
4228 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4230 * Makefile.in (aarch64-insn.o): New rule.
4231 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4233 2015-09-21 Yao Qi <yao.qi@linaro.org>
4235 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4237 2015-09-21 Yao Qi <yao.qi@linaro.org>
4239 * tracepoint.c (max_jump_pad_size): Remove.
4241 2015-09-18 Yao Qi <yao.qi@linaro.org>
4243 * linux-aarch64-low.c: Don't include sys/uio.h.
4244 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4246 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4248 * tracepoint.c (eval_result_type): Change prototype.
4249 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4251 2015-09-15 Pedro Alves <palves@redhat.com>
4253 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4254 Check whether to report exec events instead of checking whether
4255 multiprocess is enabled.
4257 2015-09-15 Pedro Alves <palves@redhat.com>
4260 * remote-utils.c (prepare_resume_reply): Merge
4261 TARGET_WAITKIND_VFORK_DONE switch case with the
4262 TARGET_WAITKIND_FORKED case.
4264 2015-09-15 Yao Qi <yao.qi@linaro.org>
4266 * server.c (handle_query): Check string comparison using
4267 "else if" instead of "if".
4269 2015-09-15 Yao Qi <yao.qi@linaro.org>
4271 * server.c (vCont_supported): New global variable.
4272 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4273 matches. Append ";vContSupported+" to own_buf.
4274 (handle_v_requests): Append ";s;S" to own_buf if target supports
4275 hardware single step or vCont_supported is false.
4276 (capture_main): Set vCont_supported to zero.
4278 2015-09-15 Yao Qi <yao.qi@linaro.org>
4280 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4282 (linux_supports_hardware_single_step): ... New function.
4283 (linux_target_ops): Update.
4284 * lynx-low.c (lynx_target_ops): Set field
4285 supports_hardware_single_step to target_can_do_hardware_single_step.
4286 * nto-low.c (nto_target_ops): Likewise.
4287 * spu-low.c (spu_target_ops): Likewise.
4288 * win32-low.c (win32_target_ops): Likewise.
4289 * target.c (target_can_do_hardware_single_step): New function.
4290 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4291 Remove. <supports_hardware_single_step>: New field.
4292 (target_supports_conditional_breakpoints): Remove.
4293 (target_supports_hardware_single_step): New macro.
4294 (target_can_do_hardware_single_step): Declare.
4295 * server.c (handle_query): Use target_supports_hardware_single_step
4296 instead of target_supports_conditional_breakpoints.
4298 2015-09-15 Yao Qi <yao.qi@linaro.org>
4300 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4302 (struct linux_target_ops the_low_target): Install
4303 aarch64_linux_siginfo_fixup.
4305 2015-09-11 Don Breazeal <donb@codesourcery.com>
4306 Luis Machado <lgustavo@codesourcery.com>
4308 * linux-low.c (linux_mourn): Static declaration.
4309 (linux_arch_setup): Move in front of
4310 handle_extended_wait.
4311 (linux_arch_setup_thread): New function.
4312 (handle_extended_wait): Handle exec events. Call
4313 linux_arch_setup_thread. Make event_lwp argument a
4314 pointer-to-a-pointer.
4315 (check_zombie_leaders): Do not check stopped threads.
4316 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4317 (linux_low_filter_event): Add lwp and thread for exec'ing
4318 non-leader thread if leader thread has been deleted.
4319 Refactor code into linux_arch_setup_thread and call it.
4320 Pass child lwp pointer by reference to handle_extended_wait.
4321 (linux_wait_for_event_filtered): Update comment.
4322 (linux_wait_1): Prevent clobbering exec event status.
4323 (linux_supports_exec_events): New function.
4324 (linux_target_ops) <supports_exec_events>: Initialize new member.
4325 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4327 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4328 * server.c (report_exec_events): New global variable.
4329 (handle_query): Handle qSupported query for exec-events feature.
4330 (captured_main): Initialize report_exec_events.
4331 * server.h (report_exec_events): Declare new global variable.
4332 * target.h (struct target_ops) <supports_exec_events>: New
4334 (target_supports_exec_events): New macro.
4335 * win32-low.c (win32_target_ops) <supports_exec_events>:
4336 Initialize new member.
4338 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4340 * linux-low.c (linux_low_enable_btrace): Remove.
4341 (linux_target_ops): Replace linux_low_enable_btrace with
4342 linux_enable_btrace.
4344 2015-09-03 Yao Qi <yao.qi@linaro.org>
4346 * linux-aarch64-low.c (aarch64_insert_point): Call
4347 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4350 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4352 * linux-low.c (check_stopped_by_breakpoint): Use
4353 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4355 2015-08-27 Pedro Alves <palves@redhat.com>
4357 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4359 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4361 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4362 the XNEW-family equivalent.
4363 (compile_bytecodes): Likewise.
4364 * dll.c (loaded_dll): Likewise.
4365 * event-loop.c (append_callback_event): Likewise.
4366 (create_file_handler): Likewise.
4367 (create_file_event): Likewise.
4368 * hostio.c (handle_open): Likewise.
4369 * inferiors.c (add_thread): Likewise.
4370 (add_process): Likewise.
4371 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4372 * linux-arm-low.c (arm_new_process): Likewise.
4373 (arm_new_thread): Likewise.
4374 * linux-low.c (add_to_pid_list): Likewise.
4375 (linux_add_process): Likewise.
4376 (handle_extended_wait): Likewise.
4377 (add_lwp): Likewise.
4378 (enqueue_one_deferred_signal): Likewise.
4379 (enqueue_pending_signal): Likewise.
4380 (linux_resume_one_lwp_throw): Likewise.
4381 (linux_resume_one_thread): Likewise.
4382 (linux_read_memory): Likewise.
4383 (linux_write_memory): Likewise.
4384 * linux-mips-low.c (mips_linux_new_process): Likewise.
4385 (mips_linux_new_thread): Likewise.
4386 (mips_add_watchpoint): Likewise.
4387 * linux-x86-low.c (initialize_low_arch): Likewise.
4388 * lynx-low.c (lynx_add_process): Likewise.
4389 * mem-break.c (set_raw_breakpoint_at): Likewise.
4390 (set_breakpoint): Likewise.
4391 (add_condition_to_breakpoint): Likewise.
4392 (add_commands_to_breakpoint): Likewise.
4393 (clone_agent_expr): Likewise.
4394 (clone_one_breakpoint): Likewise.
4395 * regcache.c (new_register_cache): Likewise.
4396 * remote-utils.c (look_up_one_symbol): Likewise.
4397 * server.c (queue_stop_reply): Likewise.
4398 (start_inferior): Likewise.
4399 (queue_stop_reply_callback): Likewise.
4400 (handle_target_event): Likewise.
4401 * spu-low.c (fetch_ppc_memory): Likewise.
4402 (store_ppc_memory): Likewise.
4403 * target.c (set_target_ops): Likewise.
4404 * thread-db.c (thread_db_load_search): Likewise.
4405 (try_thread_db_load_1): Likewise.
4406 * tracepoint.c (add_tracepoint): Likewise.
4407 (add_tracepoint_action): Likewise.
4408 (create_trace_state_variable): Likewise.
4409 (cmd_qtdpsrc): Likewise.
4410 (cmd_qtro): Likewise.
4411 (add_while_stepping_state): Likewise.
4412 * win32-low.c (child_add_thread): Likewise.
4413 (get_image_name): Likewise.
4415 2015-08-25 Yao Qi <yao.qi@linaro.org>
4417 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4419 2015-08-25 Yao Qi <yao.qi@linaro.org>
4421 * Makefile.in (aarch64-linux.o): New rule.
4422 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4424 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4425 (aarch64_init_debug_reg_state): Make it extern.
4426 (aarch64_linux_prepare_to_resume): Remove.
4428 2015-08-25 Yao Qi <yao.qi@linaro.org>
4430 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4431 lwp_arch_private_info and ptid_of_lwp.
4433 2015-08-25 Yao Qi <yao.qi@linaro.org>
4435 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4436 Find proc_info by find_process_pid. All callers updated.
4438 2015-08-25 Yao Qi <yao.qi@linaro.org>
4440 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4442 (debug_reg_change_callback): Remove.
4443 (aarch64_notify_debug_reg_change): Remove.
4445 2015-08-25 Yao Qi <yao.qi@linaro.org>
4447 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4448 Call current_lwp_ptid.
4450 2015-08-25 Yao Qi <yao.qi@linaro.org>
4452 * linux-aarch64-low.c (debug_reg_change_callback): Use
4455 2015-08-25 Yao Qi <yao.qi@linaro.org>
4457 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4459 2015-08-25 Yao Qi <yao.qi@linaro.org>
4461 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4463 2015-08-25 Yao Qi <yao.qi@linaro.org>
4465 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4468 2015-08-25 Yao Qi <yao.qi@linaro.org>
4470 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4472 (debug_reg_change_callback): Remove argument entry and add argument
4473 lwp. Remove local variable thread. Don't print thread id in the
4474 debugging output. Don't check whether pid of thread equals to pid.
4475 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4476 iterate_over_lwps instead find_inferior.
4478 2015-08-24 Pedro Alves <palves@redhat.com>
4480 * inferiors.c (get_first_process): New function.
4481 * inferiors.h (get_first_process): New declaration.
4482 * remote-utils.c (read_ptid): Default to the first process in the
4483 list, instead of to the current thread's process.
4485 2015-08-24 Pedro Alves <palves@redhat.com>
4487 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4488 * event-loop.c: Likewise.
4489 * remote-utils.c: Likewise.
4490 * tracepoint.c: Likewise.
4492 2015-08-24 Pedro Alves <palves@redhat.com>
4494 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4497 2015-08-21 Pedro Alves <palves@redhat.com>
4499 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4500 instead of literal 1.
4502 2015-08-21 Pedro Alves <palves@redhat.com>
4504 * tdesc.c (default_description): Explicitly zero-initialize.
4506 2015-08-21 Pedro Alves <palves@redhat.com>
4509 * inferiors.c (remove_thread): Discard any pending stop reply for
4511 * server.c (remove_all_on_match_pid): Rename to ...
4512 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4514 (discard_queued_stop_replies): Change parameter to a ptid. Now
4516 (handle_v_kill, kill_inferior_callback, captured_main)
4517 (process_serial_event): Adjust.
4518 * server.h (discard_queued_stop_replies): Declare.
4520 2015-08-21 Pedro Alves <palves@redhat.com>
4522 * linux-low.c (wait_for_sigstop): Always switch to no thread
4523 selected if the previously current thread dies.
4524 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4525 process instead of the current thread's.
4526 * remote-utils.c (input_interrupt): Don't check if there's no
4528 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4529 current thread to the general thread fails, error out.
4530 (handle_qxfer_auxv, handle_qxfer_libraries)
4531 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4532 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4533 (handle_query): Check if there's a thread selected instead of
4534 checking whether there's any thread in the thread list.
4535 (handle_qxfer_threads, handle_qxfer_btrace)
4536 (handle_qxfer_btrace_conf): Don't error out early if there's no
4537 thread in the thread list.
4538 (handle_v_cont, myresume): Don't set the current thread to the
4540 (process_serial_event) <Hg handling>: Also set thread_id if the
4541 previous general thread is still alive.
4542 (process_serial_event) <g/G handling>: If setting the current
4543 thread to the general thread fails, error out.
4544 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4545 thread's lwp instead of the current thread's.
4546 * target.c (set_desired_thread): If the desired thread was not
4547 found, leave the current thread pointing to NULL. Return an int
4548 (boolean) indicating success.
4549 * target.h (set_desired_thread): Change return type to int.
4551 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4553 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4554 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4556 (ps_get_thread_area): New function.
4558 2015-08-19 Gary Benson <gbenson@redhat.com>
4560 * hostio.c (handle_pread): Do not attempt to read more data
4561 than hostio_reply_with_data can fit in a packet.
4563 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4565 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4567 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4569 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4571 2015-08-06 Pedro Alves <palves@redhat.com>
4573 * tracepoint.c (expr_eval_result): Now an int.
4575 2015-08-06 Pedro Alves <palves@redhat.com>
4577 * gdbthread.h (struct regcache): Forward declare.
4578 (struct thread_info) <regcache_data>: Now a struct regcache
4580 * inferiors.c (inferior_regcache_data)
4581 (set_inferior_regcache_data): Now work with struct regcache
4583 * inferiors.h (struct regcache): Forward declare.
4584 (inferior_regcache_data, set_inferior_regcache_data): Now work
4585 with struct regcache pointers.
4586 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4587 (free_register_cache_thread): Remove struct regcache pointer
4590 2015-08-06 Pedro Alves <palves@redhat.com>
4592 * server.c (captured_main): On error, print the exception message
4593 to stderr, and if run_once is set, throw a quit.
4595 2015-08-06 Pedro Alves <palves@redhat.com>
4597 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4600 2015-08-06 Pedro Alves <palves@redhat.com>
4602 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4603 reading beyond the passed in buffer length.
4605 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4607 * tracepoint.c (symbol_list) <required>: Remove.
4609 2015-08-06 Pedro Alves <palves@redhat.com>
4611 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4612 count if stopping and suspending threads.
4613 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4614 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4615 (linux_detach): Complete an ongoing step-over.
4616 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4618 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4619 (linux_wait_1): If passing a signal to the inferior after
4620 finishing a step-over, unsuspend and re-resume all lwps. If we
4621 see a single-step event but the thread should be continuing, don't
4622 pass the trap to gdb.
4623 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4624 internal_error instead of gdb_assert.
4625 (enqueue_pending_signal): New function.
4626 (check_ptrace_stopped_lwp_gone): Add debug output.
4627 (start_step_over): Use internal_error instead of gdb_assert.
4628 (complete_ongoing_step_over): New function.
4629 (linux_resume_one_thread): Don't resume a suspended thread.
4630 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4633 2015-08-06 Pedro Alves <palves@redhat.com>
4635 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4636 (linux_thread_alive): Use lwp_is_marked_dead.
4637 (extended_event_reported): Delete.
4638 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4639 instead of extended_event_reported.
4640 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4642 (lwp_is_marked_dead): New function.
4643 (lwp_running): Use lwp_is_marked_dead.
4644 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4647 2015-08-06 Pedro Alves <palves@redhat.com>
4649 * linux-low.c (linux_wait_1): Move fork event output out of the
4650 !report_to_gdb check. Pass event_child->waitstatus to
4651 target_waitstatus_to_string instead of ourstatus.
4653 2015-08-04 Yao Qi <yao.qi@linaro.org>
4655 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4656 if current_thread is 32 bit.
4658 2015-08-04 Yao Qi <yao.qi@linaro.org>
4660 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4661 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4662 * server.c (extended_protocol): Remove "static".
4663 * server.h (extended_protocol): Declare it.
4665 2015-08-04 Yao Qi <yao.qi@linaro.org>
4667 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4668 both aarch64 and aarch32.
4669 (aarch64_set_pc): Likewise.
4671 2015-08-04 Yao Qi <yao.qi@linaro.org>
4673 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4674 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4675 arm-with-neon.xml to srv_xmlfiles.
4676 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4677 (is_64bit_tdesc): New function.
4678 (aarch64_linux_read_description): New function.
4679 (aarch64_arch_setup): Call aarch64_linux_read_description.
4680 (regs_info): Rename to regs_info_aarch64.
4681 (aarch64_regs_info): Return right regs_info.
4682 (initialize_low_arch): Call initialize_low_arch_aarch32.
4684 2015-08-04 Yao Qi <yao.qi@linaro.org>
4686 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4687 * linux-aarch32-low.c: New file.
4688 * linux-aarch32-low.h: New file.
4689 * linux-arm-low.c (arm_fill_gregset): Move it to
4690 linux-aarch32-low.c.
4691 (arm_store_gregset): Likewise.
4692 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4693 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4694 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4695 (regs_info): Rename to regs_info_arm.
4696 (arm_regs_info): Return regs_info_aarch32 if
4697 have_ptrace_getregset is 1 and target description is
4698 arm_with_neon or arm_with_vfpv3.
4699 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4700 Call initialize_low_arch_aarch32 instead.
4702 2015-08-04 Yao Qi <yao.qi@linaro.org>
4704 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4705 * linux-low.c: ... here.
4706 * linux-low.h (have_ptrace_getregset): Declare it.
4708 2015-08-04 Pedro Alves <palves@redhat.com>
4710 * thread-db.c (struct thread_db): Use new typedefs.
4711 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4713 (disable_thread_event_reporting): Cast result of dlsym to
4714 destination function pointer type.
4715 (thread_db_mourn): Use td_ta_delete_ftype.
4717 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4719 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4721 (CDX_BREAKPOINT): Define for R2.
4722 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4723 (the_low_target): Add comments.
4725 2015-07-30 Yao Qi <yao.qi@linaro.org>
4727 * linux-arm-low.c (arm_hwcap): Remove it.
4728 (arm_read_description): New local variable arm_hwcap. Don't
4729 set arm_hwcap to zero.
4731 2015-07-30 Yao Qi <yao.qi@linaro.org>
4733 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4734 Use regcache->tdesc instead.
4735 (arm_store_wmmxregset): Likewise.
4736 (arm_fill_vfpregset): Likewise.
4737 (arm_store_vfpregset): Likewise.
4739 2015-07-30 Yao Qi <yao.qi@linaro.org>
4741 * linux-arm-low.c: Include arch/arm.h.
4742 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4743 (arm_store_gregset): Likewise.
4745 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4747 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4748 ptrace's 4th parameter.
4750 2015-07-27 Yao Qi <yao.qi@linaro.org>
4752 * configure.srv (case aarch64*-*-linux*): Don't set
4755 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4757 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4759 * linux-arm-low.c: Likewise.
4760 * linux-cris-low.c: Likewise.
4761 * linux-crisv32-low.c: Likewise.
4762 * linux-low.c: Likewise.
4763 * linux-m68k-low.c: Likewise.
4764 * linux-mips-low.c: Likewise.
4765 * linux-nios2-low.c: Likewise.
4766 * linux-s390-low.c: Likewise.
4767 * linux-sparc-low.c: Likewise.
4768 * linux-tic6x-low.c: Likewise.
4769 * linux-tile-low.c: Likewise.
4770 * linux-x86-low.c: Likewise.
4772 2015-07-24 Pedro Alves <palves@redhat.com>
4774 * config.in: Regenerate.
4775 * configure: Regenerate.
4777 2015-07-24 Pedro Alves <palves@redhat.com>
4779 * acinclude.m4: Include ../ptrace.m4.
4780 * configure.ac: Call GDB_AC_PTRACE.
4781 * config.in, configure: Regenerate.
4783 2015-07-24 Yao Qi <yao.qi@linaro.org>
4785 * linux-low.c (linux_create_inferior): Remove setting to
4786 proc->priv->new_inferior.
4787 (linux_attach): Likewise.
4788 (linux_low_filter_event): Likewise.
4789 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4791 2015-07-24 Yao Qi <yao.qi@linaro.org>
4793 * linux-low.c (linux_arch_setup): New function.
4794 (linux_low_filter_event): If proc->tdesc is NULL and
4795 proc->attached is true, call the_low_target.arch_setup.
4796 Otherwise, keep status pending, and return.
4797 (linux_resume_one_lwp_throw): Don't call get_pc if
4798 thread->while_stepping isn't NULL. Don't call
4799 get_thread_regcache if proc->tdesc is NULL.
4800 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4801 (linux_target_ops): Install arch_setup.
4802 * server.c (start_inferior): Call the_target->arch_setup.
4803 * target.h (struct target_ops) <arch_setup>: New field.
4804 (target_arch_setup): New marco.
4805 * lynx-low.c (lynx_target_ops): Update.
4806 * nto-low.c (nto_target_ops): Update.
4807 * spu-low.c (spu_target_ops): Update.
4808 * win32-low.c (win32_target_ops): Update.
4810 2015-07-24 Yao Qi <yao.qi@linaro.org>
4812 * linux-low.c (linux_add_process): Don't set
4813 proc->priv->new_inferior.
4814 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4815 (linux_attach): Likewise.
4817 2015-07-24 Yao Qi <yao.qi@linaro.org>
4819 * server.c (start_inferior): Code refactor.
4821 2015-07-24 Yao Qi <yao.qi@linaro.org>
4823 * server.c (process_serial_event): Set general_thread.
4825 2015-07-21 Yao Qi <yao.qi@linaro.org>
4827 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4828 aarch64_linux_get_debug_reg_capacity.
4830 2015-07-17 Yao Qi <yao.qi@linaro.org>
4832 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4833 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4834 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4835 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4836 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4837 (AARCH64_HWP_ALIGNMENT): Likewise.
4838 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4839 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4840 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4841 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4842 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4843 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4844 (struct aarch64_debug_reg_state): Likewise.
4845 (struct arch_lwp_info): Likewise.
4846 (aarch64_align_watchpoint): Likewise.
4847 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4848 (aarch64_watchpoint_length): Likewise.
4849 (aarch64_point_encode_ctrl_reg): Likewise
4850 (aarch64_point_is_aligned): Likewise.
4851 (aarch64_align_watchpoint): Likewise.
4852 (aarch64_linux_set_debug_regs):
4853 (aarch64_dr_state_insert_one_point): Likewise.
4854 (aarch64_dr_state_remove_one_point): Likewise.
4855 (aarch64_handle_breakpoint): Likewise.
4856 (aarch64_handle_aligned_watchpoint): Likewise.
4857 (aarch64_handle_unaligned_watchpoint): Likewise.
4858 (aarch64_handle_watchpoint): Likewise.
4860 2015-07-17 Yao Qi <yao.qi@linaro.org>
4862 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4863 and don't aarch64_get_debug_reg_state. All callers update.
4864 (aarch64_handle_aligned_watchpoint): Likewise.
4865 (aarch64_handle_unaligned_watchpoint): Likewise.
4866 (aarch64_handle_watchpoint): Likewise.
4867 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4868 (aarch64_remove_point): Likewise.
4870 2015-07-17 Yao Qi <yao.qi@linaro.org>
4872 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4874 (aarch64_handle_unaligned_watchpoint): Likewise.
4876 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4878 Revert the previous 3 commits:
4879 Move gdb_regex* to common/
4880 Move linux_find_memory_regions_full & co.
4881 gdbserver build-id attribute generator
4883 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4884 Jan Kratochvil <jan.kratochvil@redhat.com>
4886 gdbserver build-id attribute generator.
4887 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4888 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4889 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4891 (get_dynamic): Use find_pdhr to traverse program headers.
4892 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4893 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4894 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4895 (get_hex_build_id): New.
4896 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4897 to reply XML document.
4899 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4900 Jan Kratochvil <jan.kratochvil@redhat.com>
4902 * target.c: Include target/target-utils.h and fcntl.h.
4903 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4904 (target_fileio_read_stralloc): New functions.
4906 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4908 * Makefile.in (OBS): Add gdb_regex.o.
4910 * config.in: Rebuilt.
4911 * configure: Rebuilt.
4913 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4914 Jan Kratochvil <jan.kratochvil@redhat.com>
4916 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4917 * Makefile.in (OBS): Add target-utils.o.
4918 (linux-maps.o, target-utils.o): New.
4919 * configure.srv (srv_linux_obj): Add linux-maps.o.
4921 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4923 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4925 (the_low_target): Install it.
4927 2015-07-14 Pedro Alves <palves@redhat.com>
4929 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4930 Instead, ignore ECHILD, and throw an error for other errnos.
4932 2015-07-10 Pedro Alves <palves@redhat.com>
4934 * event-loop.c (struct callback_event) <data>: Change type to
4935 gdb_client_data instance instead of gdb_client_data pointer.
4936 (append_callback_event): Adjust.
4938 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4940 * linux-aarch64-low.c: Add comments for each linux_target_ops
4941 method. Remove comments already covered in target_ops and
4942 linux_target_ops definitions.
4943 (the_low_target): Add comments for each unimplemented method.
4945 2015-07-09 Yao Qi <yao.qi@linaro.org>
4947 * linux-aarch64-low.c (aarch64_regmap): Remove.
4948 (aarch64_usrregs_info): Remove.
4949 (regs_info): Set field usrregs to NULL.
4951 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4953 * linux-low.c: Include "rsp-low.h"
4954 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4955 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4956 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4957 (handle_btrace_enable_pt): New.
4958 (handle_btrace_general_set): Support "pt".
4959 (handle_btrace_conf_general_set): Support "pt:size".
4961 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4963 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4966 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4968 * linux-aarch64-low.c: Remove comment about endianness.
4969 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4970 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4973 2015-06-24 Gary Benson <gbenson@redhat.com>
4975 * linux-i386-ipa.c (stdint.h): Do not include.
4976 * lynx-i386-low.c (stdint.h): Likewise.
4977 * lynx-ppc-low.c (stdint.h): Likewise.
4978 * mem-break.c (stdint.h): Likewise.
4979 * thread-db.c (stdint.h): Likewise.
4980 * tracepoint.c (stdint.h): Likewise.
4981 * win32-low.c (stdint.h): Likewise.
4983 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4985 * server.c (write_qxfer_response): Update call to
4986 remote_escape_output.
4988 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4989 Jan Kratochvil <jan.kratochvil@redhat.com>
4991 Merge multiple hex conversions.
4992 * gdbreplay.c (tohex): Rename to 'fromhex'.
4993 (logchar): Use fromhex.
4995 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4997 * server.c (handle_qxfer_libraries): Set `version' attribute for
5000 2015-06-10 Gary Benson <gbenson@redhat.com>
5002 * target.h (struct target_ops) <multifs_open>: New field.
5003 <multifs_unlink>: Likewise.
5004 <multifs_readlink>: Likewise.
5005 * linux-low.c (nat/linux-namespaces.h): New include.
5006 (linux_target_ops): Initialize the_target->multifs_open,
5007 the_target->multifs_unlink and the_target->multifs_readlink.
5008 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5009 * hostio.c (hostio_fs_pid): New static variable.
5010 (hostio_handle_new_gdb_connection): New function.
5011 (handle_setfs): Likewise.
5012 (handle_open): Use the_target->multifs_open as appropriate.
5013 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5014 (handle_readlink): Use the_target->multifs_readlink as
5016 (handle_vFile): Handle vFile:setfs packets.
5017 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5018 after target_handle_new_gdb_connection.
5020 2015-06-10 Gary Benson <gbenson@redhat.com>
5022 * configure.ac (AC_CHECK_FUNCS): Add setns.
5023 * config.in: Regenerate.
5024 * configure: Likewise.
5025 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5026 (linux-namespaces.o): New rule.
5027 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5029 2015-06-09 Gary Benson <gbenson@redhat.com>
5031 * hostio.c (handle_open): Process mode argument with
5032 fileio_to_host_mode.
5034 2015-06-01 Yao Qi <yao.qi@linaro.org>
5036 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5037 * linux-x86-low.c: Likewise.
5039 2015-05-28 Don Breazeal <donb@codesourcery.com>
5041 * linux-low.c (handle_extended_wait): Initialize
5042 thread_info.last_resume_kind for new fork children.
5044 2015-05-15 Pedro Alves <palves@redhat.com>
5046 * target.h (target_handle_new_gdb_connection): Rewrite using if
5047 wrapped in do/while.
5049 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5051 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5052 * configure, config.in: Regenerate.
5053 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5056 2015-05-12 Don Breazeal <donb@codesourcery.com>
5058 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5059 PTRACE_EVENT_VFORK_DONE.
5060 (linux_low_ptrace_options, extended_event_reported): Add vfork
5062 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5063 and "vforkdone" for RSP 'T' Stop Reply Packet.
5064 * server.h (report_vfork_events): Declare
5067 2015-05-12 Don Breazeal <donb@codesourcery.com>
5069 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5070 (the_low_target) <new_fork>: Initialize new member.
5071 * linux-arm-low.c (arm_new_fork): New function.
5072 (the_low_target) <new_fork>: Initialize new member.
5073 * linux-low.c (handle_extended_wait): Call new target function
5075 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5076 * linux-mips-low.c (mips_add_watchpoint): New function
5077 extracted from mips_insert_point.
5078 (the_low_target) <new_fork>: Initialize new member.
5079 (mips_linux_new_fork): New function.
5080 (mips_insert_point): Call mips_add_watchpoint.
5081 * linux-x86-low.c (x86_linux_new_fork): New function.
5082 (the_low_target) <new_fork>: Initialize new member.
5084 2015-05-12 Don Breazeal <donb@codesourcery.com>
5086 * linux-low.c (handle_extended_wait): Implement return value,
5087 rename argument 'event_child' to 'event_lwp', handle
5088 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5089 (linux_low_ptrace_options): New function.
5090 (linux_low_filter_event): Call linux_low_ptrace_options,
5091 use different argument fo linux_enable_event_reporting,
5092 use return value from handle_extended_wait.
5093 (extended_event_reported): New function.
5094 (linux_wait_1): Call extended_event_reported and set
5095 status to report fork events.
5096 (linux_write_memory): Add pid to debug message.
5097 (reset_lwp_ptrace_options_callback): New function.
5098 (linux_handle_new_gdb_connection): New function.
5099 (linux_target_ops): Initialize new structure member.
5100 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5101 * lynx-low.c: Initialize new structure member.
5102 * remote-utils.c (prepare_resume_reply): Implement stop reason
5103 "fork" for "T" stop message.
5104 * server.c (handle_query): Call handle_new_gdb_connection.
5105 * server.h (report_fork_events): Declare global flag.
5106 * target.h (struct target_ops) <handle_new_gdb_connection>:
5108 (target_handle_new_gdb_connection): New macro.
5109 * win32-low.c: Initialize new structure member.
5111 2015-05-12 Don Breazeal <donb@codesourcery.com>
5113 * mem-break.c (APPEND_TO_LIST): Define macro.
5114 (clone_agent_expr): New function.
5115 (clone_one_breakpoint): New function.
5116 (clone_all_breakpoints): New function.
5117 * mem-break.h: Declare new functions.
5119 2015-05-12 Don Breazeal <donb@codesourcery.com>
5121 * linux-low.c (linux_supports_fork_events): New function.
5122 (linux_supports_vfork_events): New function.
5123 (linux_target_ops): Initialize new structure members.
5124 (initialize_low): Call linux_check_ptrace_features.
5125 * lynx-low.c (lynx_target_ops): Initialize new structure
5127 * server.c (report_fork_events, report_vfork_events):
5129 (handle_query): Add new features to qSupported packet and
5131 (captured_main): Initialize new global variables.
5132 * target.h (struct target_ops) <supports_fork_events>:
5134 <supports_vfork_events>: New member.
5135 (target_supports_fork_events): New macro.
5136 (target_supports_vfork_events): New macro.
5137 * win32-low.c (win32_target_ops): Initialize new structure
5140 2015-05-12 Gary Benson <gbenson@redhat.com>
5142 * server.c (handle_qxfer_exec_file): Use current process
5145 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5147 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5148 Remove HAVE_PTRACE_GETREGS conditionals.
5149 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5150 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5152 2015-05-08 Yao Qi <yao.qi@linaro.org>
5154 * linux-low.c (linux_supports_conditional_breakpoints): New
5156 (linux_target_ops): Install new target method.
5157 * lynx-low.c (lynx_target_ops): Install NULL hook for
5158 supports_conditional_breakpoints.
5159 * nto-low.c (nto_target_ops): Likewise.
5160 * spu-low.c (spu_target_ops): Likewise.
5161 * win32-low.c (win32_target_ops): Likewise.
5162 * server.c (handle_query): Check
5163 target_supports_conditional_breakpoints.
5164 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5166 (target_supports_conditional_breakpoints): New macro.
5168 2015-05-06 Pedro Alves <palves@redhat.com>
5171 * server.c (start_inferior): If the process exits, mourn it.
5173 2015-04-21 Gary Benson <gbenson@redhat.com>
5175 * hostio.c (fileio_open_flags_to_host): Factored out to
5176 fileio_to_host_openflags in common/fileio.c. Single use
5179 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5181 * linux-xtensa-low.c (xtensa_fill_gregset)
5182 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5185 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5187 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5188 (regs_info): Replace usrregs pointer with NULL.
5190 2015-04-17 Gary Benson <gbenson@redhat.com>
5192 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5193 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5194 * server.c (handle_qxfer_exec_file): New function.
5195 (qxfer_packets): Add exec-file entry.
5196 (handle_query): Report qXfer:exec-file:read as supported packet.
5198 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5200 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5202 2015-04-09 Gary Benson <gbenson@redhat.com>
5204 * hostio-errno.c (errno_to_fileio_error): Remove function.
5205 Update caller to use remote_fileio_to_fio_error.
5207 2015-04-09 Yao Qi <yao.qi@linaro.org>
5209 * linux-low.c (linux_insert_point): Call
5210 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5211 (linux_remove_point): Call remove_memory_breakpoint if type is
5213 * linux-x86-low.c (x86_insert_point): Don't call
5214 insert_memory_breakpoint.
5215 (x86_remove_point): Don't call remove_memory_breakpoint.
5217 2015-04-01 Pedro Alves <palves@redhat.com>
5218 Cleber Rosa <crosa@redhat.com>
5220 * server.c (gdbserver_usage): Reorganize and extend the usage
5223 2015-03-24 Pedro Alves <palves@redhat.com>
5225 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5226 output. Also dump TRAP_TRACE.
5227 (linux_low_filter_event): In debug output, distinguish a
5228 resume_stop SIGSTOP from a delayed SIGSTOP.
5230 2015-03-24 Gary Benson <gbenson@redhat.com>
5232 * linux-x86-low.c (x86_linux_new_thread): Moved to
5234 (x86_linux_prepare_to_resume): Likewise.
5236 2015-03-24 Gary Benson <gbenson@redhat.com>
5238 * Makefile.in (x86-linux-dregs.o): New rule.
5239 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5240 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5241 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5242 (x86_linux_dr_get): Likewise.
5243 (x86_linux_dr_set): Likewise.
5244 (update_debug_registers_callback): Likewise.
5245 (x86_linux_dr_set_addr): Likewise.
5246 (x86_linux_dr_get_addr): Likewise.
5247 (x86_linux_dr_set_control): Likewise.
5248 (x86_linux_dr_get_control): Likewise.
5249 (x86_linux_dr_get_status): Likewise.
5250 (x86_linux_update_debug_registers): Likewise.
5252 2015-03-24 Gary Benson <gbenson@redhat.com>
5254 * linux-x86-low.c (x86_linux_update_debug_registers):
5255 New function, factored out from...
5256 (x86_linux_prepare_to_resume): ...this.
5258 2015-03-24 Gary Benson <gbenson@redhat.com>
5260 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5261 (x86_linux_dr_set): Likewise.
5262 (update_debug_registers_callback): Likewise.
5263 (x86_linux_dr_set_addr): Likewise.
5264 (x86_linux_dr_get_addr): Likewise.
5265 (x86_linux_dr_set_control): Likewise.
5266 (x86_linux_dr_get_control): Likewise.
5267 (x86_linux_dr_get_status): Likewise.
5268 (x86_linux_prepare_to_resume): Likewise.
5270 2015-03-24 Gary Benson <gbenson@redhat.com>
5272 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5273 Use perror_with_name. Pass string through gettext.
5274 (x86_linux_dr_set): Likewise.
5276 2015-03-24 Gary Benson <gbenson@redhat.com>
5278 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5279 (x86_linux_dr_set_addr): ...this.
5280 (x86_dr_low_get_addr): Rename to...
5281 (x86_linux_dr_get_addr): ...this.
5282 (x86_dr_low_set_control): Rename to...
5283 (x86_linux_dr_set_control): ...this.
5284 (x86_dr_low_get_control): Rename to...
5285 (x86_linux_dr_get_control): ...this.
5286 (x86_dr_low_get_status): Rename to...
5287 (x86_linux_dr_get_status): ...this.
5288 (x86_dr_low): Update with new function names.
5290 2015-03-24 Gary Benson <gbenson@redhat.com>
5292 * Makefile.in (x86-linux.o): New rule.
5293 * configure.srv: Add x86-linux.o to relevant targets.
5294 * linux-low.c (lwp_set_arch_private_info): New function.
5295 (lwp_arch_private_info): Likewise.
5296 * linux-x86-low.c: Include nat/x86-linux.h.
5297 (arch_lwp_info): Removed structure.
5298 (update_debug_registers_callback):
5299 Use lwp_set_debug_registers_changed.
5300 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5301 and lwp_set_debug_registers_changed.
5302 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5304 2015-03-24 Gary Benson <gbenson@redhat.com>
5306 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5307 * linux-arm-low.c (arm_new_thread): Likewise.
5308 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5309 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5310 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5311 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5313 2015-03-24 Gary Benson <gbenson@redhat.com>
5315 * linux-low.c (ptid_of_lwp): New function.
5316 (lwp_is_stopped): Likewise.
5317 (lwp_stop_reason): Likewise.
5318 * linux-x86-low.c (update_debug_registers_callback):
5320 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5323 2015-03-24 Gary Benson <gbenson@redhat.com>
5325 * linux-low.h (linux_stop_lwp): Remove declaration.
5327 2015-03-24 Gary Benson <gbenson@redhat.com>
5329 * linux-low.h: Include nat/linux-nat.h.
5330 * linux-low.c (iterate_over_lwps_args): New structure.
5331 (iterate_over_lwps_filter): New function.
5332 (iterate_over_lwps): Likewise.
5333 * linux-x86-low.c (update_debug_registers_callback):
5334 Update signature to what iterate_over_lwps expects.
5335 Remove PID check that iterate_over_lwps now performs.
5336 (x86_dr_low_set_addr): Use iterate_over_lwps.
5337 (x86_dr_low_set_control): Likewise.
5339 2015-03-24 Gary Benson <gbenson@redhat.com>
5341 * linux-x86-low.c (x86_debug_reg_state): New function.
5342 (x86_linux_prepare_to_resume): Use the above.
5344 2015-03-24 Gary Benson <gbenson@redhat.com>
5346 * linux-low.c (current_lwp_ptid): New function.
5347 * linux-x86-low.c: Include nat/linux-nat.h.
5348 (x86_dr_low_get_addr): Use current_lwp_ptid.
5349 (x86_dr_low_get_control): Likewise.
5350 (x86_dr_low_get_status): Likewise.
5352 2015-03-20 Pedro Alves <palves@redhat.com>
5354 * tracepoint.c (cmd_qtstatus): Make "str" const.
5356 2015-03-20 Pedro Alves <palves@redhat.com>
5358 * server.c (handle_general_set): Make "req_str" const.
5360 2015-03-19 Pedro Alves <palves@redhat.com>
5362 * linux-low.c (linux_resume_one_lwp): Rename to ...
5363 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5364 instead call perror_with_name.
5365 (check_ptrace_stopped_lwp_gone): New function.
5366 (linux_resume_one_lwp): Reimplement as wrapper around
5367 linux_resume_one_lwp_throw that swallows errors if the LWP is
5370 2015-03-19 Pedro Alves <palves@redhat.com>
5372 * linux-low.c (count_events_callback, select_event_lwp_callback):
5373 No longer check whether the thread has resume_stop as last resume
5376 2015-03-19 Pedro Alves <palves@redhat.com>
5378 * linux-low.c (count_events_callback, select_event_lwp_callback):
5379 Use the lwp's status_pending_p field, not the thread's.
5381 2015-03-19 Pedro Alves <palves@redhat.com>
5383 * linux-low.c (select_event_lwp_callback): Update comments to
5384 no longer mention SIGTRAP.
5386 2015-03-18 Gary Benson <gbenson@redhat.com>
5388 * server.c (handle_query): Do not report vFile:fstat as supported.
5390 2015-03-11 Gary Benson <gbenson@redhat.com>
5392 * hostio.c (sys/types.h): New include.
5393 (sys/stat.h): Likewise.
5394 (common-remote-fileio.h): Likewise.
5395 (handle_fstat): New function.
5396 (handle_vFile): Handle vFile:fstat packets.
5398 2015-03-11 Gary Benson <gbenson@redhat.com>
5400 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5401 struct stat.st_blocks and struct stat.st_blksize.
5402 * configure: Regenerate.
5403 * config.in: Likewise.
5404 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5405 (OBS): Add common-remote-fileio.o.
5406 (common-remote-fileio.o): New rule.
5408 2015-03-09 Pedro Alves <palves@redhat.com>
5410 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5411 'struct sockaddr' pointer in 'accept' call.
5413 2015-03-09 Pedro Alves <palves@redhat.com>
5416 2015-03-07 Pedro Alves <palves@redhat.com>
5417 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5418 or <winsock2.h> here. Instead include "gdb_socket.h".
5419 (remote_open): Use union gdb_sockaddr_u.
5420 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5421 or <winsock2.h> here. Instead include "gdb_socket.h".
5422 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5423 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5425 (init_named_socket, gdb_agent_helper_thread): Use union
5428 2015-03-07 Pedro Alves <palves@redhat.com>
5430 * configure.ac (build_warnings): Move
5431 -Wdeclaration-after-statement to the C-specific set.
5432 * configure: Regenerate.
5434 2015-03-07 Pedro Alves <palves@redhat.com>
5436 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5437 or <winsock2.h> here. Instead include "gdb_socket.h".
5438 (remote_open): Use union gdb_sockaddr_u.
5439 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5440 or <winsock2.h> here. Instead include "gdb_socket.h".
5441 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5442 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5444 (init_named_socket, gdb_agent_helper_thread): Use union
5447 2015-03-07 Pedro Alves <palves@redhat.com>
5449 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5452 2015-03-06 Yao Qi <yao.qi@linaro.org>
5454 * linux-aarch64-low.c (aarch64_insert_point): Use
5455 show_debug_regs as a boolean.
5456 (aarch64_remove_point): Likewise.
5458 2015-03-05 Pedro Alves <palves@redhat.com>
5460 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5461 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5462 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5463 * nto-low.c (nto_target_ops): Likewise.
5464 * spu-low.c (spu_target_ops): Likewise.
5465 * win32-low.c (win32_target_ops): Likewise.
5467 2015-03-04 Pedro Alves <palves@redhat.com>
5469 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5470 Decide whether a breakpoint triggered based on the SIGTRAP's
5472 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5473 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5474 (linux_low_filter_event): Check for breakpoints before checking
5476 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5478 (linux_stopped_by_sw_breakpoint)
5479 (linux_supports_stopped_by_sw_breakpoint)
5480 (linux_stopped_by_hw_breakpoint)
5481 (linux_supports_stopped_by_hw_breakpoint): New functions.
5482 (linux_target_ops): Install new target methods.
5484 2015-03-04 Pedro Alves <palves@redhat.com>
5486 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5487 * server.c (swbreak_feature, hwbreak_feature): New globals.
5488 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5489 (captured_main): Clear swbreak_feature and hwbreak_feature.
5490 * server.h (swbreak_feature, hwbreak_feature): Declare.
5491 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5492 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5493 supports_stopped_by_hw_breakpoint>: New fields.
5494 (target_supports_stopped_by_sw_breakpoint)
5495 (target_stopped_by_sw_breakpoint)
5496 (target_supports_stopped_by_hw_breakpoint)
5497 (target_stopped_by_hw_breakpoint): Declare.
5499 2015-03-04 Pedro Alves <palves@redhat.com>
5501 enum lwp_stop_reason -> enum target_stop_reason
5502 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5503 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5504 (linux_wait_1, stuck_in_jump_pad_callback)
5505 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5506 (linux_stopped_by_watchpoint):
5507 * linux-low.h (enum lwp_stop_reason): Delete.
5508 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5509 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5511 2015-03-04 Yao Qi <yao.qi@linaro.org>
5513 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5515 2015-03-03 Gary Benson <gbenson@redhat.com>
5517 * hostio.c (handle_vFile): Fix prefix lengths.
5519 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5521 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5524 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5526 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5527 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5528 (clean): Add "rm -f" for above C files.
5529 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5530 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5531 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5532 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5533 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5534 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5535 (init_registers_s390x_vx_linux64)
5536 (init_registers_s390x_tevx_linux64)
5537 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5538 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5540 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5541 (s390_store_vxrs_high): New functions.
5542 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5544 (s390_arch_setup): Add logic for selecting one of the new target
5545 descriptions. Activate the new vector regsets if applicable.
5546 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5547 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5548 and init_registers_s390x_tevx_linux64.
5550 2015-03-01 Pedro Alves <palves@redhat.com>
5552 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5555 2015-02-27 Pedro Alves <palves@redhat.com>
5557 * linux-x86-low.c (u_debugreg_offset): New function.
5558 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5560 2015-02-27 Pedro Alves <palves@redhat.com>
5562 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5563 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5564 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5565 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5566 (ps_lsetfpregs, ps_getpid)
5567 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5568 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5569 (ps_lsetxregs, ps_plog): Declare.
5571 2015-02-27 Pedro Alves <palves@redhat.com>
5573 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5574 IP_AGENT_EXPORT_FUNC.
5575 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5576 IP_AGENT_EXPORT_FUNC.
5577 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5578 (IP_AGENT_EXPORT): Delete.
5579 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5580 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5581 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5582 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5583 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5584 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5585 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5586 (traceframe_read_count, traceframe_write_count)
5587 (traceframes_created, trace_state_variables, get_raw_reg)
5588 (get_trace_state_variable_value, set_trace_state_variable_value)
5589 (ust_loaded, helper_thread_id, cmd_buf): Use
5590 IPA_SYM_EXPORTED_NAME.
5591 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5592 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5593 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5594 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5595 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5596 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5597 EXTERN_C_PUSH/EXTERN_C_POP.
5598 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5599 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5600 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5601 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5602 (traceframe_write_count, traceframe_read_count)
5603 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5604 (about_to_request_buffer_space, get_trace_state_variable_value)
5605 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5606 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5607 EXTERN_C_PUSH/EXTERN_C_POP.
5608 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5609 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5610 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5611 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5612 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5613 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5614 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5615 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5617 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5618 (IP_AGENT_EXPORT_VAR_DECL): Define.
5620 (gdb_agent_get_raw_reg): Declare.
5622 2015-02-27 Tom Tromey <tromey@redhat.com>
5623 Pedro Alves <palves@redhat.com>
5625 Rename symbols whose names are reserved C++ keywords throughout.
5627 2015-02-27 Pedro Alves <palves@redhat.com>
5629 * Makefile.in (COMPILER): New, get it from autoconf.
5630 (CXX): Get from autoconf instead.
5631 (COMPILE.pre): Use COMPILER.
5632 (CC-LD): Rename to ...
5633 (CC_LD): ... this. Use COMPILER.
5634 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5635 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5636 * acinclude.m4: Include build-with-cxx.m4.
5637 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5638 Disable -Werror by default if building in C++ mode.
5639 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5640 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5641 the C++ compiler. Save/restore CXXFLAGS too.
5642 * configure: Regenerate.
5644 2015-02-27 Pedro Alves <palves@redhat.com>
5646 * acinclude.m4: Include libiberty.m4.
5647 * configure.ac: Call libiberty_INIT.
5648 * config.in, configure: Regenerate.
5650 2015-02-26 Pedro Alves <palves@redhat.com>
5652 * linux-low.c (linux_wait_1): When incrementing the PC past a
5653 program breakpoint always use the_low_target.breakpoint_len as
5654 increment, rather than the maximum between that and
5655 the_low_target.decr_pc_after_break.
5657 2015-02-23 Pedro Alves <palves@redhat.com>
5659 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5660 thread was doing a step-over; always adjust the PC if
5661 we stepped over a permanent breakpoint.
5662 (linux_wait_1): If we stepped over breakpoint that was on top of a
5663 permanent breakpoint, manually advance the PC past it.
5665 2015-02-23 Pedro Alves <palves@redhat.com>
5667 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5669 (x86_fill_gregset, x86_store_gregset): Use it when handling
5672 2015-02-20 Pedro Alves <palves@redhat.com>
5674 * thread-db.c: Include "nat/linux-procfs.h".
5675 (thread_db_init): Skip listing new threads if the kernel supports
5676 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5678 2015-02-20 Pedro Alves <palves@redhat.com>
5680 * linux-low.c (status_pending_p_callback): Use ptid_match.
5682 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5684 PR breakpoints/16812
5685 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5686 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5687 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5689 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5691 PR breakpoints/15956
5692 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5694 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5696 * linux-low.c (linux_low_btrace_conf): Print size.
5697 * server.c (handle_btrace_conf_general_set): New.
5698 (hanle_general_set): Call handle_btrace_conf_general_set.
5699 (handle_query): Report Qbtrace-conf:bts:size as supported.
5701 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5703 * linux-low.c (linux_low_enable_btrace): Update parameters.
5704 (linux_low_btrace_conf): New.
5705 (linux_target_ops)<to_btrace_conf>: Initialize.
5706 * server.c (current_btrace_conf): New.
5707 (handle_btrace_enable): Rename to ...
5708 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5709 to target_enable_btrace. Update comment. Update users.
5710 (handle_qxfer_btrace_conf): New.
5711 (qxfer_packets): Add btrace-conf entry.
5712 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5713 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5714 (target_ops)<read_btrace_conf>: New.
5715 (target_enable_btrace): Update parameters.
5716 (target_read_btrace_conf): New.
5718 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5720 * server.c (handle_btrace_general_set): Remove call to
5721 target_supports_btrace.
5722 (supported_btrace_packets): New.
5723 (handle_query): Call supported_btrace_packets.
5724 * target.h: include btrace-common.h.
5725 (btrace_target_info): Removed.
5726 (supports_btrace, target_supports_btrace): Update parameters.
5728 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5730 * Makefile.in (SFILES): Add common/btrace-common.c.
5731 (OBS): Add common/btrace-common.o.
5732 (btrace-common.o): Add build rules.
5733 * linux-low: Include btrace-common.h.
5734 (linux_low_read_btrace): Use struct btrace_data. Call
5735 btrace_data_init and btrace_data_fini.
5737 2015-02-06 Pedro Alves <palves@redhat.com>
5739 * thread-db.c (find_new_threads_callback): Add debug output.
5741 2015-02-04 Pedro Alves <palves@redhat.com>
5743 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5744 (resume_stopped_resumed_lwps): New function.
5745 (linux_wait_for_event_filtered): Use it.
5747 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5749 * Makefile.in (SFILES): Add linux-personality.c.
5750 (linux-personality.o): New rule.
5751 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5752 list of objects to be built.
5753 * linux-low.c: Include nat/linux-personality.h.
5754 (linux_create_inferior): Remove code to disable address space
5755 randomization (moved to ../nat/linux-personality.c). Create
5756 cleanup to disable address space randomization.
5758 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5760 * Makefile.in (posix-strerror.o): New rule.
5761 (mingw-strerror.o): Likewise.
5762 * configure: Regenerated.
5763 * configure.ac: Source file ../common/common.host. Initialize new
5764 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5766 2015-01-14 Yao Qi <yao@codesourcery.com>
5768 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5769 (ppc-linux.o): New rule.
5770 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5771 * configure.ac: AC_CHECK_FUNCS(getauxval).
5772 * config.in: Re-generated.
5773 * configure: Re-generated.
5774 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5775 ppc64_64bit_inferior_p
5777 2015-01-14 Yao Qi <yao@codesourcery.com>
5779 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5780 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5781 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5782 (PT_ORIG_R3, PT_TRAP): Likewise.
5783 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5784 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5785 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5787 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5789 * i387-fp.c (i387_cache_to_xsave): In look over
5790 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5791 zmmh_low_space field by use of zmmh_high_space.
5793 2015-01-09 Pedro Alves <palves@redhat.com>
5795 * linux-low.c (step_over_bkpt): Move higher up in the file.
5796 (handle_extended_wait): Don't store the stop_pc here.
5797 (get_stop_pc): Adjust comments and rename to ...
5798 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5799 stopped for a software breakpoint or hardware breakpoint.
5800 (thread_still_has_status_pending_p): New function.
5801 (status_pending_p_callback): Use
5802 thread_still_has_status_pending_p. If the event is no longer
5803 interesting, resume the LWP.
5804 (handle_tracepoints): Add assert.
5805 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5806 (wstatus_maybe_breakpoint): New function.
5807 (cancel_breakpoint): Delete function.
5808 (check_stopped_by_watchpoint): New function, factored out from
5809 linux_low_filter_event.
5810 (lp_status_maybe_breakpoint): Delete function.
5811 (linux_low_filter_event): Remove filter_ptid argument.
5812 Leave thread group exits pending here. Store the LWP's stop PC.
5813 Always leave events pending.
5814 (linux_wait_for_event_filtered): Pull all events out of the
5815 kernel, and leave them all pending.
5816 (count_events_callback, select_event_lwp_callback): Consider all
5818 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5819 (select_event_lwp): Only give preference to the stepping LWP in
5820 all-stop mode. Adjust comments.
5821 (ignore_event): New function.
5822 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5823 references to cancel_breakpoints. Adjust to renames. Also give
5824 equal priority to all LWPs that have had events in non-stop mode.
5825 If reporting a software breakpoint event, unadjust the LWP's PC.
5826 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5827 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5829 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5830 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5831 (linux_stopped_by_watchpoint): Adjust.
5832 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5833 * linux-low.h (enum lwp_stop_reason): New.
5834 (struct lwp_info) <stop_pc>: Adjust comment.
5835 <stopped_by_watchpoint>: Delete field.
5836 <stop_reason>: New field.
5837 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5838 * mem-break.c (software_breakpoint_inserted_here)
5839 (hardware_breakpoint_inserted_here): New function.
5840 * mem-break.h (software_breakpoint_inserted_here)
5841 (hardware_breakpoint_inserted_here): Declare.
5842 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5843 (cancel_breakpoints): Delete.
5844 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5845 (upload_fast_traceframes): Remove references to
5848 2015-01-09 Pedro Alves <palves@redhat.com>
5850 * thread-db.c (find_new_threads_callback): Ignore thread if the
5851 kernel thread ID is -1.
5853 2015-01-09 Pedro Alves <palves@redhat.com>
5855 * linux-low.c (linux_attach_fail_reason_string): Move to
5856 nat/linux-ptrace.c, and rename.
5857 (linux_attach_lwp): Update comment.
5858 (attach_proc_task_lwp_callback): New function.
5859 (linux_attach): Adjust to rename and use
5860 linux_proc_attach_tgid_threads.
5861 (linux_attach_fail_reason_string): Delete declaration.
5863 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5865 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5866 * server.c (gdbserver_version): Likewise.
5868 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5870 * remote-utils.c: Include ctype.h.
5871 (input_interrupt): Explicitly handle the case when the char
5872 received is the NUL byte. Improve the printing of non-ASCII
5875 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5877 * linux-low.c (linux_low_filter_event): Update call to
5878 linux_enable_event_reporting following the addition of
5879 a new parameter to that function.
5881 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5884 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5885 (AARCH64_FPCR_REGNO): Likewise.
5886 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5887 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5888 (aarch64_store_fpregset): Likewise.
5890 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5892 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5893 Remove FIXME comment about assumption about N.
5895 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5897 * configure.ac: If large-file support is disabled in GDBserver,
5898 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5899 * configure: Regenerate.
5901 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5903 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5904 warning upon ENODATA from ptrace.
5905 * linux-s390-low.c (s390_store_tdb): New.
5906 (s390_regsets): Add regset for NT_S390_TDB.
5908 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5910 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5911 without a fill_function.
5912 * linux-s390-low.c (s390_fill_last_break): Remove.
5913 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5914 (s390_arch_setup): Use regset's size instead of fill_function for
5917 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5919 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5920 the regset's store function when ptrace returned an error.
5921 * regcache.c (get_thread_regcache): Invalidate register cache
5922 before fetching inferior's registers.
5924 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5926 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5927 while-loop as for-loop.
5928 (regsets_store_inferior_registers): Likewise.
5930 2014-11-28 Yao Qi <yao@codesourcery.com>
5932 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5933 * config.in, configure: Re-generate.
5934 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5937 2014-11-21 Yao Qi <yao@codesourcery.com>
5939 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5940 (AC_CHECK_HEADERS): Remove malloc.h.
5941 * configure: Re-generated.
5942 * config.in: Re-generated.
5943 * server.h: Don't include alloca.h and malloc.h.
5944 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5945 Don't include malloc.h.
5947 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5949 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5950 corresponding ERRNO check in same block.
5952 2014-11-12 Pedro Alves <palves@redhat.com>
5954 * server.c (cont_thread): Update comment.
5955 (start_inferior, attach_inferior): No longer clear cont_thread.
5956 (handle_v_cont): No longer set cont_thread.
5957 (captured_main): Clear cont_thread each time a GDB connects.
5959 2014-11-12 Pedro Alves <palves@redhat.com>
5961 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5962 thread, and don't resume all threads if the Hc thread has exited.
5964 2014-11-12 Pedro Alves <palves@redhat.com>
5966 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5967 the process group instead of to a specific LWP.
5969 2014-10-15 Pedro Alves <palves@redhat.com>
5972 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5974 (arm_set_thread_context): Delete.
5975 (the_low_target): Adjust.
5976 * win32-i386-low.c (debug_registers_changed)
5977 (debug_registers_used): Delete.
5978 (update_debug_registers_callback): New function.
5979 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5980 needing to update their debug registers.
5981 (win32_get_current_dr): New function.
5982 (x86_dr_low_get_addr, x86_dr_low_get_control)
5983 (x86_dr_low_get_status): Fetch the debug register from the thread
5985 (i386_initial_stuff): Adjust.
5986 (i386_get_thread_context): Remove current_event parameter. Don't
5987 clear debug_registers_changed nor copy DR values to
5989 (i386_set_thread_context): Delete.
5990 (i386_prepare_to_resume): New function.
5991 (i386_thread_added): Mark the thread as needing to update irs
5993 (the_low_target): Remove i386_set_thread_context and install
5994 i386_prepare_to_resume.
5995 * win32-low.c (win32_get_thread_context): Adjust.
5996 (win32_set_thread_context): Use SetThreadContext
5998 (win32_prepare_to_resume): New function.
5999 (win32_require_context): New function, factored out from ...
6000 (thread_rec): ... this.
6001 (continue_one_thread): Call win32_prepare_to_resume on each thread
6002 we're about to continue.
6003 (win32_resume): Call win32_prepare_to_resume on the event thread.
6004 * win32-low.h (struct win32_thread_info)
6005 <debug_registers_changed>: New field.
6006 (struct win32_target_ops): Change prototype of set_thread_context,
6007 delete set_thread_context and add prepare_to_resume.
6008 (win32_require_context): New declaration.
6010 2014-10-08 Gary Benson <gbenson@redhat.com>
6012 * server.h: Do not include common-exceptions.h.
6014 2014-10-08 Gary Benson <gbenson@redhat.com>
6016 * server.h: Do not include cleanups.h.
6018 2014-09-30 James Hogan <james.hogan@imgtec.com>
6020 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6023 2014-09-23 Yao Qi <yao@codesourcery.com>
6025 * linux-low.c (lp_status_maybe_breakpoint): New function.
6026 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6027 (count_events_callback): Likewise.
6028 (select_event_lwp_callback): Likewise.
6029 (cancel_breakpoints_callback): Likewise.
6031 2014-09-19 Don Breazeal <donb@codesourcery.com>
6033 * linux-low.c (handle_extended_wait): Call
6034 linux_ptrace_get_extended_event.
6035 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6036 linux_is_extended_waitstatus.
6038 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6040 * Makefile.in (CPPFLAGS): Define.
6041 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6042 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6044 2014-09-16 Gary Benson <gbenson@redhat.com>
6046 * inferiors.h (current_inferior): Renamed as...
6047 (current_thread): New variable. All uses updated.
6048 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6049 (maybe_move_out_of_jump_pad): Likewise.
6050 (cancel_breakpoint): Likewise.
6051 (linux_low_filter_event): Likewise.
6052 (wait_for_sigstop): Likewise.
6053 (linux_resume_one_lwp): Likewise.
6054 (need_step_over_p): Likewise.
6055 (start_step_over): Likewise.
6056 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6057 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6058 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6059 and save_inferior as saved_thread.
6060 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6062 (regcache_invalidate_thread): Likewise.
6063 * remote-utils.c (prepare_resume_reply): Likewise.
6064 * thread-db.c (thread_db_get_tls_address): Likewise.
6065 (disable_thread_event_reporting): Likewise.
6066 (remove_thread_event_breakpoints): Likewise.
6067 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6069 * target.h (set_desired_inferior): Renamed as...
6070 (set_desired_thread): New declaration. All uses updated.
6071 * server.c (myresume): Updated comment to reference thread instead
6073 (handle_serial_event): Likewise.
6074 (handle_target_event): Likewise.
6076 2014-09-12 Tom Tromey <tromey@redhat.com>
6077 Gary Benson <gbenson@redhat.com>
6079 * regcache.h: Include common-regcache.h.
6080 (regcache_read_pc): Don't declare.
6081 * regcache.c (get_thread_regcache_for_ptid): New function.
6083 2014-09-11 Tom Tromey <tromey@redhat.com>
6084 Gary Benson <gbenson@redhat.com>
6086 * symbol.c: New file.
6087 * Makefile.in (SFILES): Add symbol.c.
6088 (OBS): Add symbol.o.
6090 2014-09-11 Gary Benson <gbenson@redhat.com>
6092 * target.c (target_stop_ptid, target_continue_ptid): New
6095 2014-09-11 Tom Tromey <tromey@redhat.com>
6096 Gary Benson <gbenson@redhat.com>
6098 * target.h: Include target/target.h.
6099 * target.c (target_read_memory, target_read_uint32)
6100 (target_write_memory): New functions.
6102 2014-09-11 Gary Benson <gbenson@redhat.com>
6104 * server.h (debug_hw_points): Don't declare.
6105 * server.c (debug_hw_points): Don't define. Replace all uses
6106 with show_debug_regs.
6107 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6108 all uses with show_debug_regs.
6110 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6112 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6113 endianness into account.
6114 (ppc_supply_ptrace_register): Likewise.
6116 2014-09-03 James Hogan <james.hogan@imgtec.com>
6118 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6119 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6121 2014-09-03 Gary Benson <gbenson@redhat.com>
6123 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6124 ALL_DEBUG_ADDRESS_REGISTERS.
6126 2014-09-02 Gary Benson <gbenson@redhat.com>
6128 * i386-low.h: Renamed as...
6129 * x86-low.h: New file. All type, function and variable name
6130 prefixes changed from "i386_" to "x86_". All references updated.
6131 * i386-low.c: Renamed as...
6132 * x86-low.c: New file. All type, function and variable name
6133 prefixes changed from "i386_" to "x86_". All references updated.
6135 2014-09-02 Gary Benson <gbenson@redhat.com>
6137 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6138 (x86_linux_new_thread): Likewise.
6140 2014-08-29 Gary Benson <gbenson@redhat.com>
6142 * server.h (setjmp.h): Do not include.
6143 (toplevel): Do not declare.
6144 (common-exceptions.h): Include.
6145 (cleanups.h): Likewise.
6146 * server.c (toplevel): Do not define.
6147 (exit_code): New static global.
6148 (detach_or_kill_for_exit_cleanup): New function.
6149 (main): New function. Original main renamed to...
6150 (captured_main): New function.
6151 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6153 2014-08-29 Gary Benson <gbenson@redhat.com>
6155 * Makefile.in (SFILES): Add common/common-exceptions.c.
6156 (OBS): Add common-exceptions.o.
6157 (common-exceptions.o): New rule.
6158 * utils.c (prepare_to_throw_exception): New function.
6160 2014-08-29 Gary Benson <gbenson@redhat.com>
6162 * config.in: Regenerate.
6163 * configure: Likewise.
6165 2014-08-29 Gary Benson <gbenson@redhat.com>
6167 * Makefile.in (SFILES): Add common/cleanups.c.
6169 (cleanups.o): New rule.
6171 2014-08-29 Gary Benson <gbenson@redhat.com>
6173 * utils.c (internal_vwarning): New function.
6175 2014-08-28 Gary Benson <gbenson@redhat.com>
6177 * utils.h (fatal): Remove declaration.
6178 * utils.c (fatal): Remove function.
6180 2014-08-28 Gary Benson <gbenson@redhat.com>
6182 * tracepoint.c (gdb_agent_init): Replace fatal with
6184 (initialize_tracepoint): Likewise.
6186 2014-08-28 Gary Benson <gbenson@redhat.com>
6188 * remote-utils.c (remote_prepare): Replace fatal with error.
6190 2014-08-28 Gary Benson <gbenson@redhat.com>
6192 * linux-low.c (linux_async): Replace fatal with warning.
6194 (linux_start_non_stop): Return -1 if linux_async failed.
6196 2014-08-28 Gary Benson <gbenson@redhat.com>
6198 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6200 (i386_dr_low_get_addr): Remove vague comment.
6201 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6204 2014-08-28 Gary Benson <gbenson@redhat.com>
6206 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6207 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6209 (linux_resume_one_lwp): Likewise.
6210 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6212 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6213 with internal_error.
6214 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6215 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6216 (find_register_by_name): Replace fatal with internal_error.
6217 (find_regno): Likewise.
6218 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6219 * thread-db.c (thread_db_create_event): Likewise.
6220 (thread_db_load_search): Likewise.
6221 (try_thread_db_load_1): Likewise.
6222 * tracepoint.c (get_jump_space_head): Replace fatal with
6224 (claim_trampoline_space): Likewise.
6225 (have_fast_tracepoint_trampoline_buffer): Likewise.
6226 (cmd_qtstart): Likewise.
6227 (stop_tracing): Likewise.
6228 (fast_tracepoint_collecting): Likewise.
6229 (target_malloc): Likewise.
6230 (download_tracepoint): Likewise.
6231 (download_trace_state_variables): Replace check with gdb_assert.
6232 (upload_fast_traceframes): Replace fatal with internal_error.
6234 2014-08-19 Tom Tromey <tromey@redhat.com>
6235 Gary Benson <gbenson@redhat.com>
6237 * Makefile.in (SFILES): Add common/common-debug.c.
6238 (OBS): Add common-debug.o.
6239 (common-debug.o): New rule.
6240 * debug.h (debug_printf): Don't declare.
6241 * debug.c (debug_printf): Renamed and rewritten as...
6242 (debug_vprintf): New function.
6244 2014-08-19 Gary Benson <gbenson@redhat.com>
6246 * utils.h: Do not include print-utils.h.
6248 2014-08-19 Tom Tromey <tromey@redhat.com>
6249 Gary Benson <gbenson@redhat.com>
6251 * server.h: Add static assertion.
6252 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6254 2014-08-19 Tom Tromey <tromey@redhat.com>
6255 Gary Benson <gbenson@redhat.com>
6257 * Makefile.in (SFILES): Add common/errors.c.
6258 (OBS): Add errors.o.
6259 (IPA_OBS): Add errors-ipa.o.
6260 (errors.o): New rule.
6261 (errors-ipa.o): Likewise.
6262 * utils.h (perror_with_name, error, warning): Don't declare.
6263 * utils.c (warning): Renamed and rewritten as...
6264 (vwarning): New function.
6265 (error): Renamed and rewritten as...
6266 (verror): New function.
6267 (internal_error): Renamed and rewritten as...
6268 (internal_verror): New function.
6270 2014-08-07 Gary Benson <gbenson@redhat.com>
6272 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6273 * configure: Regenerate.
6274 * config.in: Likewise.
6275 * server.h: Do not include errno.h.
6276 * event-loop.c: Likewise.
6277 * hostio-errno.c: Likewise.
6278 * linux-low.c: Likewise.
6279 * remote-utils.c: Likewise.
6280 * spu-low.c: Likewise.
6281 * utils.c: Likewise.
6282 * gdbreplay.c: Unconditionally include errno.h.
6284 2014-08-07 Gary Benson <gbenson@redhat.com>
6286 * server.h: Do not include string.h.
6287 * event-loop.c: Likewise.
6288 * linux-low.c: Likewise.
6289 * regcache.c: Likewise.
6290 * remote-utils.c: Likewise.
6291 * spu-low.c: Likewise.
6292 * utils.c: Likewise.
6294 2014-08-07 Gary Benson <gbenson@redhat.com>
6296 * server.h: Do not include gdb_assert.h.
6298 2014-08-07 Gary Benson <gbenson@redhat.com>
6300 * server.h: Do not include common-utils.h.
6302 2014-08-07 Gary Benson <gbenson@redhat.com>
6304 * server.h: Do not include ptid.h.
6305 * notif.h: Likewise.
6307 2014-08-07 Gary Benson <gbenson@redhat.com>
6309 * server.h: Do not include gdb_locale.h.
6311 2014-08-07 Gary Benson <gbenson@redhat.com>
6313 * server.h: Do not include gdb/signals.h.
6314 * win32-low.c: Likewise.
6316 2014-08-07 Gary Benson <gbenson@redhat.com>
6318 * server.h: Do not include pathmax.h.
6320 2014-08-07 Gary Benson <gbenson@redhat.com>
6322 * server.h: Do not include libiberty.h.
6323 * linux-bfin-low.c: Likewise.
6325 2014-08-07 Gary Benson <gbenson@redhat.com>
6327 * server.h: Do not include ansidecl.h.
6329 2014-08-07 Gary Benson <gbenson@redhat.com>
6331 * linux-x86-low.c: Do not include stddef.h.
6332 * lynx-ppc-low.c: Likewise.
6333 * tracepoint.c: Likewise.
6335 2014-08-07 Gary Benson <gbenson@redhat.com>
6337 * server.h: Do not include stdarg.h.
6338 * nto-low.c: Likewise.
6340 2014-08-07 Gary Benson <gbenson@redhat.com>
6342 * server.h: Do not include stdlib.h.
6343 * inferiors.c: Likewise.
6344 * linux-low.c: Likewise.
6345 * regcache.c: Likewise.
6346 * spu-low.c: Likewise.
6347 * tracepoint.c: Likewise.
6348 * utils.c: Likewise.
6350 2014-08-07 Gary Benson <gbenson@redhat.com>
6352 * server.h: Do not include stdio.h.
6353 * linux-low.c: Likewise.
6354 * remote-utils.c: Likewise.
6355 * spu-low.c: Likewise.
6356 * utils.c: Likewise.
6357 * wincecompat.c: Likewise.
6359 2014-08-06 Gary Benson <gbenson@redhat.com>
6361 * regcache.c (init_register_cache): Move conditionals inside if.
6363 2014-08-06 Gary Benson <gbenson@redhat.com>
6365 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6367 2014-07-31 Gary Benson <gbenson@redhat.com>
6369 * ax.h: Do not include server.h.
6370 * gdbthread.h: Likewise.
6371 * lynx-low.h: Likewise.
6372 * notif.h: Likewise.
6374 2014-07-30 Gary Benson <gbenson@redhat.com>
6376 * server.h: Include common-defs.h.
6377 Do not include config.h or build-gnulib-gdbserver/config.h.
6379 2014-07-30 Gary Benson <gbenson@redhat.com>
6381 * hostio-errno.c: Move server.h to top of includes list.
6382 * inferiors.c: Likewise.
6383 * linux-x86-low.c: Likewise.
6384 * notif.c: Include server.h.
6386 2014-07-24 Tom Tromey <tromey@redhat.com>
6387 Gary Benson <gbenson@redhat.com>
6389 * server.h (CORE_ADDR): Now unsigned.
6391 2014-07-16 Pedro Alves <palves@redhat.com>
6393 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6395 2014-07-15 Pedro Alves <palves@redhat.com>
6397 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6400 2014-07-11 Pedro Alves <palves@redhat.com>
6402 * linux-low.c (kill_wait_lwp): New function, based on
6403 kill_one_lwp_callback, but use my_waitpid directly.
6404 (kill_one_lwp_callback, linux_kill): Use it.
6406 2014-06-23 Pedro Alves <palves@redhat.com>
6408 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6409 before setting DR0..DR3.
6411 2014-06-20 Gary Benson <gbenson@redhat.com>
6413 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6414 * configure: Regenerated.
6415 * config.in: Likewise.
6417 2014-06-20 Gary Benson <gbenson@redhat.com>
6419 * Makefile.in (SFILES): Update locations for files moved
6421 (object file files): Reordered.
6423 2014-06-20 Gary Benson <gbenson@redhat.com>
6425 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6426 (i386_dr_low_set_addr): Likewise.
6427 (i386_dr_low_get_addr): Likewise.
6428 (i386_dr_low_can_set_control): Likewise.
6429 (i386_dr_low_set_control): Likewise.
6430 (i386_dr_low_get_control): Likewise.
6431 (i386_dr_low_get_status): Likewise.
6432 (i386_get_debug_register_length): Likewise.
6433 * linux-x86-low.c (i386_dr_low_set_addr):
6434 Changed signature. Made static.
6435 (i386_dr_low_get_addr): Likewise.
6436 (i386_dr_low_set_control): Likewise.
6437 (i386_dr_low_get_control): Likewise.
6438 (i386_dr_low_get_status): Likewise.
6439 (i386_dr_low): New global variable.
6440 * win32-i386-low.c (i386_dr_low_set_addr):
6441 Changed signature. Made static.
6442 (i386_dr_low_get_addr): Likewise.
6443 (i386_dr_low_set_control): Likewise.
6444 (i386_dr_low_get_control): Likewise.
6445 (i386_dr_low_get_status): Likewise.
6446 (i386_dr_low): New global variable.
6448 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6450 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6451 * Makefile.in (AR, AR_FLAGS): Define.
6452 * configure: Regenerate.
6454 2014-06-19 Gary Benson <gbenson@redhat.com>
6456 * Makefile.in (i386-dregs.o): New rule.
6457 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6458 * i386-low.c (target.h): Remove include.
6459 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6460 (DR_CONTROL_SHIFT): Likewise.
6461 (DR_CONTROL_SIZE): Likewise.
6462 (DR_RW_EXECUTE): Likewise.
6463 (DR_RW_WRITE): Likewise.
6464 (DR_RW_READ): Likewise.
6465 (DR_RW_IORW): Likewise.
6466 (DR_LEN_1): Likewise.
6467 (DR_LEN_2): Likewise.
6468 (DR_LEN_4): Likewise.
6469 (DR_LEN_8): Likewise.
6470 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6471 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6472 (DR_ENABLE_SIZE): Likewise.
6473 (DR_LOCAL_SLOWDOWN): Likewise.
6474 (DR_GLOBAL_SLOWDOWN): Likewise.
6475 (DR_CONTROL_RESERVED): Likewise.
6476 (I386_DR_CONTROL_MASK): Likewise.
6477 (I386_DR_VACANT): Likewise.
6478 (I386_DR_LOCAL_ENABLE): Likewise.
6479 (I386_DR_GLOBAL_ENABLE): Likewise.
6480 (I386_DR_DISABLE): Likewise.
6481 (I386_DR_SET_RW_LEN): Likewise.
6482 (I386_DR_GET_RW_LEN): Likewise.
6483 (I386_DR_WATCH_HIT): Likewise.
6484 (i386_wp_op_t): Likewise.
6485 (i386_show_dr): Likewise.
6486 (i386_length_and_rw_bits): Likewise.
6487 (i386_insert_aligned_watchpoint): Likewise.
6488 (i386_remove_aligned_watchpoint): Likewise.
6489 (i386_handle_nonaligned_watchpoint): Likewise.
6490 i386_update_inferior_debug_regs(): Likewise.
6491 (i386_dr_insert_watchpoint): Likewise.
6492 (i386_dr_remove_watchpoint): Likewise.
6493 (i386_dr_region_ok_for_watchpoint): Likewise.
6494 (i386_dr_stopped_data_address): Likewise.
6495 (i386_dr_stopped_by_watchpoint): Likewise.
6497 2014-06-19 Gary Benson <gbenson@redhat.com>
6499 * i386-low.c (i386_dr_show): Renamed to
6500 i386_show_dr and made static. All uses updated.
6501 (i386_dr_length_and_rw_bits): Renamed to
6502 i386_length_and_rw_bits and made static.
6504 (i386_dr_insert_aligned_watchpoint): Renamed to
6505 i386_insert_aligned_watchpoint and made static.
6507 (i386_dr_remove_aligned_watchpoint): Renamed to
6508 i386_remove_aligned_watchpoint and made static.
6510 (i386_dr_update_inferior_debug_regs): Renamed to
6511 i386_update_inferior_debug_regs and made static.
6514 2014-06-18 Gary Benson <gbenson@redhat.com>
6516 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6517 (i386_dr_low_can_set_control): Likewise.
6518 (i386_get_debug_register_length): Likewise.
6519 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6520 (i386_dr_low_can_set_control): Likewise.
6521 (i386_get_debug_register_length): Likewise.
6523 2014-06-17 Gary Benson <gbenson@redhat.com>
6525 * i386-low.h (i386-dregs.h): New include.
6526 (DR_FIRSTADDR): Now in i386-dregs.h.
6527 (DR_LASTADDR): Likewise.
6528 (DR_NADDR): Likewise.
6529 (DR_STATUS): Likewise.
6530 (DR_CONTROL): Likewise.
6531 (i386_debug_reg_state): Likewise.
6532 (i386_dr_insert_watchpoint): Likewise.
6533 (i386_dr_remove_watchpoint): Likewise.
6534 (i386_dr_region_ok_for_watchpoint): Likewise.
6535 (i386_dr_stopped_data_address): Likewise.
6536 (i386_dr_stopped_by_watchpoint): Likewise.
6537 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6539 2014-06-18 Gary Benson <gbenson@redhat.com>
6541 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6542 i386_dr_insert_watchpoint.
6543 (i386_low_remove_watchpoint): Renamed to
6544 i386_dr_remove_watchpoint.
6545 (i386_low_region_ok_for_watchpoint): Renamed to
6546 i386_dr_region_ok_for_watchpoint.
6547 (i386_low_stopped_data_address): Renamed to
6548 i386_dr_stopped_data_address.
6549 (i386_low_stopped_by_watchpoint): Renamed to
6550 i386_dr_stopped_by_watchpoint.
6551 * i386-low.c (i386_show_dr): Renamed to
6552 i386_dr_show and made nonstatic. All uses updated.
6553 (i386_length_and_rw_bits): Renamed to
6554 i386_dr_length_and_rw_bits and made nonstatic.
6556 (i386_insert_aligned_watchpoint): Renamed to
6557 i386_dr_insert_aligned_watchpoint and made nonstatic.
6559 (i386_remove_aligned_watchpoint): Renamed to
6560 i386_dr_remove_aligned_watchpoint and made nonstatic.
6562 (i386_update_inferior_debug_regs): Renamed to
6563 i386_dr_update_inferior_debug_regs and made nonstatic.
6565 (i386_low_insert_watchpoint): Renamed to
6566 i386_dr_insert_watchpoint. All uses updated.
6567 (i386_low_remove_watchpoint): Renamed to
6568 i386_dr_remove_watchpoint. All uses updated.
6569 (i386_low_region_ok_for_watchpoint): Renamed to
6570 i386_dr_region_ok_for_watchpoint. All uses updated.
6571 (i386_low_stopped_data_address): Renamed to
6572 i386_dr_stopped_data_address. All uses updated.
6573 (i386_low_stopped_by_watchpoint): Renamed to
6574 i386_dr_stopped_by_watchpoint. All uses updated.
6576 2014-06-18 Gary Benson <gbenson@redhat.com>
6578 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6579 (i386_dr_low_can_set_control): Likewise.
6580 (i386_insert_aligned_watchpoint): New check.
6582 2014-06-18 Gary Benson <gbenson@redhat.com>
6584 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6587 2014-06-18 Gary Benson <gbenson@redhat.com>
6589 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6590 instead of fatal and error.
6591 (i386_handle_nonaligned_watchpoint): Likewise.
6593 2014-06-18 Gary Benson <gbenson@redhat.com>
6595 * i386-low.c (i386_get_debug_register_length): New macro.
6596 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6597 (i386_show_dr): Use debug_printf instead of fprintf. Use
6598 phex to format values.
6600 2014-06-18 Gary Benson <gbenson@redhat.com>
6602 * i386-low.h: Comment changes.
6603 * i386-low.c: Likewise.
6605 2014-06-18 Gary Benson <gbenson@redhat.com>
6607 * i386-low.c: Whitespace changes.
6609 2014-06-12 Tom Tromey <tromey@redhat.com>
6611 * utils.c (freeargv): Remove.
6613 2014-06-12 Tom Tromey <tromey@redhat.com>
6615 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6616 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6617 (parse_debug_format_options): Likewise.
6618 (gdbserver_usage): Likewise.
6619 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6620 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6621 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6623 ($(LIBGNU)): Depend on libiberty.
6624 (all-lib): Recurse into all subdirs.
6625 (install-only): Invoke "install" target in subdirs.
6626 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6628 * configure: Rebuild.
6629 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6630 for vasprintf, vsnprintf, or gettimeofday.
6631 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6634 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6636 * development.sh: Delete.
6637 * Makefile.in (config.status): Adjust dependency on development.sh.
6638 * configure.ac: Adjust development.sh source call.
6639 * configure: Regenerate.
6641 2014-06-02 Pedro Alves <palves@redhat.com>
6643 * ax.c (gdb_free_agent_expr): New function.
6644 * ax.h (gdb_free_agent_expr): New declaration.
6645 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6647 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6649 (clear_breakpoint_conditions_and_commands): New function.
6650 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6651 (clear_breakpoint_conditions_and_commands): New declaration.
6653 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6655 * linux-aarch64-low.c (asm/ptrace.h): Include.
6657 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6659 Fix TLS access for -static -pthread.
6660 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6661 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6662 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6664 2014-05-20 Pedro Alves <palves@redhat.com>
6666 * linux-aarch64-low.c (aarch64_insert_point)
6667 (aarch64_remove_point): No longer check whether the type is
6668 supported here. Adjust to new interface.
6669 (the_low_target): Install aarch64_supports_z_point_type as
6670 supports_z_point_type method.
6671 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6672 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6673 instead of a Z packet char. Adjust.
6674 (arm_supports_z_point_type): New function.
6675 (arm_insert_point, arm_remove_point): Adjust to new interface.
6676 (the_low_target): Install arm_supports_z_point_type.
6677 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6678 (cris_insert_point, cris_remove_point): Adjust to new interface.
6679 Don't check whether the type is supported here.
6680 (the_low_target): Install cris_supports_z_point_type.
6681 * linux-low.c (linux_supports_z_point_type): New function.
6682 (linux_insert_point, linux_remove_point): Adjust to new interface.
6683 * linux-low.h (struct linux_target_ops) <insert_point,
6684 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6685 raw_breakpoint pointer parameter.
6686 <supports_z_point_type>: New method.
6687 * linux-mips-low.c (mips_supports_z_point_type): New function.
6688 (mips_insert_point, mips_remove_point): Adjust to new interface.
6689 Use mips_supports_z_point_type.
6690 (the_low_target): Install mips_supports_z_point_type.
6691 * linux-ppc-low.c (the_low_target): Install NULL as
6692 supports_z_point_type method.
6693 * linux-s390-low.c (the_low_target): Install NULL as
6694 supports_z_point_type method.
6695 * linux-sparc-low.c (the_low_target): Install NULL as
6696 supports_z_point_type method.
6697 * linux-x86-low.c (x86_supports_z_point_type): New function.
6698 (x86_insert_point): Adjust to new insert_point interface. Use
6699 insert_memory_breakpoint. Adjust to new
6700 i386_low_insert_watchpoint interface.
6701 (x86_remove_point): Adjust to remove_point interface. Use
6702 remove_memory_breakpoint. Adjust to new
6703 i386_low_remove_watchpoint interface.
6704 (the_low_target): Install x86_supports_z_point_type.
6705 * lynx-low.c (lynx_target_ops): Install NULL as
6706 supports_z_point_type callback.
6707 * nto-low.c (nto_supports_z_point_type): New.
6708 (nto_insert_point, nto_remove_point): Adjust to new interface.
6709 (nto_target_ops): Install nto_supports_z_point_type.
6710 * mem-break.c: Adjust intro comment.
6711 (struct raw_breakpoint) <raw_type, size>: New fields.
6712 <inserted>: Update comment.
6713 <shlib_disabled>: Delete field.
6714 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6715 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6716 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6717 (raw_bkpt_type_to_target_hw_bp_type): New function.
6718 (find_enabled_raw_code_breakpoint_at): New function.
6719 (find_raw_breakpoint_at): New type and size parameters. Use them.
6720 (insert_memory_breakpoint): New function, based off
6721 set_raw_breakpoint_at.
6722 (remove_memory_breakpoint): New function.
6723 (set_raw_breakpoint_at): Reimplement.
6724 (set_breakpoint): New, based on set_breakpoint_at.
6725 (set_breakpoint_at): Reimplement.
6726 (delete_raw_breakpoint): Go through the_target->remove_point
6727 instead of assuming memory breakpoints.
6728 (find_gdb_breakpoint_at): Delete.
6729 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6730 (find_gdb_breakpoint): New function.
6731 (set_gdb_breakpoint_at): Delete.
6732 (z_type_supported): New function.
6733 (set_gdb_breakpoint_1): New function, loosely based off
6734 set_gdb_breakpoint_at.
6735 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6736 (delete_gdb_breakpoint_at): Delete.
6737 (delete_gdb_breakpoint_1): New function, loosely based off
6738 delete_gdb_breakpoint_at.
6739 (delete_gdb_breakpoint): New function.
6740 (clear_gdb_breakpoint_conditions): Rename to ...
6741 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6743 (add_condition_to_breakpoint): Make static.
6744 (add_breakpoint_condition): Take a struct breakpoint pointer
6745 instead of an address. Adjust.
6746 (gdb_condition_true_at_breakpoint): Rename to ...
6747 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6749 (gdb_condition_true_at_breakpoint): Reimplement.
6750 (add_breakpoint_commands): Take a struct breakpoint pointer
6751 instead of an address. Adjust.
6752 (gdb_no_commands_at_breakpoint): Rename to ...
6753 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6754 parameter. Return true if no breakpoint was found. Change debug
6756 (gdb_no_commands_at_breakpoint): Reimplement.
6757 (run_breakpoint_commands): Rename to ...
6758 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6759 and change return type to boolean.
6760 (run_breakpoint_commands): New function.
6761 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6762 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6763 breakpoint. Go through the_target->remove_point instead of
6764 assuming memory breakpoint.
6765 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6766 software and hardware breakpoints.
6767 (reinsert_raw_breakpoint): Go through the_target->insert_point
6768 instead of assuming memory breakpoint.
6769 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6770 software and hardware breakpoints.
6771 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6772 Check both software and hardware breakpoints.
6773 (validate_inserted_breakpoint): Assert the breakpoint is a
6774 software breakpoint. Set the inserted flag to -1 instead of
6775 setting shlib_disabled.
6776 (delete_disabled_breakpoints): Adjust.
6777 (validate_breakpoints): Only validate software breakpoints.
6778 Adjust to inserted flag change.
6779 (check_mem_read, check_mem_write): Skip breakpoint types other
6780 than software breakpoints. Adjust to inserted flag change.
6781 * mem-break.h (enum raw_bkpt_type): New enum.
6782 (raw_breakpoint, struct process_info): Forward declare.
6783 (Z_packet_to_target_hw_bp_type): Delete declaration.
6784 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6785 (set_gdb_breakpoint, delete_gdb_breakpoint)
6786 (clear_breakpoint_conditions): New declarations.
6787 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6788 (breakpoint_inserted_here): Update comment.
6789 (add_breakpoint_condition, add_breakpoint_commands): Replace
6790 address parameter with a breakpoint pointer parameter.
6791 (gdb_breakpoint_here): Update comment.
6792 (delete_gdb_breakpoint_at): Delete.
6793 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6794 * server.c (process_point_options): Take a struct breakpoint
6795 pointer instead of an address. Adjust.
6796 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6797 delete_gdb_breakpoint.
6798 * spu-low.c (spu_target_ops): Install NULL as
6799 supports_z_point_type method.
6800 * target.h: Include mem-break.h.
6801 (struct target_ops) <prepare_to_access_memory>: Update comment.
6802 <supports_z_point_type>: New field.
6803 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6804 instead of a char. Also take a raw breakpoint pointer.
6805 * win32-arm-low.c (the_low_target): Install NULL as
6806 supports_z_point_type.
6807 * win32-i386-low.c (i386_supports_z_point_type): New function.
6808 (i386_insert_point, i386_remove_point): Adjust to new interface.
6809 (the_low_target): Install i386_supports_z_point_type.
6810 * win32-low.c (win32_supports_z_point_type): New function.
6811 (win32_insert_point, win32_remove_point): Adjust to new interface.
6812 (win32_target_ops): Install win32_supports_z_point_type.
6813 * win32-low.h (struct win32_target_ops):
6814 <supports_z_point_type>: New method.
6815 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6816 instead of a char. Also take a raw breakpoint pointer.
6818 2014-05-20 Pedro Alves <palves@redhat.com>
6820 * mem-break.h: Include break-common.h.
6821 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6822 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6823 (Z_packet_to_target_hw_bp_type): New declaration.
6824 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6825 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6826 (Z_PACKET_ACCESS_WP): Delete macros.
6827 (Z_packet_to_hw_type): Delete function.
6828 * i386-low.h: Don't include break-common.h here.
6829 (Z_packet_to_hw_type): Delete declaration.
6830 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6831 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6832 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6833 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6834 * linux-aarch64-low.c: Don't include break-common.h here.
6835 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6836 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6837 (Z_packet_to_target_hw_bp_type): Delete function.
6838 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6840 (mips_insert_point, mips_remove_point): Use
6841 Z_packet_to_target_hw_bp_type.
6843 2014-05-20 Pedro Alves <palves@redhat.com>
6845 * linux-aarch64-low.c: Include break-common.h.
6846 (enum target_point_type): Delete.
6847 (Z_packet_to_point_type): Rename to ...
6848 (Z_packet_to_target_hw_bp_type): ... this, and return a
6849 target_hw_bp_type instead.
6850 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6851 instead of an enum target_point_type.
6852 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6854 (aarch64_dr_state_insert_one_point)
6855 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6856 (aarch64_handle_aligned_watchpoint)
6857 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6858 Take an enum target_hw_bp_type instead of an enum
6860 (aarch64_supports_z_point_type): New function.
6861 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6862 use Z_packet_to_target_hw_bp_type.
6864 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6866 * configure.ac: Only use -Werror by default when DEVELOPMENT
6868 * configure: Regenerate.
6870 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6872 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6873 * linux-x86-low.c (X86_64_USER_REGS): New.
6874 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6876 2014-04-28 Yao Qi <yao@codesourcery.com>
6878 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6881 2014-04-25 Pedro Alves <palves@redhat.com>
6884 * linux-low.c (linux_attach_fail_reason_string): New function.
6885 (linux_attach_lwp): Delete.
6886 (linux_attach_lwp_1): Rename to ...
6887 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6888 argument. Remove "initial" parameter. Return int instead of
6889 void. Don't error or warn here.
6890 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6891 failure to attach to the tgid. Call warning when failing to
6893 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6894 argument. Remove "initial" parameter. Return int instead of
6895 void. Don't error or warn here.
6896 (linux_attach_fail_reason_string): New declaration.
6897 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6898 interface change. Use linux_attach_fail_reason_string.
6900 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6901 Walfred Tedeschi <walfred.tedeschi@intel.com>
6903 * Makefile.in: Added rules to handle new files
6904 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6905 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6906 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6907 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6908 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6909 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6911 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6912 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6913 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6914 i386/x32-avx512.xml.
6915 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6916 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6917 i386/x32-avx512-linux.xml.
6918 * i387-fp.c (num_avx512_k_registers): New constant for number
6920 (num_avx512_zmmh_low_registers): New constant for number of
6921 lower ZMM registers (0-15).
6922 (num_avx512_zmmh_high_registers): New constant for number of
6923 higher ZMM registers (16-31).
6924 (num_avx512_ymmh_registers): New contant for number of higher
6925 YMM registers (ymm16-31 added by avx521 on x86_64).
6926 (num_avx512_xmm_registers): New constant for number of higher
6927 XMM registers (xmm16-31 added by AVX512 on x86_64).
6928 (struct i387_xsave): Add space for AVX512 registers.
6929 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6930 Add code to handle AVX512 registers.
6931 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6932 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6933 prototypei from generated file.
6934 (tdesc_amd64_avx512_linux): Likewise.
6935 (init_registers_x32_avx512_linux): Likewise.
6936 (tdesc_x32_avx512_linux): Likewise.
6937 (init_registers_i386_avx512_linux): Likewise.
6938 (tdesc_i386_avx512_linux): Likewise.
6939 (x86_64_regmap): Add AVX512 registers.
6940 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6942 (initialize_low_arch): Add code to initialize AVX512 registers.
6944 2014-04-23 Pedro Alves <palves@redhat.com>
6946 * mem-break.c (find_gdb_breakpoint_at): Make static.
6947 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6949 2014-04-23 Pedro Alves <palves@redhat.com>
6951 * i386-low.c: Don't include break-common.h here.
6952 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6953 prototype to take target_hw_bp_type as argument instead of a Z
6955 * i386-low.h: Include break-common.h here.
6956 (Z_packet_to_hw_type): Declare.
6957 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6959 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6960 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6961 (x86_remove_point): Convert the packet number to a
6962 target_hw_bp_type before calling i386_low_remove_watchpoint.
6963 * win32-i386-low.c (i386_insert_point): Convert the packet number
6964 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6965 (i386_remove_point): Convert the packet number to a
6966 target_hw_bp_type before calling i386_low_remove_watchpoint.
6968 2014-04-23 Pedro Alves <palves@redhat.com>
6970 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6972 2014-04-10 Pedro Alves <palves@redhat.com>
6974 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6975 Check if the condition or command is NULL before checking if the
6976 breakpoint is known. On success, return true.
6977 * mem-break.h (add_breakpoint_condition): Document return.
6978 (add_breakpoint_commands): Add describing comment.
6979 * server.c (skip_to_semicolon): New function.
6980 (process_point_options): Use it.
6982 2014-04-09 Pedro Alves <palves@redhat.com>
6984 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6987 2014-02-27 Pedro Alves <palves@redhat.com>
6990 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6992 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6994 (last_thread_of_process_p): Take a PID argument instead of a
6996 (linux_wait_for_lwp): Delete.
6997 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6999 (linux_low_filter_event): New function, party factored out from
7000 linux_wait_for_event.
7001 (linux_wait_for_event): Rename to ...
7002 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7003 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7004 sigsuspend. Check for zombie leaders.
7005 (linux_wait_for_event): Reimplement as wrapper around
7006 linux_wait_for_event_filtered.
7007 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7008 a normal or signal exit is seen, it's the whole process exiting.
7009 (wait_for_sigstop): No longer a for_each_inferior callback.
7010 Rewrite on top of linux_wait_for_event_filtered.
7011 (stop_all_lwps): Call wait_for_sigstop directly.
7012 * server.c (resume, handle_target_event): Handle
7013 TARGET_WAITKIND_NO_RESUMED.
7015 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7017 * win32-low.c (psapi_get_dll_name,
7018 * win32_CreateToolhelp32Snapshot): Delete.
7019 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7020 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7022 (handle_load_dll): Add function description.
7023 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7025 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7027 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7029 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7030 base address when calling win32_add_one_solib.
7031 (handle_load_dll): Delete local variable load_addr.
7032 Remove 0x1000 offset applied to DLL base address when calling
7033 win32_add_one_solib.
7034 (handle_unload_dll): Add comment.
7036 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7038 * win32-low.c (win32_add_all_dlls): Renames
7039 win32_ensure_ntdll_loaded. Rewrite function documentation.
7040 Adjust implementation to always load all DLLs.
7041 Add 0x1000 offset to DLL base address when calling
7042 win32_add_one_solib.
7043 (child_initialization_done): New static global.
7044 (do_initial_child_stuff): Set child_initialization_done to
7045 zero during child initialization, and 1 after. Replace call
7046 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7048 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7049 (handle_unload_dll): Add function documentation.
7050 (get_child_debug_event): Ignore load and unload DLL events
7051 during child initialization.
7053 2014-02-20 Doug Evans <dje@google.com>
7055 Remove global all_lwps.
7056 * inferiors.h (ptid_of): Move here from linux-low.h.
7057 (pid_of, lwpid_of): Ditto.
7058 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7059 parameter is a struct thread_info * now.
7060 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7061 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7062 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7064 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7065 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7066 * linux-arm-low.c (update_registers_callback): Update, "entry"
7067 parameter is a struct thread_info * now.
7068 Fetch lwpid from current_inferior directly.
7069 (arm_insert_point): Pass &all_threads to find_inferior instead of
7071 (arm_remove_point): Ditto.
7072 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7073 (arm_prepare_to_resume): Fetch pid from thread.
7074 (arm_read_description): Fetch lwpid from current_inferior directly.
7075 * linux-low.c (all_lwps): Delete.
7076 (delete_lwp): Delete call to remove_inferior.
7077 (handle_extended_wait): Fetch lwpid from thread.
7078 (add_lwp): Don't set lwp->entry.id. Remove call to
7079 add_inferior_to_list.
7080 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7081 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7082 (kill_one_lwp_callback): Ditto.
7083 (linux_kill): Don't dereference NULL pointer.
7084 Fetch ptid,lwpid from thread.
7085 (get_detach_signal): Fetch ptid from thread.
7086 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7087 Simplify call to regcache_invalidate_thread.
7088 (delete_lwp_callback): Update, "entry" parameter is a
7089 struct thread_info * now. Fetch pid from thread.
7090 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7091 (status_pending_p_callback): Update, "entry" parameter is a
7092 struct thread_info * now. Fetch ptid from thread.
7093 (find_lwp_pid): Update, "entry" parameter is a
7094 struct thread_info * now.
7095 (linux_wait_for_lwp): Fetch pid from thread.
7096 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7097 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7098 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7099 (dequeue_one_deferred_signal): Ditto.
7100 (cancel_breakpoint): Fetch ptid from current_inferior.
7101 (linux_wait_for_event): Pass &all_threads to find_inferior,
7102 not &all_lwps. Fetch ptid, lwpid from thread.
7103 (count_events_callback): Update, "entry" parameter is a
7104 struct thread_info * now.
7105 (select_singlestep_lwp_callback): Ditto.
7106 (select_event_lwp_callback): Ditto.
7107 (cancel_breakpoints_callback): Ditto.
7108 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7110 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7111 (unsuspend_one_lwp): Update, "entry" parameter is a
7112 struct thread_info * now.
7113 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7115 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7116 Fetch lwpid from thread, not lwp.
7117 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7118 Pass &all_threads to find_inferior, not &all_lwps.
7119 (send_sigstop): Fetch lwpid from thread, not lwp.
7120 (send_sigstop_callback): Update, "entry" parameter is a
7121 struct thread_info * now.
7122 (suspend_and_send_sigstop_callback): Ditto.
7123 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7124 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7125 struct thread_info * now.
7126 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7128 (lwp_running): Update, "entry" parameter is a
7129 struct thread_info * now.
7130 (stop_all_lwps): Fetch ptid from thread.
7131 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7132 (linux_resume_one_lwp): Fetch lwpid from thread.
7133 (linux_set_resume_request): Update, "entry" parameter is a
7134 struct thread_info * now. Fetch pid, lwpid from thread.
7135 (resume_status_pending_p): Update, "entry" parameter is a
7136 struct thread_info * now.
7137 (need_step_over_p): Ditto. Fetch lwpid from thread.
7138 (start_step_over): Fetch lwpid from thread.
7139 (linux_resume_one_thread): Update, "entry" parameter is a
7140 struct thread_info * now. Fetch lwpid from thread.
7141 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7142 (proceed_one_lwp): Update, "entry" parameter is a
7143 struct thread_info * now. Fetch lwpid from thread.
7144 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7145 struct thread_info * now.
7146 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7147 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7148 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7150 (regsets_store_inferior_registers): Ditto.
7151 (fetch_register, store_register): Ditto.
7152 (linux_read_memory, linux_write_memory): Ditto.
7153 (linux_request_interrupt): Ditto.
7154 (linux_read_auxv): Ditto.
7155 (linux_xfer_siginfo): Ditto.
7156 (linux_qxfer_spu): Ditto.
7157 (linux_qxfer_libraries_svr4): Ditto.
7158 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7159 moved to inferiors.h.
7161 (get_thread_lwp): Update.
7162 (struct lwp_info): Delete member "entry". Simplify comment for
7165 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7166 current_inferior directly.
7167 (update_watch_registers_callback): Update, "entry" parameter is a
7168 struct thread_info * now. Fetch pid from thread.
7169 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7170 (mips_insert_point): Fetch lwpid from current_inferior.
7171 Pass &all_threads to find_inferior, not &all_lwps.
7172 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7173 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7175 (mips_stopped_data_address): Ditto.
7176 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7178 * linux-tile-low.c (tile_arch_setup): Ditto.
7179 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7180 (update_debug_registers_callback): Update, "entry" parameter is a
7181 struct thread_info * now. Fetch pid from thread.
7182 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7183 Pass &all_threads to find_inferior, not &all_lwps.
7184 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7185 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7186 Pass &all_threads to find_inferior, not &all_lwps.
7187 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7188 (i386_dr_low_get_status): Ditto.
7189 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7190 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7191 (x86_linux_read_description): Ditto.
7192 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7194 2014-02-20 Doug Evans <dje@google.com>
7196 * inferiors.c (get_first_inferior): Fix buglet.
7198 2014-02-19 Doug Evans <dje@google.com>
7200 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7201 * inferiors.c (add_thread): Change result type to struct thread_info *.
7202 All callers updated.
7203 (add_lwp): Call add_thread here instead of in callers.
7204 All callers updated.
7205 * linux-low.h (get_lwp_thread): Rewrite.
7206 (struct lwp_info): New member "thread".
7208 2014-02-19 Doug Evans <dje@google.com>
7210 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7211 All callers updated.
7213 2014-02-19 Doug Evans <dje@google.com>
7215 * inferiors.c (add_thread): Fix whitespace.
7217 2014-02-19 Doug Evans <dje@google.com>
7219 * dll.c (clear_dlls): Replace accessing list implemention details
7221 * gdbthread.h (get_first_thread): Declare.
7222 * inferiors.c (for_each_inferior_with_data): New function.
7223 (get_first_thread): New function.
7224 (find_thread_ptid): Simplify.
7225 (get_first_inferior): New function.
7226 (clear_list): Delete.
7227 (one_inferior_p): New function.
7228 (clear_inferior_list): New function.
7229 (clear_inferiors): Update.
7230 * inferiors.h (for_each_inferior_with_data): Declare.
7231 (clear_inferior_list): Declare.
7232 (one_inferior_p): Declare.
7233 (get_first_inferior): Declare.
7234 * linux-low.c (linux_wait_for_event): Replace accessing list
7235 implemention details with API function.
7236 * server.c (target_running): Ditto.
7237 (accumulate_file_name_length): New function.
7238 (emit_dll_description): New function.
7239 (handle_qxfer_libraries): Replace accessing list implemention
7240 details with API function.
7241 (handle_qxfer_threads_worker): New function.
7242 (handle_qxfer_threads_proper): Replace accessing list implemention
7243 details with API function.
7244 (handle_query): Ditto.
7245 (visit_actioned_threads_callback_ftype): New typedef.
7246 (visit_actioned_threads_data): New struct.
7247 (visit_actioned_threads): Rewrite to be find_inferior callback.
7248 (resume): Call find_inferior.
7249 (handle_status): Replace accessing list implemention
7250 details with API function.
7251 (process_serial_event): Replace accessing list implemention details
7253 * target.c (set_desired_inferior): Replace accessing list implemention
7254 details with API function.
7255 * tracepoint.c (same_process_p): New function.
7256 (gdb_agent_about_to_close): Replace accessing list implemention
7257 details with API function.
7258 * win32-low.c (child_delete_thread): Replace accessing list
7259 implemention details with API function.
7260 (match_dll_by_basename): New function.
7261 (dll_is_loaded_by_basename): New function.
7262 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7263 details call to dll_is_loaded_by_basename.
7265 2014-02-19 Doug Evans <dje@google.com>
7267 * dll.h (struct dll_info): Add comment.
7268 * gdbthread.h (struct thread_info): Add comment.
7269 (current_ptid): Simplify.
7270 * inferiors.c (add_process): Update.
7271 (remove_process): Update.
7272 * inferiors.h (struct process_info): Rename member "head" to "entry".
7273 * linux-low.c (delete_lwp): Update.
7275 (last_thread_of_process_p): Update.
7276 (kill_one_lwp_callback, linux_kill): Update.
7277 (status_pending_p_callback): Update.
7278 (wait_for_sigstop): Update. Simplify read of ptid.
7279 (start_step_over): Update.
7280 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7281 (get_lwp_thread): Update.
7282 (struct lwp_info): Rename member "head" to "entry".
7283 * regcache.h (inferior_list_entry): Delete.
7284 * server.c (kill_inferior_callback): Update.
7285 (detach_or_kill_inferior_callback): Update.
7286 (print_started_pid): Update.
7287 (print_attached_pid): Update.
7288 (process_serial_event): Simplify read of ptid.
7289 * thread-db.c (thread_db_create_event): Update.
7290 (thread_db_get_tls_address): Update.
7291 * win32-low.c (current_inferior_ptid): Simplify.
7293 2014-02-19 Tom Tromey <tromey@redhat.com>
7295 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7297 (target_supports_btrace): Update.
7299 2014-02-14 Yao Qi <yao@codesourcery.com>
7301 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7302 (rsp-low-ipa.o): New target.
7304 2014-02-12 Tom Tromey <tromey@redhat.com>
7306 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7307 convert_ascii_to_int.
7308 * regcache.c (registers_to_string): Likewise.
7309 * remote-utils.c (decode_M_packet): Likewise.
7310 * server.c (process_serial_event): Likewise.
7312 2014-02-12 Tom Tromey <tromey@redhat.com>
7314 * server.c (handle_query, handle_v_run): Use hex2bin, not
7316 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7318 2014-02-12 Tom Tromey <tromey@redhat.com>
7320 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7321 convert_int_to_ascii.
7322 * regcache.c (registers_to_string, collect_register_as_string):
7324 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7326 * server.c (process_serial_event): Likewise.
7327 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7328 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7330 2014-02-12 Tom Tromey <tromey@redhat.com>
7332 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7333 bin2hex, not hexify.
7334 * tracepoint.c (cmd_qtstatus): Likewise.
7336 2014-02-12 Tom Tromey <tromey@redhat.com>
7338 * remote-utils.c (monitor_output): Pass explicit length to
7341 2014-02-12 Tom Tromey <tromey@redhat.com>
7343 * tracepoint.c: Include rsp-low.h.
7344 * server.c: Include rsp-low.h.
7345 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7346 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7348 * remote-utils.c: Include rsp-low.h.
7349 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7350 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7351 (convert_int_to_ascii, convert_ascii_to_int): Move to
7353 * regcache.c: Include rsp-low.h.
7354 * ax.c: Include rsp-low.h.
7355 * Makefile.in (SFILES): Add common/rsp-low.c.
7356 (OBS): Add rsp-low.o.
7357 (rsp-low.o): New target.
7359 2014-02-12 Tom Tromey <tromey@redhat.com>
7361 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7362 Include print-utils.h.
7363 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7364 (plongest, thirty_two, phex_nz): Remove.
7365 * Makefile.in (SFILES): Add common/print-utils.c.
7366 (OBS): Add print-utils.o.
7367 (print-utils-ipa.o): New target.
7368 (print-utils.o): New target.
7369 (IPA_OBJS): Add print-utils-ipa.o.
7371 2014-02-06 Tom Tromey <tromey@redhat.com>
7373 * Makefile.in (SFILES): Fix indentation.
7375 2014-02-05 Doug Evans <dje@google.com>
7377 * linux-low.c (linux_wait_for_event): Improve comment.
7378 (linux_wait_1): Keep current_inferior in sync with event_child.
7380 2014-01-22 Doug Evans <dje@google.com>
7382 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7384 2014-01-22 Doug Evans <dje@google.com>
7386 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7387 * configure: Regenerate.
7388 * config.in: Regenerate.
7389 * Makefile.in (SFILES): Add debug.c.
7391 * debug.c: New file.
7392 * debug.h: New file.
7393 * linux-aarch64-low.c (*): Update all debugging printfs to use
7394 debug_printf instead of fprintf.
7395 * linux-arm-low.c (*): Ditto.
7396 * linux-cris-low.c (*): Ditto.
7397 * linux-crisv32-low.c (*): Ditto.
7398 * linux-m32r-low.c (*): Ditto.
7399 * linux-sparc-low.c (*): Ditto.
7400 * linux-x86.c (*): Ditto.
7401 * linux-low.c (*): Ditto.
7402 (linux_wait_1): Add calls to debug_enter, debug_exit.
7403 (linux_wait): Remove redundant debugging printf.
7404 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7405 (linux_resume, unstop_all_lwps): Ditto.
7406 * mem-break.c (*): Update all debugging printfs to use
7407 debug_printf instead of fprintf.
7408 * remote-utils.c (*): Ditto.
7409 * thread-db.c (*): Ditto.
7410 * server.c #include <ctype.h>, "gdb_vecs.h".
7411 (debug_threads): Moved to debug.c.
7412 (*): Update all debugging printfs to use debug_printf instead of
7414 (start_inferior): Replace call to fflush with call to debug_flush.
7415 (monitor_show_help): Mention set debug-format.
7416 (parse_debug_format_options): New function.
7417 (handle_monitor_command): Handle "monitor set debug-format".
7418 (gdbserver_usage): Mention --debug-format.
7419 (main): Parse --debug-format.
7420 * server.h (debug_threads): Declaration moved to debug.h.
7422 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7423 trace_debug_1 that uses debug_printf.
7424 (tracepoint_look_up_symbols): Update all debugging printfs to use
7425 debug_printf instead of fprintf.
7427 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7429 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7432 2014-01-17 Pedro Alves <palves@redhat.com>
7435 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7436 defined after including gdb_proc_service.h.
7438 2014-01-16 Doug Evans <dje@google.com>
7440 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7441 (match_dll): Use it.
7443 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7445 * target.h (target_ops) <read_btrace>: Change parameters and
7446 return type to allow error reporting.
7447 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7448 trace reading errors on.
7449 * linux-low.c (linux_low_read_btrace): Pass trace reading
7451 (linux_low_disable_btrace): New.
7453 2014-01-15 Doug Evans <dje@google.com>
7455 * inferiors.c (thread_id_to_gdb_id): Delete.
7456 * inferiors.h (thread_id_to_gdb_id): Delete.
7458 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7460 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7461 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7464 2014-01-08 Pedro Alves <palves@redhat.com>
7466 * server.c (handle_status): Don't discard previous queued stop
7467 replies or thread's pending status here.
7468 (main) <disconnection>: Do it here instead.
7470 2014-01-08 Pedro Alves <palves@redhat.com>
7472 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7473 * server.c (visit_actioned_threads, handle_pending_status): New
7475 (handle_v_cont): Factor out parts to ...
7476 (resume): ... this new function. If in all-stop, and a thread
7477 being resumed has a pending status, report it without actually
7479 (myresume): Adjust to use the new 'resume' function.
7480 (clear_pending_status_callback, set_pending_status_callback)
7481 (find_status_pending_thread_callback): New functions.
7482 (handle_status): Handle the case of multiple threads having
7483 interesting statuses to report. Report threads' real last signal
7484 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7485 with an interesting thread to report the status for, instead of
7486 always reporting the status of the first thread.
7488 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7490 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7491 * gdbreplay.c (gdbreplay_version): Likewise.
7493 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7495 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7496 iov.iov_len with the real length in use.
7498 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7500 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7501 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7502 for all targets that use win32-low.c.
7503 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7504 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7506 2013-12-13 Pedro Alves <palves@redhat.com>
7508 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7509 if equal to TARGET_WAITKIND_LOADED.
7510 * win32-low.c (cached_status): New static global.
7511 (win32_wait): Add declaration.
7512 (do_initial_child_stuff): Flush all initial pending debug events
7513 up to the initial breakpoint.
7514 (win32_wait): If CACHED_STATUS was set, return that instead
7515 of doing a real wait. Remove the code resuming the execution
7516 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7517 during the initial phase. Also remove the code changing
7518 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7519 TARGET_WAITKIND_STOPPED.
7521 2013-12-11 Yao Qi <yao@codesourcery.com>
7523 * notif.c (handle_notif_ack): Return 0 if no notification
7526 2013-11-20 Doug Evans <dje@google.com>
7528 * linux-low.c (linux_set_resume_request): Fix comment.
7530 2013-11-20 Doug Evans <dje@google.com>
7532 * linux-low.c (resume_status_pending_p): Tweak comment.
7534 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7536 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7537 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7538 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7539 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7540 (srv_amd64_regobj): Add amd64-mpx.o.
7541 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7542 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7543 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7544 * i387-fp.c (num_pl_bnd_register) Added constant.
7545 (num_pl_bnd_cfg_registers) Added constant.
7546 (struct i387_xsave) Added reserved area and MPX fields.
7547 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7548 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7550 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7551 (init_registers_amd64_mpx_linux): Declare new function.
7552 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7553 (x86_64_regmap): Add MPX registers.
7554 (x86_linux_read_description): Add MPX case.
7555 (initialize_low_arch): Initialize MPX targets.
7557 2013-11-18 Tom Tromey <tromey@redhat.com>
7559 * configure: Rebuild.
7560 * configure.ac: Don't check for stdlib.h.
7561 * gdbreplay.c: Unconditionally include stdlib.h.
7563 2013-11-18 Tom Tromey <tromey@redhat.com>
7565 * config.in: Rebuild.
7566 * configure: Rebuild.
7567 * configure.ac: Don't use AC_HEADER_DIRENT.
7569 2013-11-18 Tom Tromey <tromey@redhat.com>
7571 * server.h: Don't check HAVE_STRING_H.
7572 * gdbreplay.c: Don't check HAVE_STRING_H.
7573 * configure: Rebuild.
7575 2013-11-18 Tom Tromey <tromey@redhat.com>
7577 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7580 2013-11-08 Tom Tromey <tromey@redhat.com>
7582 * configure, config.in: Rebuild.
7583 * configure.ac: Remove unused configury.
7585 2013-11-08 Tom Tromey <tromey@redhat.com>
7587 * acinclude.m4: Include common.m4, codeset.m4.
7588 * configure, config.in: Rebuild.
7589 * configure.ac: Use GDB_AC_COMMON.
7591 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7593 * linux-s390-low.c (HWCAP_S390_TE): New define.
7594 (s390_arch_setup): Consider the TE field in the HWCAP for
7595 determining 'have_regset_tdb'.
7597 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7600 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7603 2013-10-02 Pedro Alves <palves@redhat.com>
7605 * server.c (process_serial_event): Don't output "GDBserver
7606 exiting" if GDB is connected through stdio.
7607 * target.c (mywait): Likewise, be silent if GDB is connected
7610 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7612 * lynx-low.c (lynx_add_threads_after_attach): New function.
7613 (lynx_attach): Remove call to add_thread. Add call to
7614 lynx_add_threads_after_attach instead.
7616 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7618 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7619 * config.in, configure: Regenerated.
7621 2013-09-18 Yao Qi <yao@codesourcery.com>
7624 * server.c (start_inferior): Clear 'resume_info'.
7626 2013-09-16 Jiong Wang <jiwang@tilera.com>
7628 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7631 2013-09-16 Jiong Wang <jiwang@tilera.com>
7633 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7634 linux-tile-low.o to srv_tgtobj.
7636 2013-09-16 Will Newton <will.newton@linaro.org>
7638 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7641 2013-09-06 Pedro Alves <palves@redhat.com>
7643 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7644 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7645 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7646 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7647 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7648 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7650 2013-09-06 Pedro Alves <palves@redhat.com>
7652 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7653 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7655 2013-09-06 Pedro Alves <palves@redhat.com>
7657 * linux-amd64-ipa.c: Include tracepoint.h.
7658 * linux-i386-ipa.c: Include tracepoint.h.
7660 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7662 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7663 (ps_get_thread_area): New function.
7665 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7667 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7668 (initialize_low_arch): Call init_registers_crisv32 rather than
7669 init_register_crisv32.
7671 2013-09-05 Pedro Alves <palves@redhat.com>
7673 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7675 * hostio.h: ... this new file.
7676 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7677 win32-low.c: Include hostio.h.
7679 2013-09-05 Pedro Alves <palves@redhat.com>
7681 * server.h (gdb_client_data, handler_func, callback_handler_func)
7682 (delete_file_handler, add_file_handler, append_callback_event)
7683 (delete_callback_event, start_event_loop, initialize_event_loop):
7684 Move to event-loop.h and include it.
7685 * event-loop.h: New file.
7687 2013-09-05 Pedro Alves <palves@redhat.com>
7689 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7690 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7691 (loaded_dll, unloaded_dll): Move to ...
7692 * dll.h: ... this new file.
7693 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7695 2013-09-05 Pedro Alves <palves@redhat.com>
7697 * server.h (current_process, get_thread_process, all_processes)
7698 (add_inferior_to_list, for_each_inferior, current_inferior)
7699 (remove_inferior, add_process, remove_process, find_process_pid)
7700 (have_started_inferiors_p, have_attached_inferiors_p)
7701 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7702 (clear_inferiors, find_inferior, find_inferior_id)
7703 (inferior_target_data, set_inferior_target_data)
7704 (inferior_regcache_data, set_inferior_regcache_data): Move to
7705 inferiors.h, and include it.
7706 * inferiors.h: New file.
7708 2013-09-05 Pedro Alves <palves@redhat.com>
7710 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7714 2013-09-05 Pedro Alves <palves@redhat.com>
7716 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7718 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7719 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7720 (handle_tracepoint_general_set, handle_tracepoint_query)
7721 (tracepoint_finished_step, tracepoint_was_hit)
7722 (release_while_stepping_state_list, current_traceframe)
7723 (in_readonly_region, traceframe_read_mem)
7724 (fetch_traceframe_registers, traceframe_read_sdata)
7725 (traceframe_read_info, struct fast_tpoint_collect_status)
7726 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7727 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7728 (supply_fast_tracepoint_registers)
7729 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7730 (ipa_tdesc, claim_trampoline_space)
7731 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7732 (agent_mem_read, agent_get_trace_state_variable_value)
7733 (agent_set_trace_state_variable_value, agent_tsv_read)
7734 (agent_mem_read_string, get_raw_reg_func_addr)
7735 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7736 * tracepoint.h: ... this new file.
7738 2013-09-05 Pedro Alves <palves@redhat.com>
7740 * server.h (perror_with_name, error, fatal, warning, paddress)
7741 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7743 * utils.h: New file.
7745 2013-09-05 Pedro Alves <palves@redhat.com>
7747 * server.h (remote_debug, noack_mode, transport_is_reliable)
7748 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7749 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7750 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7751 (write_enn, initialize_async_io, enable_async_io)
7752 (disable_async_io, check_remote_input_interrupt_request)
7753 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7754 (dead_thread_notify, prepare_resume_reply)
7755 (decode_address_to_semicolon, decode_address, decode_m_packet)
7756 (decode_M_packet, decode_X_packet, decode_xfer_write)
7757 (decode_search_memory_packet, unhexify, hexify)
7758 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7759 (look_up_one_symbol, relocate_instruction)
7760 (monitor_output): Move to remote-utils.h, and include it.
7761 * remote-utils.h: New file.
7763 2013-09-05 Pedro Alves <palves@redhat.com>
7765 * server.h (_): Delete.
7767 2013-09-02 Pedro Alves <palves@redhat.com>
7769 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7770 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7772 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7774 2013-09-02 Pierre Muller <muller@sourceware.org>
7776 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7777 or WriteProcessMemory complete successfully and handle
7778 ERROR_PARTIAL_COPY error.
7780 2013-09-02 Pedro Alves <palves@redhat.com>
7782 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7783 error instead of EIO.
7785 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7788 * linux-low.c: Include filestuff.h.
7789 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7790 * lynx-low.c: Include filestuff.h.
7791 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7792 * server.c: Include filestuff.h.
7793 (main): Call notice_open_fds.
7794 * spu-low.c: Include filestuff.h.
7795 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7797 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7799 * Makefile.in: Explain why ../target and ../nat are not
7800 listed as include file search paths.
7801 (linux-waitpid.o): New object file rule.
7802 * configure.srv (srv_native_linux_obj): New variable.
7803 Replace all occurrences of linux native object files with
7804 $srv_native_linux_obj.
7805 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7806 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7807 (linux_enable_event_reporting): Remove declaration.
7808 (my_waitpid): Moved to common/linux-waitpid.c.
7809 (linux_wait_for_event): Pass ptid when calling
7810 linux_enable_event_reporting.
7811 (linux_supports_tracefork_flag): Remove.
7812 (linux_enable_event_reporting): Likewise.
7813 (linux_tracefork_grandchild): Remove.
7814 (STACK_SIZE): Moved to common/linux-ptrace.c.
7815 (linux_tracefork_child): Remove.
7816 (linux_test_for_tracefork): Remove.
7817 (linux_look_up_symbols): Call linux_supports_traceclone.
7818 (initialize_low): Remove call to linux_test_for_tracefork.
7819 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7820 common/linux-ptrace.h.
7821 (PTRACE_TYPE_ARG4): Likewise.
7822 Include linux-ptrace.h.
7824 2013-08-21 Pedro Alves <palves@redhat.com>
7826 * config.in: Renegerate.
7828 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7830 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7831 (SFILES): Remove $(srcdir)/common/target-common.c and
7832 add $(srcdir)/target/waitstatus.c.
7833 (OBS): Remove target-common.o and add waitstatus.o.
7834 (server_h): Remove $(srcdir)/../common/target-common.h and
7835 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7836 and $(srcdir)/../target/waitstatus.h.
7837 (target-common.o): Remove.
7838 (waitstatus.o): New target object file.
7839 * target.h: Do not include target-common.h and
7840 include target/resume.h, target/wait.h and
7841 target/waitstatus.h.
7843 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7845 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7846 to PTRACE_TYPE_ARG3.
7847 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7848 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7850 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7851 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7853 2013-07-27 Jie Zhang <jie@codesourcery.com>
7854 Daniel Jacobowitz <dan@codesourcery.com>
7855 Yao Qi <yao@codesourcery.com>
7857 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7858 (mips-linux-watch.o): New rule.
7859 (mips_linux_watch_h): New variable.
7860 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7862 * linux-mips-low.c: Include mips-linux-watch.h.
7863 (struct arch_process_info, struct arch_lwp_info): New.
7864 (update_watch_registers_callback): New function.
7865 (mips_linux_new_process, mips_linux_new_thread) New functions.
7866 (mips_linux_prepare_to_resume, mips_insert_point): New
7868 (mips_remove_point, mips_stopped_by_watchpoint): New
7870 (rsp_bp_type_to_target_hw_bp_type): New function.
7871 (mips_stopped_data_address): New function.
7872 (the_low_target): Add watchpoint support functions.
7874 2013-07-27 Yao Qi <yao@codesourcery.com>
7876 * i386-low.c: Include break-common.h.
7877 (enum target_hw_bp_type): Remove.
7879 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7881 * Makefile.in (SFILES): /common/target-common.c.
7882 (OBS): Add target-common.o.
7883 (server_h): Add $(srcdir)/../common/target-common.h.
7884 (target-common.o): New target.
7885 * server.c (queue_stop_reply_callback): Free
7886 status string after use.
7887 * target.c (target_waitstatus_to_string): Remove.
7888 * target.h: Include target-common.h.
7889 (resume_kind): Likewise.
7890 (target_waitkind): Likewise.
7891 (target_waitstatus): Likewise.
7892 (TARGET_WNOHANG): Likewise.
7894 2013-07-04 Yao Qi <yao@codesourcery.com>
7896 * Makefile.in (host_alias): Use @host_noncanonical@.
7897 (target_alias): Use @target_noncanonical@.
7898 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7899 ACX_NONCANONICAL_HOST.
7900 * configure: Regenerated.
7903 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7905 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7906 * configure: Rebuild.
7907 * Makefile.in (version_host, version_target): Get from configure.
7908 (version.c): Use $(version_host) and $(version_target).
7910 2013-07-03 Pedro Alves <palves@redhat.com>
7912 * Makefile.in (config.status): Depend on development.sh.
7913 * acinclude.m4: Include libmcheck.m4.
7914 * configure: Regenerate.
7916 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7918 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7919 attribute inside the parentheses.
7920 (winapi_DebugSetProcessKillOnExit): Ditto.
7921 (winapi_DebugBreakProcess): Ditto.
7922 (winapi_GenerateConsoleCtrlEvent): Ditto.
7924 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7926 * notif.h (notif_event): Add a dummy member to avoid compiler
7929 2013-07-01 Pedro Alves <palves@redhat.com>
7931 * hostio.c (HOSTIO_PATH_MAX): Define.
7932 (require_filename, handle_open, handle_unlink, handle_readlink):
7935 2013-07-01 Pedro Alves <palves@redhat.com>
7937 * server.h: Include "pathmax.h".
7938 * linux-low.c: Don't include sys/param.h.
7939 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7941 * win32-low.c: Don't include sys/param.h.
7942 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7944 2013-07-01 Pedro Alves <palves@redhat.com>
7946 * event-loop.c: Don't check HAVE_UNISTD_H before including
7948 * gdbreplay.c: Likewise.
7949 * remote-utils.c: Likewise.
7950 * server.c: Likewise.
7951 * configure.ac: Don't check for unistd.h.
7952 * configure: Regenerate.
7954 2013-06-28 Tom Tromey <tromey@redhat.com>
7956 * Makefile.in (version.c): Use version.in, not
7959 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7961 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7962 * configure: Rebuild.
7963 * Makefile.in (version_host, version_target): Get from configure.
7964 (version.c): Use $(version_host) and $(version_target).
7966 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7968 Fix trace-status to output user name without trailing colon.
7969 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7971 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7973 Fix trace-status to output proper start-time and stop-time.
7974 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7975 output start time and stop time in hex as gdb expects.
7977 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7979 * tracepoint.c (build_traceframe_info_xml): Output trace state
7980 variables present in the trace buffer.
7982 2013-06-24 Tom Tromey <tromey@redhat.com>
7984 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7986 (version.o): Remove.
7987 * gdbreplay.c: Include version.h.
7988 (version, host_name): Don't declare.
7989 * server.h: Include version.h.
7990 (version, host_name): Don't declare.
7992 2013-06-12 Pedro Alves <palves@redhat.com>
7994 * linux-x86-low.c (linux_is_elf64): Delete global.
7995 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7996 with local linux_pid_exe_is_elf_64_file use.
7998 2013-06-11 Pedro Alves <palves@redhat.com>
8000 * linux-low.c (regset_disabled, disable_regset): New functions.
8001 (regsets_fetch_inferior_registers)
8002 (regsets_store_inferior_registers): Use them.
8003 (initialize_regsets_info); Don't allocate the disabled_regsets
8005 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8008 2013-06-11 Pedro Alves <palves@redhat.com>
8010 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8013 2013-06-11 Pedro Alves <palves@redhat.com>
8015 * linux-x86-low.c (initialize_low_arch): Call
8016 init_registers_x32_avx_linux.
8018 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8020 Fix compatibility with Android Bionic.
8021 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8024 2013-06-07 Pedro Alves <palves@redhat.com>
8027 * Makefile.in (OBS): Add tdesc.o.
8028 (IPA_OBJS): Add tdesc-ipa.o.
8029 (tdesc-ipa.o): New rule.
8030 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8032 * linux-low.c (new_inferior): Delete.
8033 (disabled_regsets, num_regsets): Delete.
8034 (linux_add_process): Adjust to set the new per-process
8036 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8037 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8038 was a stop. When calling arch_setup, switch the current inferior
8039 to the thread that got an event.
8040 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8041 (regsets_fetch_inferior_registers)
8042 (regsets_store_inferior_registers): New regsets_info parameter.
8044 (linux_register_in_regsets): New regs_info parameter. Adjust to
8046 (register_addr, fetch_register, store_register): New usrregs_info
8047 parameter. Adjust to use it.
8048 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8049 parameter regs_info. Adjust to use it.
8050 (linux_fetch_registers): Get the current inferior's regs_info, and
8052 (linux_store_registers): Ditto.
8053 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8054 (initialize_low): Don't initialize the target_regsets here. Call
8055 initialize_low_arch.
8056 * linux-low.h (target_regsets): Delete declaration.
8057 (struct regsets_info): New.
8058 (struct usrregs_info): New.
8059 (struct regs_info): New.
8060 (struct process_info_private) <new_inferior>: New field.
8061 (struct linux_target_ops): Delete the num_regs, regmap, and
8062 regset_bitmap fields. New field regs_info.
8063 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8064 * i387-fp.c (num_xmm_registers): Delete.
8065 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8066 calls to new interface.
8067 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8068 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8069 Infer the number of xmm registers from the regcache's target
8071 * i387-fp.h (num_xmm_registers): Delete.
8072 * inferiors.c (add_thread): Don't install the thread's regcache
8074 * proc-service.c (gregset_info): Fetch the current inferior's
8075 regs_info. Adjust to use it.
8076 * regcache.c: Include tdesc.h.
8077 (register_bytes, reg_defs, num_registers)
8078 (gdbserver_expedite_regs): Delete.
8079 (get_thread_regcache): If the thread doesn't have a regcache yet,
8080 create one, instead of aborting gdbserver.
8081 (regcache_invalidate_one): Rename to ...
8082 (regcache_invalidate_thread): ... this.
8083 (regcache_invalidate_one): New.
8084 (regcache_invalidate): Only invalidate registers of the current
8086 (init_register_cache): Add target_desc parameter, and use it.
8087 (new_register_cache): Ditto. Assert the target description has a
8088 non zero registers_size.
8089 (regcache_cpy): Add assertions. Adjust.
8090 (realloc_register_cache, set_register_cache): Delete.
8091 (registers_to_string, registers_from_string): Adjust.
8092 (find_register_by_name, find_regno, find_register_by_number)
8093 (register_cache_size): Add target_desc parameter, and use it.
8094 (free_register_cache_thread, free_register_cache_thread_one)
8095 (regcache_release, register_cache_size): New.
8096 (register_size): Add target_desc parameter, and use it.
8097 (register_data, supply_register, supply_register_zeroed)
8098 (supply_regblock, supply_register_by_name, collect_register)
8099 (collect_register_as_string, collect_register_by_name): Adjust.
8100 * regcache.h (struct target_desc): Forward declare.
8101 (struct regcache) <tdesc>: New field.
8102 (init_register_cache, new_register_cache): Add target_desc
8104 (regcache_invalidate_thread): Declare.
8105 (regcache_invalidate_one): Delete declaration.
8106 (regcache_release): Declare.
8107 (find_register_by_number, register_cache_size, register_size)
8108 (find_regno): Add target_desc parameter.
8109 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8111 * remote-utils.c: Include tdesc.h.
8112 (outreg, prepare_resume_reply): Adjust.
8113 * server.c: Include tdesc.h.
8114 (gdbserver_xmltarget): Delete declaration.
8115 (get_features_xml, process_serial_event): Adjust.
8116 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8118 (struct process_info) <tdesc>: New field.
8119 (ipa_tdesc): Declare.
8120 * tdesc.c: New file.
8121 * tdesc.h: New file.
8122 * tracepoint.c: Include tdesc.h.
8123 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8124 (get_context_regcache): Adjust to pass ipa_tdesc down.
8125 (do_action_at_tracepoint): Adjust to get the register cache size
8126 from the context regcache's description.
8127 (traceframe_walk_blocks): Adjust to get the register cache size
8128 from the current trace frame's description.
8129 (traceframe_get_pc): Adjust to get current trace frame's
8130 description and pass it down.
8131 (gdb_collect): Adjust to get the register cache size from the
8133 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8134 (gdbserver_xmltarget): Delete.
8135 (initialize_low_tracepoint): Set the ipa's target description.
8136 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8137 (initialize_low_tracepoint): Set the ipa's target description.
8138 * linux-x86-low.c: Include tdesc.h.
8139 [__x86_64__] (is_64bit_tdesc): New.
8140 (ps_get_thread_area, x86_get_thread_area): Use it.
8141 (i386_cannot_store_register): Rename to ...
8142 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8143 (i386_cannot_fetch_register): Rename to ...
8144 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8145 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8147 (target_regsets): Rename to ...
8148 (x86_regsets): ... this.
8149 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8151 (x86_siginfo_fixup): Use is_64bit_tdesc.
8152 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8153 (tdesc_x32_avx_linux, tdesc_x32_linux)
8154 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8156 (x86_linux_update_xmltarget): Delete.
8157 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8158 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8159 (AMD64_LINUX_USER64_CS): New.
8160 (x86_linux_read_description): New, based on
8161 x86_linux_update_xmltarget.
8162 (same_process_callback): New.
8163 (x86_arch_setup_process_callback): New.
8164 (x86_linux_update_xmltarget): New.
8165 (x86_regsets_info): New.
8166 (amd64_linux_regs_info): New.
8167 (i386_linux_usrregs_info): New.
8168 (i386_linux_regs_info): New.
8169 (x86_linux_regs_info): New.
8170 (x86_arch_setup): Reimplement.
8171 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8172 (x86_emit_ops): Ditto.
8173 (the_low_target): Adjust. Install x86_linux_regs_info,
8174 x86_cannot_fetch_register, and x86_cannot_store_register.
8175 (initialize_low_arch): New.
8176 * linux-ia64-low.c (tdesc_ia64): Declare.
8177 (ia64_fetch_register): Adjust.
8178 (ia64_usrregs_info, regs_info): New globals.
8179 (ia64_regs_info): New function.
8180 (the_low_target): Adjust.
8181 (initialize_low_arch): New function.
8182 * linux-sparc-low.c (tdesc_sparc64): Declare.
8183 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8185 (sparc_arch_setup): New function.
8186 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8187 (the_low_target): Adjust.
8188 (initialize_low_arch): New function.
8189 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8190 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8191 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8192 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8193 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8194 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8195 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8196 (tdesc_powerpc_isa205_vsx64l): Declare.
8197 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8198 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8199 (ppc_set_pc, ppc_get_hwcap): Adjust.
8200 (ppc_usrregs_info): Forward declare.
8201 (!__powerpc64__) ppc_regmap_adjusted: New global.
8202 (ppc_arch_setup): Adjust to the current process'es target
8204 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8205 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8206 (ppc_store_evrregset): Adjust.
8207 (target_regsets): Rename to ...
8208 (ppc_regsets): ... this, and make static.
8209 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8210 (ppc_regs_info): New function.
8211 (the_low_target): Adjust.
8212 (initialize_low_arch): New function.
8213 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8214 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8215 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8216 (tdesc_s390x_linux64v2): Declare.
8217 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8218 (s390_fill_gregset, s390_store_last_break): Adjust.
8219 (target_regsets): Rename to ...
8220 (s390_regsets): ... this, and make static.
8221 (s390_get_pc, s390_set_pc): Adjust.
8222 (s390_get_hwcap): New target_desc parameter, and use it.
8223 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8224 (s390_arch_setup): Adjust to set the current process'es target
8225 description. Don't adjust the regmap.
8226 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8227 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8228 (regs_info_3264): New globals.
8229 (s390_regs_info): New function.
8230 (the_low_target): Adjust.
8231 (initialize_low_arch): New function.
8232 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8233 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8234 [__mips64] (init_registers_mips_linux)
8235 (init_registers_mips_dsp_linux): Delete defines.
8236 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8237 (have_dsp): New global.
8238 (mips_read_description): New, based on mips_arch_setup.
8239 (mips_arch_setup): Reimplement.
8240 (get_usrregs_info): New function.
8241 (mips_cannot_fetch_register, mips_cannot_store_register)
8242 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8243 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8244 (target_regsets): Rename to ...
8245 (mips_regsets): ... this, and make static.
8246 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8247 (dsp_regs_info, regs_info): New globals.
8248 (mips_regs_info): New function.
8249 (the_low_target): Adjust.
8250 (initialize_low_arch): New function.
8251 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8252 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8254 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8255 (arm_read_description): New, with bits factored from
8257 (arm_arch_setup): Reimplement.
8258 (target_regsets): Rename to ...
8259 (arm_regsets): ... this, and make static.
8260 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8261 (arm_regs_info): New function.
8262 (the_low_target): Adjust.
8263 (initialize_low_arch): New function.
8264 * linux-m68k-low.c (tdesc_m68k): Declare.
8265 (target_regsets): Rename to ...
8266 (m68k_regsets): ... this, and make static.
8267 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8268 (m68k_regs_info): New function.
8269 (m68k_arch_setup): New function.
8270 (the_low_target): Adjust.
8271 (initialize_low_arch): New function.
8272 * linux-sh-low.c (tdesc_sharch): Declare.
8273 (target_regsets): Rename to ...
8274 (sh_regsets): ... this, and make static.
8275 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8276 (sh_regs_info, sh_arch_setup): New functions.
8277 (the_low_target): Adjust.
8278 (initialize_low_arch): New function.
8279 * linux-bfin-low.c (tdesc_bfin): Declare.
8280 (bfin_arch_setup): New function.
8281 (bfin_usrregs_info, regs_info): New globals.
8282 (bfin_regs_info): New function.
8283 (the_low_target): Adjust.
8284 (initialize_low_arch): New function.
8285 * linux-cris-low.c (tdesc_cris): Declare.
8286 (cris_arch_setup): New function.
8287 (cris_usrregs_info, regs_info): New globals.
8288 (cris_regs_info): New function.
8289 (the_low_target): Adjust.
8290 (initialize_low_arch): New function.
8291 * linux-cris-low.c (tdesc_crisv32): Declare.
8292 (cris_arch_setup): New function.
8293 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8294 (cris_regs_info): New function.
8295 (the_low_target): Adjust.
8296 (initialize_low_arch): New function.
8297 * linux-m32r-low.c (tdesc_m32r): Declare.
8298 (m32r_arch_setup): New function.
8299 (m32r_usrregs_info, regs_info): New globals.
8300 (m32r_regs_info): Adjust.
8301 (initialize_low_arch): New function.
8302 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8303 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8304 (tic6x_usrregs_info): Forward declare.
8305 (tic6x_read_description): New function, based on ...
8306 (tic6x_arch_setup): ... this. Reimplement.
8307 (target_regsets): Rename to ...
8308 (tic6x_regsets): ... this, and make static.
8309 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8310 (tic6x_regs_info): New function.
8311 (the_low_target): Adjust.
8312 (initialize_low_arch): New function.
8313 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8314 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8315 (target_regsets): Rename to ...
8316 (xtensa_regsets): ... this, and make static.
8317 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8319 (xtensa_arch_setup, xtensa_regs_info): New functions.
8320 (the_low_target): Adjust.
8321 (initialize_low_arch): New function.
8322 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8323 (nios2_arch_setup): Set the current process'es tdesc.
8324 (target_regsets): Rename to ...
8325 (nios2_regsets): ... this.
8326 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8327 (nios2_regs_info): New function.
8328 (the_low_target): Adjust.
8329 (initialize_low_arch): New function.
8330 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8331 (aarch64_arch_setup): Set the current process'es tdesc.
8332 (target_regsets): Rename to ...
8333 (aarch64_regsets): ... this.
8334 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8335 (aarch64_regs_info): New function.
8336 (the_low_target): Adjust.
8337 (initialize_low_arch): New function.
8338 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8340 (target_regsets): Rename to ...
8341 (tile_regsets): ... this.
8342 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8343 (tile_regs_info): New function.
8344 (tile_arch_setup): Set the current process'es tdesc.
8345 (the_low_target): Adjust.
8346 (initialize_low_arch): New function.
8347 * spu-low.c (tdesc_spu): Declare.
8348 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8349 * win32-arm-low.c (tdesc_arm): Declare.
8350 (arm_arch_setup): New function.
8351 (the_low_target): Install arm_arch_setup instead of
8353 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8354 (init_windows_x86): Rename to ...
8355 (i386_arch_setup): ... this. Set `win32_tdesc'.
8356 (the_low_target): Adjust.
8357 * win32-low.c (win32_tdesc): New global.
8358 (child_add_thread): Don't create the thread cache here.
8359 (do_initial_child_stuff): Set the new process'es tdesc.
8360 * win32-low.h (struct target_desc): Forward declare.
8361 (win32_tdesc): Declare.
8362 * lynx-i386-low.c (tdesc_i386): Declare global.
8363 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8364 * lynx-low.c (lynx_tdesc): New global.
8365 (lynx_add_process): Set the new process'es tdesc.
8366 * lynx-low.h (struct target_desc): Forward declare.
8367 (lynx_tdesc): Declare global.
8368 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8369 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8370 * nto-low.c (nto_tdesc): New global.
8371 (do_attach): Set the new process'es tdesc.
8372 * nto-low.h (struct target_desc): Forward declare.
8373 (nto_tdesc): Declare.
8374 * nto-x86-low.c (tdesc_i386): Declare.
8375 (nto_x86_arch_setup): Set `nto_tdesc'.
8377 2013-06-04 Gary Benson <gbenson@redhat.com>
8379 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8380 to qSupported response when appropriate.
8381 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8382 with nonzero-length annex.
8383 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8384 arguments supplied in annex.
8386 2013-05-31 Doug Evans <dje@google.com>
8389 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8390 64 bits in 64-cross-32 environment.
8392 2013-05-28 Pedro Alves <palves@redhat.com>
8394 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8395 (aarch64-without-fpu.c): Delete rule.
8396 * configure.srv (aarch64*-*-linux*): Remove references to
8397 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8398 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8401 2013-05-24 Pedro Alves <palves@redhat.com>
8403 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8404 instead of strchr/decode_address. Error if the range isn't split
8405 with a ','. Don't assume there's be a ':' in the action.
8407 2013-05-23 Yao Qi <yao@codesourcery.com>
8408 Pedro Alves <palves@redhat.com>
8410 * linux-low.c (lwp_in_step_range): New function.
8411 (linux_wait_1): If the thread was range stepping and stopped
8412 outside the stepping range, report the stop to GDB. Otherwise,
8413 continue stepping. Add range stepping debug output.
8414 (linux_set_resume_request): Copy the step range from the resume
8416 (linux_supports_range_stepping): New.
8417 (linux_target_ops) <supports_range_stepping>: Set to
8418 linux_supports_range_stepping.
8419 * linux-low.h (struct linux_target_ops)
8420 <supports_range_stepping>: New field.
8421 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8422 * linux-x86-low.c (x86_supports_range_stepping): New.
8423 (the_low_target) <supports_range_stepping>: Set to
8424 x86_supports_range_stepping.
8425 * server.c (handle_v_cont): Handle 'r' action.
8426 (handle_v_requests): Append ";r" if the target supports range
8428 * target.h (struct thread_resume) <step_range_start,
8429 step_range_end>: New fields.
8430 (struct target_ops) <supports_range_stepping>:
8432 (target_supports_range_stepping): New macro.
8434 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8436 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8437 confusion in comment.
8439 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8441 * lynx-low.c (struct process_info_private): New type.
8442 (lynx_add_process): New function.
8443 (lynx_create_inferior, lynx_attach): Replace calls to
8444 add_process by calls to lynx_add_process.
8445 (lynx_resume): If PTID is null, then try using
8446 current_process()->private->last_wait_event_ptid.
8448 (lynx_clear_inferiors): Delete. The contents of that function
8449 has been inlined in lynx_mourn;
8450 (lynx_wait_1): Save the ptid in the process's private data.
8451 (lynx_mourn): Free the process' private data. Replace call
8452 to lynx_clear_inferiors by call to clear_inferiors.
8454 2013-05-17 Yao Qi <yao@codesourcery.com>
8456 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8459 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8461 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8462 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8463 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8464 PT_TEXT_END_ADDR guards. Update comments.
8465 (linux_target_op) <read_offsets>: Conditionally define to
8466 linux_read_offsets if the target is UCLIBC and if it defines
8467 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8469 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8470 Andrew Jenner <andrew@codesourcery.com>
8472 * Makefile.in (SFILES): Add linux-nios2-low.c.
8473 (clean): Add action to delete nios2-linux.c.
8474 (nios2-linux.c): New rule.
8475 * configure.srv: Add nios2*-*-linux*.
8476 * linux-nios2-low.c: New.
8478 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8480 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8482 2013-04-25 Hui Zhu <hui@codesourcery.com>
8485 * ax.c (ax_printf): Add fflush.
8487 2013-04-22 Tom Tromey <tromey@redhat.com>
8489 * Makefile.in (SFILES): Add filestuff.c.
8490 (OBS): Add filestuff.o.
8491 (filestuff.o): New target.
8492 * config.in, configure: Rebuild.
8493 * configure.ac: Check for fdwalk, pipe2.
8495 2013-04-17 Pedro Alves <palves@redhat.com>
8497 * configure.ac (USE_THREAD_DB): Delete variable.
8498 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8499 Don't AC_SUBST USE_THREAD_DB.
8500 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8501 * config.in, configure: Regenerate.
8503 2013-04-16 Pedro Alves <palves@redhat.com>
8505 * linux-low.h (struct lwp_info) <thread_known>: Move under
8506 the USE_THREAD_DB #ifdef.
8508 2013-04-16 Pedro Alves <palves@redhat.com>
8510 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8511 (linux-low.o): Delete rule.
8512 * linux-low.h: Always include "gdb_thread_db.h" instead of
8513 conditionally including thread_db.h.
8514 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8517 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8519 * Makefile.in (install-only): Fix make install regression.
8521 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8523 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8524 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8526 * gdbserver.1: Remove.
8528 2013-03-22 Pedro Alves <palves@redhat.com>
8530 * linux-low.c (handle_extended_wait): Don't call
8531 linux_enable_event_reporting.
8533 2013-03-15 Tony Theodore <tonyt@logyst.com>
8536 * Makefile.in (SHELL): Use @SHELL@.
8538 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8540 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8543 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8545 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8546 Remove extraneous NULL element.
8548 2013-03-13 Yao Qi <yao@codesourcery.com>
8550 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8551 'V' block in trace frame.
8553 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8555 * target.h (struct target_ops): Add btrace ops.
8556 (target_supports_btrace): New macro.
8557 (target_enable_btrace): New macro.
8558 (target_disable_btrace): New macro.
8559 (target_read_btrace): New macro.
8560 * gdbthread.h (struct thread_info): Add btrace field.
8561 * server.c: Include btrace-common.h.
8562 (handle_btrace_general_set): New function.
8563 (handle_btrace_enable): New function.
8564 (handle_btrace_disable): New function.
8565 (handle_general_set): Call handle_btrace_general_set.
8566 (handle_qxfer_btrace): New function.
8567 (struct qxfer qxfer_packets[]): Add btrace entry.
8568 * inferiors.c (remove_thread): Disable btrace.
8569 * linux-low: Include linux-btrace.h.
8570 (linux_low_enable_btrace): New function.
8571 (linux_low_read_btrace): New function.
8572 (linux_target_ops): Add btrace ops.
8573 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8574 Add srv_linux_btrace=yes.
8575 (x86_64-*-linux*): Add linux-btrace.o.
8576 Add srv_linux_btrace=yes.
8577 * configure.ac: Define HAVE_LINUX_BTRACE.
8578 * config.in: Regenerated.
8579 * configure: Regenerated.
8581 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8583 * server.c (handle_qxfer): Preserve error message if -3 is
8585 (qxfer): Document the -3 return value.
8587 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8589 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8590 (linux_btrace_h): New variable.
8591 (linux-btrace.o): New rule.
8593 2013-03-08 Stan Shebs <stan@codesourcery.com>
8594 Hafiz Abid Qadeer <abidh@codesourcery.com>
8596 * tracepoint.c (trace_buffer_size): New global.
8597 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8598 (init_trace_buffer): Change to one-argument function. Allocate
8599 trace buffer memory.
8600 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8601 handle QTBuffer:size packet.
8602 (cmd_bigqtbuffer_size): New function.
8603 (initialize_tracepoint): Call init_trace_buffer with
8604 DEFAULT_TRACE_BUFFER_SIZE.
8605 * server.c (handle_query): Add QTBuffer:size in the
8608 2013-03-07 Yao Qi <yao@codesourcery.com>
8610 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8611 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8613 (cmd_qtsp): Adjust condition. Do post increment.
8614 Set cur_action and cur_step_action back to 0.
8616 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8619 * linux-low.c (linux_write_memory): Return early success if LEN is
8622 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8624 * configure.srv: Add x86_64-*-cygwin* as target.
8626 2013-02-28 Tom Tromey <tromey@redhat.com>
8628 * configure.ac: Invoke AC_SYS_LARGEFILE.
8629 * configure, config.in: Rebuild.
8631 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8633 * win32-low.c: Throughout, fix format strings and casts of
8634 printf-like functions to avoid type related warnings on all
8636 (get_child_debug_event): Print dwDebugEventCode as hex since
8637 that's how it's usually documented.
8639 2013-02-28 Yao Qi <yao@codesourcery.com>
8641 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8644 2013-02-27 Jiong Wang <jiwang@tilera.com>
8646 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8647 (reg-tilegx32.c): New rule.
8648 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8649 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8650 different register info initializer according to elf class.
8651 (init_registers_tilgx32): New function. The tilegx32 register info
8653 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8654 (tile_store_gregset): Likewise.
8656 2013-02-27 Yao Qi <yao@codesourcery.com>
8658 * server.c (process_point_options): Print debug message when
8659 debug_threads is true.
8661 2013-02-26 Yao Qi <yao@codesourcery.com>
8663 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8665 2013-02-19 Pedro Alves <palves@redhat.com>
8666 Kai Tietz <ktietz@redhat.com>
8670 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8671 instead of strtoul to extract address from packet.
8672 (process_serial_event) <'z'>: Likewise.
8674 2013-02-18 Yao Qi <yao@codesourcery.com>
8676 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8678 2013-02-14 Pedro Alves <palves@redhat.com>
8682 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8683 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8685 2013-02-14 Pedro Alves <palves@redhat.com>
8687 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8689 2013-02-14 Pedro Alves <palves@redhat.com>
8691 * tracepoint.c (save_string): Delete.
8692 (add_tracepoint_action): Use savestring instead of save_string.
8694 2013-02-12 Pedro Alves <palves@redhat.com>
8696 * linux-xtensa-low.c: Ditto.
8697 * xtensa-xtregs.c: Ditto.
8699 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8701 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8704 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8706 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8707 aarch64_num_wp_regs and aarch64_num_bp_regs to
8708 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8710 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8712 * linux-aarch64-low.c (ps_get_thread_area): Replace
8713 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8715 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8716 Marcus Shawcroft <marcus.shawcroft@arm.com>
8717 Nigel Stephens <nigel.stephens@arm.com>
8718 Yufeng Zhang <yufeng.zhang@arm.com>
8720 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8721 (aarch64.c, aarch64-without-fpu.c): New targets.
8722 * configure.srv (aarch64*-*-linux*): New.
8723 * linux-aarch64-low.c: New file.
8725 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8727 * linux-low.c (handle_extended_wait, linux_create_inferior)
8728 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8729 (dequeue_one_deferred_signal, linux_resume_one_thread)
8730 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8731 (linux_tracefork_grandchild, linux_test_for_tracefork)
8732 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8733 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8734 where the argument is 0.
8736 2013-01-25 Yao Qi <yao@codesourcery.com>
8738 * event-loop.c: Include "queue.h".
8739 (gdb_event_p): New typedef.
8740 (struct gdb_event) <next_event>: Remove.
8741 (event_queue): Change to QUEUE(gdb_event_p).
8742 (async_queue_event): Remove.
8743 (gdb_event_xfree): New.
8744 (initialize_event_loop): New.
8745 (process_event): Use API from QUEUE.
8746 (wait_for_event): Likewise.
8747 * server.c (main): Call initialize_event_loop.
8748 * server.h (initialize_event_loop): Declare.
8750 2013-01-18 Yao Qi <yao@codesourcery.com>
8752 * ax.h (struct eval_agent_expr_context): New.
8753 (gdb_eval_agent_expr): Update declaration.
8754 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8755 TFRAME. Add new argument CTX.
8756 * server.h (struct eval_agent_expr_context): Declare.
8757 (agent_mem_read, agent_tsv_read): Update declaration.
8758 (agent_mem_read_string): Likewise.
8759 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8760 (add_traceframe_block): Add new argument TPOINT.
8761 Increase TPOINT->traceframe_usage.
8762 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8763 eval_tracepoint_agent_expr.
8764 (condition_true_at_tracepoint): Likewise.
8765 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8766 (agent_mem_read_string, agent_tsv_read): Likewise.
8768 2013-01-16 Yao Qi <yao@codesourcery.com>
8770 * linux-low.c (linux_resume_one_lwp): Don't check
8771 'lwp->bp_reinsert != 0'.
8773 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8774 Pedro Alves <palves@redhat.com>
8776 * lynx-low.c (ptrace_request_to_str): Define a temporary
8777 macro and use it to simplify this function's implementation.
8779 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8781 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8784 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8786 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8788 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8790 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8792 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8794 * lynx-low.c (lynx_resume): Use the resume_info parameter
8795 to determine the ptid for the lynx_ptrace call, unless
8796 it is equal to minus_one_ptid, in which case we use the
8797 ptid of the current_inferior.
8798 (lynx_wait_1): After having received a thread create/exit
8799 event, resume the inferior's execution using the signaling
8800 thread's ptid, rather than the old ptid.
8802 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8804 * lynx-low.c (lynx_resume): Delete variable ret.
8806 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8808 * gdbreplay.c (gdbreplay_version): Update copyright year.
8809 * server.c (gdbserver_version): Likewise.
8811 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8813 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8816 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8818 * lynx-low.c (ptrace_request_to_str): Add handling for
8821 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8823 * lynx-low.c (lynx_attach): Delete variable new_process.
8825 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8827 * lynx-low.c (lynx_create_inferior): Delete variable
8830 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8832 * lynx-low.c (ptrace_request_to_str): Do not handle
8833 PTRACE_GETTHREADLIST if this macro does not exist.
8835 2012-12-15 Yao Qi <yao@codesourcery.com>
8837 * Makefile.in (OBS): Add notif.o.
8838 * notif.c, notif.h: New.
8839 * server.c: Include "notif.h".
8840 (struct vstop_notif) <next>: Remove.
8842 (queue_stop_reply): Update.
8843 (push_event, send_next_stop_reply): Remove.
8844 (discard_queued_stop_replies): Update.
8845 (notif_stop): New variable.
8846 (handle_v_stopped): Remove.
8847 (handle_v_requests): Don't call handle_v_stopped. Call
8848 handle_ack_notif instead.
8849 (queue_stop_reply_callback): Call notif_event_enque instead
8850 of queue_stop_reply.
8851 (handle_status): Don't call send_next_stop_reply, call
8852 notif_write_event instead.
8853 (kill_inferior_callback): Likewise.
8854 (detach_or_kill_inferior_callback): Likewise.
8855 (main): Call initialize_notif.
8856 (process_serial_event): Call QUEUE_is_empty.
8857 (handle_target_event): Call notif_push instead of push event.
8858 * server.h (push_event): Remove declaration.
8860 2012-12-10 Tom Tromey <tromey@redhat.com>
8862 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8863 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8866 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8867 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8868 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8869 (amd64-linux-ipa.o, ax.o): Rewrite.
8870 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8871 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8872 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8873 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8874 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8875 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8876 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8877 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8878 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8879 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8880 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8881 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8882 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8883 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8884 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8885 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8886 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8887 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8888 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8889 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8890 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8891 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8892 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8893 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8894 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8895 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8896 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8897 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8898 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8899 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8900 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8901 (reg-tilegx.o): Remove.
8902 (all_object_files): New macro.
8903 Include .deps files.
8904 * aclocal.m4, configure: Rebuild.
8905 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8906 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8907 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8909 2012-12-05 Tom Tromey <tromey@redhat.com>
8912 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8914 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8916 * configure.ac: Check for linux/perf_event.h.
8917 * config.in: Regenerated.
8918 * configure: Regenerated.
8920 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8922 * hostio.c (handle_readlink): Decrease buffer size
8923 parameter passed to readlink by one byte.
8925 2012-11-26 Yao Qi <yao@codesourcery.com>
8927 * configure.ac (build_warnings): Append '-Wempty-body'.
8928 * configure: Regenerated.
8929 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8932 2012-11-15 Pierre Muller <muller@sourceware.org>
8934 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8935 * config.in: Regenerate.
8936 * configure: Regenerate.
8937 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8938 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8939 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8940 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8942 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8943 instead of <sys/wait.h> header.
8944 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8946 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8948 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8949 (various make rules): Remove -DGDBSERVER
8951 2012-11-09 Yao Qi <yao@codesourcery.com>
8953 * spu-low.c (current_ptid): Move it to ..
8954 * gdbthread.h: ... here. New.
8955 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8956 * server.c (myresume, process_serial_event): Likewise.
8957 * thread-db.c (thread_db_find_new_threads): Likewise.
8958 * tracepoint.c (run_inferior_command): Likewise.
8960 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8962 * server.c (handle_search_memory_1): Include access length in
8965 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8967 * linux-crisv32-low.c: Fix compile errors.
8969 2012-09-04 Yao Qi <yao@codesourcery.com>
8971 * tracepoint.c (cmd_qtsv): Adjust debug message.
8972 Don't check CUR_TPOINT.
8974 2012-08-28 Yao Qi <yao@codesourcery.com>
8976 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8977 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8978 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8979 Remove declarations of xmalloc, xreallloc, xstrdup and
8981 * Makefile.in (libiberty_h): New.
8982 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8983 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8985 2012-08-23 Yao Qi <yao@codesourcery.com>
8987 * server.h: Remove declaration of 'xsnprintf'.
8989 2012-08-22 Keith Seitz <keiths@redhat.com>
8991 * server.h: Include build-gnulib-gbserver/config.h.
8992 * gdbreplay.c: Likewise.
8994 2012-08-08 Doug Evans <dje@google.com>
8996 * Makefile.in (SFILES): Add gdb_vecs.c.
8997 (OBS): Add gdb_vecs.o.
8998 (gdb_vecs_h, host_defs_h): New variables.
8999 (thread-db.o): Add $(gdb_vecs_h) dependency.
9000 (gdb_vecs.o): New rule.
9001 * thread-db.c: #include "gdb_vecs.h".
9002 (thread_db_load_search): Use a vector to iterate over path elements.
9003 Handle text appearing after "$pdir".
9005 * configure.ac: Add check for strstr.
9006 * config.in: Regenerate.
9007 * configure: Regenerate.
9009 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9011 * hostio.c (handle_pread): If pread fails, fall back to attempting
9013 (handle_pwrite): Likewise for pwrite.
9015 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9017 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9018 between unsupported TYPE and unimplementable ADDR/LEN combination.
9019 (arm_insert_point): Act on new return value.
9021 2012-07-31 Pedro Alves <palves@redhat.com>
9023 * server.c (process_point_options): Only skip tokens if we find
9024 one that is unrecognized. Don't treat 'X' specially while
9025 skipping unrecognized tokens.
9027 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9029 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9030 to 4-byte-align HW breakpoint addresses for Thumb.
9032 2012-07-27 Yao Qi <yao@codesourcery.com>
9036 * server.h: Declare gdb_agent_about_to_close.
9037 * target.c (kill_inferior): Include "agent.h".
9038 New. Send command 'kill'.
9039 * target.h (kill_inferior): Removed macro.
9040 * tracepoint.c (gdb_agent_about_to_close): New.
9041 (gdb_agent_helper_thread): Handle command 'close'.
9042 Wait endlessly until the inferior stops.
9043 Install gdb_agent_remove_socket to atexit hook.
9044 (agent_socket_name): New static variable.
9045 (gdb_agent_socket_init): Replace local variable 'name' with
9046 'agent_socket_name'.
9047 (gdb_agent_remove_socket): New.
9049 2012-07-27 Yao Qi <yao@codesourcery.com>
9051 * server.c (process_point_options): Stop at 'X' when parsing.
9053 2012-07-19 Michael Eager <eager@eagercon.com>
9055 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9057 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9058 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9059 hardware breakpoint.
9061 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9063 * gdbserver/linux-low.c (initialize_low): Call
9064 linux_ptrace_init_warnings.
9066 2012-07-02 Doug Evans <dje@google.com>
9068 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9071 2012-07-02 Stan Shebs <stan@codesourcery.com>
9073 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9074 (ax.o): Add it to build rule.
9076 (OBS): Add format.o.
9077 (IPA_OBS): Add format.o.
9078 * server.c (handle_query): Claim support for breakpoint commands.
9079 (process_point_options): Add command case.
9080 (process_serial_event): Leave running if there are printfs in
9082 * mem-break.h (any_persistent_commands): Declare.
9083 (add_breakpoint_commands): Declare.
9084 (gdb_no_commands_at_breakpoint): Declare.
9085 (run_breakpoint_commands): Declare.
9086 * mem-break.c (struct point_command_list): New struct.
9087 (struct breakpoint): New field command_list.
9088 (any_persistent_commands): New function.
9089 (add_commands_to_breakpoint): New function.
9090 (add_breakpoint_commands): New function.
9091 (gdb_no_commands_at_breakpoint): New function.
9092 (run_breakpoint_commands): New function.
9093 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9095 * ax.c: Include format.h.
9096 (ax_printf): New function.
9097 (gdb_eval_agent_expr): Add printf opcode.
9099 2012-06-13 Yao Qi <yao@codesourcery.com>
9101 * server.c (start_inferior): Remove duplicated writes to fields
9102 'last_resume_kind' and 'last_status' of 'current_inferior'.
9104 2012-06-12 Yao Qi <yao@codesourcery.com>
9105 Pedro Alves <palves@redhat.com>
9107 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9109 * server.c (handle_v_cont): Extend comment.
9111 2012-06-11 Yao Qi <yao@codesourcery.com>
9113 * linux-low.c (linux_attach): Add 'static'.
9115 2012-06-06 Yao Qi <yao@codesourcery.com>
9117 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9119 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9121 Fix gcc -flto compilation warning.
9122 * server.c (main): Make variable multi_mode and attach volatile.
9124 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9126 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9127 if the platform doesn't know about it.
9129 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9131 * Makefile.in (SFILES): Add linux-tile-low.c.
9132 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9133 * configure.srv: Handle tilegx-*-linux*.
9134 * linux-tile-low.c: New file.
9136 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9138 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9140 2012-05-24 Pedro Alves <palves@redhat.com>
9144 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9146 2012-05-24 Pedro Alves <palves@redhat.com>
9150 Replace target_signal with gdb_signal throughout.
9152 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9154 * linux-low.c (linux_store_registers): Avoid the copying sequence
9155 when no data has been retrieved by ptrace.
9157 2012-05-22 Will Deacon <will.deacon@arm.com>
9159 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9160 Include asm/ptrace.h.
9161 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9164 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9166 * linux-low.c (linux_store_registers): Don't re-retrieve data
9167 with ptrace that has already been obtained from /proc. Always
9168 copy any data retrieved with ptrace to the buffer supplied.
9170 2012-05-11 Yao Qi <yao@codesourcery.com>
9171 Pedro Alves <palves@redhat.com>
9173 * linux-low.c (enum stopping_threads_kind): New.
9174 (stopping_threads): Change type to `enum stopping_threads_kind'.
9175 (handle_extended_wait): If stopping and suspending threads, leave
9176 the new_lwp suspended too.
9177 (linux_wait_for_event): Adjust.
9178 (stop_all_lwps): Set `stopping_threads' to
9179 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9180 whether we're suspending threads or just stopping them. Assert no
9183 2012-04-29 Yao Qi <yao@codesourcery.com>
9185 * server.h: Move some code to ...
9186 * gdbthread.h: ... here. New.
9187 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9188 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9189 (nto-low.o, win32-low.o): Likewise.
9190 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9191 * regcache.c, remote-utils.c, server.c: Likewise.
9192 * target.c, tracepoint.c, win32-low.c: Likewise.
9194 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9196 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9197 (PTRACE_ARG4_TYPE): Likewise.
9198 (PTRACE_XFER_TYPE): Likewise.
9199 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9200 ptrace to PTRACE_ARG3_TYPE.
9201 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9202 (PTRACE_ARG4_TYPE): Likewise.
9203 (PTRACE_XFER_TYPE): Likewise.
9204 (linux_detach_one_lwp): Cast fourth argument of
9205 ptrace to long then PTRACE_ARG4_TYPE.
9206 (regsets_fetch_inferior_registers): Cast third argument of
9207 ptrace to long then PTRACE_ARG3_TYPE.
9208 (regsets_store_inferior_registers): Likewise.
9210 2012-04-20 Pedro Alves <palves@redhat.com>
9212 * configure: Regenerate.
9214 2012-04-19 Pedro Alves <palves@redhat.com>
9216 * Makefile.in (GNULIB_BUILDDIR): New.
9217 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9218 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9219 (all, install-only, uninstall, clean-info, all-lib, clean): No
9220 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9221 (maintainer-clean realclean distclean): Use subdir_do.
9223 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9224 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9225 * acinclude.m4: Include acx_configure_dir.m4.
9226 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9227 calls. Call AC_PROG_RANLIB. Configure gnulib using
9230 (GNULIB_STDINT_H): Adjust.
9231 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9232 * gdbreplay.c: Include build-gnulib/config.h.
9233 * server.h: Likewise.
9234 * aclocal.m4: Regenerate.
9235 * config.in: Regenerate.
9236 * configure: Regenerate.
9238 2012-04-19 Pedro Alves <palves@redhat.com>
9240 * Makefile.in (LIBGNU, INCGNU): Adjust.
9241 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9242 (all, install-only, uninstall, clean-info, all-lib, clean)
9243 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9244 * configure.ac: Adjust AC_OUTPUT output.
9245 * aclocal.m4: Regenerate.
9246 * configure: Regenerate.
9248 2012-04-19 Pedro Alves <palves@redhat.com>
9250 * Makefile.in (generated_files): New.
9251 (server_h): Remove the explicit dependency on config.h, and depend
9252 on $generated_files.
9254 2012-04-19 Pedro Alves <palves@redhat.com>
9256 * Makefile.in (INCGNU): Add -Ignulib.
9258 2012-04-19 Pedro Alves <palves@redhat.com>
9260 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9261 (INCGNU): ... this, and spell out -I here.
9262 (GNULIB_LIB): Rename to ...
9264 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9266 2012-04-19 Pedro Alves <palves@redhat.com>
9268 * config.in: Regenerate.
9270 2012-04-19 Pedro Alves <palves@redhat.com>
9272 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9273 * server.h (memmem): Remove declaration.
9274 * config.in: Regenerate.
9275 * configure: Regenerate.
9277 2012-04-19 Yao Qi <yao@codesourcery.com>
9279 * Makefile.in (SFILES): Add common/vec.c.
9283 2012-04-19 Yao Qi <yao@codesourcery.com>
9285 * remote-utils.c (prepare_resume_reply): Replace with macro
9286 target_core_of_thread.
9287 * server.c (handle_qxfer_threads_proper): Likewise.
9288 * target.h (traget_core_of_thread): New macro.
9290 2012-04-18 Pedro Alves <palves@redhat.com>
9292 * aclocal.m4: Regenerate.
9293 * configure: Regenerate.
9295 2012-04-16 Yao Qi <yao@codesourcery.com>
9297 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9298 duplicated on address.
9300 2012-04-16 Yao Qi <yao@codesourcery.com>
9302 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9303 (struct tracepoint_action_ops) <send>: New field.
9304 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9305 (agent_expr_send, x_tracepoint_action_send): New.
9306 (l_tracepoint_action_send): New.
9307 (cmd_qtdp): Download and install tracepoint
9308 according to `use_agent'.
9309 (run_inferior_command): Add one more parameter `len'.
9311 (tracepoint_send_agent): New.
9312 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9314 2012-04-16 Yao Qi <yao@codesourcery.com>
9316 * tracepoint.c (download_tracepoints): Moved to ...
9317 (cmd_qtstart): ... here.
9319 2012-04-14 Yao Qi <yao@codesourcery.com>
9321 * tracepoint.c: Include inttypes.h.
9322 (struct collect_memory_action): Use sized types.
9323 (struct tracepoint): Likewise.
9324 (cmd_qtdp, stop_tracing): Update print specifiers.
9325 (cmd_qtp, response_tracepoint): Likewise.
9326 (collect_data_at_tracepoint): Likewise.
9327 (collect_data_at_step): Likewise.
9329 2012-04-14 Yao Qi <yao@codesourcery.com>
9331 Import gnulib module inttypes.
9332 * aclocal.m4, config.in, configure: Regenerated.
9334 2012-04-14 Yao Qi <yao@codesourcery.com>
9336 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9337 Makefile and config.status at last.
9339 2012-04-13 Yao Qi <yao@codesourcery.com>
9341 * tracepoint.c: Include stdint.h unconditionally.
9343 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9345 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9346 on BFD_HAVE_SYS_PROCFS_TYPE.
9347 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9348 * configure: Regenerate.
9349 * config.in: Likewise.
9351 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9353 * Makefile.in (clean): Also remove x32.c x32-linux.c
9354 x32-avx.c x32-avx-linux.c.
9355 (x32.o): New target.
9357 (x32-linux.o): Likewise.
9358 (x32-linux.c): Likewise.
9359 (x32-avx.o): Likewise.
9360 (x32-avx.c): Likewise.
9361 (x32-avx-linux.o): Likewise.
9362 (x32-avx-linux.c): Likewise.
9364 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9365 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9366 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9367 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9368 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9369 i386/x32-avx-linux.xml.
9371 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9372 (init_registers_x32_avx_linux): Likwise.
9373 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9374 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9376 2012-04-13 Pedro Alves <palves@redhat.com>
9378 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9379 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9380 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9381 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9384 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9386 * linux-x86-low.c (compat_x32_clock_t): New.
9387 (compat_x32_siginfo_t): Likewise.
9388 (compat_x32_siginfo_from_siginfo): Likewise.
9389 (siginfo_from_compat_x32_siginfo): Likewise.
9390 (linux_is_elf64): Likewise.
9391 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9392 and siginfo_from_compat_x32_siginfo for x32.
9393 (x86_arch_setup): Set linux_is_elf64.
9395 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9398 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9400 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9401 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9402 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9403 compatible with process.
9405 2012-04-12 Yao Qi <yao@codesourcery.com>
9407 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9408 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9409 (install-only, install-info, clean): Handle sub dir gnulib.
9410 (all-lib, am--refresh): New targets.
9411 (memmem.o): Remove target.
9412 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9413 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9414 (AC_REPLACE_FUNCS): Remove memmem.
9415 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9416 (AC_OUTPUT): Generate Makefile in gnulib/.
9417 * aclocal.m4, config.in, configure: Regenerated.
9419 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9421 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9423 2012-04-05 Pedro Alves <palves@redhat.com>
9425 -Werror=strict-aliasing
9427 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9430 2012-04-04 Pedro Alves <palves@redhat.com>
9432 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9433 (sparc_store_gregset_from_stack, sparc_store_gregset)
9434 (sparc_breakpoint_at): Fix formatting.
9436 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9438 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9440 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9441 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9442 * config.in: Regenerate.
9443 * configure: Likewise.
9445 2012-03-29 Pedro Alves <palves@redhat.com>
9447 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9448 Correct ptrace arguments.
9450 2012-03-28 Pedro Alves <palves@redhat.com>
9452 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9453 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9454 (IA64_FR1_REGNUM): New defines.
9455 (ia64_fetch_register): New.
9456 (the_low_target): Install it.
9457 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9459 * linux-low.c (linux_fetch_registers): Try the
9460 the_low_target.fetch_register hook first.
9462 * linux-arm-low.c (the_low_target): Adjust.
9463 * linux-bfin-low.c (the_low_target): Adjust.
9464 * linux-cris-low.c (the_low_target): Adjust.
9465 * linux-crisv32-low.c (the_low_target): Adjust.
9466 * linux-m32r-low.c (the_low_target): Adjust.
9467 * linux-m68k-low.c (the_low_target): Adjust.
9468 * linux-mips-low.c (the_low_target): Adjust.
9469 * linux-ppc-low.c (the_low_target): Adjust.
9470 * linux-s390-low.c (the_low_target): Adjust.
9471 * linux-sh-low.c (the_low_target): Adjust.
9472 * linux-sparc-low.c (the_low_target): Adjust.
9473 * linux-tic6x-low.c (the_low_target): Adjust.
9474 * linux-x86-low.c (the_low_target): Adjust.
9475 * linux-xtensa-low.c (the_low_target): Adjust.
9477 2012-03-26 Pedro Alves <palves@redhat.com>
9479 * server.c (handle_qxfer_libraries): Don't bail early if
9480 the_target->qxfer_libraries_svr4 is not NULL.
9482 2012-03-26 Pedro Alves <palves@redhat.com>
9484 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9486 2012-03-23 Pedro Alves <palves@redhat.com>
9488 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9489 "library-list-svr4" element's start tag when the the DSO list is
9492 2012-03-23 Pedro Alves <palves@redhat.com>
9494 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9495 a variable whose type size is the same as the inferior's pointer
9498 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9500 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9502 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9503 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9504 * linux-low.h: Include <signal.h>.
9505 (struct siginfo): Remove forward declaration.
9506 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9509 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9511 * .gitignore: Ignore more files.
9513 2012-03-19 Pedro Alves <palves@redhat.com>
9514 Jan Kratochvil <jan.kratochvil@redhat.com>
9516 * server.c (cont_thread, general_thread): Add describing comments.
9517 (start_inferior): Clear `cont_thread'.
9518 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9521 2012-03-15 Yao Qi <yao@codesourcery.com>
9523 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9525 (cmd_qtdp): ... here.
9527 2012-03-15 Yao Qi <yao@codesourcery.com>
9529 * tracepoint.c (struct tracepoint_action_ops): New.
9530 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9531 (m_tracepoint_action_download): New.
9532 (r_tracepoint_action_download): New.
9533 (x_tracepoint_action_download): New.
9534 (l_tracepoint_action_download): New.
9535 (add_tracepoint_action): Install `action->ops' according type.
9536 (download_tracepoint_1): Move code `download' function pointer
9537 of various tracepoint_action_ops.
9539 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9541 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9542 linux_ptrace_attach_warnings.
9544 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9546 * Makefile.in (linux-ptrace.o): New.
9547 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9548 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9549 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9550 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9551 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9553 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9555 2012-03-08 Yao Qi <yao@codesourcery.com>
9556 Pedro Alves <palves@redhat.com>
9558 Fix PR server/13392.
9559 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9561 * tracepoint.c (remove_tracepoint): New.
9562 (cmd_qtdp): Call remove_tracepoint when failed to install.
9564 2012-03-07 Pedro Alves <palves@redhat.com>
9566 * linux-low.c (get_detach_signal): New.
9567 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9568 Pass on pending signals to PTRACE_DETACH. Check the result of the
9570 * server.c (program_signals, program_signals_p): New.
9571 (handle_general_set): Handle QProgramSignals.
9572 * server.h (program_signals, program_signals_p): Declare.
9574 2012-03-05 Pedro Alves <palves@redhat.com>
9575 Jan Kratochvil <jan.kratochvil@redhat.com>
9577 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9580 2012-03-03 Yao Qi <yao@codesourcery.com>
9582 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9583 agent_look_up_symbols.
9585 2012-03-03 Yao Qi <yao@codesourcery.com>
9587 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9588 (linux-x86-low.o): Likewise.
9589 * server.h: Remove in_process_agent_loaded.
9590 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9594 2012-03-03 Yao Qi <yao@codesourcery.com>
9596 * tracepoint.c (gdb_agent_capability): New global.
9597 (in_process_agent_loaded_ust): Renamed to
9598 `in_process_agent_supports_ust'.
9600 (in_process_agent_supports_ust): Call agent_capability_check.
9601 (clear_installed_tracepoints): Assert that agent supports
9604 2012-03-03 Yao Qi <yao@codesourcery.com>
9606 * linux-low.c (linux_supports_agent): New.
9607 (linux_target_ops): Initialize field `supports_agent' with
9608 linux_supports_agent.
9609 * target.h (struct target_ops) <supports_agent>: New.
9610 (target_supports_agent): New macro.
9611 * server.c (handle_general_set): Handle packet 'QAgent'.
9612 (handle_query): Send `QAgent+'.
9613 * Makefile.in (server.o): Depends on agent.h.
9615 2012-03-03 Yao Qi <yao@codesourcery.com>
9617 * Makefile.in (OBS): Add agent.o.
9618 Add new rule for agent.o.
9619 Track dependence of tracepoint.c on agent.h.
9620 * tracepoint.c (run_inferior_command_1):
9621 (run_inferior_command): Call agent_run_command.
9622 (gdb_ust_connect_sync_socket): Deleted. Move it to
9624 (resume_thread, stop_thread): Likewise.
9625 (gdb_ust_socket_init): Renamed to ...
9626 (gdb_agent_socket_init): ... New.
9627 (gdb_ust_thread): Renamed to ...
9628 (gdb_agent_helper_thread): ... New.
9629 (gdb_ust_init): Move some code to ...
9630 (gdb_agent_init): ... here. New.
9631 [HAVE_UST]: Call gdb_ust_init.
9632 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9633 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9634 * config.in, configure: Regenerated.
9636 2012-03-02 Pedro Alves <palves@redhat.com>
9638 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9639 * linux-low.c (struct simple_pid_list): New.
9640 (stopped_pids): New a struct simple_pid_list pointer.
9641 (add_to_pid_list, pull_pid_from_list): New.
9642 (handle_extended_wait): Don't assume the first signal new children
9643 report is SIGSTOP. Adjust call to pull_pid_from_list.
9644 (linux_wait_for_lwp): Adjust.
9646 2012-03-02 Yao Qi <yao@codesourcery.com>
9648 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9651 2012-03-02 Yao Qi <yao@codesourcery.com>
9653 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9654 `stop_pc' and `tpoint'. Update caller.
9656 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9658 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9659 * linux-low.c (use_linux_regsets): New macro.
9660 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9661 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9662 (linux_register_in_regsets): New function.
9663 (usr_fetch_inferior_registers): Skip registers covered by
9665 (usr_store_inferior_registers): Likewise.
9666 (usr_fetch_inferior_registers): New macro.
9667 (usr_store_inferior_registers): Likewise.
9668 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9669 (linux_store_registers): Likewise.
9670 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9672 (init_registers_mips64_dsp_linux): Likewise.
9673 (init_registers_mips_linux): New macro.
9674 (init_registers_mips_dsp_linux): Likewise.
9675 (mips_dsp_num_regs): Likewise.
9676 (DSP_BASE, DSP_CONTROL): New fallback macros.
9677 (mips_base_regs): New macro.
9678 (mips_regmap): Use it. Fix the size.
9679 (mips_dsp_regmap): New variable.
9680 (mips_dsp_regset_bitmap): Likewise.
9681 (mips_arch_setup): New function.
9682 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9684 (mips_cannot_store_register): Likewise.
9685 (the_low_target): Update .arch_setup, .num_regs and .regmap
9686 initializers. Add .regset_bitmap initializer.
9687 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9689 * linux-bfin-low.c (the_low_target): Likewise.
9690 * linux-cris-low.c (the_low_target): Likewise.
9691 * linux-crisv32-low.c (the_low_target): Likewise.
9692 * linux-ia64-low.c (the_low_target): Likewise.
9693 * linux-m32r-low.c (the_low_target): Likewise.
9694 * linux-m68k-low.c (the_low_target): Likewise.
9695 * linux-ppc-low.c (the_low_target): Likewise.
9696 * linux-s390-low.c (the_low_target): Likewise.
9697 * linux-sh-low.c (the_low_target): Likewise.
9698 * linux-sparc-low.c (the_low_target): Likewise.
9699 * linux-tic6x-low.c (the_low_target): Likewise.
9700 * linux-x86-low.c (the_low_target): Likewise.
9701 * linux-xtensa-low.c (the_low_target): Likewise.
9702 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9703 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9704 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9706 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9707 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9709 2012-02-29 Yao Qi <yao@codesourcery.com>
9710 Pedro Alves <palves@redhat.com>
9712 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9713 `step_over_finished' is true.
9715 2012-02-27 Pedro Alves <palves@redhat.com>
9717 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9718 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9720 2012-02-27 Pedro Alves <palves@redhat.com>
9723 * linux-low.c (pid_is_stopped): New.
9724 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9726 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9728 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9731 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9733 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9735 2012-02-24 Luis Machado <lgustavo@codesourcery>
9737 * server.c (handle_query): Advertise support for target-side
9738 breakpoint condition evaluation.
9739 (process_point_options): New function.
9740 (process_serial_event): When inserting a breakpoint, check for
9741 a target-side condition that should be evaluated.
9743 * mem-break.c: Include regcache.h and ax.h.
9744 (point_cond_list_t): New data structure.
9745 (breakpoint) <cond_list>: New field.
9746 (find_gdb_breakpoint_at): Make non-static.
9747 (delete_gdb_breakpoint_at): Clear any target-side
9749 (clear_gdb_breakpoint_conditions): New function.
9750 (add_condition_to_breakpoint): Likewise.
9751 (add_breakpoint_condition): Likewise.
9752 (gdb_condition_true_at_breakpoint): Likewise.
9753 (gdb_breakpoint_here): Return result directly instead
9754 of going through a local variable.
9756 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9757 (clear_gdb_breakpoint_conditions): Likewise.
9758 (add_breakpoint_condition): Likewise.
9759 (gdb_condition_true_at_breakpoint): Likewise.
9761 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9762 (need_step_over_p): Take target-side breakpoint condition into
9765 2012-02-24 Luis Machado <lgustavo@codesourcery>
9767 * server.h: Include tracepoint.h.
9768 (agent_mem_read, agent_get_trace_state_variable_value,
9769 agent_set_trace_state_variable_value,
9770 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9771 get_set_tsv_func_addr): New prototypes.
9773 * ax.h: New include file.
9774 * ax.c: New source file.
9776 * tracepoint.c: Include ax.h.
9777 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9778 agent_expr, eval_result_type): Move to ax.h.
9779 (parse_agent_expr): Rename to ...
9780 (gdb_parse_agent_expr): ... this, make it non-static and move
9782 (unparse_agent_expr) Rename to ...
9783 (gdb_unparse_agent_expr): ... this, make it non-static and move
9785 (eval_agent_expr): Rename to ...
9786 (eval_tracepoint_agent_expr): ... this.
9787 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9788 forward declarations.
9789 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9790 (agent_get_trace_state_variable_value): New function.
9791 (agent_set_trace_state_variable_value): New function.
9792 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9793 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9794 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9795 (condition_true_at_tracepoint): Likewise.
9796 (parse_agent_expr): Rename to ...
9797 (gdb_parse_agent_expr): ... this and move to ax.c.
9798 (unparse_agent_expr): Rename to ...
9799 (gdb_unparse_agent_expr): ... this and move to ax.c.
9800 (gdb_agent_op_name): Move to ax.c.
9801 (eval_agent_expr): Rename to ...
9802 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9804 (eval_tracepoint_agent_expr): New function.
9805 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9807 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9809 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9810 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9811 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9812 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9813 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9814 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9815 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9816 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9817 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9818 (compile_bytecodes): Remove forward declaration.
9819 (is_goto_target): Move to ax.c.
9820 (compile_bytecodes): Move to ax.c and call
9821 agent_get_trace_state_variable_value (...) and
9822 agent_set_trace_state_variable_value (...).
9824 * Makefile.in: Update ax.c and IPA dependencies.
9826 2012-02-24 Pedro Alves <palves@redhat.com>
9828 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9829 (cmd_bigqtbuffer_circular): ... this. Only handle
9830 'QTBuffer:circular:'.
9831 (handle_tracepoint_general_set): Adjust.
9833 2012-02-16 Yao Qi <yao@codesourcery.com>
9835 * inferiors.c: Move code to ...
9836 * dll.c: .... here. New.
9837 * server.h: Declare clear_dlls.
9838 * Makefile.in (SFILES): Add dll.c.
9842 2012-02-11 Yao Qi <yao@codesourcery.com>
9844 * server.c: (handle_monitor_command): Add a new parameter
9846 (handle_query): Update caller.
9848 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9850 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9851 * configure, config.in: Regenerate.
9852 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9855 2012-02-02 Pedro Alves <palves@redhat.com>
9857 Try SIGKILL first, then PTRACE_KILL.
9858 * linux-low.c (linux_kill_one_lwp): New.
9859 (linux_kill_one_lwp): Rename to ...
9860 (kill_one_lwp_callback): ... this. Use the new
9863 2012-02-02 Pedro Alves <palves@redhat.com>
9865 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9868 2012-01-27 Pedro Alves <palves@redhat.com>
9870 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9871 (elf_64_file_p): Make static.
9872 (linux_pid_exe_is_elf_64_file): New.
9873 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9874 Delete declarations.
9875 (linux_pid_exe_is_elf_64_file): Declare.
9876 * linux-x86-low.c (x86_arch_setup): Use
9877 linux_pid_exe_is_elf_64_file.
9879 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9881 * linux-low.c (linux_wait_for_event_1): Rename to ...
9882 (linux_wait_for_event): ... here and merge it with former
9883 linux_wait_for_event - new variable wait_ptid, use it.
9884 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9886 2012-01-23 Pedro Alves <palves@redhat.com>
9888 * server.c (main): Avoid yet another case of infinite loop while
9889 detaching/killing after a longjmp.
9891 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9894 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9896 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9898 * hostio.c (handle_readlink): New function.
9899 (handle_vFile): Call it to handle "vFile:readlink" packets.
9901 2012-01-20 Pedro Alves <palves@redhat.com>
9902 Ulrich Weigand <ulrich.weigand@linaro.org>
9904 * server.c (handle_v_requests): Only support vAttach and vRun to
9905 start multiple processes when in extended protocol mode.
9907 2012-01-17 Pedro Alves <palves@redhat.com>
9909 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9910 memalign plus mprotect to allocate the scratch buffer.
9912 2012-01-13 Pedro Alves <palves@redhat.com>
9914 * server.c (attach_inferior): Clear `cont_thread'.
9916 2012-01-13 Pedro Alves <palves@redhat.com>
9918 * server.c (main): Avoid infinite loop while detaching/killing
9921 2012-01-09 Doug Evans <dje@google.com>
9923 * server.c (start_inferior): Set last_ptid in --wrapper case.
9925 2012-01-06 Yao Qi <yao@codesourcery.com>
9927 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9929 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9931 2012-01-04 Yao Qi <yao@codesourcery.com>
9933 * tracepoint.c (cmd_qtdp): Print debug message
9934 for static tracepoint.
9936 2012-01-04 Yao Qi <yao@codesourcery.com>
9938 * tracepoint.c (trace_vdebug): Differentiate debug message
9939 between gdbserver and IPA.
9941 2012-01-03 Yao Qi <yao@codesourcery.com>
9943 * tracepoint.c (tracepoint_was_hit): Don't collect for
9946 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9948 * terminal.h: Reformat copyright header.
9950 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9952 * server.c (gdbserver_version): Update copyright year.
9953 * gdbreplay.c (gdbreplay_version): Likewise.
9955 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9957 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9960 2011-12-18 Hui Zhu <teawater@gmail.com>
9961 * linux-low.c (linux_create_inferior): Save return value to ret.
9963 2011-12-18 Hui Zhu <teawater@gmail.com>
9965 * linux-low.c (linux_create_inferior): Save return value to ret.
9967 2011-12-16 Doug Evans <dje@google.com>
9969 * linux-low.c (linux_create_inferior): If stdio connection,
9970 redirect stdin from /dev/null, stdout to stderr.
9971 * remote-utils.c (remote_is_stdio): New static global.
9972 (remote_connection_is_stdio): New function.
9973 (remote_prepare): Handle stdio connection.
9974 (remote_open): Ditto.
9975 (remote_close): Don't close stdin for stdio connections.
9976 (read_prim,write_prim): New functions. Replace all calls to
9977 read/write to these.
9978 * server.c (main): Watch for "-" argument. Move call to
9979 remote_prepare before start_inferior.
9980 * server.h (STDIO_CONNECTION_NAME): New macro.
9981 (remote_connection_is_stdio): Declare.
9983 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9984 in debugging output.
9986 2011-12-15 Yao Qi <yao@codesourcery.com>
9988 * tracepoint.c: Include sys/syscall.h.
9989 (gdb_ust_thread): Remove preprocessor conditional.
9991 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9993 * linux-low.c (linux_detach_one_lwp): Call
9994 the_low_target.prepare_to_resume before detaching.
9996 2011-12-14 Yao Qi <yao@codesourcery.com>
9998 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10001 2011-12-14 Yao Qi <yao@codesourcery.com>
10003 * i386-low.c (i386_low_stopped_data_address): Initialize local
10004 variable `control'.
10006 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10010 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10011 DR_CONTROL unless necessary. Extend comments.
10012 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10013 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10015 2011-12-13 Yao Qi <yao@codesourcery.com>
10017 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10019 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10021 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10023 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10024 Print new debug message for such case.
10026 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10028 Fix overlapping memcpy.
10029 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10030 the read_inferior_memory transfer.
10031 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10032 write_inferior_memory transfer.
10033 (set_fast_tracepoint_jump): New variable buf. Use it for the
10034 read_inferior_memory and write_inferior_memory transfers.
10035 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10036 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10037 Use it for the write_inferior_memory transfer.
10038 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10041 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10043 * linux-low.c (fetch_register, store_register): Make code
10044 consistent, fix formatting.
10046 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10048 * linux-low.c (usr_store_inferior_registers): Factor out code
10049 to handle individual registers into...
10050 (store_register): ... this new function.
10052 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10054 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10055 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10056 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10057 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10058 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10059 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10060 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10061 (srv_xmlfiles): Add new XML files.
10063 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10065 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10066 (init_registers_s390_linux32v1): Add prototype.
10067 (init_registers_s390_linux32v2): Likewise.
10068 (init_registers_s390_linux64v1): Likewise.
10069 (init_registers_s390_linux64v2): Likewise.
10070 (init_registers_s390x_linux64v1): Likewise.
10071 (init_registers_s390x_linux64v2): Likewise.
10072 (s390_num_regs): Increment to 52.
10073 (s390_regmap): Add orig_r2 register.
10074 (s390_num_regs_3264): Increment to 68.
10075 (s390_regmap_3264): Add orig_r2 register.
10076 (s390_collect_ptrace_register): Handle orig_r2 register.
10077 (s390_supply_ptrace_register): Likewise.
10078 (s390_fill_last_break): New function.
10079 (s390_store_last_break): Likewise.
10080 (s390_fill_system_call): New function.
10081 (s390_store_system_call): Likewise.
10082 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10084 (s390_check_regset): New function.
10085 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10086 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10087 Update target_regsets for available register sets.
10089 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10090 Jan Kratochvil <jan.kratochvil@redhat.com>
10092 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10093 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10095 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10096 * linux-low.h (struct process_info_private): New member r_debug.
10097 * server.c (handle_qxfer_libraries): Call
10098 the_target->qxfer_libraries_svr4.
10099 (handle_qxfer_libraries_svr4): New function.
10100 (qxfer_packets): New entry "libraries-svr4".
10101 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10102 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10103 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10104 PACKET_qXfer_libraries_svr4.
10106 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10108 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10109 PSW address/mask between 8-byte and 16-byte formats.
10110 (s390_supply_ptrace_register): Likewise.
10111 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10112 basic addressing mode bit.
10114 2011-11-24 Stan Shebs <stan@codesourcery.com>
10116 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10118 2011-11-17 Stan Shebs <stan@codesourcery.com>
10120 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10121 (tracing_start_time): New global.
10122 (tracing_stop_time): New global.
10123 (tracing_user_name): New global.
10124 (tracing_notes): New global.
10125 (tracing_stop_note): New global.
10126 (cmd_qtstart): Set traceframe_usage, start_time.
10127 (stop_tracing): Set stop_time.
10128 (cmd_qtstatus): Report additional status.
10129 (cmd_qtp): New function.
10130 (handle_tracepoint_query): Call it.
10131 (cmd_qtnotes): New function.
10132 (handle_tracepoint_general_set): Call it.
10133 (get_timestamp): Rename from tsv_get_timestamp.
10135 2011-11-14 Stan Shebs <stan@codesourcery.com>
10136 Kwok Cheung Yeung <kcy@codesourcery.com>
10138 * linux-x86-low.c (small_jump_insn): New.
10139 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10140 trampoline and error message, build a trampoline and issue a small
10141 jump instruction to it.
10142 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10143 trampoline and error message.
10144 (x86_get_min_fast_tracepoint_insn_len): New.
10145 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10146 * linux-low.h (struct linux_target_ops): Add arguments to
10147 install_fast_tracepoint_jump_pad operation, add new operation.
10148 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10150 (linux_get_min_fast_tracepoint_insn_len): New function.
10151 (linux_target_op): Add new operation.
10152 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10153 (gdb_trampoline_buffer_end): Ditto.
10154 (gdb_trampoline_buffer_error): Ditto.
10155 (struct ipa_sym_addresses): Add fields for new IPA variables.
10156 (symbol_list): Add entries for new IPA variables.
10157 (struct tracepoint): Add fields to hold the address range of the
10158 trampoline used by the tracepoint.
10159 (trampoline_buffer_head): New static variable.
10160 (trampoline_buffer_tail): Ditto.
10161 (claim_trampoline_space): New function.
10162 (have_fast_tracepoint_trampoline_buffer): New function.
10163 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10165 (install_fast_tracepoint): Ditto, also add error buffer argument.
10166 (cmd_qtminftpilen): New function.
10167 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10168 (fast_tracepoint_from_trampoline_address): New function.
10169 (fast_tracepoint_collecting): Handle trampoline as part of jump
10171 (set_trampoline_buffer_space): New function.
10172 (initialize_tracepoint): Initialize new IPA variables.
10173 * target.h (struct target_ops): Add arguments to
10174 install_fast_tracepoint_jump_pad operation, add new
10175 get_min_fast_tracepoint_insn_len operation.
10176 (target_get_min_fast_tracepoint_insn_len): New.
10177 (install_fast_tracepoint_jump_pad): Add arguments.
10178 * server.h (IPA_BUFSIZ): Define.
10179 * linux-i386-ipa.c: Include extra header files.
10180 (initialize_fast_tracepoint_trampoline_buffer): New function.
10181 (initialize_low_tracepoint): Call it.
10182 * server.h (set_trampoline_buffer_space): Declare.
10183 (claim_trampoline_space): Ditto.
10184 (have_fast_tracepoint_trampoline_buffer): Ditto.
10186 2011-11-14 Yao Qi <yao@codesourcery.com>
10188 * server.c (handle_query): Handle InstallInTrace for qSupported.
10189 * tracepoint.c (add_tracepoint): Sort list.
10190 (install_tracepoint, download_tracepoint): New.
10191 (cmd_qtdp): Call them to install and download tracepoints.
10192 (sort_tracepoints): Removed.
10193 (cmd_qtstart): Update.
10195 2011-11-14 Yao Qi <yao@codesourcery.com>
10197 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10198 * mem-break.h: Declare.
10199 * tracepoint.c (cmd_qtstart): Move some code to ...
10200 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10202 (download_tracepoints): Move some code to ...
10203 (download_tracepoint_1): ... here. New.
10205 2011-11-08 Yao Qi <yao@codesourcery.com>
10207 * remote-utils.c (relocate_instruction): A comment fix.
10209 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10211 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10212 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10213 dr_status_mirror and dr_control_mirror from debug_reg_state.
10214 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10215 (i386_initial_stuff): Remove use of deleted globals.
10216 (i386_get_thread_context, i386_set_thread_context,
10217 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10218 from debug_reg_state.
10220 2011-11-05 Yao Qi <yao@codesourcery.com>
10222 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10223 address as TPOINT's.
10225 2011-11-02 Stan Shebs <stan@codesourcery.com>
10227 * tracepoint.c (agent_mem_read_string): New function.
10228 (eval_agent_expr): Call it for tracenz.
10229 * server.c (handle_query): Report support for tracenz.
10231 2011-11-02 Yao Qi <yao@codesourcery.com>
10233 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10235 2011-11-02 Yao Qi <yao@codesourcery.com>
10237 * target.h: Fix a typo in comment.
10239 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10241 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10242 clobber the breakpoints' shadows with fast tracepoint jumps.
10243 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10244 * target.c (write_inferior_memory): Also pass MYADDR down to
10247 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10249 * configure.ac: Check support for personality routine.
10250 * configure: Regenerate.
10251 * config.in: Likewise.
10252 * linux-low.c: Include <sys/personality.h>.
10253 Define ADDR_NO_RANDOMIZE if necessary.
10254 (linux_create_inferior): Disable address space randomization when
10255 forking inferior, if requested.
10256 (linux_supports_disable_randomization): New function.
10257 (linux_target_ops): Install it.
10258 * server.h (disable_randomization): Declare.
10259 * server.c (disable_randomization): New global variable.
10260 (handle_general_set): Handle QDisableRandomization.
10261 (handle_query): Likewise for qSupported.
10262 (main): Support --disable-randomization and --no-disable-randomization
10263 command line arguments.
10264 * target.h (struct target_ops): Add supports_disable_randomization.
10265 (target_supports_disable_randomization): New macro.
10267 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10269 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10271 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10272 [!PT_GETDSBT] (target_loadmap): New definition.
10273 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10274 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10275 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10276 and PT_GETDSBT to LINUX_LOADMAP.
10277 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10278 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10280 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10282 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10283 (arm_linux_hwbp_cap): New static variable.
10284 (arm_linux_get_hwbp_cap): Replace by ...
10285 (arm_linux_init_hwbp_cap): ... this new function.
10286 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10287 (arm_linux_get_hw_watchpoint_count): Likewise.
10288 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10289 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10290 (arm_prepare_to_resume): Use perror_with_name instead of error.
10292 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10294 * linux-arm-low.c: Include <signal.h>.
10295 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10296 (struct arm_linux_hwbp_cap): New data type.
10297 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10298 (struct arm_linux_hw_breakpoint): New data type.
10299 (MAX_BPTS, MAX_WPTS): Define.
10300 (struct arch_process_info, struct arch_lwp_info): New data types.
10301 (arm_linux_get_hwbp_cap): New function.
10302 (arm_linux_get_hw_breakpoint_count): Likewise.
10303 (arm_linux_get_hw_watchpoint_count): Likewise.
10304 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10305 (arm_hwbp_control_initialize): Likewise.
10306 (arm_hwbp_control_is_enabled): Likewise.
10307 (arm_hwbp_control_is_initialized): Likewise.
10308 (arm_hwbp_control_disable): Likewise.
10309 (arm_linux_hw_breakpoint_equal): Likewise.
10310 (arm_linux_hw_point_initialize): Likewise.
10311 (struct update_registers_data): New data structure.
10312 (update_registers_callback: New function.
10313 (arm_insert_point): Likewise.
10314 (arm_remove_point): Likewise.
10315 (arm_stopped_by_watchpoint): Likewise.
10316 (arm_stopped_data_address): Likewise.
10317 (arm_new_process): Likewise.
10318 (arm_new_thread): Likewise.
10319 (arm_prepare_to_resume): Likewise.
10320 (the_low_target): Register arm_insert_point, arm_remove_point,
10321 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10322 arm_new_thread, and arm_prepare_to_resume.
10324 2011-09-15 Stan Shebs <stan@codesourcery.com>
10326 * server.h (struct emit_ops): Add compare-goto fields.
10327 * tracepoint.c (gdb_agent_op_sizes): New table.
10328 (emit_eq_goto): New function.
10329 (emit_ne_goto): New function.
10330 (emit_lt_goto): New function.
10331 (emit_le_goto): New function.
10332 (emit_gt_goto): New function.
10333 (emit_ge_goto): New function.
10334 (is_goto_target): New function.
10335 (compile_bytecodes): Recognize special cases of compare-goto
10336 combinations and call specialized emitters for them.
10337 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10338 (amd64_emit_ne_goto): New function.
10339 (amd64_emit_lt_goto): New function.
10340 (amd64_emit_le_goto): New function.
10341 (amd64_emit_gt_goto): New function.
10342 (amd64_emit_ge_goto): New function.
10343 (amd64_emit_ops): Add the new functions.
10344 (i386_emit_eq_goto): New function.
10345 (i386_emit_ne_goto): New function.
10346 (i386_emit_lt_goto): New function.
10347 (i386_emit_le_goto): New function.
10348 (i386_emit_gt_goto): New function.
10349 (i386_emit_ge_goto): New function.
10350 (i386_emit_ops): Add the new functions.
10352 2011-09-08 Stan Shebs <stan@codesourcery.com>
10354 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10355 (i386_emit_epilogue): Restore %ebx.
10357 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10359 * server.c (step_thread): Remove definition.
10360 (process_serial_event): Don't handle Hs.
10361 * server.h (step_thread): Remove declaration.
10362 * target.c (set_desired_inferior): Remove use of step_thread.
10364 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10366 * linux-low.c: Include linux-procfs.h.
10367 (linux_attach_lwp_1): Update comments.
10368 (linux_attach): Scan for existing threads when attaching to a
10369 process that is the tgid.
10370 * Makefile.in: Update dependencies.
10372 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10374 * configure.srv: Add linux-procfs.o dependencies.
10376 2011-08-14 Yao Qi <yao@codesourcery.com>
10378 * target.h (struct target_ops): Fix indent.
10379 * win32-low.c (win32_target_ops): Fix comment.
10381 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10382 Yao Qi <yao@codesourcery.com>
10384 * Makefile.in (clean): Remove tic6x-*.c files.
10385 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10386 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10387 (tic6x-c64xp-linux.c): Likewise.
10388 * configure.srv: Add support for tic6x-*-uclinux.
10389 * linux-tic6x-low.c: New.
10390 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10392 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10393 Yao Qi <yao@codesourcery.com>
10395 * target.h (struct target_ops): Add read_loadmap.
10396 * linux-low.c (struct target_loadseg): New type.
10397 (struct target_loadmap): New type.
10398 (linux_read_loadmap): New function.
10399 (linux_target_ops): Add linux_read_loadmap.
10400 * server.c (handle_query): Support qXfer:fdpic:read packet.
10401 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10404 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10406 * win32-low.c: Include <stdint.h>.
10408 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10410 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10411 to the inferior here.
10412 (i386_remove_aligned_watchpoint): Ditto.
10413 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10414 fit part of the watchpoint in the debug registers.
10415 (i386_update_inferior_debug_regs): New.
10416 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10417 registers, and only update the inferior on success.
10418 (i386_low_remove_watchpoint): Ditto.
10420 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10422 * linux-low.c (compare_ints, unique, list_threads, show_process,
10423 linux_core_of_thread): Delete.
10424 (linux_target_ops): Change linux_core_of_thread to
10425 linux_common_core_of_thread.
10426 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10427 * utils.c (malloc_failure): Change type of argument.
10428 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10429 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10430 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10431 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10432 (IPA_OBJS): Add common-utils-ipa.o.
10433 (ptid_h, linux_osdata_h): New macros.
10434 (server_h): Add common/common-utils.h, common/xml-utils.h,
10435 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10437 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10438 ptid.o, buffer.o): New rules.
10439 (linux-low.o): Add common/linux-osdata.h as a dependency.
10440 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10441 * configure.ac: Add AC_HEADER_DIRENT check.
10442 * config.in: Regenerate.
10443 * configure: Regenerate.
10444 * remote-utils.c (xml_escape_text): Delete.
10445 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10446 buffer_xml_printf): Move to common/buffer.c.
10447 * server.c (main): Remove call to initialize_inferiors.
10448 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10449 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10450 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10451 internal_error, gdb_assert, gdb_assert_fail): Delete.
10452 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10453 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10455 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10456 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10457 initialize_inferiors): Delete.
10459 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10461 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10464 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10466 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10468 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10470 2011-05-26 Yao Qi <yao@codesourcery.com>
10472 * Makefile.in (thread-db.o): Track dependence to
10473 common/gdb_thread_db.h.
10474 * thread-db.c: include gdb_thread_db.h from right place.
10476 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10478 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10479 __FILE__ and __LINE__ to internal_error.
10481 2011-05-13 Doug Evans <dje@google.com>
10483 * thread-db.c (try_thread_db_load_from_sdir): New function.
10484 (try_thread_db_load_from_dir): New function.
10485 (thread_db_load_search): Handle $sdir, ignore $pdir.
10486 Remove trying of system directories if search of
10487 libthread-db-search-path fails, that is now done via $sdir.
10489 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10491 * server.c (handle_query): Add EnableDisableTracepoints to the list
10492 of supported features.
10493 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10495 (cmd_qtenable_disable): New.
10496 (cmd_qtstart): Install tracepoints even if disabled.
10497 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10498 receiving a QTEnable or QTDisable packet.
10499 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10500 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10502 (gdb_probe): Skip data collection if static tracepoint is disabled.
10504 2011-05-10 Doug Evans <dje@google.com>
10506 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10508 2011-05-04 Doug Evans <dje@google.com>
10510 * linux-low.c (linux_join): Skip process lookup.
10511 * spu-low.c (spu_join): Ditto.
10512 * server.c (join_inferiors_callback): Delete.
10513 (process_serial_event): For 'D' packet (detach) call join_inferior
10516 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10518 * README: Don't mention xscale*-*-linux*.
10519 * configure.srv (xscale*-*-linux*): Don't handle target.
10521 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10523 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10525 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10526 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10527 (i386_emit_void_call_2): Likewise.
10529 2011-04-26 Yao Qi <yao@codesourcery.com>
10531 * linux-low.c: Move common macros to linux-ptrace.h.
10532 Include linux-ptrace.h.
10533 * Makefile.in (linux_ptrace_h): New.
10534 (linux-low.o): Depends on linux-ptrace.h.
10536 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10538 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10539 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10540 (remote_prepare): New function with most of the TCP code from ...
10541 (remote_open): ... here. Detect PORT here unconditionally. Move also
10542 setting transport_is_reliable.
10543 * server.c (run_once): New variable.
10544 (gdbserver_usage): Document it.
10545 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10546 the first run if RUN_ONCE.
10547 * server.h (run_once, remote_prepare): New declarations.
10549 2011-04-19 Tom Tromey <tromey@redhat.com>
10551 * win32-low.c (handle_load_dll): Remove duplicate "the".
10553 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10555 Remove support for old Cygwin 1.5 versions.
10556 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10557 function to avoid warning.
10558 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10561 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10563 * gdbserver/server.h (Macro _): Define it if not available.
10565 2011-03-14 Michael Snyder <msnyder@vmware.com>
10567 * hostio.c (handle_close): Remove unnecessary null test.
10569 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10571 * Makefile.in (maintainer-clean realclean distclean): Remove
10572 "make ... subdir_do" command.
10574 2011-03-10 Michael Snyder <msnyder@vmware.com>
10576 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10578 * server.c (handle_v_run): Free alloced buffer on early return.
10580 2011-03-09 Yao Qi <yao@codesourcery.com>
10583 2011-03-04 Yao Qi <yao@codesourcery.com>
10585 * Makefile.in: Remove GNU make feature --directory.
10587 2011-03-05 Yao Qi <yao@codesourcery.com>
10589 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10590 (subdir_do): New make target. Copied from gdb/Makefile.
10591 (maintainer-clean, realclean, distclean, clean): Call corresponding
10592 make targets in common/Makefile.
10594 2011-02-11 Yao Qi <yao@codesourcery.com>
10596 * configure.ac: Call AC_PROG_RANLIB.
10597 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10598 * configure: Regenerate.
10600 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10602 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10604 2011-03-06 Yao Qi <yao@codesourcery.com>
10606 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10608 2011-03-05 Yao Qi <yao@codesourcery.com>
10610 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10611 (subdir_do): New make target. Copied from gdb/Makefile.
10612 (maintainer-clean, realclean, distclean, clean): Call corresponding
10613 make targets in common/Makefile.
10615 2011-03-04 Yao Qi <yao@codesourcery.com>
10617 * Makefile.in: Remove GNU make feature --directory.
10619 2011-03-04 Michael Snyder <msnyder@vmware.com>
10621 * server.c (queue_stop_reply): Call xmalloc not malloc.
10623 2011-03-02 Michael Snyder <msnyder@vmware.com>
10625 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10627 2011-02-28 Michael Snyder <msnyder@vmware.com>
10629 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10630 (cmd_qtframe): Ditto.
10631 (cmd_qtbuffer): Ditto.
10632 (cmd_bigqtbuffer): Ditto.
10634 * utils.c (decimal2str): Initialize 'width' to nine, then
10635 don't mess with it.
10637 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10639 * hostio.c (require_data): Free *data, not data.
10641 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10643 * hostio.c (require_data): Use free, not xfree.
10645 2011-02-27 Michael Snyder <msnyder@vmware.com>
10647 * server.c (handle_query): Discard unused value.
10649 * hostio.c (require_data): Free malloc memory before returning
10652 2011-02-26 Michael Snyder <msnyder@vmware.com>
10654 * linux-low.c (list_threads): Call closedir for dirent.
10656 2011-02-27 Michael Snyder <msnyder@vmware.com>
10658 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10659 a case statement falls through.
10661 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10663 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10666 2011-02-26 Michael Snyder <msnyder@vmware.com>
10668 * utils.c (decimal2str): Eliminate dead code and dead param.
10669 (pulongest): Drop dead param from call to decimal2str.
10672 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10674 Revert the following patch (not approved yet):
10675 2011-02-21 Hui Zhu <teawater@gmail.com>
10676 * tracepoint.c (tp_printf): New function.
10677 (eval_agent_expr): Handle gdb_agent_op_printf.
10679 2011-02-21 Hui Zhu <teawater@gmail.com>
10681 * tracepoint.c (tp_printf): New function.
10682 (eval_agent_expr): Handle gdb_agent_op_printf.
10684 2011-02-18 Tom Tromey <tromey@redhat.com>
10686 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10687 (tracepoint.o): Likewise.
10688 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10689 (gdb_agent_op_names): Likewise.
10691 2011-02-18 Tom Tromey <tromey@redhat.com>
10693 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10694 gdb_agent_op_rot>: New constants.
10695 (gdb_agent_op_names): Add pick and roll.
10696 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10699 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10701 * aclocal.m4: Regenerated with aclocal-1.11.1.
10703 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10705 * server.c (handle_qxfer_traceframe_info): New.
10706 (qxfer_packets): Register "traceframe-info".
10707 (handle_query): Report support for qXfer:traceframe-info:read+.
10708 * tracepoint.c (match_blocktype): New.
10709 (traceframe_find_block_type): Rename to ...
10710 (traceframe_walk_blocks): ... this. Add callback filter argument,
10712 (traceframe_find_block_type): New, reimplemented on top of
10713 traceframe_walk_blocks.
10714 (build_traceframe_info_xml): New.
10715 (traceframe_read_info): New.
10716 * server.h (traceframe_read_info): Declare.
10718 2011-02-11 Yao Qi <yao@codesourcery.com>
10720 * configure.ac: Call AC_PROG_RANLIB.
10721 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10722 * configure: Regenerate.
10724 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10726 * server.c (gdb_read_memory): Change return semantics to allow
10728 (handle_search_memory_1): Adjust.
10729 (process_serial_event) <'m' packet>: Handle partial transfers.
10730 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10732 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10734 * regcache.c (init_register_cache): Initialize
10735 regcache->register_status.
10736 (free_register_cache): Release regcache->register_status.
10737 (regcache_cpy): Copy register_status.
10738 (registers_to_string): Print 'x's for unavailable registers.
10739 (supply_register): Mark the register's status valid or
10740 unavailable, depending on whether a buffer was passed in or not.
10741 (supply_register_zeroed): New.
10742 (supply_regblock): Mark the registers' status valid or
10743 unavailable, depending on whether a buffer was passed in or not.
10744 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10745 (struct regcache): New `register_status' field.
10746 (supply_register_zeroed): Declare.
10747 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10748 supply_register_zeroed, rather than passing a NULL buffer to
10750 * tracepoint.c (fetch_traceframe_registers): Update comment.
10752 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10754 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10757 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10759 * server.h (decode_xfer_write): Change prototype.
10760 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10761 and don't extract the annex here.
10762 * server.c (decode_xfer_read): Remove `annex' parameter,
10763 and don't extract the annex here.
10764 (decode_xfer): New.
10765 (struct qxfer): New.
10766 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10767 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10768 (handle_qxfer_statictrace): New functions, abstracted out from
10769 handle_query, and made to use the struct qxfer interface.
10770 (handle_threads_qxfer_proper): Rename to ...
10771 (handle_qxfer_threads_proper): ... this.
10772 (handle_threads_qxfer): Rename to ...
10773 (handle_qxfer_threads): ... this. Adjust.
10774 (qxfer_packets): New array.
10775 (handle_qxfer): New function.
10776 (handle_query): Use handle_qxfer.
10778 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10780 * gdbreplay.c: Shorten lines of >= 80 columns.
10781 * linux-low.c: Ditto.
10782 * linux-ppc-low.c: Ditto.
10783 * linux-s390-low.c: Ditto.
10784 * linux-sparc-low.c: Ditto.
10785 * linux-x86-low.c: Ditto.
10786 * linux-xtensa-low.c: Ditto.
10787 * mem-break.c: Ditto.
10788 * nto-low.c: Ditto.
10789 * regcache.h: Ditto.
10790 * remote-utils.c: Ditto.
10793 * thread-db.c: Ditto.
10794 * tracepoint.c: Ditto.
10796 * win32-low.h: Ditto.
10798 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10800 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10803 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10805 * server.c (gdbserver_version): Update copyright year in version
10807 * gdbreplay.c (gdbreplay_version): Ditto.
10809 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10811 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10812 * linux-bfin-low.c: New file.
10813 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10814 PT_DATA_ADDR for BFIN targets.
10815 * Makefile.in (SFILES): Add linux-bfin-low.c.
10816 (clean): Remove reg-bfin.c.
10817 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10818 * README: Mention supported Blackfin targets.
10820 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10822 * .gitignore: New file.
10824 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10826 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10828 2010-10-22 Jie Zhang <jie@codesourcery.com>
10830 * Makefile.in: Add FLAGS_TO_PASS variable.
10831 (install): Remove dependency of install-only and recursively
10832 invoke make for install-only.
10834 2010-10-04 Doug Evans <dje@google.com>
10836 * Makefile.in (uninstall): Use $(DESTDIR).
10838 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10842 * linux-x86-low.c (compat_siginfo_from_siginfo)
10843 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10844 si_code is < 0. Check for si_code == SI_TIMER before checking for
10847 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10849 * lynx-i386-low.c: New file.
10850 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10852 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10854 * lynx-low.c (ptrace_request_to_str): Remove handling for
10855 request values that have been removed in LynxOS 5.x.
10857 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10859 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10862 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10864 * configure.ac: Add --enable-inprocess-agent option.
10865 * configure: Rebuilt.
10867 2010-09-06 Yao Qi <yao@codesourcery.com>
10869 * linux-low.c (linux_kill): Remove unused variable.
10870 (linux_stabilize_threads): Likewise.
10871 * server.c (start_inferior): Likewise.
10872 (queue_stop_reply_callback): Likewise.
10873 * tracepoint.c (do_action_at_tracepoint): Likewise.
10875 2010-09-06 Yao Qi <yao@codesourcery.com>
10877 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10880 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10882 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10884 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10886 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10889 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10891 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10892 gdbserver/lynx-ppc-low.c: New files.
10893 * Makefile.in (lynx_low_h): New variable.
10894 (lynx-low.o, lynx-ppc-low.o): New rules.
10895 * configure.ac: On LynxOS, link with -lnetinet.
10896 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10897 * configure: regenerate.
10899 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10901 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10902 * configure.ac: Add check for vasprintf and vsnprintf.
10903 * configure, config.in: Regenerate.
10904 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10906 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10908 * gdbreplay.c: Move include of alloca.h up, next to include of
10910 * server.h: Add include of malloc.h.
10911 * mem-break.c: Remove include of malloc.h.
10912 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10914 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10916 * Makefile.in (memmem.o): Build with -Wno-error.
10918 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10920 * utils.c (xsnprintf): Make non-static.
10921 * server.h: Add xsnprintf declaration.
10922 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10923 replace calls to snprintf by calls to xsnprintf throughout.
10925 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10927 * configure.ac: Add configure check for alloca.
10928 * configure, config.in: Regenerate.
10929 * server.h: Include alloca.h if it exists.
10930 * gdbreplay.c: Include alloca.h if it exists.
10932 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10934 * linux-low.c (__SIGRTMIN): Define if not already defined.
10935 (linux_create_inferior): Check for __ANDROID__ rather than
10937 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10938 are already deferred.
10939 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10940 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10941 stopped and already has a pending signal to report.
10942 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10943 a pending signal to report or is moving out of a jump pad.
10944 (linux_init_signals): Check for __ANDROID__ rather than
10947 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10949 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10950 debug_threads check. Avoid a linear search when not doing debug
10953 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10955 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10956 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10957 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10958 (process_event): Change local fd's type to gdb_fildes_t.
10959 (create_file_handler): Adjust prototype.
10960 (delete_file_handler): Adjust prototype.
10961 (handle_file_event): Adjust prototype. Use pfildes.
10962 (create_file_event): Adjsut prototype.
10963 * remote-utils.c (remote_desc, listen_desc): Change type to
10965 * server.h: New gdb_fildes_t typedef.
10966 [USE_WIN32API]: Include winsock2.h.
10967 (delete_file_handler, add_file_handler): Adjust prototypes.
10968 (pfildes): Declare.
10969 * utils.c (pfildes): New.
10971 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10973 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10974 * configure: Regenerate.
10976 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10978 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10979 (linux_done_accessing_memory): ... this.
10980 (linux_target_ops): Adjust.
10981 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10982 * nto-low.c (nto_target_ops): Adjust comment.
10983 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10984 * spu-low.c (spu_target_ops): Adjust comment.
10985 * target.h (target_ops): Rename unprepare_to_access_memory field
10986 to done_accessing_memory.
10987 (unprepare_to_access_memory): Rename to ...
10988 (done_accessing_memory): ... this.
10990 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10992 * linux-low.c (linux_prepare_to_access_memory): New.
10993 (linux_unprepare_to_access_memory): New.
10994 (linux_target_ops): Install them.
10995 * server.c (read_memory): Rename to ...
10996 (gdb_read_memory): ... this. Use
10997 prepare_to_access_memory/prepare_to_access_memory.
10998 (write_memory): Rename to ...
10999 (gdb_write_memory): ... this. Use
11000 prepare_to_access_memory/prepare_to_access_memory.
11001 (handle_search_memory_1): Adjust.
11002 (process_serial_event): Adjust.
11003 * target.h (struct target_ops): New fields
11004 prepare_to_access_memory and unprepare_to_access_memory.
11005 (prepare_to_access_memory, unprepare_to_access_memory): New.
11006 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11007 prepare_to_access_memory/prepare_to_access_memory.
11008 * nto-low.c (nto_target_ops): Adjust.
11009 * spu-low.c (spu_target_ops): Adjust.
11010 * win32-low.c (win32_target_ops): Adjust.
11012 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11014 * Makefile.in (WARN_CFLAGS): Get it from configure.
11015 (WERROR_CFLAGS): New.
11016 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11017 * configure.ac: Introduce --enable-werror, which adds -Werror to
11018 the compiler command line. Enabled by default. Disable with
11019 --disable-werror. Add -Wdeclaration-after-statement
11020 Wpointer-arith and -Wformat-nonliteral to warning flags.
11021 * configure: Regenerate.
11023 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11025 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11027 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11029 * gdbreplay.c (remote_error): New.
11031 (expect): Use gdbchar. Check for error reading from GDB.
11032 Clarify sync error output.
11033 (play): Check for errors writing to GDB.
11034 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11035 * remote-utils.c (getpkt): Check for errors writing to the remote
11038 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11040 * linux-low.c (linux_wait_1): Move non-debugging code out of
11041 `debug_threads' control.
11043 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11045 * linux-low.c (linux_wait_1): Don't set last_status here.
11046 * server.c (push_event, queue_stop_reply_callback): Assert we're
11047 not pushing a TARGET_WAITKIND_IGNORE event.
11048 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11049 (myresume, handle_target_event): Set the thread's last_resume_kind
11050 and last_status from the target returned status.
11052 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11056 * linux-x86-low.c (update_debug_registers_callback): New.
11057 (i386_dr_low_set_addr): Use it.
11058 (i386_dr_low_get_addr): New.
11059 (i386_dr_low_set_control): Use update_debug_registers_callback.
11060 (i386_dr_low_get_control): New.
11061 (i386_dr_low_get_status): Adjust.
11062 * linux-low.c (linux_stop_lwp): New.
11063 * linux-low.h (linux_stop_lwp): Declare.
11065 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11066 argument instead of a i386_debug_reg_state.
11067 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11068 a i386_debug_reg_state.
11069 (i386_insert_aligned_watchpoint): Adjust.
11070 (i386_remove_aligned_watchpoint): Adjust.
11071 (i386_low_stopped_data_address): Read the debug registers from the
11072 inferior instead of from the mirrors.
11073 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11074 (i386_dr_low_get_addr): Declare.
11075 (i386_dr_low_get_control): Declare.
11076 (i386_dr_low_get_status): Change prototype.
11078 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11079 (i386_dr_low_get_addr): New.
11080 (i386_dr_low_get_control): New.
11081 (i386_dr_low_get_status): Adjust prototype. Return
11083 (i386_initial_stuff): Clear dr_status_mirror and
11085 (i386_get_thread_context): Adjust.
11086 (i386_set_thread_context): Adjust.
11087 (i386_thread_added): Adjust.
11089 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11091 * linux-low.h (linux_thread_area): Delete declaration.
11093 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11095 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11096 after its termination.
11098 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11100 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11101 (gdb_wants_all_stopped): Delete.
11102 (linux_wait_1): Don't call them.
11103 * server.c (handle_v_cont): Tag all threads as want-stopped.
11104 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11105 stopped as "client-wants-stopped".
11107 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11109 * Makefile.in (signals_h): New.
11110 (server_h): Depend on it.
11111 (server.o): Don't depend on $(signals_def).
11112 (signals.o): Depend on $(signals_def).
11114 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11116 * Makefile.in (signals_def): New.
11117 (server_h): Append include/gdb/signals.h and signals_def.
11118 (server.o): Append signals_def.
11120 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11122 * server.c (handle_target_event): Use target_signal_to_host for
11123 resume_info.sig initialization.
11124 * target.h (struct thread_resume) <sig>: New comment.
11126 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11128 * server.c (handle_query): strcpy() the returned string from paddress()
11129 instead of sprintf().
11130 * utils.c (paddress): Return phex_nz().
11132 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11134 * server.c (handle_v_cont): Call mourn_inferior if process
11136 (myresume): Likewise.
11138 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11140 Static tracepoints, and integration with UST.
11142 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11143 * mem-break.c (uninsert_all_breakpoints)
11144 (reinsert_all_breakpoints): New.
11145 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11146 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11147 (gdb_agent_ust_loaded, helper_thread_id)
11148 (gdb_agent_helper_thread_id): New macros.
11149 (struct ipa_sym_addresses): Add addr_ust_loaded,
11150 addr_helper_thread_id, addr_cmd_buf.
11151 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11152 (in_process_agent_loaded_ust): New.
11153 (write_e_ust_not_loaded): New.
11154 (maybe_write_ipa_ust_not_loaded): New.
11155 (struct collect_static_trace_data_action): New.
11156 (enum tracepoint_type) <static_tracepoint>: New.
11157 (struct tracepoint) <handle>: Mention static tracepoints.
11158 (struct static_tracepoint_ctx): New.
11159 (CMD_BUF_SIZE): New.
11160 (add_tracepoint_action): Handle static tracepoint actions.
11161 (unprobe_marker_at): New.
11162 (clear_installed_tracepoints): Handle static tracepoints.
11163 (cmd_qtdp): Handle static tracepoints.
11164 (probe_marker_at): New.
11165 (cmd_qtstart): Handle static tracepoints.
11166 (response_tracepoint): Handle static tracepoints.
11167 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11168 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11169 (get_context_regcache): Handle static tracepoints.
11170 (do_action_at_tracepoint): Handle static tracepoint actions.
11171 (traceframe_find_block_type): Handle static trace data blocks.
11172 (traceframe_read_sdata): New.
11173 (download_tracepoints): Download static tracepoint actions.
11174 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11175 (GDB_PROBE_NAME): New.
11177 (GET_UST_SYM): New.
11180 (ust_marker_to_static_tracepoint): New.
11182 (collect_ust_data_at_tracepoint): New.
11183 (gdb_ust_probe): New.
11184 (UNIX_PATH_MAX, SOCK_DIR): New.
11185 (gdb_ust_connect_sync_socket): New.
11186 (resume_thread, stop_thread): New.
11187 (run_inferior_command): New.
11188 (init_named_socket): New.
11189 (gdb_ust_socket_init): New.
11190 (cstr_to_hexstr): New.
11192 (first_marker, next_marker): New.
11193 (response_ust_marker): New.
11194 (cmd_qtfstm, cmd_qtsstm): New.
11195 (unprobe_marker_at, probe_marker_at): New.
11196 (cmd_qtstmat, gdb_ust_thread): New.
11197 (gdb_ust_init): New.
11198 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11199 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11200 (ST_REGENTRY): New.
11201 (x86_64_st_collect_regmap): New.
11202 (X86_64_NUM_ST_COLLECT_GREGS): New.
11203 (AMD64_RIP_REGNUM): New.
11204 (supply_static_tracepoint_registers): New.
11205 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11206 (ST_REGENTRY): New.
11207 (i386_st_collect_regmap): New.
11208 (i386_NUM_ST_COLLECT_GREGS): New.
11209 (supply_static_tracepoint_registers): New.
11210 * server.c (handle_query): Handle qXfer:statictrace:read.
11211 <qSupported>: Report support for StaticTracepoints, and
11212 qXfer:statictrace:read features.
11213 * server.h (traceframe_read_sdata)
11214 (supply_static_tracepoint_registers): Declare.
11215 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11216 (unpack_varlen_hex): Include in IPA build.
11217 * Makefile.in (ustlibs, ustinc): New.
11218 (IPA_OBJS): Add remote-utils-ipa.o.
11219 ($(IPA_LIB)): Link -ldl and -lpthread.
11221 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11222 * config.in, configure: Regenerate.
11224 2010-06-20 Ian Lance Taylor <iant@google.com>
11225 Pedro Alves <pedro@codesourcery.com>
11227 * linux-x86-low.c (always_true): Delete.
11228 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11229 trying to fool the compiler with always_true.
11231 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11233 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11234 conditions in gdbserver.
11236 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11238 * spu-low.c (spu_read_memory): Wrap around local store limit.
11239 (spu_write_memory): Likewise.
11241 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11243 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11244 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11246 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11248 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11249 uses with LONGEST uses.
11251 2010-06-14 Stan Shebs <stan@codesourcery.com>
11252 Pedro Alves <pedro@codesourcery.com>
11256 * linux-x86-low.c: Include limits.h.
11258 (always_true): New.
11261 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11262 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11263 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11264 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11265 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11266 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11267 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11268 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11269 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11270 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11271 (amd64_emit_void_call_2): New.
11272 (amd64_emit_ops): New.
11273 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11274 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11275 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11276 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11277 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11278 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11279 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11280 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11281 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11282 (i386_emit_stack_adjust, i386_emit_int_call_1)
11283 (i386_emit_void_call_2): New.
11284 (i386_emit_ops): New.
11285 (x86_emit_ops): New.
11286 (the_low_target): Install x86_emit_ops.
11287 * server.h (struct emit_ops): New.
11288 (get_raw_reg_func_addr): Declare.
11289 (current_insn_ptr, emit_error): Declare.
11290 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11291 (set_trace_state_variable_value): New defines.
11292 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11293 addr_get_trace_state_variable_value and
11294 addr_set_trace_state_variable_value.
11295 (symbol_list): New fields for get_raw_reg,
11296 get_trace_state_variable_value and set_trace_state_variable_value.
11297 (condfn): New typedef.
11298 (struct tracepoint): New field `compiled_cond'.
11299 (do_action_at_tracepoint): Clear compiled_cond.
11300 (get_trace_state_variable_value, set_trace_state_variable_value):
11302 (condition_true_at_tracepoint): If there's a compiled condition,
11304 (current_insn_ptr, emit_error): New globals.
11305 (struct bytecode_address): New.
11306 (get_raw_reg_func_addr): New.
11307 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11308 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11309 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11310 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11311 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11312 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11313 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11314 (compile_tracepoint_condition, compile_bytecodes): New.
11315 * target.h (emit_ops): Forward declare.
11316 (struct target_ops): New field emit_ops.
11317 (target_emit_ops): New.
11318 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11319 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11320 * linux-low.c (linux_emit_ops): New.
11321 (linux_target_ops): Install it.
11322 * linux-low.h (struct linux_target_ops): New field emit_ops.
11324 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11326 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11327 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11329 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11330 Stan Shebs <stan@codesourcery.com>
11332 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11333 (all): Depend on $(extra_libraries).
11334 (install-only): Install the IPA.
11335 (IPA_OBJS, IPA_LIB): New.
11336 (clean): Remove the IPA lib.
11337 (IPAGENT_CFLAGS): New.
11338 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11339 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11340 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11341 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11342 * configure.ac: Check for atomic builtins support in the compiler.
11343 (IPA_DEPFILES, extra_libraries): Define.
11344 * configure.srv (ipa_obj): Add description.
11345 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11346 (i[34567]86-*-linux*): Set ipa_obj.
11347 (x86_64-*-linux*): Set ipa_obj.
11348 * linux-low.c (stabilizing_threads): New.
11349 (supports_fast_tracepoints): New.
11350 (linux_detach): Stabilize threads before detaching.
11351 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11352 the lwp is either not stabilizing, or is moving out of a jump pad.
11353 (linux_fast_tracepoint_collecting): New.
11354 (maybe_move_out_of_jump_pad): New.
11355 (enqueue_one_deferred_signal): New.
11356 (dequeue_one_deferred_signal): New.
11357 (linux_wait_for_event_1): If moving out of a jump pad, defer
11358 pending signals to later.
11359 (linux_stabilize_threads): New.
11360 (linux_wait_1): Check if threads need moving out of jump pads, and
11362 (stuck_in_jump_pad_callback): New.
11363 (move_out_of_jump_pad_callback): New.
11364 (lwp_running): New.
11365 (linux_resume_one_lwp): Handle moving out of jump pads.
11366 (linux_set_resume_request): Dequeue deferred signals.
11367 (need_step_over_p): Also step over fast tracepoint jumps.
11368 (start_step_over): Also uninsert fast tracepoint jumps.
11369 (finish_step_over): Also reinsert fast tracepoint jumps.
11370 (linux_install_fast_tracepoint_jump): New.
11371 (linux_target_ops): Install linux_stabilize_threads and
11372 linux_install_fast_tracepoint_jump_pad.
11373 * linux-low.h (linux_target_ops) <get_thread_area,
11374 install_fast_tracepoint_jump_pad>: New fields.
11375 (struct lwp_info) <collecting_fast_tracepoint,
11376 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11377 (linux_get_thread_area): Declare.
11378 * linux-x86-low.c (jump_insn): New.
11379 (x86_get_thread_area): New.
11380 (append_insns): New.
11381 (push_opcode): New.
11382 (amd64_install_fast_tracepoint_jump_pad): New.
11383 (i386_install_fast_tracepoint_jump_pad): New.
11384 (x86_install_fast_tracepoint_jump_pad): New.
11385 (the_low_target): Install x86_get_thread_area and
11386 x86_install_fast_tracepoint_jump_pad.
11387 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11388 (struct fast_tracepoint_jump): New.
11389 (fast_tracepoint_jump_insn): New.
11390 (fast_tracepoint_jump_shadow): New.
11391 (find_fast_tracepoint_jump_at): New.
11392 (fast_tracepoint_jump_here): New.
11393 (delete_fast_tracepoint_jump): New.
11394 (set_fast_tracepoint_jump): New.
11395 (uninsert_fast_tracepoint_jumps_at): New.
11396 (reinsert_fast_tracepoint_jumps_at): New.
11397 (set_breakpoint_at): Use write_inferior_memory.
11398 (uninsert_raw_breakpoint): Use write_inferior_memory.
11399 (check_mem_read): Mask out fast tracepoint jumps.
11400 (check_mem_write): Mask out fast tracepoint jumps.
11401 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11402 (set_fast_tracepoint_jump): Declare.
11403 (delete_fast_tracepoint_jump)
11404 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11405 (reinsert_fast_tracepoint_jumps_at): Declare.
11406 * regcache.c: Don't compile many functions when building the
11407 in-process agent library.
11408 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11409 the register buffer in the heap.
11410 (free_register_cache): If the register buffer isn't owned by the
11411 regcache, don't free it.
11412 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11413 pre-existing register caches.
11414 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11416 (convert_ascii_to_int): : Constify `from' parameter type.
11417 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11418 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11419 the needed buffer in-place.
11420 (relocate_instruction): New.
11421 * server.c (handle_query) <qSymbols>: If the target supports
11422 tracepoints, give it a chance of looking up symbols. Report
11423 support for fast tracepoints.
11424 (handle_status): Stabilize threads.
11425 (process_serial_event): Adjust.
11426 * server.h (struct fast_tracepoint_jump): Forward declare.
11427 (struct process_info) <fast_tracepoint_jumps>: New field.
11428 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11429 (decode_X_packet, decode_M_packet): Adjust.
11430 (relocate_instruction): Declare.
11431 (in_process_agent_loaded): Declare.
11432 (tracepoint_look_up_symbols): Declare.
11433 (struct fast_tpoint_collect_status): Declare.
11434 (fast_tracepoint_collecting): Declare.
11435 (force_unlock_trace_buffer): Declare.
11436 (handle_tracepoint_bkpts): Declare.
11437 (initialize_low_tracepoint)
11438 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11439 * target.h (struct target_ops) <stabilize_threads,
11440 install_fast_tracepoint_jump_pad>: New fields.
11441 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11442 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11443 [HAVE_STDINT_H]: Include stdint.h.
11444 (trace_debug_1): Rename to ...
11445 (trace_vdebug): ... this.
11446 (trace_debug): Rename to ...
11447 (trace_debug_1): ... this. Add `level' parameter.
11448 (trace_debug): New.
11449 (ATTR_USED, ATTR_NOINLINE): New.
11450 (IP_AGENT_EXPORT): New.
11451 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11452 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11453 (about_to_request_buffer_space, trace_buffer_is_full)
11454 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11455 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11456 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11457 (traceframe_write_count, traceframes_created)
11458 (trace_state_variables)
11459 New renaming defines.
11460 (struct ipa_sym_addresses): New.
11461 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11462 (symbol_list): New.
11463 (ipa_sym_addrs): New.
11464 (all_tracepoint_symbols_looked_up): New.
11465 (in_process_agent_loaded): New.
11466 (write_e_ipa_not_loaded): New.
11467 (maybe_write_ipa_not_loaded): New.
11468 (tracepoint_look_up_symbols): New.
11469 (debug_threads) [IN_PROCESS_AGENT]: New.
11470 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11471 (UNKNOWN_SIDE_EFFECTS): New.
11472 (stop_tracing): New.
11473 (flush_trace_buffer): New.
11474 (stop_tracing_bkpt): New.
11475 (flush_trace_buffer_bkpt): New.
11476 (read_inferior_integer): New.
11477 (read_inferior_uinteger): New.
11478 (read_inferior_data_pointer): New.
11479 (write_inferior_data_pointer): New.
11480 (write_inferior_integer): New.
11481 (write_inferior_uinteger): New.
11482 (struct collect_static_trace_data_action): Delete.
11483 (enum tracepoint_type): New.
11484 (struct tracepoint) <type>: New field `type'.
11485 <actions_str, step_actions, step_actions_str>: Only include in
11487 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11488 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11489 (tracepoints): Use IP_AGENT_EXPORT.
11490 (last_tracepoint): Don't include in the IPA.
11491 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11492 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11493 (alloced_trace_state_variables): New.
11494 (trace_state_variables): Use IP_AGENT_EXPORT.
11495 (traceframe_t): Delete unused variable.
11496 (circular_trace_buffer): Don't include in the IPA.
11497 (trace_buffer_start): Delete.
11498 (struct trace_buffer_control): New.
11499 (trace_buffer_free): Delete.
11500 (struct ipa_trace_buffer_control): New.
11501 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11502 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11504 (trace_buffer_ctrl): New.
11505 (TRACE_BUFFER_CTRL_CURR): New.
11506 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11507 Reimplement as macros.
11508 (trace_buffer_wrap): Delete.
11509 (traceframe_write_count, traceframe_read_count)
11510 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11511 (struct tracepoint_hit_ctx) <type>: New field.
11512 (struct fast_tracepoint_ctx): New.
11513 (memory_barrier): New.
11515 (record_tracepoint_error): Update atomically in the IPA.
11516 (clear_inferior_trace_buffer): New.
11517 (about_to_request_buffer_space): New.
11518 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11519 updating the same buffer.
11520 (add_tracepoint): Default the tracepoint's type to trap
11521 tracepoint, and orig_size to -1.
11522 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11523 internal variables.
11524 (create_trace_state_variable): New parameter `gdb'. Handle it.
11525 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11526 (cmd_qtdp): Handle fast tracepoints.
11527 (cmd_qtdv): Adjust.
11528 (max_jump_pad_size): New.
11529 (gdb_jump_pad_head): New.
11530 (get_jump_space_head): New.
11531 (claim_jump_space): New.
11532 (sort_tracepoints): New.
11533 (MAX_JUMP_SIZE): New.
11534 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11536 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11537 support. Upload fast traceframes, and delete internal IPA
11539 (stop_tracing_handler): New.
11540 (flush_trace_buffer_handler): New.
11541 (cmd_qtstop): Upload fast tracepoints.
11542 (response_tracepoint): Handle fast tracepoints.
11543 (tracepoint_finished_step): Upload fast traceframes. Set the
11544 tracepoint hit context's tracepoint type.
11545 (handle_tracepoint_bkpts): New.
11546 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11547 type. Add comment about fast tracepoints.
11548 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11549 non-existing action_str field.
11550 (get_context_regcache): Handle fast tracepoints.
11551 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11553 (fast_tracepoint_from_jump_pad_address): New.
11554 (fast_tracepoint_from_ipa_tpoint_address): New.
11555 (collecting_t): New.
11556 (force_unlock_trace_buffer): New.
11557 (fast_tracepoint_collecting): New.
11559 (gdb_collect): New.
11560 (write_inferior_data_ptr): New.
11561 (target_tp_heap): New.
11562 (target_malloc): New.
11563 (download_agent_expr): New.
11565 (download_tracepoints): New.
11566 (download_trace_state_variables): New.
11567 (upload_fast_traceframes): New.
11568 (IPA_FIRST_TRACEFRAME): New.
11569 (IPA_NEXT_TRACEFRAME_1): New.
11570 (IPA_NEXT_TRACEFRAME): New.
11571 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11572 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11573 (gdb_jump_pad_buffer_end): New.
11574 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11575 (initialize_tracepoint): Adjust.
11576 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11577 buffer. Initialize the low module.
11578 * utils.c (PREFIX, TOOLNAME): New.
11579 (malloc_failure): Use PREFIX.
11580 (error): In the IPA, an error causes an exit.
11581 (fatal, warning): Use PREFIX.
11582 (internal_error): Use TOOLNAME.
11583 (NUMCELLS): Increase to 10.
11584 * configure, config.in: Regenerate.
11586 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11588 * server.c (handle_query) <qSupported>: Do two passes over the
11589 qSupported string to avoid nesting strtok.
11591 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11593 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11595 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11596 -Wl,--dynamic-list.
11597 * configure: Regenerate.
11598 * proc-service.list: New.
11600 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11602 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11605 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11607 * gdbreplay.c (remote_open): Check error return from socket() call by
11608 its equality to -1 not by it being negative.
11609 * remote-utils.c (remote_open): Likewise.
11611 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11613 * config.h: Regenerate.
11615 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11617 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11618 doesn't provide PTRACE_GET_THREAD_AREA.
11620 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11622 * linux-m68k-low.c: Include <asm/ptrace.h>
11623 (ps_get_thread_area): Implement.
11625 2010-05-03 Doug Evans <dje@google.com>
11627 * event-loop.c (struct callback_event): New struct.
11628 (callback_list): New global.
11629 (append_callback_event, delete_callback_event): New functions.
11630 (process_callback): New function.
11631 (start_event_loop): Call it.
11632 * remote-utils.c (NOT_SCHEDULED): Define.
11633 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11634 moved out of readchar.
11635 (readchar): Rewrite. Call reschedule before returning.
11636 (reset_readchar): New function.
11637 (remote_close): Call it.
11638 (process_remaining, reschedule): New functions.
11639 * server.h (callback_handler_func): New typedef.
11640 (append_callback_event, delete_callback_event): Declare.
11642 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11644 * proc-service.c (ps_pglobal_lookup): Use
11645 thread_db_look_up_one_symbol.
11646 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11647 parameter. Use it instead of all_symbols_looked_up.
11648 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11650 (all_symbols_looked_up): Don't declare.
11651 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11652 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11654 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11655 Set all_symbols_looked_up here.
11656 (thread_db_look_up_one_symbol): New.
11657 (thread_db_get_tls_address): Adjust.
11658 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11659 thread_db object on the heap, and tentatively set it in the
11661 (thread_db_init): Don't set all_symbols_looked_up here.
11662 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11664 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11666 * linux-low.c (linux_kill, linux_detach): Adjust.
11667 (status_pending_p_callback): Remove redundant statement. Check
11668 for !TARGET_WAITIKIND_IGNORE, instead of
11669 TARGET_WAITKIND_STOPPED.
11670 (handle_tracepoints): Make sure LWP is locked. Adjust.
11671 (linux_wait_for_event_1): Adjust.
11672 (linux_cancel_breakpoints): New.
11673 (unsuspend_one_lwp): New.
11674 (unsuspend_all_lwps): New.
11675 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11676 (send_sigstop_callback): Change return type to int, add new
11677 `except' parameter and handle it.
11678 (suspend_and_send_sigstop_callback): New.
11679 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11680 pass them down. If SUSPEND, also increment the lwp's suspend
11682 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11683 (need_step_over_p): Don't consider suspended LWPs.
11684 (start_step_over): Adjust.
11685 (proceed_one_lwp): Change return type to int, add new `except'
11686 parameter and handle it.
11687 (unsuspend_and_proceed_one_lwp): New.
11688 (proceed_all_lwps): Use find_inferior instead of
11690 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11691 also decrement the suspend count of LWPs. Pass `except' down,
11692 instead of hacking its suspend count.
11693 (linux_pause_all): Add `freeze' parameter. Adjust.
11694 (linux_unpause_all): New.
11695 (linux_target_ops): Install linux_unpause_all.
11696 * server.c (handle_status): Adjust.
11697 * target.h (struct target_ops): New fields `unpause_all' and
11698 `cancel_breakpoints'. Add new parameter to `pause_all'.
11699 (pause_all): Add new `freeze' parameter.
11700 (unpause_all): New.
11701 (cancel_breakpoints): New.
11702 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11703 cancel breakpoints.
11704 (cmd_qtstart): Pause threads.
11705 (stop_tracing): Pause threads, and cancel breakpoints.
11706 * win32-low.c (win32_target_ops): Adjust.
11708 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11710 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11711 the inferior right away from here...
11712 (linux_wait_1): ... to here, and adjust to check the thread's
11713 last_resume_kind instead of the lwp's step or stop_expected flags.
11715 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11717 * README: Use consistent `GDB' and `GDBserver' spellings.
11719 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11721 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11722 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11723 (linux_detach_one_lwp): Assume the lwp is stopped.
11724 (any_thread_of): Delete.
11725 (linux_detach): Stop all lwps here. Don't blindly delete all
11727 (delete_lwp_callback): New.
11728 (linux_mourn): Delete all lwps of the process that is gone.
11729 (linux_wait_1): Don't delete the last lwp of the process here.
11730 * mem-break.h (mark_breakpoints_out): Declare.
11731 * mem-break.c (mark_breakpoints_out): New.
11732 (free_all_breakpoints): Use it.
11733 * server.c (handle_target_event): If the process is gone, mark
11735 * thread-db.c (struct thread_db) <create_bp>: New field.
11736 (thread_db_enable_reporting): Fix prototype. Store a thread event
11737 breakpoint reference in the thread_db struct.
11738 (thread_db_load_search): Clear the thread_db object.
11739 (try_thread_db_load_1): Ditto.
11740 (switch_to_process): New.
11741 (disable_thread_event_reporting): Use it.
11742 (remove_thread_event_breakpoints): New.
11743 (thread_db_detach, thread_db_mourn): Use it.
11745 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11747 * linux-low.c (linux_enable_event_reporting): New.
11748 (linux_wait_for_event_1, handle_extended_wait): Use it.
11750 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11752 * linux-low.c (linux_kill_one_lwp, linux_kill)
11753 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11754 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11755 SIGSTOP even if the LWP is stopped.
11756 (send_sigstop_callback): New.
11757 (stop_all_lwps): Use send_sigstop_callback instead.
11758 (linux_resume_one_thread): Adjust.
11759 (proceed_one_lwp): Still proceed an LWP that the client has
11760 requested to stop, if we haven't reported it as stopped yet. Make
11761 sure that LWPs the client want stopped, have a pending SIGSTOP.
11763 2010-04-26 Doug Evans <dje@google.com>
11765 * server.c (handle_general_set): Make static.
11767 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11768 Print received char after testing for error/eof instead of before.
11769 (input_interrupt): Tweak comment.
11771 2010-04-23 Doug Evans <dje@google.com>
11773 * server.c (start_inferior): Print inferior argv if --debug.
11775 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11777 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11778 * nto-x86-low.c: Include server.h
11780 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11782 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11783 be consistent with other sources of this directory.
11784 (init_registers_amd64): Correct name of source file of this function
11787 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11789 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11790 64-bit executables.
11792 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11794 * win32-i386-low.c: Add 64-bit support.
11795 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11796 (init_registers_amd64): Declare.
11797 (mappings): Add 64-bit version of array.
11798 (init_windows_x86): New function.
11799 (the_low_target): Change init_arch field to init_windows_x86.
11801 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11803 * win32-low.c: Adapt to support also 64-bit architecture.
11804 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11805 (get_image_name): Use SIZE_T type for local variable `done'.
11806 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11807 (toolhelp_get_dll_name): Idem.
11808 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11809 Use uintptr_t typecast to avoid warning.
11810 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11811 (handle_exception): Use phex_nz to avoid warning.
11812 (win32_wait): Remove unused local variable `process'.
11814 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11816 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11819 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11821 * configure.ac: Use `ws2_32' library for srv_mingw.
11822 * configure: Regenerate.
11823 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11824 * remote-utils.c: Likewise.
11826 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11828 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11829 if __x86_64__ is defined.
11831 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11833 * configure: Regenerate.
11835 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11837 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11838 * target.h (target_ops): New get_tib_address field.
11839 * win32-low.h (win32_thread_info): Add thread_local_base field.
11840 * win32-low.c (child_add_thread): Add tlb argument.
11841 Set thread_local_base field to TLB.
11842 (get_child_debug_event): Adapt to child_add_thread change.
11843 (win32_get_tib_address): New function.
11844 (win32_target_ops): Set get_tib_address field to
11845 win32_get_tib_address.
11846 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11848 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11850 * linux-low.c (linux_mourn): Also remove the process.
11851 * server.c (handle_target_event): Don't remove the process here.
11852 * nto-low.c (nto_mourn): New.
11853 (nto_target_ops): Install it.
11854 * spu-low.c (spu_mourn): New.
11855 (spu_target_ops): Install it.
11856 * win32-low.c (win32_mourn): New.
11857 (win32_target_ops): Install it.
11859 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11861 * server.h (buffer_xml_printf): Remove redundant `;'.
11863 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11865 * regcache.c (set_register_cache): Invalidate regcaches before
11866 changing the register cache layout.
11867 (regcache_invalidate_one): Allow a NULL regcache.
11868 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11869 regcaches before changing the register cache layout or the target
11872 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11874 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11875 variable warning on Linux/x86-64.
11877 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11879 GDBserver disconnected tracing support.
11881 * linux-low.c (linux_remove_process): Delete.
11882 (add_lwp): Don't set last_resume_kind here.
11883 (linux_kill): Use `mourn'.
11884 (linux_detach): Use `thread_db_detach', and `mourn'.
11885 (linux_mourn): New.
11886 (linux_attach_lwp_1): Adjust comment.
11887 (linux_attach): last_resume_kind moved the thread_info; adjust.
11888 (status_pending_p_callback): Adjust.
11889 (linux_wait_for_event_1): Adjust.
11890 (count_events_callback, select_singlestep_lwp_callback)
11891 (select_event_lwp_callback, cancel_breakpoints_callback)
11892 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11893 (proceed_one_lwp): Adjust.
11894 (linux_async): Add debug output.
11895 (linux_thread_stopped): New.
11896 (linux_pause_all): New.
11897 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11899 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11900 (thread_db_free): Delete declaration.
11901 (thread_db_detach, thread_db_mourn): Declare.
11902 * thread-db.c (thread_db_init): Use thread_db_mourn.
11903 (thread_db_free): Delete, split in two.
11904 (disable_thread_event_reporting): New.
11905 (thread_db_detach): New.
11906 (thread_db_mourn): New.
11908 * server.h (struct thread_info) <last_resume_kind>: New field.
11909 <attached>: Add comment.
11910 <gdb_detached>: New field.
11911 (handler_func): Change return type to int.
11912 (handle_serial_event, handle_target_event): Ditto.
11913 (gdb_connected): Declare.
11915 (disconnected_tracing): Declare.
11916 (stop_tracing): Declare.
11918 * server.c (handle_query) <qSupported>: Report support for
11919 disconnected tracing.
11920 (queue_stop_reply_callback): Account for running threads.
11921 (gdb_wants_thread_stopped): New.
11922 (gdb_wants_all_threads_stopped): New.
11923 (gdb_reattached_process): New.
11924 (handle_status): Clear the `gdb_detached' flag of all processes.
11925 In all-stop, stop all threads.
11926 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11927 (process_serial_event): If the remote connection breaks, or if an
11928 exit was forced with "monitor exit", force an event loop exit.
11929 Handle disconnected tracing on detach.
11930 (handle_serial_event): Adjust.
11931 (handle_target_event): If GDB isn't connected, forward events back
11932 to the inferior, unless the last process exited, in which case,
11933 exit gdbserver. Adjust interface.
11935 * remote-utils.c (remote_open): Don't block in accept. Instead
11936 register an event loop source on the listen socket file
11937 descriptor. Refactor bits into ...
11938 (listen_desc): ... this new global.
11939 (gdb_connected): ... this new function.
11940 (enable_async_notification): ... this new function.
11941 (handle_accept_event): ... this new function.
11942 (remote_close): Clear remote_desc.
11944 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11946 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11948 (mourn_inferior): Define.
11949 (target_process_qsupported): Avoid the dangling else problem.
11950 (thread_stopped): Define.
11951 (pause_all): Define.
11952 (target_waitstatus_to_string): Declare.
11953 * target.c (target_waitstatus_to_string): New.
11955 * tracepoint.c (tracing): Make extern.
11956 (disconnected_tracing): New.
11957 (stop_tracing): Make extern. Handle tracing stops due to GDB
11959 (cmd_qtdisconnected): New.
11960 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11961 (handle_tracepoint_general_set): Handle QTDisconnected.
11963 * event-loop.c (event_handler_func): Change return type to int.
11964 (process_event): Bail out if the event handler wants the event
11966 (handle_file_event): Ditto.
11967 (start_event_loop): Bail out if the event handler wants the event
11970 * nto-low.c (nto_target_ops): Adjust.
11971 * spu-low.c (spu_wait): Don't remove the process here.
11972 (spu_target_ops): Adjust.
11973 * win32-low.c (win32_wait): Don't remove the process here.
11974 (win32_target_ops): Adjust.
11976 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11978 * regcache.c (realloc_register_cache): Invalidate inferior's
11979 regcache before recreating it.
11981 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11983 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11985 2010-04-09 Stan Shebs <stan@codesourcery.com>
11986 Pedro Alves <pedro@codesourcery.com>
11988 * server.h (LONGEST): New.
11989 (struct thread_info) <while_stepping>: New field.
11990 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11992 (initialize_tracepoint, handle_tracepoint_general_set)
11993 (handle_tracepoint_query, tracepoint_finished_step)
11994 (tracepoint_was_hit, release_while_stepping_state_list):
11995 (current_traceframe): Declare.
11996 * server.c (handle_general_set): Handle tracepoint packets.
11997 (read_memory): New.
11998 (write_memory): New.
11999 (handle_search_memory_1): Use read_memory.
12000 (handle_query): Report support for conditional tracepoints, trace
12001 state variables, and tracepoint sources. Handle tracepoint
12003 (main): Initialize the tracepoints module.
12004 (process_serial_event): Handle traceframe reads/writes.
12006 * linux-low.c (handle_tracepoints): New.
12007 (linux_wait_1): Call it.
12008 (linux_resume_one_lwp): Handle while-stepping.
12009 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12010 (linux_target_ops): Install them.
12011 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12013 * linux-x86-low.c (x86_supports_tracepoints): New.
12014 (the_low_target). Install it.
12016 * mem-break.h (delete_breakpoint): Declare.
12017 * mem-break.c (delete_breakpoint): Make external.
12019 * target.h (struct target_ops): Add `supports_tracepoints',
12020 `read_pc', and `write_pc' fields.
12021 (target_supports_tracepoints): Define.
12022 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12025 * regcache.h (struct regcache) <registers_owned>: New field.
12026 (init_register_cache, regcache_cpy): Declare.
12027 (regcache_read_pc, regcache_write_pc): Declare.
12028 (register_cache_size): Declare.
12029 (supply_regblock): Declare.
12030 * regcache.c (init_register_cache): New.
12031 (new_register_cache): Use it.
12032 (regcache_cpy): New.
12033 (register_cache_size): New.
12034 (supply_regblock): New.
12035 (regcache_read_pc, regcache_write_pc): New.
12037 * tracepoint.c: New.
12039 * Makefile.in (OBS): Add tracepoint.o.
12040 (tracepoint.o): New rule.
12042 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12044 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12046 (i386-mmx.c): Likewise.
12047 (i386-mmx-linux.o): Likewise.
12048 (i386-mmx-linux.c): Likewise.
12050 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12051 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12052 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12053 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12055 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12056 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12057 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12059 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12061 * Makefile.in (clean): Updated.
12063 (i386-avx.c): Likewise.
12064 (i386-avx-linux.o): Likewise.
12065 (i386-avx-linux.c): Likewise.
12066 (amd64-avx.o): Likewise.
12067 (amd64-avx.c): Likewise.
12068 (amd64-avx-linux.o): Likewise.
12069 (amd64-avx-linux.c): Likewise.
12071 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12072 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12073 (srv_amd64_regobj): Add amd64-avx.o.
12074 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12075 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12076 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12077 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12078 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12079 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12080 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12082 * i387-fp.c: Include "i386-xstate.h".
12084 (i387_cache_to_xsave): Likewise.
12085 (i387_xsave_to_cache): Likewise.
12086 (x86_xcr0): Likewise.
12088 * i387-fp.h (i387_cache_to_xsave): Likewise.
12089 (i387_xsave_to_cache): Likewise.
12090 (x86_xcr0): Likewise.
12092 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12093 * linux-crisv32-low.c (target_regsets): Likewise.
12094 * linux-m68k-low.c (target_regsets): Likewise.
12095 * linux-mips-low.c (target_regsets): Likewise.
12096 * linux-ppc-low.c (target_regsets): Likewise.
12097 * linux-s390-low.c (target_regsets): Likewise.
12098 * linux-sh-low.c (target_regsets): Likewise.
12099 * linux-sparc-low.c (target_regsets): Likewise.
12100 * linux-xtensa-low.c (target_regsets): Likewise.
12102 * linux-low.c: Include <sys/uio.h>.
12103 (regsets_fetch_inferior_registers): Support nt_type.
12104 (regsets_store_inferior_registers): Likewise.
12105 (linux_process_qsupported): New.
12106 (linux_target_ops): Add linux_process_qsupported.
12108 * linux-low.h (regset_info): Add nt_type.
12109 (linux_target_ops): Add process_qsupported.
12111 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12113 (init_registers_i386_avx_linux): New.
12114 (init_registers_amd64_avx_linux): Likewise.
12115 (xmltarget_i386_linux_no_xml): Likewise.
12116 (xmltarget_amd64_linux_no_xml): Likewise.
12117 (PTRACE_GETREGSET): Likewise.
12118 (PTRACE_SETREGSET): Likewise.
12119 (x86_fill_xstateregset): Likewise.
12120 (x86_store_xstateregset): Likewise.
12121 (use_xml): Likewise.
12122 (x86_linux_update_xmltarget): Likewise.
12123 (x86_linux_process_qsupported): Likewise.
12124 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12125 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12126 init_registers_i386_linux here. Call
12127 x86_linux_update_xmltarget.
12128 (the_low_target): Add x86_linux_process_qsupported.
12130 * server.c (handle_query): Call target_process_qsupported.
12132 * target.h (target_ops): Add process_qsupported.
12133 (target_process_qsupported): New.
12135 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12137 * inferiors.c (add_thread): Set last_status kind to
12138 TARGET_WAITKIND_IGNORE.
12139 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12140 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12141 (linux_wait_1): Move `thread' local definition to block that uses
12142 it. Don't NULL initialize `event_child'.
12143 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12144 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12145 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12147 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12149 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12150 an extended waitstatus, or by a watchpoint.
12151 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12152 thread was stepping or has been stopped by a watchpoint.
12154 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12156 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12157 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12158 of another, then delete the previous, and validate all
12160 (validate_inserted_breakpoint): New.
12161 (delete_disabled_breakpoints): New.
12162 (validate_breakpoints): New.
12163 (check_mem_read): Validate breakpoints before trusting their
12164 shadow. Delete disabled breakpoints.
12165 (check_mem_write): Validate breakpoints before trusting they
12166 should be inserted. Delete disabled breakpoints.
12167 * mem-break.h (validate_breakpoints):
12168 * server.c (handle_query): Validate breakpoints when we see a
12171 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12173 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12174 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12175 if we could tell there's a GDB breakpoint at stop_pc.
12176 (need_step_over_p): Don't do a step over if we find a GDB
12177 breakpoint at the resume PC.
12179 * mem-break.c (struct raw_breakpoint): New.
12180 (enum bkpt_type): New type `gdb_breakpoint'.
12181 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12182 fields. New field `raw'.
12183 (find_raw_breakpoint_at): New.
12184 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12185 breakpoint instead.
12186 (set_breakpoint_at): Adjust.
12187 (delete_raw_breakpoint): New.
12188 (release_breakpoint): New.
12189 (delete_breakpoint): Rename to...
12190 (delete_breakpoint_1): ... this. Add proc parameter. Use
12191 release_breakpoint. Return ENOENT.
12192 (delete_breakpoint): Reimplement.
12193 (find_breakpoint_at): Delete.
12194 (find_gdb_breakpoint_at): New.
12195 (delete_breakpoint_at): Delete.
12196 (set_gdb_breakpoint_at): New.
12197 (delete_gdb_breakpoint_at): New.
12198 (gdb_breakpoint_here): New.
12199 (set_reinsert_breakpoint): Use release_breakpoint.
12200 (uninsert_breakpoint): Rename to ...
12201 (uninsert_raw_breakpoint): ... this.
12202 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12203 (reinsert_raw_breakpoint): Change parameter type to
12205 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12207 (check_breakpoints): Adjust. Use release_breakpoint.
12208 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12209 (breakpoint_inserted_here): Ditto.
12210 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12211 Don't trust the breakpoint's shadow if it is not inserted.
12212 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12213 (delete_all_breakpoints): Adjust.
12214 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12215 use delete_breakpoint_1.
12217 * mem-break.h (breakpoints_supported): Delete declaration.
12218 (set_gdb_breakpoint_at): Declare.
12219 (gdb_breakpoint_here): Declare.
12220 (delete_breakpoint_at): Delete.
12221 (delete_gdb_breakpoint_at): Declare.
12223 * server.h (struct raw_breakpoint): Forward declare.
12224 (struct process_info): New field `raw_breakpoints'.
12226 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12229 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12231 * linux-low.c (status_pending_p_callback): Fix comment.
12232 (linux_wait_for_event_1): Move most of the internal breakpoint
12233 handling from here...
12234 (linux_wait_1): ... to here.
12235 (count_events_callback): New.
12236 (select_singlestep_lwp_callback): New.
12237 (select_event_lwp_callback): New.
12238 (cancel_breakpoints_callback): New.
12239 (select_event_lwp): New.
12240 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12241 priority to all LWPs that have had events that should be reported
12242 to the client. Cancel breakpoints when about to reporting the
12243 event to the client, not while stopping lwps. No longer cancel
12244 finished single-steps here.
12245 (cancel_finished_single_step): Delete.
12246 (cancel_finished_single_steps): Delete.
12248 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12250 * mem-break.c (enum bkpt_type): New.
12251 (struct breakpoint): New field `type'.
12252 (set_breakpoint_at): Change return type to struct breakpoint
12253 pointer. Set type to `other_breakpoint' by default.
12254 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12255 in the breakpoint list.
12256 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12257 (reinsert_breakpoint): Rename to ...
12258 (reinsert_raw_breakpoint): ... this.
12259 (reinsert_breakpoints_at): Adjust.
12260 * mem-break.h (struct breakpoint): Declare.
12261 (set_breakpoint_at): Change return type to struct breakpoint
12264 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12266 * server.c (handle_query): Assign, not compare.
12268 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12270 Teach linux gdbserver to step-over-breakpoints.
12272 * linux-low.c (can_hardware_single_step): New.
12273 (supports_breakpoints): New.
12274 (handle_extended_wait): If stopping threads, read the stop pc of
12275 the new cloned LWP.
12277 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12278 low target doesn't support retrieving the PC.
12279 (add_lwp): Set last_resume_kind to resume_continue.
12280 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12281 (linux_attach): Don't clear stop_expected. Set the lwp's
12282 last_resume_kind to resume_stop.
12283 (linux_detach_one_lwp): Don't check for removed breakpoints.
12284 (check_removed_breakpoint): Delete.
12285 (status_pending_p): Rename to ...
12286 (status_pending_p_callback): ... this. Don't check for removed
12287 breakpoints. Don't consider threads that are stopped from GDB's
12289 (linux_wait_for_lwp): Always read the stop_pc here.
12290 (cancel_breakpoint): New.
12291 (step_over_bkpt): New global.
12292 (linux_wait_for_event_1): Implement stepping over breakpoints.
12293 (gdb_wants_lwp_stopped): New.
12294 (gdb_wants_all_stopped): New.
12295 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12296 single-step traps here. Store the thread's last reported target
12298 (send_sigstop): Don't clear stop_expected. Always set it,
12300 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12301 (cancel_finished_single_step): New.
12302 (cancel_finished_single_steps): New.
12303 (wait_for_sigstop): Don't cancel finished single-step traps here.
12304 (linux_resume_one_lwp): Don't check for removed breakpoints.
12305 Don't set `step' on non-hardware step archs.
12306 (linux_set_resume_request): Ignore resume_stop requests if already
12307 stopping or stopped. Set the lwp's last_resume_kind.
12308 (resume_status_pending_p): Don't check for removed breakpoints.
12309 (need_step_over_p): New.
12310 (start_step_over): New.
12311 (finish_step_over): New.
12312 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12313 requests. Clear the thread's last reported target waitstatus.
12314 Don't use the `suspended' flag. Don't consider pending breakpoints.
12315 (linux_resume): Start a step-over if necessary.
12316 (proceed_one_lwp): New.
12317 (proceed_all_lwps): New.
12318 (unstop_all_lwps): New.
12319 * linux-low.h (struct lwp_info): Rewrite comment for the
12320 `suspended' flag. Add the `stop_pc' field. Delete the
12321 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12322 Add `'last_resume_kind' and `need_step_over' fields.
12323 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12324 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12325 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12326 (set_raw_breakpoint_at): New.
12327 (set_breakpoint_at): Rewrite to use it.
12328 (reinsert_breakpoint_handler): Delete.
12329 (set_reinsert_breakpoint): New.
12330 (reinsert_breakpoint_by_bp): Delete.
12331 (delete_reinsert_breakpoints): New.
12332 (uninsert_breakpoint): Rewrite.
12333 (uninsert_breakpoints_at): New.
12334 (reinsert_breakpoint): Rewrite.
12335 (reinsert_breakpoints_at): New.
12336 (check_breakpoints): Rewrite.
12337 (breakpoint_here): New.
12338 (breakpoint_inserted_here): New.
12339 (check_mem_read): Adjust.
12340 * mem-break.h (breakpoints_supported, breakpoint_here)
12341 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12342 (reinsert_breakpoint_by_bp): Delete declaration.
12343 (delete_reinsert_breakpoints): Declare.
12344 (reinsert_breakpoint): Delete declaration.
12345 (reinsert_breakpoints_at): Declare.
12346 (uninsert_breakpoint): Delete declaration.
12347 (uninsert_breakpoints_at): Declare.
12348 (check_breakpoints): Adjust prototype.
12349 * server.h: Adjust include order.
12350 (struct thread_info): Declare here. Add a `last_status' field.
12352 2010-03-23 Michael Snyder <msnyder@vmware.com>
12354 * server.c (crc32): New function.
12355 (handle_query): Add handling for 'qCRC:' request.
12357 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12359 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12360 lwp had been stopped by a watchpoint.
12362 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12364 * server.h (internal_error): Declare.
12365 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12366 * utils.c (internal_error): New function.
12368 2010-03-15 Andreas Schwab <schwab@redhat.com>
12370 * configure.srv: Fix typo setting srv_regobj.
12372 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12374 * linux-low.c (fetch_register): Avoid passing a non string literal
12376 (usr_store_inferior_registers): Ditto.
12378 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12380 * linux-low.c (linux_write_memory): Bail out early if peeking
12383 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12385 * linux-low.h (struct lwp_info): New fields
12386 `stopped_by_watchpoint' and `stopped_data_address'.
12387 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12388 here, and cache them in the lwp object.
12389 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12391 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12393 (linux_stopped_by_watchpoint): Rewrite.
12394 (linux_stopped_data_address): Rewrite.
12396 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12398 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12399 switching the current inferior, not before.
12401 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12403 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12404 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12405 i386-linux.c and amd64-linux.c.
12406 (reg-i386.o): Removed.
12407 (reg-i386.c): Likewise.
12408 (reg-i386-linux.o): Likewise.
12409 (reg-i386-linux.c): Likewise.
12410 (reg-x86-64.o): Likewise.
12411 (reg-x86-64.c): Likewise.
12412 (reg-x86-64-linux.o): Likewise.
12413 (reg-x86-64-linux.c): Likewise.
12415 (i386.c): Likewise.
12416 (i386-linux.o): Likewise.
12417 (i386-linux.c): Likewise.
12418 (amd64.o): Likewise.
12419 (amd64.c): Likewise.
12420 (amd64-linux.o): Likewise.
12421 (amd64-linux.c): Likewise.
12423 * configure.srv (srv_i386_regobj): New.
12424 (srv_i386_linux_regobj): Likewise.
12425 (srv_amd64_regobj): Likewise.
12426 (srv_amd64_linux_regobj): Likewise.
12427 (srv_i386_32bit_xmlfiles): Likewise.
12428 (srv_i386_64bit_xmlfiles): Likewise.
12429 (srv_i386_xmlfiles): Likewise.
12430 (srv_amd64_xmlfiles): Likewise.
12431 (srv_i386_linux_xmlfiles): Likewise.
12432 (srv_amd64_linux_xmlfiles): Likewise.
12433 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12434 srv_xmlfiles to $srv_i386_xmlfiles.
12435 (i[34567]86-*-mingw32ce*): Likewise.
12436 (i[34567]86-*-mingw*): Likewise.
12437 (i[34567]86-*-nto*): Likewise.
12438 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12439 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12440 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12441 (x86_64-*-linux*): Likewise.
12443 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12444 (init_registers_amd64_linux): New.
12445 (x86_arch_setup): Replace init_registers_x86_64_linux with
12446 init_registers_amd64_linux.
12448 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12450 * configure.ac: Check for libdl. If it is not available link against
12451 static libthread_db.
12452 * configure: Regenerate.
12454 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12458 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12459 handing a read watchpoint.
12460 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12462 2010-02-12 Doug Evans <dje@google.com>
12464 * linux-low.c (linux_supports_tracefork_flag): Document.
12465 (linux_look_up_symbols): Add comment.
12467 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12469 * regcache.c (supply_register): Clear regcache if buf is NULL.
12471 2010-02-02 Nicolas Roche <roche@sourceware.org>
12472 Joel Brobecker <brobecker@adacore.com>
12474 * inferiors.c (find_inferior): Add function documentation.
12475 (unloaded_dll): Handle the case where the unloaded dll has not
12476 been previously registered in the dll list.
12478 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12480 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12481 (thumb2_breakpoint): New.
12482 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12484 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12486 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12487 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12490 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12492 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12494 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12496 * linux-s390-low.c (s390_collect_ptrace_register)
12497 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12499 2010-01-21 Doug Evans <dje@google.com>
12501 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12502 (PTRACE_ARG4_TYPE): New macro.
12503 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12504 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12505 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12506 (usr_store_inferior_registers): Ditto.
12507 (linux_read_memory, linux_write_memory): Ditto.
12508 (linux_test_for_tracefork): Ditto.
12510 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12511 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12513 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12515 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12518 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12520 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12521 prototype to take a regcache. Adjust.
12523 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12525 * regcache.h (struct thread_info): Forward declare.
12526 (struct regcache): New.
12527 (new_register_cache): Adjust prototype.
12528 (get_thread_regcache): Declare.
12529 (free_register_cache): Adjust prototype.
12530 (registers_to_string, registers_from_string): Ditto.
12531 (supply_register, supply_register_by_name, collect_register)
12532 (collect_register_as_string, collect_register_by_name): Ditto.
12533 * regcache.c (struct inferior_regcache_data): Delete.
12534 (get_regcache): Rename to ...
12535 (get_thread_regcache): ... this. Adjust. Switch inferior before
12536 fetching registers.
12537 (regcache_invalidate_one): Adjust.
12538 (regcache_invalidate): Fix prototype.
12539 (new_register_cache): Return the new register cache.
12540 (free_register_cache): Change prototype.
12541 (realloc_register_cache): Adjust.
12542 (registers_to_string): Change prototype to take a regcache. Adjust.
12543 (registers_from_string): Ditto.
12544 (register_data): Ditto.
12545 (supply_register): Ditto.
12546 (supply_register_by_name): Ditto.
12547 (collect_register): Ditto.
12548 (collect_register_as_string): Ditto.
12549 (collect_register_by_name): Ditto.
12550 * server.c (process_serial_event): Adjust.
12551 * linux-low.h (regset_fill_func, regset_store_func): Change
12553 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12555 * linux-low.c (get_stop_pc): Adjust.
12556 (check_removed_breakpoint): Adjust.
12557 (linux_wait_for_event): Adjust.
12558 (linux_resume_one_lwp): Adjust.
12559 (fetch_register): Add regcache parameter. Adjust.
12560 (usr_store_inferior_registers): Ditto.
12561 (regsets_fetch_inferior_registers): Ditto.
12562 (regsets_store_inferior_registers): Ditto.
12563 (linux_fetch_registers, linux_store_registers): Ditto.
12564 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12566 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12568 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12569 prototype to take a regcache.
12570 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12571 * remote-utils.c (convert_ascii_to_int, outreg)
12572 (prepare_resume_reply): Change prototype to take a regcache.
12574 * target.h (struct target_ops) <fetch_registers, store_registers>:
12575 Change prototype to take a regcache.
12576 (fetch_inferior_registers, store_inferior_registers): Change
12577 prototype to take a regcache. Adjust.
12578 * proc-service.c (ps_lgetregs): Adjust.
12579 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12580 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12581 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12582 take a regcache. Adjust.
12583 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12584 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12585 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12586 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12587 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12588 (cris_cannot_fetch_register):
12589 (cris_breakpoint_at): Change prototype to take a regcache.
12591 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12592 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12593 to take a regcache. Adjust.
12594 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12596 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12597 take a regcache. Adjust.
12598 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12599 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12600 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12601 * linux-mips-low.c (mips_get_pc):
12602 (mips_set_pc): Change prototype to take a regcache. Adjust.
12603 (mips_reinsert_addr): Adjust.
12604 (mips_collect_register): Change prototype to take a regcache.
12606 (mips_supply_register):
12607 (mips_collect_register_32bit, mips_supply_register_32bit)
12608 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12609 (mips_store_fpregset): Ditto.
12610 * linux-ppc-low.c (ppc_supply_ptrace_register)
12611 (ppc_supply_ptrace_register): Ditto.
12612 (parse_spufs_run): Adjust.
12613 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12614 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12615 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12616 take a regcache. Adjust.
12617 * linux-s390-low.c (s390_collect_ptrace_register)
12618 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12619 (s390_set_pc): Change prototype to take a regcache. Adjust.
12620 (s390_arch_setup): Adjust.
12621 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12622 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12623 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12624 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12625 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12627 (sparc_breakpoint_at): Adjust.
12628 * linux-xtensa-low.c (xtensa_fill_gregset):
12629 (xtensa_store_gregset):
12630 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12631 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12632 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12633 prototype to take a regcache. Adjust.
12634 * win32-arm-low.c (arm_fetch_inferior_register)
12635 (arm_store_inferior_register): Change prototype to take a
12637 * win32-i386-low.c (i386_fetch_inferior_register)
12638 (i386_store_inferior_register): Change prototype to take a
12640 * win32-low.c (child_fetch_inferior_registers)
12641 (child_store_inferior_registers): Change prototype to take a
12643 (win32_wait): Adjust.
12644 (win32_fetch_inferior_registers): Change prototype to take a
12646 (win32_store_inferior_registers): Adjust.
12647 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12648 store_inferior_register>: Change prototype to take a regcache.
12650 2010-01-20 Doug Evans <dje@google.com>
12652 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12654 (linux_wait_for_event1, linux_init_signals): Ditto.
12655 (W_STOPCODE): Provide definition if missing.
12657 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12659 * linux-low.c (linux_core_of_thread): New.
12660 (compare_ints, show_process, list_threads): New.
12661 (linux_qxfer_osdata): Report threads and cores.
12662 (linux_target_op): Register linux_core_of_thread.
12663 * remote-utils.c (prepare_resume_reply): Report the core.
12664 (buffer_xml_printf): Support %d specifier.
12665 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12667 (handle_query): Handle qXfer:threads. Announce availability
12669 * target.h (struct target_ops): New field core_of_thread.
12671 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12673 * Makefile.in (clean): Remove new generated files.
12674 (reg-s390.o, reg-s390.c): Remove rules.
12675 (reg-s390x.o, reg-s390x.c): Likewise.
12676 (s390-linux32.o, s390-linux32.c): Add rules.
12677 (s390-linux64.o, s390-linux64.c): Likewise.
12678 (s390x-linux64.o, s390x-linux64.c): Likewise.
12679 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12680 * linux-s390-low.c: Include <elf.h>.
12681 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12682 (init_registers_s390): Remove prototype.
12683 (init_registers_s390x): Likewise.
12684 (init_registers_s390_linux32): Add prototype.
12685 (init_registers_s390_linux64): Likewise.
12686 (init_registers_s390x_linux64): Likewise.
12687 (s390_num_regs_3264): New define.
12688 (s390_regmap_3264): New global variable.
12689 (s390_cannot_fetch_register): Remove obsolete check.
12690 (s390_cannot_store_register): Likewise.
12691 (s390_collect_ptrace_register): Handle upper/lower register halves.
12692 (s390_supply_ptrace_register): Likewise.
12693 (s390_fill_gregset): Update to register number changes.
12694 (s390_get_hwcap): New routine.
12695 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12696 Install appropriate regmap and register set.
12698 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12700 * server.c (gdbserver_version): Update copyright year to 2010.
12701 * gdbreplay.c (gdbreplay_version): Likewise.
12703 2009-12-28 Doug Evans <dje@google.com>
12705 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12706 elf/external.h. Include <elf.h> instead but only if necessary.
12708 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12710 * linux-low.c (linux_remove_process): Remove `detaching'
12711 parameter. Don't release/detach from thread_db here.
12712 (linux_kill): Release/detach from thread_db here, ...
12713 (linux_detach): ... and here, before actually detaching.
12714 (linux_wait_1): ... and here, when a process exits.
12715 * thread-db.c (any_thread_of): New.
12716 (thread_db_free): Switch the current inferior to a thread of the
12719 2009-12-21 Doug Evans <dje@google.com>
12721 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12723 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12724 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12725 warning ifndef __NR_tkill. Move setting of errno there too.
12726 Delete unnecessary resetting of errno after syscall.
12727 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12729 * configure.ac: Check for dladdr.
12730 * config.in: Regenerate.
12731 * configure: Regenerate.
12732 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12733 (try_thread_db_load): Update.
12735 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12737 2009-12-18 Doug Evans <dje@google.com>
12739 * event-loop.c: Include unistd.h if it exists.
12741 * linux-low.c (my_waitpid): Move definition away from being in
12742 between linux_tracefork_child/linux_test_for_tracefork.
12744 * gdb_proc_service.h (psaddr_t): Fix type.
12745 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12746 signature to match glibc.
12748 2009-12-16 Doug Evans <dje@google.com>
12750 * linux-low.c (linux_read_memory): Fix argument to read.
12752 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12754 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12755 events, don't leave current_inferior pointing at null.
12757 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12759 * win32-low.c (LOG): Delete.
12760 (OUTMSG): Output to stderr.
12761 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12762 on compile time LOG macro.
12763 (win32_wait): Fix debug output.
12765 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12767 * win32-low.c (win32_add_one_solib): If the dll name is
12768 "ntdll.dll", prepend the system directory to the dll path.
12770 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12772 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12774 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12775 Vladimir Prus <vladimir@codesourcery.com>
12777 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12778 * configure.ac: Check for __mcoldfire__ and set
12779 gdb_cv_m68k_is_coldfire.
12780 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12781 reg-cf.o and reg-m68k.o.
12782 * configure: Regenerated.
12784 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12786 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12787 Pass it to thread_db_free.
12788 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12789 proper `detaching' argument to linux_remove_process.
12790 * linux-low.h (thread_db_free): Add `detaching' parameter.
12791 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12793 (thread_db_free): Add `detaching' parameter. Only
12794 call td_ta_clear_event if detaching from process.
12796 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12798 * thread-db.c (thread_db_free): Fix typo.
12800 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12803 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12805 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12807 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12808 with an i686 compiler.
12809 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12811 * configure: Rebuilt.
12813 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12817 * server.c (handle_search_memory_1): Correct read_addr initialization
12818 in loop for searching subsequent chunks.
12820 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12822 * configure.ac: New --with-libthread-db option.
12823 * thread-db.c: Allow direct dependence on libthread_db.
12824 (thread_db_free): Adjust.
12825 * config.in: Regenerate.
12826 * configure: Likewise.
12828 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12831 * thread-db.c (attach_thread): New function.
12832 (maybe_attach_thread): Return success/failure.
12833 (find_new_threads_callback): Adjust.
12834 (thread_db_find_new_threads): Loop until no new threads.
12836 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12838 * proc-service.c (ps_lgetregs): Formatting.
12840 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12842 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12843 * configure.ac: Adjust.
12844 * linux-low.h (struct process_info_private): Move members to struct
12846 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12847 * linux-low.c (linux_remove_process): Adjust.
12848 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12849 * server.c (handle_query): Move code ...
12850 (handle_monitor_command): ... here. New function.
12851 * target.h (struct target_ops): New member.
12852 * thread-db.c (struct thread_db): New.
12853 (libthread_db_search_path): New variable.
12854 (thread_db_create_event, thread_db_enable_reporting)
12855 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12856 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12857 (try_thread_db_load_1, dladdr_to_soname): New functions.
12858 (try_thread_db_load, thread_db_load_search): New functions.
12859 (thread_db_init): Search for libthread_db.
12860 (thread_db_free): New function.
12861 (thread_db_handle_monitor_command): Likewise.
12862 * config.in: Regenerate.
12863 * configure: Regenerate.
12865 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12867 * spu-low.c (spu_kill): Wait for inferior to terminate.
12868 Call clear_inferiors.
12869 (spu_detach): Call clear_inferiors.
12871 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12873 * aclocal.m4: Regenerate.
12874 * config.in: Likewise.
12875 * configure: Likewise.
12877 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12879 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12880 (parse_spufs_run): New function.
12881 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12882 (ppc_breakpoint_at): Handle SPU breakpoints.
12884 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12886 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12887 (SPUFS_MAGIC): Define.
12888 (spu_enumerate_spu_ids): New function.
12889 (linux_qxfer_spu): New function.
12890 (linux_target_ops): Install linux_qxfer_spu.
12892 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12894 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12895 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12896 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12897 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12898 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12899 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12900 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12901 (init_registers_powerpc_cell32l): Add prototype.
12902 (init_registers_powerpc_cell64l): Likewise.
12903 (ppc_arch_setup): Detect Cell/B.E. architecture.
12905 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12907 * Makefile.in (datarootdir): New variable.
12909 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12911 * linux-low.c (linux_write_memory): Update debugging output.
12912 * Makefile.in (clean): Add new descriptions.
12913 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12914 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12915 * configure.srv: Add new files for arm*-*-linux*.
12916 * linux-arm-low.c: Add new declarations.
12917 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12918 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12919 (HWCAP_VFPv3D16): New.
12920 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12921 instead of __IWMMXT__.
12922 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12923 (arm_arch_setup): New.
12924 (target_regsets): Remove #ifdef. Add VFP regset.
12925 (the_low_target): Use arm_arch_setup.
12927 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12929 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12930 the main thread again.
12932 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12934 Adding Neutrino gdbserver.
12935 * configure: Regenerated.
12936 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12937 * configure.srv (i[34567]86-*-nto*): New target.
12938 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12939 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12940 (nto_comctrl) [__QNX__]: New function.
12941 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12943 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12945 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12948 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12949 Pedro Alves <pedro@codesourcery.com>
12951 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12952 don't support CONTEXT_EXTENDED_REGISTERS.
12953 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12954 (the_low_target): Install them.
12955 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12956 failing with ERROR_PIPE_NOT_CONNECTED.
12958 2009-06-30 Doug Evans <dje@google.com>
12959 Pierre Muller <muller@ics.u-strasbg.fr>
12961 Add h/w watchpoint support to x86-linux, win32-i386.
12962 * Makefile.in (SFILES): Add i386-low.c
12963 (i386_low_h): Define.
12964 (i386-low.o): Add dependencies.
12965 (linux-x86-low.o): Add i386-low.h dependency.
12966 (win32-i386-low.o): Ditto.
12967 * i386-low.c: New file.
12968 * i386-low.h: New file.
12969 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12970 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12971 * linux-low.c (linux_add_process): Initialize arch_private.
12972 (linux_remove_process): Free arch_private.
12973 (add_lwp): Initialize arch_private.
12974 (delete_lwp): Free arch_private.
12975 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12977 * linux-low.h (process_info_private): New member arch_private.
12978 (lwp_info): New member arch_private.
12979 (linux_target_ops): New members new_process, new_thread,
12981 (ptid_of): New macro.
12982 * linux-x86-low.c: Include stddef.h, i386-low.h.
12983 (arch_process_info): New struct.
12984 (arch_lwp_info): New struct.
12985 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12986 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12987 (i386_dr_low_get_status): New function.
12988 (x86_insert_point, x86_remove_point): New functions.
12989 (x86_stopped_by_watchpoint): New function.
12990 (x86_stopped_data_address): New function.
12991 (x86_linux_new_process, x86_linux_new_thread): New functions.
12992 (x86_linux_prepare_to_resume): New function.
12993 (the_low_target): Add entries for insert_point, remove_point,
12994 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12996 * server.c (debug_hw_points): New global.
12997 (monitor_show_help): Document set debug-hw-points.
12998 (handle_query): Process "set debug-hw-points".
12999 * server.h (debug_hw_points): Declare.
13000 (paddress): Declare.
13001 * utils.c (NUMCELLS, CELLSIZE): New macros.
13002 (get_sell, xsnprintf, paddress): New functions.
13003 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13004 remove_point, stopped_by_watchpoint, stopped_data_address.
13005 * win32-i386-low.c: Include i386-low.h.
13006 (debug_reg_state): Replaces dr.
13007 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13008 (i386_dr_low_get_status): New function.
13009 (i386_insert_point, i386_remove_point): New functions.
13010 (i386_stopped_by_watchpoint): New function.
13011 (i386_stopped_data_address): New function.
13012 (i386_initial_stuff): Update.
13013 (get_thread_context,set_thread_context,i386_thread_added): Update.
13014 (the_low_target): Add entries for insert_point,
13015 remove_point, stopped_by_watchpoint, stopped_data_address.
13016 * win32-low.c (win32_insert_watchpoint): New function.
13017 (win32_remove_watchpoint): New function.
13018 (win32_stopped_by_watchpoint): New function.
13019 (win32_stopped_data_address): New function.
13020 (win32_target_ops): Add entries for insert_watchpoint,
13021 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13022 * win32-low.h (win32_target_ops): New members insert_point,
13023 remove_point, stopped_by_watchpoint, stopped_data_address.
13025 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13027 * server.c (process_serial_event): Re-return unsupported, not
13028 error, if the type isn't recognized. Re-allow supporting only
13029 insert or remove packets. Also call require_running for
13030 breakpoints. Add missing break statement to default case. Tidy.
13031 * target.h (struct target_ops): Rename insert_watchpoint to
13032 insert_point, and remove_watchpoint to remove_point.
13034 * linux-low.h (struct linux_target_ops): Likewise.
13035 * linux-low.c (linux_insert_watchpoint): Rename to ...
13036 (linux_insert_point): ... this. Adjust.
13037 (linux_remove_watchpoint): Rename to ...
13038 (linux_remove_point): ... this. Adjust.
13039 (linux_target_ops): Adjust.
13040 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13041 (cris_insert_point): ... this.
13042 (cris_remove_watchpoint): Rename to ...
13043 (cris_remove_point): ... this.
13044 (the_low_target): Adjust.
13046 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13048 * server.c (handle_v_kill): Pass signal_pid to
13049 kill_inferior if multi_process is zero.
13051 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13053 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13054 * target.h (target_ops): Comment for *_watchpoint to make it clear
13055 the functions can get types '0' and '1'.
13057 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13059 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13060 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13061 * regcache.c (get_regcache): Likewise.
13062 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13063 * win32-low.c (child_fetch_inferior_registers): Remove check for
13066 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13067 Pedro Alves <pedro@codesourcery.com>
13069 * target.h (struct target_ops) <supports_multi_process>: New
13071 (target_supports_multi_process): New.
13072 * server.c (handle_query): Even if GDB reports support, only
13073 enable multi-process if the target also supports it. Report
13074 multi-process support only if the target backend supports it.
13075 * linux-low.c (linux_supports_multi_process): New function.
13076 (linux_target_ops): Install it as target_supports_multi_process
13079 2009-05-24 Doug Evans <dje@google.com>
13081 Global renaming of find_thread_pid to find_thread_ptid.
13082 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13083 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13084 All callers updated.
13086 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13087 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13090 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13091 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13092 (linux_resume_one_lwp): Ditto.
13094 2009-05-23 Doug Evans <dje@google.com>
13096 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13097 from struct inferior_list_entry * to struct lwp_info *.
13098 All callers updated.
13100 2009-05-13 Doug Evans <dje@google.com>
13102 * linux-x86-low.c: Don't include assert.h.
13103 (x86_siginfo_fixup): Use fatal, not assert.
13104 (x86_arch_setup): Fix comment.
13106 2009-05-12 Doug Evans <dje@google.com>
13108 Biarch support for i386/amd64 gdbserver.
13109 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13110 Add linux-x86-low.c.
13111 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13112 (linux-x86-low.o): Add.
13113 * linux-x86-64-low.c: Delete.
13114 * linux-i386-low.c: Delete.
13115 * linux-x86-low.c: New file.
13116 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13118 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13120 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13121 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13122 (linux_child_pid_to_exec_file): New function.
13123 (elf_64_header_p, elf_64_file_p): New functions.
13124 (siginfo_fixup): New function.
13125 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13126 give target a chance to convert layout.
13127 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13128 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13130 2009-05-07 Doug Evans <dje@google.com>
13132 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13133 (regsets_store_inferior_registers): Ditto.
13135 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13139 * linux-low.c (must_set_ptrace_flags): Delete.
13140 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13142 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13143 `lwp->must_set_ptrace_flags' instead.
13144 (linux_wait_for_event_1): Set ptrace options here.
13145 (linux_wait_1): ... not here.
13147 2009-04-30 Doug Evans <dje@google.com>
13149 * inferiors.c (started_inferior_callback): New function.
13150 (attached_inferior_callback): New function.
13151 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13152 * server.c (print_started_pid, print_attached_pid): New functions.
13153 (detach_or_kill_for_exit): New function.
13154 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13155 * server.h (have_started_inferiors_p): Declare.
13156 (have_attached_inferiors_p): Declare.
13158 * inferiors.c (remove_process): Fix memory leak, free process.
13159 * linux-low.c (linux_remove_process): New function.
13160 (linux_kill): Call it instead of remove_process.
13161 (linux_detach, linux_wait_1): Ditto.
13163 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13165 * configure.srv: Add x86 Windows CE target.
13167 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13169 * inferiors.c (get_thread_process): Make global.
13170 * server.h (get_thread_process): Add prototype.
13171 * thread-db.c (find_one_thread): Use get_thread_process
13172 instead of current_process.
13173 (thread_db_get_tls_address): Do not crash if called when
13174 thread layer is not yet initialized.
13176 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13178 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13179 * spu-low.c (current_tid): Rename to ...
13180 (current_ptid): ... this.
13181 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13182 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13183 ptid_get_lwp (current_ptid) instead of current_tid.
13184 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13185 instead of current_tid. Use find_process_pid to verify pid
13186 argument is valid. Pass proper argument to remove_process.
13187 (spu_thread_alive): Compare current_ptid instead of current_tid.
13188 (spu_resume): Likewise.
13190 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13192 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13195 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13197 Implement the multiprocess extensions, and add linux multiprocess
13200 * server.h (ULONGEST): Declare.
13201 (struct ptid, ptid_t): New.
13202 (minus_one_ptid, null_ptid): Declare.
13203 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13204 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13205 (struct inferior_list_entry): Change `id' type from unsigned from
13207 (struct sym_cache, struct breakpoint, struct
13208 process_info_private): Forward declare.
13209 (struct process_info): Declare.
13210 (current_process): Declare.
13211 (all_processes): Declare.
13212 (initialize_inferiors): Declare.
13213 (add_thread): Adjust to use ptid_t.
13214 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13215 (add_process, remove_process, find_thread_pid): Declare.
13216 (find_inferior_id): Adjust to use ptid_t.
13217 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13218 (multi_process): Declare.
13219 (push_event): Adjust to use ptid_t.
13220 (read_ptid, write_ptid): Declare.
13221 (prepare_resume_reply): Adjust to use ptid_t.
13222 (clear_symbol_cache): Declare.
13223 * inferiors.c (all_processes): New.
13224 (null_ptid, minus_one_ptid): New.
13225 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13226 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13227 (add_thread): Change unsigned long to ptid. Remove gdb_id
13229 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13230 (gdb_id_to_thread): Rename to ...
13231 (find_thread_pid): ... this. Change unsigned long to ptid.
13232 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13233 (loaded_dll, pull_pid_from_list): Adjust.
13234 (add_process, remove_process, find_process_pid)
13235 (get_thread_process, current_process, initialize_inferiors): New.
13236 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13237 (struct target_waitstatus) <related_pid>: Ditto.
13238 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13239 return type to int.
13240 (struct target_ops) <join>: Add `pid' argument.
13241 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13242 (struct target_ops) <wait>: Add `ptid' field. Change return type
13244 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13245 (mywait): Add `ptid' argument. Change return type to ptid_t.
13246 (target_pid_to_str): Declare.
13247 * target.c (set_desired_inferior): Adjust to use ptids.
13248 (mywait): Add new `ptid' argument. Adjust.
13249 (target_pid_to_str): New.
13250 * mem-break.h (free_all_breakpoints): Declare.
13251 * mem-break.c (breakpoints): Delelete.
13252 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13253 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13254 to use per-process breakpoint list.
13255 (free_all_breakpoints): New.
13256 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13257 (symbol_cache, all_symbols_looked_up): Delete.
13259 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13261 (prepare_resume_reply): Change ptid argument's type from unsigned
13262 long to ptid_t. Adjust. Implement W;process and X;process.
13263 (free_sym_cache, clear_symbol_cache): New.
13264 (look_up_one_symbol): Adjust to per-process symbol cache. *
13265 * server.c (cont_thread, general_thread, step_thread): Change type
13267 (attached): Delete.
13268 (multi_process): New.
13269 (last_ptid): Change type to ptid_t.
13270 (struct vstop_notif) <ptid>: Change type to ptid_t.
13271 (queue_stop_reply, push_event): Change `ptid' argument's type to
13273 (discard_queued_stop_replies): Add `pid' argument.
13274 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13275 changes. Don't reference the `attached' global.
13276 (attach_inferior): Adjust to mywait interface changes.
13277 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13278 features. Handle and report "multiprocess+". Handle
13280 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13282 (handle_v_kill): New.
13283 (handle_v_stopped): Adjust to use target_pid_to_str.
13284 (handle_v_requests): Allow multiple attaches and runs when
13285 multiprocess extensions are in effect. Handle "vKill".
13286 (myresume): Adjust to use ptids.
13287 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13288 (handle_status): Adjust to discard_queued_stop_replies interface
13290 (first_thread_of, kill_inferior_callback)
13291 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13292 (main): Call initialize_inferiors. Adjust to use ptids, killing
13293 and detaching from all inferiors. Handle multiprocess packet
13295 * linux-low.h: Include gdb_proc_service.h.
13296 (struct process_info_private): New.
13297 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13298 <lwpid_of>: Use ptid_get_lwp.
13299 (get_lwp_thread): Adjust.
13300 (struct lwp_info): Add `dead' member.
13301 (find_lwp_pid): Declare.
13302 * linux-low.c (thread_db_active): Delete.
13303 (new_inferior): Adjust comment.
13304 (inferior_pid): Delete.
13305 (linux_add_process): New.
13306 (handle_extended_wait): Adjust.
13307 (add_lwp): Change unsigned long to ptid.
13308 (linux_create_inferior): Add process to processes table. Adjust
13309 to use ptids. Don't set new_inferior here.
13310 (linux_attach_lwp): Rename to ...
13311 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13312 it. Adjust to use ptids.
13313 (linux_attach_lwp): New.
13314 (linux_attach): Add process to processes table. Don't set
13316 (struct counter): New.
13317 (second_thread_of_pid_p, last_thread_of_process_p): New.
13318 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13319 multiple processes.
13320 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13321 processes. Remove process from process table.
13322 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13323 to multiple processes.
13324 (any_thread_of): New.
13325 (linux_detach): Add `pid' argument, and handle it. Remove process
13326 from processes table.
13327 (linux_join): Add `pid' argument. Handle it.
13328 (linux_thread_alive): Change unsighed long argument to ptid_t.
13329 Consider dead lwps as not being alive.
13330 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13331 threads we're not interested in.
13332 (same_lwp, find_lwp_pid): New.
13333 (linux_wait_for_lwp): Change `pid' argument's type from int to
13335 (linux_wait_for_event): Rename to ...
13336 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13337 from int to ptid_t. Adjust.
13338 (linux_wait_for_event): New.
13339 (linux_wait_1): Add `ptid' argument. Change return type to
13340 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13341 that exit from the process table.
13342 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13344 (mark_lwp_dead): New.
13345 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13346 stopping all threads, mark its main lwp as dead.
13347 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13349 (fetch_register, usr_store_inferior_registers)
13350 (regsets_fetch_inferior_registers)
13351 (regsets_store_inferior_registers, linux_read_memory)
13352 (linux_write_memory): Inline `inferior_pid'.
13353 (linux_look_up_symbols): Adjust to use per-process
13354 `thread_db_active'.
13355 (linux_request_interrupt): Adjust to use ptids.
13356 (linux_read_auxv): Inline `inferior_pid'.
13357 (initialize_low): Don't reference thread_db_active.
13358 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13359 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13360 (ps_getpid): Return the pid of the current inferior.
13361 * thread-db.c (proc_handle, thread_agent): Delete.
13362 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13364 (find_one_thread): Change argument type to ptid_t. Adjust to
13366 (maybe_attach_thread): Adjust to per-process data and ptids.
13367 (thread_db_find_new_threads): Ditto.
13368 (thread_db_init): Ditto.
13369 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13370 processes table. Adjust to use ptids.
13371 (spu_kill, spu_detach): Adjust interface. Remove process from
13373 (spu_join, spu_thread_alive): Adjust interface.
13374 (spu_wait): Adjust interface. Remove process from processes
13375 table. Adjust to use ptids.
13376 * win32-low.c (current_inferior_tid): Delete.
13377 (current_inferior_ptid): New.
13378 (debug_event_ptid): New.
13379 (thread_rec): Take a ptid. Adjust.
13380 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13381 (child_delete_thread): Ditto.
13382 (do_initial_child_stuff): Add `attached' argument. Add process to
13384 (child_fetch_inferior_registers, child_store_inferior_registers):
13386 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13387 (win32_attach): Pass 1 to do_initial_child_stuff.
13388 (win32_kill): Adjust interface. Remove process from processes
13390 (win32_detach): Ditto.
13391 (win32_join): Adjust interface.
13392 (win32_thread_alive): Take a ptid.
13393 (win32_resume): Adjust to use ptids.
13394 (get_child_debug_event): Ditto.
13395 (win32_wait): Adjust interface. Remove exiting process from
13398 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13400 Non-stop mode support.
13402 * server.h (non_stop): Declare.
13403 (gdb_client_data, handler_func): Declare.
13404 (delete_file_handler, add_file_handler, start_event_loop):
13406 (handle_serial_event, handle_target_event, push_event)
13407 (putpkt_notif): Declare.
13408 * target.h (enum resume_kind): New.
13409 (struct thread_resume): Replace `step' field by `kind' field.
13410 (TARGET_WNOHANG): Define.
13411 (struct target_ops) <wait>: Add `options' argument.
13412 <supports_non_stop, async, start_non_stop>: New fields.
13413 (target_supports_non_stop, target_async): New.
13414 (start_non_stop): Declare.
13415 (mywait): Add `options' argument.
13416 * target.c (mywait): Add `options' argument. Print child exit
13417 notifications here.
13418 (start_non_stop): New.
13419 * server.c (non_stop, own_buf, mem_buf): New globals.
13420 (struct vstop_notif): New.
13421 (notif_queue): New global.
13422 (queue_stop_reply, push_event, discard_queued_stop_replies)
13423 (send_next_stop_reply): New.
13424 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13426 (attach_inferior): In non-stop mode, don't wait for the target
13428 (handle_general_set): Handle QNonStop.
13429 (handle_query): When handling qC, return the current general
13430 thread, instead of the first thread of the list.
13431 (handle_query): If the backend supports non-stop mode, include
13432 QNonStop+ in the qSupported query response.
13433 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13435 (handle_v_attach, handle_v_run): Handle non-stop mode.
13436 (handle_v_stopped): New.
13437 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13438 (myresume): Adjust to use resume_kind. Handle non-stop.
13439 (queue_stop_reply_callback): New.
13440 (handle_status): Handle non-stop mode.
13441 (main): Clear non_stop flag on reconnection. Use the event-loop.
13442 Refactor serial protocol handling from here ...
13443 (process_serial_event): ... to this new function. When GDB
13444 selects any thread, select one here. In non-stop mode, wait until
13445 GDB acks all pending events before exiting.
13446 (handle_serial_event, handle_target_event): New.
13447 * remote-utils.c (remote_open): Install remote_desc in the event
13449 (remote_close): Remove remote_desc from the event loop.
13450 (putpkt_binary): Rename to...
13451 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13452 (putpkt_binary): New as wrapper around putpkt_binary_1.
13453 (putpkt_notif): New.
13454 (prepare_resume_reply): In non-stop mode, don't change the
13456 * event-loop.c: New.
13457 * Makefile.in (OBJ): Add event-loop.o.
13458 (event-loop.o): New rule.
13460 * linux-low.h (pid_of): Moved here.
13462 (get_lwp_thread): Use lwpid_of.
13463 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13464 * linux-low.c (pid_of): Delete.
13465 (inferior_pid): Use lwpid_of.
13466 (linux_event_pipe): New.
13467 (target_is_async_p): New.
13469 (handle_extended_wait): Use lwpid_of.
13470 (add_lwp): Don't set lwpid field.
13471 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13472 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13473 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13474 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13475 first. Adjust to linux_wait_for_event interface changes. Use
13477 (linux_detach): Don't delete the main lwp here.
13478 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13479 (status_pending_p): Don't consider explicitly suspended lwps.
13480 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13481 pointer. Add OPTIONS argument. Change return type to int. Use
13482 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13483 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13484 pointer. Add status pointer argument. Return a pid instead of a
13485 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13486 changes. In non-stop mode, don't switch to a random thread.
13487 (linux_wait): Rename to...
13488 (linux_wait_1): ... this. Add target_options argument, and handle
13489 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13490 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13491 clean exit and signal exit code. Don't stop all threads in
13492 non-stop mode. In all-stop mode, only stop all threads when
13493 reporting a stop to GDB. Handle explicit thread stop requests.
13494 (async_file_flush, async_file_mark): New.
13496 (send_sigstop): Use lwpid_of.
13497 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13498 interface changes. In non-stop mode, don't switch to a random
13500 (linux_resume_one_lwp): Use lwpid_of.
13501 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13502 (linux_resume_one_thread): ... this. Handle resume_stop. In
13503 non-stop mode, don't look for pending flag in all threads.
13504 (resume_status_pending_p): Don't consider explicitly suspended
13506 (my_waitpid): Reimplement. Emulate __WALL.
13507 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13509 (sigchld_handler, linux_supports_non_stop, linux_async)
13510 (linux_start_non_stop): New.
13511 (linux_target_ops): Register linux_supports_non_stop, linux_async
13512 and linux_start_non_stop.
13513 (initialize_low): Install SIGCHLD handler.
13514 * thread-db.c (thread_db_create_event, find_one_thread)
13515 (thread_db_get_tls_address): Use lwpid_of.
13516 * win32-low.c (win32_detach): Adjust to use resume_kind.
13517 (win32_wait): Add `options' argument.
13518 * spu-low.c (spu_resume): Adjust to use resume_kind.
13519 (spu_wait): Add `options' argument.
13521 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13523 Decouple target code from remote protocol.
13525 * target.h (enum target_waitkind): New.
13526 (struct target_waitstatus): New.
13527 (struct target_ops) <wait>: Return an unsigned long. Take a
13528 target_waitstatus pointer instead of a char pointer.
13529 (mywait): Likewise.
13530 * target.c (mywait): Change prototype to return an unsigned long.
13531 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13532 * server.h (thread_from_wait, old_thread_from_wait): Delete
13534 (prepare_resume_reply): Change prototype to take a
13536 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13537 (last_status, last_ptid): New.
13538 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13539 pid instead of a signal.
13540 (attach_inferior): Remove "status" and "signal" parameters.
13542 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13544 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13545 (handle_v_requests, myresume): Remove "status" and "signal"
13546 parameters. Adjust.
13547 (handle_status): New.
13548 (main): Delete local `status'. Adjust.
13549 * remote-utils.c: Include target.h.
13550 (prepare_resume_reply): Change prototype to take a
13551 target_waitstatus. Adjust.
13553 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13555 * spu-low.c (spu_wait): Adjust.
13556 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13558 (win32_wait): Adjust.
13560 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13562 * target.h (struct thread_resume): Delete leave_stopped member.
13563 (struct target_ops): Add a `n' argument to the `resume' callback.
13564 * server.c (start_inferior): Adjust.
13565 (handle_v_cont, myresume): Adjust.
13566 * linux-low.c (check_removed_breakpoint): Adjust to resume
13567 interface change, and to removed leave_stopped field.
13568 (resume_ptr): Delete.
13569 (struct thread_resume_array): New.
13570 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13571 resume interface change.
13572 (linux_continue_one_thread, linux_queue_one_thread)
13573 (resume_status_pending_p): Check if the resume field is NULL
13574 instead of checking the leave_stopped member.
13575 (linux_resume): Adjust to the target resume interface change.
13576 * spu-low.c (spu_resume): Adjust to the target resume interface
13578 * win32-low.c (win32_detach, win32_resume): Ditto.
13580 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13582 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13584 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13586 (linux_continue_one_thread): Only preserve the stepping flag if
13587 there's a pending breakpoint.
13589 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13591 * server.c (main): After the inferior having exited, call
13592 remote_close before exiting gdbserver.
13594 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13596 Fix size of FPSCR in Power 7 processors.
13597 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13598 (PPC_FEATURE_HAS_DFP): New #define.
13599 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13602 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13604 * server.c (handle_query) Whitespace and formatting.
13606 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13608 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13609 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13610 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13611 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13612 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13613 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13614 Makefile.in, configure.ac: Fix whitespace throughout.
13615 * configure: Regenerate.
13617 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13619 * inferiors.c (find_inferior): Make it safe for the callback
13620 function to delete the currently iterated inferior.
13622 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13624 * Makefile.in (linuw_low_h): Move higher.
13625 (thread-db.o): Depend on $(linux_low_h).
13627 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13629 Rename "process" to "lwp" throughout.
13631 * linux-low.c (all_processes): Rename to...
13632 (all_lwps): ... this.
13633 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13634 (add_process): Rename to ...
13635 (add_lwp): ... this. Adjust.
13636 (linux_create_inferior): Adjust.
13637 (linux_attach_lwp): Adjust.
13638 (linux_attach): Adjust.
13639 (linux_kill_one_process): Rename to ...
13640 (linux_kill_one_lwp): ... this. Adjust.
13641 (linux_kill): Adjust.
13642 (linux_detach_one_process): Rename to ...
13643 (linux_detach_one_lwp): ... this. Adjust.
13644 (linux_detach): Adjust.
13645 (check_removed_breakpoint): Adjust.
13646 (status_pending_p): Adjust.
13647 (linux_wait_for_process): Rename to ...
13648 (linux_wait_for_lwp): ... this. Adjust.
13649 (linux_wait_for_event): Adjust.
13650 (send_sigstop): Adjust.
13651 (wait_for_sigstop): Adjust.
13652 (stop_all_processes): Rename to ...
13653 (stop_all_lwps): ... this.
13654 (linux_resume_one_process): Rename to ...
13655 (linux_resume_one_lwp): ... this. Adjust.
13656 (linux_set_resume_request, linux_continue_one_thread)
13657 (linux_queue_one_thread, resume_status_pending_p)
13658 (usr_store_inferior_registers, regsets_store_inferior_registers)
13659 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13661 * linux-low.h (get_process): Rename to ...
13662 (get_lwp): ... this. Adjust.
13663 (get_thread_process): Rename to ...
13664 (get_thread_lwp): ... this. Adjust.
13665 (get_process_thread): Rename to ...
13666 (get_lwp_thread): ... this. Adjust.
13667 (struct process_info): Rename to ...
13668 (struct lwp_info): ... this.
13669 (all_processes): Rename to ...
13670 (all_lwps): ... this.
13671 * proc-service.c (ps_lgetregs): Adjust.
13672 * thread-db.c (thread_db_create_event, find_one_thread)
13673 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13675 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13677 * server.c (handle_query): Handle "qAttached".
13679 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13681 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13682 GPLv3, update license URL.
13684 2009-03-01 Doug Evans <dje@google.com>
13686 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13687 (server_h): Add gdb_signals.h.
13688 (signals.o): Update.
13689 * server.h (target_signal_from_host,target_signal_to_host_p)
13690 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13692 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13694 * remote-utils.c (getpkt): Also generate remote-debug
13695 information if noack_mode is set.
13697 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13699 * server.c (handle_query): Report qXfer:siginfo:read and
13700 qXfer:siginfo:write as supported and handle them.
13701 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13702 * linux-low.c (linux_xfer_siginfo): New.
13703 (linux_target_ops): Set it.
13705 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13707 * server.c (gdbserver_usage): Mention --remote-debug.
13708 (main): Accept '--remote-debug' switch.
13710 2009-01-18 Doug Evans <dje@google.com>
13712 * regcache.c (new_register_cache): No need to check result of xcalloc.
13713 * server.c (handle_search_memory): Back out calls to xmalloc,
13714 result is checked and error is returned to user upon failure.
13715 (handle_query): Ditto. Add more checks for result of malloc.
13716 (handle_v_cont): Check result of malloc, report error back to
13718 (handle_v_run): Ditto. Call freeargv.
13719 * server.h (freeargv): Declare.
13720 * utils.c (freeargv): New fn.
13722 2009-01-15 Doug Evans <dje@google.com>
13724 * gdbreplay.c (perror_with_name): Make arg const char *.
13725 * server.h (target_signal_to_name): Make return type const char *.
13726 * thread-db.c (thread_db_err_str): Make return type const char *.
13727 * utils.c (perror_with_name): Make arg const char *.
13729 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13731 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13732 when handling a EXIT_PROCESS_DEBUG_EVENT.
13734 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13736 * gdbreplay.c (gdbreplay_version): Update copyright year.
13737 * server.c (gdbserver_version): Likewise.
13739 2009-01-05 Doug Evans <dje@google.com>
13741 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13742 (handle_extended_wait): Improve comment.
13744 2008-12-13 Doug Evans <dje@google.com>
13746 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13747 * server.h (ATTR_MALLOC): New macro.
13748 (xmalloc,xcalloc,xstrdup): Declare.
13749 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13750 * inferiors.c: Ditto.
13751 * linux-low.c: Ditto.
13752 * mem-break.c: Ditto.
13753 * regcache.c: Ditto.
13754 * remote-utils.c: Ditto.
13757 * win32-low.c: Ditto.
13759 2008-12-12 Doug Evans <dje@google.com>
13761 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13762 in debugging printf.
13764 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13766 2008-12-09 Doug Evans <dje@google.com>
13768 * linux-low.h (struct process_info): Delete member tid, unused.
13769 * thread-db.c (find_one_thread): Update.
13770 (maybe_attach_thread): Update.
13772 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13774 * target.h (struct target_ops): Add qxfer_osdata member.
13775 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13777 (linux_qxfer_osdata): New functions.
13778 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13780 * server.c (handle_query): Handle "qXfer:osdata:read:".
13781 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13782 (buffer_xml_printf): New functions.
13783 * server.h (struct buffer): New.
13784 (buffer_grow_str, buffer_grow_str0): New macros.
13785 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13786 (buffer_xml_printf): Declare.
13788 2008-11-24 Doug Evans <dje@google.com>
13790 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13792 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13794 * server.c (handle_v_run): Always use the supplied argument list.
13796 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13798 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13799 (xtensa_regmap_table): Add entry for scompare1.
13801 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13803 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13804 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13805 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13806 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13807 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13808 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13809 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13810 XML target descriptions.
13811 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13812 when inferior is running on an ISA 2.05 or later processor. Add
13813 special case to return offset for full 64-bit slot of FPSCR when
13816 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13818 * Makefile.in (SFILES, clean): Added sparc64 files.
13819 (reg-sparc64.o, reg-sparc64.c): New.
13820 * configure.srv (sparc*-*-linux*): New configuration.
13821 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13822 syscall arguments for SPARC.
13823 (regsets_store_inferior_registers): Likewise.
13824 * linux-sparc-low.c: New file.
13826 2008-10-21 Doug Evans <dje@google.com>
13828 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13829 (READLINE_DIR,READLINE_DEP): Delete.
13830 (INTERNAL_CFLAGS): Update.
13831 (LINTFLAGS): Update.
13833 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13835 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13836 whole argv from the last run, not just argv[0].
13838 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13840 * regcache.c (new_register_cache): Return NULL if the register
13841 cache size isn't known yet.
13842 (free_register_cache): Avoid dereferencing a NULL regcache.
13844 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13846 * configure.srv: Merge MIPS and MIPS64.
13848 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13850 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13852 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13854 * Makefile.in: Add required vsx dependencies.
13856 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13857 Declare init_registers_powerpc_vsx32l.
13858 Declare init_registers_powerpc_vsx64l.
13859 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13860 (ppc_arch_setup): Check for VSX in hwcap.
13861 (ppc_fill_vsxregset): New function.
13862 (ppc_store_vsxregset): New function.
13863 Add new VSX entry in regset_info target_regsets.
13865 * configure.srv: Add new VSX dependencies.
13867 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13869 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13870 (remote_open): Set or clear transport_is_reliable.
13871 (putpkt_binary): Don't expect acks in noack mode.
13872 (getpkt): Don't send ack/nac in noack mode.
13873 * server.c (handle_general_set): Handle QStartNoAckMode.
13874 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13876 (main): Reset noack_mode on every connection.
13877 * server.h (noack_mode): Declare.
13879 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13881 * Makefile.in (GDBREPLAY_OBS): New variable.
13882 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13884 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13885 Daniel Jacobowitz <dan@codesourcery.com>
13887 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13888 (usr_store_inferior_registers): Likewise.
13889 (regsets_store_inferior_registers): Likewise.
13891 2008-07-31 Rolf Jansen <rj@surtec.com>
13892 Pedro Alves <pedro@codesourcery.com>
13894 * configure.ac: Check for memmem declaration.
13895 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13896 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13897 (disable_packet_qfThreadInfo): Unconditionally compile.
13898 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13899 * configure, config.in: Regenerate.
13901 2008-07-28 Doug Kwan <dougkwan@google.com>
13903 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13904 (linux_write_memory): Remove declaration of errno.
13906 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13908 * linux-low.c (handle_extended_wait): Do not use "status"
13909 variable uninitialized.
13911 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13913 * server.c (handle_v_attach): Inhibit reporting dll changes.
13915 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13917 * remote-utils.c (prepare_resume_reply): If requested, don't
13918 output "thread:TID" in the T stop reply.
13920 * server.c (disable_packet_vCont, disable_packet_Tthread)
13921 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13922 (handle_query): If requested, disable support for qC, qfThreadInfo
13924 (handle_v_requests): If requested, disable support for vCont.
13925 (gdbserver_show_disableable): New.
13926 (main): Handle --disable-packet and --disable-packet=LIST.
13928 * server.h (disable_packet_vCont, disable_packet_Tthread)
13929 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13931 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13933 * server.c (gdbserver_usage): Mention --version.
13935 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13937 * Makefile.in (gdbreplay.o): New rule.
13939 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13941 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13942 message, not gdbserver.
13944 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13945 Nathan Sidwell <nathan@codesourcery.com>
13946 Joseph Myers <joseph@codesourcery.com>
13948 * acinclude.m4: Include ../../config/acx.m4.
13949 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13950 * configure, config.in: Regenerate.
13951 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13952 * server.c (gdbserver_version): Print PKGVERSION.
13953 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13954 (main): Adjust gdbserver_usage calls.
13955 * gdbreplay.c (version, host_name): Add declarations.
13956 (gdbreplay_version, gdbreplay_usage): New.
13957 (main): Accept --version and --help options.
13959 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13961 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13962 (arm_breakpoint_at): Handle Thumb.
13963 (the_low_target): Add comment.
13965 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13967 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13969 2008-05-09 Doug Evans <dje@google.com>
13971 * server.h (decode_search_memory_packet): Declare.
13972 * remote-utils.c (decode_search_memory_packet): New fn.
13973 * server.c (handle_search_memory_1): New fn.
13974 (handle_search_memory): New fn.
13975 (handle_query): Process qSearch:memory packets.
13977 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13979 * regcache.c (registers_length): Remove.
13980 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13981 full register packet.
13982 * regcache.h (registers_length): Remove prototype.
13983 * server.h (PBUFSIZ): Define to 16384.
13985 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13987 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13988 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13989 powerpc-64l.o, and powerpc-altivec64l.o.
13990 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13991 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13992 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13993 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13994 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13997 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13998 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13999 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14000 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14001 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14002 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14003 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14004 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14005 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14006 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14009 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14010 (init_registers_powerpc_32l): ... this new prototype.
14011 (init_registers_powerpc_32): Remove, replace by ...
14012 (init_registers_powerpc_altivec32l): ... this new prototype.
14013 (init_registers_powerpc_e500): Remove, replace by ...
14014 (init_registers_powerpc_e500l): ... this new prototype.
14015 (init_registers_ppc64): Remove, replace by ...
14016 (init_registers_powerpc_64l): ... this new prototype.
14017 (init_registers_powerpc_64): Remove, replace by ...
14018 (init_registers_powerpc_altivec64l): ... this new prototype.
14019 (ppc_num_regs): Set to 73.
14020 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14021 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14022 (ppc_cannot_store_register): Handle orig_r3 and trap.
14023 (ppc_arch_setup): Update init_registers_... calls.
14024 (ppc_fill_gregset): Handle orig_r3 and trap.
14026 * inferiors.c (clear_inferiors): Reset current_inferior.
14028 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14030 * acinclude.m4: Add override.m4.
14031 * configure: Regenerate.
14033 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14035 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14036 initial call to init_register_ppc64.
14038 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14040 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14041 single powerpc*-*-linux* case.
14042 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14044 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14046 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14047 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14049 * linux-ppc-low.c: Include <elf.h>.
14050 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14051 (ppc_hwcap): New global variable.
14052 (ppc_regmap): Remove __SPE__ #ifdef sections.
14053 (ppc_regmap_e500): New global variable.
14054 (ppc_cannot_store_register): Update __SPE__ special case.
14055 (ppc_get_hwcap): New function.
14056 (ppc_arch_setup): Use it to determine whether inferior supports
14057 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14058 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14059 Do not access registers if target does not support AltiVec.
14060 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14061 Do not access registers if target does not support SPE.
14062 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14064 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14066 * linux-low.c (disabled_regsets, num_regsets): New.
14067 (use_regsets_p): Delete.
14068 (linux_wait_for_process): Clear disabled_regsets.
14069 (regsets_fetch_inferior_registers): Check and set it.
14070 (regsets_store_inferior_registers): Likewise.
14071 (linux_fetch_registers, linux_store_registers): Do not use
14073 (initialize_low): Allocate disabled_regsets.
14075 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14077 * Makefile.in (LIBOBJS): New.
14078 (OBS): Use LIBOBJS.
14079 (memmem.o): New rule.
14080 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14081 * configure: Regenerated.
14083 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14085 * server.c (handle_query): Never return "unsupported" for
14086 qXfer:features:read queries.
14088 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14090 * server.c (get_features_xml): Fix inverted condition.
14091 (handle_query): Always support qXfer:feature:read.
14093 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14095 * server.c (wrapper_argv): New.
14096 (start_inferior): Handle wrapper_argv. If set, expect an extra
14098 (gdbserver_usage): Document --wrapper.
14099 (main): Parse --wrapper.
14101 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14103 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14104 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14105 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14106 (ppc_set_pc): Likewise.
14107 (ppc_arch_setup): New function.
14108 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14109 of collect_register.
14110 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14112 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14114 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14115 instead of linux-ppc64-low.o.
14116 * linux-ppc64-low.c: Remove file.
14117 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14118 (linux-ppc64-low.o): Remove rule.
14120 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14121 (init_registers_powerpc_64): Likewise.
14122 (ppc_regmap): Conditionally define depending on __powerpc64__.
14123 (ppc_cannot_store_register): Do not special-case "fpscr" when
14124 compiled on __powerpc64__.
14125 (ppc_collect_ptrace_register): New function.
14126 (ppc_supply_ptrace_register): New function.
14127 (ppc_breakpoint): Change type to "unsigned int".
14128 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14129 (the_low_target): Conditionally provide initializers for the
14130 arch_setup member depending on __powerpc64__. Install
14131 collect_ptrace_register and supply_ptrace_register members.
14133 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14135 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14136 * server.c (gdbserver_xmltarget): Define.
14137 (get_features_xml): Use it to replace "target.xml" and arch_string.
14139 * configure.srv: Remove srv_xmltarget. Add XML files that were
14140 mentioned there to srv_xmlfiles instead. Remove conditional tests
14141 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14142 srv_xmlfiles and srv_regobj to include all possible choices.
14143 * configure.ac (srv_xmltarget): Remove.
14144 (srv_xmlfiles): Do not add "target.xml".
14145 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14146 checks for supplementary target information.
14147 * configure: Regenerate.
14148 * Makefile.in (XML_TARGET): Remove.
14149 (target.xml): Remove rule.
14150 (clean): Do not clean up target.xml.
14151 (.PRECIOUS): Do not mention target.xml.
14153 * target.h (struct target_ops): Remove arch_string member.
14154 * linux-low.c (linux_arch_string): Remove.
14155 (linux_target_ops): Remove arch_string initializer.
14156 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14157 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14158 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14159 * spu-low.c (spu_arch_string): Remove.
14160 (spu_target_ops): Remove arch_string initializer.
14161 * win32-low.c (win32_arch_string): Remove.
14162 (win32_target_ops): Remove arch_string initializer.
14163 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14164 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14165 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14167 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14169 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14170 by collect_ptrace_register and supply_ptrace_register hooks.
14171 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14172 instead of checking for the_low_target.left_pad_xfer.
14173 (usr_store_inferior_registers): Use collect_ptrace_register callback
14174 instead of checking for the_low_target.left_pad_xfer.
14176 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14177 (s390_supply_ptrace_register): Likewise.
14178 (s390_fill_gregset): Call s390_collect_ptrace_register.
14179 (the_low_target): Update.
14181 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14182 (ppc_supply_ptrace_register): Likewise.
14183 (the_low_target): Update.
14185 * linux-i386-low.c (the_low_target): Update.
14186 * linux-x86-64-low.c (the_low_target): Update.
14188 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14190 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14191 reg-s390.o and reg-s390x.o.
14193 * linux-low.c (new_inferior): New global variable.
14194 (linux_create_inferior, linux_attach): Set it.
14195 (linux_wait_for_process): Call the_low_target.arch_setup after the
14196 target has stopped for the first time.
14197 (initialize_low): Do not call the_low_target.arch_setup.
14199 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14200 (s390_set_pc): Likewise.
14201 (s390_arch_setup): New function.
14202 (the_low_target): Use s390_arch_setup as arch_setup routine.
14204 * regcache.c (realloc_register_cache): New function.
14205 (set_register_cache): Call it for each existing regcache.
14207 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14209 * server.h (init_registers): Remove prototype.
14211 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14212 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14213 instead of init_registers ().
14214 * linux-arm-low.c (init_registers_arm): Add prototype.
14215 (init_registers_arm_with_iwmmxt): Likewise.
14216 (the_low_target): Add initializer for arch_setup field.
14217 * linux-cris-low.c (init_registers_cris): Add prototype.
14218 (the_low_target): Add initializer for arch_setup field.
14219 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14220 (the_low_target): Add initializer for arch_setup field.
14221 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14222 (the_low_target): Add initializer for arch_setup field.
14223 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14224 (the_low_target): Add initializer for arch_setup field.
14225 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14226 (the_low_target): Add initializer for arch_setup field.
14227 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14228 (the_low_target): Add initializer for arch_setup field.
14229 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14230 (init_registers_mips64_linux): Likewise.
14231 (the_low_target): Add initializer for arch_setup field.
14232 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14233 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14234 (the_low_target): Add initializer for arch_setup field.
14235 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14236 (init_registers_powerpc_64): Likewise.
14237 (the_low_target): Add initializer for arch_setup field.
14238 * linux-s390-low.c (init_registers_s390): Add prototype.
14239 (init_registers_s390x): Likewise.
14240 (the_low_target): Add initializer for arch_setup field.
14241 * linux-sh-low.c (init_registers_sh): Add prototype.
14242 (the_low_target): Add initializer for arch_setup field.
14243 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14244 (the_low_target): Add initializer for arch_setup field.
14245 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14246 (the_low_target): Add initializer for arch_setup field.
14248 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14249 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14250 instead of init_registers ().
14251 * win32-arm-low.c (init_registers_arm): Add prototype.
14252 (the_low_target): Add initializer for arch_setup field.
14253 * win32-i386-low.c (init_registers_i386): Add prototype.
14254 (the_low_target): Add initializer for arch_setup field.
14256 * spu-low.c (init_registers_spu): Add prototype.
14257 (initialize_low): Call initialie_registers_spu () instead of
14258 initialize_registers ().
14260 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14262 * server.c (handle_v_requests): When handling the vRun and vAttach
14263 packets, if already debugging a process, don't kill it. Return an
14266 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14268 * server.c (handle_query): Correct length check.
14270 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14272 * win32-low.c (do_initial_child_stuff): Add process handle
14273 parameter. Set current_process_handle and current_process_id from the
14274 parameters. Clear globals.
14275 (win32_create_inferior): Don't set current_process_handle and
14276 current_process_id here. Instead pass them on the call to
14277 do_initial_child_stuff.
14278 (win32_attach): Likewise.
14279 (win32_clear_inferiors): New.
14280 (win32_kill): Don't close the current process handle or the
14281 current thread handle here. Instead call win32_clear_inferiors.
14282 (win32_detach): Don't open a new handle to the process. Call
14283 win32_clear_inferiors.
14284 (win32_join): Don't rely on current_process_handle; open a new
14285 handle using the process id.
14286 (win32_wait): Call win32_clear_inferiors when the inferior process
14289 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14291 * server.c (monitor_show_help): Add "exit".
14293 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14295 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14296 (clean): Add reg-xtensa.c.
14297 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14298 * configure.srv (xtensa*-*-linux*) New target.
14299 * linux-xtensa-low.c: New.
14300 * xtensa-xtregs.c: New.
14302 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14304 * hostio.c: Don't include errno.h.
14305 (errno_to_fileio_errno): Move to hostio-errno.
14306 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14307 error number outputting to the target->hostio_last_error callback.
14308 (hostio_packet_error): Use FILEIO_EINVAL directly.
14309 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14310 calls to hostio_error.
14311 * hostio-errno.c: New.
14312 * server.h (hostio_last_error_from_errno): Declare.
14313 * target.h (target_ops): Add hostio_last_error member.
14314 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14315 as hostio_last_error handler.
14316 * spu-low.c (spu_target_ops): Likewise.
14317 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14318 (wince_hostio_last_error): New functions.
14319 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14320 as hostio_last_error handler.
14321 (win32_target_ops) [!_WIN32_WCE]: Register
14322 hostio_last_error_from_errno as hostio_last_error handler.
14323 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14324 (hostio-errno.o): New rule.
14325 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14326 * configure.srv (srv_hostio_err_objs): New variable. Default to
14328 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14329 * configure: Regenerate.
14331 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14333 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14334 (linux_kill, linux_detach): Clean up the process list.
14335 * remote-utils.c (remote_open): Improve port number parsing.
14336 (putpkt_binary, input_interrupt): Only send interrupts if the target
14338 * server.c (extended_protocol): Make static.
14339 (attached): Define earlier.
14340 (exit_requested, response_needed, program_argv): New variables.
14341 (target_running): New.
14342 (start_inferior): Clear attached here.
14343 (attach_inferior): Set attached here.
14344 (require_running): Define.
14345 (handle_query): Use require_running and target_running. Implement
14347 (handle_v_attach, handle_v_run): New.
14348 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14349 (gdbserver_usage): Update.
14350 (main): Redo argument parsing. Handle --debug and --multi. Handle
14351 --attach along with other options or after the port. Save
14352 program_argv. Support no initial program. Resynchronize
14353 communication with GDB after an error. Handle "monitor exit".
14354 Use require_running and target_running. Always allow the extended
14355 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14356 restart in extended mode.
14357 * README: Refer to the GDB manual. Update --attach usage.
14359 2007-12-20 Andreas Schwab <schwab@suse.de>
14361 * linux-low.c (STACK_SIZE): Define.
14362 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14363 (linux_test_for_tracefork): Likewise.
14365 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14367 * linux-low.c (linux_wait_for_event): Update messages. Do not
14368 reinsert auto-delete breakpoints.
14369 * mem-break.c (struct breakpoint): Change return type of handler to
14371 (set_breakpoint_at): Update handler type.
14372 (reinsert_breakpoint_handler): Return 1 instead of calling
14374 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14376 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14377 * mem-break.h (set_breakpoint_at): Update handler type.
14378 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14379 * win32-low.c (auto_delete_breakpoint): New.
14380 (get_child_debug_event): Use it.
14382 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14384 * configure.ac: Check for pread and pwrite.
14385 * hostio.c (handle_pread): Fall back to lseek and read.
14386 (handle_pwrite): Fall back to lseek and write.
14387 * config.in, configure: Regenerated.
14389 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14391 * server.c (myresume): Add own_buf argument.
14392 (main): Update calls.
14394 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14396 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14397 * remote-utils.c (remote_open): Do not call disable_async_io.
14398 (block_async_io): Delete.
14399 (unblock_async_io): Make static.
14400 (initialize_async_io): New.
14401 * server.c (handle_v_cont): Handle async I/O here.
14402 (myresume): Likewise. Move other common resume tasks here...
14403 (main): ... from here. Call initialize_async_io. Disable async
14404 I/O before the main loop.
14405 * server.h (initialize_async_io): Declare.
14406 (block_async_io, unblock_async_io): Delete prototypes.
14407 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14409 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14411 * remote-utils.c (readchar): Allow binary data in received messages.
14413 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14415 * win32-low.c (attaching): New global.
14416 (win32_create_inferior): Clear the `attaching' global.
14417 (win32_attach): Set the `attaching' global.
14418 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14419 attaching. Only set a breakpoint at the entry point if not
14422 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14424 * server.c (main): Don't report dll events on the initial
14425 connection on attaches.
14427 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14429 * server.c (main): Relax numerical bases supported for the pid of
14430 the --attach command line argument.
14432 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14434 * win32-low.c (win32_attach): Call OpenProcess before
14435 DebugActiveProcess, not after. Add last error output to error
14438 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14440 * win32-low.c (win32_get_thread_context)
14441 (win32_set_thread_context): New functions.
14442 (thread_rec): Use win32_get_thread_context.
14443 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14444 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14447 2007-12-03 Leo Zayas
14448 Pedro Alves <pedro_alves@portugalmail.pt>
14450 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14452 (child_add_thread): Minor cleanup.
14453 (child_continue): Resume artificially suspended threads before
14454 calling ContinueDebugEvent.
14455 (suspend_one_thread): New.
14456 (fake_breakpoint_event): New.
14457 (get_child_debug_event): Change return type to int. Check here if
14458 gdb sent an interrupt request. If a soft interrupt was requested,
14459 fake a breakpoint event. Return 0 if there is no event to handle,
14461 (win32_wait): Don't check here if gdb sent an interrupt request.
14462 Ensure there is a valid event to handle.
14463 (win32_request_interrupt): Add soft interruption method as last
14466 2007-12-03 Leo Zayas
14467 Pedro Alves <pedro_alves@portugalmail.pt>
14469 * win32-low.h (win32_thread_info): Add descriptions to the
14470 structure members. Replace `suspend_count' counter by a
14472 * win32-low.c (thread_rec): Update condition of when to get the
14473 context from the inferior. Rely on ContextFlags being set if it
14474 has already been retrieved. Only suspend the inferior thread if
14475 we haven't already. Warn if that fails.
14476 (continue_one_thread): s/suspend_count/suspended/. Only call
14477 ResumeThread once. Warn if that fails.
14479 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14481 * win32-low.c (win32_wait): Don't read from the inferior when it
14482 has already exited.
14484 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14486 * Makefile.in (win32_low_h): New variable.
14487 (win32-low.o): Add dependency on $(win32_low_h).
14488 (win32-arm-low.o, win32-i386-low.o): New rules.
14490 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14492 * hostio.c: Correct copyright year.
14494 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14496 * Makefile.in (OBS): Add hostio.o.
14497 (hostio.o): New rule.
14498 * server.h (handle_vFile): Declare.
14499 * hostio.c: New file.
14500 * server.c (handle_v_requests): Take packet_len and new_packet_len
14501 for binary packets. Call handle_vFile.
14502 (main): Update call to handle_v_requests.
14504 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14506 * linux-low.c: Include <sched.h>.
14508 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14510 * linux-low.c (linux_tracefork_grandchild): New.
14511 (linux_tracefork_child): Use clone.
14512 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14514 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14516 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14518 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14520 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14522 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14524 * inferiors.c (change_inferior_id): Delete.
14525 (add_pid_to_list, pull_pid_from_list): New.
14526 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14527 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14528 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14529 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14530 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14531 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14532 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14533 (using_threads): Always set to 1.
14534 (handle_extended_wait): New.
14535 (add_process): Do not set TID.
14536 (linux_create_inferior): Set must_set_ptrace_flags.
14537 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14538 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14539 (linux_thread_alive): Rename TID argument to LWPID.
14540 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14541 (linux_wait_for_event): Do not use TID or check using_threads. Update
14542 call to dead_thread_notify. Call handle_extended_wait.
14543 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14544 (send_sigstop): Delete sigstop_sent.
14545 (wait_for_sigstop): Avoid TID.
14546 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14547 (linux_test_for_tracefork): New.
14548 (linux_lookup_signals): Use thread_db_active and
14549 linux_supports_tracefork_flag.
14550 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14551 * linux-low.h (get_process_thread): Avoid TID.
14552 (struct process_ifo): Move thread_known and tid to the end. Remove
14554 (linux_attach_lwp, thread_db_init): Update prototypes.
14555 * server.h (change_inferior_id): Delete prototype.
14556 (add_pid_to_list, pull_pid_from_list): New prototypes.
14557 * thread-db.c (thread_db_use_events): New.
14558 (find_first_thread): Rename to...
14559 (find_one_thread): ...this. Update callers and messages. Do not
14560 call fatal. Check thread_db_use_events. Do not call
14561 change_inferior_id or new_thread_notify.
14562 (maybe_attach_thread): Update. Do not call new_thread_notify.
14563 (thread_db_init): Set thread_db_use_events. Check use_events.
14564 * utils.c (fatal, warning): Correct message prefix.
14566 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14568 * Makefile.in (clean): Remove new files.
14569 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14570 (powerpc-64.o, powerpc-64.c): New rules.
14571 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14572 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14574 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14576 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14577 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14578 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14579 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14580 (target_regsets): Add AltiVec and SPE register sets.
14581 * configure.ac: Check for AltiVec and SPE.
14582 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14583 (ppc_fill_vrregset, ppc_store_vrregset): New.
14584 (target_regsets): Add AltiVec register set.
14585 * configure: Regenerated.
14587 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14589 * linux-low.c (O_LARGEFILE): Define.
14590 (linux_read_memory): Use /proc/PID/mem.
14591 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14592 * configure, config.in: Regenerated.
14594 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14596 * linux-low.c (linux_wait_for_event): Do not pass signals while
14599 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14601 * win32-low.c (create_process): New.
14602 (win32_create_inferior): Use create_process instead of
14603 CreateProcess. If create_process failed retry appending an ".exe"
14604 suffix. Store the GetLastError result immediatelly after
14605 create_process calls and use it on the call to error.
14607 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14609 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14611 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14613 * configure.ac: Switch license to GPLv3.
14615 2007-08-01 Michael Snyder <msnyder@access-company.com>
14617 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14619 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14621 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14623 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14624 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14625 CloseToolhelp32Snapshot.
14626 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14627 CloseToolhelp32Snapshot.
14629 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14631 * server.c (main): Check for inferior exit before main loop.
14633 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14635 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14636 instead of on tmp_desc.
14638 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14639 Daniel Jacobowitz <dan@codesourcery.com>
14641 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14642 (add_thread): Minor cleanups.
14643 (clear_inferiors): Move lower in the file. Clear the DLL
14645 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14646 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14647 (xml_escape_text): New.
14648 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14650 (handle_v_cont): Report errors.
14651 (gdbserver_version): Update.
14652 (main): Correct size of own_buf. Do not report initial DLL events.
14653 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14654 (unloaded_dll, xml_escape_text): New.
14655 * win32-low.c (enum target_waitkind): Update comments.
14656 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14657 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14658 (win32_EnumProcessModules, win32_GetModuleInformation)
14659 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14660 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14661 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14662 (win32_Module32First, win32_Module32Next, load_toolhelp)
14663 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14664 (get_child_debug_event): Handle DLL events.
14665 (win32_wait): Likewise.
14667 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14669 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14670 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14672 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14674 * win32-low.c (handle_output_debug_string): Ignore event if not
14677 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14679 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14681 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14683 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14685 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14687 * inferiors.c (change_inferior_id): Add comment.
14688 * linux-low.c (check_removed_breakpoint): Add an early
14689 prototype. Improve debug output.
14690 (linux_attach): Doc update.
14691 (linux_detach_one_process, linux_detach): Clean up before releasing
14693 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14694 * linux-low.h (struct process_info): Doc improvement.
14695 * mem-break.c (delete_all_breakpoints): New.
14696 * mem-break.h (delete_all_breakpoints): New prototype.
14697 * thread-db.c (find_first_thread): New.
14698 (thread_db_create_event): Call it instead of
14699 thread_db_find_new_threads. Clean up unused variables.
14700 (maybe_attach_thread): Remove first thread handling.
14701 (thread_db_find_new_threads): Use find_first_thread.
14702 (thread_db_get_tls_address): Likewise.
14704 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14706 * thread-db.c (thread_db_find_new_threads): Add prototype.
14707 (thread_db_create_event): Check for the main thread before adding
14709 (maybe_attach_thread): Only enable event reporting if TID == 0.
14710 (thread_db_get_tls_address): Check for new threads.
14712 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14714 * linux-low.c (linux_create_inferior): Try execv before execvp.
14715 * spu-low.c (spu_create_inferior): Likewise.
14717 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14719 * linux-low.c (linux_create_inferior): Change execv to execvp.
14720 * spu-low.c (spu_create_inferior): Likewies.
14722 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14724 * Makefile.in (clean): Clean new files instead of deleted ones.
14725 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14726 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14728 * configure.srv: Specify XML files and new regformats for MIPS and
14730 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14731 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14732 an entry for the restart register.
14733 (mips_cannot_fetch_register, mips_cannot_store_register)
14734 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14735 register names to match the XML descriptions.
14736 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14737 restart register instead of $0.
14739 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14740 Markus Deuling <deuling@de.ibm.com>
14742 * remote-utils.c (decode_xfer_write): New function.
14743 * server.h (decode_xfer_write): Add prototype.
14744 * server.c (handle_query): Add PACKET_LEN argument. Support
14745 qXfer:spu:read and qXfer:spu:write packets.
14746 (main): Pass packet_len to handle_query.
14747 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14748 * target.h (target_ops): Add qxfer_spu.
14750 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14752 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14753 accessing non-seekable spufs files.
14755 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14757 * server.c (handle_query): Add reply for qC packet.
14759 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14760 Leo Zayas <lerele@champenstudios@com>
14762 * server.h (check_remote_input_interrupt_request): New function.
14763 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14764 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14765 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14766 (check_remote_input_interrupt_request): New function.
14767 * server.h (check_remote_input_interrupt_request): Declare.
14768 * win32-low.c (winapi_DebugBreakProcess,
14769 winapi_GenerateConsoleCtrlEvent): New typedefs.
14770 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14772 (win32_wait): Check for remote interrupt request
14773 with check_remote_input_interrupt_request.
14774 (win32_request_interrupt): New function.
14775 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14777 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14779 * win32-low.c (debug_registers_changed,
14780 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14781 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14782 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14783 (thread_rec): Get context using the low target.
14784 (child_add_thread): Call thread_added on the low target,
14785 which does the same thing.
14787 (do_initial_child_stuff): Remove debug registers references.
14788 Set context using the low target. Resume threads after
14789 setting the contexts.
14790 (child_continue): Remove dead variable. Remove debug
14791 registers references.
14792 (child_fetch_inferior_registers): Go through the low target.
14793 (do_child_store_inferior_registers): Remove.
14794 (child_store_inferior_registers): Go through the low target.
14795 (win32_resume): Remove debug registers references.
14796 Set context using the low target.
14797 (handle_exception): Change return type to void. Don't record
14798 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14799 first chance exception.
14800 (get_child_debug_event): Change return type to void. Remove
14801 goto loop. Always return after waiting for debug event.
14802 (win32_wait): Convert to switch statement. Handle spurious
14805 * win32-i386-low.c (debug_registers_changed,
14806 debug_registers_used): New.
14807 (initial_stuff): Rename to ...
14808 (i386_initial_stuff): ... this. Clear debug registers
14810 (store_debug_registers): Delete.
14811 (i386_get_thread_context): New.
14812 (load_debug_registers): Delete.
14813 (i386_set_thread_context): New.
14814 (i386_thread_added): New.
14815 (single_step): Rename to ...
14816 (i386_single_step): ... this.
14817 (do_fetch_inferior_registers): Rename to ...
14818 (i386_fetch_inferior_register): ... this.
14819 (i386_store_inferior_register): New.
14820 (the_low_target): Adapt to new interface.
14822 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14823 (arm_get_thread_context): New.
14824 (arm_set_thread_context): New.
14826 (do_fetch_inferior_registers): Rename to ...
14827 (arm_fetch_inferior_register): ... this.
14828 (arm_store_inferior_register): New.
14829 (arm_wince_breakpoint): Reimplement as unsigned long.
14830 (arm_wince_breakpoint_len): Define.
14831 (the_low_target): Adapt to new interface.
14833 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14834 load_debug_registers. Add get_thread_context, set_thread_context,
14835 thread_added and store_inferior_register. Rename
14836 fetch_inferior_registers to fetch_inferior_register.
14837 (regptr): Remove declaration.
14839 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14841 * linux-low.c (linux_detach): Change return type to int. Return 0.
14842 * spu-low.c (spu_detach): Likewise.
14844 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14846 * target.h (target_ops): Change return type of detach to int.
14848 (join_inferior): New.
14849 * server.c (main): Don't skip detach support on mingw32.
14850 If the inferior doesn't support detaching return error.
14851 Call join_inferior instead of using waitpid.
14852 * linux-low.c (linux_join): New.
14853 (linux_target_op): Add linux_join.
14854 * spu-low.c (spu_join): New.
14855 (spu_target_ops): Add spu_join.
14856 * win32-low.c (win32_detach): Adapt to new interface.
14857 Reopen current_process_handle before detaching. Issue a child
14858 resume before detaching.
14860 (win32_target_op): Add win32_join.
14862 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14864 * win32-low.c (win32-attach): Fix return value.
14865 * target.h (target_ops): Describe ATTACH return values.
14867 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14869 * win32-low.c (GETPROCADDRESS): Define.
14870 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14871 (winapi_DebugSetProcessKillOnExit): Likewise.
14872 (win32_create_inferior): Force usage of ansi CreateProcessA.
14873 (win32_attach): Use GETPROCADDRESS.
14874 (win32_detach): Likewise.
14876 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14878 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14880 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14882 * win32-low.c: Commit leftover changes from 2007-03-29.
14884 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14886 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14887 fields short instead of int. Add explicit padding.
14888 (i387_cache_to_fsave): Remove unnecessary casts.
14889 (i387_fsave_to_cache): Doc fix.
14890 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14892 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14894 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14895 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14897 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14899 * configure.srv (arm*-*-mingw32ce*): Move near the other
14902 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14904 * configure.ac: Add errno checking.
14905 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14906 sys/file.h and malloc.h.
14907 (AC_CHECK_DECLS): Add perror.
14908 (srv_mingwce): Handle.
14909 * configure.srv (i[34567]86-*-cygwin*): Add
14910 win32-i386-low.o to srv_tgtobj.
14911 (i[34567]86-*-mingw*): Likewise.
14912 (arm*-*-mingw32ce*): Add case.
14913 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14914 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14915 [__MINGW32CE__] (strerror): New function.
14916 [__MINGW32CE__] (errno): Define to GetLastError.
14917 [__MINGW32CE__] (COUNTOF): New macro.
14918 (remote_open): Remove extra close call.
14919 * mem-break.c (delete_breakpoint_at): New function.
14920 * mem-break.h (delete_breakpoint_at): Declare.
14921 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14922 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14923 [USE_WIN32API] (read, write): Add char* casts.
14924 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14925 * server.h: Include wincecompat.h on Windows CE.
14926 [HAVE_ERRNO_H]: Check.
14927 (perror): Declare if not declared.
14928 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14929 (perror_with_name): Remove errno declaration.
14930 * wincecompat.h: New.
14931 * wincecompat.c: New.
14932 * win32-low.h: New.
14933 * win32-arm-low.c: New.
14934 * win32-i386-low.c: New.
14935 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14936 (OUTMSG2): Make it safe.
14938 (COUNTOF): New macro.
14939 (NUM_REGS): Get it from the low target.
14940 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14941 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14942 (thread_rec): Let low target handle debug registers.
14943 (child_add_thread): Likewise.
14944 (child_init_thread_list): Likewise.
14945 (continue_one_thread): Likewise.
14947 (do_child_fetch_inferior_registers): Move to ...
14948 * win32-i386-low.c: ... here, and rename to ...
14949 (do_fetch_inferior_registers): ... this.
14950 * win32-low.c (child_fetch_inferior_registers):
14951 Go through the low target.
14952 (do_child_store_inferior_registers): Use regptr.
14953 (strwinerror): New function.
14954 (win32_create_inferior): Handle Windows CE.
14955 Use strwinerror instead of strerror on Windows error
14956 codes. Add program to the error output.
14957 Don't close the main thread handle on Windows CE.
14958 (win32_attach): Use coredll.dll on Windows CE.
14959 (win32_kill): Close current process and current
14961 (win32_detach): Use coredll.dll on Windows CE.
14962 (win32_resume): Let low target handle debug registers, and
14964 (handle_exception): Add/Remove initial breakpoint. Avoid
14965 non-existant WSTOPSIG on Windows CE.
14966 (win32_read_inferior_memory): Cast to remove warning.
14967 (win32_arch_string): Go through the low target.
14968 (initialize_low): Call set_breakpoint_data with the low
14969 target's breakpoint.
14970 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14971 FOP_REGNUM, mappings): Move to ...
14972 * win32-i386-low.c: ... here.
14973 * win32-low.c (win32_thread_info): Move to ...
14974 * win32-low.h: ... here.
14975 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14976 win32-arm-low.c and wincecompat.c.
14977 (all:): Add $EXEEXT.
14978 (install-only:): Likewise.
14979 (gdbserver:): Likewise.
14980 (gdbreplay:): Likewise.
14981 * config.in: Regenerate.
14982 * configure: Regenerate.
14984 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14986 * win32-low.c: Rename typedef thread_info to
14987 win32_thread_info throughout.
14989 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14991 * win32-i386-low.c: Rename to ...
14992 * win32-low.c: ... this.
14993 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14994 * Makefile.in: Likewise.
14996 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14998 * remote-utils.c (monitor_output): Constify msg parameter.
14999 * server.h (monitor_output): Likewise.
15000 * win32-i386-low.c (handle_output_debug_string): New.
15001 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15002 handle_output_debug_string.
15003 (get_child_debug_event): Likewise.
15005 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15007 * server.c (main): Correct strtoul check.
15009 2007-03-27 Jon Ringle <jon@ringle.org>
15011 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15013 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15015 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15017 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15019 * terminal.h: Check HAVE_SGTTY_H.
15021 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15023 * remote-utils.c (remote_open): Print out the assigned port number.
15025 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15027 * remote-utils.c (monitor_output): New function.
15028 * server.c (debug_threads): Define here.
15029 (monitor_show_help): New function.
15030 (handle_query): Handle qRcmd.
15031 (main): Do not handle 'd' packet.
15032 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15033 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15036 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15038 * Makefile.in (EXEEXT): New.
15039 (clean): Use $(EXEEXT).
15041 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15043 * target.h (target_ops): Rename send_signal to request_interrupt,
15044 and remove enum target_signal parameter.
15045 * linux-low.c (linux_request_interrupt): Rename from
15046 linux_send_signal, and always send SIGINT.
15047 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15048 and always send SIGINT.
15049 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15051 (input_interrupt): Likewise.
15053 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15055 * server.c (get_features_xml): Check if target implemented
15057 * win32-i386-low.c (win32_arch_string): New.
15058 (win32_target_ops): Add win32_arch_string as arch_string member.
15060 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15062 * spu-low.c (spu_arch_string): New.
15063 (spu_target_ops): Add spu_arch_string.
15065 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15067 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15068 * configure.ac: Do not check for terminal.h.
15069 * configure, config.in: Regenerated.
15071 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15073 * Makefile.in (OBS): Add $(XML_BUILTIN).
15074 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15076 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15077 (arm-with-iwmmxt.c): New.
15078 * config.in, configure: Regenerate.
15079 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15080 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15081 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15082 (arm*-*-linux*): Add iWMMXt and regset support.
15083 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15084 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15085 (arm_store_wmmxregset, target_regsets): New.
15086 * server.c (get_features_xml): Take annex argument. Check builtin
15088 (handle_query): Handle multiple annexes.
15090 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15092 * remote-utils.c [USE_WIN32API] (read, write): Define.
15093 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15096 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15098 * linux-i386-low.c (the_low_target): Set arch_string.
15099 * linux-x86-64-low.c (the_low_target): Likewise.
15100 * linux-low.c (linux_arch_string): New.
15101 (linux_target_ops): Add it.
15102 * linux-low.h (struct linux_target_ops): Add arch_string.
15103 * server.c (write_qxfer_response): Use const void * for DATA.
15104 (get_features_xml): New.
15105 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15106 * target.h (struct target_ops): Add arch_string method.
15108 2007-01-03 Denis Pilat <denis.pilat@st.com>
15109 Daniel Jacobowitz <dan@codesourcery.com>
15111 * linux-low.c (linux_kill): Handle being called with no threads.
15112 * win32-i386-low.c (win32_kill): Likewise.
15113 (get_child_debug_event): Clear current_process_handle.
15115 2006-12-30 Denis PILAT <denis.pilat@st.com>
15116 Daniel Jacobowitz <dan@codesourcery.com>
15118 * remote-utils.c (remote_open): Check the type of specified
15119 serial port devices before opening them.
15120 * server.c (main): Kill the inferior if an error occurs during
15121 the first remote_open.
15123 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15125 * README: Update supported targets.
15127 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15129 * Makefile.in (clean): Remove reg-mips64.c.
15130 (reg-mips64.c, reg-mips64.o): New rules.
15131 * configure.srv: Handle mips64. Include regset support for mips.
15132 * linux-mips-low.c (union mips_register): New.
15133 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15134 (mips_breakpoint, mips_breakpoint_at): Use int.
15135 (mips_collect_register, mips_supply_register)
15136 (mips_collect_register_32bit, mips_supply_register_32bit)
15137 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15138 (mips_store_fpregset, target_regsets): New.
15139 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15141 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15143 * configure.srv: Add target "spu*-*-*".
15144 * Makefile.in (clean): Remove reg-spu.c.
15145 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15146 * spu-low.c: New file.
15148 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15150 * configure.ac: Correct td_thr_tls_get_addr test.
15151 * configure: Regenerated.
15153 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15155 * linux-low.c (linux_wait_for_event): Reformat. Use the
15156 pass_signals array.
15157 * remote-utils.c (decode_address_to_semicolon): New.
15158 * server.c (pass_signals, handle_general_set): New.
15159 (handle_query): Mention QPassSignals for qSupported.
15160 (main): Call handle_general_set.
15161 * server.h (pass_signals, decode_address_to_semicolon): New.
15163 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15165 * server.c (handle_query): Correct error handling for read_auxv.
15167 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15169 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15170 and srv_linux_thread_db to yes.
15171 * linux-s390-low.c (s390_fill_gregset): New function.
15172 (target_regsets): Define data structure.
15174 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15176 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15177 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15178 * config.in, configure: Regenerated.
15179 * inferiors.c (gdb_id_to_thread): New function.
15180 (gdb_id_to_thread_id): Use it.
15181 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15182 * linux-low.h (struct process_info): Add th member.
15183 (thread_db_get_tls_address): New prototype.
15184 * remote-utils.c (decode_address): Make non-static.
15185 * server.c (handle_query): Handle qGetTLSAddr.
15186 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15187 * target.h (struct target_ops): Add get_tls_address.
15188 * thread-db.c (maybe_attach_thread): Save the thread handle.
15189 (thread_db_get_tls_address): New.
15191 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15193 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15194 (linux_resume_one_process): Take a siginfo_t *. Update all
15195 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15196 (struct pending_signals): Add a siginfo_t.
15197 (linux_wait_for_process): Always set last_status.
15198 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15199 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15200 * linux-low.h (struct process_info): Add last_status.
15202 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15204 * remote-utils.c (try_rle): New function.
15205 (putpkt_binary): Use it.
15207 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15209 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15210 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15211 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15212 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15213 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15216 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15218 * server.c (terminal_fd): New variable.
15219 (old_foreground_pgrp): Likewise.
15220 (restore_old_foreground_pgrp): New function.
15221 (start_inferior): Record the terminal file descriptor in terminal_fd
15222 and its original foreground group in old_foreground_pgrp. Register
15223 restore_old_foreground_pgrp with atexit().
15225 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15227 * server.c (handle_query): Correct qPart to qXfer.
15229 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15231 * configure.ac: Check for more headers which are missing on
15232 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15233 * configure.srv: Add Cygwin and mingw32.
15234 * remote-utils.c: Don't include headers unconditionally which
15235 are missing on mingw32. Include <winsock.h> for mingw32.
15236 (remote_open): Adjust for mingw32 support. Flush
15237 standard error after writing to it.
15238 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15239 (unblock_async_io, enable_async_io, disable_async_io)
15240 (readchar, getpkt): Update for Winsock support.
15241 (prepare_resume_reply): Expect a protocol signal number.
15242 * server.c: Disable <sys/wait.h> on mingw32.
15243 (start_inferior): Adjust for mingw32 support. Flush
15244 standard error after writing to it.
15245 (attach_inferior): Likewise. Use protocol signal
15247 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15249 * win32-i386-low.c: New file.
15250 * Makefile.in (XM_CLIBS): Set.
15251 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15252 (win32-i386-low.o): New dependency rule.
15253 * linux-low.c (linux_wait): Use target signal numbers.
15254 * target.h (struct target_ops): Doc fix.
15255 * server.h (target_signal_to_name): New prototype.
15256 * gdbreplay.c: Don't include headers unconditionally which
15257 are missing on mingw32. Include <winsock.h> for mingw32.
15258 (remote_close, remote_open): Adjust for Winsock support.
15259 * configure, config.in: Regenerated.
15261 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15263 * server.c (decode_xfer_read, write_qxfer_response): New.
15264 (handle_query): Take a packet length argument. Handle
15265 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15266 the qSupported response.
15267 (main): Update call to handle_query.
15269 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15271 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15272 (putpkt_binary): Renamed from putpkt and adjusted for binary
15274 (putpkt): New wrapper for putpkt_binary.
15275 (readchar): Don't mask off the high bit.
15276 (decode_X_packet): New function.
15277 * server.c (main): Call putpkt_binary if a handler sets the packet
15278 length. Save the length of the incoming packet. Handle 'X'.
15279 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15281 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15283 * server.c (handle_query): Handle qSupported.
15285 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15287 * remote-utils.c (all_symbols_looked_up): New variable.
15288 (look_up_one_symbol): Check it.
15289 * server.h (look_up_one_symbol): New declaration.
15290 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15292 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15294 * Makefile.in (linux-arm-low.o): Update dependencies.
15295 * linux-arm-low.c: Include "gdb_proc_service.h".
15296 (PTRACE_GET_THREAD_AREA): Define.
15297 (ps_get_thread_area): New function.
15299 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15301 * configure.srv (m68k*-*-uclinux*): New target.
15302 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15303 (linux_resume_one_process): Remove extraneous cast.
15304 (linux_read_offsets): New.
15305 (linux_target_op): Add linux_read_offsets on mmuless systems.
15306 * server.c (handle_query): Add qOffsets logic.
15307 * target.h (struct target_ops): Add read_offsets.
15309 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15311 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15312 (PTRACE_GET_THREAD_AREA): Define.
15313 (ps_get_thread_area): New function.
15314 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15315 (linux-x86-64-low.o): Update.
15317 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15319 * configure.ac: Remove checks for prfpregset_t.
15320 * gdb_proc_service.h: New file.
15321 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15322 new "gdb_proc_service.h".
15323 * proc-service.c: Likewise.
15324 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15325 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15326 * Makefile.in (gdb_proc_service_h): Updated.
15327 * configure, config.in: Regenerated.
15329 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15331 * remote-utils.c (prepare_resume_reply): Move declaration
15332 of gdb_id_from_wait to the top of the block.
15334 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15336 * linux-low.c (regsets_store_inferior_registers): Read the regset
15337 from the target before filling it.
15339 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15341 * server.c (attach_inferior): Return SIGTRAP for a successful
15344 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15346 * Makefile.in (OBS): Add version.o.
15347 (STAGESTUFF): Delete.
15348 (version.o): Add dependencies.
15349 (version.c): Replace rule.
15350 (clean): Remove version.c.
15351 * server.c (gdbserver_version): New.
15352 (gdbserver_usage): Use printf.
15353 (main): Handle --version and --help.
15354 * server.h (version, host_name): Add declarations.
15356 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15368 * linux-x86-64-low.c:
15370 * linux-s390-low.c:
15371 * linux-ppc64-low.c:
15373 * linux-mips-low.c:
15374 * linux-m68k-low.c:
15375 * linux-m32r-low.c:
15378 * linux-ia64-low.c:
15379 * linux-i386-low.c:
15380 * linux-crisv32-low.c:
15392 * gdbserver.1: Add (C) after Copyright. Update the FSF
15395 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15397 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15398 (arm_breakpoint_at): Recognize both breakpoints.
15399 (the_low_target): Use the correct breakpoint instruction.
15401 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15403 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15404 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15405 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15406 (the_low_target): Update.
15408 2005-10-25 Andreas Schwab <schwab@suse.de>
15410 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15412 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15413 (ia64_num_regs): Reduce to 462.
15415 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15417 * acinclude.m4: Correct quoting.
15418 * aclocal.m4: Regenerated.
15420 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15421 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15422 (thread_db_init): Call thread_db_err_str.
15423 * configure.ac: Check for TD_VERSION.
15424 * config.in, configure: Regenerated.
15426 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15428 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15430 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15432 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15433 is not available. Define HAVE_PTRACE_GETREGS if it is.
15434 * config.in, configure: Regenerated.
15435 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15436 * linux-i386-low.c, linux-m68k-low.c: Update to use
15437 HAVE_PTRACE_GETREGS.
15438 * linux-low.c (regsets_fetch_inferior_registers)
15439 (regsets_store_inferior_registers): Only return 0 if we processed
15441 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15442 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15444 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15446 * inferiors.c (struct thread_info): Add gdb_id.
15447 (add_thread): Add gdb_id argument.
15448 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15449 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15450 calls to add_thread.
15451 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15452 * server.c (handle_query): Use thread_to_gdb_id.
15453 (handle_v_cont, main): Use gdb_id_to_thread_id.
15454 * server.h (add_thread): Update prototype.
15455 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15458 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15460 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15461 left-padded registers.
15462 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15463 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15465 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15467 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15468 * configure: Regenerate.
15469 * config.in: Regenerate.
15470 * server.h (NEED_DECLARATION_STRERROR):
15471 Replace with !HAVE_DECL_STRERROR.
15473 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15475 * linux-low.c (linux_wait, linux_send_signal): Don't test
15476 an unsigned long variable for > 0 if it could be MAX_ULONG.
15477 * server.c (myresume): Likewise.
15478 * target.c (set_desired_inferior): Likewise.
15480 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15482 * configure.ac: Simplify and improve check for socklen_t.
15483 * configure, config.in: Regenerate.
15485 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15487 * acconfig.h: Remove.
15488 * configure.ac: Add a test for socklen_t. Use three-argument
15489 AC_DEFINE throughout.
15490 * config.in: Regenerated using autoheader 2.59.
15491 * configure: Regenerated.
15493 * gdbreplay.c (socklen_t): Provide a default.
15494 (remote_open): Use socklen_t.
15495 * remote-utils.c (socklen_t): Provide a default.
15496 (remote_open): Use socklen_t.
15497 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15500 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15502 * linux-low.c (linux_read_memory, linux_write_memory)
15503 (linux_read_auxv): Likewise.
15504 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15505 (check_mem_write): Likewise.
15506 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15508 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15509 (registers_from_string, register_data): Likewise.
15510 * server.c (handle_query, main): Likewise.
15511 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15512 (decode_M_packet): Likewise.
15513 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15514 * target.h (struct target_ops): Update read_memory, write_memory,
15516 (read_inferior_memory, write_inferior_memory): Update.
15517 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15518 to unsigned char *.
15519 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15520 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15521 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15522 linux-s390-low.c, linux-sh-low.c: Update for changes in
15523 read_inferior_memory and the_low_target->breakpoint.
15525 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15527 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15528 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15529 * configure.srv: Add powerpc64-*-linux*.
15530 * linux-ppc64-low.c: New file.
15532 2005-05-23 Orjan Friberg <orjanf@axis.com>
15534 * linux-cris-low.c: New file with support for CRIS.
15535 * linux-crisv32-low.c: Ditto for CRISv32.
15536 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15537 (clean): Add reg-cris.c and reg-crisv32.c.
15538 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15539 reg-crisv32.o, and reg-crisv32.c to make rules.
15540 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15541 recognized targets.
15543 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15545 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15546 of sizeof (PTRACE_XFER_TYPE).
15547 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15549 2005-05-12 Orjan Friberg <orjanf@axis.com>
15551 * target.h (struct target_ops): Add insert_watchpoint,
15552 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15553 pointers for hardware watchpoint support.
15554 * linux-low.h (struct linux_target_ops): Ditto.
15555 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15556 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15557 to linux_target_ops.
15558 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15560 * server.c (main): Recognize 'Z' and 'z' packets.
15562 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15564 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15565 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15566 (the_low_target): Add new members.
15568 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15570 * proc-service.c (ps_lgetregs): Search all_processes instead of
15573 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15575 * server.c (start_inferior): Change return type to int.
15576 (attach_inferior): Change sigptr to int *.
15577 (handle_v_cont, handle_v_requests): Change signal to int *.
15578 (main): Change signal to int.
15580 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15582 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15583 * configure.srv: Add m32r*-*-linux*.
15584 * linux-m32r-low.c: New file.
15586 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15588 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15590 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15592 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15593 Take unsigned long arguments for PIDs.
15594 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15595 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15596 (wait_for_sigstop, linux_resume_one_process)
15597 (regsets_fetch_inferior_registers, linux_send_signal)
15598 (linux_read_auxv): Likewise. Update the types of variables holding
15599 PIDs. Update format string specifiers.
15600 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15601 * remote-utils.c (prepare_resume_reply): Likewise.
15602 * server.c (cont_thread, general_thread, step_thread)
15603 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15605 (handle_query): Update format specifiers.
15606 (handle_v_cont, main): Use strtoul for thread IDs.
15607 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15608 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15609 (general_thread, step_thread, thread_from_wait)
15610 (old_thread_from_wait): Update.
15611 * target.h (struct thread_resume): Use unsigned long for THREAD.
15612 (struct target_ops): Use unsigned long for arguments to attach and
15615 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15617 * acinclude.m4: Include bfd/bfd.m4 directly.
15618 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15619 <agriffis@toolchain.org>.
15620 * aclocal.m4, configure: Regenerated.
15622 2005-01-07 Andrew Cagney <cagney@gnu.org>
15624 * configure.ac: Rename configure.in, require autoconf 2.59.
15625 * configure: Re-generate.
15627 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15629 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15630 LIBS when finished.
15631 * aclocal.m4: Regenerated.
15632 * configure: Regenerated.
15634 2004-11-21 Andreas Schwab <schwab@suse.de>
15636 * linux-m68k-low.c (m68k_num_gregs): Define.
15637 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15638 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15639 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15640 (m68k_breakpoint_at): New. Add to the_low_target.
15642 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15643 srv_linux_thread_db to yes.
15645 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15647 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15648 (ARCH_SET_FS): Likewise.
15649 (ARCH_GET_FS): Likewise.
15650 (ARCH_GET_GS): Likewise.
15652 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15654 * linux-i386-low.c (ps_get_thread_area): New.
15655 * linux-x86-64-low.c (ps_get_thread_area): New.
15656 * linux-low.c: Include <sys/syscall.h>.
15657 (linux_kill_one_process): Don't kill the first thread here.
15658 (linux_kill): Kill the first thread here.
15659 (kill_lwp): New function.
15660 (send_sigstop, linux_send_signal): Use it.
15661 * proc-service.c: Clean up #ifdefs.
15662 (fpregset_info): Delete.
15663 (ps_lgetregs): Update and enable implementation.
15664 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15666 * remote-utils.c (struct sym_cache, symbol_cache): New.
15667 (input_interrupt): Print a clearer message.
15668 (async_io_enabled): New variable.
15669 (enable_async_io, disable_async_io): Use it. Update comments.
15670 (look_up_one_symbol): Use the symbol cache.
15671 * thread-db.c (thread_db_look_up_symbols): New function.
15672 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15674 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15676 * configure.in: Test for -rdynamic.
15677 * configure: Regenerated.
15678 * Makefile (INTERNAL_LDFLAGS): New.
15679 (gdbserver, gdbreplay): Use it.
15681 2004-09-02 Andrew Cagney <cagney@gnu.org>
15683 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15685 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15687 * linux-low.c (linux_wait): Clear all_processes list also.
15689 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15691 * linux-low.c: Include <errno.h>. Remove extern declaration of
15694 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15696 * gdbreplay.c, server.h, utils.c: Update copyright years.
15698 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15700 * server.c (main): Print child status or termination signal from
15701 variable 'signal', not 'sig'.
15703 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15705 * linux-low.c (linux_read_memory): Change return type to
15706 int. Check for and return error from ptrace().
15707 * target.c (read_inferior_memory): Change return type to int. Pass
15708 back return status from the_target->read_memory().
15709 * target.h (struct target_ops): Adapt *read_memory() prototype.
15711 (read_inferior_memory): Adapt prototype.
15712 * server.c (main): Return an error packet if
15713 read_inferior_memory() returns an error.
15715 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15717 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15718 Unify with other clean targets.
15720 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15722 * server.c (handle_v_cont): Call set_desired_inferior.
15724 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15726 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15728 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15730 * linux-low.c (linux_wait): Unblock async I/O.
15731 (linux_resume): Block and enable async I/O.
15732 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15733 * server.h (block_async_io, unblock_async_io): Add prototypes.
15735 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15737 * remote-utils.c (remote_open): Print a status notice after
15738 opening a TCP port.
15739 * server.c (attach_inferior): Print a status notice after
15742 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15744 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15746 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15748 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15750 * server.c, target.h: Update copyright years.
15752 2004-02-25 Roland McGrath <roland@redhat.com>
15754 * target.h (struct target_ops): New member `read_auxv'.
15755 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15756 * linux-low.c (linux_read_auxv): New function.
15757 (linux_target_ops): Initialize `read_auxv' member to that.
15759 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15761 Committed by Jim Blandy <jimb@redhat.com>.
15763 * linux-s390-low.c (s390_num_regs): Update.
15764 (s390_regmap): Remove control registers. Use __s390x__ predefine
15765 instead of GPR_SIZE to distiguish s390 and s390x targets.
15767 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15769 * linux-low.c: Update copyright year.
15770 (check_removed_breakpoint): Clear pending_is_breakpoint.
15771 (linux_set_resume_request, linux_queue_one_thread)
15772 (resume_status_pending_p): New functions.
15773 (linux_continue_one_thread): Use process->resume.
15774 (linux_resume): Only resume threads if there are no pending events.
15775 * linux-low.h (struct process_info): Add resume request
15778 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15780 * regcache.c (new_register_cache): Clear the allocated register
15781 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15783 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15785 * linux-low.c (linux_resume): Take a struct thread_resume *
15787 (linux_wait): Update call.
15788 (resume_ptr): New static variable.
15789 (linux_continue_one_thread): Renamed from
15790 linux_continue_one_process. Use resume_ptr.
15791 (linux_resume): Use linux_continue_one_thread.
15792 * server.c (handle_v_cont, handle_v_requests): New functions.
15793 (myresume): New function.
15794 (main): Handle 'v' case.
15795 * target.h (struct thread_resume): New type.
15796 (struct target_ops): Change argument of "resume" to struct
15798 (myresume): Delete macro.
15800 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15802 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15803 (uninstall): Support DESTDIR.
15805 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15807 * configure.srv: Add xscale*linux copy of arm*linux entry.
15809 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15811 * linux-arm-low.c (arm_reinsert_addr): New function.
15812 (the_low_target): Add arm_reinsert_addr.
15814 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15816 * mem-break.c: Remove whitespace at end of file.
15818 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15820 * configure.in: Check whether we need to prototype strerror.
15821 * server.h: Optionally prototype strerror.
15822 * gdbreplay.c (perror_with_name): Use strerror.
15823 * linux-low.c (linux_attach_lwp): Use strerror.
15824 * utils.c (perror_with_name): Use strerror.
15825 * config.in, configure: Regenerated.
15827 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15829 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15830 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15832 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15834 * Makefile.in (SFILES): Update.
15835 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15836 low-sun3.c: Remove files.
15838 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15840 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15841 (linux_detach_one_process, linux_detach): New functions.
15842 (linux_target_ops): Add linux_detach.
15843 * server.c (main): Handle 'D' packet.
15844 * target.h (struct target_ops): Add "detach" member.
15845 (detach_inferior): Define.
15847 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15849 From Kelley Cook <kelleycook@wideopenwest.com>:
15850 * configure.srv: Accept i[34567]86 variants.
15852 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15854 * linux-low.c (linux_wait_for_event): Correct comment typos.
15855 (linux_resume_one_process): Call check_removed_breakpoint.
15856 (linux_send_signal): New function.
15857 (linux_target_ops): Add linux_send_signal.
15858 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15860 * target.h (struct target_ops): Add send_signal.
15862 2003-05-29 Jim Blandy <jimb@redhat.com>
15864 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15865 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15866 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15867 away part of the register's value.
15869 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15871 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15872 (linux_wait_for_event, linux_init_signals): Likewise.
15874 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15876 * configure.in: Check for stdlib.h.
15877 * configure: Regenerated.
15878 * config.in: Regenerated.
15880 2003-01-04 Andreas Schwab <schwab@suse.de>
15882 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15884 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15886 * Makefile.in: Remove obsolete code.
15888 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15890 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15891 defined(PT_FPR0_HI).
15893 2002-11-17 Stuart Hughes <seh@zee2.com>
15895 * linux-arm-low.c (arm_num_regs): Increase.
15896 (arm_regmap): Include status register.
15898 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15900 * linux-low.c (register_addr): Remove incorrect -1 check.
15902 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15904 * linux-low.c (linux_create_inferior): Call setpgid. Return
15906 (unstopped_p, linux_signal_pid): Remove.
15907 (linux_target_ops): Remove linux_signal_pid.
15908 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15909 global instead of target method.
15910 * target.h (struct target_ops): Remove signal_pid. Update comment
15911 for create_inferior.
15912 * server.c (signal_pid): New variable.
15913 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15914 gdbserver. Set the child to be the foreground process group.
15915 (attach_inferior): Set signal_pid.
15917 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15919 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15921 2002-08-20 Jim Blandy <jimb@redhat.com>
15923 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15926 2002-08-01 Andrew Cagney <cagney@redhat.com>
15928 * Makefile.in: Make chill references obsolete.
15930 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15932 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15933 * configure: Regenerate.
15934 * config.in: Regenerate.
15936 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15938 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15939 (perror_with_name, remote_close, remote_open, expect, play): Static.
15941 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15943 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15944 byte offsets instead of an array of indexes.
15945 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15947 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15949 * regcache.c: Add comment.
15951 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15953 * thread-db.c: New file.
15954 * proc-service.c: New file.
15955 * acinclude.m4: New file.
15956 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15957 proc-service.o, and thread-db.o.
15958 (linux-low.o): Add USE_THREAD_DB.
15959 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15960 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15961 * aclocal.m4: Regenerated.
15962 * config.in: Regenerated.
15963 * configure: Regenerated.
15964 * configure.in: Check for proc_service.h, sys/procfs.h,
15965 thread_db.h, and linux/elf.h headrs.
15966 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15967 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15968 Check for -lthread_db and thread support.
15969 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15970 PowerPC, and SuperH.
15971 * i387-fp.c: Constify arguments.
15972 * i387-fp.h: Likewise.
15973 * inferiors.c: (struct thread_info): Renamed from
15974 `struct inferior_info'. Remove PID member. Use generic inferior
15975 list header. All uses updated.
15976 (inferiors, signal_pid): Removed.
15977 (all_threads): New variable.
15978 (get_thread): Define.
15979 (add_inferior_to_list): New function.
15980 (for_each_inferior): New function.
15981 (change_inferior_id): New function.
15982 (add_inferior): Removed.
15983 (remove_inferior): New function.
15984 (add_thread): New function.
15985 (free_one_thread): New function.
15986 (remove_thread): New function.
15987 (clear_inferiors): Use for_each_inferior and free_one_thread.
15988 (find_inferior): New function.
15989 (find_inferior_id): New function.
15990 (inferior_target_data): Update argument type.
15991 (set_inferior_target_data): Likewise.
15992 (inferior_regcache_data): Likewise.
15993 (set_inferior_regcache_data): Likewise.
15994 * linux-low.c (linux_bp_reinsert): Remove.
15995 (all_processes, stopping_threads, using_thrads)
15996 (struct pending_signals, debug_threads, pid_of): New.
15997 (inferior_pid): Replace with macro.
15998 (struct inferior_linux_data): Remove.
15999 (get_stop_pc, add_process): New functions.
16000 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16001 Use add_process and add_thread.
16002 (linux_attach_lwp): New function, based on old linux_attach. Use
16003 add_process and add_thread. Set stop_expected for new threads.
16004 (linux_attach): New function.
16005 (linux_kill_one_process): New function.
16006 (linux_kill): Kill all LWPs.
16007 (linux_thread_alive): Use find_inferior_id.
16008 (check_removed_breakpoints, status_pending_p): New functions.
16009 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16010 Update. Use WNOHANG. Wait for cloned processes also. Update process
16011 struct for the found process.
16012 (linux_wait_for_event): New function.
16013 (linux_wait): Use it. Support LWPs.
16014 (send_sigstop, wait_for_sigstop, stop_all_processes)
16015 (linux_resume_one_process, linux_continue_one_process): New functions.
16016 (linux_resume): Support LWPs.
16017 (REGISTER_RAW_SIZE): Remove.
16018 (fetch_register): Use register_size instead. Call supply_register.
16019 (usr_store_inferior_registers): Likewise. Call collect_register.
16020 Fix recursive case.
16021 (regsets_fetch_inferior_registers): Improve error message.
16022 (regsets_store_inferior_registers): Add debugging.
16023 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16024 (unstopped_p, linux_signal_pid): New functions.
16025 (linux_target_ops): Add linux_signal_pid.
16026 (linux_init_signals): New function.
16027 (initialize_low): Call it. Initialize using_threads.
16028 * regcache.c (inferior_regcache_data): Add valid
16030 (get_regcache): Fetch registers lazily. Add fetch argument
16031 and update all callers.
16032 (regcache_invalidate_one, regcache_invalidate): New
16034 (new_register_cache): Renamed from create_register_cache.
16035 Return the new regcache.
16036 (free_register_cache): Change argument to a void *.
16037 (registers_to_string, registers_from_string): Call get_regcache
16038 with fetch flag set.
16039 (register_data): Make static. Pass fetch flag to get_regcache.
16040 (supply_register): Call get_regcache with fetch flag clear.
16041 (collect_register): Call get_regcache with fetch flag set.
16042 (collect_register_as_string): New function.
16043 * regcache.h: Update.
16044 * remote-utils.c (putpkt): Flush after debug output and use
16046 Handle input interrupts while waiting for an ACK.
16047 (input_interrupt): Use signal_pid method.
16048 (getpkt): Flush after debug output and use stderr.
16049 (outreg): Use collect_register_as_string.
16050 (new_thread_notify, dead_thread_notify): New functions.
16051 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16052 and general_thread.
16053 (look_up_one_symbol): Flush after debug output.
16054 * server.c (step_thread, server_waiting): New variables.
16055 (start_inferior): Don't use signal_pid. Update call to mywait.
16056 (attach_inferior): Update call to mywait.
16057 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16058 (main): Don't fetch/store registers explicitly. Use
16059 set_desired_inferior. Support proposed ``Hs'' packet. Update
16061 * server.h: Update.
16062 (struct inferior_list, struct_inferior_list_entry): New.
16063 * target.c (set_desired_inferior): New.
16064 (write_inferior_memory): Constify.
16065 (mywait): New function.
16066 * target.h: Update.
16067 (struct target_ops): New signal_pid method.
16068 (mywait): Removed macro, added prototype.
16070 * linux-low.h (regset_func): Removed.
16071 (regset_fill_func, regset_store_func): New.
16072 (enum regset_type): New.
16073 (struct regset_info): Add type field. Use new operation types.
16074 (struct linux_target_ops): stop_pc renamed to get_pc.
16075 Add decr_pc_after_break and breakpoint_at.
16076 (get_process, get_thread_proess, get_process_thread)
16077 (strut process_info, all_processes, linux_attach_lwp)
16078 (thread_db_init): New.
16080 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16081 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16082 (the_low_target): Add new members.
16083 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16084 (i386_store_fpxregset): Constify.
16085 (target_regsets): Add new kind identifier.
16086 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16087 (i386_set_pc): Add debugging.
16088 (i386_breakpoint_at): New function.
16089 (the_low_target): Add new members.
16090 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16091 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16092 (mips_breakpoint_at): New.
16093 (the_low_target): Add new members.
16094 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16095 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16096 (the_low_target): Add new members.
16097 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16098 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16099 (the_low_target): Add new members.
16100 * linux-x86-64-low.c (target_regsets): Add new kind
16103 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16105 From Martin Pool <mbp@samba.org>:
16106 * server.c (gdbserver_usage): New function.
16109 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16111 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16112 stop_at -> stop_pc.
16114 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16116 * Makefile.in: Remove obsolete code.
16118 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16120 * linux-low.c (regsets_fetch_inferior_registers),
16121 (regsets_store_inferior_registers): Removed cast to int from
16123 * regcache.h: Added declaration of struct inferior_info.
16125 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16127 * inferiors.c (struct inferior_info): Add regcache_data.
16128 (add_inferior): Call create_register_cache.
16129 (clear_inferiors): Call free_register_cache.
16130 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16131 * regcache.c (struct inferior_regcache_data): New.
16132 (registers): Remove.
16133 (get_regcache): New function.
16134 (create_register_cache, free_register_cache): New functions.
16135 (set_register_cache): Don't initialize the register cache here.
16136 (registers_to_string, registers_from_string, register_data): Call
16138 * regcache.h: Add prototypes.
16139 * server.h: Likewise.
16141 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16143 * mem-break.c: New file.
16144 * mem-break.h: New file.
16145 * Makefile.in: Add mem-break.o rule; update server.h
16147 * inferiors.c (struct inferior_info): Add target_data
16149 (clear_inferiors): Free target_data member if set.
16150 (inferior_target_data, set_inferior_target_data): New functions.
16151 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16152 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16153 * linux-low.c (linux_bp_reinsert): New variable.
16154 (struct inferior_linux_data): New.
16155 (linux_create_inferior): Use set_inferior_target_data.
16156 (linux_attach): Likewise. Call add_inferior.
16157 (linux_wait_for_one_inferior): New function.
16158 (linux_wait): Call it.
16159 (linux_write_memory): Add const.
16160 (initialize_low): Call set_breakpoint_data.
16161 * linux-low.h (struct linux_target_ops): Add breakpoint
16163 * server.c (attach_inferior): Remove extra add_inferior
16165 * server.h: Include mem-break.h. Update inferior.c
16167 * target.c (read_inferior_memory)
16168 (write_inferior_memory): New functions.
16169 * target.h (read_inferior_memory)
16170 (write_inferior_memory): Change macros to prototypes.
16171 (struct target_ops): Update comments. Add const to write_memory
16174 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16176 * linux-low.c (usr_store_inferior_registers): Support
16177 registers which are allowed to fail to store.
16178 * linux-low.h (linux_target_ops): Likewise.
16179 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16180 (ppc_cannot_store_register): FPSCR may not be storable.
16182 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16184 * server.h: Include <string.h> if HAVE_STRING_H.
16185 * ChangeLog: Correct paths in last ChangeLog entry.
16187 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16189 * linux-low.h: Remove obsolete prototypes.
16190 (struct linux_target_ops): New.
16191 (extern the_low_target): New.
16192 * linux-low.c (num_regs, regmap): Remove declarations.
16193 (register_addr): Use the_low_target explicitly.
16194 (fetch_register): Likewise.
16195 (usr_fetch_inferior_registers): Likewise.
16196 (usr_store_inferior_registers): Likewise.
16197 * linux-arm-low.c (num_regs): Remove.
16198 (arm_num_regs): Define.
16199 (arm_regmap): Renamed from regmap, made static.
16200 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16202 (arm_cannot_store_register): Renamed from cannot_store_register,
16204 (the_low_target): New.
16205 * linux-i386-low.c (num_regs): Remove.
16206 (i386_num_regs): Define.
16207 (i386_regmap): Renamed from regmap, made static.
16208 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16210 (i386_cannot_store_register): Renamed from cannot_store_register,
16212 (the_low_target): New.
16213 * linux-ia64-low.c (num_regs): Remove.
16214 (ia64_num_regs): Define.
16215 (ia64_regmap): Renamed from regmap, made static.
16216 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16218 (ia64_cannot_store_register): Renamed from cannot_store_register,
16220 (the_low_target): New.
16221 * linux-m68k-low.c (num_regs): Remove.
16222 (m68k_num_regs): Define.
16223 (m68k_regmap): Renamed from regmap, made static.
16224 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16226 (m68k_cannot_store_register): Renamed from cannot_store_register,
16228 (the_low_target): New.
16229 * linux-mips-low.c (num_regs): Remove.
16230 (mips_num_regs): Define.
16231 (mips_regmap): Renamed from regmap, made static.
16232 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16234 (mips_cannot_store_register): Renamed from cannot_store_register,
16236 (the_low_target): New.
16237 * linux-ppc-low.c (num_regs): Remove.
16238 (ppc_num_regs): Define.
16239 (ppc_regmap): Renamed from regmap, made static.
16240 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16242 (ppc_cannot_store_register): Renamed from cannot_store_register,
16244 (the_low_target): New.
16245 * linux-s390-low.c (num_regs): Remove.
16246 (s390_num_regs): Define.
16247 (s390_regmap): Renamed from regmap, made static.
16248 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16250 (s390_cannot_store_register): Renamed from cannot_store_register,
16252 (the_low_target): New.
16253 * linux-sh-low.c (num_regs): Remove.
16254 (sh_num_regs): Define.
16255 (sh_regmap): Renamed from regmap, made static.
16256 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16258 (sh_cannot_store_register): Renamed from cannot_store_register,
16260 (the_low_target): New.
16261 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16262 (the_low_target): New.
16264 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16266 * Makefile.in: Add stamp-h target.
16267 * configure.in: Create stamp-h.
16268 * configure: Regenerated.
16270 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16272 * inferiors.c: New file.
16273 * target.c: New file.
16274 * target.h: New file.
16275 * Makefile.in: Add target.o and inferiors.o. Update
16277 * linux-low.c (inferior_pid): New static variable,
16278 moved from server.c.
16279 (linux_create_inferior): Renamed from create_inferior.
16280 Call add_inferior. Return 0 on success instead of a PID.
16281 (linux_attach): Renamed from myattach.
16282 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16283 (linux_thread_alive): Renamed from mythread_alive.
16284 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16286 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16287 (regsets_store_inferior_registers): Correct error message.
16288 Add missing ``return 0''.
16289 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16290 (linux_store_registers): Renamed from store_inferior_registers.
16291 (linux_read_memory): Renamed from read_inferior_memory.
16292 (linux_write_memory): Renamed from write_inferior_memory.
16293 (linux_target_ops): New structure.
16294 (initialize_low): Call set_target_ops ().
16295 * remote-utils.c (unhexify): New function.
16296 (hexify): New function.
16297 (input_interrupt): Send signals to ``signal_pid''.
16298 * server.c (inferior_pid): Remove.
16299 (start_inferior): Update create_inferior call.
16300 (attach_inferior): Call add_inferior.
16301 (handle_query): New function.
16302 (main): Call handle_query for `q' packets.
16303 * server.h: Include "target.h". Remove obsolete prototypes.
16304 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16306 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16308 * Makefile.in: Add WARN_CFLAGS. Update configury
16310 * configure.in: Check for <string.h>
16311 * configure: Regenerate.
16312 * config.in: Regenerate.
16313 * gdbreplay.c: Include needed system headers.
16314 (remote_open): Remove strchr prototype.
16315 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16316 * regcache.c (supply_register): Change buf argument to const void *.
16317 (supply_register_by_name): Likewise.
16318 (collect_register): Change buf argument to void *.
16319 (collect_register_by_name): Likewise.
16320 * regcache.h: Add missing prototypes.
16321 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16322 * server.c (handle_query): New function.
16323 (attached): New static variable, moved out of main.
16324 (main): Quiet longjmp clobber warnings.
16325 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16326 * utils.c (error): Remove NORETURN.