Add support for LWP-based threads on FreeBSD.
[binutils-gdb.git] / gdb / ChangeLog
index 8d35f5f1cd96b08eae086cd725049f56bdc72a16..2cdf2fa8e27eefd8033b478dda31a95684a9014c 100644 (file)
@@ -1,3 +1,203 @@
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+       * configure.ac: Check for support for LWP names on FreeBSD.
+       * fbsd-nat.c [PT_LWPINFO] New variable debug_fbsd_lwp.
+       [TDP_RFPPWAIT || HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]
+       (fbsd_fetch_kinfo_proc): Move function earlier.
+       [PT_LWPINFO] (fbsd_thread_alive): New function.
+       [PT_LWPINFO] (fbsd_pid_to_str): New function.
+       [HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME] (fbsd_thread_name): New function.
+       [PT_LWP_EVENTS] (fbsd_enable_lwp_events): New function.
+       [PT_LWPINFO] (fbsd_add_threads): New function.
+       [PT_LWPINFO] (fbsd_update_thread_list): New function.
+       [PT_LWPINFO] New variable super_resume.
+       [PT_LWPINFO] (resume_one_thread_cb): New function.
+       [PT_LWPINFO] (resume_all_threads_cb): New function.
+       [PT_LWPINFO] (fbsd_resume): New function.
+       (fbsd_remember_child): Save full ptid instead of plain pid.
+       (fbsd_is_child_pending): Return ptid of saved child process.
+       (fbsd_wait): Include lwp in returned ptid and switch to LWP ptid on
+       first stop.
+       [PT_LWP_EVENTS] Handle LWP events.
+       [TDP_RFPPWAIT] Include LWP in child ptid.
+       (fbsd_post_startup_inferior) [PT_LWP_EVENTS]: Enable LWP events.
+       (fbsd_post_attach) [PT_LWP_EVENTS]: Enable LWP events.
+       Add threads for existing processes.
+       (fbsd_nat_add_target) [PT_LWPINFO]: Set "to_thread_alive" to
+       "fbsd_thread_alive".
+       Set "to_pid_to_str" to "fbsd_pid_to_str".
+       [HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]: Set "to_thread_name" to
+       "fbsd_thread_name".
+       [PT_LWPINFO]: Set "to_update_thread_list" to "fbsd_update_thread_list".
+       Set "to_has_thread_control" to "tc_schedlock".
+       Set "to_resume" to "fbsd_resume".
+       (_initialize_fbsd_nat): New function.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+       * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
+       get_ptrace_pid.
+       (amd64bsd_store_inferior_registers): Use get_ptrace_pid.
+       (amd64bsd_dr_get): Use get_ptrace_pid.
+       (amd64bsd_dr_set): Use get_ptrace_pid.
+       * i386bsd-nat.c (i386bsd_fetch_inferior_registers): Use get_ptrace_pid.
+       (i386bsd_store_inferior_registers): Use get_ptrace_pid.
+       (i386bsd_dr_get): Use get_ptrace_pid.
+       (i386bsd_dr_set): Use get_ptrace_pid.
+       * inf-ptrace.c (get_ptrace_pid): Export.
+       * inf-ptrace.h (get_ptrace_pid): Declare.
+       * ppcfbsd-nat.c (ppcfbsd_fetch_inferior_registers): Use lwp id.
+       (ppcfbsd_store_inferior_registers): Use lwp id.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+       * fbsd_tdep.c (fbsd_core_pid_to_str): New function.
+       (fbsd_core_thread_name): New function.
+       (fbsd_init_abi): Add "core_pid_to_str" gdbarch method.
+       Add "core_thread_name" gdbarch method.
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+       * corelow.c (core_thread_name): New function.
+       (init_core_ops): Use "core_thread_name" for the "to_thread_name"
+       target op.
+       * gdbarch.sh (core_thread_name): New gdbarch callback.
+       * gdbarch.h: Re-generate.
+       * gdbarch.c: Re-generate.
+
+2016-01-19  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * python/lib/gdb/printing.py (_EnumInstance.to_string): Explicitly
+       convert gdb.Value to integer type using int().
+
+2016-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+       * configure.ac: Include <sys/types.h when checking for "r_fs" in
+       "struct reg".
+       * configure: Regenerate.
+
+2016-01-18  Maciej W. Rozycki  <macro@imgtec.com>
+
+       * mips-tdep.c (mips_insn_size): Remove 48-bit microMIPS
+       instruction support.
+       (micromips_next_pc): Likewise.
+       (micromips_scan_prologue): Likewise.
+       (micromips_deal_with_atomic_sequence): Likewise.
+       (micromips_stack_frame_destroyed_p): Likewise.
+       (mips_breakpoint_from_pc): Likewise.
+
+2016-01-18  Maciej W. Rozycki  <macro@imgtec.com>
+
+       * mips-tdep.c (micromips_insn_at_pc_has_delay_slot): Pass
+       unshifted 16-bit microMIPS instruction word to `mips_insn_size'.
+
+2016-01-18  Pedro Alves  <palves@redhat.com>
+
+       * NEWS: Mention that GDB now displays the ID and name of the
+       thread that hit a breakpoint or received a signal.
+       * break-catch-sig.c (signal_catchpoint_print_it): Use
+       maybe_print_thread_hit_breakpoint.
+       * break-catch-syscall.c (print_it_catch_syscall): Likewise.
+       * break-catch-throw.c (print_it_exception_catchpoint): Likewise.
+       * breakpoint.c (maybe_print_thread_hit_breakpoint): New function.
+       (print_it_catch_fork, print_it_catch_vfork, print_it_catch_solib)
+       (print_it_catch_exec, print_it_ranged_breakpoint)
+       (print_it_watchpoint, print_it_masked_watchpoint, bkpt_print_it):
+       Use maybe_print_thread_hit_breakpoint.
+       * breakpoint.h (maybe_print_thread_hit_breakpoint): Declare.
+       * gdbthread.h (show_thread_that_caused_stop): Declare.
+       * infrun.c (print_signal_received_reason): Print which thread
+       received signal.
+       * thread.c (show_thread_that_caused_stop): New function.
+
+2016-01-18  Gary Benson  <gbenson@redhat.com>
+
+       * nat/linux-namespaces.c (do_fork): New function.
+       (linux_mntns_get_helper): Use the above.
+
+2016-01-17  Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>  (tiny change)
+
+       Pushed by Joel Brobecker  <brobecker@adacore.com>.
+       PR gdb/19208
+       * dwarf2read.c (read_partial_die): Do not call set_objfile_main_name
+       if the function has no name.
+
+2016-01-15  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET):
+       Conditionalize for Windows host.
+       (GDB_DEFAULT_TARGET_CHARSET): Match GDB_DEFAULT_HOST_CHARSET.
+       (GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
+       (phony_iconv_open): Handle both UTF-32 endiannesses.
+       (phony_iconv): Likewise.  Check for output overflow and clean up
+       out-of-input cases.  Correct adjustment to input buffer pointer.
+       (set_be_le_names) [PHONY_ICONV]: Use hard-wired names to match
+       phony_iconv_open.
+
+2016-01-15  Pedro Alves  <palves@redhat.com>
+
+       * NEWS: Mention star wildcard ranges.
+       * cli/cli-utils.c (get_number_or_range): Check state->in_range first.
+       (number_range_setup_range): New function.
+       * cli/cli-utils.h (number_range_setup_range): New declaration.
+       * thread.c (thread_apply_command): Support star TID ranges.
+       * tid-parse.c (tid_range_parser_finished)
+       (tid_range_parser_string, tid_range_parser_skip)
+       (get_tid_or_range, get_tid_or_range): Handle
+       TID_RANGE_STATE_STAR_RANGE.
+       (tid_range_parser_star_range): New function.
+       * tid-parse.h (enum tid_range_state) <TID_RANGE_STATE_STAR_RANGE>:
+       New value.
+       (tid_range_parser_star_range): New declaration.
+
+2016-01-15  Pedro Alves  <palves@redhat.com>
+
+       * thread.c (thread_apply_command): Use the tid range parser to
+       advance past the thread ID list.
+       * tid-parse.c (get_positive_number_trailer): New function.
+       (parse_thread_id): Use it.
+       (get_tid_or_range): Use it.  Return 0 instead of throwing invalid
+       thread ID error.
+       (get_tid_or_range): Detect negative values.  Return 0 instead of
+       throwing invalid thread ID error.
+
+2016-01-14  Yao Qi  <yao.qi@linaro.org>
+
+       * arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
+       Declare.
+       (arm_linux_get_next_pcs_ops): Install
+       arm_linux_get_next_pcs_syscall_next_pc.
+       (arm_linux_syscall_next_pc): Change to ...
+       (arm_linux_get_next_pcs_syscall_next_pc): ... it.
+       (arm_linux_init_abi): Don't set tdep->syscall_next_pc.
+       * arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Declare.
+       (arm_get_next_pcs_syscall_next_pc): Make it static.  Don't
+       call tdep->syscall_next_pc.
+       * arm-tdep.h (struct gdbarch_tdep) <syscall_next_pc>: Remove.
+       (arm_get_next_pcs_syscall_next_pc): Remove.
+
+2016-01-14  Yao Qi  <yao.qi@linaro.org>
+
+       * remote.c (remote_set_syscall_catchpoint): Cast to char *.
+       * thread.c (do_captured_thread_select): Cast to const char *.
+
+2016-01-14  Yao Qi  <yao.qi@linaro.org>
+
+       * arch/arm-get-next-pcs.c (arm_get_next_pcs_ctor): Change
+       argument arm_thumb2_breakpoint to has_thumb2_breakpoint.
+       (thumb_get_next_pcs_raw): Check has_thumb2_breakpoint
+       instead.
+       * arch/arm-get-next-pcs.h (struct arm_get_next_pcs)
+       <arm_thumb2_breakpoint>: Remove.
+       <has_thumb2_breakpoint>: New field.
+       (arm_get_next_pcs_ctor): Update declaration.
+       * arm-linux-tdep.c (arm_linux_software_single_step): Pass
+       1 to arm_get_next_pcs_ctor.
+       * arm-tdep.c (arm_software_single_step): Pass 0 to
+       arm_get_next_pcs_ctor.
+
 2016-01-13  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * MAINTAINERS: Add Andreas Arnez as s390 target maintainer.