1 2016-01-19 John Baldwin <jhb@FreeBSD.org>
3 * fbsd-tdep.c (find_stop_signal): Remove.
4 (struct fbsd_collect_regset_section_cb) <lwp>: New field.
5 <stop_signal>: New field.
6 <abort_iteration>: New field.
7 (fbsd_collect_regset_section_cb): Use new fields.
8 (fbsd_collect_thread_registers): New function.
9 (struct fbsd_corefile_thread_data): New structure.
10 (fbsd_corefile_thread): New function.
11 (fbsd_make_corefile_notes): Use new function to dump notes for each
12 non-exited thread in a process.
14 2016-01-19 John Baldwin <jhb@FreeBSD.org>
16 * configure.ac: Check for support for LWP names on FreeBSD.
17 * fbsd-nat.c [PT_LWPINFO] New variable debug_fbsd_lwp.
18 [TDP_RFPPWAIT || HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]
19 (fbsd_fetch_kinfo_proc): Move function earlier.
20 [PT_LWPINFO] (fbsd_thread_alive): New function.
21 [PT_LWPINFO] (fbsd_pid_to_str): New function.
22 [HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME] (fbsd_thread_name): New function.
23 [PT_LWP_EVENTS] (fbsd_enable_lwp_events): New function.
24 [PT_LWPINFO] (fbsd_add_threads): New function.
25 [PT_LWPINFO] (fbsd_update_thread_list): New function.
26 [PT_LWPINFO] New variable super_resume.
27 [PT_LWPINFO] (resume_one_thread_cb): New function.
28 [PT_LWPINFO] (resume_all_threads_cb): New function.
29 [PT_LWPINFO] (fbsd_resume): New function.
30 (fbsd_remember_child): Save full ptid instead of plain pid.
31 (fbsd_is_child_pending): Return ptid of saved child process.
32 (fbsd_wait): Include lwp in returned ptid and switch to LWP ptid on
34 [PT_LWP_EVENTS] Handle LWP events.
35 [TDP_RFPPWAIT] Include LWP in child ptid.
36 (fbsd_post_startup_inferior) [PT_LWP_EVENTS]: Enable LWP events.
37 (fbsd_post_attach) [PT_LWP_EVENTS]: Enable LWP events.
38 Add threads for existing processes.
39 (fbsd_nat_add_target) [PT_LWPINFO]: Set "to_thread_alive" to
41 Set "to_pid_to_str" to "fbsd_pid_to_str".
42 [HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]: Set "to_thread_name" to
44 [PT_LWPINFO]: Set "to_update_thread_list" to "fbsd_update_thread_list".
45 Set "to_has_thread_control" to "tc_schedlock".
46 Set "to_resume" to "fbsd_resume".
47 (_initialize_fbsd_nat): New function.
48 * configure: Regenerate.
49 * config.in: Regenerate.
51 2016-01-19 John Baldwin <jhb@FreeBSD.org>
53 * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
55 (amd64bsd_store_inferior_registers): Use get_ptrace_pid.
56 (amd64bsd_dr_get): Use get_ptrace_pid.
57 (amd64bsd_dr_set): Use get_ptrace_pid.
58 * i386bsd-nat.c (i386bsd_fetch_inferior_registers): Use get_ptrace_pid.
59 (i386bsd_store_inferior_registers): Use get_ptrace_pid.
60 (i386bsd_dr_get): Use get_ptrace_pid.
61 (i386bsd_dr_set): Use get_ptrace_pid.
62 * inf-ptrace.c (get_ptrace_pid): Export.
63 * inf-ptrace.h (get_ptrace_pid): Declare.
64 * ppcfbsd-nat.c (ppcfbsd_fetch_inferior_registers): Use lwp id.
65 (ppcfbsd_store_inferior_registers): Use lwp id.
67 2016-01-19 John Baldwin <jhb@FreeBSD.org>
69 * fbsd_tdep.c (fbsd_core_pid_to_str): New function.
70 (fbsd_core_thread_name): New function.
71 (fbsd_init_abi): Add "core_pid_to_str" gdbarch method.
72 Add "core_thread_name" gdbarch method.
74 2016-01-19 John Baldwin <jhb@FreeBSD.org>
76 * corelow.c (core_thread_name): New function.
77 (init_core_ops): Use "core_thread_name" for the "to_thread_name"
79 * gdbarch.sh (core_thread_name): New gdbarch callback.
80 * gdbarch.h: Re-generate.
81 * gdbarch.c: Re-generate.
83 2016-01-19 Simon Marchi <simon.marchi@polymtl.ca>
85 * python/lib/gdb/printing.py (_EnumInstance.to_string): Explicitly
86 convert gdb.Value to integer type using int().
88 2016-01-19 John Baldwin <jhb@FreeBSD.org>
90 * configure.ac: Include <sys/types.h when checking for "r_fs" in
92 * configure: Regenerate.
94 2016-01-18 Maciej W. Rozycki <macro@imgtec.com>
96 * mips-tdep.c (mips_insn_size): Remove 48-bit microMIPS
98 (micromips_next_pc): Likewise.
99 (micromips_scan_prologue): Likewise.
100 (micromips_deal_with_atomic_sequence): Likewise.
101 (micromips_stack_frame_destroyed_p): Likewise.
102 (mips_breakpoint_from_pc): Likewise.
104 2016-01-18 Maciej W. Rozycki <macro@imgtec.com>
106 * mips-tdep.c (micromips_insn_at_pc_has_delay_slot): Pass
107 unshifted 16-bit microMIPS instruction word to `mips_insn_size'.
109 2016-01-18 Pedro Alves <palves@redhat.com>
111 * NEWS: Mention that GDB now displays the ID and name of the
112 thread that hit a breakpoint or received a signal.
113 * break-catch-sig.c (signal_catchpoint_print_it): Use
114 maybe_print_thread_hit_breakpoint.
115 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
116 * break-catch-throw.c (print_it_exception_catchpoint): Likewise.
117 * breakpoint.c (maybe_print_thread_hit_breakpoint): New function.
118 (print_it_catch_fork, print_it_catch_vfork, print_it_catch_solib)
119 (print_it_catch_exec, print_it_ranged_breakpoint)
120 (print_it_watchpoint, print_it_masked_watchpoint, bkpt_print_it):
121 Use maybe_print_thread_hit_breakpoint.
122 * breakpoint.h (maybe_print_thread_hit_breakpoint): Declare.
123 * gdbthread.h (show_thread_that_caused_stop): Declare.
124 * infrun.c (print_signal_received_reason): Print which thread
126 * thread.c (show_thread_that_caused_stop): New function.
128 2016-01-18 Gary Benson <gbenson@redhat.com>
130 * nat/linux-namespaces.c (do_fork): New function.
131 (linux_mntns_get_helper): Use the above.
133 2016-01-17 Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de> (tiny change)
135 Pushed by Joel Brobecker <brobecker@adacore.com>.
137 * dwarf2read.c (read_partial_die): Do not call set_objfile_main_name
138 if the function has no name.
140 2016-01-15 Sandra Loosemore <sandra@codesourcery.com>
142 * charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET):
143 Conditionalize for Windows host.
144 (GDB_DEFAULT_TARGET_CHARSET): Match GDB_DEFAULT_HOST_CHARSET.
145 (GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
146 (phony_iconv_open): Handle both UTF-32 endiannesses.
147 (phony_iconv): Likewise. Check for output overflow and clean up
148 out-of-input cases. Correct adjustment to input buffer pointer.
149 (set_be_le_names) [PHONY_ICONV]: Use hard-wired names to match
152 2016-01-15 Pedro Alves <palves@redhat.com>
154 * NEWS: Mention star wildcard ranges.
155 * cli/cli-utils.c (get_number_or_range): Check state->in_range first.
156 (number_range_setup_range): New function.
157 * cli/cli-utils.h (number_range_setup_range): New declaration.
158 * thread.c (thread_apply_command): Support star TID ranges.
159 * tid-parse.c (tid_range_parser_finished)
160 (tid_range_parser_string, tid_range_parser_skip)
161 (get_tid_or_range, get_tid_or_range): Handle
162 TID_RANGE_STATE_STAR_RANGE.
163 (tid_range_parser_star_range): New function.
164 * tid-parse.h (enum tid_range_state) <TID_RANGE_STATE_STAR_RANGE>:
166 (tid_range_parser_star_range): New declaration.
168 2016-01-15 Pedro Alves <palves@redhat.com>
170 * thread.c (thread_apply_command): Use the tid range parser to
171 advance past the thread ID list.
172 * tid-parse.c (get_positive_number_trailer): New function.
173 (parse_thread_id): Use it.
174 (get_tid_or_range): Use it. Return 0 instead of throwing invalid
176 (get_tid_or_range): Detect negative values. Return 0 instead of
177 throwing invalid thread ID error.
179 2016-01-14 Yao Qi <yao.qi@linaro.org>
181 * arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
183 (arm_linux_get_next_pcs_ops): Install
184 arm_linux_get_next_pcs_syscall_next_pc.
185 (arm_linux_syscall_next_pc): Change to ...
186 (arm_linux_get_next_pcs_syscall_next_pc): ... it.
187 (arm_linux_init_abi): Don't set tdep->syscall_next_pc.
188 * arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Declare.
189 (arm_get_next_pcs_syscall_next_pc): Make it static. Don't
190 call tdep->syscall_next_pc.
191 * arm-tdep.h (struct gdbarch_tdep) <syscall_next_pc>: Remove.
192 (arm_get_next_pcs_syscall_next_pc): Remove.
194 2016-01-14 Yao Qi <yao.qi@linaro.org>
196 * remote.c (remote_set_syscall_catchpoint): Cast to char *.
197 * thread.c (do_captured_thread_select): Cast to const char *.
199 2016-01-14 Yao Qi <yao.qi@linaro.org>
201 * arch/arm-get-next-pcs.c (arm_get_next_pcs_ctor): Change
202 argument arm_thumb2_breakpoint to has_thumb2_breakpoint.
203 (thumb_get_next_pcs_raw): Check has_thumb2_breakpoint
205 * arch/arm-get-next-pcs.h (struct arm_get_next_pcs)
206 <arm_thumb2_breakpoint>: Remove.
207 <has_thumb2_breakpoint>: New field.
208 (arm_get_next_pcs_ctor): Update declaration.
209 * arm-linux-tdep.c (arm_linux_software_single_step): Pass
210 1 to arm_get_next_pcs_ctor.
211 * arm-tdep.c (arm_software_single_step): Pass 0 to
212 arm_get_next_pcs_ctor.
214 2016-01-13 Ulrich Weigand <uweigand@de.ibm.com>
216 * MAINTAINERS: Add Andreas Arnez as s390 target maintainer.
218 2016-01-13 Yao Qi <yao.qi@linaro.org>
220 * arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Use
221 byte_order_for_code to read instruction.
223 2016-01-13 Pedro Alves <palves@redhat.com>
225 * NEWS: Mention $_gthread.
226 * gdbthread.h (struct thread_info) <global_num>: Mention
228 * thread.c (thread_num_make_value_helper): New function.
229 (thread_id_make_value): Delete.
230 (thread_id_per_inf_num_make_value, global_thread_id_make_value):
232 (thread_funcs): Adjust.
233 (gthread_funcs): New.
234 (_initialize_thread): Register $_gthread variable.
236 2016-01-13 Pedro Alves <palves@redhat.com>
238 * NEWS: Mention "info threads -gid".
239 * gdbthread.h (struct thread_info) <global_num>: Mention "info
241 * thread.c (info_threads_command): Handle "-gid".
242 (_initialize_thread): Adjust "info threads" help string to mention
245 2016-01-13 Pedro Alves <palves@redhat.com>
247 * NEWS: Mention InferiorThread.global_num.
248 * python/py-infthread.c (thpy_get_global_num): New function.
249 (thread_object_getset): Register "global_num".
251 2016-01-13 Pedro Alves <palves@redhat.com>
253 * NEWS: Mention that thread IDs are now per inferior and global
255 * Makefile.in (SFILES): Add tid-parse.c.
256 (COMMON_OBS): Add tid-parse.o.
257 (HFILES_NO_SRCDIR): Add tid-parse.h.
258 * ada-tasks.c: Adjust to use ptid_to_global_thread_id.
259 * breakpoint.c (insert_breakpoint_locations)
260 (remove_threaded_breakpoints, bpstat_check_breakpoint_conditions)
261 (print_one_breakpoint_location, set_longjmp_breakpoint)
262 (check_longjmp_breakpoint_for_call_dummy)
263 (set_momentary_breakpoint): Adjust to use global IDs.
264 (find_condition_and_thread, watch_command_1): Use parse_thread_id.
265 (until_break_command, longjmp_bkpt_dtor)
266 (breakpoint_re_set_thread, insert_single_step_breakpoint): Adjust
268 * dummy-frame.c (pop_dummy_frame_bpt): Adjust to use
269 ptid_to_global_thread_id.
270 * elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
271 * gdbthread.h (struct thread_info): Rename field 'num' to
272 'global_num. Add new fields 'per_inf_num' and 'inf'.
273 (thread_id_to_pid): Rename thread_id_to_pid to
274 global_thread_id_to_ptid.
275 (pid_to_thread_id): Rename to ...
276 (ptid_to_global_thread_id): ... this.
277 (valid_thread_id): Rename to ...
278 (valid_global_thread_id): ... this.
279 (find_thread_id): Rename to ...
280 (find_thread_global_id): ... this.
281 (ALL_THREADS, ALL_THREADS_BY_INFERIOR): Declare.
282 (print_thread_info): Add comment.
283 * tid-parse.h: New file.
284 * tid-parse.c: New file.
285 * infcmd.c (step_command_fsm_prepare)
286 (step_command_fsm_should_stop): Adjust to use the global thread
288 (until_next_command, until_next_command)
289 (finish_command_fsm_should_stop): Adjust to use the global thread
291 (attach_post_wait): Adjust to check the inferior number too.
292 * inferior.h (struct inferior) <highest_thread_num>: New field.
293 * infrun.c (handle_signal_stop)
294 (insert_exception_resume_breakpoint)
295 (insert_exception_resume_from_probe): Adjust to use the global
297 * record-btrace.c (record_btrace_open): Use global thread IDs.
298 * remote.c (process_initial_stop_replies): Also consider the
300 * target.c (target_pre_inferior): Clear the inferior's highest
302 * thread.c (clear_thread_inferior_resources): Adjust to use the
304 (new_thread): New inferior parameter. Adjust to use it. Set both
305 the thread's global ID and the thread's per-inferior ID.
306 (add_thread_silent): Adjust.
307 (find_thread_global_id): New.
308 (find_thread_id): Make static. Adjust to rename.
309 (valid_thread_id): Rename to ...
310 (valid_global_thread_id): ... this.
311 (pid_to_thread_id): Rename to ...
312 (ptid_to_global_thread_id): ... this.
313 (thread_id_to_pid): Rename to ...
314 (global_thread_id_to_ptid): ... this. Adjust.
315 (first_thread_of_process): Adjust.
316 (do_captured_list_thread_ids): Adjust to use global thread IDs.
317 (should_print_thread): New function.
318 (print_thread_info): Rename to ...
319 (print_thread_info_1): ... this, and add new show_global_ids
320 parameter. Handle it. Iterate over inferiors.
321 (print_thread_info): Reimplement as wrapper around
323 (show_inferior_qualified_tids): New function.
324 (print_thread_id): Use it.
325 (tp_array_compar): Compare inferior numbers too.
326 (thread_apply_command): Use tid_range_parser.
327 (do_captured_thread_select): Use parse_thread_id.
328 (thread_id_make_value): Adjust.
329 (_initialize_thread): Adjust "info threads" help string.
330 * varobj.c (struct varobj_root): Update comment.
331 (varobj_create): Adjust to use global thread IDs.
332 (value_of_root_1): Adjust to use global_thread_id_to_ptid.
333 * windows-tdep.c (display_tib): No longer accept an argument.
334 * cli/cli-utils.c (get_number_trailer): Make extern.
335 * cli/cli-utils.h (get_number_trailer): Declare.
336 (get_number_const): Adjust documentation.
337 * mi/mi-cmd-var.c (mi_cmd_var_update_iter): Adjust to use global
339 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
340 (mi_on_normal_stop, mi_output_running_pid, mi_on_resume):
341 * mi/mi-main.c (mi_execute_command, mi_cmd_execute): Likewise.
342 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_thread_x):
344 * python/py-breakpoint.c (bppy_set_thread): Likewise.
345 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
346 * python/py-infthread.c (thpy_get_num): Add comment and return the
347 per-inferior thread ID.
348 (thread_object_getset): Update comment of "num".
350 2016-01-13 Pedro Alves <palves@redhat.com>
352 * breakpoint.c (remove_threaded_breakpoints)
353 (print_one_breakpoint_location): Use print_thread_id.
354 * btrace.c (btrace_enable, btrace_disable, btrace_teardown)
355 (btrace_fetch, btrace_clear): Use print_thread_id.
356 * common/print-utils.c (CELLSIZE): Delete.
357 (get_cell): Rename to ...
358 (get_print_cell): ... this and made extern. Adjust call callers.
359 Adjust to use PRINT_CELL_SIZE.
360 * common/print-utils.h (get_print_cell): Declare.
361 (PRINT_CELL_SIZE): New.
362 * gdbthread.h (print_thread_id): Declare.
363 * infcmd.c (signal_command): Use print_thread_id.
364 * inferior.c (print_inferior): Use print_thread_id.
365 * infrun.c (handle_signal_stop)
366 (insert_exception_resume_breakpoint)
367 (insert_exception_resume_from_probe)
368 (print_signal_received_reason): Use print_thread_id.
369 * record-btrace.c (record_btrace_info)
370 (record_btrace_resume_thread, record_btrace_cancel_resume)
371 (record_btrace_step_thread, record_btrace_wait): Use
373 * thread.c (thread_apply_all_command): Use print_thread_id.
374 (print_thread_id): New function.
375 (thread_apply_command): Use print_thread_id.
376 (thread_command, thread_find_command, do_captured_thread_select):
379 2016-01-13 Pedro Alves <palves@redhat.com>
381 * NEWS: Mention InferiorThread.inferior.
382 * python/py-infthread.c (thpy_get_inferior): New.
383 (thread_object_getset): Register "inferior".
385 2016-01-13 Pedro Alves <palves@redhat.com>
387 * NEWS: Mention $_inferior.
388 * inferior.c (inferior_id_make_value): New.
389 (inferior_funcs): New.
390 (_initialize_inferior): Create $_inferior variable.
392 2016-01-13 Pedro Alves <palves@redhat.com>
395 * frame.c (get_current_frame): Use validate_registers_access.
396 * gdbthread.h (validate_registers_access): Declare.
397 * infrun.c (validate_siginfo_access): Delete.
398 (siginfo_value_read, siginfo_value_write): Use
399 validate_registers_access.
400 * thread.c (validate_registers_access): New function.
402 2016-01-12 Josh Stone <jistone@redhat.com>
403 Philippe Waroquiers <philippe.waroquiers@skynet.be>
405 * NEWS (Changes since GDB 7.10): Mention QCatchSyscalls and the
406 syscall_entry and syscall_return stop reasons. Mention GDB
407 support for remote catch syscall.
408 * remote.c (PACKET_QCatchSyscalls): New enum.
409 (remote_set_syscall_catchpoint): New function.
410 (remote_protocol_features): New element for QCatchSyscalls.
411 (remote_parse_stop_reply): Parse syscall_entry/return stops.
412 (init_remote_ops): Install remote_set_syscall_catchpoint.
413 (_initialize_remote): Config QCatchSyscalls.
414 * linux-nat.h (struct lwp_info) <syscall_state>: Comment typo.
416 2016-01-12 Yao Qi <yao.qi@linaro.org>
418 * nat/linux-ptrace.c (linux_child_function): Cast child_stack
419 to gdb_byte * and pass to linux_fork_to_function.
421 2016-01-12 Yao Qi <yao.qi@linaro.org>
423 * nat/linux-ptrace.c (linux_fork_to_function): Change type
424 of argument 'function'.
425 (linux_grandchild_function): Change return type to 'int'.
426 Change child_stack's type to 'void *'.
427 (linux_child_function): Likewise.
429 2016-01-12 Pedro Alves <palves@redhat.com>
431 Remove use of the registered trademark symbol throughout.
433 2016-01-12 Thomas Schwinge <thomas@codesourcery.com>
435 * reply_mig_hack.awk: Rewrite one regular expression.
437 2016-01-11 Mike Frysinger <vapier@gentoo.org>
439 * acinclude.m4: Include new warning.m4 file.
440 * configure: Regenerated.
441 * configure.ac: Move all warning logic ...
442 * warning.m4: ... here.
444 2016-01-08 Yao Qi <yao.qi@linaro.org>
446 * extension.c: Include target.h.
447 (set_active_ext_lang): Only call install_gdb_sigint_handler,
448 check_quit_flag, and set_quit_flag if target_terminal_is_ours
450 (restore_active_ext_lang): Likewise.
451 * target.c (target_terminal_is_ours): New function.
452 * target.h (target_terminal_is_ours): Declare.
454 2016-01-07 Maciej W. Rozycki <macro@imgtec.com>
456 * mips-tdep.c (mips_breakpoint_from_pc): Rename local `status'
457 to `err' in the little-endian leg.
459 2016-01-06 Yao Qi <yao.qi@linaro.org>
461 * arch/arm-get-next-pcs.c (arm_get_next_pcs): Move it to some
463 (thumb_get_next_pcs_raw): Make it static.
464 (arm_get_next_pcs_raw): Likewise.
465 * arch/arm-get-next-pcs.h (thumb_get_next_pcs_raw): Remove the
467 (arm_get_next_pcs_raw): Likewise.
469 2016-01-05 Mike Frysinger <vapier@gentoo.org>
471 * version.in: Change cvs to git.
473 2016-01-05 Mike Frysinger <vapier@gentoo.org>
475 * configure.tgt (score-*-*): Delete gdb_sim assignment.
477 2016-01-05 Pedro Alves <palves@redhat.com>
480 * configure.ac: Define WITH_PPC_SIM when linking in the sim and
481 the target is powerpc*.
482 * rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
484 * configure: Regenerate.
485 * config.in: Regenerate.
487 2016-01-04 Markus Metzger <markus.t.metzger@intel.com>
489 * btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
491 2016-01-02 Mike Frysinger <vapier@gentoo.org>
493 * configure.tgt (powerpc*-*-*): Delete test call and
494 always assign gdb_sim.
496 2016-01-01 Joel Brobecker <brobecker@adacore.com>
498 Update year range in copyright notice of all files.
500 2016-01-01 Joel Brobecker <brobecker@adacore.com>
502 * top.c (print_gdb_version): Change copyright year in version
505 2016-01-01 Joel Brobecker <brobecker@adacore.com>
507 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.
509 For older changes see ChangeLog-2015.
515 version-control: never