3 * aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Fix
4 typo in the debugging message.
8 * btrace.c: Include gdbcmd.h, cli/cli-utils.h, and ctype.h.
9 (maint_btrace_cmdlist, maint_btrace_set_cmdlist)
10 (maint_btrace_show_cmdlist, maint_btrace_pt_set_cmdlist)
11 (maint_btrace_pt_show_cmdlist, maint_btrace_pt_skip_pad)
12 (btrace_maint_clear): New.
13 (btrace_fetch, btrace_clear): Call btrace_maint_clear.
14 (pt_print_packet, btrace_maint_decode_pt)
15 (btrace_maint_update_pt_packets, btrace_maint_update_packets)
16 (btrace_maint_print_packets, get_uint, get_context_size, no_chunk)
17 (maint_btrace_packet_history_cmd)
18 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
19 (maint_btrace_cmd, maint_btrace_set_cmd, maint_btrace_show_cmd)
20 (maint_btrace_pt_set_cmd, maint_btrace_pt_show_cmd)
21 (maint_info_btrace_cmd, _initialize_btrace): New.
22 * btrace.h (btrace_pt_packet, btrace_pt_packet_s)
23 (btrace_maint_packet_history, btrace_maint_info): New.
24 (btrace_thread_info) <maint>: New.
29 * btrace.c (btrace_fetch): Append the new trace data.
30 (btrace_clear): Clear the stored trace data.
31 * btrace.h (btrace_thread_info) <data>: New.
32 * common/btrace-common.h (btrace_data_clear)
33 (btrace_data_append): New.
34 * common/btrace-common.c (btrace_data_clear)
35 (btrace_data_append): New.
39 * nat/linux-btrace.c (linux_enable_bts): Check for
41 Check for data_offset and data_size fields. Use them.
45 * NEWS: Announce new commands "record btrace pt" and "record pt".
46 Announce new options "set|show record btrace pt buffer-size".
47 * btrace.c: Include "rsp-low.h".
49 (btrace_add_pc): Add forward declaration.
50 (pt_reclassify_insn, ftrace_add_pt, btrace_pt_readmem_callback)
51 (pt_translate_cpu_vendor, btrace_finalize_ftrace_pt)
52 (btrace_compute_ftrace_pt): New.
53 (btrace_compute_ftrace): Support BTRACE_FORMAT_PT.
54 (check_xml_btrace_version): Update version check.
55 (parse_xml_raw, parse_xml_btrace_pt_config_cpu)
56 (parse_xml_btrace_pt_raw, parse_xml_btrace_pt)
57 (btrace_pt_config_cpu_attributes, btrace_pt_config_children)
58 (btrace_pt_children): New.
59 (btrace_children): Add support for "pt".
60 (parse_xml_btrace_conf_pt, btrace_conf_pt_attributes): New.
61 (btrace_conf_children): Add support for "pt".
62 * btrace.h: Include "intel-pt.h".
63 (btrace_pt_error): New.
64 * common/btrace-common.c (btrace_format_string, btrace_data_fini)
65 (btrace_data_empty): Support BTRACE_FORMAT_PT.
66 * common/btrace-common.h (btrace_format): Add BTRACE_FORMAT_PT.
67 (struct btrace_config_pt): New.
68 (struct btrace_config)<pt>: New.
69 (struct btrace_data_pt_config, struct btrace_data_pt): New.
70 (struct btrace_data)<pt>: New.
71 * features/btrace-conf.dtd (btrace-conf)<pt>: New.
73 * features/btrace.dtd (btrace)<pt>: New.
74 (pt, pt-config, cpu): New.
75 * nat/linux-btrace.c (perf_event_read, perf_event_read_all)
76 (perf_event_pt_event_type, kernel_supports_pt)
77 (linux_supports_pt): New.
78 (linux_supports_btrace): Support BTRACE_FORMAT_PT.
79 (linux_enable_bts): Free tinfo on error.
80 (linux_enable_pt): New.
81 (linux_enable_btrace): Support BTRACE_FORMAT_PT.
82 (linux_disable_pt): New.
83 (linux_disable_btrace): Support BTRACE_FORMAT_PT.
84 (linux_fill_btrace_pt_config, linux_read_pt): New.
85 (linux_read_btrace): Support BTRACE_FORMAT_PT.
86 * nat/linux-btrace.h (struct btrace_tinfo_pt): New.
87 (struct btrace_target_info)<pt>: New.
88 * record-btrace.c (set_record_btrace_pt_cmdlist)
89 (show_record_btrace_pt_cmdlist): New.
90 (record_btrace_print_pt_conf): New.
91 (record_btrace_print_conf): Support BTRACE_FORMAT_PT.
92 (btrace_ui_out_decode_error): Support BTRACE_FORMAT_PT.
93 (cmd_record_btrace_pt_start): New.
94 (cmd_record_btrace_start): Support BTRACE_FORMAT_PT.
95 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): New.
96 (_initialize_record_btrace): Add new commands.
97 * remote.c (PACKET_Qbtrace_pt, PACKET_Qbtrace_conf_pt_size): New.
98 (remote_protocol_features): Add "Qbtrace:pt".
99 Add "Qbtrace-conf:pt:size".
100 (remote_supports_btrace): Support BTRACE_FORMAT_PT.
101 (btrace_sync_conf): Support PACKET_Qbtrace_conf_pt_size.
102 (remote_enable_btrace): Support BTRACE_FORMAT_PT.
103 (_initialize_remote): Add new commands.
107 * configure.ac: check for libipt
108 * configure: Regenerate.
109 * config.in: Regenerate.
110 * Makefile.in (LIBIPT): New.
111 (CLIBS): Add $LIBIPT.
112 * NEWS: document new configure options
116 * compile/compile-object-load.c (compile_object_load): Replace debug
117 message "lookup undefined ELF symbol" by 3 more specific messages.
121 * rl78-tdep.c (struct gdbarch_tdep): Add new field, rl78_psw_type.
122 (rl78_register_type): Add case for RL78_PSW_REGNUM.
123 (rl78_gdbarch_init): Initialize rl78_psw_type.
127 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
128 Update commentary. Always refresh the registers when frame
129 information has changed.
130 * tui/tui-stack.c (tui_show_frame_info): Update commentary.
131 Change return type to int. Return 1 if frame information has
132 changed, 0 otherwise.
133 (tui_before_prompt): Update commentary.
134 * tui/tui-stack.h (tui_show_frame_info): Change return type to
140 * frame.c (select_frame): Remove reference to
141 deprecated_selected_frame_level_changed_hook.
142 * frame.h (deprecated_selected_frame_level_changed_hook): Remove
144 * stack.c (deprecated_selected_frame_level_changed_hook):
146 * tui/tui-hooks.c (tui_selected_frame_level_changed_hook):
148 (tui_refresh_frame_and_register_information): ... this. Bail
149 out if there is no stack. Don't update register information
150 unless registers_too_p is true.
151 (tui_print_frame_info_listing_hook): Rename to ...
152 (tui_dummy_print_frame_info_listing_hook): ... this.
153 (tui_before_prompt): New function.
154 (tui_normal_stop): New function.
155 (tui_before_prompt_observer): New observer.
156 (tui_normal_stop_observer): New observer.
157 (tui_install_hooks): Set
158 deprecated_print_frame_info_listing_hook to
159 tui_dummy_print_frame_info_listing_hook. Register
160 tui_before_prompt_observer to call tui_before_prompt and
161 tui_normal_stop_observer to call tui_normal_stop. Remove
162 reference to deprecated_selected_frame_level_changed_hook.
163 (tui_remove_hooks): Detach and unset tui_before_prompt_observer
164 and tui_normal_stop_observer. Remove reference to
165 deprecated_selected_frame_level_changed_hook.
170 * tui/tui-stack.c (tui_set_locator_info): Change prototype to
171 return an int instead of void. Return whether the locator
173 (tui_show_frame_info): If the locator info has not changed, then
174 bail out early to avoid refreshing the windows.
178 * tui/tui-stack.c (tui_set_locator_info): Explicitly pass
179 LOCATOR_WIN to tui_alloc_content.
184 * arm-tdep.c (arm_get_next_pc_raw): Break for media
189 * rx-tdep.c (RX_PSW_REGNUM): New enum constant.
190 (rx_dwarf_reg_to_regnum): New function.
191 (rx_gdbarch_init): Register rx_dwarf_reg_to_regnum. Use dwarf2
197 * infcall.c (run_inferior_call): On infcall success, if the thread
198 was marked stopped before, reset it back to stopped.
199 * infrun.c (resume): Don't suppress the set_running calls when
201 (normal_stop): Only discard the finish_thread_state cleanup if the
206 * MAINTAINERS (Write After Approval): Update my email address.
212 * block.c (block_lookup_symbol): For non-function blocks,
213 continue to search for a symbol with an exact domain match
214 Otherwise, return any previously found "best domain" symbol.
215 (block_lookup_symbol_primary): Likewise.
219 * NEWS: Mention the new option "history remove-duplicates".
220 * top.c (history_remove_duplicates): New static variable.
221 (show_history_remove_duplicates): New static function.
222 (gdb_add_history): Conditionally remove duplicate history
224 (init_main): Add "history remove-duplicates" option.
228 * tui/tui-win.c (focus_completer): New static function.
229 (_initialize_tui_win): Set the completion function of the
230 "focus" command to focus_completer.
234 * linespec.c (minsym_found): Reset sal.PC for COMPUNIT_LOCATIONS_VALID
236 * symtab.c (find_function_start_sal): Likewise.
240 * solib.c (solib_find_1): Set local variable sysroot to NULL if
241 it is the empty string after trailing slashes have been stripped.
245 * exec.c (exec_file_locate_attach): Remove gdb_sysroot NULL check.
246 * infrun.c (follow_exec): Likewise.
247 * remote.c (remote_filesystem_is_local): Likewise.
248 * solib.c (solib_find_1): Likewise.
252 * build-id.c (build_id_to_debug_bfd): Add cleanup to free
253 return value from lrealpath.
257 * remote-sim.c (gdbsim_open): Move sysroot update to the top.
261 * remote-sim.c: Include gdb_bfd.h.
262 (gdbsim_open): Declare new local sysroot pointing to gdb_sysroot.
263 Skip TARGET_SYSROOT_PREFIX in gdb_sysroot when it is active.
267 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't call
268 set_gdbarch_get_siginfo_type.
269 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
270 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
271 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
272 * m68klinux-tdep.c (m68k_linux_init_abi): Likewise.
273 * ppc-linux-tdep.c (ppc_linux_init_abi): Likewise.
274 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
275 * tilegx-linux-tdep.c (tilegx_linux_init_abi): Likewise.
276 * linux-tdep.c (linux_get_siginfo_type): Change it to static.
277 (linux_init_abi): Call set_gdbarch_get_siginfo_type.
278 * linux-tdep.h (linux_get_siginfo_type): Remove the declaration.
282 * common/buffer.c (stdint.h): Do not include.
283 * common/print-utils.c (stdint.h): Likewise.
284 * compile/compile-c-symbols.c (gdb_assert.h): Likewise.
285 * compile/compile-c-types.c (gdb_assert.h): Likewise.
286 * ft32-tdep.c (gdb_assert.h): Likewise.
287 * guile/scm-utils.c (stdint.h): Likewise.
288 * i386-linux-tdep.c (stdint.h): Likewise.
289 * i386-tdep.c (stdint.h): Likewise.
290 * nat/linux-btrace.c (stdint.h): Likewise.
291 * nat/linux-btrace.h (stdint.h): Likewise.
292 * nat/linux-ptrace.c (stdint.h): Likewise.
293 * nat/mips-linux-watch.h (stdint.h): Likewise.
294 * ppc-linux-nat.c (stdint.h): Likewise.
295 * python/python-internal.h (stdint.h): Likewise.
296 * stub-termcap.c (stdlib.h): Likewise.
297 * target/target.h (stdint.h): Likewise.
298 * xtensa-linux-nat.c (stdint.h): Likewise.
302 * top.c (init_history): Look at errno after calling strtol to
303 properly map large GDBHISTSIZE values to infinity.
307 * inferior.h (struct inferior_suspend_state): Delete, unused.
308 All references deleted.
312 * microblaze-tdep.c (microblaze_push_dummy_code): Delete.
313 (microblaze_push_dummy_call): Likewise.
314 (microblaze_gdbarch_init): Delete calls to set_gdbarch_push_dummy_code
315 and set_gdbarch_push_dummy_call.
319 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
320 Check whether have_ptrace_getregset is TRIBOOL_TRUE explicitly.
321 (amd64_linux_store_inferior_registers): Likewise.
322 * arm-linux-nat.c (fetch_fpregister): Likewise.
323 (fetch_fpregs, store_fpregister): Likewise.
324 (store_fpregister, store_fpregs): Likewise.
325 (fetch_register, fetch_regs): Likewise.
326 (store_register, store_regs): Likewise.
327 (fetch_vfp_regs, store_vfp_regs): Likewise.
328 (arm_linux_read_description): Check have_ptrace_getregset is
329 TRIBOOL_UNKNOWN. Set have_ptrace_getregset to TRIBOOL_TRUE
331 * i386-linux-nat.c (fetch_xstateregs): Check
332 have_ptrace_getregset is not TRIBOOL_TRUE.
333 (store_xstateregs): Likewise.
334 * linux-nat.c (have_ptrace_getregset): Change its type to
336 * linux-nat.h (tribool): New enum.
337 * x86-linux-nat.c (x86_linux_read_description): Use enum tribool.
338 Check whether have_ptrace_getregset is TRIBOOL_TRUE.
342 * NEWS: Mention Sun's version of stabs is no longer supported.
343 * elfread.c (free_elfinfo): Delete. All uses updated.
344 (elfstab_offset_sections): Delete. All uses updated.
345 * gdb-stabs.h (stab_section_info): Delete. All uses updated.
346 * psympriv.h (partial_symtab) <section_offsets>: Delete.
348 * psymtab.c (start_psymtab_common): Delete arg section_offsets.
353 * common/rsp-low.c (needs_escaping): New.
354 (remote_escape_output): Add unit_size parameter. Refactor to
355 support multi-byte addressable units. Rename parameters.
356 * common/rsp-low.h (remote_escape_output): Add unit_size
357 parameter and rename others. Update doc.
358 * remote.c (align_for_efficient_write): New.
359 (remote_write_bytes_aux): Add unit_size parameter and use it.
360 Rename some variables. Update doc.
361 (remote_xfer_partial): Get unit size and use it.
362 (remote_read_bytes_1): Add unit_size parameter and use it.
363 Rename some variables. Update doc.
364 (remote_write_bytes): Same.
365 (remote_xfer_live_readonly_partial): Same.
366 (remote_read_bytes): Same.
367 (remote_flash_write): Update call to remote_write_bytes_aux.
368 (remote_write_qxfer): Update call to remote_escape_output.
369 (remote_search_memory): Same.
370 (remote_hostio_pwrite): Same.
374 * breakpoint.c (add_location_to_breakpoint): Don't mark permanent
375 locations as inserted.
376 Update and expand comment about permanent locations.
377 (bp_loc_is_permanent): Don't return 0 for bp_call_dummy.
378 Move comment to add_location_to_breakpoint.
379 (update_global_location_list): Don't error out if a permanent
380 breakpoint is not marked inserted.
381 Don't error out if a non-permanent breakpoint location is inserted on
382 top of a permanent breakpoint.
386 * breakpoint.c (make_breakpoint_permanent): Remove unused
388 * breakpoint.h (make_breakpoint_permanent): Remove declaration.
393 * NEWS: Mention new GDBHISTSIZE behavior.
394 * top.c (init_history): For null or out-of-range GDBHISTSIZE,
395 set history size to unlimited. Ignore non-numeric GDBHISTSIZE.
399 * NEWS: Mention that GDBHISTSIZE is read instead of HISTSIZE.
400 * top.c (init_history): Read from GDBHISTSIZE instead of
402 (init_main): Refer to GDBHISTSIZE instead of HISTSIZE.
406 * top.c (gdb_safe_append_history): Do not call
407 history_truncate_file if the history is not stifled.
411 * syscalls/s390-linux.xml: Add syscalls 344 through 354.
412 * syscalls/s390x-linux.xml: Likewise.
416 * nat/linux-namespaces.c (MSG_CMSG_CLOEXEC): Define if not defined.
420 * tui/tui-hooks.c (tui_selected_frame_level_changed_hook): Call
421 target_terminal_ours_for_output() before calling
422 tui_show_frame_info(), and restore the original terminal
427 * arm-linux-nat.c: Include nat/linux-ptrace.h.
431 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Consider addressable
433 (mi_cmd_data_write_memory_bytes): Same.
437 * corefile.c (write_memory): Update doc.
438 * gdbcore.h (write_memory): Same.
442 * linux-tdep.c (enum filterflags): Make it from anonymous enum.
443 (dump_mapping_p): Use it for parameter filterflags.
444 (linux_find_memory_regions_full): Use it for variable filterflags.
449 Merge multiple hex conversions.
450 * monitor.c: Include rsp-low.h.
451 (fromhex): Remove definition.
456 Move utility functions to common/.
457 * cli/cli-utils.c (skip_spaces, skip_spaces_const, skip_to_space_const):
458 Move defs to common/common-utils.c.
459 * cli/cli-utils.h (skip_spaces, skip_spaces_const, skip_to_space)
460 (skip_to_space_const): Move decls to common/common-utils.h.
461 * common/common-defs.h: Move include of common-types.h before
463 * common/common-utils.c: Include host-defs.h and ctype.h.
464 (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int, strtoulst): Move
466 (skip_spaces, skip_spaces_const, skip_to_space_const): Move from
468 * common/common-utils.h (strtoulst): Move decl from utils.h.
469 (skip_spaces, skip_spaces_const, skip_to_space, skip_to_space_const):
470 Move from cli/cli-utils.h.
471 * common/host-defs.h: Include limits.h.
472 (TARGET_CHAR_BIT, HOST_CHAR_BIT): Moved from defs.h.
473 (skip_spaces, skip_spaces_const): Move decls from cli/cli-utils.h.
474 * defs.h (TARGET_CHAR_BIT, HOST_CHAR_BIT): Move to
475 common/common-utils.h.
476 * utils.c (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int)
477 (strtoulst): Move to common/common-utils.c.
478 * utils.h (strtoulst): Moved decl to common/common-utils.h.
482 * data-directory/Makefile.in (SYSCALLS_FILES): Add aarch64-linux.xml.
486 * build-id.c: Don't include elf-bfd.h.
487 (build_id_bfd_get): Use bfd_build_id.
488 (build_id_verify): Ditto.
490 (find_separate_debug_file_by_buildid): Ditto.
491 * python/py-objfile.c: Don't include elf-bfd.h.
492 (objfpy_get_build_id) Use bfd_build_id.
493 (objfpy_build_id_matches, objfpy_lookup_objfile_by_build_id): Ditto.
494 * coffread.c: Include build-id.h.
495 (coff_symfile_read): Try find_separate_debug_file_by_buildid.
499 * windows-nat.c (do_windows_fetch_inferior_registers)
500 (handle_output_debug_string): Replace __COPY_CONTEXT_SIZE
501 conditional with __CYGWIN__.
505 * completer.c: Add arch-utils.h include.
506 (enum reg_completer_targets): New enum.
507 (reg_or_group_completer_1): New function containing old
508 reg_or_group_completer, add and use new parameter to control what
509 is completed on. Use get_current_arch rather than architecture of
510 currently selected frame.
511 (reg_or_group_completer): Call new reg_or_group_completer_1.
512 (reggroup_completer): Call new reg_or_group_completer_1.
513 * completer.h (reggroup_completer): Add declaration.
514 * tui/tui-regs.c: Add 'completer.h' include.
515 (tui_reg_next_command): Renamed to...
516 (tui_reg_next): ...this. Adjust parameters and return rather than
518 (tui_reg_prev_command): Renamed to...
519 (tui_reg_prev): ...this. Adjust parameters and return rather than
521 (tui_reg_float_command): Delete.
522 (tui_reg_general_command): Delete.
523 (tui_reg_system_command): Delete.
524 (tui_reg_command): Rewrite to perform switching of register group.
526 (tuireglist): Remove.
527 (tui_reggroup_completer): New function.
528 (_initialize_tui_regs): Remove 'tui reg' sub-commands, update
529 creation of 'tui reg' command.
530 * NEWS: Add comment about 'tui reg' changes.
534 * target.c (target_read): Consider addressable unit size when
535 reading from a memory object.
536 (read_memory_robust): Same.
537 (read_whatever_is_readable): Same.
538 (target_write_with_progress): Consider addressable unit size
539 when writing to a memory object.
540 * target.h (target_read): Update documentation.
541 (target_write): Add documentation.
545 * arch-utils.h (default_addressable_memory_unit_size): New.
546 * arch-utils.c (default_addressable_memory_unit_size): New.
547 * gdbarch.sh (addressable_memory_unit_size): New.
548 * gdbarch.h: Re-generate.
549 * gdbarch.c: Re-generate.
553 * target.c (target_read): Rename variables and use
555 (target_read_with_progress): Same.
556 (read_memory_robust): Constify parameters and rename
558 (read_whatever_is_readable): Constify parameters,
559 rename variables, adjust formatting.
560 * target.h (read_memory_robust): Constify parameters.
564 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value_base): Handle short
565 synthetic (non-AltiVec) vector types.
566 (ppc64_sysv_abi_return_value): Likewise.
571 * breakpoint.c (create_breakpoint): Save extra_string for
576 * i386-tdep.c (i386_mpx_get_bt_entry): Add a cast for mpx_bd_mask
577 and bt_mask to CORE_ADDR.
581 * nat/linux-namespaces.c (mnsh_send_message): Use pulongest.
582 (mnsh_recv_message): Likewise.
586 * i386-tdep.c (i386_mpx_print_bounds): use of LONGEST instead of
587 long long int and plongest instead of %ll.
591 * nat/linux-namespaces.c (gdb_wait.h): New include.
592 (sys/wait.h): Do not include.
596 * dwarf2read.c (dwarf_record_line): Call dwarf_record_line if
597 end_sequence is true.
602 * solib-target.c (library_list_start_list): Use explicit NULL
607 * solib-target.c (library_list_start_list): Do not dereference
608 variable version in its initialization. Make the VERSION check handle
610 (library_list_attributes): Make "version" GDB_XML_AF_OPTIONAL.
614 * NEWS: Announce support for direct access of executable and
615 shared library files when attaching to inferiors in containers
616 on GNU/Linux systems.
620 * remote.c (struct remote_state) <fs_pid>: New field.
621 (new_remote_state): Initialize the above.
622 (PACKET_vFile_setfs): New enum value.
623 (remote_hostio_set_filesystem): New function.
624 (remote_hostio_open): Call the above.
625 (remote_hostio_unlink): Likewise.
626 (remote_hostio_readlink): Likewise.
627 (_initialize_remote): Register new "set/show remote
628 hostio-setfs-packet" command.
629 * NEWS: Announce new vFile:setfs packet.
633 * linux-nat.c (nat/linux-namespaces.h): New include.
634 (fileio.h): Likewise.
635 (linux_nat_filesystem_is_local): New function.
636 (linux_nat_fileio_pid_of): Likewise.
637 (linux_nat_fileio_open): Likewise.
638 (linux_nat_fileio_readlink): Likewise.
639 (linux_nat_fileio_unlink): Likewise.
640 (linux_nat_add_target): Initialize to_filesystem_is_local,
641 to_fileio_open, to_fileio_readlink and to_fileio_unlink.
642 (_initialize_linux_nat): New "set/show debug linux-namespaces"
644 * NEWS: Mention new "set/show debug linux-namespaces" commands.
648 * target.h (struct inferior): New forward declaration.
649 (struct target_ops) <to_filesystem_is_local>: Update comment.
650 (struct target_ops) <to_fileio_open>: New argument inf.
651 Update comment. All implementations updated.
652 (struct target_ops) <to_fileio_unlink>: Likewise.
653 (struct target_ops) <to_fileio_readlink>: Likewise.
654 (target_filesystem_is_local): Update comment.
655 (target_fileio_open): New argument inf. Update comment.
656 (target_fileio_unlink): Likewise.
657 (target_fileio_readlink): Likewise.
658 (target_fileio_read_alloc): Likewise.
659 (target_fileio_read_stralloc): Likewise.
660 * target.c (target_fileio_open): New argument inf.
661 Pass inf to implementation. Update debug printing.
662 (target_fileio_unlink): Likewise.
663 (target_fileio_readlink): Likewise.
664 (target_fileio_read_alloc_1): New argument inf. Pass inf
665 to target_fileio_open.
666 (target_fileio_read_alloc): New argument inf. Pass inf to
667 target_fileio_read_alloc_1.
668 (target_fileio_read_stralloc): Likewise.
669 * gdb_bfd.c (inferior.h): New include.
670 (gdb_bfd_iovec_fileio_open): Replace unused "open_closure"
671 argument with new argument "inferior". Pass inferior to
673 (gdb_bfd_open): Supply inferior argument to
674 gdb_bfd_iovec_fileio_open.
675 * linux-tdep.c (linux_info_proc): Supply inf argument to
676 relevant target_fileio calls.
677 (linux_find_memory_regions_full): Likewise.
678 (linux_fill_prpsinfo): Likewise.
679 * remote.c (remote_filesystem_is_local): Supply inf
680 argument to remote_hostio_open.
681 (remote_file_put): Likewise.
682 (remote_file_get): Likewise.
683 (remote_file_delete): Supply inf argument to
684 remote_hostio_unlink.
688 * inf-child.c (inf_child_fileio_open): Replace comment.
689 (inf_child_fileio_pwrite): Likewise.
690 (inf_child_fileio_pread): Likewise.
691 (inf_child_fileio_fstat): Insert blank line before comment.
692 (inf_child_fileio_close): Replace comment.
693 (inf_child_fileio_unlink): Likewise.
694 (inf_child_fileio_readlink): Likewise.
695 * remote.c (remote_hostio_open): Likewise.
696 (remote_hostio_pread): Likewise.
697 (remote_hostio_pwrite): Likewise.
698 (remote_hostio_close): Likewise.
699 (remote_hostio_unlink): Likewise.
700 (remote_hostio_readlink): Likewise.
701 (remote_hostio_fstat): Likewise.
702 (remote_filesystem_is_local): Likewise.
703 * target.c (target_fileio_open): Likewise.
704 (target_fileio_pwrite): Likewise.
705 (target_fileio_pread): Likewise.
706 (target_fileio_fstat): Insert blank line before comment.
707 (target_fileio_close): Replace comment.
708 (target_fileio_unlink): Likewise.
709 (target_fileio_readlink): Likewise.
710 (target_fileio_read_alloc): Likewise.
711 (target_fileio_read_stralloc): Likewise.
715 * linux-thread-db.c (nat/linux-namespaces.h): New include.
716 (check_pid_namespace_match): Use linux_ns_same rather than
717 linux_proc_pid_get_ns to spot PID namespace mismatches.
718 * nat/linux-procfs.h (linux_proc_pid_get_ns): Remove.
719 * nat/linux-procfs.c (linux_proc_pid_get_ns): Likewise.
723 * configure.ac (AC_CHECK_FUNCS): Add setns.
724 * config.in: Regenerate.
725 * configure: Likewise.
726 * nat/linux-namespaces.h: New file.
727 * nat/linux-namespaces.c: Likewise.
728 * Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-namespaces.h.
729 (linux-namespaces.o): New rule.
730 * config/aarch64/linux.mh (NATDEPFILES): Add linux-namespaces.o.
731 * config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
732 * config/arm/linux.mh (NATDEPFILES): Likewise.
733 * config/i386/linux.mh (NATDEPFILES): Likewise.
734 * config/i386/linux64.mh (NATDEPFILES): Likewise.
735 * config/ia64/linux.mh (NATDEPFILES): Likewise.
736 * config/m32r/linux.mh (NATDEPFILES): Likewise.
737 * config/m68k/linux.mh (NATDEPFILES): Likewise.
738 * config/mips/linux.mh (NATDEPFILES): Likewise.
739 * config/pa/linux.mh (NATDEPFILES): Likewise.
740 * config/powerpc/linux.mh (NATDEPFILES): Likewise.
741 * config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
742 * config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
743 * config/s390/linux.mh (NATDEPFILES): Likewise.
744 * config/sparc/linux.mh (NATDEPFILES): Likewise.
745 * config/sparc/linux64.mh (NATDEPFILES): Likewise.
746 * config/tilegx/linux.mh (NATDEPFILES): Likewise.
747 * config/xtensa/linux.mh (NATDEPFILES): Likewise.
751 * utils.h (make_cleanup_close): Moved to common/filestuff.h.
752 * utils.c (do_close_cleanup): Moved to common/filestuff.c.
753 (make_cleanup_close): Likewise.
754 * common/filestuff.h (make_cleanup_close): Moved from utils.h.
755 * common/filestuff.c (do_close_cleanup): Moved from utils.c.
756 (make_cleanup_close): Likewise.
760 * windows-nat.c (thread_rec): Also ignore ERROR_INVALID_HANDLE
761 from SuspendThread().
765 * windows-nat.c (handle_output_debug_string): Trim trailing '\n'
766 from OutputDebugString.
771 * i386-tdep.c (MPX_BASE_MASK, MPX_BD_MASK, MPX_BT_MASK, MPX_BD_MASK_32,
772 MPX_BT_MASK_32): New macros.
773 (i386_mpx_set_bounds): New function that implements
774 the command "set-mpx-bound".
775 (i386_mpx_enabled): Helper function to test MPX availability.
776 (i386_mpx_bd_base): Helper function to calculate the base directory
778 (i386_mpx_get_bt_entry): Helper function to access a bound
780 (i386_mpx_print_bounds): Effectively display bound information.
781 (_initialize_i386_tdep): Add new commands to commands "set mpx" and
783 (_initialize_i386_tdep):
784 Add "bound" to the commands "show mpx" and "set mpx" commands.
785 (mpx_set_cmdlist and mpx_show_cmdlist): List for the new prefixed "set mpx"
786 and "show mpx" commands.
787 * NEWS: List new commands for MPX support.
791 * common/fileio.h (fileio_to_host_mode): New declaration.
792 * common/fileio.c (fileio_to_host_mode): New Function.
793 * inf-child.c (inf_child_fileio_open): Process mode argument
794 with fileio_to_host_mode.
798 * common/fileio.c (fileio_mode_pack): Fix preprocessor
803 * gdb_bfd.c (gdb_bfd_open): Move vgdb special case to...
804 * remote.c (remote_filesystem_is_local): ...here.
808 * gdbarch.c: Regenerate it.
812 * arch-utils.c (default_infcall_munmap): New.
813 * arch-utils.h (default_infcall_munmap): New declaration.
814 * compile/compile-object-load.c (struct munmap_list, munmap_list_add)
815 (munmap_list_free, munmap_listp_free_cleanup): New.
816 (struct setup_sections_data): Add field munmap_list_headp.
817 (setup_sections): Call munmap_list_add.
818 (compile_object_load): New variable munmap_list_head, initialize
819 setup_sections_data.munmap_list_headp, return munmap_list_head.
820 * compile/compile-object-load.h (struct munmap_list): New declaration.
821 (struct compile_module): Add field munmap_list_head.
822 (munmap_list_free): New declaration.
823 * compile/compile-object-run.c (struct do_module_cleanup): Add field
825 (do_module_cleanup): Call munmap_list_free.
826 (compile_object_run): Pass munmap_list_head to do_module_cleanup.
827 * gdbarch.c: Regenerate.
828 * gdbarch.h: Regenerate.
829 * gdbarch.sh (infcall_munmap): New.
830 * linux-tdep.c (linux_infcall_munmap): New.
831 (linux_init_abi): Install it.
836 * inferior.c (detach_inferior): Call exit_inferior_1 with silent = 0.
840 * i386-linux-nat.c: Include linux-nat.h.
846 * dwarf2-frame-tailcall.c (pretended_chain_levels): Correct
848 * dwarf2loc.c (chain_candidate): Likewise.
852 * arm-linux-nat.c (fetch_vfp_regs): Use PTRACE_GETREGSET.
853 (store_vfp_regs): Use PTRACE_SETREGSET.
857 * arm-linux-nat.c (fetch_fpregister): Use PTRACE_GETREGSET.
858 (fetch_fpregs): Likewise.
859 * arm-linux-nat.c (store_fpregister): Use PTRACE_SETREGSET.
860 (store_fpregs): Likewise.
864 * arm-linux-nat.c (fetch_register): Use PTRACE_GETREGSET.
865 (fetch_regs): Likewise.
866 (store_regs): Use PTRACE_SETREGSET.
867 (store_register): Likewise.
871 * arm-linux-nat.c (arm_linux_read_description): Check whether
872 kernel supports PTRACE_GETREGSET.
876 * x86-linux-nat.c (have_ptrace_getregset): Move it to ...
877 * linux-nat.c: ... here.
878 * x86-linux-nat.h (have_ptrace_getregset): Move the declaration
880 * linux-nat.h: ... here.
884 * amd64-linux-nat.c: Include "nat/linux-ptrace.h".
885 * i386-linux-nat.c: Likewise.
886 * nat/linux-ptrace.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Define.
887 * s390-linux-nat.c: Include "nat/linux-ptrace.h".
888 (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
889 * x86-linux-nat.c: Include "nat/linux-ptrace.h".
890 * x86-linux-nat.h (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
894 * go32-nat.c (go32_xfer_memory): Fix the return value to be
895 compatible to what read_child and write_child return. This
896 unbreaks that DJGPP build of GDB which was broken since v7.7.
900 * MAINTAINERS (Write After Approval): Add Martin Galvan.
905 * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning
906 rather than internal_error for an unrecognized value.
910 * xtensa-tdep.c (xtensa_pseudo_register_read)
911 (xtensa_pseudo_register_write): Don't alias last pseudo register
916 * infrun.c (follow_fork_inferior): Ensure the use of
917 process-style ptids (pid,0,0) in verbose/debug "Detaching"
922 * dwarf2read.c (record_line_ftype): Remove, duplicate.
926 * arm-linux-nat.c (arm_linux_has_wmmx_registers): Remove.
927 (arm_linux_fetch_inferior_registers): Use
928 tdep->have_wmmx_registers instead of arm_linux_has_wmmx_registers.
929 (arm_linux_store_inferior_registers): Likewise.
930 (arm_linux_read_description): Don't set
931 arm_linux_has_wmmx_registers.
932 * arm-tdep.c (arm_gdbarch_init): Set
933 tdep->have_wmmx_registers according target descriptions.
934 * arm-tdep.h (struct gdbarch_tdep) <have_wmmx_registers>: New
939 * arm-linux-nat.c (arm_linux_vfp_register_count): Remove.
940 (fetch_vfp_regs): Use vfp_register_count from gdbarch_tdep
941 instead of arm_linux_vfp_register_count.
942 (store_vfp_regs): Likewise.
943 (arm_linux_fetch_inferior_registers): Likewise.
944 (arm_linux_store_inferior_registers): Likewise.
945 (arm_linux_read_description): Don't set
946 arm_linux_vfp_register_count.
947 * arm-linux-tdep.c (arm_linux_iterate_over_regset_sections):
949 * arm-tdep.c (arm_gdbarch_init): Add assert on
951 * arm-tdep.h (struct gdbarch_tdep) <have_vfp_registers>: Rename
952 field to vfp_register_count. All users updated.
956 * gdb/arm-tdep.c (arm_gdbarch_init): Perform arm_abi detection on
957 ELFOSABI_GNU binaries.
961 * dwarf2read.c (lnp_state_machine): New typedef.
962 (lnp_reader_state): New typedef.
963 (dwarf_record_line_1): Renamed from dwarf_record_line.
965 (dwarf_record_line): New function.
966 (init_lnp_state_machine): New function.
967 (check_line_address): Replace p_record_line parameter with state.
969 (dwarf_decode_lines_1): Call dwarf_record_line, init_lnp_state_machine.
970 Update to record state in lnp_state_machine.
974 * dwarf2read.c (record_line_ftype): New typedef.
975 (check_line_address): New function.
976 (dwarf_decode_lines_1): Call it.
980 * NEWS: Mention "set debug dwarf-line".
981 * dwarf2read.c (dwarf_line_debug): New static global.
982 (add_include_dir): Add debug dwarf-line support.
983 (add_file_name, dwarf_record_line, dwarf_finish_line): Ditto.
984 (_initialize_dwarf2_read): New parameter "debug dwarf-line".
988 * cp-namespace.c (cp_lookup_nested_symbol): New arg "domain".
990 (cp_lookup_nested_symbol_1, find_symbol_in_baseclass): Ditto.
991 * cp-support.h (cp_lookup_nested_symbol): Update.
996 * block.c (block_find_symbol): New function.
997 (block_find_non_opaque_type): Ditto.
998 (block_find_non_opaque_type_preferred): Ditto.
999 * block.h (block_symbol_matcher_ftype): New typedef.
1000 (block_find_symbol): Declare.
1001 (block_find_non_opaque_type): Ditto.
1002 (block_find_non_opaque_type_preferred): Ditto.
1003 * dwarf2read.c (dw2_lookup_symbol): Call block_find_symbol.
1004 * psymtab.c (psym_lookup_symbol): Ditto.
1005 * symtab.c (basic_lookup_transparent_type_1): New function.
1006 (basic_lookup_transparent_type): Call it.
1010 * aarch64-tdep.c (aarch64_record_data_proc_simd_fp): Return
1011 AARCH64_RECORD_UNKNOWN for unknown instruction encoding.
1015 * aarch64-tdep.c (aarch64_record_branch_except_sys): Split lines
1017 (aarch64_record_load_store): Likewise.
1021 PR c++/18141, c++/18417.
1022 * cp-support.c (cp_lookup_rtti_type): Handle the case of NAME being
1027 * NEWS: Add entries for command renamings.
1028 * dwarf2read.c (dwarf_read_debug): Renamed from dwarf2_read_debug.
1030 (dwarf_die_debug): Renamed from dwarf2_die_debug. All uses updated.
1031 (dwarf_max_cache_age): Renamed from dwarf2_max_cache_age.
1033 (show_dwarf_max_cache_age): Renamed from show_dwarf2_max_cache_age.
1034 All callers updated. Fix spelling of DWARF in help text.
1035 (set_dwarf_cmdlist): Renamed from set_dwarf2_cmdlist.
1037 (show_dwarf_cmdlist): Renamed from show_dwarf2_cmdlist.
1039 (set_dwarf_cmd): Renamed from set_dwarf2_cmd. All callers updated.
1040 (show_dwarf_cmd): Renamed from show_dwarf2_cmd. All callers updated.
1041 (dwarf_always_disassemble): Renamed from dwarf_always_disassemble.
1043 (show_dwarf_always_disassemble): Renamed from
1044 show_dwarf2_always_disassemble. All callers updated.
1045 (_initialize_dwarf2_read): Rename "set/show dwarf2" prefix to
1046 "set/show dwarf". Rename "set/show dwarf2 max-cache-age" to
1047 "set/show dwarf max-cache-age". Rename
1048 "set/show dwarf2 always-disassemble" to
1049 "set/show dwarf always-disassemble". Rename
1050 "set/show debug dwarf2-read" to "set/show debug dwarf-read". Rename
1051 "set/show debug dwarf2-die" to "set/show debug dwarf-die".
1056 * python/py-lazy-string.c (stpy_convert_to_value): Use
1057 gdbpy_gdb_memory_error not PyExc_MemoryError.
1058 (gdbpy_create_lazy_string_object): Ditto.
1062 * tui/tui-regs.c (tui_reg_next_command): Compare against NULL.
1066 * tui/tui-regs.c (tui_reg_prev_command): New function.
1067 (_initialize_tui_regs): Add 'prev' command for 'tui reg'.
1068 * reggroups.c (reggroup_prev): New function.
1069 * reggroups.h (reggroup_prev): Add declaration. Update comment.
1074 * aarch64-linux-tdep.c: Include linux-record.h and
1076 (struct linux_record_tdep aarch64_linux_record_tdep): Declare.
1077 (aarch64_syscall): New enum.
1078 (aarch64_canonicalize_syscall): New function.
1079 (aarch64_all_but_pc_registers_record): New function.
1080 (aarch64_linux_syscall_record): New function.
1081 (aarch64_linux_init_abi): Install AArch64 process record
1082 handler. Update to handle syscall recording.
1083 * aarch64-tdep.c: Include record.h and record-full.h.
1084 (submask, bit, bits, REG_ALLOC, MEM_ALLOC): New macros.
1085 (struct aarch64_mem_r): Define.
1086 (aarch64_record_result): New enum.
1087 (struct insn_decode_record): Define.
1088 (insn_decode_record): New typedef.
1089 (aarch64_record_data_proc_reg): New function.
1090 (aarch64_record_data_proc_imm): New function.
1091 (aarch64_record_branch_except_sys): New function.
1092 (aarch64_record_load_store): New function.
1093 (aarch64_record_data_proc_simd_fp): New function.
1094 (aarch64_record_asimd_load_store): New function.
1095 (aarch64_record_decode_insn_handler): New function.
1096 (deallocate_reg_mem): New function.
1097 (aarch64_process_record): New function.
1098 * aarch64-tdep.h (struct gdbarch_tdep) <aarch64_syscall_record>:
1100 (aarch64_process_record): New extern declaration.
1101 * configure.tgt: Add linux-record.o to gdb_target_obs.
1102 * linux-record.h (struct linux_record_tdep) <arg7>: New field.
1106 * NEWS: Add a note on process record-replay support on aarch64*-linux*
1111 * amd64-tdep.c: Replace in_function_epilogue_p with
1112 stack_frame_destroyed_p throughout.
1113 * arch-utils.c: Ditto.
1114 * arch-utils.h: Ditto.
1115 * arm-tdep.c: Ditto.
1116 * breakpoint.c: Ditto.
1117 * gdbarch.sh: Ditto.
1118 * hppa-tdep.c: Ditto.
1119 * i386-tdep.c: Ditto.
1120 * mips-tdep.c: Ditto.
1121 * nios2-tdep.c: Ditto.
1122 * rs6000-tdep.c: Ditto.
1123 * s390-linux-tdep.c: Ditto.
1124 * score-tdep.c: Ditto.
1126 * sparc-tdep.c: Ditto.
1127 * sparc-tdep.h: Ditto.
1128 * sparc64-tdep.c: Ditto.
1129 * spu-tdep.c: Ditto.
1130 * tic6x-tdep.c: Ditto.
1131 * tilegx-tdep.c: Ditto.
1132 * xstormy16-tdep.c: Ditto.
1133 * gdbarch.c, gdbarch.h: Re-generated.
1137 * NEWS: Mention 'tui enable' and 'tui disable'.
1138 * tui/tui.c (tui_enable_command): New function.
1139 (tui_disable_command): New function.
1140 (_initialize_tui): New function.
1144 * tui/tui-regs.c (tui_reg_next_command): Use NULL not 0.
1148 * tui/tui-layout.c (tui_set_layout_for_display_command): Ensure
1153 * tui/tui-layout.c (tui_layout_command): Move call to tui_enable
1155 (tui_set_layout_for_display_command): ...here, before calling
1156 tui_set_layout. Only set the layout if gdb has not already
1157 entered the TUI_FAILURE state.
1161 * tui/tui-layout.c (layout_completer): New function.
1162 (_initialize_tui_layout): Set completer on layout command.
1166 * tui/tui-layout.c (tui_set_layout): Remove
1167 tui_register_display_type parameter. Remove all checking of this
1168 parameter, and reindent function. Update header comment.
1169 (tui_set_layout_for_display_command): Rename to...
1170 (tui_set_layout_by_name): ...this, and don't check for different
1171 register class types, don't pass a tui_register_display_type to
1172 tui_set_layout. Update header comment.
1173 (layout_names): Remove register set specific names.
1174 * tui/tui-layout.h (tui_set_layout): Remove
1175 tui_register_display_type parameter.
1176 * tui/tui.c (tui_rl_change_windows): Don't pass a
1177 tui_register_display_type to tui_set_layout.
1178 (tui_rl_delete_other_windows): Likewise.
1179 (tui_enable): Likewise.
1180 * tui/tui-data.h (TUI_FLOAT_REGS_NAME): Remove.
1181 (TUI_FLOAT_REGS_NAME_LOWER): Remove.
1182 (TUI_GENERAL_REGS_NAME): Remove.
1183 (TUI_GENERAL_REGS_NAME_LOWER): Remove.
1184 (TUI_SPECIAL_REGS_NAME): Remove.
1185 (TUI_SPECIAL_REGS_NAME_LOWER): Remove.
1186 (TUI_GENERAL_SPECIAL_REGS_NAME): Remove.
1187 (TUI_GENERAL_SPECIAL_REGS_NAME_LOWER): Remove.
1188 (enum tui_register_display_type): Remove.
1189 (struct tui_layout_def): Remove regs_display_type and
1190 float_regs_display_type fields.
1191 (struct tui_data_info): Remove regs_display_type field.
1192 (tui_layout_command): Use new name for
1193 tui_set_layout_for_display_command.
1194 * tui/tui-data.c (layout_def): Don't initialise removed fields.
1195 (tui_clear_win_detail): Don't initialise removed fields of
1197 * tui/tui-regs.c (tui_show_registers): Use new name for
1198 tui_set_layout_for_display_command.
1199 * tui/tui.h (tui_set_layout_for_display_command): Rename
1201 (tui_set_layout_by_name): ...this.
1202 * printcmd.c (display_command): Remove tui related layout call,
1207 * infrun.c (handle_inferior_event_1): Renames handle_inferior_event.
1208 (handle_inferior_event): New function.
1212 * ada-lang.c (to_fixed_array_type): Rename local variable
1213 typename into type_name.
1217 Fix ASAN crash for gdb.compile/compile.exp.
1218 * infcall.c (call_function_by_hand_dummy): Use xstrdup for NAME.
1222 * compile/compile-c-symbols.c (convert_symbol_sym, gcc_convert_symbol)
1223 (gcc_symbol_address): Change gdb_stdout to gdb_stdlog.
1224 * compile/compile-object-load.c (setup_sections, compile_object_load):
1226 * compile/compile.c (compile_to_object): Likewise.
1230 * NEWS: Mention support for unbuffered Guile memory ports.
1231 * scm-ports.c (ioscm_memory_port): Update comments on end, size.
1232 (ioscm_lseek_address): Improve overflow calculation.
1233 (gdbscm_memory_port_fill_input): Add assert.
1234 (gdbscm_memory_port_write): Handle unbuffered ports.
1235 Handle large writes identical to Guile's fport_write.
1236 (gdbscm_memory_port_seek): Fix seeking past end check.
1237 (gdbscm_memory_port_close): Handle closing unbuffered port.
1238 (ioscm_parse_mode_bits): Recognize "0" for unbuffered ports.
1239 (ioscm_init_memory_port): Handle unbuffered ports.
1240 (ioscm_reinit_memory_port): Ditto.
1241 (ioscm_init_memory_port): Update size calculation.
1242 (gdbscm_open_memory): Support zero sized ports.
1246 * compile/compile-object-load.c (get_out_value_type): Fix uninitialized
1247 variable compiler warnings.
1251 * compile/compile-object-load.c (get_out_value_type): Fix returned type.
1256 * NEWS (Changes since GDB 7.9): Add compile print.
1257 * compile/compile-c-support.c (add_code_header, add_code_footer)
1258 (c_compute_program): Add COMPILE_I_PRINT_ADDRESS_SCOPE and
1259 COMPILE_I_PRINT_VALUE_SCOPE.
1260 * compile/compile-internal.h (COMPILE_I_PRINT_OUT_ARG_TYPE)
1261 (COMPILE_I_PRINT_OUT_ARG, COMPILE_I_EXPR_VAL, COMPILE_I_EXPR_PTR_TYPE):
1263 * compile/compile-object-load.c: Include block.h.
1264 (get_out_value_type): New function.
1265 (compile_object_load): Handle COMPILE_I_PRINT_ADDRESS_SCOPE and
1266 COMPILE_I_PRINT_VALUE_SCOPE. Set compile_module's OUT_VALUE_ADDR and
1268 * compile/compile-object-load.h (struct compile_module): Add fields
1269 out_value_addr and out_value_type.
1270 * compile/compile-object-run.c: Include valprint.h and compile.h.
1271 (struct do_module_cleanup): Add fields out_value_addr and
1273 (do_module_cleanup): Handle COMPILE_I_PRINT_ADDRESS_SCOPE and
1274 COMPILE_I_PRINT_VALUE_SCOPE.
1275 (compile_object_run): Propagate out_value_addr and out_value_type.
1276 Pass OUT_VALUE_ADDR.
1277 * compile/compile.c: Include valprint.h.
1278 (compile_print_value, compile_print_command): New functions.
1279 (eval_compile_command): Handle failed COMPILE_I_PRINT_ADDRESS_SCOPE.
1280 (_initialize_compile): Update compile code help text. Install
1281 compile_print_command.
1282 * compile/compile.h (compile_print_value): New prototype.
1283 * defs.h (enum compile_i_scope_types): Add
1284 COMPILE_I_PRINT_ADDRESS_SCOPE and COMPILE_I_PRINT_VALUE_SCOPE.
1288 * compile/compile-object-load.c (get_regs_type): Add parameter func_sym.
1289 Rely on its parameter count.
1290 (compile_object_load): Replace lookup_minimal_symbol_text by
1291 lookup_global_symbol_from_objfile. Verify FUNC_SYM. Set it in the
1293 * compile/compile-object-load.h (struct compile_module): Replace
1294 func_addr by func_sym.
1295 * compile/compile-object-run.c: Include block.h.
1296 (compile_object_run): Reset module variable after it is freed. Use
1297 FUNC_SYM instead of FUNC_ADDR. Rely on it.
1301 * compile/compile-c-support.c (print_one_macro): Use #ifndef.
1302 (generate_register_struct): Use __gdb_uintptr for TYPE_CODE_PTR.
1303 (c_compute_program): Call generate_register_struct after typedefs.
1304 * compile/compile-loc2c.c (push, pushf_register_address)
1305 (pushf_register): Cast to GCC_UINTPTR.
1306 (do_compile_dwarf_expr_to_c): Use unused attribute. Add space after
1307 type. Use GCC_UINTPTR instead of void *. Remove excessive cast.
1308 (compile_dwarf_expr_to_c): Use GCC_UINTPTR instead of void *.
1309 * compile/compile.c (_initialize_compile): Enable warnings for
1314 * cli/cli-script.c (execute_control_command): Update
1315 eval_compile_command caller.
1316 * compile/compile-object-load.c (compile_object_load): Add parameters
1317 scope and scope_data. Set them.
1318 * compile/compile-object-load.h (struct compile_module): Add fields
1319 scope and scope_data.
1320 (compile_object_load): Add parameters scope and scope_data.
1321 * compile/compile-object-run.c (struct do_module_cleanup): Add fields
1322 scope and scope_data.
1323 (compile_object_run): Propagate the fields scope and scope_data.
1324 * compile/compile.c (compile_file_command, compile_code_command):
1325 Update eval_compile_command callers.
1326 (eval_compile_command): Add parameter scope_data. Pass it plus scope.
1327 * compile/compile.h (eval_compile_command): Add parameter scope_data.
1328 * defs.h (struct command_line): Add field scope_data.
1332 * printcmd.c (struct format_data): Move it to valprint.h.
1333 (print_command_parse_format, print_value): New functions from ...
1334 (print_command_1): ... here. Call them.
1335 * valprint.h (struct format_data): Move it here from printcmd.c.
1336 (print_command_parse_format, print_value): New declarations.
1340 * compile/compile-object-load.c (compile_object_load): Add
1341 COMPILE_DEBUG message.
1345 * ada-lang.c (ada_value_ptr_subscript): Use enum position of
1346 index to get element instead of enum value.
1347 (ada_value_slice_from_ptr, ada_value_slice): Use enum position
1348 of index to compute length, but enum values to compute bounds.
1349 (ada_array_length): Use enum position of index instead of enum value.
1350 (pos_atr): Move position computation to...
1351 (ada_evaluate_subexp): Use enum values to compute bounds.
1352 * gdbtypes.c (discrete_position): ...this new function.
1353 * gdbtypes.h (discrete_position): New function declaration.
1354 * valprint.c (val_print_array_elements): Call discrete_position
1355 to handle array indexed by non-contiguous enumeration types.
1359 * ada-lang.c (find_parallel_type_by_descriptive_type):
1360 Go through typedefs during lookup.
1361 (to_fixed_array_type): Add support for non-bit packed arrays
1362 as variable-length fields.
1367 * event-loop.c (gdb_notifier) <next_file_handler,
1368 next_poll_fds_index>: New fields.
1369 (get_next_file_handler_to_handle_and_advance): New function.
1370 (delete_file_handler): If deleting the next file handler to
1371 handle, advance to the next file handler.
1372 (gdb_wait_for_event): Bail early if no event fired. Poll file
1373 handlers in round-robin fashion.
1377 * linux-tdep.c (linux_find_memory_regions_full): Rename local
1378 'private' to 'priv'.
1382 * nat/linux-nat.h: Include "target/waitstatus.h".
1386 * python/py-unwind.c (struct reg_info): Move out of ...
1387 (struct cached_frame_info): ... this scope.
1388 (pending_frame_object_type, unwind_info_object_type): Make extern.
1392 * ada-lang.c (ada_value_primitive_packed_val): Make sure
1393 accumSize is never negative.
1397 * tui/tui-command.c: Remove include of <ctype.h>.
1398 (tui_dispatch_ctrl_char): Remove workaround for xterm terminals.
1402 * dwarf2read.c (die_needs_namespace): Return 1 for
1403 DW_TAG_inlined_subroutine.
1407 * regcache.c (regcache_cpy_no_passthrough): New declaration.
1408 (regcache_cpy_no_passthrough): Make it static, add function comment.
1409 * regcache.h (regcache_dup, regcache_cpy): Reduce/update their comment.
1410 (regcache_cpy_no_passthrough): Remove declaration.
1414 * gdbthread.h (struct thread_control_state): Update comment for
1416 * infcall.c (run_inferior_call): Update comment about
1418 * infcmd.c (get_return_value): Update comment about stop_registers.
1419 (finish_forward): Update comment about proceed_to_finish.
1420 * infrun.c (stop_registers): Remove.
1421 (clear_proceed_status, normal_stop): Remove stop_registers handling.
1422 * infrun.h (stop_registers): Remove.
1426 * infcall.c (struct dummy_frame_context_saver)
1427 (dummy_frame_context_saver_data_free, dummy_frame_context_saver_dtor)
1428 (dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
1429 (dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
1431 (call_function_by_hand_dummy): Move discard_cleanups of
1432 inf_status_cleanup before dummy_frame_push. Call
1433 dummy_frame_context_saver_setup and prepare context_saver_cleanup.
1434 Use dummy_frame_context_saver_get_regs instead of stop_registers.
1435 * infcall.h (struct dummy_frame_context_saver)
1436 (dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
1437 (dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
1439 * infcmd.c: Include infcall.h.
1440 (get_return_value): Add parameter ctx_saver, use it instead of
1442 (print_return_value): Add parameter ctx_saver, pass it.
1443 (struct finish_command_continuation_args): Add field ctx_saver.
1444 (finish_command_continuation): Update print_return_value caller.
1445 (finish_command_continuation_free_arg): Free also ctx_saver.
1446 (finish_forward): Call dummy_frame_context_saver_setup.
1447 * inferior.h (struct dummy_frame_context_saver): New declaration.
1448 (get_return_value): Add parameter ctx_saver.
1449 * python/py-finishbreakpoint.c (bpfinishpy_pre_stop_hook): Update
1450 get_return_value caller.
1454 * dummy-frame.c (struct dummy_frame_dtor_list): New.
1455 (struct dummy_frame): Replace dtor and dtor_data by dtor_list.
1456 (remove_dummy_frame): Process dtor_list.
1457 (pop_dummy_frame): Process dtor_list.
1458 (register_dummy_frame_dtor): Maintain dtor_list.
1459 (find_dummy_frame_dtor): Handle dtor_list.
1460 * dummy-frame.h (register_dummy_frame_dtor, find_dummy_frame_dtor):
1465 * compile/compile-object-run.c (do_module_cleanup): Add parameter
1467 (compile_object_run): Update do_module_cleanup caller.
1468 * dummy-frame.c: Include infcall.h.
1469 (struct dummy_frame): Update dtor comment.
1470 (remove_dummy_frame): Call dtor.
1471 (pop_dummy_frame): Update dtor caller.
1472 * dummy-frame.h (dummy_frame_dtor_ftype): Add parameter
1481 * NEWS: Create "Changes in GDB 7.9.1" section. Move news about
1482 Xmethods now being able to specify a result type to that new
1487 * tui/tui-win.c (tui_async_resize_screen): Clear win_resized
1488 first before resizing the window.
1489 * tui/tui.c (tui_enable): Likewise.
1493 * dummy-frame.c (struct dummy_frame): Use proper typedef for dtor.
1494 * dummy-frame.h (dummy_frame_dtor_ftype): Add its comment.
1495 * infcall.c (call_function_by_hand_dummy): Use proper typedef for
1496 dummy_dtor parameter.
1497 * infcall.h: Include dummy-frame.h.
1498 (call_function_by_hand_dummy_dtor_ftype): Remove.
1499 (call_function_by_hand_dummy): Use proper typedef for dummy_dtor
1505 * top.c (history_size_setshow_var): Change type to signed.
1506 Initialize to -2. Update documentation.
1507 (set_readline_history_size): Define.
1508 (set_history_size_command): Use it. Remove logic for handling
1510 (init_history): Use set_readline_history_size(). Test for a
1511 value of -2 instead of 0 when determining whether to set a
1512 default history size.
1513 (init_main): Decode the argument of the "size" command as a
1514 zuinteger_unlimited.
1518 * dwarf2read.c (struct file_entry): Tweak comments.
1519 (get_debug_line_section): Tweak comments.
1523 * NEWS: Announce fork support in the RSP and support
1524 for fork debugging in extended mode.
1528 * remote.c (remote_insert_fork_catchpoint): New function.
1529 (remote_remove_fork_catchpoint): New function.
1530 (remote_insert_vfork_catchpoint): New function.
1531 (remote_remove_vfork_catchpoint): New function.
1532 (pending_fork_parent_callback): New function.
1533 (remove_new_fork_child): New function.
1534 (remote_update_thread_list): Call remote_notif_get_pending_events
1535 and remove_new_fork_child.
1536 (extended_remote_kill): Kill fork child when killing the
1537 parent before follow_fork completes.
1538 (init_extended_remote_ops): Initialize target vector with
1539 new fork catchpoint functions.
1543 * remote.c (remove_vfork_event_p): New function.
1544 (remote_follow_fork): Add vfork event type to event checking.
1545 (remote_parse_stop_reply): New stop reasons "vfork" and
1546 "vforkdone" for RSP 'T' Stop Reply Packet.
1550 * linux-nat.c (linux_nat_ptrace_options): New function.
1551 (linux_init_ptrace, wait_lwp, linux_nat_filter_event):
1552 Call linux_nat_ptrace_options and use different argument to
1553 linux_enable_event_reporting.
1554 (_initialize_linux_nat): Delete call to
1555 linux_ptrace_set_additional_flags.
1556 * nat/linux-ptrace.c (current_ptrace_options): Rename to
1557 supported_ptrace_options.
1558 (additional_flags): Delete variable.
1559 (linux_check_ptrace_features): Use supported_ptrace_options.
1560 (linux_test_for_tracesysgood, linux_test_for_tracefork):
1561 Likewise, and remove additional_flags check.
1562 (linux_enable_event_reporting): Change 'attached' argument to
1563 'options'. Use supported_ptrace_options.
1564 (ptrace_supports_feature): Change comment. Use
1565 supported_ptrace_options.
1566 (linux_ptrace_set_additional_flags): Delete function.
1567 * nat/linux-ptrace.h (linux_ptrace_set_additional_flags):
1568 Delete function prototype.
1569 * remote.c (remote_fork_event_p): New function.
1570 (remote_detach_pid): New function.
1571 (remote_detach_1): Call remote_detach_pid, don't mourn inferior
1572 if doing detach-on-fork.
1573 (remote_follow_fork): New function.
1574 (remote_parse_stop_reply): Handle new "T" stop reason "fork".
1575 (remote_pid_to_str): Print "process" strings for pid/0/0 ptids.
1576 (init_extended_remote_ops): Initialize to_follow_fork.
1580 * nat/linux-ptrace.c (linux_check_ptrace_features): Change
1581 from static to extern.
1582 * nat/linux-ptrace.h (linux_check_ptrace_features): Declare.
1583 * remote.c (anonymous enum): <PACKET_fork_event_feature,
1584 * PACKET_vfork_event_feature>: New enumeration constants.
1585 (remote_protocol_features): Add table entries for new packets.
1586 (remote_query_supported): Add new feature queries to qSupported
1591 * remote.c (remote_add_inferior): Call exec_file_locate_attach
1592 for fake PIDs as well as real ones.
1593 (remote_pid_to_exec_file): Send empty annex if PID is fake.
1597 * NEWS (Python Scripting): Mention the new gdb.Value methods.
1598 * python/py-value.c (valpy_reference_value): New function.
1599 (valpy_const_value): Likewise.
1600 (value_object_methods): Add new methods.
1601 * value.c (make_cv_value): New function.
1602 * value.h (make_cv_value): Declare.
1607 * dwarf2read.c (setup_type_unit_groups): Do NULL pointer check
1608 to 'lh->include_dirs' before accessing to it.
1609 (psymtab_include_file_name): Likewise.
1610 (dwarf_decode_lines_1): Likewise.
1611 (dwarf_decode_lines): Likewise.
1612 (file_file_name): Likewise.
1616 * nios2-linux-tdep.c (NIOS2_SIGRETURN_TRAMP_ADDR): Define.
1617 (NIOS2_SIGRETURN_REGSAVE_OFFSET): Define.
1618 (nios2_linux_rt_sigreturn_init): Adjust base address of
1623 * nios2-tdep.c (nios2_breakpoint_from_pc): Revert to using
1624 "trap 31" as the breakpoint instruction on all targets.
1628 * infcmd.c (print_return_value): Remove unused declaration.
1632 * dwarf2read.c (attr_to_dynamic_prop)
1633 <DW_AT_data_member_location>: Use read_type_die isntead of
1638 * ada-lang.c (ada_convert_actual): Add handling of formals
1639 passed inside an aligner type.
1643 * copyright.py (NOT_FSF_LIST): Remove sim/erc32 entries.
1648 * python/lib/gdb/command/xmethods.py (print_xm_info): Fix typo.
1649 Print xmethod matcher status.
1653 * s390-linux-nat.c (fill_gregset): Avoid relying on the PSWA
1654 register in the regcache when treating the PSWM register, and vice
1659 * linux-thread-db.c (struct thread_db_info)
1660 <td_ta_map_id2thr_p>: Remove field.
1661 (try_thread_db_load_1): Remove initialization for the above.
1665 * linux-thread-db.c (struct thread_db_info)
1666 <td_thr_validate_p>: Remove field.
1667 (try_thread_db_load_1): Remove initialization for the above.
1671 * compile/compile-object-load.c (compile_object_load): Support
1676 * compile/compile.c (compile_to_object): Make the cmd_string parameter
1677 const. Use new variables for the const compatibility.
1678 (eval_compile_command): Make the cmd_string parameter const.
1679 * compile/compile.h (eval_compile_command): Make the cmd_string
1684 * defs.h (deprecated_init_ui_hook): Delete. Remove associated
1686 * top.c (deprecated_init_ui_hook): Delete.
1687 (gdb_init): Remove handling of deprecated_init_ui_hook.
1688 * interps.c (clear_interpreter_hooks): Remove handling of
1689 deprecated_init_ui_hook.
1690 * main.c (captured_main): Update comment.
1694 * solib.c (_initialize_solib): Add "info dll" alias creation.
1695 * windows-nat.c (set_windows_aliases): Delete.
1696 (_initialize_windows_nat): Remove deprecated_init_ui_hook
1698 * NEWS: Add news entry about "info dll" now being available
1703 * ada-lang.c (value_assign_to_component): Reformat and improve
1704 documentation. Remove all trailing spaces.
1708 * inline-frame.c (inline_frame_sniffer, skip_inline_frames):
1709 Stop counting inlined frames as soon as an out-of-line function
1714 * dwarf2read.c (inherit_abstract_dies): Skip
1715 DW_TAG_GNU_call_site dies while inheriting children of an
1716 abstract DIE into a scope.
1717 (read_lexical_block_scope): Inherit abstract DIE's for
1722 * ada-valprint.c (val_print_packed_array_elements): Delete
1723 variable "len". Add a type-length check when comparing two
1724 consecutive elements of the array. Use the element's actual
1725 length in call to value_contents_eq.
1726 * ada-lang.c (ada_value_primitive_packed_val): Always return
1727 a value whose type has been resolved.
1731 * ada-lang.c (ada_value_primitive_packed_val): Recompute
1732 BIT_SIZE and LEN if the size of the resolved type is smaller
1733 than BIT_SIZE * HOST_CHAR_BIT.
1737 * ada-lang.c (ada_value_primitive_packed_val): Use a more
1738 correct address in call to value_at. Adjust call to
1739 value_address accordingly.
1743 * ada-valprint.c (ada_val_print_1): Resolve TYPE before trying
1748 * dwarf2loc.h (struct property_addr_info): Add "valaddr" field.
1749 * dwarf2loc.c (dwarf2_evaluate_property): Add handling of
1751 * gdbtypes.h (resolve_dynamic_type): Add "valaddr" parameter.
1752 * gdbtypes.c (resolve_dynamic_struct): Set pinfo.valaddr.
1753 (resolve_dynamic_type_internal): Set pinfo.valaddr.
1754 Add handling of addr_stack->valaddr.
1755 (resolve_dynamic_type): Add "valaddr" parameter.
1756 Set pinfo.valaddr field.
1757 * ada-lang.c (ada_discrete_type_high_bound): Update call to
1758 resolve_dynamic_type.
1759 (ada_discrete_type_low_bound): Likewise.
1760 * findvar.c (default_read_var_value): Likewise.
1761 * value.c (value_from_contents_and_address): Likewise.
1765 * gdbtypes.c (resolve_dynamic_array): Use
1766 create_array_type_with_stride instead of create_array_type.
1770 * rl78-tdep.c (rl78_analyze_prologue): Pass RL78_ISA_DEFAULT to
1776 * NEWS: Document new gdb.XMethodWorker.get_result_type method.
1777 * eval.c (evaluate_subexp_standard) <OP_FUNCALL>: Handle
1778 EVAL_AVOID_SIDE_EFFECTS for xmethods.
1779 * extension-priv.h (struct extension_language_ops)
1780 <get_xmethod_result_type>: New member.
1781 * extension.c (get_xmethod_result_type): New function.
1782 * extension.h (get_xmethod_result_type): Declare.
1783 * python/py-xmethods.c (get_result_type_method_name): New static
1785 (py_get_result_type_method_name): Ditto.
1786 (gdbpy_get_xmethod_result_type): New function.
1787 (gdbpy_initialize_xmethods): Initialize py_get_result_type_method_name.
1788 * python/python-internal.h (gdbpy_get_xmethod_result_type): Declare.
1789 * python/python.c (python_extension_ops): Add
1790 gdbpy_get_xmethod_result_type.
1791 * python/lib/gdb/xmethod.py (XMethodWorker): Add get_result_type.
1792 * valarith.c (value_x_binop): Handle EVAL_AVOID_SIDE_EFFECTS for
1794 (value_x_unop): Ditto.
1795 * value.c (result_type_of_xmethod): New function.
1796 * value.h (result_type_of_xmethod): Declare.
1800 * solib.c (solib_find_1): Allow fd argument to be NULL.
1801 (exec_file_find): Update comment.
1802 (solib_find): Likewise.
1803 * exec.c (exec_file_locate_attach): Use NULL as fd
1804 argument to exec_file_find to avoid having to close
1806 * infrun.c (follow_exec): Likewise.
1811 * python/lib/gdb/printing.py (register_pretty_printer): Handle
1812 name or __name__ attributes. Handle gdb module as first argument.
1817 * python/py-prettyprint.c (print_children): Verify result of children
1818 iterator. Provide better error message.
1819 * python/python-internal..h (gdbpy_print_python_errors_p): Declare.
1820 * python/python.c (gdbpy_print_python_errors_p): New function.
1824 * gdbtypes.h (struct cplus_struct_type) <n_baseclasses>: Fix comment.
1828 * NEWS: Mention gdb.Type.optimized_out method.
1829 * python/py-type.c (typy_optimized_out): New function.
1833 * fbsd-nat.c: Include "gdb_wait.h" instead of <sys/wait.h>.
1837 * utils.c (init_page_info): Set rl_catch_sigwinch to zero.
1838 (initialize_utils): Move call of init_page_info() to ...
1839 * top.c (gdb_init): ... here.
1843 * tui/tui-win.c (tui_sigwinch_handler): Remove now-stale comment.
1844 (tui_sigwinch_handler): Still update our idea of
1845 the terminal's width and height even when TUI is not active.
1849 * utils.h (set_screen_width_and_height): Declare.
1850 * utils.c (set_screen_width_and_height): Define.
1851 * tui/tui-win.c (tui_update_gdb_sizes): Use it.
1855 * infrun.c (solist.h): New include.
1856 (follow_exec): Use exec_file_find to prefix execd_pathname
1861 * tui/tui-source.c (tui_set_source_content): Avoid calling
1862 strcpy() when offset is 0.
1867 * tui/tui-data.c (tui_free_window): Don't free the locator
1868 window when passed an SRC_WIN or a DISASSEM_WIN.
1872 * tui/tui-data.h (struct tui_win_element): Forward-declare.
1873 (tui_win_content): Move declaration.
1874 (struct tui_gen_win_info): Give 'content' field the
1875 type tui_win_content.
1876 * tui/tui-data.c (init_content_element): Remove redundant and
1878 (tui_add_content_elements): Remove erroneous cast.
1879 * tui/tui-disasm.c (tui_set_disassem_content): Remove redundant
1881 (tui_get_begin_asm_address): Likewise.
1882 * tui/tui-regs.c (tui_show_registers): Likewise.
1883 (tui_show_register_group): Likewise.
1884 (tui_display_registers_from): Likewise.
1885 (tui_check_register_values): Likewise.
1886 * tui/tui-source.c (tui_set_source_content): Likewise.
1887 (tui_set_source_content_nil): Likewise.
1888 (tui_source_is_displayed): Likewise.
1889 * tui/tui-stack.c (tui_show_locator_content): Likewise.
1890 (tui_set_locator_fullname): Likewise.
1891 (tui_set_locator_info): Likewise.
1892 (tui_show_frame_info): Likewise.
1893 * tui/tui-winsource.c (tui_clear_source_content): Likewise.
1894 (tui_show_source_line): Likewise.
1895 (tui_horizontal_source_scroll): Likewise.
1896 (tui_update_breakpoint_info): Likewise.
1897 (tui_set_exec_info_content): Likewise.
1898 (tui_show_exec_info_content): Likewise.
1899 (tui_alloc_source_buffer): Likewise.
1900 (tui_line_is_displayed): Likewise.
1901 (tui_addr_is_displayed): Likewise.
1905 * fbsd-nat.c: (fbsd_wait) [PL_FLAG_EXEC]: Report TARGET_WAITKIND_EXECD
1906 event if PL_FLAG_EXEC is set.
1907 [PL_FLAG_EXEC] (fbsd_insert_exec_catchpoint): New function.
1908 [PL_FLAG_EXEC] (fbsd_remove_exec_catchpoint): New function.
1909 (fbsd_nat_add_target) [PL_FLAG_EXEC]: Set
1910 "to_insert_exec_catchpoint" to "fbsd_insert_exec_catchpoint".
1911 Set "to_remove_exec_catchpoint" to "fbsd_remove_exec_catchpoint".
1915 * fbsd-nat.c: [PT_LWPINFO] New variable super_wait.
1916 [TDP_RFPPWAIT] New variable fbsd_pending_children.
1917 [TDP_RFPPWAIT] (fbsd_remember_child): New function.
1918 [TDP_RFPPWAIT] (fbsd_is_child_pending): New function.
1919 [TDP_RFPPWAIT] (fbsd_fetch_kinfo_proc): New function.
1920 [PT_LWPINFO] (fbsd_wait): New function.
1921 [TDP_RFPPWAIT] (fbsd_follow_fork): New function.
1922 [TDP_RFPPWAIT] (fbsd_insert_fork_catchpoint): New function.
1923 [TDP_RFPPWAIT] (fbsd_remove_fork_catchpoint): New function.
1924 [TDP_RFPPWAIT] (fbsd_insert_vfork_catchpoint): New function.
1925 [TDP_RFPPWAIT] (fbsd_remove_vfork_catchpoint): New function.
1926 [TDP_RFPPWAIT] (fbsd_enable_follow_fork): New function.
1927 [TDP_RFPPWAIT] (fbsd_post_startup_inferior): New function.
1928 [TDP_RFPPWAIT] (fbsd_post_attach): New function.
1929 (fbsd_nat_add_target) [PT_LWPINFO] Set "to_wait" to
1931 [TDP_RFPPWAIT] Set "to_follow_fork" to "fbsd_follow_fork".
1932 Set "to_insert_fork_catchpoint" to "fbsd_insert_fork_catchpoint".
1933 Set "to_remove_fork_catchpoint" to "fbsd_remove_fork_catchpoint".
1934 Set "to_insert_vfork_catchpoint" to "fbsd_insert_vfork_catchpoint".
1935 Set "to_remove_vfork_catchpoint" to "fbsd_remove_vfork_catchpoint".
1936 Set "to_post_startup_inferior" to "fbsd_post_startup_inferior".
1937 Set "to_post_attach" to "fbsd_post_attach".
1941 * fbsd-nat.c (fbsd_pid_to_exec_file): Mark static.
1942 (fbsd_find_memory_regions): Mark static.
1943 (fbsd_nat_add_target): New function.
1944 * fbsd-nat.h: Export fbsd_nat_add_target and remove prototypes for
1945 fbsd_pid_to_exec_file and fbsd_find_memory_regions.
1946 * amd64fbsd-nat.c (_initialize_amd64fbsd_nat): Use fbsd_nat_add_target.
1947 * i386fbsd-nat.c (_initialize_i386fbsd_nat): Likewise.
1948 * ppcfbsd-nat.c (_initialize_ppcfbsd_nat): Likewise.
1949 * sparc64fbsd-nat.c (_initialize_sparc64fbsd_nat): Likewise.
1953 * objfiles.c (allocate_objfile): Do not attempt to expand name
1954 if name is a "target:" filename.
1955 * auto-load.c (load_auto_scripts_for_objfile): Do not attempt
1956 to load auto-load scripts for objfiles with "target:" filenames.
1960 * s390-linux-tdep.c: Include "elf/s390.h" and "elf-bfd.h".
1961 (enum s390_vector_abi_kind): New enum.
1962 (struct gdbarch_tdep)<vector_abi>: New field.
1963 (s390_effective_inner_type): Add parameter min_size. Stop
1964 unwrapping if the inner type is smaller than min_size.
1965 (s390_function_arg_float): Adjust call to
1966 s390_effective_inner_type.
1967 (s390_function_arg_vector): New function.
1968 (s390_function_arg_integer): Adjust comment.
1969 (struct s390_arg_state)<vr>: New field.
1970 (s390_handle_arg): Add parameter 'is_unnamed'. Pass vector
1971 arguments according to vector ABI when appropriate.
1972 (s390_push_dummy_call): Initialize the argument state's field
1973 'vr'. Adjust calls to s390_handle_arg.
1974 (s390_register_return_value): Handle vector return values.
1975 (s390_return_value): Apply the "register" return value convention
1976 to a vector when appropriate.
1977 (s390_gdbarch_init): Initialize tdep->vector_abi.
1978 * NEWS: Announce S390 vector ABI support.
1982 * s390-linux-tdep.c (s390_return_value_convention): Remove
1983 function. Inline its logic...
1984 (s390_return_value): ...here. Instead, move the handling of the
1985 "register" return value convention...
1986 (s390_register_return_value): ...here. New function.
1991 (is_float_singleton): Remove function. Move the "singleton" part
1993 (s390_effective_inner_type): ...here. New function.
1994 (is_float_like): Remove function. Inline its logic...
1995 (s390_function_arg_float): ...here.
1996 (is_pointer_like, is_integer_like, is_struct_like): Remove
1997 functions. Inline their logic...
1998 (s390_function_arg_integer): ...here.
1999 (s390_function_arg_pass_by_reference): Remove function.
2000 (extend_simple_arg): Remove function.
2001 (alignment_of): Remove function.
2002 (struct s390_arg_state): New structure.
2003 (s390_handle_arg): New function.
2004 (s390_push_dummy_call): Move parameter placement logic to the new
2005 function s390_handle_arg. Call it for calculating the stack area
2006 sizes first, and again for actually writing the parameters.
2010 * s390-linux-tdep.c (is_power_of_two): Add comment. Return
2011 false if the argument is zero.
2015 * ada-lang.c (template_to_static_fixed_type): Return input type
2016 when it is already fixed. Cache the input type itself when not
2017 creating a static fixed copy. Make it explicit that we never
2018 molestate the input type.
2019 * gdbtypes.c (resolve_dynamic_struct): Reset the
2020 TYPE_TARGET_TYPE field for resolved copies.
2024 * ada-lang.c (ada_is_tagged_type): Add call to ada_check_typedef.
2025 (ada_lookup_struct_elt_type): Remove calls to ada_check_typedef.
2026 (template_to_static_fixed_type): Call ada_check_typedef only
2031 * cli/cli-dump.c (srec_dump_command): Add internationalization
2033 (ihex_dump_command): Likewise.
2034 (tekhex_dump_command): Likewise.
2035 (binary_dump_command): Likewise.
2036 (binary_append_command): Likewise.
2040 * cli/cli-dump.c (verilog_cmdlist): New variable.
2041 (dump_verilog_memory): New function.
2042 (dump_verilog_value): New function.
2043 (verilog_dump_command): New function.
2044 (_initialize_cli_dump): Add new commands to support verilog dump
2046 * NEWS: Add entry for "dump verilog".
2050 * gdbtypes.c (print_gnat_stuff): Do not recurse on the
2051 descriptive type when there is none.
2055 * tui/tui-win.c (tui_async_resize_screen): Call
2056 rl_resize_terminal().
2060 * windows-nat.c (handle_output_debug_string): Don't change
2061 current_event.dwThreadId.
2062 (get_windows_debug_event): Use thread_id, rather than relying on
2063 current_event.dwThreadId being changed.
2067 * windows-nat.c (windows_continue): Report an error if
2068 ContinueDebugEvent() fails.
2072 * windows-nat.c (windows_resume): Fix misspelling in debug output.
2076 * windows-nat.c (get_windows_debug_event): Replace retval with
2077 thread_id throughout. Update stale comment.
2081 * windows-nat.c (get_windows_debug_event): Don't use ternary
2082 conditional operator.
2087 p-exp.y (yylex): Reorganize code to return the matched pattern
2088 for a field of this.
2092 * common/fileio.h (fileio_to_host_openflags): New declaration.
2093 * common/fileio.c (fcntl.h): New include.
2094 (fileio_to_host_openflags): New function, factored out from...
2095 * inf-child.c (inf_child_fileio_open_flags_to_host): ...here.
2100 * rl78-tdep.c (RL78_SP_ADDR): Define.
2101 (opc_reg_to_gdb_regnum): New static function.
2102 (rl78_analyze_prologue): Recognize instructions forming slightly
2103 more interesting prologues.
2109 * gdbtypes.c (is_dynamic_type_internal): Remove special handling of
2110 TYPE_CODE_REF types so that they are not considered as dynamic
2111 depending on the referenced type.
2112 (resolve_dynamic_type_internal): Likewise.
2118 * gdbtypes.c (is_dynamic_type_internal): Remove the unused
2119 "top_level" parameter.
2120 (resolve_dynamic_type_internal): Remove the unused "top_level"
2121 parameter. Update call to is_dynamic_type_internal.
2122 (is_dynamic_type): Update call to is_dynamic_type_internal.
2123 (resolve_dynamic_range): Update call to
2124 resolve_dynamic_type_internal.
2125 (resolve_dynamic_union): Likewise.
2126 (resolve_dynamic_struct): Likewise.
2127 (resolve_dynamic_type): Likewise.
2131 * breakpoint.c (update_dprintf_command_list): Remove duplicated
2136 * reply_mig_hack.awk: Robustify parsing.
2138 * reply_mig_hack.awk: Don't bother to declare an intermediate
2139 function pointer variable.
2143 * solib-svr4.c (svr4_exec_displacement): Rename outer "displacement"
2144 to "exec_displacement" to avoid confusion with inner use of the name.
2148 * arm-linux-nat.c (arm_linux_can_use_hw_breakpoint): Return zero
2149 if HW point of TYPE isn't supported.
2154 * target.h (target_can_use_hardware_watchpoint): Update comments.
2155 Remove trailing ";".
2159 * remote.c (remote_add_inferior): New argument try_open_exec.
2160 If nonzero, attempt to open the inferior's executable file as
2161 the main executable if no main executable is open already.
2162 All callers updated.
2163 * NEWS: Mention that GDB now supports automatic location and
2164 retrieval of executable + files from remote targets.
2168 * target.h (TARGET_OBJECT_EXEC_FILE): New enum value.
2169 * remote.c (PACKET_qXfer_exec_file): Likewise.
2170 (remote_protocol_features): Register the
2171 "qXfer:exec-file:read" feature.
2172 (remote_xfer_partial): Handle TARGET_OBJECT_EXEC_FILE.
2173 (remote_pid_to_exec_file): New function.
2174 (init_remote_ops): Initialize to_pid_to_exec_file.
2175 (_initialize_remote): Register new "set/show remote
2176 pid-to-exec-file-packet" command.
2177 * NEWS: Announce new qXfer:exec-file:read packet.
2181 * nat/linux-procfs.h (linux_proc_pid_to_exec_file):
2183 * nat/linux-procfs.c (linux_proc_pid_to_exec_file):
2184 New function, factored out from...
2185 * linux-nat.c (linux_child_pid_to_exec_file): ...here.
2189 * exec.c (solist.h): New include.
2190 (exec_file_locate_attach): Prefix absolute executable
2191 paths with gdb_sysroot if set.
2192 * NEWS: Mention that executable paths may be prepended
2197 * solist.h (exec_file_find): New declaration.
2198 * solib.c (solib_find_1): New function, factored out from...
2199 (solib_find): ...here.
2200 (exec_file_find): New function.
2204 * gdbcore.h (exec_file_locate_attach): New declaration.
2205 * exec.c (exec_file_locate_attach): New function, factored
2207 * infcmd.c (attach_command_post_wait): ...here.
2211 * MAINTAINERS: Add myself for Blackfin/write-after-approval.
2215 * infrun.c (maybe_software_singlestep): Declare.
2216 (displaced_step_fixup): Call maybe_software_singlestep.
2220 * psymtab.c (psym_expand_symtabs_matching): Add QUIT call.
2224 * dwarf2read.c (dw2_expand_symtabs_matching): Add some QUIT calls.
2228 * python/lib/gdb/command/unwinders.py: Add parentheses.
2232 * arm-linux-tdep.c (arm_linux_copy_svc): Update debug message.
2236 * arm-linux-tdep.c (arm_linux_copy_svc): Fix indentation.
2240 * arm-linux-tdep.c (arm_linux_cleanup_svc): Use
2241 dsc->insn_size instead of 4.
2245 * jit.c (mem_bfd_iovec_stat): Zero supplied buffer.
2246 * minidebug.c (lzma_stat): Likewise.
2247 * solib-spu.c (spu_bfd_iovec_stat): Likewise.
2248 * spu-linux-nat.c (spu_bfd_iovec_stat): Likewise.
2252 * MAINTAINERS: Update my email address.
2256 * amd64-tdep.c (amd64_target_description): New function.
2257 * amd64-tdep.h: Export amd64_target_description and tdesc_amd64.
2258 * amd64bsd-nat.c [PT_GETXSTATE_INFO]: New variable amd64bsd_xsave_len.
2259 (amd64bsd_fetch_inferior_registers) [PT_GETXSTATE_INFO]: Handle
2260 x86 extended save area.
2261 (amd64bsd_store_inferior_registers) [PT_GETXSTATE_INFO]: Likewise.
2262 * amd64bsd-nat.h: Export amd64bsd_xsave_len.
2263 * amd64fbsd-nat.c (amd64fbsd_read_description): New function.
2264 (_initialize_amd64fbsd_nat): Set "to_read_description" to
2265 "amd64fbsd_read_description".
2266 * amd64fbsd-tdep.c (amd64fbsd_core_read_description): New function.
2267 (amd64fbsd_supply_xstateregset): New function.
2268 (amd64fbsd_collect_xstateregset): New function.
2269 Add "amd64fbsd_xstateregset".
2270 (amd64fbsd_iterate_over_regset_sections): New function.
2271 (amd64fbsd_init_abi): Set "xsave_xcr0_offset" to
2272 "I386_FBSD_XSAVE_XCR0_OFFSET".
2273 Add "iterate_over_regset_sections" gdbarch method.
2274 Add "core_read_description" gdbarch method.
2275 * i386-tdep.c (i386_target_description): New function.
2276 * i386-tdep.h: Export i386_target_description and tdesc_i386.
2277 * i386bsd-nat.c [PT_GETXSTATE_INFO]: New variable i386bsd_xsave_len.
2278 (i386bsd_fetch_inferior_registers) [PT_GETXSTATE_INFO]: Handle
2279 x86 extended save area.
2280 (i386bsd_store_inferior_registers) [PT_GETXSTATE_INFO]: Likewise.
2281 * i386bsd-nat.h: Export i386bsd_xsave_len.
2282 * i386fbsd-nat.c (i386fbsd_read_description): New function.
2283 (_initialize_i386fbsd_nat): Set "to_read_description" to
2284 "i386fbsd_read_description".
2285 * i386fbsd-tdep.c (i386fbsd_core_read_xcr0): New function.
2286 (i386fbsd_core_read_description): New function.
2287 (i386fbsd_supply_xstateregset): New function.
2288 (i386fbsd_collect_xstateregset): New function.
2289 Add "i386fbsd_xstateregset".
2290 (i386fbsd_iterate_over_regset_sections): New function.
2291 (i386fbsd4_init_abi): Set "xsave_xcr0_offset" to
2292 "I386_FBSD_XSAVE_XCR0_OFFSET".
2293 Add "iterate_over_regset_sections" gdbarch method.
2294 Add "core_read_description" gdbarch method.
2295 * i386fbsd-tdep.h: New file.
2299 * NEWS (Changes since GDB 7.9): Add removed -xdb.
2300 * breakpoint.c (command_line_is_silent): Remove xdb_commands
2302 (_initialize_breakpoint): Remove xdb_commands for bc, ab, sb, db, ba
2304 * cli/cli-cmds.c (_initialize_cli_cmds): Remove xdb_commands for v and
2306 * cli/cli-decode.c (find_command_name_length): Remove xdb_commands
2308 * defs.h (xdb_commands): Remove declaration.
2309 * f-valprint.c (_initialize_f_valprint): Remove xdb_commands for lc.
2310 * guile/scm-cmd.c (command_classes): Remove xdb from comment.
2311 * infcmd.c (run_no_args_command, go_command): Remove.
2312 (_initialize_infcmd): Remove xdb_commands for S, go, g, R and lr.
2313 * infrun.c (xdb_handle_command): Remove.
2314 (_initialize_infrun): Remove xdb_commands for lz and z.
2315 * main.c (xdb_commands): Remove variable.
2316 (captured_main): Remove "xdb" from long_options.
2317 (print_gdb_help): Remove --xdb from help.
2318 * python/py-cmd.c (gdbpy_initialize_commands): Remove xdb from comment.
2319 * source.c (_initialize_source): Remove xdb_commands for D, ld, / and ?.
2320 * stack.c (backtrace_full_command, args_plus_locals_info)
2321 (current_frame_command): Remove.
2322 (_initialize_stack): Remove xdb_commands for t, T and l.
2323 * symtab.c (_initialize_symtab): Remove xdb_commands for lf and lg.
2324 * thread.c (_initialize_thread): Remove xdb_commands condition.
2325 * tui/tui-layout.c (tui_toggle_layout_command)
2326 (tui_toggle_split_layout_command, tui_handle_xdb_layout): Remove.
2327 (_initialize_tui_layout): Remove xdb_commands for td and ts.
2328 * tui/tui-regs.c (tui_scroll_regs_forward_command)
2329 (tui_scroll_regs_backward_command): Remove.
2330 (_initialize_tui_regs): Remove xdb_commands for fr, gr, sr, +r and -r.
2331 * tui/tui-win.c (tui_xdb_set_win_height_command): Remove.
2332 (_initialize_tui_win): Remove xdb_commands for U and w.
2333 * utils.c (pagination_on_command, pagination_off_command): Remove.
2334 (initialize_utils): Remove xdb_commands for am and sm.
2338 * infrun.c (displaced_step_fixup): Switch to the event ptid
2339 earlier. If the thread stopped for a watchpoint and the
2340 target/arch has non-continuable watchpoints, cancel the displaced
2342 (resume): Don't start a displaced step if in-line step-over info
2347 * infrun.c (displaced_step_in_progress): New function.
2348 (do_target_resume): Advise target to report all signals if
2354 * infrun.c (process_event_stop_test): Don't assume a step-resume
2355 is set if tp->stepped_breakpoint is true.
2359 * arm-tdep.c (install_alu_reg): Update comment.
2360 (thumb_copy_alu_reg): Remove local variable rn. Update
2361 debugging message. Use r2 instead of r1 in the modified
2367 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Install
2368 linux_displaced_step_location as gdbarch_displaced_step_location
2370 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
2371 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2372 * linux-tdep.c (linux_displaced_step_location): New function,
2373 based on ppc_linux_displaced_step_location.
2374 * linux-tdep.h (linux_displaced_step_location): New declaration.
2375 * ppc-linux-tdep.c (ppc_linux_entry_point_addr): Delete.
2376 (ppc_linux_inferior_created, ppc_linux_displaced_step_location):
2378 (ppc_linux_init_abi): Install linux_displaced_step_location as
2379 gdbarch_displaced_step_location hook, even without Cell/B.E..
2380 (_initialize_ppc_linux_tdep): Don't install
2381 ppc_linux_inferior_created as inferior_created observer.
2382 * s390-linux-tdep.c (s390_gdbarch_init): Install
2383 linux_displaced_step_location as gdbarch_displaced_step_location
2388 * common/common-remote-fileio.h: Rename to...
2389 * common/fileio.h: ...this. Update all references.
2390 (remote_fileio_to_fio_error): Rename to...
2391 (host_to_fileio_error): ...this.
2392 (remote_fileio_to_be): Rename to...
2393 (host_to_bigendian): ...this. Update all callers.
2394 (remote_fileio_to_fio_uint): Rename to...
2395 (host_to_fileio_uint): ...this. Update all callers.
2396 (remote_fileio_to_fio_time): Rename to...
2397 (host_to_fileio_time): ...this. Update all callers.
2398 (remote_fileio_to_fio_stat): Rename to...
2399 (host_to_fileio_stat): ...this.
2400 Update all references.
2401 * common/common-remote-fileio.c: Rename to...
2402 * common/fileio.c: ...this. Update all references.
2403 (remote_fileio_to_fio_error): Rename to...
2404 (host_to_fileio_error): ...this. Update all callers.
2405 (remote_fileio_mode_to_target): Rename to...
2406 (fileio_mode_pack): ...this. Update all callers.
2407 (remote_fileio_to_fio_mode): Rename to...
2408 (host_to_fileio_mode): ...this. Update all callers.
2409 (remote_fileio_to_fio_ulong): Rename to...
2410 (host_to_fileio_ulong): ...this. Update all callers.
2411 (remote_fileio_to_fio_stat): Rename to...
2412 (host_to_fileio_stat): ...this. Update all callers.
2416 * guile/scm-frame.c (gdbscm_frame_read_register): New function.
2417 (frame_functions): Bind gdbscm_frame_read_register to
2418 frame-read-register.
2419 * guile/lib/gdb.scm (frame-read-register): Export.
2423 * common/common-remote-fileio.h (remote_fileio_to_fio_error):
2425 * common/common-remote-fileio.c (remote_fileio_to_fio_error):
2426 New function, factored out the named functions below.
2427 * inf-child.c (gdb/fileio.h): Remove include.
2428 (common-remote-fileio.h): New include.
2429 (inf_child_errno_to_fileio_error): Remove function. Update
2430 all callers to use remote_fileio_to_fio_error.
2431 * remote-fileio.c (remote_fileio_errno_to_target): Likewise.
2435 * MAINTAINERS (Write After Approval): Add Andy Wingo.
2439 * acinclude.m4: (GDB_AC_CHECK_BFD): Set ZLIBDIR with $zlibdir.
2440 Replace $zlibdir with $ZLIBDIR in LDFLAGS.
2441 * configure: Regenerated.
2445 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add strtok_r.
2446 * gnulib/Makefile.in (aclocal_m4_deps): Add import/m4/strtok_r.m4.
2447 * gnulib/configure, gnulib/config.in, gnulib/aclocal.m4: Regenerate.
2448 * gnulib/import/Makefile.am: Update.
2449 * gnulib/import/Makefile.in: Update.
2450 * gnulib/import/m4/gnulib-cache.m4: Update.
2451 * gnulib/import/m4/gnulib-comp.m4: Update.
2452 * gnulib/import/m4/strtok_r.m4: New file.
2453 * gnulib/import/strtok_r.c: New file.
2457 * gnulib/update-gnulib.sh (aclocal version check): Filter out
2458 "called too early to check prototype".
2463 * python/py-cmd.c (cmdpy_completer_helper): Adjust function to not
2464 use a caching mechanism. Adjust comments and code to reflect
2465 that. Replace 'sizeof' by 'strlen' when fetching 'wordobj'.
2466 (cmdpy_completer_handle_brkchars): Adjust call to
2467 cmdpy_completer_helper. Call Py_XDECREF for 'resultobj'.
2468 (cmdpy_completer): Likewise.
2472 * spu-tdep.c (spu_gdbarch_init): Don't call
2473 set_gdbarch_cannot_step_breakpoint.
2477 * linux-tdep.c (decode_vmflags): Initialize 'saveptr'.
2481 * gdbthread.h (ALL_NON_EXITED_THREADS_SAFE): Rename to ...
2482 (ALL_THREADS_SAFE): ... this, and don't skip exited threads.
2483 (delete_exited_threads): New declaration.
2484 * infrun.c (follow_exec): Use ALL_THREADS_SAFE.
2485 * linux-nat.c (linux_nat_update_thread_list): New function.
2486 (linux_nat_add_target): Install it.
2487 * remote.c (remote_update_thread_list): Use ALL_THREADS_SAFE.
2488 * thread.c (prune_threads): Use ALL_THREADS_SAFE.
2489 (delete_exited_threads): New function.
2493 * infrun.c (resume) <displaced stepping debug output>: Get the
2494 leader thread's regcache, not resume_ptid's.
2498 * symtab.c (hash_symbol_entry): Hash STRUCT_DOMAIN symbols as
2500 (symbol_cache_lookup): Clarify use of bsc_ptr, slot_ptr parameters.
2501 Include symbol domain in debugging output.
2506 * configure.ac: Remove the mingw32-specific stub-termcap.o
2507 fallback, and instead fallback to the stub termcap on all hosts.
2508 * configure: Regenerate.
2509 * stub-termcap.c [!__MINGW32__] (PC, BC, UP): Define as weak
2514 * gdbtypes.c (is_dynamic_type_internal): Remove the unused
2515 "top_level" parameter.
2516 (resolve_dynamic_type_internal): Remove the unused "top_level"
2517 parameter. Update call to is_dynamic_type_internal.
2518 (is_dynamic_type): Update call to is_dynamic_type_internal.
2519 (resolve_dynamic_range): Update call to
2520 resolve_dynamic_type_internal.
2521 (resolve_dynamic_union): Likewise.
2522 (resolve_dynamic_struct): Likewise.
2523 (resolve_dynamic_type): Likewise.
2527 * gdbtypes.c (is_dynamic_type_internal): Remove special handling of
2528 TYPE_CODE_REF types so that they are not considered as dynamic
2529 depending on the referenced type.
2530 (resolve_dynamic_type_internal): Likewise.
2534 * Makefile.in (top_srcdir): New.
2535 * configure: Regenerated.
2539 * NEWS: Announce the new default sysroot of "target:".
2543 * main.c (captured_main): Set gdb_sysroot to "target:"
2544 if not otherwise set.
2548 * exec.c (exec_file_attach): Support "target:" filenames.
2552 * solib.c (solib_find): Strip "target:" prefix from sysroot
2553 if accessing local files.
2557 * symfile.c (symfile_bfd_open): Reorder to remove duplicated
2558 checks and error messages.
2562 * remote.h (REMOTE_SYSROOT_PREFIX): Remove definition.
2563 (remote_filename_p): Remove declaration.
2564 (remote_bfd_open): Likewise.
2565 * remote.c (remote_bfd_iovec_open): Remove function.
2566 (remote_bfd_iovec_close): Likewise.
2567 (remote_bfd_iovec_pread): Likewise.
2568 (remote_bfd_iovec_stat): Likewise.
2569 (remote_filename_p): Likewise.
2570 (remote_bfd_open): Likewise.
2571 * symfile.h (gdb_bfd_open_maybe_remote): Remove declaration.
2572 * symfile.c (separate_debug_file_exists): Use gdb_bfd_open.
2573 (gdb_bfd_open_maybe_remote): Remove function.
2574 (symfile_bfd_open): Replace remote filename check with
2575 target filename check.
2576 (reread_symbols): Use gdb_bfd_open.
2577 * build-id.c (gdbcore.h): New include.
2578 (build_id_to_debug_bfd): Use gdb_bfd_open.
2579 * infcmd.c (attach_command_post_wait): Remove remote filename
2581 * solib.c (solib_find): Replace remote-specific handling with
2582 target-specific handling. Update comments where necessary.
2583 (solib_bfd_open): Replace remote-specific handling with
2584 target-specific handling.
2585 (gdb_sysroot_changed): New function.
2586 (_initialize_solib): Call the above when gdb_sysroot changes.
2587 * windows-tdep.c (gdbcore.h): New include.
2588 (windows_xfer_shared_library): Use gdb_bfd_open.
2592 * gdb/gdb_bfd.h (TARGET_SYSROOT_PREFIX): New definition.
2593 (is_target_filename): New declaration.
2594 (gdb_bfd_has_target_filename): Likewise.
2595 (gdb_bfd_open): Update documentation comment.
2596 * gdb_bfd.c (target.h): New include.
2597 (gdb/fileio.h): Likewise.
2598 (is_target_filename): New function.
2599 (gdb_bfd_has_target_filename): Likewise.
2600 (fileio_errno_to_host): Likewise.
2601 (gdb_bfd_iovec_fileio_open): Likewise.
2602 (gdb_bfd_iovec_fileio_pread): Likewise.
2603 (gdb_bfd_iovec_fileio_close): Likewise.
2604 (gdb_bfd_iovec_fileio_fstat): Likewise.
2605 (gdb_bfd_open): Use target fileio to access paths prefixed
2606 with "target:" where necessary.
2610 * target.h (struct target_ops) <to_filesystem_is_local>:
2612 (target_filesystem_is_local): New macro.
2613 * target-delegates.c: Regenerate.
2614 * remote.c (remote_filesystem_is_local): New function.
2615 (init_remote_ops): Initialize to_filesystem_is_local.
2619 * target.h (struct target_ops) <to_fileio_fstat>: New field.
2620 (target_fileio_fstat): New declaration.
2621 * target.c (target_fileio_fstat): New function.
2622 * inf-child.c (inf_child_fileio_fstat): Likewise.
2623 (inf_child_target): Initialize to_fileio_fstat.
2624 * remote.c (init_remote_ops): Likewise.
2628 * Makefile.in (SUBDIR_PYTHON_OBJS): Add py-unwind.o.
2629 (SUBDIR_PYTHON_SRCS): Add py-unwind.c.
2630 (py-unwind.o): New recipe.
2631 * NEWS: mention Python frame unwinding.
2632 * data-directory/Makefile.in (PYTHON_FILE_LIST): Add
2633 gdb/unwinder.py and gdb/command/unwinder.py
2634 * python/lib/gdb/__init__.py (packages): Add frame_unwinders
2636 (execute_unwinders): New function.
2637 * python/lib/gdb/command/unwinders.py: New file.
2638 * python/lib/gdb/unwinder.py: New file.
2639 * python/py-objfile.c (objfile_object): Add frame_unwinders field.
2640 (objfpy_dealloc): Decrement frame_unwinders reference count.
2641 (objfpy_initialize): Create frame_unwinders list.
2642 (objfpy_get_frame_unwinders): New function.
2643 (objfpy_set_frame_unwinders): Ditto.
2644 (objfile_getset): Add frame_unwinders attribute to Objfile.
2645 * python/py-progspace.c (pspace_object): Add frame_unwinders field.
2646 (pspy_dealloc): Decrement frame_unwinders reference count.
2647 (pspy_initialize): Create frame_unwinders list.
2648 (pspy_get_frame_unwinders): New function.
2649 (pspy_set_frame_unwinders): Ditto.
2650 (pspy_getset): Add frame_unwinders attribute to gdb.Progspace.
2651 * python/py-unwind.c: New file.
2652 * python/python-internal.h (pspy_get_name_unwinders): New prototype.
2653 (objpy_get_frame_unwinders): New prototype.
2654 (gdbpy_initialize_unwind): New prototype.
2655 * python/python.c (gdbpy_apply_type_printers): Call
2656 gdbpy_initialize_unwind.
2660 * infrun.c (resume): Check currently_stepping after clearing
2661 stepped_breakpoint, not before.
2665 * infrun.c (print_target_wait_results): Print all the ptid
2670 * infrun.c (keep_going): Also discard cleanups if inserting
2675 * infrun.c (wait_for_inferior): Install the
2676 finish_thread_state_cleanup cleanup across the whole function, not
2677 just around handle_inferior_event.
2681 * infrun.c (resume) <step past permanent breakpoint>: Use
2686 * linux-nat.c (linux_handle_extended_wait): Always call set_running.
2690 * MAINTAINERS (Write After Approval): Add "Pierre-Marie de Rodat".
2694 * linux-thread-db.c (record_thread): Readd the thread to gdb's
2695 list if it was marked exited.
2699 * configure: Regenerated.
2706 * linux-tdep.c: Include 'gdbcmd.h' and 'gdb_regex.h'.
2707 New enum identifying the various options of the coredump_filter
2709 (struct smaps_vmflags): New struct.
2710 (use_coredump_filter): New variable.
2711 (decode_vmflags): New function.
2712 (mapping_is_anonymous_p): Likewise.
2713 (dump_mapping_p): Likewise.
2714 (linux_find_memory_regions_full): New variables
2715 'coredumpfilter_name', 'coredumpfilterdata', 'pid', 'filterflags'.
2716 Removed variable 'modified'. Read /proc/<PID>/smaps file; improve
2717 parsing of its information. Implement memory mapping filtering
2718 based on its contents.
2719 (show_use_coredump_filter): New function.
2720 (_initialize_linux_tdep): New command 'set use-coredump-filter'.
2721 * NEWS: Mention the possibility of using the
2722 '/proc/PID/coredump_filter' file when generating a corefile.
2723 Mention new command 'set use-coredump-filter'.
2727 * solib-svr4.c (solib_svr4_r_ldsomap): Catch possible exception by
2728 read_memory_unsigned_integer.
2732 * Makefile.in (ZLIB): New.
2733 (ZLIBINC): Likewise.
2734 (INTERNAL_CFLAGS_BASE): Add $(ZLIBINC).
2735 (CLIBS): Add $(ZLIB).
2736 * acinclude.m4: (GDB_AC_CHECK_BFD): Add $zlibdir to LDFLAGS.
2738 * gdb_bfd.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
2739 * top.c (print_gdb_configuration): Remove --with-zlib and
2741 * config.in: Regenerated.
2742 * configure: Likewise.
2746 * NEWS: Mention info os cpus support.
2747 * gdb/nat/linux-osdata.c (linux_xfer_osdata_cpus): New function.
2748 (struct osdata_type): Add cpus entry, reorder the entries in
2753 * compile/compile.c (compile_to_object): Allow triplets with or
2759 * cp-namespace.c (cp_search_static_and_baseclasses): Always look for
2760 klass in VAR_DOMAIN.
2764 * remote.c (remote_mourn_1): Remove function. Update all callers
2765 to use remote_mourn.
2766 (extended_remote_mourn_1): Remove function. Update all callers
2767 to use extended_remote_mourn.
2768 (extended_remote_attach_1): Remove function. Update all callers
2769 to use extended_remote_attach.
2773 * Makefile.in (ALL_TARGET_OBS): Add ft32-tdep.o.
2774 (HFILES_NO_SRCDIR): Add ft32-tdep.h.
2775 (ALLDEPFILES): Add ft32-tdep.c.
2776 * configure.tgt: Add FT32 entry.
2777 * ft32-tdep.c: New file, FT32 target-dependent code.
2778 * ft32-tdep.h: New file, FT32 target-dependent code.
2785 * printcmd.c (print_command_1): Move expr variable scope.
2789 * dtrace-probe.c (dtrace_process_dof_probe): Initialize expr to NULL.
2793 * gdb_bfd.c (gdb_bfd_section_index): Fix off-by-one for special
2798 * dtrace-probe.c (dtrace_process_dof_probe): Contain any
2799 exception raised while parsing the probe arguments.
2800 Force parsing to be done using the C language parser.
2801 * expression.h (parse_expression_with_language): Declare.
2802 * parse.c (parse_expression_with_language): New function.
2806 * MAINTAINERS (Write After Approval): Add "Jon Turney".
2811 * dwarf2read.c (struct partial_die_info): Add has_const_value
2813 (add_partial_symbol): Don't punt on symbols that have const_value
2815 (read_partial_die): Detect DW_AT_const_value.
2820 * printcmd.c (print_command_1): Move expr variable scope.
2825 * printcmd.c (validate_format): Make the parameter cmdname const.
2829 * remote.c (_initialize_remote): Update comment.
2834 * coffread.c (coff_symfile_read): When constructing the name of an
2835 import stub symbol from import symbol for amd64, only skip the
2836 char after _imp_ if the target is underscored (like i386) and the
2837 char is indeed the target's leading char.
2841 * target.h <to_async>: Replace 'callback' and 'context' parameters
2842 with boolean 'enable' parameter.
2843 (target_async): Replace CALLBACK and CONTEXT parameters with
2844 boolean ENABLE parameter.
2845 * inf-loop.c (inferior_event_handler): Adjust.
2846 * linux-nat.c (linux_nat_attach, linux_nat_resume)
2847 (linux_nat_resume): Adjust.
2848 (async_client_callback, async_client_context): Delete.
2849 (handle_target_event): Call inferior_event_handler directly.
2850 (linux_nat_async): Replace 'callback' and 'context' parameters
2851 with boolean 'enable' parameter. Adjust. Remove references to
2852 async_client_callback and async_client_context.
2853 (linux_nat_close): Adjust.
2854 * record-btrace.c (record_btrace_async): Replace 'callback' and
2855 'context' parameters with boolean 'enable' parameter. Adjust.
2856 (record_btrace_resume): Adjust.
2857 * record-full.c (record_full_async): Replace 'callback' and
2858 'context' parameters with boolean 'enable' parameter. Adjust.
2859 (record_full_resume, record_full_core_resume): Adjust.
2860 * remote.c (struct remote_state) <async_client_callback,
2861 async_client_context>: Delete fields.
2862 (remote_start_remote, extended_remote_attach_1, remote_resume)
2863 (extended_remote_create_inferior): Adjust.
2864 (remote_async_serial_handler): Call inferior_event_handler
2866 (remote_async): Replace 'callback' and 'context' parameters with
2867 boolean 'enable' parameter. Adjust.
2868 * top.c (gdb_readline_wrapper_cleanup, gdb_readline_wrapper):
2870 * target-delegates.c: Regenerate.
2875 * target.c (fileio_ft_t): New typedef, define object vector.
2876 (fileio_fhandles): New static variable.
2877 (is_closed_fileio_fh): New macro.
2878 (lowest_closed_fd): New static variable.
2879 (acquire_fileio_fd): New function.
2880 (release_fileio_fd): Likewise.
2881 (fileio_fd_to_fh): New macro.
2882 (target_fileio_open): Wrap the file descriptor on success.
2883 (target_fileio_pwrite): Updated to use wrapped file descriptor.
2884 (target_fileio_pread): Likewise.
2885 (target_fileio_close): Likewise.
2889 * thread.c (thread_apply_all_command): Take exited threads into
2894 * infrun.c (resume, proceed): Mention
2895 switch_back_to_stepped_thread, not switch_back_to_stepping.
2899 * infrun.c (user_visible_resume_ptid): Rewrite going from
2900 most-locked to unlocked instead of the opposite. Move comment ...
2901 * infrun.h (user_visible_resume_ptid): ... here.
2905 * linux-nat.c (linux_nat_resume): Output debug logs before trying
2906 to resume the event lwp. Use the lwp's ptid instead of the passed
2907 in (maybe wildcard) ptid.
2908 (stop_wait_callback): Tweak debug log output.
2909 (check_stopped_by_breakpoint): Tweak debug log output. Also dump
2911 (linux_nat_filter_event): In debug output, distinguish a
2912 resume_stop SIGSTOP from a delayed SIGSTOP. Output debug logs
2913 before trying to resume the lwp.
2917 * gdbtypes.h (struct dynamic_prop_list) <prop>: Remove
2918 pointer indirection.
2919 * gdbtypes.c (get_dyn_prop): Adjust, following change above.
2920 (add_dyn_prop, copy_dynamic_prop_list): Likewise.
2924 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_DATA_LOCATION>:
2925 Renames DYN_ATTR_DATA_LOCATION.
2926 (TYPE_DATA_LOCATION): Use DYN_PROP_DATA_LOCATION instead of
2927 DYN_ATTR_DATA_LOCATION.
2928 * dwarf2read.c (set_die_type): Use DYN_PROP_DATA_LOCATION
2929 instead of DYN_ATTR_DATA_LOCATION.
2933 * breakpoint.c (until_break_command): Adjust call to proceed.
2934 * gdbthread.h (struct thread_control_state) <stepping_command>:
2936 * infcall.c (run_inferior_call): Adjust call to proceed.
2937 * infcmd.c (run_command_1, proceed_thread_callback, continue_1):
2938 Adjust calls to proceed.
2939 (set_step_frame): Set the current thread's step_start_function
2941 (step_once): Adjust calls to proceed.
2942 (jump_command, signal_command, until_next_command)
2943 (finish_backward, finish_forward, proceed_after_attach_callback)
2944 (attach_command_post_wait): Adjust calls to proceed.
2945 * infrun.c (proceed_after_vfork_done): Adjust call to proceed.
2946 (do_target_resume): New function, factored out from ...
2947 (resume): ... here. Remove 'step' parameter. Instead, check
2948 currently_stepping to determine whether the thread should be
2950 (proceed): Remove 'step' parameter and don't set the thread's
2951 step_start_function here. Adjust call to 'resume'.
2952 (handle_inferior_event): Adjust calls to 'resume'.
2953 (switch_back_to_stepped_thread): Use do_target_resume instead of
2955 (keep_going): Adjust calls to 'resume'.
2956 * infrun.h (proceed): Remove 'step' parameter.
2958 * windows-nat.c (do_initial_windows_stuff): Adjust call to
2960 * mi/mi-main.c (proceed_thread): Adjust call to 'proceed'.
2964 * gdbthread.h (struct thread_control_state) <stepping_command>:
2966 * infcmd.c (step_once): Pass step=1 to clear_proceed_status. Set
2967 the thread's stepping_command field.
2968 * infrun.c (resume): Check the thread's stepping_command flag to
2969 determine which threads should be resumed. Rename 'entry_step'
2971 (clear_proceed_status_thread): Clear 'stepping_command'.
2972 (schedlock_applies): Change parameter type to struct thread_info
2974 (find_thread_needs_step_over): Remove 'step' parameter. Adjust.
2975 (switch_back_to_stepped_thread): Adjust calls to
2976 'schedlock_applies'.
2977 (_initialize_infrun): Adjust "set scheduler-locking step" help.
2981 * infrun.c (step_start_function): Delete and ...
2982 * gdbthread.h (struct thread_control_state) <step_start_function>:
2983 ... now a field here.
2984 * infrun.c (clear_proceed_status_thread): Clear the thread's
2985 step_start_function.
2986 (proceed, process_event_stop_test, print_stop_event): Adjust.
2990 * infrun.c (proceed): No longer handle negative step.
2994 * nat/x86-linux.h (x86_linux_new_thread): New declaration.
2995 (x86_linux_prepare_to_resume): Likewise.
2996 * x86-linux-nat.c (x86_linux_new_thread):
2997 Moved to nat/x86-linux.c.
2998 (x86_linux_prepare_to_resume): Likewise.
2999 * nat/x86-linux.c (x86_linux_new_thread): New function.
3000 (x86_linux_prepare_to_resume): Likewise.
3004 * nat/x86-linux-dregs.h: New file.
3005 * nat/x86-linux-dregs.c: Likewise.
3006 * Makefile.in (HFILES_NO_SRCDIR): Add nat/x86-linux-dregs.h.
3007 (x86-linux-dregs.o): New rule.
3008 * config/i386/linux.mh (NATDEPFILES): Add x86-linux-dregs.o.
3009 * config/i386/linux64.mh (NATDEPFILES): Likewise.
3010 * x86-linux-nat.c: Include nat/x86-linux-dregs.h.
3011 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3012 (x86_linux_dr_get): Likewise.
3013 (x86_linux_dr_set): Likewise.
3014 (x86_linux_dr_get_addr): Likewise.
3015 (x86_linux_dr_get_control): Likewise.
3016 (x86_linux_dr_get_status): Likewise.
3017 (update_debug_registers_callback): Likewise.
3018 (x86_linux_dr_set_control): Likewise.
3019 (x86_linux_dr_set_addr): Likewise.
3020 (x86_linux_update_debug_registers): Likewise.
3024 * x86-linux-nat.c (x86_linux_update_debug_registers):
3025 New function, factored out from...
3026 (x86_linux_prepare_to_resume): ...this.
3030 * x86-linux-nat.c (x86_linux_dr_get): Update comments.
3031 (x86_linux_dr_set): Likewise.
3032 (x86_linux_dr_get_addr): Likewise.
3033 (x86_linux_dr_get_control): Likewise.
3034 (x86_linux_dr_get_status): Likewise.
3035 (update_debug_registers_callback): Likewise.
3036 (x86_linux_dr_set_control): Likewise.
3037 (x86_linux_dr_set_addr): Likewise.
3038 (x86_linux_prepare_to_resume): Likewise.
3039 (x86_linux_new_thread): Likewise.
3043 * x86-linux-nat.c (x86_linux_dr_set_addr): Update assertion.
3044 (x86_linux_new_thread): Rename argument.
3048 * nat/x86-linux.h: New file.
3049 * nat/x86-linux.c: Likewise.
3050 * Makefile.in (HFILES_NO_SRCDIR): Add nat/x86-linux.h.
3051 (x86-linux.o): New rule.
3052 * config/i386/linux.mh (NATDEPFILES): Add x86-linux.o.
3053 * config/i386/linux64.mh (NATDEPFILES): Likewise.
3054 * nat/linux-nat.h (struct arch_lwp_info): New forward declaration.
3055 (lwp_set_arch_private_info): New declaration.
3056 (lwp_arch_private_info): Likewise.
3057 * linux-nat.c (lwp_set_arch_private_info): New function.
3058 (lwp_arch_private_info): Likewise.
3059 * x86-linux-nat.c: Include nat/x86-linux.h.
3060 (arch_lwp_info): Removed structure.
3061 (update_debug_registers_callback):
3062 Use lwp_set_debug_registers_changed.
3063 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3064 and lwp_set_debug_registers_changed.
3065 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3069 * nat/linux-nat.h (ptid_of_lwp): New declaration.
3070 (lwp_is_stopped): Likewise.
3071 (lwp_stop_reason): Likewise.
3072 * linux-nat.c (ptid_of_lwp): New function.
3073 (lwp_is_stopped): Likewise.
3074 (lwp_is_stopped_by_watchpoint): Likewise.
3075 * x86-linux-nat.c (update_debug_registers_callback):
3077 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3082 * linux-nat.h (linux_stop_lwp): Move declaration to...
3083 * nat/linux-nat.h (linux_stop_lwp): New declaration.
3087 * linux-nat.h: Include nat/linux-nat.h.
3088 (iterate_over_lwps): Move declaration to nat/linux-nat.h.
3089 * nat/linux-nat.h (struct lwp_info): New forward declaration.
3090 (iterate_over_lwps_ftype): New typedef.
3091 (iterate_over_lwps): New declaration.
3092 * linux-nat.h (iterate_over_lwps): Update comment. Use
3093 iterate_over_lwps_ftype. Update callback return value check.
3097 * x86-nat.h (x86_debug_reg_state): Move declaration to...
3098 * nat/x86-dregs.h (x86_debug_reg_state): New declaration.
3102 * nat/linux-nat.h (current_lwp_ptid): New declaration.
3103 * linux-nat.c (current_lwp_ptid): New function.
3104 * x86-linux-nat.c: Include nat/linux-nat.h.
3105 (x86_linux_dr_get_addr): Use current_lwp_ptid.
3106 (x86_linux_dr_get_control): Likewise.
3107 (x86_linux_dr_get_status): Likewise.
3108 (x86_linux_dr_set_control): Likewise.
3109 (x86_linux_dr_set_addr): Likewise.
3113 PR breakpoints/16466
3114 * breakpoint.c (create_breakpoint): Set thread on breakpoint struct.
3118 * ser-mingw.c (ser_windows_setparity): Fix indentation.
3119 * ser-unix.c (hardwire_setparity): Likewise.
3123 * NEWS: Mention set/show serial parity command.
3124 * monitor.c (monitor_open): Call serial_setparity.
3125 * remote.c (remote_open_1): Likewise.
3126 * ser-base.c (ser_base_serparity): New function.
3127 * ser-base.h (ser_base_setparity): Add declaration.
3128 * ser-go32.c (dos_ops): Set "setparity" field.
3129 * ser-mingw.c (ser_windows_raw): Do not set state.fParity and
3131 (ser_windows_setparity): New function.
3132 (hardwire_ops): Add ser_windows_setparity.
3133 (tty_ops): Add NULL for setparity field.
3134 (pipe_ops): Add ser_base_setparity.
3135 (tcp_ops): Likewise.
3136 * ser-pipe.c (pipe_ops): Likewise.
3137 * ser-tcp.c (tcp_ops): Likewise.
3138 * ser-unix.c (hardwire_setparity): Add declaration.
3139 (hardwire_raw): Don't reset PARENB flag.
3140 (hardwire_setparity): New function.
3141 (hardwire_ops): Add hardwire_setparity.
3142 * serial.c (serial_setparity): New function.
3143 (serial_parity): New global.
3144 (parity_none, parity_odd, parity_even, parity_enums, parity):
3146 (set_parity): New function.
3147 (_initialize_serial): Add set/show serial parity commands.
3148 * serial.h (GDBPARITY_NONE): Define.
3149 (GDBPARITY_ODD): Define.
3150 (GDBPARITY_EVEN): Define.
3151 (serial_setparity) Add declaration.
3152 (struct serial_ops): Add setparity field.
3153 * target.h (serial_parity): Add declaration.
3157 * linespec.c (linespec_lexer_lex_keyword): Update comment.
3161 * breakpoint.c (parse_breakpoint_sals): Use
3162 linespec_lexer_lex_keyword to ascertain if the user specified
3164 * linespec.c [IF_KEYWORD_INDEX]: Define.
3165 (linespec_lexer_lex_keyword): Export.
3166 (struct ls_parser) <keyword_ok>: Remove.
3167 A keyword is only a keyword if not followed by another keyword.
3168 (linespec_lexer_lex_one): Remove keyword_ok handling.
3169 Add comment explaining why the parsing stream is not advanced
3170 when a keyword is seen.
3171 (parse_linespec): Remove parser->keyword_ok.
3172 * linespec.h (linespec_lexer_lex_keyword): Add declaration.
3177 * dwarf2read.c (dwarf2_add_member_fn): Issue a complaint
3178 if we find a static method with DW_AT_vtable_elem_location.
3182 * tui/tui-io.c (tui_expand_tabs): Reinitialize the column counter
3183 before the second loop, to avoid undefined behavior. Reported by
3188 * gdbtypes.c (resolve_dynamic_type_internal): Adapt
3189 data_location usage to linked list.
3190 (resolve_dynamic_type_internal): Adapt data_location to
3192 (get_dyn_prop, add_dyn_prop, copy_dynamic_prop_list): New function.
3193 (copy_type_recursive, copy_type): Add copy of linked list.
3194 * gdbtypes.h (enum dynamic_prop_node_kind): New enum.
3195 (struct dynamic_prop_list): New struct.
3196 * dwarf2read.c (set_die_type): Set data_location data.
3200 * i386-sol2-tdep.c (i386_sol2_static_transform_name): Move "p" to
3201 inner block and make it const.
3202 * machoread.c (get_archive_prefix_len): Make "lparen" const.
3206 * breakpoint.c (set_breakpoint_condition): Make argument "exp" const.
3207 * breakpoint.h (set_breakpoint_condition): Update declaration.
3211 * tui/tui-io.c (tui_expand_tabs): Make "s1" const.
3215 * xcoffread.c (scan_xcoff_symtab): Make "p" and "q" const.
3219 * remote-m32r-sdi.c (m32r_open): Make "port_str" const.
3223 * nto-tdep.c (nto_find_and_open_solib): Make "endian" const.
3224 (nto_init_solib_absolute_prefix): Likewise.
3228 * sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Make "p" const.
3229 * spu-tdep.c (spu_gdbarch_init): Make "name" const.
3233 * config/djgpp/README: Remove gdb.hp.
3237 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
3238 set_gdbarch_cannot_step_breakpoint.
3242 * linux-nat.c (linux_resume_one_lwp): Rename to ...
3243 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3244 instead call perror_with_name.
3245 (check_ptrace_stopped_lwp_gone): New function.
3246 (linux_resume_one_lwp): Reimplement as wrapper around
3247 linux_resume_one_lwp_throw that swallows errors if the LWP is
3249 (resume_stopped_resumed_lwps): Try register reads in TRY/CATCH and
3250 swallows errors if the LWP is gone. Use
3251 linux_resume_one_lwp_throw instead of linux_resume_one_lwp.
3255 * linux-nat.c (status_callback): Return early if the LWP has no
3260 * linux-nat.c (select_event_lwp_callback): Update comment to no
3261 longer mention SIGTRAP.
3265 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Move
3266 redirection code to ...
3267 (amd64_windows_frame_decode_insns): ... Here. Fix in prologue
3268 checks. Fix SAVE_NONVOL operations. Add debug code and comments.
3272 (remote_protocol_features): Remove the "vFile:fstat" feature.
3273 (remote_hostio_fstat): Probe for "vFile:fstat" support.
3278 * aarch64-linux-tdep.c: Include xml-syscall.h
3279 (aarch64_linux_get_syscall_number): New function.
3280 (aarch64_linux_init_abi): Call
3281 set_gdbarch_get_syscall_number.
3282 * syscalls/aarch64-linux.xml: New file.
3286 * ser-base.h (ser_base_setstopbits): Change second argument name
3287 from "rate" to "num".
3293 * common/common-remote-fileio.h (sys/stat.h): New include.
3294 (stuct stat): Remove forward declaration.
3298 * fbsd-tdep.c (fbsd_make_corefile_notes): Fetch all target registers
3299 before writing core register notes.
3304 * gdb_curses.h (tgetnum): Mark with EXTERN_C.
3305 * stub-termcap.c (tgetent, tgetnum, tgetflag, tgetstr, tputs)
3306 (tgoto): Wrap with extern "C".
3311 * stub-termcap.c (tputs): Change prototype.
3316 * windows-nat.c (struct thread_info_struct): Rename to ...
3317 (struct windows_thread_info_struct): ... this.
3318 (thread_info): Rename to ...
3319 (windows_thread_info): ... this.
3325 * NEWS: New Removed targets and native configurations.
3330 * Makefile.in (ALL_64_TARGET_OBS): Remove ia64-hpux-tdep.o.
3331 (ALL_TARGET_OBS): Remove hppa-hpux-tdep.o, solib-som.o and solib-pa64.o.
3332 (HFILES_NO_SRCDIR): Remove solib-som.h, inf-ttrace.h, solib-pa64.h and
3333 ia64-hpux-tdep.h, solib-ia64-hpux.h.
3334 (ALLDEPFILES): Remove hppa-hpux-tdep.c, hppa-hpux-nat.c,
3335 ia64-hpux-nat.c, ia64-hpux-tdep.c, somread.c and solib-som.c.
3336 * config/djgpp/fnchange.lst: Remove hppa-hpux-nat.c and
3338 * config/ia64/hpux.mh: Remove file.
3339 * config/pa/hpux.mh: Remove file.
3340 * configure: Rebuilt.
3341 * configure.ac (dlgetmodinfo, somread.o): Remove.
3342 * configure.host (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
3343 (ia64-*-hpux*): Remove its float format exception.
3344 * configure.tgt (hppa*-*-hpux*, ia64-*-hpux*): Make them obsolete.
3345 * hppa-hpux-nat.c: Remove file.
3346 * hppa-hpux-tdep.c: Remove file.
3347 * hppa-tdep.c (struct hppa_unwind_info, struct hppa_objfile_private):
3348 Move them here from hppa-tdep.h
3349 (hppa_objfile_priv_data, hppa_init_objfile_priv_data): Make it static.
3350 (hppa_frame_prev_register_helper): Remove HPPA_FLAGS_REGNUM exception.
3351 * hppa-tdep.h (struct hppa_unwind_info, struct hppa_objfile_private):
3352 Move them to hppa-tdep.c.
3353 (hppa_objfile_priv_data, hppa_init_objfile_priv_data): Remove
3355 * ia64-hpux-nat.c: Remove file.
3356 * ia64-hpux-tdep.c: Remove file.
3357 * ia64-hpux-tdep.h: Remove file.
3358 * inf-ttrace.c: Remove file.
3359 * inf-ttrace.h: Remove file.
3360 * solib-ia64-hpux.c: Remove file.
3361 * solib-ia64-hpux.h: Remove file.
3362 * solib-pa64.c: Remove file.
3363 * solib-pa64.h: Remove file.
3364 * solib-som.c: Remove file.
3365 * solib-som.h: Remove file.
3366 * somread.c: Remove file.
3370 * configure.ac: AC_SEARCH_LIBS(kinfo_getvmmap, util).
3371 * config.in: Regenerate.
3372 * configure: Regenerate.
3373 * fbsd-nat.c [!HAVE_KINFO_GETVMMAP] (fbsd_read_mapping): Don't
3375 (fbsd_find_memory_regions): Use kinfo_getvmmap to
3376 enumerate memory regions if present.
3380 * amd64fbsd-tdep.c (amd64fbsd_sigtramp_p): Style fixes.
3381 * i386fbsd-tdep.c: Fix style in various gdb_static_assert
3383 (i386fbsd_sigtramp_p): Likewise.
3387 * MAINTAINERS (Write After Approval): Add John Baldwin.
3391 * solib.c (_initialize_solib): Make "set/show sysroot" use
3392 add_setshow_optional_filename_cmd so it can be restored to
3393 empty after being set.
3397 * Makefile.in (SFILES): New source break-catch-syscall.c.
3398 (COMMON_OBS): New object break-catch-syscall.o.
3399 * break-catch-syscall.c: New file.
3400 * breakpoint.c: Remove inclusion of "xml-syscall.h".
3401 (syscall_catchpoint_p): Move declaration to break-catch-syscall.c
3402 (struct syscall_catchpoint): Likewise.
3403 (dtor_catch_syscall): Likewise.
3404 (catch_syscall_inferior_data): Likewise.
3405 (struct catch_syscall_inferior_data): Likewise.
3406 (get_catch_syscall_inferior_data): Likewise.
3407 (catch_syscall_inferior_data_cleanup): Likewise.
3408 (insert_catch_syscall): Likewise.
3409 (remove_catch_syscall): Likewise.
3410 (breakpoint_hit_catch_syscall): Likewise.
3411 (print_it_catch_syscall): Likewise.
3412 (print_one_catch_syscall): Likewise.
3413 (print_mention_catch_syscall): Likewise.
3414 (print_recreate_catch_syscall): Likewise.
3415 (catch_syscall_breakpoint_ops): Likewise.
3416 (syscall_catchpoint_p): Likewise.
3417 (create_syscall_event_catchpoint): Likewise.
3418 (catch_syscall_split_args): Likewise.
3419 (catch_syscall_command_1): Likewise.
3420 (is_syscall_catchpoint_enabled): Likewise.
3421 (catch_syscall_enabled): Likewise.
3422 (catching_syscall_number): Likewise.
3423 (catch_syscall_completer): Likewise.
3424 (clear_syscall_counts): Likewise.
3425 (initialize_breakpoint_ops): Move initialization of syscall
3426 catchpoints to break-catch-syscall.c.
3427 (_initialize_breakpoint): Move code related to syscall catchpoints
3428 to break-catch-syscall.c.
3432 * breakpoint.c (breakpoint_find_if): New function.
3433 * breakpoint.h (breakpoint_find_if): New prototype.
3437 * remote-fileio.h (remote_fileio_to_host_stat): New declaration.
3438 * remote-fileio.c (remote_fileio_to_host_uint): New function.
3439 (remote_fileio_to_host_ulong): Likewise.
3440 (remote_fileio_to_host_mode): Likewise.
3441 (remote_fileio_to_host_time): Likewise.
3442 (remote_fileio_to_host_stat): Likewise.
3443 * remote.c (PACKET_vFile_fstat): New enum value.
3444 (remote_protocol_features): Register the "vFile:fstat" feature.
3445 (remote_hostio_fstat): New function.
3446 (remote_bfd_iovec_stat): Use the above.
3447 (_initialize_remote): Register new "set/show remote
3448 hostio-fstat-packet" command.
3449 * symfile.c (separate_debug_file_exists): Update comment.
3450 * NEWS: Announce new vFile:fstat packet.
3454 * common/common-remote-fileio.h: New file.
3455 * common/common-remote-fileio.c: Likewise.
3456 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3457 (HFILES_NO_SRCDIR): Add common/common-remote-fileio.h.
3458 (COMMON_OBS): Add common-remote-fileio.o.
3459 (common-remote-fileio.o): New rule.
3460 * remote-fileio.h (common-remote-fileio.h): New include.
3461 * remote-fileio.c (gdb/fileio.h): Do not include.
3462 (remote_fileio_to_be): Moved to common-remote-fileio.h.
3463 (remote_fileio_to_fio_uint): Likewise.
3464 (remote_fileio_to_fio_time): Likewise.
3465 (remote_fileio_mode_to_target): Moved to common-remote-fileio.c.
3466 (remote_fileio_to_fio_mode): Likewise.
3467 (remote_fileio_to_fio_ulong): Likewise.
3468 (remote_fileio_to_fio_stat): Likewise.
3472 * guile/scm-value.c (gdbscm_value_dynamic_type): Fix typo in which
3473 we were checking the cached type, not the cached dynamic type.
3477 * guile/scm-cmd.c (cmdscm_destroyer): Don't xfree the name and
3478 other strings, as these are on the GC'd heap, and will be
3479 collected along with the smob.
3483 * guile/scm-objfile.c (gdbscm_objfile_progspace): New function.
3484 (objfile_functions): Bind gdbscm_objfile_progspace to
3486 * guile/lib/gdb.scm: Add objfile-progspace to exports.
3490 * guile/guile.c (_initialize_guile): Disable automatic
3491 finalization, if Guile offers us that possibility.
3492 * guile/guile.c (call_initialize_gdb_module):
3493 * guile/scm-safe-call.c (gdbscm_with_catch): Arrange to run
3494 finalizers in appropriate places.
3495 * configure.ac (AC_TRY_LIBGUILE): Add a check for
3496 scm_set_automatic_finalization_enabled.
3497 * configure: Regenerated.
3501 * s390-linux-tdep.c (s390_skip_prologue): Skip the prologue using
3506 * s390-linux-nat.c (struct arch_lwp_info): New.
3507 (s390_fix_watch_points): Rename to...
3508 (s390_prepare_to_resume): ...this. Skip the PER info update
3509 unless the watch points have changed.
3510 (s390_refresh_per_info, s390_new_thread): New functions.
3511 (s390_insert_watchpoint): Call s390_refresh_per_info instead of
3512 s390_fix_watch_points.
3513 (s390_remove_watchpoint): Likewise.
3514 (_initialize_s390_nat): Reflect renaming of s390_fix_watch_points.
3515 Register s390_prepare_to_resume.
3521 * common/gdb_socket.h: New file.
3522 * ser-tcp.c: Include gdb_socket.h. Don't include netinet/in.h nor
3524 (net_open): Use union gdb_sockaddr_u.
3528 * configure.ac (build_warnings): Move -Wmissing-prototypes
3529 -Wdeclaration-after-statement -Wmissing-parameter-type
3530 -Wold-style-declaration -Wold-style-definition to the C-specific
3532 * configure: Regenerate.
3536 * common/gdb_socket.h: New file.
3537 * ser-tcp.c: Include gdb_socket.h. Don't include netinet/in.h nor
3539 (net_open): Use union gdb_sockaddr_u.
3543 * common/common-exceptions.c [!__cplusplus] (enum catcher_state)
3544 (exceptions_state_mc_action_iter)
3545 (exceptions_state_mc_action_iter_1, exceptions_state_mc_catch):
3547 [__cplusplus] (try_scope_depth): New global.
3548 [__cplusplus] (exception_try_scope_entry)
3549 (exception_try_scope_exit, gdb_exception_sliced_copy)
3550 (exception_rethrow): New functions.
3551 (throw_exception): In C++ mode, throw
3552 gdb_exception_RETURN_MASK_QUIT for RETURN_QUIT and
3553 gdb_exception_RETURN_MASK_ERROR for RETURN_ERROR.
3554 (throw_it): In C++ mode, use try_scope_depth.
3555 * common/common-exceptions.h [!__cplusplus]
3556 (exceptions_state_mc_action_iter)
3557 (exceptions_state_mc_action_iter_1, exceptions_state_mc_catch):
3559 [__cplusplus] (exception_try_scope_entry)
3560 (exception_try_scope_exit, exception_rethrow): Declare.
3561 [__cplusplus] (struct exception_try_scope): New struct.
3562 [__cplusplus] (TRY, CATCH, END_CATCH): Reimplement on top of real
3564 (struct gdb_exception_RETURN_MASK_ALL)
3565 (struct gdb_exception_RETURN_MASK_ERROR)
3566 (struct gdb_exception_RETURN_MASK_QUIT): New types.
3570 * main.c (handle_command_errors): Remove volatile qualifier from
3575 * breakpoint.c (save_breakpoints): Adjust to avoid code between
3577 * gdbtypes.c (safe_parse_type): Remove empty line.
3578 (types_deeply_equal):
3579 * guile/scm-frame.c (gdbscm_frame_name):
3580 * linux-thread-db.c (find_new_threads_once):
3581 * python/py-breakpoint.c (bppy_get_commands):
3582 * record-btrace.c (record_btrace_insert_breakpoint)
3583 (record_btrace_remove_breakpoint, record_btrace_start_replaying)
3584 (record_btrace_start_replaying): Adjust to avoid code between TRY
3589 * common/common-exceptions.c (struct catcher) <exception>: No
3590 longer a pointer to volatile exception. Now an exception value.
3591 <mask>: Delete field.
3592 (exceptions_state_mc_init): Remove all parameters. Adjust.
3593 (exceptions_state_mc): No longer pop the catcher here.
3594 (exceptions_state_mc_catch): New function.
3595 (throw_exception): Adjust.
3596 * common/common-exceptions.h (exceptions_state_mc_init): Remove
3598 (exceptions_state_mc_catch): Declare.
3599 (TRY_CATCH): Rename to ...
3600 (TRY): ... this. Remove EXCEPTION and MASK parameters.
3601 (CATCH, END_CATCH): New.
3602 All callers adjusted.
3606 * top.c (quit_force): Inline and delete DO_TRY, DO_PRINT_EX.
3610 * amd64-tdep.c (amd64_frame_cache, amd64_sigtramp_frame_cache)
3611 (amd64_epilogue_frame_cache): Normal exception handling code.
3612 * break-catch-throw.c (check_status_exception_catchpoint)
3613 (re_set_exception_catchpoint): Ditto.
3614 * cli/cli-interp.c (safe_execute_command):
3615 * cli/cli-script.c (script_from_file): Ditto.
3616 * compile/compile-c-symbols.c (generate_c_for_for_one_variable):
3618 * compile/compile-object-run.c (compile_object_run): Ditto.
3619 * cp-abi.c (baseclass_offset): Ditto.
3620 * cp-valprint.c (cp_print_value): Ditto.
3621 * exceptions.c (catch_exceptions_with_msg):
3622 * frame-unwind.c (frame_unwind_try_unwinder): Ditto.
3623 * frame.c (get_frame_address_in_block_if_available): Ditto.
3624 * i386-tdep.c (i386_frame_cache, i386_epilogue_frame_cache)
3625 (i386_sigtramp_frame_cache): Ditto.
3626 * infcmd.c (post_create_inferior): Ditto.
3627 * linespec.c (parse_linespec, find_linespec_symbols):
3628 * p-valprint.c (pascal_object_print_value): Ditto.
3629 * parse.c (parse_expression_for_completion): Ditto.
3630 * python/py-finishbreakpoint.c (bpfinishpy_init): Ditto.
3631 * remote.c (remote_get_noisy_reply): Ditto.
3632 * s390-linux-tdep.c (s390_frame_unwind_cache): Ditto.
3633 * solib-svr4.c (solib_svr4_r_map): Ditto.
3637 * common/common-utils.h (startswith): New inline function.
3638 All places where this logic was used updated to use the above.
3643 * mem-break.c (default_memory_insert_breakpoint): Set shadow_len
3644 after reading the breakpoint's shadow memory.
3648 * hppabsd-nat.c: Remove file.
3649 * hppaobsd-nat.c: New file.
3650 * Makefile.in (ALLDEPFILES): Remove hppabsd-nat.c. Add
3652 * config/pa/obsd.mh (NATDEPFILES): Replace hppabsd-nat.o with
3657 * target.h (struct target_ops) <to_decr_pc_after_break>: Delete.
3658 (target_decr_pc_after_break): Delete declaration.
3659 * target.c (default_target_decr_pc_after_break)
3660 (target_decr_pc_after_break): Delete.
3661 * linux-nat.c (check_stopped_by_breakpoint, linux_nat_wait_1): Use
3662 gdbarch_decr_pc_after_break instead of target_decr_pc_after_break.
3663 * linux-thread-db.c (check_event): Likewise.
3664 * infrun.c (adjust_pc_after_break): Likewise.
3665 * darwin-nat.c (cancel_breakpoint): Likewise.
3666 * aix-thread.c (aix_thread_wait): Likewise.
3667 * target-delegates.c: Regenerate.
3671 * linux-nat.c (save_sigtrap): Check for breakpoints before
3672 checking watchpoints.
3673 (status_callback) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3674 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3675 (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]: Decide whether
3676 a breakpoint triggered based on the SIGTRAP's siginfo.si_code.
3677 (linux_nat_stopped_by_sw_breakpoint)
3678 (linux_nat_supports_stopped_by_sw_breakpoint)
3679 (linux_nat_stopped_by_hw_breakpoint)
3680 (linux_nat_supports_stopped_by_hw_breakpoint): New functions.
3681 (linux_nat_wait_1): Don't re-increment the PC if relying on
3682 SIGTRAP's siginfo->si_code.
3683 (linux_nat_add_target): Install new target methods.
3684 * linux-thread-db.c (check_event): Don't account for breakpoint PC
3685 offset if the target already adjusted the PC.
3686 * nat/linux-ptrace.h (USE_SIGTRAP_SIGINFO): New.
3687 (GDB_ARCH_TRAP_BRKPT): New.
3688 (TRAP_HWBKPT): Define if not already defined.
3692 * NEWS: Mention the new "swbreak" and "hwbreak" stop reasons.
3693 * remote.c (struct remote_state) <remote_stopped_by_watchpoint_p>:
3695 <stop_reason>: New field.
3696 (PACKET_swbreak_feature, PACKET_hwbreak_feature): New enum values.
3697 (packet_set_cmd_state): New function.
3698 (remote_protocol_features): Register the "swbreak" and "hwbreak"
3700 (remote_query_supported): If not disabled with the corresponding
3701 "set remote foo-packet" command, report support for the swbreak
3702 and hwbreak features.
3703 (struct stop_reply) <remote_stopped_by_watchpoint_p>: Delete
3705 <stop_reason>: New field.
3706 (remote_parse_stop_reply): Handle "swbreak" and "hwbreak".
3707 (remote_wait_as): Adjust.
3708 (remote_stopped_by_sw_breakpoint)
3709 (remote_supports_stopped_by_sw_breakpoint)
3710 (remote_stopped_by_hw_breakpoint)
3711 (remote_supports_stopped_by_hw_breakpoint): New functions.
3712 (remote_stopped_by_watchpoint): New function.
3713 (init_remote_ops): Install them.
3714 (_initialize_remote): Register new "set/show remote
3715 swbreak-feature-packet" and "set/show remote
3716 swbreak-feature-packet" commands.
3720 * btrace.h: Include target/waitstatus.h.
3721 (struct btrace_thread_info) <stop_reason>: New field.
3722 * record-btrace.c (record_btrace_step_thread): Use
3723 record_check_stopped_by_breakpoint instead of breakpoint_here_p.
3724 (record_btrace_decr_pc_after_break): Delete.
3725 (record_btrace_stopped_by_sw_breakpoint)
3726 (record_btrace_supports_stopped_by_sw_breakpoint)
3727 (record_btrace_stopped_by_hw_breakpoint)
3728 (record_btrace_supports_stopped_by_hw_breakpoint): New functions.
3729 (init_record_btrace_ops): Install them.
3730 * record-full.c (record_full_hw_watchpoint): Delete and replace
3732 (record_full_stop_reason): ... this throughout.
3733 (record_full_exec_insn): Adjust.
3734 (record_full_wait_1): Adjust. No longer re-increment the PC.
3735 (record_full_wait_1): Adjust. Use
3736 record_check_stopped_by_breakpoint instead of breakpoint_here_p.
3737 (record_full_stopped_by_watchpoint): Adjust.
3738 (record_full_stopped_by_sw_breakpoint)
3739 (record_full_supports_stopped_by_sw_breakpoint)
3740 (record_full_supports_stopped_by_sw_breakpoint)
3741 (record_full_stopped_by_hw_breakpoint)
3742 (record_full_supports_stopped_by_hw_breakpoint): New functions.
3743 (init_record_full_ops, init_record_full_core_ops): Install them.
3744 * record.c (record_check_stopped_by_breakpoint): New function.
3745 * record.h: Include target/waitstatus.h.
3746 (record_check_stopped_by_breakpoint): New declaration.
3750 enum lwp_stop_reason -> enum target_stop_reason
3751 * linux-nat.c (linux_resume_one_lwp, check_stopped_by_watchpoint)
3752 (linux_nat_stopped_by_watchpoint, status_callback)
3753 (linux_nat_wait_1): Adjust.
3754 * linux-nat.h (enum lwp_stop_reason): Delete.
3755 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3756 * x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust.
3757 * target/waitstatus.h (enum target_stop_reason): New.
3761 * breakpoint.c (need_moribund_for_location_type): New function.
3762 (bpstat_stop_status): Don't skipping checking moribund locations
3763 of breakpoint types which the target tell caused a stop.
3764 (program_breakpoint_here_p): New function, factored out from ...
3765 (bp_loc_is_permanent): ... this.
3766 (update_global_location_list): Don't create a moribund location if
3767 the target supports reporting stops of the type of the removed
3769 * breakpoint.h (program_breakpoint_here_p): New declaration.
3770 * infrun.c (adjust_pc_after_break): Return early if the target has
3771 already adjusted the PC. Add comments.
3772 (handle_signal_stop): If nothing explains a signal, and the target
3773 tells us the stop was caused by a software breakpoint, check if
3774 there's a breakpoint instruction in the memory. If so, adjust the
3775 PC before presenting the stop to the user. Otherwise, ignore the
3776 trap. If nothing explains a signal, and the target tells us the
3777 stop was caused by a hardware breakpoint, ignore the trap.
3778 * target.h (struct target_ops) <to_stopped_by_sw_breakpoint,
3779 to_supports_stopped_by_sw_breakpoint, to_stopped_by_hw_breakpoint,
3780 to_supports_stopped_by_hw_breakpoint>: New fields.
3781 (target_stopped_by_sw_breakpoint)
3782 (target_supports_stopped_by_sw_breakpoint)
3783 (target_stopped_by_hw_breakpoint)
3784 (target_supports_stopped_by_hw_breakpoint): Define.
3785 * target-delegates.c: Regenerate.
3789 * infrun.c (follow_fork_inferior): Use the whole of the
3790 inferior_ptid and pending_follow.related_pid ptids instead of
3791 building ptids from the process components. Adjust verbose output
3792 to use target_pid_to_str.
3793 * linux-nat.c (linux_child_follow_fork): Use the whole of the
3794 inferior_ptid and pending_follow.related_pid ptids instead of
3795 building ptids from the process components.
3799 * inf-ptrace.c [PT_GET_PROCESS_STATE]
3800 (inf_ptrace_insert_fork_catchpoint): New function.
3801 (inf_ptrace_remove_fork_catchpoint): New function.
3802 (inf_ptrace_target) [PT_GET_PROCESS_STATE]: Install them.
3806 * s390-linux-tdep.c (s390_register_name): Return empty string
3807 instead of NULL for registers that shouldn't be visible.
3811 * s390-linux-tdep.c (s390_gdbarch_init): Use the correct syscall
3812 XML file for 64-bit targets.
3816 * target.h (find_default_create_inferior): Remove declaration.
3817 (find_default_attach): Likewise.
3821 * inf-ptrace.c (inf_ptrace_resume): Remove spurious whitespace.
3822 Use ptid_get_pid to get the overall process id when resuming all
3827 * i386-linux-nat.c (i386_linux_resume): Get the ptrace PID out of
3828 the lwp field of ptid. Pass the full ptid to get_thread_regcache.
3829 * inf-ptrace.c (get_ptrace_pid): New function.
3830 (inf_ptrace_resume): Use it.
3831 * linux-nat.c (linux_resume_one_lwp): Pass the LWP's ptid ummodified
3836 * nat/linux-btrace.c: Include sys/utsname.h.
3837 (linux_determine_kernel_ptr_bits): New.
3838 (linux_enable_bts): Call linux_determine_kernel_ptr_bits.
3839 * x86-linux-nat.c (x86_linux_enable_btrace): Do not overwrite non-zero
3844 * btrace.c (ftrace_update_function): Treat return as tailcall for
3845 "_dl_runtime_resolve".
3849 * btrace.h (btrace_function) <lbegin, lend>: Remove.
3850 * btrace.c (ftrace_debug): Do not print the line range.
3851 (ftrace_skip_file, ftrace_update_lines): Remove.
3852 (ftrace_new_function): Remove lbegin and lend initialization.
3853 (btrace_compute_ftrace_bts): Remove call to ftrace_update_lines.
3854 * record-btrace.c (btrace_compute_src_line_range): New.
3855 (btrace_call_history_src_line): Call btrace_compute_src_line_range.
3859 * infrun.c (follow_exec): Delete all threads of the process except
3860 the event thread. Extended comments.
3864 * contrib/ari/gdb_ari.sh: Reinstate checks for "true" and "false".
3868 * utils.h: Remove <stdbool.h> #include.
3869 (producer_is_gcc): Change return type to "int".
3870 * utils.c (producer_is_gcc): Change return type to int.
3871 Return 1 instead of true, and 0 instead of false.
3872 Adjust function documentation accordingly.
3876 * s390-linux-nat.c (have_regset_vxrs): New static variable.
3877 (s390_linux_fetch_inferior_registers): Handle vector registers, if
3879 (s390_linux_store_inferior_registers): Likewise.
3880 (s390_get_hwcap): Remove function. Embed its logic...
3881 (s390_read_description): ...here. Yield a target description with
3882 vector registers if applicable.
3883 * s390-linux-tdep.c: Include "features/s390-vx-linux64.c",
3884 "features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and
3885 "features/s390x-tevx-linux64.c".
3886 (struct gdbarch_tdep) <v0_full_regnum>: New field.
3887 (s390_dwarf_regmap): Add vector registers. Remove bogus entries
3888 for "GNU/Linux-specific registers".
3889 (s390_dwarf_reg_r0l): New enum value.
3890 (s390_dwarf_reg_to_regnum): Support vector registers.
3891 (s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers
3892 of GPR lower halves.
3893 (regnum_is_vxr_full): New function.
3894 (s390_register_name): New function.
3895 (s390_pseudo_register_name): Handle v0-v15, which are composed of
3896 f0-f15 and v0l-v15l.
3897 (s390_pseudo_register_type): Likewise.
3898 (s390_pseudo_register_read): Likewise.
3899 (s390_pseudo_register_write): Likewise.
3900 (s390_value_from_register): Account for the fact that values are
3901 placed left-justified in vector registers.
3902 (s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to
3903 the vector reggroup and omit them from the general reggroup.
3904 (s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps.
3905 (s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets.
3906 (s390_iterate_over_regset_sections): Add iterations for the two
3908 (s390_core_read_description): Yield a target description with
3909 vector registers if applicable.
3910 (s390_gdbarch_init): Handle target descriptions with vector
3911 registers. Add "register_name" gdbarch method.
3912 (_initialize_s390_tdep): Call new tdesc initialization functions.
3913 * s390-linux-tdep.h (HWCAP_S390_VX): New macro.
3914 (S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM)
3915 (S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM)
3916 (S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM)
3917 (S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM)
3918 (S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM)
3919 (S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM)
3920 (S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM)
3921 (S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM)
3922 (S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM)
3923 (S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM)
3924 (S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM)
3925 (S390_V30_REGNUM, S390_V31_REGNUM): New macros.
3926 (S390_NUM_REGS): Adjust value.
3927 (s390_vxrs_low_regset, s390_vxrs_high_regset): Declare.
3928 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3929 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise.
3930 * NEWS: Announce S/390 vector register support.
3934 * features/s390-tevx-linux64.xml: New file.
3935 * features/s390-vx-linux64.xml: New file.
3936 * features/s390-vx.xml: New file.
3937 * features/s390x-tevx-linux64.xml: New file.
3938 * features/s390x-vx-linux64.xml: New file.
3939 * features/Makefile (WHICH): Add s390-vx-linux64,
3940 s390x-vx-linux64, s390-tevx-linux64, and s390x-tevx-linux64.
3941 (s390-vx-linux64-expedite, s390-tevx-linux64-expedite)
3942 (s390x-vx-linux64-expedite, s390x-tevx-linux64-expedite): New
3944 * features/s390-tevx-linux64.c: New generated file.
3945 * features/s390-vx-linux64.c: Likewise.
3946 * features/s390x-tevx-linux64.c: Likewise.
3947 * features/s390x-vx-linux64.c: Likewise.
3948 * regformats/s390-tevx-linux64.dat: Likewise.
3949 * regformats/s390-vx-linux64.dat: Likewise.
3950 * regformats/s390x-tevx-linux64.dat: Likewise.
3951 * regformats/s390x-vx-linux64.dat: Likewise.
3955 * symtab.h (struct symtab) <next>: Fix comment.
3959 * python/python.c (python_GdbModuleDef): Rename GdbMethods to
3964 * dtrace-probe.c (dtrace_probe_ops): Make extern.
3968 * common/common-exceptions.h (exception_none): Declare.
3969 * common/common-exceptions.c (exception_none): Moved from
3971 (exceptions_state_mc_init): Use exception_none.
3972 * exceptions.c (exception_none): Move to
3973 common/common-exceptions.c.
3974 * exceptions.h (exception_none): Move to
3975 common/common-exceptions.h.
3979 * main.c (catch_command_errors, catch_command_errors_const):
3980 Remove 'mask' argument. Adjust.
3981 (captured_main): Adjust callers.
3985 * python/python-internal.h: Include "extension-priv.h".
3989 * breakpoint.h (enum print_stop_action): Move further up in the
3994 * gdbarch.sh: Include regcache.h.
3995 * gdbarch.h: Regenerate.
3999 * arm-tdep.c (decode_insn) <arm_handle_insn, thumb_handle_insn>:
4000 Remove duplicate const.
4001 * sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Remove
4006 * cp-valprint.c (vtbl_ptr_name): Use EXPORTED_CONST.
4007 * guile/guile.c (extension_language_guile): Use EXPORTED_CONST.
4008 * features/feature_to_c.sh: Tag the generated xml_builtin array
4009 with extern const in C++ mode.
4013 * minidebug.c (struct lzma_stream): Rename to ...
4014 (struct gdb_lzma_stream): ... this.
4015 (lzma_open, lzma_pread, lzma_close, lzma_stat): Adjust.
4019 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): New
4021 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
4022 (mi_cmd_stack_list_variables): Use it.
4026 * x86-linux-nat.c (u_debugreg_offset): New function.
4027 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4031 * nat/x86-dregs.h (enum target_hw_bp_type): Remove forward
4033 Include break-common.h.
4038 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi): Use 'int' for
4039 local used to iterate over enums.
4040 * completer.c (signal_completer): Likewise.
4041 * i386-tdep.c (i386_stap_parse_special_token): Likewise.
4042 * rs6000-tdep.c (powerpc_set_vector_abi): Likewise.
4043 * tui/tui-data.c (tui_next_win, tui_prev_win): Likewise.
4044 * tui/tui-layout.c (next_layout, prev_layout): Likewise.
4045 * tui/tui-win.c (tui_refresh_all_win, tui_rehighlight_all)
4046 (tui_resize_all, tui_set_focus_command, tui_all_windows_info): Likewise.
4047 * tui-wingeneral.c (tui_refresh_all): Likewise.
4051 * target.h: Include "infrun.h".
4055 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4059 * common/agent.h (IPA_SYM_EXPORTED_NAME): New.
4061 * common/common-defs.h (EXTERN_C_PUSH, EXTERN_C_POP): New macros.
4065 * cli-out.c (_rl_erase_entire_line): Move declaration out of
4066 cli_mld_erase_entire_line, and make it extern "C".
4067 * common/common-defs.h (EXTERN_C): New.
4068 * completer.c (_rl_completion_prefix_display_length)
4069 (_rl_print_completions_horizontally, QSFUNC): Move declarations
4070 out of gdb_display_match_list_1.
4071 (_rl_qsort_string_compare): Move declaration out of
4072 gdb_display_match_list_1, and make it extern "C".
4073 * defs.h (re_comp): Use EXTERN_C.
4074 * maint.c (_mcleanup): Move declaration out of mcleanup_wrapper,
4075 and make it extern "C".
4076 (monstartup): Move declaration out of maintenance_set_profile_cmd,
4077 and make it extern "C".
4078 (main): Move declaration out of maintenance_set_profile_cmd.
4079 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason_string): Use
4084 * python/python.c (GdbMethods): Rename to ...
4085 (python_GdbMethods): ... this and make extern.
4086 (GdbModuleDef): Rename to ...
4087 (python_GdbModuleDef): ... this and make extern.
4091 * record-btrace.c (set_record_btrace_cmdlist)
4092 (show_record_btrace_cmdlist): Remove redefinitions.
4097 * dwarf2-frame.c (enum cfa_how_kind, struct
4098 dwarf2_frame_state_reg_info): Move out of struct
4100 * dwarf2read.c (struct tu_stats): Move out of struct
4102 (struct file_entry): Move out of struct line_header.
4103 (struct nextfield, struct nextfnfield, struct fnfieldlist, struct
4104 typedef_field_list): Move out of struct field_info.
4105 * gdbtypes.h (enum dynamic_prop_kind, union dynamic_prop_data):
4106 Move out of struct dynamic_prop.
4107 (union type_owner, union field_location, struct field, struct
4108 range_bounds, union type_specific): Move out of struct main_type.
4109 (struct fn_fieldlist, struct fn_field, struct typedef_field)
4110 (VOFFSET_STATIC): Move out of struct cplus_struct_type.
4111 (struct call_site_target, union call_site_parameter_u, struct
4112 call_site_parameter): Move out of struct call_site.
4113 * m32c-tdep.c (enum m32c_prologue_kind): Move out of struct
4115 (enum srcdest_kind): Move out of struct srcdest.
4116 * main.c (enum cmdarg_kind): Move out of struct cmdarg.
4117 * prologue-value.h (enum prologue_value_kind): Move out of struct
4119 * s390-linux-tdep.c (enum s390_abi_kind): Move out of struct
4121 * stabsread.c (struct nextfield, struct next_fnfieldlist): Move
4122 out of struct field_info.
4123 * symfile.h (struct other_sections): Move out of struct
4125 * symtab.c (struct symbol_cache_slot): Move out struct
4127 * target-descriptions.c (enum tdesc_type_kind): Move out of
4128 typedef struct tdesc_type.
4129 * tui/tui-data.h (enum tui_line_or_address_kind): Move out of
4130 struct tui_line_or_address.
4131 * value.c (enum internalvar_kind, union internalvar_data): Move
4132 out of struct internalvar.
4133 * xtensa-tdep.h (struct ctype_cache): Move out of struct
4139 Rename symbols whose names are reserved C++ keywords throughout.
4143 * Makefile.in (COMPILER): New, get it from autoconf.
4144 (COMPILE.pre, CC_LD): Use COMPILER.
4145 (CXX): Get from autoconf instead.
4146 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4147 * acinclude.m4: Include build-with-cxx.m4.
4148 * build-with-cxx.m4: New file.
4149 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4150 Disable -Werror by default if building in C++ mode.
4151 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4152 -Wno-narrowing in C++ mode. Only enable -Wpointer-sign in C mode.
4153 Run supported-warning-flags tests with the C++ compiler.
4154 Save/restore CXXFLAGS too.
4155 * configure: Regenerate.
4159 * libiberty.m4: New file.
4160 * acinclude.m4: Include libiberty.m4.
4161 * configure.ac: Call libiberty_INIT.
4162 * config.in, configure: Regenerate.
4166 * s390-linux-tdep.c (s390_gcc_target_options): Not just handle
4167 31-bit targets, but 64-bit targets as well.
4168 (s390_gnu_triplet_regexp): New function.
4169 (s390_gdbarch_init): Set the gcc_target_options gdbarch method for
4170 64-bit targets as well. Set the gnu_triplet_regexp gdbarch
4175 * windows-nat.c (CONTEXT_DEBUGGER): Remove.
4176 (CONTEXT_DEBUGGER_DR): Add CONTEXT_SEGMENTS. Incorporate flags
4177 from CONTEXT_DEBUGGER.
4181 * gdbtypes.c (internal_type_vptr_fieldno): Add missing call to
4183 (set_type_vptr_fieldno): Ditto.
4184 (internal_type_vptr_basetype, set_type_vptr_basetype): Ditto.
4185 * gnu-v3-abi.c (gnuv3_dynamic_class): Ditto.
4189 * auto-load.h (file_is_auto_load_safe): Add ATTRIBUTE_PRINTF.
4190 * complaints.c (vcomplaint): Pass argument FMT directly to
4191 printf-like functions instead of complaint->fmt.
4192 * ctf.c (ctf_save_write_metadata): Add ATTRIBUTE_PRINTF.
4193 * darwin-nat.c (inferior_debug): Add ATTRIBUTE_PRINTF.
4194 * compile/compile-loc2c.c (pushf, unary, binary): Add
4196 (do_compile_dwarf_expr_to_c): Pass string literal as format string
4198 (BINARY): Pass string literal as format string to 'binary'.
4199 * compile/compile-object-load.c (link_callbacks_einfo): Add
4201 * guile/guile-internal.h (gdbscm_printf): Add ATTRIBUTE_PRINTF.
4205 * windows-termcap.c: Rename to ...
4206 * stub-termcap.c: ... this. Adjust header line.
4207 * Makefile.in (SFILES): Refer to stub-termcap.c instead of
4209 * configure: Regenerate.
4210 * configure.ac: Refer to stub-termcap.o instead of
4212 * gdb_curses.h: Mention stub-termcap.c instead of
4217 * compile/compile-c-symbols.c (convert_one_symbol, convert_symbol_bmsym)
4218 (gcc_symbol_address): Call gnu_ifunc_resolve_addr.
4222 * gdb/infcmd.c (print_return_value): use type_to_string to print type.
4226 * elfread.c (elf_read_minimal_symbols): Use bfd_alloc for
4227 bfd_canonicalize_symtab.
4231 * amd64fbsd-nat.c: Include sys/user.h.
4232 (_initialize_amd64fbsd_nat): Use the KERN_PROC_SIGTRAMP sysctl
4233 instead of KERN_PS_STRINGS to locate the signal trampoline.
4234 * i386fbsd-nat.c: Include sys/user.h.
4235 (_initialize_i386fbsd_nat): Use the KERN_PROC_SIGTRAMP sysctl
4236 instead of KERN_PS_STRINGS to locate the signal trampoline.
4237 * amd64fbsd-tdep.c (amd64fbsd_sigtramp_code): New.
4238 (amd64fbsd_sigtramp_p): New.
4239 (amd64fbsd_sigtramp_start_addr, amd64fbsd_sigtramp_end_addr): No
4240 longer set default values.
4241 (amd64fbsd_init_abi): Set "sigtramp_p" to "amd64fbsd_sigtramp_p".
4242 * i386fbsd-tdep.c (i386fbsd_sigtramp_start)
4243 (i386fbsd_sigtramp_middle, i386fbsd_sigtramp_end)
4244 (i386fbsd_freebsd4_sigtramp_start)
4245 (i386fbsd_freebsd4_sigtramp_middle)
4246 (i386fbsd_freebsd4_sigtramp_end, i386fbsd_osigtramp_start)
4247 (i386fbsd_osigtramp_middle, i386fbsd_osigtramp_end): New.
4248 (i386fbsd_sigtramp_p): New.
4249 (i386fbsd_sigtramp_start_addr, i386fbsd_sigtramp_end_addr): No
4250 longer set default values.
4251 (i386fbsd_init_abi): Set "sigtramp_p" to "i386fbsd_sigtramp_p".
4255 * amd64fbsd-tdep.c (amd64fbsd_sigcontext_addr): Use
4256 get_frame_register instead of frame_unwind_register_unsigned.
4261 * compile/compile-c-support.c (c_compute_program): Change // comment.
4262 * compile/compile-object-load.c (setup_sections): Change // comment.
4267 * iq2000-tdep.c (iq2000_frame_cache): Delete C++-style comment.
4271 * remote.c (skip_to_semicolon): New function.
4272 (remote_parse_stop_reply) <T stop reply>: Use it. Don't
4273 special case the stop reasons that look like hex numbers
4274 upfront. Instead handle real register numbers after matching
4275 all the known stop reasons.
4279 PR c++/17976, symtab/17821
4280 * cp-namespace.c (cp_search_static_and_baseclasses): New parameter
4281 is_in_anonymous. All callers updated.
4282 (find_symbol_in_baseclass): Ditto.
4283 (cp_lookup_nested_symbol_1): Ditto. Don't search all static blocks
4284 for symbols in an anonymous namespace.
4285 * dwarf2read.c (namespace_name): Don't call dwarf2_name, fetch
4286 DW_AT_name directly.
4287 (dwarf2_name): Convert missing namespace name to
4288 CP_ANONYMOUS_NAMESPACE_STR.
4292 * linux-nat.c (linux_handle_extended_wait): Call
4293 thread_db_notice_clone whenever a new clone LWP is detected.
4294 (linux_stop_and_wait_all_lwps, linux_unstop_all_lwps): New
4296 * linux-nat.h (thread_db_attach_lwp): Delete declaration.
4297 (thread_db_notice_clone, linux_stop_and_wait_all_lwps)
4298 (linux_unstop_all_lwps): Declare.
4299 * linux-thread-db.c (struct thread_get_info_inout): Delete.
4300 (thread_get_info_callback): Delete.
4301 (thread_from_lwp): Use td_thr_get_info and record_thread.
4302 (thread_db_attach_lwp): Delete.
4303 (thread_db_notice_clone): New function.
4304 (try_thread_db_load_1): If /proc is mounted and shows the
4305 process'es task list, walk over all LWPs and call thread_from_lwp
4306 instead of relying on td_ta_thr_iter.
4307 (attach_thread): Don't call check_thread_signals here. Split the
4308 tail part of the function (which adds the thread to the core GDB
4310 (record_thread): ... this function. Call check_thread_signals
4312 (thread_db_wait): Don't call thread_db_find_new_threads_1. Always
4313 call thread_from_lwp.
4314 (thread_db_update_thread_list): Rename to ...
4315 (thread_db_update_thread_list_org): ... this.
4316 (thread_db_update_thread_list): New function.
4317 (thread_db_find_thread_from_tid): Delete.
4318 (thread_db_get_ada_task_ptid): Simplify.
4319 * nat/linux-procfs.c: Include <sys/stat.h>.
4320 (linux_proc_task_list_dir_exists): New function.
4321 * nat/linux-procfs.h (linux_proc_task_list_dir_exists): Declare.
4325 * linux-nat.c (lin_lwp_attach_lwp): No longer special case the
4326 main LWP. Handle the case of waitpid returning 0 if we're already
4327 attached to the LWP. Don't set the LWP's last_resume_kind to
4328 resume_stop if we already knew about the LWP.
4329 (linux_nat_filter_event): Add debug logs.
4333 * target.h (forward_target_decr_pc_after_break): Delete
4339 * linux-thread-db.c (thread_get_info_callback): Return early if
4340 the thread's lwp id is -1.
4348 * dtrace-probe.c (dtrace_process_dof_probe): Initialize arg.expr.
4349 (dtrace_get_probes) Change type of variable 'dof'.
4353 PR breakpoints/16812
4354 * linux-nat.c (linux_nat_filter_event): Report SIGTRAP,SIGILL,SIGSEGV.
4355 * nat/linux-ptrace.c (linux_wstatus_maybe_breakpoint): Add.
4356 * nat/linux-ptrace.h: Add linux_wstatus_maybe_breakpoint.
4360 * common/ax.def (setv): Fix consumed entry in setv DEFOP.
4364 * tui/tui-io.c (tui_handle_resize_during_io): Remove this
4366 (tui_putc): Don't call tui_handle_resize_during_io.
4367 (tui_getc): Likewise.
4368 (tui_mld_getc): Likewise.
4369 * tui/tui-win.c: Include event-loop.h and tui/tui-io.h.
4370 (tui_sigwinch_token): New static variable.
4371 (tui_initialize_win): Adjust documentation. Set
4373 (tui_async_resize_screen): New asynchronous callback.
4374 (tui_sigwinch_handler): Adjust documentation. Asynchronously
4375 invoke tui_async_resize_screen.
4379 * configure: Regenerated.
4380 * configure.ac: Use GDB_AC_TRANSFORM.
4381 * Makefile.in (aclocal_m4_deps): Added transform.m4.
4382 * acinclude.m4: sinclude transform.m4.
4383 * transform.m4: New file.
4384 (GDB_AC_TRANSFORM): New macro.
4388 * NEWS: Announce the support for DTrace SDT probes.
4392 * amd64-linux-tdep.c: Include "parser-defs.h" and "user-regs.h".
4393 (amd64_dtrace_parse_probe_argument): New function.
4394 (amd64_dtrace_probe_is_enabled): Likewise.
4395 (amd64_dtrace_enable_probe): Likewise.
4396 (amd64_dtrace_disable_probe): Likewise.
4397 (amd64_linux_init_abi): Register the
4398 `gdbarch_dtrace_probe_argument', `gdbarch_dtrace_enable_probe',
4399 `gdbarch_dtrace_disable_probe' and
4400 `gdbarch_dtrace_probe_is_enabled' hooks.
4401 (amd64_dtrace_disabled_probe_sequence_1): New constant.
4402 (amd64_dtrace_disabled_probe_sequence_2): Likewise.
4403 (amd64_dtrace_enable_probe_sequence): Likewise.
4404 (amd64_dtrace_disable_probe_sequence): Likewise.
4408 * breakpoint.c (BREAK_ARGS_HELP): Help string updated to mention
4409 the -probe-dtrace new vpossible value for PROBE_MODIFIER.
4410 * configure.ac (CONFIG_OBS): dtrace-probe.o added if BFD can
4412 * Makefile.in (SFILES): dtrace-probe.c added.
4413 * configure: Regenerate.
4414 * dtrace-probe.c: New file.
4415 (SHT_SUNW_dof): New constant.
4416 (dtrace_probe_type): New enum.
4417 (dtrace_probe_arg): New struct.
4418 (dtrace_probe_arg_s): New typedef.
4419 (struct dtrace_probe_enabler): New struct.
4420 (dtrace_probe_enabler_s): New typedef.
4421 (dtrace_probe): New struct.
4422 (dtrace_probe_is_linespec): New function.
4423 (dtrace_dof_sect_type): New enum.
4424 (dtrace_dof_dofh_ident): Likewise.
4425 (dtrace_dof_encoding): Likewise.
4426 (DTRACE_DOF_ENCODE_LSB): Likewise.
4427 (DTRACE_DOF_ENCODE_MSB): Likewise.
4428 (dtrace_dof_hdr): New struct.
4429 (dtrace_dof_sect): Likewise.
4430 (dtrace_dof_provider): Likewise.
4431 (dtrace_dof_probe): Likewise.
4432 (DOF_UINT): New macro.
4433 (DTRACE_DOF_PTR): Likewise.
4434 (DTRACE_DOF_SECT): Likewise.
4435 (dtrace_process_dof_probe): New function.
4436 (dtrace_process_dof): Likewise.
4437 (dtrace_build_arg_exprs): Likewise.
4438 (dtrace_get_arg): Likewise.
4439 (dtrace_get_probes): Likewise.
4440 (dtrace_get_probe_argument_count): Likewise.
4441 (dtrace_can_evaluate_probe_arguments): Likewise.
4442 (dtrace_evaluate_probe_argument): Likewise.
4443 (dtrace_compile_to_ax): Likewise.
4444 (dtrace_probe_destroy): Likewise.
4445 (dtrace_gen_info_probes_table_header): Likewise.
4446 (dtrace_gen_info_probes_table_values): Likewise.
4447 (dtrace_probe_is_enabled): Likewise.
4448 (dtrace_probe_ops): New variable.
4449 (info_probes_dtrace_command): New function.
4450 (_initialize_dtrace_probe): Likewise.
4451 (dtrace_type_name): Likewise.
4455 * gdbarch.sh (dtrace_parse_probe_argument): New.
4456 (dtrace_probe_is_enabled): Likewise.
4457 (dtrace_enable_probe): Likewise.
4458 (dtrace_disable_probe): Likewise.
4459 * gdbarch.c: Regenerate.
4460 * gdbarch.h: Regenerate.
4464 * stap-probe.c (stap_probe_ops): Add NULLs in the static
4465 stap_probe_ops for `enable_probe' and `disable_probe'.
4466 * probe.c (enable_probes_command): New function.
4467 (disable_probes_command): Likewise.
4468 (_initialize_probe): Define the cli commands `enable probe' and
4470 (parse_probe_linespec): New function.
4471 (info_probes_for_ops): Use parse_probe_linespec.
4472 * probe.h (probe_ops): New hooks `enable_probe' and
4477 * probe.c (compute_probe_arg): Moved from stap-probe.c
4478 (compile_probe_arg): Likewise.
4479 (probe_funcs): Likewise.
4480 * stap-probe.c (compute_probe_arg): Moved to probe.c.
4481 (compile_probe_arg): Likewise.
4482 (probe_funcs): Likewise.
4486 * probe.c (print_ui_out_not_applicables): New function.
4487 (exists_probe_with_pops): Likewise.
4488 (info_probes_for_ops): Do not include column headers for probe
4489 types for which no probe has been actually found on any object.
4490 Also invoke `print_ui_out_not_applicables' in order to match the
4491 column rows with the header when probes of several types are
4493 Print the "Type" column.
4494 * probe.h (probe_ops): Added a new probe operation `type_name'.
4495 * stap-probe.c (stap_probe_ops): Add `stap_type_name'.
4496 (stap_type_name): New function.
4500 * tui/tui-io.c (tui_getc): Don't call key_is_command_char.
4501 (key_is_command_char): Delete.
4505 * tui/tui.c (tui_enable): Resize windows before anything
4506 might show a window.
4511 * aarch64-linux-nat.c: Don't include features/aarch64.c anymore.
4512 (aarch64_linux_read_description): Remove initialize_tdesc_aarch64
4514 * aarch64-tdep.h (tdesc_aarch64): Declare.
4518 * contrib/ari/gdb_ari.sh: Remove checks for "true" and "false".
4522 * cp-namespace.c (cp_basic_lookup_symbol): Rename parameter
4523 anonymous_namespace to is_in_anonymous for consistency with the rest
4525 (cp_lookup_bare_symbol): Fix typo in comment.
4526 (cp_search_static_and_baseclasses): Ditto.
4527 (search_symbol_list): Use vertical space in comment better.
4528 (reset_directive_searched): Ditto. Fix typo.
4529 (cp_lookup_nested_symbol_1): Clarify contents of NESTED_NAME parameter.
4533 * MAINTAINERS: Update my email address.
4537 * symtab.c (completion_list_add_name): Fix memory leak.
4541 * completer.c (complete_line): Remove incorrect comment.
4545 * python/py-framefilter.c (py_print_single_arg, enumerate_locals)
4546 (py_print_frame): Use RETURN_MASK_ERROR.
4550 * python/py-framefilter.c (py_print_frame): Mention RETURN_QUIT in
4551 function comment. Wrap all function that can throw in cleanups.
4552 (gdbpy_apply_frame_filter): Wrap all function that can throw in
4557 * python/py-framefilter.c (py_print_frame): Substitute goto error.
4558 Remove the error label.
4562 * python/py-framefilter.c (py_print_frame): Put conditional code paths
4563 with goto first, indent the former else codepath left. Put variable
4564 'elided' to a new inner block.
4568 * python/py-framefilter.c (py_print_frame): Whitespacing fixes.
4572 * xcoffread.c (within_function): Delete.
4577 * breakpoint.c (base_breakpoint_ops): Delete.
4578 * dwarf2loc.c (dwarf_expr_ctx_funcs): Make extern.
4579 * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_lazy_psyms): Make extern.
4580 * guile/guile.c (guile_extension_script_ops, guile_extension_ops): Make extern.
4581 * ppcnbsd-tdep.c (ppcnbsd2_sigtramp): Make extern.
4582 * python/py-arch.c (arch_object_type): Make extern.
4583 * python/py-block.c (block_syms_iterator_object_type): Make extern.
4584 * python/py-bpevent.c (breakpoint_event_object_type): Make extern.
4585 * python/py-cmd.c (cmdpy_object_type): Make extern.
4586 * python/py-continueevent.c (continue_event_object_type)
4587 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove 'qual'
4588 parameter. Update all callers.
4589 * python/py-evtregistry.c (eventregistry_object_type): Make extern.
4590 * python/py-exitedevent.c (exited_event_object_type): Make extern.
4591 * python/py-finishbreakpoint.c (finish_breakpoint_object_type): Make extern.
4592 * python/py-function.c (fnpy_object_type): Make extern.
4593 * python/py-inferior.c (inferior_object_type, membuf_object_type): Make extern.
4594 * python/py-infevents.c (call_pre_event_object_type)
4595 (inferior_call_post_event_object_type).
4596 (memory_changed_event_object_type): Make extern.
4597 * python/py-infthread.c (thread_object_type): Make extern.
4598 * python/py-lazy-string.c (lazy_string_object_type): Make extern.
4599 * python/py-linetable.c (linetable_entry_object_type)
4600 (linetable_object_type, ltpy_iterator_object_type): Make extern.
4601 * python/py-newobjfileevent.c (new_objfile_event_object_type)
4602 (clear_objfiles_event_object_type): Make extern.
4603 * python/py-objfile.c (objfile_object_type): Make extern.
4604 * python/py-param.c (parmpy_object_type): Make extern.
4605 * python/py-progspace.c (pspace_object_type): Make extern.
4606 * python/py-signalevent.c (signal_event_object_type): Make extern.
4607 * python/py-symtab.c (symtab_object_type, sal_object_type): Make extern.
4608 * python/py-type.c (type_object_type, field_object_type)
4609 (type_iterator_object_type): Make extern.
4610 * python/python.c (python_extension_script_ops)
4611 (python_extension_ops): Make extern.
4612 * stap-probe.c (stap_probe_ops): Make extern.
4616 * infrun.c (adjust_pc_after_break): Don't adjust the PC just
4617 because the event thread is not the current thread.
4621 * gdbtypes.c (internal_type_self_type): If TYPE_SPECIFIC_FIELD hasn't
4622 been initialized yet, return NULL.
4626 * symfile.h (new_symfile_objfile): Delete.
4627 * symfile.c (finish_new_objfile): Renamed from new_symfile_objfile.
4628 All callers updated.
4632 * tui/tui-io.c (tui_handle_resize_during_io): Call
4633 tui_update_gdb_sizes() after resizing the screen.
4634 * tui/tui.c (tui_enable): Resize the terminal before
4635 calling tui_update_gdb_sizes().
4639 * tui/tui-io.c (tui_getc): Move cursor to the end of the command
4640 line before printing a newline.
4644 * utils.c (producer_is_gcc): Return true or false.
4648 * utils.h (producer_is_gcc): Change return type to bool. Add major
4650 * utils.c (producer_is_gcc): Likewise.
4651 (producer_is_gcc_ge_4): Adjust producer_is_gcc call.
4652 * dwarf2read.c (check_producer): Likewise.
4656 * infrun.c (displaced_step_fixup): Switch to the event thread
4657 before calling gdbarch_displaced_step_fixup.
4661 * MAINTAINERS (Write After Approval): Add Antoine Tremblay.
4665 * ada-varobj.c (ada_name_of_child): Constify parent.
4666 (ada_path_expr_of_child): Same.
4667 (ada_value_of_child): Same.
4668 (ada_type_of_child): Same.
4669 * c-varobj.c (c_is_path_expr_parent): Same.
4670 (c_describe_child): Same.
4671 (c_name_of_child): Same.
4672 (c_value_of_child): Same.
4673 (c_type_of_child): Same.
4674 (cplus_number_of_children): Same.
4675 (cplus_describe_child): Constify var.
4676 (cplus_name_of_child): Constify parent.
4677 (cplus_value_of_child): Same.
4678 (cplus_type_of_child): Same.
4679 * jv-varobj.c (java_name_of_child): Same.
4680 (java_value_of_child): Same.
4681 (java_type_of_child): Same.
4682 * varobj.c (value_of_child): Same.
4683 (varobj_default_is_path_expr_parent): Constify var, parent and return
4685 (varobj_get_path_expr): Constify var, modify path_expr through
4687 (install_new_value): Constify parent.
4688 (value_of_child): Constify parent.
4689 * varobj.h (struct varobj): Constify parent.
4690 (struct lang_varobj_ops): Constify name_of_child, value_of_child and
4692 (varobj_get_path_expr): Constify var.
4693 (varobj_get_path_expr_parent): Constify var and return value.
4697 * arm-tdep.c (arm_prologue_unwind_stop_reason): New function.
4698 (arm_prologue_this_id): Move PC and SP limit checks to
4699 arm_prologue_unwind_stop_reason.
4700 (arm_prologue_unwind) <stop_reason> : Set to
4701 arm_prologue_unwind_stop_reason.
4705 * dwarf2read.c (set_cu_language): Recognize DW_LANG_Fortran03 and
4706 DW_LANG_Fortran08 as language_fortran.
4711 * gdb/remote.c (remote_parse_stop_reply): Fix wrong comparison
4712 of pointer against char.
4716 * c-typeprint.c (cp_type_print_method_args): Handle '_Atomic'.
4717 (c_type_print_modifier): Likewise.
4718 * dwarf2read.c (read_tag_atomic_type): New function.
4719 (read_type_die_1): Handle DW_TAG_atomic_type.
4720 * gdbtypes.c (make_atomic_type): New function.
4721 (recursive_dump_type): Handle TYPE_ATOMIC.
4722 * gdbtypes.h (enum type_flag_values): Renumber.
4723 (enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_ATOMIC.
4724 (TYPE_ATOMIC): New macro.
4725 (make_atomic_type): Declare.
4729 * btrace.c (ftrace_find_call): Skip gaps.
4730 (ftrace_new_function): Initialize level.
4731 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return)
4732 (ftrace_new_switch): Update
4734 (ftrace_new_gap): New.
4735 (ftrace_update_function): Create new function after gap.
4736 (btrace_compute_ftrace_bts): Create gap on error.
4737 (btrace_stitch_bts): Update parameters. Clear trace if it
4739 (btrace_stitch_trace): Update parameters. Update callers.
4740 (btrace_clear): Reset the number of gaps.
4741 (btrace_insn_get): Return NULL if the iterator points to a gap.
4742 (btrace_insn_number): Return zero if the iterator points to a gap.
4743 (btrace_insn_end): Allow gaps at the end.
4744 (btrace_insn_next, btrace_insn_prev, btrace_insn_cmp): Handle gaps.
4745 (btrace_find_insn_by_number): Assert that the found iterator does
4747 (btrace_call_next, btrace_call_prev): Assert that the last function
4749 * btrace.h (btrace_bts_error): New.
4750 (btrace_function): Update comment.
4751 (btrace_function) <insn, insn_offset, number>: Update comment.
4752 (btrace_function) <errcode>: New.
4753 (btrace_thread_info) <ngaps>: New.
4754 (btrace_thread_info) <replay>: Update comment.
4755 (btrace_insn_get): Update comment.
4756 * record-btrace.c (btrace_ui_out_decode_error): New.
4757 (record_btrace_info): Print number of gaps.
4758 (btrace_insn_history, btrace_call_history): Call
4759 btrace_ui_out_decode_error for gaps.
4760 (record_btrace_step_thread, record_btrace_start_replaying): Skip gaps.
4764 * common/btrace-common.h (btrace_cpu_vendor, btrace_cpu): New.
4765 * nat/linux-btrace.c: (btrace_this_cpu): New.
4766 (cpu_supports_bts): Call btrace_this_cpu.
4767 (intel_supports_bts): Add cpu parameter.
4771 * btrace.h (btrace_insn_class): New.
4772 (btrace_insn) <size, iclass>: New.
4773 * btrace.c (ftrace_find_call): Update parameters. Update users.
4774 Use instruction classification.
4775 (ftrace_new_return): Update parameters. Update users.
4776 (ftrace_update_function): Update parameters. Update users. Use
4777 instruction classification.
4778 (ftrace_update_insns): Update parameters. Update users.
4779 (ftrace_classify_insn): New.
4780 (btrace_compute_ftrace_bts): Fill in new btrace_insn fields. Add
4781 TRY_CATCH around call to gdb_insn_length.
4785 * btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace):
4786 Update parameters. Update users.
4790 * btrace.c (parse_xml_btrace_conf_bts): Add size.
4791 (btrace_conf_bts_attributes): New.
4792 (btrace_conf_children): Add attributes.
4793 * common/btrace-common.h (btrace_config_bts): New.
4794 (btrace_config)<bts>: New.
4795 (btrace_config): Update comment.
4796 * nat/linux-btrace.c (linux_enable_btrace, linux_enable_bts):
4798 * features/btrace-conf.dtd: Increment version. Add size
4799 attribute to bts element.
4800 * record-btrace.c (set_record_btrace_bts_cmdlist,
4801 show_record_btrace_bts_cmdlist): New.
4802 (record_btrace_adjust_size, record_btrace_print_bts_conf,
4803 record_btrace_print_conf, cmd_set_record_btrace_bts,
4804 cmd_show_record_btrace_bts): New.
4805 (record_btrace_info): Call record_btrace_print_conf.
4806 (_initialize_record_btrace): Add commands.
4807 * remote.c: Add PACKET_Qbtrace_conf_bts_size enum.
4808 (remote_protocol_features): Add Qbtrace-conf:bts:size packet.
4809 (btrace_sync_conf): Synchronize bts size.
4810 (_initialize_remote): Add Qbtrace-conf:bts:size packet.
4811 * NEWS: Announce new commands and new packets.
4815 * Makefile.in (XMLFILES): Add btrace-conf.dtd.
4816 * x86-linux-nat.c (x86_linux_enable_btrace): Update parameters.
4817 (x86_linux_btrace_conf): New.
4818 (x86_linux_create_target): Initialize to_btrace_conf.
4819 * nat/linux-btrace.c (linux_enable_btrace): Update parameters.
4820 Check format. Split into this and ...
4821 (linux_enable_bts): ... this.
4822 (linux_btrace_conf): New.
4823 (perf_event_skip_record): Renamed into ...
4824 (perf_event_skip_bts_record): ... this. Updated users.
4825 (linux_disable_btrace): Split into this and ...
4826 (linux_disable_bts): ... this.
4827 (linux_read_btrace): Check format.
4828 * nat/linux-btrace.h (linux_enable_btrace): Update parameters.
4829 (linux_btrace_conf): New.
4830 (btrace_target_info)<ptid>: Moved.
4831 (btrace_target_info)<conf>: New.
4832 (btrace_target_info): Split into this and ...
4833 (btrace_tinfo_bts): ... this. Updated users.
4834 * btrace.c (btrace_enable): Update parameters.
4835 (btrace_conf, parse_xml_btrace_conf_bts, parse_xml_btrace_conf)
4836 (btrace_conf_children, btrace_conf_attributes)
4837 (btrace_conf_elements): New.
4838 * btrace.h (btrace_enable): Update parameters.
4839 (btrace_conf, parse_xml_btrace_conf): New.
4840 * common/btrace-common.h (btrace_config): New.
4841 * feature/btrace-conf.dtd: New.
4842 * record-btrace.c (record_btrace_conf): New.
4843 (record_btrace_cmdlist): New.
4844 (record_btrace_enable_warn, record_btrace_open): Pass
4845 &record_btrace_conf.
4846 (record_btrace_info): Print recording format.
4847 (cmd_record_btrace_bts_start): New.
4848 (cmd_record_btrace_start): Call cmd_record_btrace_bts_start.
4849 (_initialize_record_btrace): Add "record btrace bts" subcommand.
4850 Add "record bts" alias command.
4851 * remote.c (remote_state)<btrace_config>: New.
4852 (remote_btrace_reset, PACKET_qXfer_btrace_conf): New.
4853 (remote_protocol_features): Add qXfer:btrace-conf:read.
4854 (remote_open_1): Call remote_btrace_reset.
4855 (remote_xfer_partial): Handle TARGET_OBJECT_BTRACE_CONF.
4856 (btrace_target_info)<conf>: New.
4857 (btrace_sync_conf, btrace_read_config): New.
4858 (remote_enable_btrace): Update parameters. Call btrace_sync_conf and
4860 (remote_btrace_conf): New.
4861 (init_remote_ops): Initialize to_btrace_conf.
4862 (_initialize_remote): Add qXfer:btrace-conf packet.
4863 * target.c (target_enable_btrace): Update parameters.
4864 (target_btrace_conf): New.
4865 * target.h (target_enable_btrace): Update parameters.
4866 (target_btrace_conf): New.
4867 (target_object)<TARGET_OBJECT_BTRACE_CONF>: New.
4868 (target_ops)<to_enable_btrace>: Update parameters and comment.
4869 (target_ops)<to_btrace_conf>: New.
4870 * target-delegates: Regenerate.
4871 * target-debug.h (target_debug_print_const_struct_btrace_config_p)
4872 (target_debug_print_const_struct_btrace_target_info_p): New.
4873 * NEWS: Announce new command and new packet.
4877 * nat/linux-btrace.h (perf_event_buffer): New.
4878 (btrace_target_info) <buffer, size, data_head>: Replace with ...
4880 * nat/linux-btrace.c (perf_event_header, perf_event_mmap_size)
4881 (perf_event_buffer_size, perf_event_buffer_begin)
4882 (perf_event_buffer_end, linux_btrace_has_changed): Removed.
4884 (perf_event_new_data): New.
4888 * btrace.c (btrace_enable): Pass BTRACE_FORMAT_BTS.
4889 * record-btrace.c (record_btrace_open): Remove call to
4890 target_supports_btrace.
4891 * remote.c (remote_supports_btrace): Update parameters.
4892 * target.c (target_supports_btrace): Update parameters.
4893 * target.h (to_supports_btrace, target_supports_btrace): Update
4895 * target-delegates.c: Regenerate.
4896 * target-debug.h (target_debug_print_enum_btrace_format): New.
4897 * nat/linux-btrace.c
4898 (kernel_supports_btrace): Rename into ...
4899 (kernel_supports_bts): ... this. Update users. Update warning text.
4900 (intel_supports_btrace): Rename into ...
4901 (intel_supports_bts): ... this. Update users.
4902 (cpu_supports_btrace): Rename into ...
4903 (cpu_supports_bts): ... this. Update users.
4904 (linux_supports_btrace): Update parameters. Split into this and ...
4905 (linux_supports_bts): ... this.
4906 * nat/linux-btrace.h (linux_supports_btrace): Update parameters.
4910 * Makefile.in (SFILES): Add common/btrace-common.c.
4911 (COMMON_OBS): Add common/btrace-common.o.
4912 (btrace-common.o): Add build rules.
4913 * btrace.c (parse_xml_btrace): Update parameters.
4914 (parse_xml_btrace_block): Set format field.
4915 (btrace_add_pc, btrace_fetch): Use struct btrace_data.
4916 (do_btrace_data_cleanup, make_cleanup_btrace_data): New.
4917 (btrace_compute_ftrace): Split into this and...
4918 (btrace_compute_ftrace_bts): ...this.
4919 (btrace_stitch_trace): Split into this and...
4920 (btrace_stitch_bts): ...this.
4921 * btrace.h (parse_xml_btrace): Update parameters.
4922 (make_cleanup_btrace_data): New.
4923 * common/btrace-common.c: New.
4924 * common/btrace-common.h: Include common-defs.h.
4925 (btrace_block_s): Update comment.
4926 (btrace_format): New.
4927 (btrace_format_string): New.
4928 (btrace_data_bts): New.
4930 (btrace_data_init, btrace_data_fini, btrace_data_empty): New.
4931 * remote.c (remote_read_btrace): Update parameters.
4932 * target.c (target_read_btrace): Update parameters.
4933 * target.h (target_read_btrace): Update parameters.
4934 (target_ops)<to_read_btrace>: Update parameters.
4935 * x86-linux-nat.c (x86_linux_read_btrace): Update parameters.
4936 * target-delegates.c: Regenerate.
4937 * target-debug (target_debug_print_struct_btrace_data_p): New.
4938 * nat/linux-btrace.c (linux_read_btrace): Split into this and...
4939 (linux_read_bts): ...this.
4940 * nat/linux-btrace.h (linux_read_btrace): Update parameters.
4944 * remote-m32r-sdi.c: Include symfile.h.
4948 * symtab.h (clear_symtab_users, deduce_language_from_filename): Move
4949 * symfile.h (clear_symtab_users, deduce_language_from_filename): ...
4954 * linux-thread-db.c (find_new_threads_callback): Add debug output.
4959 * breakpoint.c (map_breakpoint_numbers): Check for empty args string.
4960 (enable_count_command): Check args for NULL value.
4964 * guile/scm-frame.c: Fix spelling errors in a comment.
4968 * python/python-internal.h (Py_hash_t): Define it for Python <3.2.
4969 * python/py-value.c (valpy_fetch_lazy): Use it. Remove cast to the
4974 * linux-nat.c (handle_extended_wait): Don't resume LWPs here.
4975 (wait_lwp): Don't call wait_lwp if linux_handle_extended_wait
4977 (resume_stopped_resumed_lwps): Don't check whether the thread is
4978 marked as executing.
4979 (linux_nat_wait_1): Use resume_stopped_resumed_lwps.
4983 * regset.h (struct regset): Add flags field.
4984 (REGSET_VARIABLE_SIZE): New value for a regset's flags field.
4985 * corelow.c (get_core_register_section): Add warning if the size
4986 exceeds the requested size and the regset does not have the
4987 REGSET_VARIABLE_SIZE flag set.
4988 * alphanbsd-tdep.c (alphanbsd_gregset): Add REGSET_VARIABLE_SIZE
4990 * armbsd-tdep.c (armbsd_gregset): Likewise.
4991 * hppa-hpux-tdep.c (hppa_hpux_regset): Likewise.
4992 * hppaobsd-tdep.c (hppaobsd_gregset): Likewise.
4993 * m68kbsd-tdep.c (m68kbsd_gregset): Likewise.
4994 * mipsnbsd-tdep.c (mipsnbsd_gregset): Likewise.
4998 * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections):
4999 For ".reg-xstate", explicitly specify the requested section size
5000 via X86_XSTATE_SIZE instead of just 0 on input and
5001 X86_XSTATE_MAX_SIZE on output.
5002 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections):
5008 * gdbarch.sh (iterate_over_regset_sections_cb): Document this
5009 function type, particularly its SIZE parameter.
5010 * gdbarch.h: Regenerate.
5011 * amd64-tdep.c (amd64_supply_fpregset): In gdb_assert, compare
5012 actual against required size using ">=" instead of "==".
5013 (amd64_collect_fpregset): Likewise.
5014 * i386-tdep.c (i386_supply_gregset): Likewise.
5015 (i386_collect_gregset): Likewise.
5016 (i386_supply_fpregset): Likewise.
5017 (i386_collect_fpregset): Likewise.
5018 * mips-linux-tdep.c (mips_supply_gregset_wrapper): Likewise.
5019 (mips_fill_gregset_wrapper): Likewise.
5020 (mips_supply_fpregset_wrapper): Likewise.
5021 (mips_fill_fpregset_wrapper): Likewise.
5022 (mips64_supply_gregset_wrapper): Likewise.
5023 (mips64_fill_gregset_wrapper): Likewise.
5024 (mips64_supply_fpregset_wrapper): Likewise.
5025 (mips64_fill_fpregset_wrapper): Likewise.
5026 * mn10300-linux-tdep.c (am33_supply_gregset_method): Likewise.
5027 (am33_supply_fpregset_method): Likewise.
5028 (am33_collect_gregset_method): Likewise.
5029 (am33_collect_fpregset_method): Likewise.
5036 * tui/tui-command.c (tui_refresh_cmd_win): New function.
5037 * tui/tui-command.c (tui_refresh_cmd_win): Declare.
5038 * tui/tui-file.c: #include tui/tui-command.h.
5039 (tui_file_fputs): Refresh command window if stream is not gdb_stdout.
5040 (tui_file_flush): Refresh command window if stream is gdb_stdout.
5041 * tui/tui-io.c (tui_puts): Remove calls to wrefresh, fflush.
5046 * event-loop.c (gdb_do_one_event): Add default switch case.
5050 Filter out inferior gcc option -fpreprocessed.
5051 * compile/compile.c (filter_args): New function.
5056 * event-loop.c: Don't declare nor define a queue type for
5058 (event_queue): Delete.
5059 (create_event, create_file_event, gdb_event_xfree)
5060 (initialize_event_loop, process_event): Delete.
5061 (gdb_do_one_event): Return as soon as one event is handled.
5062 (handle_file_event): Change prototype. Used the passed in
5063 file_handler pointer and ready_mask instead of looping over all
5065 (gdb_wait_for_event): Update the poll/select timeouts before
5066 blocking. Run event handlers directly instead of queueing events.
5067 Return as soon as one event is handled.
5068 (struct async_event_handler_data): Delete.
5069 (invoke_async_event_handler): Delete.
5070 (check_async_event_handlers): Change return type to int. Run
5071 event handlers directly instead of queueing events. Return as
5072 soon as one event is handled.
5073 (handle_timer_event): Delete.
5074 (update_wait_timeout): New function, factored out from
5076 (poll_timers): Reimplement.
5077 * event-loop.h (initialize_event_loop): Delete declaration.
5078 * top.c (gdb_init): Don't call initialize_event_loop.
5082 * event-loop.c (clear_async_event_handler): New function.
5083 * event-loop.h (clear_async_event_handler): New declaration.
5084 * record-btrace.c (record_btrace_async): New function.
5085 (init_record_btrace_ops): Install record_btrace_async.
5086 * record-full.c (record_full_async): New function.
5087 (record_full_resume): Don't mark the async event source here.
5088 (init_record_full_ops): Install record_full_async.
5089 (record_full_core_resume): Don't mark the async event source here.
5090 (init_record_full_core_ops): Install record_full_async.
5091 * remote.c (remote_async): Mark and clear the async stop reply
5092 queue event-loop token as appropriate.
5096 * linux-nat.c (linux_child_follow_fork, linux_nat_wait_1): Use
5097 target_is_async_p instead of target_can_async.
5098 (linux_nat_wait): Use target_is_async_p instead of
5099 target_can_async. Don't enable async here.
5100 * remote.c (interrupt_query, remote_wait, putpkt_binary): Use
5101 target_is_async_p instead of target_can_async.
5105 * varobj.h (lang_varobj_ops): Mention which return values need
5110 * dwarf2loc.c (dwarf2_evaluate_property): Add i18n marker.
5115 * ada-lang.c (ada_lookup_symbol_list_worker): Do not re-cache
5116 results found in the cache.
5121 * ada-lang.c (ada_get_symbol_cache): Set pspace_data->sym_cache
5122 when allocating a new one.
5126 * MAINTAINERS: Remove myself.
5130 * dwarf2read.c (process_structure_scope): Update setting of
5131 TYPE_VPTR_BASETYPE, TYPE_VPTR_FIELDNO.
5132 * gdbtypes.c (internal_type_vptr_fieldno): New function.
5133 (set_type_vptr_fieldno): New function.
5134 (internal_type_vptr_basetype): New function.
5135 (set_type_vptr_basetype): New function.
5136 (get_vptr_fieldno): Update setting of TYPE_VPTR_FIELDNO,
5138 (allocate_cplus_struct_type): Initialize vptr_fieldno.
5139 (recursive_dump_type): Printing of vptr_fieldno, vptr_basetype ...
5140 (print_cplus_stuff): ... moved here.
5141 (copy_type_recursive): Don't copy TYPE_VPTR_BASETYPE.
5142 * gdbtypes.h (struct main_type): Members vptr_fieldno, vptr_basetype
5144 (struct cplus_struct_type): ... here. All uses updated.
5145 (TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE): Rewrite.
5146 (internal_type_vptr_fieldno, set_type_vptr_fieldno): Declare.
5147 (internal_type_vptr_basetype, set_type_vptr_basetype): Declare.
5148 * stabsread.c (read_tilde_fields): Update setting of
5149 TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE.
5153 * cp-valprint.c (cp_find_class_member): Rename parameter domain_p
5155 (cp_print_class_member): Rename local domain to self_type.
5156 * dwarf2read.c (quirk_gcc_member_function_pointer): Rename local
5157 domain_type to self_type.
5158 (set_die_type) <need_gnat_info>: Handle
5159 TYPE_CODE_METHODPTR, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHOD.
5160 * gdb-gdb.py (StructMainTypePrettyPrinter): Handle
5161 TYPE_SPECIFIC_SELF_TYPE.
5162 * gdbtypes.c (internal_type_self_type): New function.
5163 (set_type_self_type): New function.
5164 (smash_to_memberptr_type): Rename parameter domain to self_type.
5165 Update setting of TYPE_SELF_TYPE.
5166 (smash_to_methodptr_type): Update setting of TYPE_SELF_TYPE.
5167 (smash_to_method_type): Rename parameter domain to self_type.
5168 Update setting of TYPE_SELF_TYPE.
5169 (check_stub_method): Call smash_to_method_type.
5170 (recursive_dump_type): Handle TYPE_SPECIFIC_SELF_TYPE.
5171 (copy_type_recursive): Ditto.
5172 * gdbtypes.h (enum type_specific_kind): New value
5173 TYPE_SPECIFIC_SELF_TYPE.
5174 (struct main_type) <type_specific>: New member self_type.
5175 (struct cplus_struct_type) <fn_field.type>: Update comment.
5176 (TYPE_SELF_TYPE): Rewrite.
5177 (internal_type_self_type, set_type_self_type): Declare.
5178 * gnu-v3-abi.c (gnuv3_print_method_ptr): Rename local domain to
5180 (gnuv3_method_ptr_to_value): Rename local domain_type to self_type.
5181 * m2-typeprint.c (m2_range): Replace TYPE_SELF_TYPE with
5183 * stabsread.c (read_member_functions): Mark methods with
5184 TYPE_CODE_METHOD, not TYPE_CODE_FUNC. Update setting of
5189 * gdbtypes.h (TYPE_SELF_TYPE): Renamed from TYPE_DOMAIN_TYPE.
5194 * gnu-v3-abi.c (gnuv3_dynamic_class): Assert only passed structs
5195 or unions. Return zero if union.
5196 (gnuv3_get_vtable): Call check_typedef. Assert only passed structs.
5197 (gnuv3_rtti_type): Pass already-check_typedef'd value to
5199 (compute_vtable_size): Assert only passed structs.
5200 (gnuv3_print_vtable): Don't call gnuv3_get_vtable for non-structs.
5204 * gdbtypes.c (copy_type_recursive): Handle all TYPE_SPECIFIC_FIELD
5213 * cli/cli-cmds.c (complete_command): Notify user if max-completions
5215 * common/common-exceptions.h (enum errors)
5216 <MAX_COMPLETIONS_REACHED_ERROR>: New value.
5217 * completer.h (get_max_completions_reached_message): New declaration.
5218 (max_completions): Likewise.
5219 (completion_tracker_t): New typedef.
5220 (new_completion_tracker): New declaration.
5221 (make_cleanup_free_completion_tracker): Likewise.
5222 (maybe_add_completion_enum): New enum.
5223 (maybe_add_completion): New declaration.
5224 (throw_max_completions_reached_error): Likewise.
5225 * completer.c (max_completions): New global variable.
5226 (new_completion_tracker): New function.
5227 (free_completion_tracker): Likewise.
5228 (make_cleanup_free_completion_tracker): Likewise.
5229 (maybe_add_completions): Likewise.
5230 (throw_max_completions_reached_error): Likewise.
5231 (complete_line): Remove duplicates and limit result to max_completions
5233 (get_max_completions_reached_message): New function.
5234 (gdb_display_match_list): Handle max_completions.
5235 (_initialize_completer): New declaration and function.
5236 * symtab.c: Include completer.h.
5237 (completion_tracker): New static variable.
5238 (completion_list_add_name): Call maybe_add_completion.
5239 (default_make_symbol_completion_list_break_on_1): Renamed from
5240 default_make_symbol_completion_list_break_on. Maintain
5241 completion_tracker across calls to completion_list_add_name.
5242 (default_make_symbol_completion_list_break_on): New function.
5243 * top.c (init_main): Set rl_completion_display_matches_hook.
5244 * tui/tui-io.c: Include completer.h.
5245 (tui_old_rl_display_matches_hook): New static global.
5246 (tui_rl_display_match_list): Notify user if max-completions reached.
5247 (tui_setup_io): Save/restore rl_completion_display_matches_hook.
5248 * NEWS (New Options): Mention set/show max-completions.
5252 * symtab.c (struct add_name_data) <code>: New field.
5254 (add_symtab_completions): New function.
5255 (symtab_expansion_callback): Likewise.
5256 (default_make_symbol_completion_list_break_on): Set datum.code.
5257 Move minimal symbol scan before calling expand_symtabs_matching.
5258 Scan known primary symtabs for externs and statics before calling
5259 expand_symtabs_matching. Pass symtab_expansion_callback as
5260 expansion_notify argument to expand_symtabs_matching. Do not scan
5261 primary symtabs for externs and statics after calling
5262 expand_symtabs_matching.
5266 * symfile.h (expand_symtabs_exp_notify_ftype): New typedef.
5267 (struct quick_symbol_functions) <expand_symtabs_matching>:
5268 New argument expansion_notify. All uses updated.
5269 (expand_symtabs_matching): New argument expansion_notify.
5271 * symfile-debug.c (debug_qf_expand_symtabs_matching):
5272 Also print expansion notify.
5273 * symtab.c (expand_symtabs_matching_via_partial): Call
5274 expansion_notify whenever a partial symbol table is expanded.
5275 * dwarf2read.c (dw2_expand_symtabs_matching): Call
5276 expansion_notify whenever a symbol table is instantiated.
5280 * cli-out.c: #include completer.h, readline/readline.h.
5281 (cli_mld_crlf, cli_mld_putch, cli_mld_puts): New functions.
5282 (cli_mld_flush, cld_mld_erase_entire_line): Ditto.
5283 (cli_mld_beep, cli_mld_read_key, cli_display_match_list): Ditto.
5284 * cli-out.h (cli_display_match_list): Declare.
5285 * completer.c (MB_INVALIDCH, MB_NULLWCH): New macros.
5286 (ELLIPSIS_LEN): Ditto.
5287 (gdb_get_y_or_n, gdb_display_match_list_pager): New functions.
5288 (gdb_path_isdir, gdb_printable_part, gdb_fnwidth): Ditto.
5289 (gdb_fnprint, gdb_print_filename): Ditto.
5290 (gdb_complete_get_screenwidth, gdb_display_match_list_1): Ditto.
5291 (gdb_display_match_list): Ditto.
5292 * completer.h (mld_crlf_ftype, mld_putch_ftype): New typedefs.
5293 (mld_puts_ftype, mld_flush_ftype, mld_erase_entire_line_ftype): Ditto.
5294 (mld_beep_ftype, mld_read_key_ftype): Ditto.
5295 (match_list_displayer): New struct.
5296 (gdb_display_match_list): Declare.
5297 * top.c (init_main): Set rl_completion_display_matches_hook.
5298 * tui/tui-io.c: #include completer.h.
5299 (printable_part, PUTX, print_filename, get_y_or_n): Delete.
5300 (tui_mld_crlf, tui_mld_putch, tui_mld_puts): New functions.
5301 (tui_mld_flush, tui_mld_erase_entire_line, tui_mld_beep): Ditto.
5302 (tui_mld_getc, tui_mld_read_key): Ditto.
5303 (tui_rl_display_match_list): Rewrite.
5304 (tui_handle_resize_during_io): New arg for_completion. All callers
5309 Add symbol lookup cache.
5310 * NEWS: Document new options and commands.
5311 * symtab.c (symbol_cache_key): New static global.
5312 (DEFAULT_SYMBOL_CACHE_SIZE, MAX_SYMBOL_CACHE_SIZE): New macros.
5313 (SYMBOL_LOOKUP_FAILED): New macro.
5314 (symbol_cache_slot_state): New enum.
5315 (block_symbol_cache): New struct.
5316 (symbol_cache): New struct.
5317 (new_symbol_cache_size, symbol_cache_size): New static globals.
5318 (hash_symbol_entry, eq_symbol_entry): New functions.
5319 (symbol_cache_byte_size, resize_symbol_cache): New functions.
5320 (make_symbol_cache, free_symbol_cache): New functions.
5321 (get_symbol_cache, symbol_cache_cleanup): New function.
5322 (set_symbol_cache_size, set_symbol_cache_size_handler): New functions.
5323 (symbol_cache_lookup, symbol_cache_clear_slot): New function.
5324 (symbol_cache_mark_found, symbol_cache_mark_not_found): New functions.
5325 (symbol_cache_flush, symbol_cache_dump): New functions.
5326 (maintenance_print_symbol_cache): New function.
5327 (maintenance_flush_symbol_cache): New function.
5328 (symbol_cache_stats): New function.
5329 (maintenance_print_symbol_cache_statistics): New function.
5330 (symtab_new_objfile_observer): New function.
5331 (symtab_free_objfile_observer): New function.
5332 (lookup_static_symbol, lookup_global_symbol): Use symbol cache.
5333 (_initialize_symtab): Init symbol_cache_key. New parameter
5334 maint symbol-cache-size. New maint commands print symbol-cache,
5335 print symbol-cache-statistics, flush-symbol-cache.
5336 Install new_objfile, free_objfile observers.
5341 * symfile.c (clear_symtab_users): Move call to breakpoint_re_set
5346 * NEWS: Mention inlined scripts in .debug_gdb_scripts section.
5347 * auto-load.c: #include ctype.h.
5348 (struct auto_load_pspace_info): Replace member loaded_scripts with
5349 new members loaded_script_files, loaded_script_texts.
5350 (auto_load_pspace_data_cleanup): Update.
5351 (init_loaded_scripts_info): Update.
5352 (get_auto_load_pspace_data_for_loading): Update.
5353 (maybe_add_script_file): Renamed from maybe_add_script. All callers
5355 (maybe_add_script_text): New function.
5356 (clear_section_scripts): Update.
5357 (source_script_file, execute_script_contents): New functions.
5358 (source_section_scripts): Add support for
5359 SECTION_SCRIPT_ID_PYTHON_TEXT, SECTION_SCRIPT_ID_GUILE_TEXT.
5360 (print_scripts): New function.
5361 (auto_load_info_scripts): Also print inlined scripts.
5362 (maybe_print_unsupported_script_warning): Renamed from
5363 unsupported_script_warning_print. All callers updated.
5364 (maybe_print_script_not_found_warning): Renamed from
5365 script_not_found_warning_print. All callers updated.
5366 * extension-priv.h (struct extension_language_script_ops): New member
5367 objfile_script_executor.
5368 * extension.c (ext_lang_objfile_script_executor): New function.
5369 * extension.h (objfile_script_executor_func): New typedef.
5370 (ext_lang_objfile_script_executor): Declare.
5371 * guile/guile-internal.h (gdbscm_execute_objfile_script): Declare.
5372 * guile/guile.c (guile_extension_script_ops): Update.
5373 * guile/scm-objfile.c (gdbscm_execute_objfile_script): New function.
5374 * python/python.c (python_extension_script_ops): Update.
5375 (gdbpy_execute_objfile_script): New function.
5379 * tui/tui-io.c (tui_expand_tabs): New function.
5380 (tui_puts, tui_redisplay_readline): Expand TABs into the
5381 appropriate number of spaces.
5382 * tui/tui-regs.c: Include tui-io.h.
5383 (tui_register_format): Call tui_expand_tabs to expand TABs into
5384 the appropriate number of spaces.
5385 * tui/tui-io.h: Add prototype for tui_expand_tabs.
5389 * NEWS: "info source" command now display producer string if present.
5390 * source.c (source_info): Print producer string if present.
5394 * varobj.c (varobj_delete): Fix comment.
5398 * varobj.c (create_child): Modify comment.
5402 * ada-varobj.c (ada_number_of_children): Constify struct varobj *
5404 (ada_name_of_variable): Same.
5405 (ada_path_expr_of_child): Same.
5406 (ada_value_of_variable): Same.
5407 (ada_value_is_changeable_p): Same.
5408 (ada_value_has_mutated): Same.
5409 * c-varobj.c (varobj_is_anonymous_child): Same.
5410 (c_is_path_expr_parent): Same.
5411 (c_number_of_children): Same.
5412 (c_name_of_variable): Same.
5413 (c_path_expr_of_child): Same.
5415 (c_value_of_variable): Same.
5416 (cplus_number_of_children): Same.
5417 (cplus_name_of_variable): Same.
5418 (cplus_path_expr_of_child): Same.
5419 (cplus_value_of_variable): Same.
5420 * jv-varobj.c (java_number_of_children): Same.
5421 (java_name_of_variable): Same.
5422 (java_path_expr_of_child): Same.
5423 (java_value_of_variable): Same.
5424 * varobj.c (number_of_children): Same.
5425 (name_of_variable): Same.
5427 (varobj_ensure_python_env): Same.
5428 (varobj_get_objname): Same.
5429 (varobj_get_expression): Same.
5430 (varobj_get_display_format): Same.
5431 (varobj_get_display_hint): Same.
5432 (varobj_has_more): Same.
5433 (varobj_get_thread_id): Same.
5434 (varobj_get_frozen): Same.
5435 (dynamic_varobj_has_child_method): Same.
5436 (varobj_get_gdb_type): Same.
5437 (is_path_expr_parent): Same.
5438 (varobj_default_is_path_expr_parent): Same.
5439 (varobj_get_language): Same.
5440 (varobj_get_attributes): Same.
5441 (varobj_is_dynamic_p): Same.
5442 (varobj_get_child_range): Same.
5443 (varobj_value_has_mutated): Same.
5444 (varobj_get_value_type): Same.
5445 (number_of_children): Same.
5446 (name_of_variable): Same.
5447 (check_scope): Same.
5448 (varobj_editable_p): Same.
5449 (varobj_value_is_changeable_p): Same.
5450 (varobj_floating_p): Same.
5451 (varobj_default_value_is_changeable_p): Same.
5455 * varobj.c (varobj_get_path_expr): Set var->path_expr.
5456 * c-varobj.c (c_path_expr_of_child): Set local var instead of
5458 (cplus_path_expr_of_child): Same.
5462 * mi-cmd-var.c (print_varobj): Free varobj_get_expression
5464 (mi_cmd_var_info_expression): Same.
5465 * varobj.c (varobj_get_expression): Mention in the comment that
5466 the result must by freed by the caller.
5470 * mi/mi-cmd-var.c (mi_cmd_var_info_type): Free result of
5472 (varobj_update_one): Same.
5473 * varobj.c (update_type_if_necessary): Free curr_type_str and
5475 (varobj_get_type): Specify in comment that the result needs to be
5476 freed by the caller.
5481 * dwarf2read.c (dwarf_decode_line_header): Punt if version > 4.
5485 * dwarf2read.c (checkproducer): Call producer_is_gcc.
5486 * utils.c (producer_is_gcc_ge_4): Likewise.
5487 (producer_is_gcc): New function.
5488 * utils.h (producer_is_gcc): New declaration.
5492 * gdbtypes.h (struct dynamic_prop): New PROP_ADDR_OFFSET enum
5494 * gdbtypes.c (resolve_dynamic_type_internal): Replace "addr"
5495 parameter by "addr_stack" parameter.
5496 (resolve_dynamic_range): Replace "addr" parameter by
5497 "stack_addr" parameter. Update function documentation.
5498 Update code accordingly.
5499 (resolve_dynamic_array, resolve_dynamic_union)
5500 (resolve_dynamic_struct, resolve_dynamic_type_internal): Likewise.
5501 (resolve_dynamic_type): Update code, following the changes made
5502 to resolve_dynamic_type_internal's interface.
5503 * dwarf2loc.h (struct property_addr_info): New.
5504 (dwarf2_evaluate_property): Replace "address" parameter
5505 by "addr_stack" parameter. Adjust function documentation.
5506 (struct dwarf2_offset_baton): New.
5507 (struct dwarf2_property_baton): Update documentation of
5508 field "referenced_type" to be more general. New field
5509 "offset_info" in union data field.
5510 * dwarf2loc.c (dwarf2_evaluate_property): Replace "address"
5511 parameter by "addr_stack" parameter. Adjust code accordingly.
5512 Add support for PROP_ADDR_OFFSET properties.
5513 * dwarf2read.c (attr_to_dynamic_prop): Add support for
5514 DW_AT_data_member_location attributes as well. Use case
5515 statements instead of if/else condition.
5519 * ada-varobj.c (ada_varobj_get_array_number_of_children):
5520 Return zero if PARENT_VALUE is NULL and parent_type's
5521 range type is dynamic.
5525 * gdbtypes.c (is_dynamic_type_internal) <TYPE_CODE_RANGE>: Return
5526 nonzero if the type's subtype is dynamic.
5527 (resolve_dynamic_range): Also resolve the range's subtype.
5532 * symfile.c (unmap_overlay_command): Initialize sec to NULL.
5536 * NEWS: Mention gdb.Objfile.username.
5537 * python/py-objfile.c (objfpy_get_username): New function.
5538 (objfile_getset): Add "username".
5542 * stack.c (return_command): Markup warning message with _.
5546 * gdbtypes.h (TYPE_TYPE_SPECIFIC): Delete.
5550 Fix 100x slowdown regression on DWZ files.
5551 * dwarf2read.c (struct dwarf2_per_objfile): Add line_header_hash.
5552 (struct line_header): Add offset and offset_in_dwz.
5553 (dwarf_decode_lines): Add parameter decode_mapping to the declaration.
5554 (free_line_header_voidp): New declaration.
5555 (line_header_hash, line_header_hash_voidp, line_header_eq_voidp): New
5557 (dwarf2_build_include_psymtabs): Update dwarf_decode_lines caller.
5558 (handle_DW_AT_stmt_list): Use line_header_hash.
5559 (free_line_header_voidp): New function.
5560 (dwarf_decode_line_header): Initialize offset and offset_in_dwz.
5561 (dwarf_decode_lines): New parameter decode_mapping, use it.
5562 (dwarf2_free_objfile): Free line_header_hash.
5567 * valops.c (value_rtti_indirect_type): Catch exception thrown by
5572 * dwarf2read.c (read_subroutine_type): Set TYPE_NO_RETURN from
5574 * gdbtypes.h (struct func_type): Add is_noreturn field flag. Make
5575 calling_convention an 8 bit bit field.
5576 (TYPE_NO_RETURN): New macro.
5577 * infcmd.c (finish_command): Query if function does not return
5579 * stack.c (return_command): Likewise.
5583 * linux-nat.c (linux_is_async_p): New macro.
5584 (linux_nat_is_async_p):
5585 (linux_nat_terminal_inferior): Check whether the target can async
5586 instead of whether it is already async.
5587 (linux_nat_terminal_ours): Don't check whether the target is
5589 (linux_async_pipe): Use linux_is_async_p.
5593 * NEWS (Changes since GDB 7.9): Add 'thread apply all' option
5595 * thread.c (tp_array_compar_ascending, tp_array_compar): New.
5596 (thread_apply_all_command): Parse CMD for tp_array_compar_ascending.
5597 Sort tp_array using tp_array_compar.
5598 (_initialize_thread): Extend thread_apply_all_command help.
5602 * corelow.c (core_open): Call also thread_command.
5603 * gdbthread.h (thread_command): New prototype moved from ...
5604 * thread.c (thread_command): ... here.
5605 (thread_command): Make it global.
5609 * configure.ac [*mingw32*]: Check $curses_found instead of
5611 * configure: Regenerate.
5612 * windows-termcap.c: Remove HAVE_CURSES_H, HAVE_NCURSES_H and
5613 HAVE_NCURSES_NCURSES_H checks.
5617 * tui/tui.c (tui_enable) [__MINGW32__]: If the call to 'newterm'
5618 fails with the 1st arg NULL, try again with "unknown". Don't test
5619 the "cup" capability: it isn't supported by the Windows port of
5620 ncurses, but the Windows console driver is still capable of
5625 * compile/compile.c (_initialize_compile): Use -fPIE for compile_args.
5629 * Makefile.in (HFILES_NO_SRCDIR): Remove ada-varobj.h.
5630 (ALLDEPFILES): Remove irix5-nat.c. These two are part of the
5631 reason that "make TAGS" is broken.
5635 * hppa-tdep.c (inst_saves_gr): Fix logical working flow issues
5636 and check additional store instructions.
5640 * MAINTAINERS (Write After Approval): Add "Wei-cheng Wang".
5644 * ppc-linux-tdep.c (ppc_skip_trampoline_code,
5645 ppc_canonicalize_syscall, ppc_linux_syscall_record,
5646 ppc_linux_record_signal, ppc_init_linux_record_tdep): Add comments.
5647 * ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
5648 * rs6000-tdep.c (rs6000_epilogue_frame_cache,
5649 rs6000_epilogue_frame_this_id, rs6000_epilogue_frame_prev_register,
5650 rs6000_epilogue_frame_sniffer, ppc_record_vsr, ppc_process_record_op4,
5651 ppc_process_record_op19, ppc_process_record_op31,
5652 ppc_process_record_op59, ppc_process_record_op60,
5653 ppc_process_record_op63): Likewise.
5657 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason_string)
5658 (linux_ptrace_test_ret_to_nx): Use safe_strerror instead of
5663 * rs6000-tdep.c (ppc_process_record_op4, ppc_process_record_op19,
5664 ppc_process_record_op31, ppc_process_record_op59,
5665 ppc_process_record_op60, ppc_process_record_op63,
5666 ppc_process_record): Fix -Wformat warning.
5667 * rs6000-tdep.c (rs6000_epilogue_frame_cache, ppc_process_record_op60):
5668 Remove unused variables.
5672 * MAINTAINERS (Write After Approval): Add "Chen Gang".
5676 * configure.ac [*mingw32*]: Only add windows-termcap.o to
5677 CONFIG_OBS if not building with a curses library.
5678 * configure: Regenerate.
5680 * windows-termcap.c: Include defs.h. Make the whole body empty if
5681 either one of HAVE_CURSES_H or HAVE_NCURSES_H or
5682 HAVE_NCURSES_NCURSES_H is defined.
5686 * rs6000-tdep.c (rs6000_gdbarch_init): Move divide operator
5687 from end of line to start of next line.
5691 * ppc-linux-tdep.c (ppc_skip_trampoline_code):
5692 Scan PLT stub backward for reverse debugging.
5693 * ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
5698 * configure.tgt (powerpc*-*-linux): Add linux-record.o to
5700 (ppc_linux_record_tdep, ppc64_linux_record_tdep): New for linux syscall
5702 (ppc_canonicalize_syscall, ppc_linux_syscall_record,
5703 ppc_linux_record_signal, ppc_init_linux_record_tdep): New functions.
5704 (ppc_linux_init_abi): Set process_record, process_record_signal.
5705 * ppc-tdep.h (struct gdbarch_tdep): Add ppc_syscall_record and
5706 ppc_linux_record_tdep to gdbarch_tdep.
5707 (ppc_process_record): New declaration.
5708 * rs6000-tdep.c (ppc_record_vsr, ppc_process_record_op4,
5709 ppc_process_record_op19, ppc_process_record_op31,
5710 ppc_process_record_op59, ppc_process_record_op60,
5711 ppc_process_record_op63, ppc_process_record): New functions.
5715 * rs6000-tdep.c (rs6000_in_function_epilogue_p): Rename to
5716 rs6000_in_function_epilogue_frame_p and add an argument
5718 (rs6000_epilogue_frame_cache, rs6000_epilogue_frame_this_id,
5719 rs6000_epilogue_frame_prev_register, rs6000_epilogue_frame_sniffer):
5721 (rs6000_epilogue_frame_unwind): New.
5722 (rs6000_gdbarch_init): Append epilogue unwinder.
5726 * nat/linux-personality.c: Replace "#ifndef
5727 HAVE_DECL_ADDR_NO_RANDOMIZE" by "#if
5728 !HAVE_DECL_ADDR_NO_RANDOMIZE", fixing a regression in RHEL-5
5733 * tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New
5735 (_initialize_tui_win) <border-kind, border-mode>:
5736 <active-border-mode>: Use tui_set_var_cmd as the "set" function.
5737 (tui_set_tab_width_command): Fix the commentary.
5739 * tui/tui-win.h: Add prototype for tui_rehighlight_all.
5741 * tui/tui-win.c (tui_scroll_left_command, tui_scroll_right_command):
5743 (tui_set_tab_width_command): Delete and recreate the source and
5744 the disassembly windows, to show the effect of the changed tab
5747 * tui/tui-data.h (LINE_PREFIX): Make shorter
5748 (MAX_PID_WIDTH): Enlarge from 14 to 19, to leave enough space for
5749 "Thread NNNNN.XXXX" thread ID notation on Windows.
5753 Fix gcc-5 compilation.
5754 * hppa-tdep.c (inst_saves_gr): Fix parentheses typo.
5758 * Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-personality.h.
5759 (linux-personality.o): New rule.
5760 * common/common-defs.h: Include <stdint.h>.
5761 * config/aarch64/linux.mh (NATDEPFILES): Include
5762 linux-personality.o.
5763 * config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
5764 * config/arm/linux.mh (NATDEPFILES): Likewise.
5765 * config/i386/linux64.mh (NATDEPFILES): Likewise.
5766 * config/i386/linux.mh (NATDEPFILES): Likewise.
5767 * config/ia64/linux.mh (NATDEPFILES): Likewise.
5768 * config/m32r/linux.mh (NATDEPFILES): Likewise.
5769 * config/m68k/linux.mh (NATDEPFILES): Likewise.
5770 * config/mips/linux.mh (NATDEPFILES): Likewise.
5771 * config/pa/linux.mh (NATDEPFILES): Likewise.
5772 * config/powerpc/linux.mh (NATDEPFILES): Likewise.
5773 * config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
5774 * config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
5775 * config/s390/linux.mh (NATDEPFILES): Likewise.
5776 * config/sparc/linux64.mh (NATDEPFILES): Likewise.
5777 * config/sparc/linux.mh (NATDEPFILES): Likewise.
5778 * config/tilegx/linux.mh (NATDEPFILES): Likewise.
5779 * config/xtensa/linux.mh (NATDEPFILES): Likewise.
5780 * defs.h: Remove #include <stdint.h> (moved to
5781 common/common-defs.h).
5782 * linux-nat.c: Include nat/linux-personality.h. Remove #include
5783 <sys/personality.h>; do not define ADDR_NO_RANDOMIZE (moved to
5784 nat/linux-personality.c).
5785 (linux_nat_create_inferior): Remove code to disable address space
5786 randomization (moved to nat/linux-personality.c). Create cleanup
5787 to disable address space randomization.
5788 * nat/linux-personality.c: New file.
5789 * nat/linux-personality.h: Likewise.
5793 * Makefile.in (ALLDEPFILES): Including common/mingw-strerror.c and
5794 common/posix-strerror.c.
5795 (posix-strerror.o): New rule.
5796 (mingw-strerror.o): Likewise.
5797 * common/common-utils.h (safe_strerror): Move prototype to here,
5799 * common/common.host: New file.
5800 * common/mingw-strerror.c: Likewise.
5801 * common/posix-strerror.c: Likewise.
5802 * configure: Regenerated.
5803 * configure.ac: Source common/common.host. Add variable
5804 common_host_obs to gdb_host_obs.
5805 * contrib/ari/gdb_ari.sh: Mention gdb/common/mingw-strerror.c and
5806 gdb/common/posix-strerror.c when warning about the use of
5808 * mingw-hdep.c (safe_strerror): Remove definition; move it to
5809 common/mingw-strerror.c.
5810 * posix-hdep.c (safe_strerror): Remove definition; move it to
5811 common/posix-hdep.c.
5812 * utils.h (safe_strerror): Remove prototype; move to
5813 common/common-utils.h.
5821 * ada-lang.c (ada_array_bound_from_type): Ignore array's parallel
5822 ___XA type if the array has already been fixed.
5826 * Makefile.in (ppc-linux.o): New rule.
5827 * config/powerpc/ppc64-linux.mh (NATDEPFILES): Add ppc-linux.o.
5828 * configure.ac: AC_CHECK_FUNCS(getauxval).
5829 * config.in: Re-generated.
5830 * configure: Re-generated.
5831 * nat/ppc-linux.h [__powerpc64__] (ppc64_64bit_inferior_p):
5833 * nat/ppc-linux.c: New file.
5834 * ppc-linux-nat.c (ppc_linux_target_wordsize) [__powerpc64__]:
5835 Call ppc64_64bit_inferior_p.
5839 * ppc-linux-nat.c (PT_ORIG_R3, PT_TRAP): Move to
5841 (PPC_FEATURE_CELL, PPC_FEATURE_BOOKE): Likewise.
5842 (PPC_FEATURE_HAS_DFP): Likewise.
5843 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5844 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5845 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5846 Include "nat/ppc-linux.h".
5847 * nat/ppc-linux.h: New file.
5848 * Makefile.in (HFILES_NO_SRCDIR): Add nat/ppc-linux.h.
5853 * breakpoint.c: Include "interps.h".
5854 (bpstat_do_actions_1): Also check whether the interpreter is
5860 * infrun.c (reinstall_readline_callback_handler_cleanup): Don't
5861 reinstall if the interpreter is sync.
5865 * objfiles.c (objfile_filename): New function.
5866 * objfiles.h (objfile_filename): Declare it.
5867 (objfile_name): Add function comment.
5868 * python/py-objfile.c (objfpy_lookup_objfile_by_name): Try both the
5869 bfd file name (which may be realpath'd), and the original name.
5873 * NEWS: Create a new section for the next release branch.
5874 Rename the section of the current branch, now that it has
5879 GDB 7.9 branch created (92fc2e6978d9a7c8324c7e851dbee59e22ec7a37):
5880 * version.in: Bump version to 7.9.50.DATE-cvs.
5884 * nat/linux-procfs.c (linux_proc_attach_tgid_threads):
5885 Remove trailing new-line in argument of call to warning.
5889 * linux-nat.c (attach_proc_task_lwp_callback): Remove trailing
5890 new-line in argument of call to "warning".
5894 * ada-lang.c (ada_lookup_symbol_nonlocal): If name not found
5895 in static block, then try searching for primitive types.
5899 * top.h (gdb_add_history): Declare.
5900 * top.c (command_count): New variable.
5901 (gdb_add_history): New function.
5902 (gdb_safe_append_history): New static function.
5903 (quit_force): Call it.
5904 (command_line_input): Use gdb_add_history instead of
5906 * event-top.c (command_line_handler): Likewise.
5911 * darwin-nat.c: Replace <machine/setjmp.h> #include by
5912 <setjmp.h> #include.
5916 * dwarf2read.c (compute_delayed_physnames): Use TYPE_FN_FIELD_PHYSNAME.
5921 * NEWS: The "maint demangle" command is renamed as "demangle".
5922 * demangle.c: #include cli/cli-utils.h, language.h.
5923 (demangle_command): New function.
5924 (_initialize_demangle): Add new command "demangle".
5925 * maint.c (maintenance_demangle): Stub out.
5926 (_initialize_maint_cmds): Update help text for "maint demangle",
5927 and mark as deprecated.
5931 * inf-ptrace.c (inf_ptrace_follow_fork): Adjust now that
5932 inferior_thread is a function.
5936 * Makefile.in (.y.c): Don't munge yacc's #line
5941 * utils.c (defaulted_query): Rewrite to use gdb_readline_wrapper
5942 to prompt for input.
5943 * tui/tui-hooks.c (tui_query_hook): Remove.
5944 (tui_install_hooks): Don't set deprecated_query_hook.
5945 * tui/tui-io.c (tui_redisplay_readline): Fix off-by-one error in
5946 height calculation. Always update the command window's cur_line.
5950 * breakpoint.c (hardware_breakpoint_inserted_here_p): New
5952 * breakpoint.h (hardware_breakpoint_inserted_here_p): New
5954 * linux-nat.c (linux_nat_status_is_event): Move higher up in file.
5955 (linux_resume_one_lwp): Store the thread's PC. Adjust to clear
5957 (check_stopped_by_watchpoint): New function.
5958 (save_sigtrap): Reimplement.
5959 (linux_nat_stopped_by_watchpoint): Adjust.
5960 (linux_nat_lp_status_is_event): Delete.
5961 (stop_wait_callback): Only call save_sigtrap after storing the
5963 (status_callback): If the thread had been stopped for a breakpoint
5964 that has since been removed, discard the event and resume the LWP.
5965 (count_events_callback, select_event_lwp_callback): Use
5966 lwp_status_pending_p instead of linux_nat_lp_status_is_event.
5967 (cancel_breakpoint): Rename to ...
5968 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5969 stopped for a software breakpoint or hardware breakpoint.
5970 (select_event_lwp): Only give preference to the stepping LWP in
5971 all-stop mode. Adjust comments.
5972 (stop_and_resume_callback): Remove references to new_pending_p.
5973 (linux_nat_filter_event): Likewise. Leave exit events of the
5974 leader thread pending here. Handle signal short circuiting here.
5975 Only call save_sigtrap after storing the pending waitstatus.
5976 (linux_nat_wait_1): Remove 'retry' label. Remove references to
5977 new_pending. Don't handle leaving events the caller is not
5978 interested in pending here, nor handle signal short-circuiting
5979 here. Also give equal priority to all LWPs that have had events
5980 in non-stop mode. If reporting a software breakpoint event,
5981 unadjust the LWP's PC.
5982 * linux-nat.h (enum lwp_stop_reason): New.
5983 (struct lwp_info) <stop_pc>: New field.
5984 (struct lwp_info) <stopped_by_watchpoint>: Delete field.
5985 (struct lwp_info) <stop_reason>: New field.
5986 * x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust.
5990 * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
5991 Set the LWP's 'resumed' flag.
5995 * linux-nat.c (linux_resume_one_lwp): New function.
5996 (resume_lwp): Use lwp_status_pending_p and linux_resume_one_lwp.
5997 (linux_nat_resume): Use lwp_status_pending_p and
5998 linux_resume_one_lwp.
5999 (linux_handle_syscall_trap): Use linux_resume_one_lwp.
6000 (linux_handle_extended_wait): Use linux_resume_one_lwp.
6001 (status_callback, running_callback): Use lwp_status_pending_p.
6002 (lwp_status_pending_p): New function.
6003 (stop_and_resume_callback): Use lwp_status_pending_p.
6004 (linux_nat_filter_event): Use linux_resume_one_lwp.
6005 (linux_nat_wait_1): Always use status_callback to look for an LWP
6006 with a pending status. Use linux_resume_one_lwp.
6007 (resume_stopped_resumed_lwps): Use lwp_status_pending_p and
6008 linux_resume_one_lwp.
6012 * breakpoint.c (bp_location_inserted_here_p): New function,
6013 factored out from ...
6014 (breakpoint_inserted_here_p): ... here. Use
6015 ALL_BP_LOCATIONS_AT_ADDR.
6016 (software_breakpoint_inserted_here_p): Use
6017 bp_location_inserted_here_p and ALL_BP_LOCATIONS_AT_ADDR.
6021 Skip enabling event reporting if the kernel supports
6023 * linux-thread-db.c: Include "nat/linux-ptrace.h".
6024 (thread_db_use_events): New function.
6025 (try_thread_db_load_1): Check thread_db_use_events before enabling
6027 (update_thread_state): New function.
6028 (attach_thread): Use it. Check thread_db_use_events before
6029 enabling event reporting.
6030 (thread_db_detach): Check thread_db_use_events before disabling
6032 (find_new_threads_callback): Check thread_db_use_events before
6033 enabling event reporting. Update the thread's state if not using
6034 libthread_db events.
6038 * linux-nat.c (lin_lwp_attach_lwp): Assert that the lwp id we're
6039 about to wait for is > 0.
6040 * linux-thread-db.c (find_new_threads_callback): Ignore thread if
6041 the kernel thread ID is -1.
6045 * linux-nat.c (attach_proc_task_lwp_callback): New function.
6046 (linux_nat_attach): Use linux_proc_attach_tgid_threads.
6047 (wait_lwp, linux_nat_filter_event): If not set yet, set the lwp's
6048 ptrace option flags.
6049 * linux-nat.h (struct lwp_info) <must_set_ptrace_flags>: New
6051 * nat/linux-procfs.c: Include <dirent.h>.
6052 (linux_proc_get_int): New parameter "warn". Handle it.
6053 (linux_proc_get_tgid): Adjust.
6054 (linux_proc_get_tracerpid): Rename to ...
6055 (linux_proc_get_tracerpid_nowarn): ... this.
6056 (linux_proc_pid_get_state): New function, factored out from
6057 (linux_proc_pid_has_state): ... this. Add new parameter "warn"
6059 (linux_proc_pid_is_gone): New function.
6060 (linux_proc_pid_is_stopped): Adjust.
6061 (linux_proc_pid_is_zombie_maybe_warn)
6062 (linux_proc_pid_is_zombie_nowarn): New functions.
6063 (linux_proc_pid_is_zombie): Use
6064 linux_proc_pid_is_zombie_maybe_warn.
6065 (linux_proc_attach_tgid_threads): New function.
6066 * nat/linux-procfs.h (linux_proc_get_tgid): Update comment.
6067 (linux_proc_get_tracerpid): Rename to ...
6068 (linux_proc_get_tracerpid_nowarn): ... this, and update comment.
6069 (linux_proc_pid_is_gone): New declaration.
6070 (linux_proc_pid_is_zombie): Update comment.
6071 (linux_proc_pid_is_zombie_nowarn): New declaration.
6072 (linux_proc_attach_lwp_func): New typedef.
6073 (linux_proc_attach_tgid_threads): New declaration.
6074 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason): Adjust to
6075 use nowarn functions.
6076 (linux_ptrace_attach_fail_reason_string): Move here from
6077 gdbserver/linux-low.c and rename.
6078 (ptrace_supports_feature): If the current ptrace options are not
6079 known yet, check them now, instead of asserting.
6080 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason_string):
6085 * linux-thread-db.c (thread_db_find_new_threads_silently)
6086 (try_thread_db_load_1, try_thread_db_load, thread_db_load_search)
6087 (find_new_threads_once): Print debug output on gdb_stdlog.
6092 * compile/compile.c: Include "gdb_wait.h".
6093 (do_rmdir): Check return value, and free 'zap'.
6098 * dwarf2loc.c (indirect_pieced_value): Don't call
6099 gdb_sign_extend. Call extract_signed_integer instead.
6100 * utils.c (gdb_sign_extend): Remove.
6101 * utils.h (gdb_sign_extend): Remove declaration.
6106 * stabsread.c (define_symbol): Set language for C++ special symbols.
6110 * inflow.c (initial_gdb_ttystate): Tweak comment.
6114 * inflow.c (set_initial_gdb_ttystate): Add empty line after
6115 comment documenting function.
6119 * terminal.h (set_initial_gdb_ttystate): Declare.
6120 * inflow.c (initial_gdb_ttystate): New static variable.
6121 (set_initial_gdb_ttystate): New setter.
6122 (child_terminal_init_with_pgrp): Copy initial_gdb_ttystate
6123 instead of our current terminal state.
6124 * top.c (gdb_init): Call set_initial_gdb_ttystate.
6128 * guile/scm-type.c (tyscm_array_1): Add comment.
6129 * python/py-type.c (typy_array_1): Add comment.
6133 * guile/scm-type.c (tyscm_array_1): Do not raise out-of-range
6134 error if N2 is equal to N1 - 1.
6138 * python/py-type.c (typy_array_1): Do not raise negative-length
6139 exception if N2 is equal to N1 - 1.
6143 * c-exp.y: Whitespace cleanup.
6144 (classify_inner_name): Remove extra ;.
6148 * mips-tdep.c (mips32_scan_prologue): Keep the extracted stack
6153 * dwarf2read.c (setup_type_unit_groups): Remove outdated comment.
6157 * symtab.h (struct symbol): Fix typo in comment.
6161 Update year range in copyright notice of all files.
6165 * top.c (print_gdb_version): Update copyright year to 2015.
6169 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2014.
6171 For older changes see ChangeLog-2014.
6177 version-control: never