
Fix a bug in `micromips_insn_at_pc_has_delay_slot' in instruction size determination via `mips_insn_size'. In the microMIPS case the latter function expects a lone 16-bit instruction word containing the major opcode regardless of whether the opcode requires another 16-bit word to follow, to form a complete 32-bit instruction. Code however passes the 16-bit word previously retrieved shifted left by 16 bits. Consequently `mips_insn_size', which examines the low 16-bit only, always sees 0. By pure coincidence a major opcode of 0 denotes a 32-bit instruction in the microMIPS instruction set, so the size of 4 is always returned here, and the following 16-bit word is then merged in the low 16 bits of the instruction previously shifted by 16 bits. The resulting 32-bit value is then passed to `micromips_instruction_has_delay_slot' for delay slot presence determination. This function in turn first examines the high 16 bits of the instruction word received and ignores the low 16 bits for 16-bit instructions. Consequently the only effect of this bug is an extraneous memory read issued to retrieve a subsequent 16-bit word where a 16-bit instruction is being examined. Which in turn may fail if the instruction is located right at the end of a readable memory area, in which case the lack of a delay slot will be reported to the caller, which may be incorrect. This code is used in breakpoint maintenance, for delay slot avoidance, so the bug would only trigger for the unlikely case of someone placing a breakpoint in a delay slot of an instruction which is at the end of readable memory. Which explains why the bug remained unnoticed so long. gdb/ * mips-tdep.c (micromips_insn_at_pc_has_delay_slot): Pass unshifted 16-bit microMIPS instruction word to `mips_insn_size'.
414 lines
15 KiB
Text
414 lines
15 KiB
Text
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.
|
||
|
||
2016-01-13 Yao Qi <yao.qi@linaro.org>
|
||
|
||
* arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Use
|
||
byte_order_for_code to read instruction.
|
||
|
||
2016-01-13 Pedro Alves <palves@redhat.com>
|
||
|
||
* NEWS: Mention $_gthread.
|
||
* gdbthread.h (struct thread_info) <global_num>: Mention
|
||
$_gthread.
|
||
* thread.c (thread_num_make_value_helper): New function.
|
||
(thread_id_make_value): Delete.
|
||
(thread_id_per_inf_num_make_value, global_thread_id_make_value):
|
||
New.
|
||
(thread_funcs): Adjust.
|
||
(gthread_funcs): New.
|
||
(_initialize_thread): Register $_gthread variable.
|
||
|
||
2016-01-13 Pedro Alves <palves@redhat.com>
|
||
|
||
* NEWS: Mention "info threads -gid".
|
||
* gdbthread.h (struct thread_info) <global_num>: Mention "info
|
||
threads -gid".
|
||
* thread.c (info_threads_command): Handle "-gid".
|
||
(_initialize_thread): Adjust "info threads" help string to mention
|
||
-gid.
|
||
|
||
2016-01-13 Pedro Alves <palves@redhat.com>
|
||
|
||
* NEWS: Mention InferiorThread.global_num.
|
||
* python/py-infthread.c (thpy_get_global_num): New function.
|
||
(thread_object_getset): Register "global_num".
|
||
|
||
2016-01-13 Pedro Alves <palves@redhat.com>
|
||
|
||
* NEWS: Mention that thread IDs are now per inferior and global
|
||
thread IDs.
|
||
* Makefile.in (SFILES): Add tid-parse.c.
|
||
(COMMON_OBS): Add tid-parse.o.
|
||
(HFILES_NO_SRCDIR): Add tid-parse.h.
|
||
* ada-tasks.c: Adjust to use ptid_to_global_thread_id.
|
||
* breakpoint.c (insert_breakpoint_locations)
|
||
(remove_threaded_breakpoints, bpstat_check_breakpoint_conditions)
|
||
(print_one_breakpoint_location, set_longjmp_breakpoint)
|
||
(check_longjmp_breakpoint_for_call_dummy)
|
||
(set_momentary_breakpoint): Adjust to use global IDs.
|
||
(find_condition_and_thread, watch_command_1): Use parse_thread_id.
|
||
(until_break_command, longjmp_bkpt_dtor)
|
||
(breakpoint_re_set_thread, insert_single_step_breakpoint): Adjust
|
||
to use global IDs.
|
||
* dummy-frame.c (pop_dummy_frame_bpt): Adjust to use
|
||
ptid_to_global_thread_id.
|
||
* elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
|
||
* gdbthread.h (struct thread_info): Rename field 'num' to
|
||
'global_num. Add new fields 'per_inf_num' and 'inf'.
|
||
(thread_id_to_pid): Rename thread_id_to_pid to
|
||
global_thread_id_to_ptid.
|
||
(pid_to_thread_id): Rename to ...
|
||
(ptid_to_global_thread_id): ... this.
|
||
(valid_thread_id): Rename to ...
|
||
(valid_global_thread_id): ... this.
|
||
(find_thread_id): Rename to ...
|
||
(find_thread_global_id): ... this.
|
||
(ALL_THREADS, ALL_THREADS_BY_INFERIOR): Declare.
|
||
(print_thread_info): Add comment.
|
||
* tid-parse.h: New file.
|
||
* tid-parse.c: New file.
|
||
* infcmd.c (step_command_fsm_prepare)
|
||
(step_command_fsm_should_stop): Adjust to use the global thread
|
||
ID.
|
||
(until_next_command, until_next_command)
|
||
(finish_command_fsm_should_stop): Adjust to use the global thread
|
||
ID.
|
||
(attach_post_wait): Adjust to check the inferior number too.
|
||
* inferior.h (struct inferior) <highest_thread_num>: New field.
|
||
* infrun.c (handle_signal_stop)
|
||
(insert_exception_resume_breakpoint)
|
||
(insert_exception_resume_from_probe): Adjust to use the global
|
||
thread ID.
|
||
* record-btrace.c (record_btrace_open): Use global thread IDs.
|
||
* remote.c (process_initial_stop_replies): Also consider the
|
||
inferior number.
|
||
* target.c (target_pre_inferior): Clear the inferior's highest
|
||
thread num.
|
||
* thread.c (clear_thread_inferior_resources): Adjust to use the
|
||
global thread ID.
|
||
(new_thread): New inferior parameter. Adjust to use it. Set both
|
||
the thread's global ID and the thread's per-inferior ID.
|
||
(add_thread_silent): Adjust.
|
||
(find_thread_global_id): New.
|
||
(find_thread_id): Make static. Adjust to rename.
|
||
(valid_thread_id): Rename to ...
|
||
(valid_global_thread_id): ... this.
|
||
(pid_to_thread_id): Rename to ...
|
||
(ptid_to_global_thread_id): ... this.
|
||
(thread_id_to_pid): Rename to ...
|
||
(global_thread_id_to_ptid): ... this. Adjust.
|
||
(first_thread_of_process): Adjust.
|
||
(do_captured_list_thread_ids): Adjust to use global thread IDs.
|
||
(should_print_thread): New function.
|
||
(print_thread_info): Rename to ...
|
||
(print_thread_info_1): ... this, and add new show_global_ids
|
||
parameter. Handle it. Iterate over inferiors.
|
||
(print_thread_info): Reimplement as wrapper around
|
||
print_thread_info_1.
|
||
(show_inferior_qualified_tids): New function.
|
||
(print_thread_id): Use it.
|
||
(tp_array_compar): Compare inferior numbers too.
|
||
(thread_apply_command): Use tid_range_parser.
|
||
(do_captured_thread_select): Use parse_thread_id.
|
||
(thread_id_make_value): Adjust.
|
||
(_initialize_thread): Adjust "info threads" help string.
|
||
* varobj.c (struct varobj_root): Update comment.
|
||
(varobj_create): Adjust to use global thread IDs.
|
||
(value_of_root_1): Adjust to use global_thread_id_to_ptid.
|
||
* windows-tdep.c (display_tib): No longer accept an argument.
|
||
* cli/cli-utils.c (get_number_trailer): Make extern.
|
||
* cli/cli-utils.h (get_number_trailer): Declare.
|
||
(get_number_const): Adjust documentation.
|
||
* mi/mi-cmd-var.c (mi_cmd_var_update_iter): Adjust to use global
|
||
thread IDs.
|
||
* mi/mi-interp.c (mi_new_thread, mi_thread_exit)
|
||
(mi_on_normal_stop, mi_output_running_pid, mi_on_resume):
|
||
* mi/mi-main.c (mi_execute_command, mi_cmd_execute): Likewise.
|
||
* guile/scm-breakpoint.c (gdbscm_set_breakpoint_thread_x):
|
||
Likewise.
|
||
* python/py-breakpoint.c (bppy_set_thread): Likewise.
|
||
* python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
|
||
* python/py-infthread.c (thpy_get_num): Add comment and return the
|
||
per-inferior thread ID.
|
||
(thread_object_getset): Update comment of "num".
|
||
|
||
2016-01-13 Pedro Alves <palves@redhat.com>
|
||
|
||
* breakpoint.c (remove_threaded_breakpoints)
|
||
(print_one_breakpoint_location): Use print_thread_id.
|
||
* btrace.c (btrace_enable, btrace_disable, btrace_teardown)
|
||
(btrace_fetch, btrace_clear): Use print_thread_id.
|
||
* common/print-utils.c (CELLSIZE): Delete.
|
||
(get_cell): Rename to ...
|
||
(get_print_cell): ... this and made extern. Adjust call callers.
|
||
Adjust to use PRINT_CELL_SIZE.
|
||
* common/print-utils.h (get_print_cell): Declare.
|
||
(PRINT_CELL_SIZE): New.
|
||
* gdbthread.h (print_thread_id): Declare.
|
||
* infcmd.c (signal_command): Use print_thread_id.
|
||
* inferior.c (print_inferior): Use print_thread_id.
|
||
* infrun.c (handle_signal_stop)
|
||
(insert_exception_resume_breakpoint)
|
||
(insert_exception_resume_from_probe)
|
||
(print_signal_received_reason): Use print_thread_id.
|
||
* record-btrace.c (record_btrace_info)
|
||
(record_btrace_resume_thread, record_btrace_cancel_resume)
|
||
(record_btrace_step_thread, record_btrace_wait): Use
|
||
print_thread_id.
|
||
* thread.c (thread_apply_all_command): Use print_thread_id.
|
||
(print_thread_id): New function.
|
||
(thread_apply_command): Use print_thread_id.
|
||
(thread_command, thread_find_command, do_captured_thread_select):
|
||
Use print_thread_id.
|
||
|
||
2016-01-13 Pedro Alves <palves@redhat.com>
|
||
|
||
* NEWS: Mention InferiorThread.inferior.
|
||
* python/py-infthread.c (thpy_get_inferior): New.
|
||
(thread_object_getset): Register "inferior".
|
||
|
||
2016-01-13 Pedro Alves <palves@redhat.com>
|
||
|
||
* NEWS: Mention $_inferior.
|
||
* inferior.c (inferior_id_make_value): New.
|
||
(inferior_funcs): New.
|
||
(_initialize_inferior): Create $_inferior variable.
|
||
|
||
2016-01-13 Pedro Alves <palves@redhat.com>
|
||
|
||
PR breakpoints/19388
|
||
* frame.c (get_current_frame): Use validate_registers_access.
|
||
* gdbthread.h (validate_registers_access): Declare.
|
||
* infrun.c (validate_siginfo_access): Delete.
|
||
(siginfo_value_read, siginfo_value_write): Use
|
||
validate_registers_access.
|
||
* thread.c (validate_registers_access): New function.
|
||
|
||
2016-01-12 Josh Stone <jistone@redhat.com>
|
||
Philippe Waroquiers <philippe.waroquiers@skynet.be>
|
||
|
||
* NEWS (Changes since GDB 7.10): Mention QCatchSyscalls and the
|
||
syscall_entry and syscall_return stop reasons. Mention GDB
|
||
support for remote catch syscall.
|
||
* remote.c (PACKET_QCatchSyscalls): New enum.
|
||
(remote_set_syscall_catchpoint): New function.
|
||
(remote_protocol_features): New element for QCatchSyscalls.
|
||
(remote_parse_stop_reply): Parse syscall_entry/return stops.
|
||
(init_remote_ops): Install remote_set_syscall_catchpoint.
|
||
(_initialize_remote): Config QCatchSyscalls.
|
||
* linux-nat.h (struct lwp_info) <syscall_state>: Comment typo.
|
||
|
||
2016-01-12 Yao Qi <yao.qi@linaro.org>
|
||
|
||
* nat/linux-ptrace.c (linux_child_function): Cast child_stack
|
||
to gdb_byte * and pass to linux_fork_to_function.
|
||
|
||
2016-01-12 Yao Qi <yao.qi@linaro.org>
|
||
|
||
* nat/linux-ptrace.c (linux_fork_to_function): Change type
|
||
of argument 'function'.
|
||
(linux_grandchild_function): Change return type to 'int'.
|
||
Change child_stack's type to 'void *'.
|
||
(linux_child_function): Likewise.
|
||
|
||
2016-01-12 Pedro Alves <palves@redhat.com>
|
||
|
||
Remove use of the registered trademark symbol throughout.
|
||
|
||
2016-01-12 Thomas Schwinge <thomas@codesourcery.com>
|
||
|
||
* reply_mig_hack.awk: Rewrite one regular expression.
|
||
|
||
2016-01-11 Mike Frysinger <vapier@gentoo.org>
|
||
|
||
* acinclude.m4: Include new warning.m4 file.
|
||
* configure: Regenerated.
|
||
* configure.ac: Move all warning logic ...
|
||
* warning.m4: ... here.
|
||
|
||
2016-01-08 Yao Qi <yao.qi@linaro.org>
|
||
|
||
* extension.c: Include target.h.
|
||
(set_active_ext_lang): Only call install_gdb_sigint_handler,
|
||
check_quit_flag, and set_quit_flag if target_terminal_is_ours
|
||
returns false.
|
||
(restore_active_ext_lang): Likewise.
|
||
* target.c (target_terminal_is_ours): New function.
|
||
* target.h (target_terminal_is_ours): Declare.
|
||
|
||
2016-01-07 Maciej W. Rozycki <macro@imgtec.com>
|
||
|
||
* mips-tdep.c (mips_breakpoint_from_pc): Rename local `status'
|
||
to `err' in the little-endian leg.
|
||
|
||
2016-01-06 Yao Qi <yao.qi@linaro.org>
|
||
|
||
* arch/arm-get-next-pcs.c (arm_get_next_pcs): Move it to some
|
||
lines below.
|
||
(thumb_get_next_pcs_raw): Make it static.
|
||
(arm_get_next_pcs_raw): Likewise.
|
||
* arch/arm-get-next-pcs.h (thumb_get_next_pcs_raw): Remove the
|
||
declaration.
|
||
(arm_get_next_pcs_raw): Likewise.
|
||
|
||
2016-01-05 Mike Frysinger <vapier@gentoo.org>
|
||
|
||
* version.in: Change cvs to git.
|
||
|
||
2016-01-05 Mike Frysinger <vapier@gentoo.org>
|
||
|
||
* configure.tgt (score-*-*): Delete gdb_sim assignment.
|
||
|
||
2016-01-05 Pedro Alves <palves@redhat.com>
|
||
|
||
PR sim/13418
|
||
* configure.ac: Define WITH_PPC_SIM when linking in the sim and
|
||
the target is powerpc*.
|
||
* rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
|
||
of WITH_SIM.
|
||
* configure: Regenerate.
|
||
* config.in: Regenerate.
|
||
|
||
2016-01-04 Markus Metzger <markus.t.metzger@intel.com>
|
||
|
||
* btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
|
||
|
||
2016-01-02 Mike Frysinger <vapier@gentoo.org>
|
||
|
||
* configure.tgt (powerpc*-*-*): Delete test call and
|
||
always assign gdb_sim.
|
||
|
||
2016-01-01 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
Update year range in copyright notice of all files.
|
||
|
||
2016-01-01 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
* top.c (print_gdb_version): Change copyright year in version
|
||
message.
|
||
|
||
2016-01-01 Joel Brobecker <brobecker@adacore.com>
|
||
|
||
* config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.
|
||
|
||
For older changes see ChangeLog-2015.
|
||
|
||
Local Variables:
|
||
mode: change-log
|
||
left-margin: 8
|
||
fill-column: 74
|
||
version-control: never
|
||
coding: utf-8
|
||
End:
|