+
+ * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
+ (i386-mmx.o): New.
+ (i386-mmx.c): Likewise.
+ (i386-mmx-linux.o): Likewise.
+ (i386-mmx-linux.c): Likewise.
+
+ * configure.srv (srv_i386_regobj): Add i386-mmx.o.
+ (srv_i386_linux_regobj): Add i386-mmx-linux.o.
+ (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
+ (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
+
+ * linux-x86-low.c (init_registers_i386_mmx_linux): New.
+ (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
+ and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
+
+
+ * Makefile.in (clean): Updated.
+ (i386-avx.o): New.
+ (i386-avx.c): Likewise.
+ (i386-avx-linux.o): Likewise.
+ (i386-avx-linux.c): Likewise.
+ (amd64-avx.o): Likewise.
+ (amd64-avx.c): Likewise.
+ (amd64-avx-linux.o): Likewise.
+ (amd64-avx-linux.c): Likewise.
+
+ * configure.srv (srv_i386_regobj): Add i386-avx.o.
+ (srv_i386_linux_regobj): Add i386-avx-linux.o.
+ (srv_amd64_regobj): Add amd64-avx.o.
+ (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
+ (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
+ (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
+ (srv_i386_xmlfiles): Add i386/i386-avx.xml.
+ (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
+ (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
+ (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
+
+ * i387-fp.c: Include "i386-xstate.h".
+ (i387_xsave): New.
+ (i387_cache_to_xsave): Likewise.
+ (i387_xsave_to_cache): Likewise.
+ (x86_xcr0): Likewise.
+
+ * i387-fp.h (i387_cache_to_xsave): Likewise.
+ (i387_xsave_to_cache): Likewise.
+ (x86_xcr0): Likewise.
+
+ * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
+ * linux-crisv32-low.c (target_regsets): Likewise.
+ * linux-m68k-low.c (target_regsets): Likewise.
+ * linux-mips-low.c (target_regsets): Likewise.
+ * linux-ppc-low.c (target_regsets): Likewise.
+ * linux-s390-low.c (target_regsets): Likewise.
+ * linux-sh-low.c (target_regsets): Likewise.
+ * linux-sparc-low.c (target_regsets): Likewise.
+ * linux-xtensa-low.c (target_regsets): Likewise.
+
+ * linux-low.c: Include <sys/uio.h>.
+ (regsets_fetch_inferior_registers): Support nt_type.
+ (regsets_store_inferior_registers): Likewise.
+ (linux_process_qsupported): New.
+ (linux_target_ops): Add linux_process_qsupported.
+
+ * linux-low.h (regset_info): Add nt_type.
+ (linux_target_ops): Add process_qsupported.
+
+ * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
+ and <sys/uio.h>.
+ (init_registers_i386_avx_linux): New.
+ (init_registers_amd64_avx_linux): Likewise.
+ (xmltarget_i386_linux_no_xml): Likewise.
+ (xmltarget_amd64_linux_no_xml): Likewise.
+ (PTRACE_GETREGSET): Likewise.
+ (PTRACE_SETREGSET): Likewise.
+ (x86_fill_xstateregset): Likewise.
+ (x86_store_xstateregset): Likewise.
+ (use_xml): Likewise.
+ (x86_linux_update_xmltarget): Likewise.
+ (x86_linux_process_qsupported): Likewise.
+ (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
+ (x86_arch_setup): Don't call init_registers_amd64_linux nor
+ init_registers_i386_linux here. Call
+ x86_linux_update_xmltarget.
+ (the_low_target): Add x86_linux_process_qsupported.
+
+ * server.c (handle_query): Call target_process_qsupported.
+
+ * target.h (target_ops): Add process_qsupported.
+ (target_process_qsupported): New.
+
+
+ * inferiors.c (add_thread): Set last_status kind to
+ TARGET_WAITKIND_IGNORE.
+ * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
+ fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
+ (linux_wait_1): Move `thread' local definition to block that uses
+ it. Don't NULL initialize `event_child'.
+ (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
+ Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
+ * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
+
+
+ * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
+ an extended waitstatus, or by a watchpoint.
+ (cancel_breakpoints_callback): Don't cancel a breakpoint if the
+ thread was stepping or has been stopped by a watchpoint.
+
+
+ * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
+ (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
+ of another, then delete the previous, and validate all
+ breakpoints.
+ (validate_inserted_breakpoint): New.
+ (delete_disabled_breakpoints): New.
+ (validate_breakpoints): New.
+ (check_mem_read): Validate breakpoints before trusting their
+ shadow. Delete disabled breakpoints.
+ (check_mem_write): Validate breakpoints before trusting they
+ should be inserted. Delete disabled breakpoints.
+ * mem-break.h (validate_breakpoints):
+ * server.c (handle_query): Validate breakpoints when we see a
+ qSymbol query.
+
+
+ * linux-low.c (linux_wait_1): Avoid setting need_step_over is
+ there's a GDB breakpoint at stop_pc. Always report a trap to GDB
+ if we could tell there's a GDB breakpoint at stop_pc.
+ (need_step_over_p): Don't do a step over if we find a GDB
+ breakpoint at the resume PC.
+
+ * mem-break.c (struct raw_breakpoint): New.
+ (enum bkpt_type): New type `gdb_breakpoint'.
+ (struct breakpoint): Delete the `PC', `old_data' and `inserted'
+ fields. New field `raw'.
+ (find_raw_breakpoint_at): New.
+ (set_raw_breakpoint_at): Handle refcounting. Create a raw
+ breakpoint instead.
+ (set_breakpoint_at): Adjust.
+ (delete_raw_breakpoint): New.
+ (release_breakpoint): New.
+ (delete_breakpoint): Rename to...
+ (delete_breakpoint_1): ... this. Add proc parameter. Use
+ release_breakpoint. Return ENOENT.
+ (delete_breakpoint): Reimplement.
+ (find_breakpoint_at): Delete.
+ (find_gdb_breakpoint_at): New.
+ (delete_breakpoint_at): Delete.
+ (set_gdb_breakpoint_at): New.
+ (delete_gdb_breakpoint_at): New.
+ (gdb_breakpoint_here): New.
+ (set_reinsert_breakpoint): Use release_breakpoint.
+ (uninsert_breakpoint): Rename to ...
+ (uninsert_raw_breakpoint): ... this.
+ (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
+ (reinsert_raw_breakpoint): Change parameter type to
+ raw_breakpoint.
+ (reinsert_breakpoints_at): Adjust to handle raw breakpoints
+ instead.
+ (check_breakpoints): Adjust. Use release_breakpoint.
+ (breakpoint_here): Rewrite using find_raw_breakpoint_at.
+ (breakpoint_inserted_here): Ditto.
+ (check_mem_read): Adjust to iterate over raw breakpoints instead.
+ Don't trust the breakpoint's shadow if it is not inserted.
+ (check_mem_write): Adjust to iterate over raw breakpoints instead.
+ (delete_all_breakpoints): Adjust.
+ (free_all_breakpoints): Mark all breakpoints as uninserted, and
+ use delete_breakpoint_1.
+
+ * mem-break.h (breakpoints_supported): Delete declaration.
+ (set_gdb_breakpoint_at): Declare.
+ (gdb_breakpoint_here): Declare.
+ (delete_breakpoint_at): Delete.
+ (delete_gdb_breakpoint_at): Declare.
+
+ * server.h (struct raw_breakpoint): Forward declare.
+ (struct process_info): New field `raw_breakpoints'.
+
+ * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
+ breakpoints.
+
+
+ * linux-low.c (status_pending_p_callback): Fix comment.
+ (linux_wait_for_event_1): Move most of the internal breakpoint
+ handling from here...
+ (linux_wait_1): ... to here.
+ (count_events_callback): New.
+ (select_singlestep_lwp_callback): New.
+ (select_event_lwp_callback): New.
+ (cancel_breakpoints_callback): New.
+ (select_event_lwp): New.
+ (linux_wait_1): Simplify internal breakpoint handling. Give equal
+ priority to all LWPs that have had events that should be reported
+ to the client. Cancel breakpoints when about to reporting the
+ event to the client, not while stopping lwps. No longer cancel
+ finished single-steps here.
+ (cancel_finished_single_step): Delete.
+ (cancel_finished_single_steps): Delete.
+
+
+ * mem-break.c (enum bkpt_type): New.
+ (struct breakpoint): New field `type'.
+ (set_breakpoint_at): Change return type to struct breakpoint
+ pointer. Set type to `other_breakpoint' by default.
+ (delete_breakpoint): Rewrite, supporting more than one breakpoint
+ in the breakpoint list.
+ (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
+ (reinsert_breakpoint): Rename to ...
+ (reinsert_raw_breakpoint): ... this.
+ (reinsert_breakpoints_at): Adjust.
+ * mem-break.h (struct breakpoint): Declare.
+ (set_breakpoint_at): Change return type to struct breakpoint
+ pointer.
+
+
+ * server.c (handle_query): Assign, not compare.
+
+
+ Teach linux gdbserver to step-over-breakpoints.
+
+ * linux-low.c (can_hardware_single_step): New.
+ (supports_breakpoints): New.
+ (handle_extended_wait): If stopping threads, read the stop pc of
+ the new cloned LWP.
+ (get_pc): New.
+ (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
+ low target doesn't support retrieving the PC.
+ (add_lwp): Set last_resume_kind to resume_continue.
+ (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
+ (linux_attach): Don't clear stop_expected. Set the lwp's
+ last_resume_kind to resume_stop.
+ (linux_detach_one_lwp): Don't check for removed breakpoints.
+ (check_removed_breakpoint): Delete.
+ (status_pending_p): Rename to ...
+ (status_pending_p_callback): ... this. Don't check for removed
+ breakpoints. Don't consider threads that are stopped from GDB's
+ perspective.
+ (linux_wait_for_lwp): Always read the stop_pc here.
+ (cancel_breakpoint): New.
+ (step_over_bkpt): New global.
+ (linux_wait_for_event_1): Implement stepping over breakpoints.
+ (gdb_wants_lwp_stopped): New.
+ (gdb_wants_all_stopped): New.
+ (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
+ single-step traps here. Store the thread's last reported target
+ wait status.
+ (send_sigstop): Don't clear stop_expected. Always set it,
+ instead.
+ (mark_lwp_dead): Remove reference to pending_is_breakpoint.
+ (cancel_finished_single_step): New.
+ (cancel_finished_single_steps): New.
+ (wait_for_sigstop): Don't cancel finished single-step traps here.
+ (linux_resume_one_lwp): Don't check for removed breakpoints.
+ Don't set `step' on non-hardware step archs.
+ (linux_set_resume_request): Ignore resume_stop requests if already
+ stopping or stopped. Set the lwp's last_resume_kind.
+ (resume_status_pending_p): Don't check for removed breakpoints.
+ (need_step_over_p): New.
+ (start_step_over): New.
+ (finish_step_over): New.
+ (linux_resume_one_thread): Always queue a sigstop for resume_stop
+ requests. Clear the thread's last reported target waitstatus.
+ Don't use the `suspended' flag. Don't consider pending breakpoints.
+ (linux_resume): Start a step-over if necessary.
+ (proceed_one_lwp): New.
+ (proceed_all_lwps): New.
+ (unstop_all_lwps): New.
+ * linux-low.h (struct lwp_info): Rewrite comment for the
+ `suspended' flag. Add the `stop_pc' field. Delete the
+ `pending_stop_pc' field. Tweak the `stepping' flag's comment.
+ Add `'last_resume_kind' and `need_step_over' fields.
+ * inferiors.c (struct thread_info): Delete, moved elsewhere.
+ * mem-break.c (struct breakpoint): Delete `reinserting' flag.
+ Delete `breakpoint_to_reinsert' field. New flag `inserted'.
+ (set_raw_breakpoint_at): New.
+ (set_breakpoint_at): Rewrite to use it.
+ (reinsert_breakpoint_handler): Delete.
+ (set_reinsert_breakpoint): New.
+ (reinsert_breakpoint_by_bp): Delete.
+ (delete_reinsert_breakpoints): New.
+ (uninsert_breakpoint): Rewrite.
+ (uninsert_breakpoints_at): New.
+ (reinsert_breakpoint): Rewrite.
+ (reinsert_breakpoints_at): New.
+ (check_breakpoints): Rewrite.
+ (breakpoint_here): New.
+ (breakpoint_inserted_here): New.
+ (check_mem_read): Adjust.
+ * mem-break.h (breakpoints_supported, breakpoint_here)
+ (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
+ (reinsert_breakpoint_by_bp): Delete declaration.
+ (delete_reinsert_breakpoints): Declare.
+ (reinsert_breakpoint): Delete declaration.
+ (reinsert_breakpoints_at): Declare.
+ (uninsert_breakpoint): Delete declaration.
+ (uninsert_breakpoints_at): Declare.
+ (check_breakpoints): Adjust prototype.
+ * server.h: Adjust include order.
+ (struct thread_info): Declare here. Add a `last_status' field.
+
+
+ * server.c (crc32): New function.
+ (handle_query): Add handling for 'qCRC:' request.
+
+
+ * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
+ lwp had been stopped by a watchpoint.
+
+
+ * server.h (internal_error): Declare.
+ (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
+ * utils.c (internal_error): New function.
+
+
+ * configure.srv: Fix typo setting srv_regobj.
+
+
+ * linux-low.c (fetch_register): Avoid passing a non string literal
+ format to `error'.
+ (usr_store_inferior_registers): Ditto.
+
+
+ * linux-low.c (linux_write_memory): Bail out early if peeking
+ memory failed.
+
+
+ * linux-low.h (struct lwp_info): New fields
+ `stopped_by_watchpoint' and `stopped_data_address'.
+ * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
+ here, and cache them in the lwp object.
+ (wait_for_sigstop): Check stopped_by_watchpoint lwp field
+ directly.
+ (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
+ field.
+ (linux_stopped_by_watchpoint): Rewrite.
+ (linux_stopped_data_address): Rewrite.
+
+
+ * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
+ switching the current inferior, not before.
+
+
+ * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
+ reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
+ i386-linux.c and amd64-linux.c.
+ (reg-i386.o): Removed.
+ (reg-i386.c): Likewise.
+ (reg-i386-linux.o): Likewise.
+ (reg-i386-linux.c): Likewise.
+ (reg-x86-64.o): Likewise.
+ (reg-x86-64.c): Likewise.
+ (reg-x86-64-linux.o): Likewise.
+ (reg-x86-64-linux.c): Likewise.
+ (i386.o): New.
+ (i386.c): Likewise.
+ (i386-linux.o): Likewise.
+ (i386-linux.c): Likewise.
+ (amd64.o): Likewise.
+ (amd64.c): Likewise.
+ (amd64-linux.o): Likewise.
+ (amd64-linux.c): Likewise.
+
+ * configure.srv (srv_i386_regobj): New.
+ (srv_i386_linux_regobj): Likewise.
+ (srv_amd64_regobj): Likewise.
+ (srv_amd64_linux_regobj): Likewise.
+ (srv_i386_32bit_xmlfiles): Likewise.
+ (srv_i386_64bit_xmlfiles): Likewise.
+ (srv_i386_xmlfiles): Likewise.
+ (srv_amd64_xmlfiles): Likewise.
+ (srv_i386_linux_xmlfiles): Likewise.
+ (srv_amd64_linux_xmlfiles): Likewise.
+ (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
+ srv_xmlfiles to $srv_i386_xmlfiles.
+ (i[34567]86-*-mingw32ce*): Likewise.
+ (i[34567]86-*-mingw*): Likewise.
+ (i[34567]86-*-nto*): Likewise.
+ (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
+ and $srv_amd64_linux_regobj. Set srv_xmlfiles to
+ $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
+ (x86_64-*-linux*): Likewise.
+
+ * linux-x86-low.c (init_registers_x86_64_linux): Removed.
+ (init_registers_amd64_linux): New.
+ (x86_arch_setup): Replace init_registers_x86_64_linux with
+ init_registers_amd64_linux.
+
+
+ * configure.ac: Check for libdl. If it is not available link against
+ static libthread_db.
+ * configure: Regenerate.
+
+
+ PR9605
+
+ * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
+ handing a read watchpoint.
+ (i386_low_insert_watchpoint): Read watchpoints aren't supported.
+
+
+ * linux-low.c (linux_supports_tracefork_flag): Document.
+ (linux_look_up_symbols): Add comment.
+
+
+ * regcache.c (supply_register): Clear regcache if buf is NULL.
+
+
+ * inferiors.c (find_inferior): Add function documentation.
+ (unloaded_dll): Handle the case where the unloaded dll has not
+ been previously registered in the dll list.
+
+
+ * linux-arm-low.c (thumb_breakpoint_len): Delete.
+ (thumb2_breakpoint): New.
+ (arm_breakpoint_at): Check for Thumb-2 breakpoints.
+
+
+ * linux-low.c (get_stop_pc): Check for SIGTRAP.
+ (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
+ breakpoints.
+
+
+ * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
+
+
+ * linux-s390-low.c (s390_collect_ptrace_register)
+ (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
+
+
+ * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
+ (PTRACE_ARG4_TYPE): New macro.
+ (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
+ (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
+ (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
+ (usr_store_inferior_registers): Ditto.
+ (linux_read_memory, linux_write_memory): Ditto.
+ (linux_test_for_tracefork): Ditto.
+
+ * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
+ Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
+
+
+ * proc-service.c (ps_lgetregs): Don't refetch registers from the
+ target.
+
+
+ * spu-low.c (spu_fetch_registers, spu_store_registers): Change
+ prototype to take a regcache. Adjust.
+
+
+ * regcache.h (struct thread_info): Forward declare.
+ (struct regcache): New.
+ (new_register_cache): Adjust prototype.
+ (get_thread_regcache): Declare.
+ (free_register_cache): Adjust prototype.
+ (registers_to_string, registers_from_string): Ditto.
+ (supply_register, supply_register_by_name, collect_register)
+ (collect_register_as_string, collect_register_by_name): Ditto.
+ * regcache.c (struct inferior_regcache_data): Delete.
+ (get_regcache): Rename to ...
+ (get_thread_regcache): ... this. Adjust. Switch inferior before
+ fetching registers.
+ (regcache_invalidate_one): Adjust.
+ (regcache_invalidate): Fix prototype.
+ (new_register_cache): Return the new register cache.
+ (free_register_cache): Change prototype.
+ (realloc_register_cache): Adjust.
+ (registers_to_string): Change prototype to take a regcache. Adjust.
+ (registers_from_string): Ditto.
+ (register_data): Ditto.
+ (supply_register): Ditto.
+ (supply_register_by_name): Ditto.
+ (collect_register): Ditto.
+ (collect_register_as_string): Ditto.
+ (collect_register_by_name): Ditto.
+ * server.c (process_serial_event): Adjust.
+ * linux-low.h (regset_fill_func, regset_store_func): Change
+ prototype.
+ (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
+ Change prototype.
+ * linux-low.c (get_stop_pc): Adjust.
+ (check_removed_breakpoint): Adjust.
+ (linux_wait_for_event): Adjust.
+ (linux_resume_one_lwp): Adjust.
+ (fetch_register): Add regcache parameter. Adjust.
+ (usr_store_inferior_registers): Ditto.
+ (regsets_fetch_inferior_registers): Ditto.
+ (regsets_store_inferior_registers): Ditto.
+ (linux_fetch_registers, linux_store_registers): Ditto.
+ * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
+ regcache. Adjust.
+ (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
+ * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
+ prototype to take a regcache.
+ (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
+ * remote-utils.c (convert_ascii_to_int, outreg)
+ (prepare_resume_reply): Change prototype to take a regcache.
+ Adjust.
+ * target.h (struct target_ops) <fetch_registers, store_registers>:
+ Change prototype to take a regcache.
+ (fetch_inferior_registers, store_inferior_registers): Change
+ prototype to take a regcache. Adjust.
+ * proc-service.c (ps_lgetregs): Adjust.
+ * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
+ (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
+ (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
+ take a regcache. Adjust.
+ * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
+ (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
+ (arm_store_vfpregset, arm_get_pc, arm_set_pc):
+ (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
+ * linux-cris-low.c (cris_get_pc, cris_set_pc)
+ (cris_cannot_fetch_register):
+ (cris_breakpoint_at): Change prototype to take a regcache.
+ Adjust.
+ * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
+ cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
+ to take a regcache. Adjust.
+ (cris_breakpoint_at, cris_insert_point, cris_remove_point):
+ Adjust.
+ * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
+ take a regcache. Adjust.
+ * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
+ (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
+ (m68k_set_pc): Change prototype to take a regcache. Adjust.
+ * linux-mips-low.c (mips_get_pc):
+ (mips_set_pc): Change prototype to take a regcache. Adjust.
+ (mips_reinsert_addr): Adjust.
+ (mips_collect_register): Change prototype to take a regcache.
+ Adjust.
+ (mips_supply_register):
+ (mips_collect_register_32bit, mips_supply_register_32bit)
+ (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
+ (mips_store_fpregset): Ditto.
+ * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
+ Ditto.
+ (parse_spufs_run): Adjust.
+ (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
+ (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
+ (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
+ take a regcache. Adjust.
+ * linux-s390-low.c (s390_collect_ptrace_register)
+ (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
+ (s390_set_pc): Change prototype to take a regcache. Adjust.
+ (s390_arch_setup): Adjust.
+ * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
+ (sh_fill_gregset): Change prototype to take a regcache. Adjust.
+ * linux-sparc-low.c (sparc_fill_gregset_to_stack)
+ (sparc_fill_gregset, sparc_store_gregset_from_stack)
+ (sparc_store_gregset, sparc_get_pc): Change prototype to take a
+ regcache. Adjust.
+ (sparc_breakpoint_at): Adjust.
+ * linux-xtensa-low.c (xtensa_fill_gregset):
+ (xtensa_store_gregset):
+ (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
+ (xtensa_set_pc): Change prototype to take a regcache. Adjust.
+ * nto-low.c (nto_fetch_registers, nto_store_registers): Change
+ prototype to take a regcache. Adjust.
+ * win32-arm-low.c (arm_fetch_inferior_register)
+ (arm_store_inferior_register): Change prototype to take a
+ regcache. Adjust.
+ * win32-i386-low.c (i386_fetch_inferior_register)
+ (i386_store_inferior_register): Change prototype to take a
+ regcache. Adjust.
+ * win32-low.c (child_fetch_inferior_registers)
+ (child_store_inferior_registers): Change prototype to take a
+ regcache. Adjust.
+ (win32_wait): Adjust.
+ (win32_fetch_inferior_registers): Change prototype to take a
+ regcache. Adjust.
+ (win32_store_inferior_registers): Adjust.
+ * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
+ store_inferior_register>: Change prototype to take a regcache.
+
+
+ * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
+ #ifdef.
+ (linux_wait_for_event1, linux_init_signals): Ditto.
+ (W_STOPCODE): Provide definition if missing.
+
+
+ * linux-low.c (linux_core_of_thread): New.
+ (compare_ints, show_process, list_threads): New.
+ (linux_qxfer_osdata): Report threads and cores.
+ (linux_target_op): Register linux_core_of_thread.
+ * remote-utils.c (prepare_resume_reply): Report the core.
+ (buffer_xml_printf): Support %d specifier.
+ * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
+ New.
+ (handle_query): Handle qXfer:threads. Announce availability
+ thereof.
+ * target.h (struct target_ops): New field core_of_thread.
+
+
+ * Makefile.in (clean): Remove new generated files.
+ (reg-s390.o, reg-s390.c): Remove rules.
+ (reg-s390x.o, reg-s390x.c): Likewise.
+ (s390-linux32.o, s390-linux32.c): Add rules.
+ (s390-linux64.o, s390-linux64.c): Likewise.
+ (s390x-linux64.o, s390x-linux64.c): Likewise.
+ * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
+ * linux-s390-low.c: Include <elf.h>.
+ (HWCAP_S390_HIGH_GPRS): Define if undefined.
+ (init_registers_s390): Remove prototype.
+ (init_registers_s390x): Likewise.
+ (init_registers_s390_linux32): Add prototype.
+ (init_registers_s390_linux64): Likewise.
+ (init_registers_s390x_linux64): Likewise.
+ (s390_num_regs_3264): New define.
+ (s390_regmap_3264): New global variable.
+ (s390_cannot_fetch_register): Remove obsolete check.
+ (s390_cannot_store_register): Likewise.
+ (s390_collect_ptrace_register): Handle upper/lower register halves.
+ (s390_supply_ptrace_register): Likewise.
+ (s390_fill_gregset): Update to register number changes.
+ (s390_get_hwcap): New routine.
+ (s390_arch_setup): Detect 32-bit process running on 64-bit system.
+ Install appropriate regmap and register set.
+
+
+ * server.c (gdbserver_version): Update copyright year to 2010.
+ * gdbreplay.c (gdbreplay_version): Likewise.
+
+
+ * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
+ elf/external.h. Include <elf.h> instead but only if necessary.
+
+
+ * linux-low.c (linux_remove_process): Remove `detaching'
+ parameter. Don't release/detach from thread_db here.
+ (linux_kill): Release/detach from thread_db here, ...
+ (linux_detach): ... and here, before actually detaching.
+ (linux_wait_1): ... and here, when a process exits.
+ * thread-db.c (any_thread_of): New.
+ (thread_db_free): Switch the current inferior to a thread of the
+ passed in process.
+
+
+ * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
+
+ * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
+ Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
+ warning ifndef __NR_tkill. Move setting of errno there too.
+ Delete unnecessary resetting of errno after syscall.
+ Minor comment changes to match gdb/linux-nat.c:kill_lwp.
+
+ * configure.ac: Check for dladdr.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
+ (try_thread_db_load): Update.
+
+ * linux-low.c (my_waitpid): Delete unnecessary prototype.
+
+
+ * event-loop.c: Include unistd.h if it exists.
+
+ * linux-low.c (my_waitpid): Move definition away from being in
+ between linux_tracefork_child/linux_test_for_tracefork.
+
+ * gdb_proc_service.h (psaddr_t): Fix type.
+ * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
+ signature to match glibc.
+
+
+ * linux-low.c (linux_read_memory): Fix argument to read.
+
+
+ * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
+ events, don't leave current_inferior pointing at null.
+
+
+ * win32-low.c (LOG): Delete.
+ (OUTMSG): Output to stderr.
+ (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
+ on compile time LOG macro.
+ (win32_wait): Fix debug output.
+
+
+ * win32-low.c (win32_add_one_solib): If the dll name is
+ "ntdll.dll", prepend the system directory to the dll path.
+
+
+ * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
+
+
+ * Makefile.in (reg-cf.o, reg-cf.c): New targets.
+ * configure.ac: Check for __mcoldfire__ and set
+ gdb_cv_m68k_is_coldfire.
+ * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
+ reg-cf.o and reg-m68k.o.
+ * configure: Regenerated.
+
+
+ * linux-low.c (linux_remove_process): Add `detaching' parameter.
+ Pass it to thread_db_free.
+ (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
+ proper `detaching' argument to linux_remove_process.
+ * linux-low.h (thread_db_free): Add `detaching' parameter.
+ * thread-db.c (thread_db_init): Pass false as `detaching' argument
+ to thread_db_free.
+ (thread_db_free): Add `detaching' parameter. Only
+ call td_ta_clear_event if detaching from process.
+
+
+ * thread-db.c (thread_db_free): Fix typo.
+
+
+ PR gdb/10838
+ * thread-db.c (thread_db_free): Call td_ta_clear_event.
+
+
+ * configure.ac (i[34567]86-*): Check if we're targetting x86-64
+ with an i686 compiler.
+ * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
+ needed.
+ * configure: Rebuilt.
+
+
+ PR gdb/10783
+
+ * server.c (handle_search_memory_1): Correct read_addr initialization
+ in loop for searching subsequent chunks.
+
+
+ * configure.ac: New --with-libthread-db option.
+ * thread-db.c: Allow direct dependence on libthread_db.
+ (thread_db_free): Adjust.
+ * config.in: Regenerate.
+ * configure: Likewise.
+
+
+ PR gdb/10757
+ * thread-db.c (attach_thread): New function.
+ (maybe_attach_thread): Return success/failure.
+ (find_new_threads_callback): Adjust.
+ (thread_db_find_new_threads): Loop until no new threads.
+
+
+ * proc-service.c (ps_lgetregs): Formatting.
+
+
+ * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
+ * configure.ac: Adjust.
+ * linux-low.h (struct process_info_private): Move members to struct
+ thread_db.
+ (thread_db_free, thread_db_handle_monitor_command): New prototype.
+ * linux-low.c (linux_remove_process): Adjust.
+ (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
+ * server.c (handle_query): Move code ...
+ (handle_monitor_command): ... here. New function.
+ * target.h (struct target_ops): New member.
+ * thread-db.c (struct thread_db): New.
+ (libthread_db_search_path): New variable.
+ (thread_db_create_event, thread_db_enable_reporting)
+ (find_one_thread, maybe_attach_thread, find_new_threads_callback)
+ (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
+ (try_thread_db_load_1, dladdr_to_soname): New functions.
+ (try_thread_db_load, thread_db_load_search): New functions.
+ (thread_db_init): Search for libthread_db.
+ (thread_db_free): New function.
+ (thread_db_handle_monitor_command): Likewise.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
+
+ * spu-low.c (spu_kill): Wait for inferior to terminate.
+ Call clear_inferiors.
+ (spu_detach): Call clear_inferiors.
+
+
+ * aclocal.m4: Regenerate.
+ * config.in: Likewise.
+ * configure: Likewise.
+
+
+ * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
+ (parse_spufs_run): New function.
+ (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
+ (ppc_breakpoint_at): Handle SPU breakpoints.
+
+
+ * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
+ (SPUFS_MAGIC): Define.
+ (spu_enumerate_spu_ids): New function.
+ (linux_qxfer_spu): New function.
+ (linux_target_ops): Install linux_qxfer_spu.
+
+
+ * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
+ and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
+ and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
+ * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
+ (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
+ (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
+ * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
+ (init_registers_powerpc_cell32l): Add prototype.
+ (init_registers_powerpc_cell64l): Likewise.
+ (ppc_arch_setup): Detect Cell/B.E. architecture.
+
+
+ * Makefile.in (datarootdir): New variable.
+
+
+ * linux-low.c (linux_write_memory): Update debugging output.
+ * Makefile.in (clean): Add new descriptions.
+ (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
+ (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
+ * configure.srv: Add new files for arm*-*-linux*.
+ * linux-arm-low.c: Add new declarations.
+ (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
+ (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
+ (HWCAP_VFPv3D16): New.
+ (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
+ instead of __IWMMXT__.
+ (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
+ (arm_arch_setup): New.
+ (target_regsets): Remove #ifdef. Add VFP regset.
+ (the_low_target): Use arm_arch_setup.
+
+
+ * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
+ the main thread again.
+
+
+ Adding Neutrino gdbserver.
+ * configure: Regenerated.
+ * configure.ac: Add case for srv_qnx and set LIBS accordingly.
+ * configure.srv (i[34567]86-*-nto*): New target.
+ * nto-low.c, nto-low.h, nto-x86-low.c: New files.
+ * remote-utils.c [__QNX__]: Include sys/iomgr.h
+ (nto_comctrl) [__QNX__]: New function.
+ (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
+
+
+ * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
+ srv_tgtobj.
+
+
+ * win32-i386-low.c (i386_get_thread_context): Handle systems that
+ don't support CONTEXT_EXTENDED_REGISTERS.
+ (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
+ (the_low_target): Install them.
+ * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
+ failing with ERROR_PIPE_NOT_CONNECTED.
+
+
+ Add h/w watchpoint support to x86-linux, win32-i386.
+ * Makefile.in (SFILES): Add i386-low.c
+ (i386_low_h): Define.
+ (i386-low.o): Add dependencies.
+ (linux-x86-low.o): Add i386-low.h dependency.
+ (win32-i386-low.o): Ditto.
+ * i386-low.c: New file.
+ * i386-low.h: New file.
+ * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
+ (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
+ * linux-low.c (linux_add_process): Initialize arch_private.
+ (linux_remove_process): Free arch_private.
+ (add_lwp): Initialize arch_private.
+ (delete_lwp): Free arch_private.
+ (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
+ provided.
+ * linux-low.h (process_info_private): New member arch_private.
+ (lwp_info): New member arch_private.
+ (linux_target_ops): New members new_process, new_thread,
+ prepare_to_resume.
+ (ptid_of): New macro.
+ * linux-x86-low.c: Include stddef.h, i386-low.h.
+ (arch_process_info): New struct.
+ (arch_lwp_info): New struct.
+ (x86_linux_dr_get, x86_linux_dr_set): New functions.
+ (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
+ (i386_dr_low_get_status): New function.
+ (x86_insert_point, x86_remove_point): New functions.
+ (x86_stopped_by_watchpoint): New function.
+ (x86_stopped_data_address): New function.
+ (x86_linux_new_process, x86_linux_new_thread): New functions.
+ (x86_linux_prepare_to_resume): New function.
+ (the_low_target): Add entries for insert_point, remove_point,
+ stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
+ prepare_to_resume.
+ * server.c (debug_hw_points): New global.
+ (monitor_show_help): Document set debug-hw-points.
+ (handle_query): Process "set debug-hw-points".
+ * server.h (debug_hw_points): Declare.
+ (paddress): Declare.
+ * utils.c (NUMCELLS, CELLSIZE): New macros.
+ (get_sell, xsnprintf, paddress): New functions.
+ * win32-arm-low.c (the_low_target): Add entries for insert_point,
+ remove_point, stopped_by_watchpoint, stopped_data_address.
+ * win32-i386-low.c: Include i386-low.h.
+ (debug_reg_state): Replaces dr.
+ (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
+ (i386_dr_low_get_status): New function.
+ (i386_insert_point, i386_remove_point): New functions.
+ (i386_stopped_by_watchpoint): New function.
+ (i386_stopped_data_address): New function.
+ (i386_initial_stuff): Update.
+ (get_thread_context,set_thread_context,i386_thread_added): Update.
+ (the_low_target): Add entries for insert_point,
+ remove_point, stopped_by_watchpoint, stopped_data_address.
+ * win32-low.c (win32_insert_watchpoint): New function.
+ (win32_remove_watchpoint): New function.
+ (win32_stopped_by_watchpoint): New function.
+ (win32_stopped_data_address): New function.
+ (win32_target_ops): Add entries for insert_watchpoint,
+ remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
+ * win32-low.h (win32_target_ops): New members insert_point,
+ remove_point, stopped_by_watchpoint, stopped_data_address.
+
+
+ * server.c (process_serial_event): Re-return unsupported, not
+ error, if the type isn't recognized. Re-allow supporting only
+ insert or remove packets. Also call require_running for
+ breakpoints. Add missing break statement to default case. Tidy.
+ * target.h (struct target_ops): Rename insert_watchpoint to
+ insert_point, and remove_watchpoint to remove_point.
+
+ * linux-low.h (struct linux_target_ops): Likewise.
+ * linux-low.c (linux_insert_watchpoint): Rename to ...
+ (linux_insert_point): ... this. Adjust.
+ (linux_remove_watchpoint): Rename to ...
+ (linux_remove_point): ... this. Adjust.
+ (linux_target_ops): Adjust.
+ * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
+ (cris_insert_point): ... this.
+ (cris_remove_watchpoint): Rename to ...
+ (cris_remove_point): ... this.
+ (the_low_target): Adjust.
+
+
+ * server.c (handle_v_kill): Pass signal_pid to
+ kill_inferior if multi_process is zero.
+
+
+ * server.c (process_serial_event): Add support for Z0 and Z1 packet.
+ * target.h (target_ops): Comment for *_watchpoint to make it clear
+ the functions can get types '0' and '1'.
+
+
+ * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
+ * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
+ * regcache.c (get_regcache): Likewise.
+ * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
+ * win32-low.c (child_fetch_inferior_registers): Remove check for
+ regno 0.
+
+
+ * target.h (struct target_ops) <supports_multi_process>: New
+ callback.
+ (target_supports_multi_process): New.
+ * server.c (handle_query): Even if GDB reports support, only
+ enable multi-process if the target also supports it. Report
+ multi-process support only if the target backend supports it.
+ * linux-low.c (linux_supports_multi_process): New function.
+ (linux_target_ops): Install it as target_supports_multi_process
+ callback.
+
+
+ Global renaming of find_thread_pid to find_thread_ptid.
+ * server.h (find_thread_ptid): Renamed from find_thread_pid.
+ * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
+ All callers updated.
+
+ * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
+ to resume the newly created thread, don't call ptrace (PTRACE_CONT)
+ directly.
+
+ * linux-low.c (get_stop_pc): Print pc if debug_threads.
+ (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
+ (linux_resume_one_lwp): Ditto.
+
+
+ * linux-low.c (linux_resume_one_lwp): Change type of first arg
+ from struct inferior_list_entry * to struct lwp_info *.
+ All callers updated.
+
+
+ * linux-x86-low.c: Don't include assert.h.
+ (x86_siginfo_fixup): Use fatal, not assert.
+ (x86_arch_setup): Fix comment.
+
+
+ Biarch support for i386/amd64 gdbserver.
+ * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
+ Add linux-x86-low.c.
+ (linux-i386-low.o, linux-x86-64-low.o): Delete.
+ (linux-x86-low.o): Add.
+ * linux-x86-64-low.c: Delete.
+ * linux-i386-low.c: Delete.
+ * linux-x86-low.c: New file.
+ * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
+ linux-x86-low.o.
+ (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
+ linux-x86-low.o.
+ (x86_64-linux srv_regobj): Add reg-i386-linux.o.
+ * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
+ (linux_child_pid_to_exec_file): New function.
+ (elf_64_header_p, elf_64_file_p): New functions.
+ (siginfo_fixup): New function.
+ (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
+ give target a chance to convert layout.
+ * linux-low.h (linux_target_ops): New member siginfo_fixup.
+ (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
+
* linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.