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