4 * defs.h (elf_sym_fns_debug_names): New declaration.
5 * dwarf2read.c: Include "hash_enum.h".
6 (mapped_debug_names): New.
7 (struct dwarf2_per_objfile): Add debug_names, debug_aranges and
9 (dwarf2_elf_names): Add ".debug_names" and ".debug_aranges".
10 (struct dwz_file): Add debug_names.
11 (dwarf2_per_objfile::locate_sections): Handle debug_names and
13 (locate_dwz_sections): Handle debug_names.
14 (create_signatured_type_table_from_debug_names)
15 (create_addrmap_from_aranges): New.
16 (dwarf2_read_index): Update function comment.
17 (dwarf5_augmentation): Moved up.
18 (read_debug_names_from_section, create_cus_from_debug_names_list)
19 (create_cus_from_debug_names, dwarf2_read_debug_names): New.
20 (dwarf5_djb_hash): Moved up.
21 (dw2_debug_names_iterator): New.
22 (read_indirect_string_at_offset): New declaration.
23 (mapped_debug_names::namei_to_name)
24 (dw2_debug_names_iterator::find_vec_in_debug_names)
25 (dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
26 (dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
27 (dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
29 (dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
30 (debug_names::djb_hash): Rename it to dwarf5_djb_hash.
31 (debug_names::build): Update djb_hash caller.
32 (write_debug_names): Move out and rename augmentation to
34 * elfread.c (elf_sym_fns_debug_names): New.
35 * psymtab.h (dwarf2_debug_names_functions): New declaration.
36 * symfile.h (struct dwarf2_debug_sections): Add debug_names and
38 * xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
42 * common/hash_enum.h: New file.
46 * dwarf2read.c (create_cu_from_index_list): New from ...
47 (create_cus_from_index_list): ... this function, use it.
48 (dw_expand_symtabs_matching_file_matcher)
49 (dw2_expand_symtabs_matching_one): New from ...
50 (dw2_expand_symtabs_matching): ... this function, use them.
54 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
55 declarations from elfread.c.
56 (dwarf2_initialize_objfile): Change return value.
57 * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
58 declarations to defs.h.
59 (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
60 * symfile.h (dwarf2_initialize_objfile): Change return type.
65 * contrib/gdb-add-index.sh (index): Rename to ...
67 (index5, debugstr, debugstrmerge, debugstrerr): New variables.
68 Support also .debug_names and .debug_str.
69 * dwarf2read.c: Include cmath, set, list.
70 (INDEX_SUFFIX): Rename to ...
71 (INDEX4_SUFFIX): ... here.
72 (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
73 (file_write(FILE *, const void *, size_t)): New.
74 (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
75 (data_buf::append_unsigned_leb128, data_buf::empty): New.
76 (data_buf::file_write): Use ::file_write.
77 (data_buf::c_str, dwarf5_djb_hash, debug_names)
78 (check_dwarf64_offsets): New.
79 (psyms_seen_size, write_gdbindex): New from
80 write_psymtabs_to_index code.
81 (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
82 (enum dw_index_kind): New.
83 (write_psymtabs_to_index): New parameter index_kind. Support
84 filename_str and out_file_str. Move code to write_gdbindex,
85 possibly call write_debug_names.
86 (save_gdb_index_command): New parameter -dwarf-5.
87 (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
92 * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
94 (GDB_ADD_INDEX): New variable.
95 <$want_index>: Call $GDB_ADD_INDEX.
99 * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
100 "expression_up" inside the TRY block.
104 * breakpoint.c (update_watchpoint): Call
109 * breakpoint.c (adjust_breakpoint_address): Call
114 * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
115 significant_addr_bit.
116 * gdbarch.sh (significant_addr_bit): New.
117 * gdbarch.c, gdbarch.h: Re-generated.
118 * target.c (memory_xfer_partial): Call address_significant.
119 * utils.c (address_significant): New function.
120 * utils.h (address_significant): Declare.
124 * printcmd.c (ui_printf): Update. Use std::vector.
125 * common/format.h (struct format_piece): Add constructor.
127 (class format_pieces): New class.
128 (parse_format_string, free_format_pieces)
129 (free_format_pieces_cleanup): Remove.
130 * common/format.c (format_pieces::format_pieces): Rename from
131 parse_format_string. Update.
132 (free_format_pieces, free_format_pieces_cleanup): Remove.
133 * breakpoint.c (parse_cmd_to_aexpr): Update. Use std::vector.
134 * ax-gdb.h (gen_printf): Remove argument.
135 * ax-gdb.c (gen_printf): Remove "frags" argument.
136 (maint_agent_printf_command): Update. Use std::vector.
141 * linespec.c (minsym_found): Set sal.section.
145 * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
150 * location.c (string_to_explicit_location): When terminating
151 parsing early, break out of enclosing loop instead of returning.
155 * NEWS (New commands): Mention set/show print type nested-type-limit.
156 * c-typeprint.c (c_type_print_base): Print out nested types.
157 * dwarf2read.c (struct typedef_field_list): Rename to ...
158 (struct decl_field_list): ... this. Change all uses.
159 (struct field_info) <nested_types_list, nested_types_list_count>:
161 (add_partial_symbol): Look for nested type definitions in C++, too.
162 (dwarf2_add_typedef): Rename to ...
163 (dwarf2_add_type_defn): ... this.
164 (type_can_define_types): New function.
165 Update assertion to use type_can_define_types.
166 Permit NULL for a field's name.
167 (process_structure_scope): Handle child DIEs of types that can
169 Copy the list of nested types into the type struct.
170 * gdbtypes.h (struct typedef_field): Rename to ...
171 (struct decl_field): ... this. Change all uses.
172 [is_protected, is_private]: New fields.
173 (struct cplus_struct_type) <nested_types, nested_types_count>: New
175 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
176 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
177 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
178 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
179 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
180 default value for print_nested_type_limit.
181 (print_nested_type_limit): New static variable.
182 (set_print_type_nested_types, show_print_type_nested_types): New
184 (_initialize_typeprint): Register new commands for set/show
185 `print-nested-type-limit'.
186 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
191 PR breakpoints/22511:
192 * breakpoint.c (commands_command_1): Don't throw an exception when
193 no commands have been read.
198 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
203 * common/selftest.h (struct selftest): Add virtual destructor.
207 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
208 over basic location code. Implement explicit location keywords.
209 (bppy_init_validate_args): New function.
210 * NEWS: Document Python explicit breakpoint locations.
214 * MAINTAINERS: Restore target entries for m68hc11-elf,
215 score-elf and xstormy16-elf, incorrectly removed in a previous
216 patch meant to only update the list of active maintainers.
220 * break-catch-syscall.c (insert_catch_syscall)
221 (remove_catch_syscall): Adjust to pass reference to
222 inf_data->syscalls_counts directly via gdb::array_view.
223 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
225 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
226 * remote.c (remote_set_syscall_catchpoint): Likewise.
227 * target-debug.h (target_debug_print_bool): New.
228 (define target_debug_print_gdb_array_view_const_int): New.
229 * target-delegates.c: Regenerate.
230 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
231 gdb::array_view and bool.
232 (target_set_syscall_catchpoint): Likewise.
236 * break-catch-syscall.c (catch_syscall_completer): Get pointers
237 to syscall group strings after building the string vector.
241 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
242 "qXfer:features:read"" is disabled.
243 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
244 Check packet_config_support instead of packet->support directly.
248 * target-descriptions.c (struct tdesc_feature) <registers>: Use
249 tdesc_reg_up typedef.
250 (struct target_desc) <features>: Use tdesc_feature_up typedef.
254 * target-descriptions.c (struct tdesc_type): Use default
258 (struct tdesc_type_builtin): New.
259 (struct tdesc_type_vector): New.
260 (struct tdesc_type_with_fields): New.
261 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
262 (tdesc_gdb_type): Remove.
263 (tdesc_register_type): Adjust.
264 (tdesc_create_vector): Create tdesc_type_vector.
265 (tdesc_create_struct): Create tdesc_type_with_fields.
266 (tdesc_set_struct_size): Change parameter type.
267 (tdesc_create_union): Create tdesc_type_with_fields.
268 (tdesc_create_flags): Likewise.
269 (tdesc_create_enum): Likewise.
270 (tdesc_add_field): Change parameter type.
271 (tdesc_add_typed_bitfield): Likewise.
272 (tdesc_add_bitfield): Likewise.
273 (tdesc_add_flag): Likewise.
274 (tdesc_add_enum_value): Likewise.
275 (print_c_tdesc) <visit>: Remove overload with tdesc_type
276 parameter, add overloads for tdesc_type_builtin,
277 tdesc_type_with_fields and tdesc_type_vector.
278 <m_printed_type>: Remove.
279 <m_printed_element_type, m_printed_type_with_fields>: Add.
280 * target-descriptions.h (tdesc_create_enum): Change return type.
281 (tdesc_add_typed_bitfield): Change parameter type.
282 (tdesc_add_enum_value): Change parameter type.
283 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
284 type to tdesc_type_with_fields.
285 (tdesc_start_struct): Adjust.
286 (tdesc_start_flags): Adjust.
287 (tdesc_start_enum): Adjust.
288 (tdesc_start_field): Adjust.
289 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
290 (struct tdesc_type_vector): Forward-declare.
291 (struct tdesc_type_with_fields): Forward-declare.
292 (tdesc_create_struct): Change return type.
293 (tdesc_create_union): Likewise.
294 (tdesc_create_flags): Likewise.
295 (tdesc_add_field): Change parameter type.
296 (tdesc_set_struct_size): Likewise.
297 (tdesc_add_bitfield): Likewise.
298 (tdesc_add_flag): Likewise.
299 * features: Re-generate C files.
303 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
304 (struct tdesc_arch_reg): Add constructor.
305 (DEF_VEC_O (tdesc_arch_reg)): Remove.
306 (struct tdesc_arch_data): Initialize fields.
307 <arch_regs>: Change type to std::vector.
308 (target_find_description): Adjust.
309 (tdesc_find_type): Adjust.
310 (tdesc_data_init): Call tdesc_arch_data constructor.
311 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
312 (tdesc_data_cleanup): Free data with delete.
313 (tdesc_numbered_register): Adjust.
314 (tdesc_find_arch_register): Adjust.
315 (tdesc_use_registers): Adjust.
319 * target-descriptions.c (tdesc_type_field): Remove typedef.
320 (DEF_VEC_O (tdesc_type_field)): Remove.
321 (struct tdesc_type_field): Add constructor.
322 <name>: Change type to std::string.
323 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
325 <~tdesc_type>: Destroy vector if the type kind uses it.
326 <u::u::fields>: Change type to std::vector.
327 (tdesc_gdb_type): Adjust.
328 (tdesc_add_field): Adjust.
329 (tdesc_add_typed_bitfield): Adjust.
330 (tdesc_add_field): Adjust.
331 (tdesc_add_enum_value): Adjust.
332 (class print_c_tdesc) <visit>: Adjust.
336 * target-descriptions.c (struct tdesc_type) <name>: Change type
338 <~tdesc_type>: Don't manually free name.
339 <operator==>: Adjust.
340 (tdesc_named_type): Adjust.
341 (tdesc_find_type): Adjust.
342 (tdesc_gdb_type): Adjust.
343 (class print_c_tdesc) <visit>: Adjust.
347 * target-descriptions.c (tdesc_type_p): Remove typedef.
348 (DEF_VEC_P (tdesc_type_p)): Remove.
349 (struct tdesc_feature) <types>: Change type to std::vector.
350 <~tdesc_feature>: Replace with default implementation.
352 (tdesc_named_type): Adjust.
353 (tdesc_create_vector): Adjust.
354 (tdesc_create_struct): Adjust.
355 (tdesc_create_union): Adjust.
356 (tdesc_create_flags): Adjust.
357 (tdesc_create_enum): Adjust.
361 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
362 type of name_ parameter, adjust to std::string change.
363 <name, group, type>: Change type to std::string.
364 <~tdesc_reg>: Replace with default implementation.
365 <operator==>: Adjust.
366 (tdesc_find_register_early): Adjust.
367 (tdesc_register_name): Adjust.
368 (tdesc_register_type): Adjust.
369 (tdesc_register_in_reggroup_p): Adjust.
370 (class print_c_tdesc) <visit>: Adjust.
371 (class print_c_feature) <visit>: Adjust.
372 * features/arc-arcompact.c: Re-generate.
373 * features/arc-v2.c: Re-generate.
377 * target-descriptions.c (tdesc_reg_p): Remove typedef.
378 (DEF_VEC_P (tdesc_reg_p)): Remove.
379 (struct tdesc_feature) <registers>: Change type to std::vector.
380 <~tdesc_feature>: Don't manually free registers.
382 <operator==>: Adjust.
383 (tdesc_has_registers): Adjust.
384 (tdesc_find_register_early): Adjust.
385 (tdesc_use_registers): Adjust.
386 (tdesc_create_reg): Adjust.
390 * target-descriptions.c (tdesc_feature) <name>: Change type to
392 <~tdesc_feature>: Don't manually free name.
393 <operator==>: Adjust.
394 (tdesc_find_feature): Adjust.
395 (tdesc_feature_name): Adjust.
396 (class print_c_tdesc) <visit_pre>: Adjust.
397 (class print_c_feature) <visit_pre>: Adjust.
401 * target-descriptions.c (tdesc_feature_p): Remove typedef.
402 (DEF_VEC_P (tdesc_feature_p)): Remove.
403 (struct target_desc) <features>: Change type to std::vector.
404 <~target_desc>: Replace with default implementation.
406 <operator==>: Adjust.
407 (tdesc_has_registers): Adjust.
408 (tdesc_find_feature): Adjust.
409 (tdesc_use_registers): Adjust.
410 (tdesc_create_feature): Adjust.
414 * target-descriptions.c (arch_p): Remove typedef.
415 (DEF_VEC_P (arch_p)): Remove.
416 (struct target_desc) <compatible>: Change type to std::vector.
417 <~target_desc>: Don't manually free compatible.
418 (tdesc_compatible_p): Adjust.
419 (tdesc_add_compatible): Adjust.
420 (class print_c_tdesc) <visit_pre>: Adjust.
424 * target-descriptions.c (property_s): Remove typedef.
425 (DEF_VEC_O (property_s)): Remove.
426 (struct target_desc) <properties>: Make an std::vector.
427 <~target_desc>: Don't manually free properties.
428 (tdesc_property): Adjust.
429 (set_tdesc_property): Adjust.
430 (class print_c_tdesc) <visit_pre>: Adjust.
434 * common/gdb_assert.h (gdb_static_assert): Redefine using
439 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
441 (ada_is_redundant_range_encoding): Likewise.
442 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
444 * alpha-tdep.c (alpha_software_single_step): Likewise.
445 * arm-tdep.c (_initialize_arm_tdep): Likewise.
446 * auto-load.c (info_auto_load_cmd): Likewise.
447 * break-catch-syscall.c (insert_catch_syscall): Likewise.
448 (remove_catch_syscall): Likewise.
449 * breakpoint.c (condition_completer): Likewise.
450 (clear_command): Likewise.
451 (update_breakpoint_locations): Likewise.
452 * btrace.c (btrace_disable): Likewise.
453 (btrace_teardown): Likewise.
454 (btrace_maint_update_pt_packets): Likewise.
455 (maint_btrace_clear_cmd): Likewise.
456 * cli/cli-decode.c (lookup_cmd_1): Likewise.
457 (lookup_cmd_composition): Likewise.
458 * cli/cli-dump.c (scan_filename): Likewise.
459 (restore_command): Likewise.
460 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
461 * compile/compile-object-load.c (compile_object_load): Likewise.
462 * compile/compile-object-run.c (compile_object_run): Likewise.
463 * compile/compile.c (compile_to_object): Likewise.
464 * completer.c (filename_completer): Likewise.
465 (complete_files_symbols): Likewise.
466 (complete_expression): Likewise.
467 * corelow.c (core_open): Likewise.
468 * ctf.c (ctf_start): Likewise.
469 (ctf_write_status): Likewise.
470 (ctf_write_uploaded_tsv): Likewise.
471 (ctf_write_definition_end): Likewise.
472 (ctf_open_dir): Likewise.
473 (ctf_xfer_partial): Likewise.
474 (ctf_trace_find): Likewise.
475 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
477 * dwarf2loc.c (allocate_piece_closure): Likewise.
478 (indirect_pieced_value): Likewise.
479 (dwarf2_evaluate_loc_desc_full): Likewise.
480 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
481 (dw2_expand_symtabs_matching): Likewise.
482 (dw2_map_symbol_filenames): Likewise.
483 (read_and_check_comp_unit_head): Likewise.
484 (read_cutu_die_from_dwo): Likewise.
485 (lookup_dwo_unit): Likewise.
486 (read_comp_units_from_section): Likewise.
487 (dwarf2_compute_name): Likewise.
488 (handle_DW_AT_stmt_list): Likewise.
489 (create_cus_hash_table): Likewise.
490 (create_dwp_v2_section): Likewise.
491 (dwarf2_rnglists_process): Likewise.
492 (dwarf2_ranges_process): Likewise.
493 (dwarf2_record_block_ranges): Likewise.
494 (is_vtable_name): Likewise.
495 (read_formatted_entries): Likewise.
496 (skip_form_bytes): Likewise.
497 * elfread.c (elf_symtab_read): Likewise.
498 * exec.c (exec_file_command): Likewise.
499 * f-valprint.c (f_val_print): Likewise.
500 (info_common_command_for_block): Likewise.
501 * guile/guile.c (initialize_scheme_side): Likewise.
502 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
503 * guile/scm-cmd.c (cmdscm_completer): Likewise.
504 (gdbscm_register_command_x): Likewise.
505 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
506 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
507 * guile/scm-ports.c (file_port_magic): Likewise.
508 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
509 (ppscm_pretty_print_one_value): Likewise.
510 (ppscm_print_children): Likewise.
511 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
512 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
513 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
514 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
515 * i386-tdep.c (i386_register_reggroup_p): Likewise.
516 * infcmd.c (run_command_1): Likewise.
517 (until_next_fsm_clean_up): Likewise.
518 * linespec.c (linespec_complete): Likewise.
519 (find_label_symbols): Likewise.
520 * m2-valprint.c (m2_val_print): Likewise.
521 * memattr.c (require_user_regions): Likewise.
522 (lookup_mem_region): Likewise.
523 (disable_mem_command): Likewise.
524 (mem_delete): Likewise.
525 * mep-tdep.c (mep_register_name): Likewise.
526 (mep_analyze_prologue): Likewise.
527 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
528 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
529 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
530 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
531 * minidebug.c (lzma_open): Likewise.
532 * minsyms.c (lookup_minimal_symbol): Likewise.
533 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
534 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
535 (mips_o64_return_value): Likewise.
536 (mips_single_step_through_delay): Likewise.
537 (_initialize_mips_tdep): Likewise.
538 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
539 (nios2_software_single_step): Likewise.
540 * parse.c (find_minsym_type_and_address): Likewise.
541 * psymtab.c (psym_relocate): Likewise.
542 * python/py-breakpoint.c (bppy_get_commands): Likewise.
543 (gdbpy_breakpoint_modified): Likewise.
544 * python/py-infevents.c (create_inferior_call_event_object):
546 * python/py-record-btrace.c (btpy_list_item): Likewise.
547 * python/py-type.c (typy_str): Likewise.
548 * python/py-value.c (valpy_call): Likewise.
549 * python/python.c (do_start_initialization): Likewise.
550 * record-btrace.c (record_btrace_insn_history_range): Likewise.
551 (record_btrace_call_history_range): Likewise.
552 (record_btrace_record_method): Likewise.
553 (record_btrace_xfer_partial): Likewise.
554 (btrace_get_frame_function): Likewise.
555 * record-full.c (record_full_open): Likewise.
556 * record.c (get_context_size): Likewise.
557 * registry.h (DEFINE_REGISTRY): Likewise.
558 * remote-fileio.c (remote_fileio_request): Likewise.
559 * remote.c (remote_update_thread_list): Likewise.
560 (remote_check_symbols): Likewise.
561 (remote_commit_resume): Likewise.
562 (remote_interrupt): Likewise.
563 (remote_insert_breakpoint): Likewise.
564 (compare_sections_command): Likewise.
565 * rust-exp.y (super_name): Likewise.
566 (lex_string): Likewise.
567 (convert_ast_to_type): Likewise.
568 (convert_ast_to_expression): Likewise.
569 * rust-lang.c (rust_print_struct_def): Likewise.
570 (rust_print_type): Likewise.
571 (rust_evaluate_subexp): Likewise.
572 * rx-tdep.c (rx_register_type): Likewise.
573 * ser-event.c (serial_event_clear): Likewise.
574 * serial.c (serial_open): Likewise.
575 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
576 * symfile.c (section_is_overlay): Likewise.
577 (overlay_unmapped_address): Likewise.
578 (overlay_mapped_address): Likewise.
579 (simple_overlay_update_1): Likewise.
580 (simple_overlay_update): Likewise.
581 * symtab.c (symbol_find_demangled_name): Likewise.
582 (search_symbols): Likewise.
583 * target-descriptions.c (tdesc_predefined_type): Likewise.
584 * target.c (target_commit_resume): Likewise.
585 * thread.c (print_selected_thread_frame): Likewise.
586 * top.c (new_ui_command): Likewise.
587 (gdb_readline_no_editing): Likewise.
588 * tracefile-tfile.c (tfile_open): Likewise.
589 * tracepoint.c (create_tsv_from_upload): Likewise.
590 * utils.c (quit): Likewise.
591 (defaulted_query): Likewise.
592 * valarith.c (value_concat): Likewise.
593 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
594 * xml-tdesc.c (target_fetch_description_xml): Likewise.
595 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
596 (xtensa_pseudo_register_write): Likewise.
600 * NEWS: Mention Rust trait object inspection.
605 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
606 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
607 (vex2_prefix_p, vex3_prefix_p): New functions.
608 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
610 (fixup_riprel): Set VEX3.!B.
614 * target.h (mem_region_vector): Remove.
615 (struct target_ops) <to_memory_map>: Change return type to
616 std::vector<mem_region>.
617 * target-debug.h (target_debug_print_mem_region_vector): Rename
619 (target_debug_print_std_vector_mem_region): ... this.
620 * target-delegates.c: Re-generate.
624 * make-target-delegates (munge_type): Also munge '<', '>', and
625 ':'. Avoid double underscores in identifiers, and trailing
628 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
630 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
631 * target-delegates.c: Regenerate.
635 * common/poison.h (XDELETE): Fix typo.
641 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
643 * coffread.c (coff_symfile_read): Do not map over sections with
644 'coff_locate_sections' if readnever is on.
645 * dwarf2read.c (dwarf2_has_info): Return 0 if
647 * elfread.c (elf_symfile_read): Do not map over sections with
648 'elf_locate_sections' if readnever is on.
649 * main.c (validate_readnow_readnever): New function.
650 (captured_main_1): Add support for --readnever.
651 (print_gdb_help): Document --readnever.
652 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
654 * symfile.c (readnever_symbol_files): New global.
655 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
656 'READNEVER_SYMBOL_FILES' is set.
657 (validate_readnow_readnever): New function.
658 (symbol_file_command): Handle '-readnever' option.
659 Call 'validate_readnow_readnever'.
660 (add_symbol_file_command): Handle '-readnever' option.
661 Call 'validate_readnow_readnever'.
662 (_initialize_symfile): Document new '-readnever' option for
663 both 'symbol-file' and 'add-symbol-file' commands.
664 * top.h (readnever_symbol_files): New extern global.
665 * xcoffread.c (xcoff_initial_scan): Do not read debug
666 information if readnever is on.
670 * symfile.c (symbol_file_command): Call
671 'symbol_file_add_main_1' only after processing all command
673 (add_symbol_file_command): Modify logic to make arguments
674 position-independent.
678 * ada-lang.c (symbol_list_obstack): Delete.
679 (resolve_subexp): Make sure "candidates" gets xfree'ed.
680 (ada_lookup_symbol_list_worker): Remove the limitation that
681 the result is only good until the next call, now making it
682 the responsibility of the caller to free the result when no
683 longer needed. Adjust the function's intro comment accordingly.
684 (ada_lookup_symbol_list): Adjust the function's intro comment.
685 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
686 (ada_lookup_encoded_symbol, get_var_value): Likewise.
687 (_initialize_ada_language): Remove symbol_list_obstack
689 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
690 (write_var_or_type, write_name_assoc): Likewise.
694 * Makefile.in (all_deps_files): New variable.
695 Include .Po files using all_deps_files.
699 * MAINTAINERS: Update list of maintainers, moving those who
700 stepped down or became inactive to the "Past Maintainers"
705 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
707 (NEW_PROC_API): Remove.
708 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
710 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
711 * configure: Regenerate.
712 * config.in: Regenerate.
713 * gdbserver/configure: Regenerate.
714 * gdbserver/config.in: Regenerate.
716 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
718 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
720 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
722 * proc-api.c: Remove !NEW_PROC_API support.
723 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
724 Remove tests for macros always defined on Solaris.
725 * proc-events.c: Remove !NEW_PROC_API support.
726 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
727 HAVE_SYS_USER_H tests.
728 (init_syscall_table): Remove non-Solaris syscalls.
729 Remove tests for syscalls present on all Solaris versions.
730 Add missing Solaris 10+ syscalls.
731 (signal_table): Remove non-Solaris signals.
732 Remove tests for signals present on all Solaris versions.
733 (fault_table): Remove non-Solaris faults.
734 Remove tests for faults present on all Solaris versions.
735 * proc-flags.c: Remove !NEW_PROC_API support.
736 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
737 Remove non-Solaris flags.
738 * proc-why.c: Remove !NEW_PROC_API support.
739 (pr_why_table): Remove meaningless comments.
740 Remove tests for reasons present on all Solaris versions.
742 (proc_prettyfprint_why): Likewise.
744 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
745 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
746 Remove WA_READ test, IRIX watchpoint support.
747 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
749 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
750 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
752 Remove CTL_PROC_NAME_FMT tests.
753 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
755 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
756 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
757 (proc_modify_flag): Replace GDBRESET by PCUNSET.
758 Remove PR_ASYNC, PR_KLC tests.
759 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
760 (proc_parent_pid): Remove PCWATCH etc. tests.
761 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
763 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
764 Remove SYS_lwpcreate || SYS_lwp_create test.
765 (proc_get_current_thread): Likewise.
766 [PIOCNTHR && PIOCTLIST]: Remove.
767 [PIOCLSTATUS]: Remove.
768 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
769 [PRFS_STOPEXEC]: Remove.
770 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
771 (syscall_is_exit): Likewise.
772 (syscall_is_exec): Likewise.
773 (syscall_is_lwp_create): Likewise.
774 Remove SYS_syssgi support.
775 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
776 [SYS_syssgi]: Remove.
777 Remove non-Solaris cases, conditionals.
778 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
780 (procfs_init_inferior) [SYS_syssgi]: Remove.
781 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
782 (procfs_inferior_created) [SYS_syssgi]: Remove.
783 (procfs_set_watchpoint): Remove !AIX5 test.
784 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
786 (mappingflags) [MA_PHYS]: Remove.
787 (info_mappings_callback): Remove PCAGENT test.
788 Remove PIOCOPENLWP || PCAGENT test.
792 * sol-thread.c (info_solthreads): Constify args.
797 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
801 * ada-lang.c (to_fixed_range_type): Make sure that the size
802 of the range type being returned is the same as the size
803 of the range type being fixed.
808 * NEWS: Mention setting breakpoints on functions with C++ ABI
810 * completer.h (completion_match_for_lcd) <match,
811 mark_ignored_range>: New methods.
812 <finish>: Consider ignored ranges.
813 <clear>: Clear ignored ranges.
814 <m_ignored_ranges, m_finished_storage>: New fields.
815 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
816 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
817 completion_match_for_lcd pointer to strncmp_iw_with_mode.
818 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
819 * language.c (default_symbol_name_matcher): Pass the
820 completion_match_for_lcd pointer to strncmp_iw_with_mode.
821 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
822 * utils.c (skip_abi_tag): New function.
823 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
825 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
831 * NEWS: Mention setting breakpoints on functions with C++ ABI
833 * completer.h (completion_match_for_lcd) <match,
834 mark_ignored_range>: New methods.
835 <finish>: Consider ignored ranges.
836 <clear>: Clear ignored ranges.
837 <m_ignored_ranges, m_finished_storage>: New fields.
838 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
839 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
840 completion_match_for_lcd pointer to strncmp_iw_with_mode.
841 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
842 * language.c (default_symbol_name_matcher): Pass the
843 completion_match_for_lcd pointer to strncmp_iw_with_mode.
844 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
845 * utils.c (skip_abi_tag): New function.
846 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
848 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
853 * NEWS: Mention that breakpoints on C++ functions are now set on
854 on all namespaces/classes by default, and mention "break
856 * ax-gdb.c (agent_command_1): Adjust to pass a
857 symbol_name_match_type to new_linespec_location.
858 * breakpoint.c (parse_breakpoint_sals): Adjust to
859 get_linespec_location's return type change.
860 (strace_marker_create_sals_from_location): Adjust to pass a
861 symbol_name_match_type to new_linespec_location.
862 (strace_marker_decode_location): Adjust to get_linespec_location's
864 (strace_command): Adjust to pass a symbol_name_match_type to
865 new_linespec_location.
866 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
867 mention "-qualified".
868 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
869 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
871 (complete_address_and_linespec_locations): New parameter
872 'match_type'. Pass it down.
873 (explicit_options): Add "-qualified".
874 (collect_explicit_location_matches): Pass the requested match type
875 to the linespec completers. Handle MATCH_QUALIFIED.
876 (location_completer): Handle "-qualified" combined with linespecs.
877 * cp-support.c (cp_search_name_hash): New.
878 (cp_symbol_name_matches_1): Implement wild matching for C++.
879 (cp_fq_symbol_name_matches): Reimplement.
880 (cp_get_symbol_name_matcher): Return different matchers depending
881 on the lookup name's match type.
882 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
883 * cp-support.h (cp_search_name_hash): New declaration.
885 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
887 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
889 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
890 pass a symbol_name_match_type to new_linespec_location.
891 * linespec.c (linespec_parse_basic): Lookup function symbols using
892 the parser's symbol name match type.
893 (convert_explicit_location_to_linespec): New
894 symbol_name_match_type parameter. Pass it down to
895 find_linespec_symbols.
896 (convert_explicit_location_to_sals): Pass the location's name
897 match type to convert_explicit_location_to_linespec.
898 (parse_linespec): New match_type parameter. Save it in the
900 (linespec_parser_new): Default to symbol_name_match_type::WILD.
901 (linespec_complete_function): New symbol_name_match_type
903 (complete_linespec_component): Pass down the parser's recorded
905 (linespec_complete_label): New symbol_name_match_type parameter.
907 (linespec_complete): New symbol_name_match_type parameter. Save
908 it in the parser and pass it down. Adjust to
909 get_linespec_location's prototype change.
910 (find_function_symbols, find_linespec_symbols): New
911 symbol_name_match_type parameter. Pass it down instead of
912 assuming symbol_name_match_type::WILD.
913 * linespec.h (linespec_complete, linespec_complete_function)
914 (linespec_complete_label): New symbol_name_match_type parameter.
915 * location.c (event_location::linespec_location): Now a struct
917 (EL_LINESPEC): Adjust.
918 (initialize_explicit_location): Default to
919 symbol_name_match_type::WILD.
920 (new_linespec_location): New symbol_name_match_type parameter.
921 Record it in the location.
922 (get_linespec_location): Now returns a struct linespec_location.
923 (new_explicit_location): Also copy func_name_match_type.
924 (explicit_to_string_internal)
925 (string_to_explicit_location): Handle "-qualified".
926 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
927 Copy symbol_name_match_type fields.
928 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
930 (event_location_to_string): Adjust to LINESPEC_LOCATION type
931 change. Handle "-qualfied".
932 (string_to_explicit_location): Handle "-qualified".
933 (string_to_event_location_basic): New symbol_name_match_type
934 parameter. Pass it down.
935 (string_to_event_location): Handle "-qualified".
936 * location.h (struct linespec_location): New.
937 (explicit_location::func_name_match_type): New field.
938 (new_linespec_location): Now returns a const linespec_location *.
939 (string_to_event_location_basic): New symbol_name_match_type
941 (explicit_completion_info::saw_explicit_location_option): New
943 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
944 symbol_name_match_type to new_linespec_location.
945 * python/py-breakpoint.c (bppy_init): Likewise.
946 * python/python.c (gdbpy_decode_line): Likewise.
950 * ada-lang.c (ada_lookup_name_info::matches): Change type of
951 parameter from completion_match to completion_match_result.
953 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
954 * completer.c (completion_tracker::maybe_add_completion): Add
955 match_for_lcd parameter and use it.
956 (completion_tracker::add_completion): Likewise.
957 * completer.h (class completion_match_for_lcd): New class.
958 (completion_match_result::match_for_lcd): New field.
959 (completion_match_result::set_match): New method.
960 (completion_tracker): Add comments.
961 (completion_tracker::add_completion): Add match_for_lcd parameter.
962 (completion_tracker::reset_completion_match_result): Reset
964 (completion_tracker::maybe_add_completion): Add match_for_lcd
966 (completion_tracker::m_lowest_common_denominator_unique): Extend
968 * cp-support.c (cp_symbol_name_matches_1)
969 (cp_fq_symbol_name_matches): Change type of parameter from
970 completion_match to completion_match_result. Adjust.
971 * language.c (default_symbol_name_matcher): Change type of
972 parameter from completion_match to completion_match_result.
974 * language.h (completion_match_for_lcd): Forward declare.
975 (default_symbol_name_matcher): Change type of parameter from
976 completion_match to completion_match_result.
977 * symtab.c (compare_symbol_name): Adjust.
978 (completion_list_add_name): Pass the match_for_lcd to the tracker.
979 * symtab.h (ada_lookup_name_info::matches): Change type of
980 parameter from completion_match to completion_match_result.
981 (symbol_name_matcher_ftype): Likewise, and update comments.
985 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
986 * minsyms.c (msymbol_is_text): Delete.
987 (msymbol_is_function): New function.
988 * minsyms.h (msymbol_is_text): Delete.
989 (msymbol_is_function): New declaration.
990 * symtab.c (find_function_alias_target): Use msymbol_is_function.
994 * Makefile.in (distclean): Handle the case where rmdir fails.
998 * symfile.c (_initialize_symfile): Update usage text for
999 add-symbol-file, symbol-file, load.
1003 * symfile.c (add_symbol_file_command): Error if some arguments to
1004 -s are missing. Change unrecognized-argument error message.
1005 (_initialize_symfile): Fix usage text for add-symbol-file.
1009 * Makefile.in (REMOTE_OBS): Remove.
1010 (SFILES): Remove remote sources.
1011 (COMMON_SFILES): Add remote sources.
1012 (ALLDEPFILES): Remove dcache.c.
1016 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
1018 (SFILES): Use SUBDIR_TARGET_SRCS.
1019 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
1020 (CONFIG_SRC_SUBDIR): Add target.
1021 (%.o): Remove target rule.
1025 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
1026 registry.o, thread-fsm.o, debug.o.
1027 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
1028 thread-fsm.c, debug.c.
1032 * Makefile.in (COMMON_SFILES): New.
1033 (SFILES): Move some entries to COMMON_SFILES.
1034 (COMMON_OBS): Use COMMON_SFILES.
1038 * Makefile.in (YYFILES): Update comment.
1043 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
1044 (CONFIG_SRC_SUBDIR): Add python.
1045 (%.o): Remove python rule.
1046 (python/%.o): New rule.
1047 * configure: Rebuild.
1048 * configure.ac (CONFIG_OBS): Refer to python/python.o
1052 * configure: Rebuild.
1053 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1054 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1055 (CONFIG_SRC_SUBDIR): Add guile.
1056 (%.o): Remove guile rule.
1060 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1061 (%.o): Remove unittests rule.
1062 (CONFIG_SRC_SUBDIR): Add unittests.
1066 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1067 (CONFIG_SRC_SUBDIR): Add tui.
1068 (%.o): Remove tui rule.
1072 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1073 (%.o): Remove compile rule.
1074 (CONFIG_SRC_SUBDIR): Add compile.
1078 * Makefile.in (SUBDIR_MI_OBS): Redefine.
1079 (%.o): Remove mi rule.
1080 (CONFIG_SRC_SUBDIR): Add mi.
1081 (COMMON_OBS): Use mi/mi-common.o
1085 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1086 (%.o): Remove cli rule.
1087 (CONFIG_SRC_SUBDIR): Add cli.
1091 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1092 * configure: Rebuild.
1093 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1094 (CONFIG_DEP_SUBDIR): New variable.
1095 (%.o): Add order-only dependency.
1096 ($(CONFIG_DEP_SUBDIR)): New target.
1101 * findcmd.c (_initialize_mem_search): Update find command help
1106 * python/python.c (do_start_initialization): Change progname
1107 type to gdb::unique_xmalloc_ptr. Release the pointer when using
1112 * common/format.h: Add include guards.
1116 * nat/linux-personality.h (class
1117 maybe_disable_address_space_randomization): New class.
1118 (maybe_disable_address_space_randomization): Don't declare
1120 * nat/linux-personality.c (restore_personality)
1121 (make_disable_asr_cleanup): Remove.
1122 (maybe_disable_address_space_randomization): Now a constructor.
1123 (~maybe_disable_address_space_randomization): New destructor.
1124 * linux-nat.c (linux_nat_create_inferior): Update.
1128 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1132 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1133 "cooked" register. Access only first four bytes of branch target
1139 * stap-probe.c (relocate_address): New function.
1140 (stap_probe::get_relocated_address): Use 'relocate_address'.
1141 (stap_probe::set_semaphore): Use 'relocate_address' and pass
1143 (stap_probe::clear_semaphore): Likewise.
1147 * dictionary.c: Include "safe-ctype.h".
1148 * minsyms.c: Include "safe-ctype.h".
1149 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1153 * completer.c (complete_line_internal_1): Skip spaces until the
1154 start of the command.
1158 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1159 cp_fq_symbol_name_matches. Pass language_cplus to
1161 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1162 (selftests::test_cp_symbol_name_cmp): New.
1163 (_initialize_cp_support): Register "cp_symbol_name_matches"
1165 * language.c (default_symbol_name_matcher): Pass language_minimal
1166 to strncmp_iw_with_mode.
1167 * utils.c: Include "cp-support.h" and <algorithm>.
1168 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1169 (cp_is_operator): New functions.
1170 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1171 skip whitespace in the symbol name when the lookup name doesn't
1172 have spaces, and vice versa.
1173 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1174 * utils.h (strncmp_iw_with_mode): Add language parameter.
1178 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1180 (print_it_exception): If available, display the exception
1182 * NEWS: Document new feature.
1186 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1190 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1191 (dtrace_probe::is_enabled, dtrace_probe::enable)
1192 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1194 * probe.c (gen_ui_out_table_header_info)
1195 (print_ui_out_not_applicables): Remove keyword 'struct' at
1200 * configure.tgt: Add arch/aarch64.o
1204 * common/common-utils.h: Include poison.h.
1205 (xfree): Remove declaration, add definition with static_assert.
1206 * common/common-utils.c (xfree): Remove.
1207 * common/poison.h (IsMallocatable): Define.
1208 (IsFreeable): Define.
1209 (free): Delete for non-freeable types.
1211 (XNEW): Undef and redefine.
1213 (XCNEW): Undef and redefine.
1215 (XDELETE): Undef and redefine.
1217 (XNEWVEC): Undef and redefine.
1219 (XCNEWVEC): Undef and redefine.
1221 (XRESIZEVEC): Undef and redefine.
1223 (XDELETEVEC): Undef and redefine.
1225 (XNEWVAR): Undef and redefine.
1227 (XCNEWVAR): Undef and redefine.
1229 (XRESIZEVAR): Undef and redefine.
1233 * gdbthread.h (private_thread_info): Define structure type, add
1234 virtual pure destructor.
1235 (thread_info) <priv>: Change type to unique_ptr.
1236 <private_dtor>: Remove.
1237 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1238 (private_thread_info::~private_thread_info): Provide default
1240 (thread_info::~thread_info): Don't call private_dtor nor
1242 * aix-thread.c (private_thread_info): Rename to ...
1243 (aix_thread_info): ... this.
1244 (get_aix_thread_info): New.
1245 (sync_threadlists): Adjust.
1247 (aix_thread_resume): Adjust.
1248 (aix_thread_fetch_registers): Adjust.
1249 (aix_thread_store_registers): Adjust.
1250 (aix_thread_extra_thread_info): Adjust.
1251 * darwin-nat.h (private_thread_info): Rename to ...
1252 (darwin_thread_info): ... this.
1253 (get_darwin_thread_info): New.
1254 * darwin-nat.c (darwin_init_thread_list): Adjust.
1255 (darwin_check_new_threads): Adjust.
1256 (thread_info_from_private_thread_info): Adjust.
1257 * linux-thread-db.c (private_thread_info): Rename to ...
1258 (thread_db_thread_info): ... this, initialize fields.
1259 (get_thread_db_thread_info): New.
1260 <dying>: Change type to bool.
1261 (update_thread_state): Adjust to type rename.
1262 (record_thread): Adjust to type rename an use of unique_ptr.
1263 (thread_db_pid_to_str): Likewise.
1264 (thread_db_extra_thread_info): Likewise.
1265 (thread_db_thread_handle_to_thread_info): Likewise.
1266 (thread_db_get_thread_local_address): Likewise.
1267 * nto-tdep.h (private_thread_info): Rename to ...
1268 (nto_thread_info): ... this, initialize fields.
1269 (get_nto_thread_info): New.
1270 <name>: Change type to std::string.
1271 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1273 * nto-procfs.c (update_thread_private_data_name): Adjust to
1274 std::string change, allocate nto_private_thread_info with new.
1275 (update_thread_private_data): Adjust to unique_ptr.
1276 * remote.c (private_thread_info): Rename to ...
1277 (remote_thread_info): ... this, initialize data members with
1279 <extra, name>: Change type to std::string.
1280 <thread_handle>: Change type to non-pointer.
1281 (free_private_thread_info): Remove.
1282 (get_private_info_thread): Rename to...
1283 (get_remote_thread_info): ... this, change return type, adjust to
1284 use of unique_ptr, use remote_thread_info constructor.
1285 (remote_add_thread): Adjust.
1286 (get_private_info_ptid): Rename to...
1287 (get_remote_thread_info): ...this, change return type.
1288 (remote_thread_name): Use get_remote_thread_info, adjust to
1289 change to std::string.
1290 (struct thread_item) <~thread_item>: Remove.
1291 <thread_handle>: Make non pointer.
1292 (start_thread): Adjust to thread_item::thread_handle type
1294 (remote_update_thread_list): Adjust to type name change, move
1295 strings from temporary to long-lived object instead of
1297 (remote_threads_extra_info): Use get_remote_thread_info.
1298 (process_initial_stop_replies): Likewise.
1299 (resume_clear_thread_private_info): Likewise.
1300 (remote_resume): Adjust to type name change.
1301 (remote_commit_resume): Use get_remote_thread_info.
1302 (process_stop_reply): Adjust to type name change.
1303 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1304 (remote_stopped_by_hw_breakpoint): Likewise.
1305 (remote_stopped_by_watchpoint): Likewise.
1306 (remote_stopped_data_address): Likewise.
1307 (remote_core_of_thread): Likewise.
1308 (remote_thread_handle_to_thread_info): Use
1309 get_private_info_thread, adjust to thread_handle field type
1314 * remote.c (struct thread_item): Add constructor, disable copy
1315 construction and copy assignment, define default move
1316 construction and move assignment.
1317 <extra, name>: Change type to std::string.
1319 <thread_handle>: Make non-pointer.
1320 (thread_item_t): Remove typedef.
1321 (DEF_VEC_O(thread_item_t)): Remove.
1322 (threads_listing_context) <contains_thread>: New method.
1323 <remove_thread>: New method.
1324 <items>: Change type to std::vector.
1325 (clear_threads_listing_context): Remove.
1326 (threads_listing_context_remove): Remove.
1327 (remote_newthread_step): Use thread_item constructor, adjust to
1328 change to std::vector.
1329 (start_thread): Use thread_item constructor, adjust to change to
1331 (end_thread): Adjust to change to std::vector and std::string.
1332 (remote_get_threads_with_qthreadinfo): Use thread_item
1333 constructor, adjust to std::vector.
1334 (remote_update_thread_list): Adjust to change to std::vector and
1335 std::string, use threads_listing_context methods.
1336 (remove_child_of_pending_fork): Adjust.
1337 (remove_new_fork_children): Adjust.
1338 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1339 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1340 * unittests/rsp-low-selftests.c: New file.
1341 * common/rsp-low.h: Include common/byte-vector.h.
1342 (hex2bin): New overload.
1343 * common/rsp-low.c (hex2bin): New overload.
1347 * inferior.h (private_inferior): Define structure type, add
1348 virtual pure destructor.
1349 (inferior) <priv>: Change type to unique_ptr.
1350 * inferior.c (private_inferior::~private_inferior): Provide
1351 default implementation.
1352 (inferior::~inferior): Don't free priv field.
1353 (exit_inferior_1): Likewise.
1354 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1355 (darwin_exception_info): Remove typedef.
1356 (DEF_VEC_O (darwin_thread_t)); Remove.
1357 (private_inferior): Rename to ...
1358 (darwin_private_inferior): ... this, extend private_inferior.
1359 (get_darwin_inferior): New.
1360 <threads>: Change type to std::vector of darwin_thread_t pointers.
1361 * darwin-nat.c (darwin_check_new_threads): Adjust.
1362 (find_inferior_task_it): Adjust.
1363 (darwin_find_thread); Adjust.
1364 (darwin_suspend_inferior): Adjust.
1365 (darwin_resume_inferior): Adjust.
1366 (darwin_find_new_inferior): Adjust.
1367 (darwin_decode_notify_message): Adjust.
1368 (darwin_send_reply): Adjust.
1369 (darwin_resume_inferior_threads): Adjust.
1370 (darwin_suspend_inferior_threads): Adjust.
1371 (darwin_decode_message): Adjust.
1372 (darwin_wait): Adjust.
1373 (darwin_interrupt): Adjust.
1374 (darwin_deallocate_threads): Adjust.
1375 (darwin_mourn_inferior): Adjust, don't free private data.
1376 (darwin_reply_to_all_pending_messages): Adjust.
1377 (darwin_stop_inferior): Adjust.
1378 (darwin_setup_exceptions): Adjust.
1379 (darwin_kill_inferior): Adjust.
1380 (darwin_setup_request_notification): Adjust.
1381 (darwin_attach_pid): Adjust.
1382 (darwin_init_thread_list): Adjust.
1383 (darwin_setup_fake_stop_event): Adjust.
1384 (darwin_attach): Adjust.
1385 (darwin_detach): Adjust.
1386 (darwin_xfer_partial): Adjust.
1387 (set_enable_mach_exceptions): Adjust.
1388 (darwin_pid_to_exec_file): Adjust.
1389 (darwin_get_ada_task_ptid): Adjust.
1390 * darwin-nat-info.c (get_task_from_args): Adjust.
1391 (info_mach_ports_command): Adjust.
1392 (info_mach_region_command): Adjust.
1393 (info_mach_exceptions_command): Adjust.
1394 * remote.c (private_inferior): Rename to ...
1395 (remote_private_inferior): ... this, initialize fields.
1396 (get_remote_inferior); New.
1397 (remote_commit_resume): Use get_remote_inferior.
1398 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1402 * NEWS: Mention linespecs and explicit locations, and completion
1407 * regcache.c (regcache::dump): Remove footnote_register_size.
1411 * regcache.c (cooked_read_test): Add more test for readonly
1416 * gdbarch-selftests.c (test_target_has_registers): Move it to
1418 (test_target_has_stack): Likewise.
1419 (test_target_has_memory): Likewise.
1420 (test_target_prepare_to_store): Likewise.
1421 (test_target_store_registers): Likewise.
1422 (test_target_ops): Likewise.
1423 * regcache.c: Include selftest-arch.h and gdbthread.h.
1424 (target_ops_no_register): New class.
1425 (test_target_fetch_registers): New.
1426 (test_target_store_registers): New.
1427 (test_target_xfer_partial): New.
1428 (readwrite_regcache): New.
1429 (cooked_read_test): New.
1430 (_initialize_regcache): Register the test.
1431 * target.c: (test_target_has_registers): Moved from
1432 gdbarch-selftests.c.
1433 (test_target_has_stack): Likewise.
1434 (test_target_has_memory): Likewise.
1435 (test_target_prepare_to_store): Likewise.
1436 (test_target_store_registers): Likewise.
1437 * target.h (test_target_ops): New class.
1441 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1446 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1447 * arch/aarch64.c (aarch64_create_target_description): Create
1448 new target description.
1449 * features/Makefile: Add new files.
1450 * features/aarch64.c: Remove file.
1451 * features/aarch64-core.c: New autogenerated file.
1452 * features/aarch64-fpu.c: New autogenerated file.
1453 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1457 * Makefile.in: Add new files.
1458 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1459 aarch64_read_description.
1460 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1461 Call aarch64_read_description.
1462 * aarch64-tdep.c (aarch64_read_description): New function.
1463 (aarch64_gdbarch_init): Call aarch64_read_description.
1464 * aarch64-tdep.h (aarch64_read_description): New function.
1465 * arch/aarch64.c: New file.
1466 * configure.tgt: Add new files.
1470 * mi/mi-main.c (register_changed_p): Update.
1471 * value.c (value_contents_bits_eq): Change return type.
1472 (value_contents_eq): Likewise.
1473 * value.h: Update comments.
1477 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1478 local 'changed'. Remove error.
1479 (register_changed_p): Change return type to bool.
1483 * arch/tic6x.c: New file.
1484 * arch/tic6x.h: New file.
1485 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1486 tic6x-core.xml and tic6x-gp.xml.
1487 * features/tic6x-c6xp.c: Generated.
1488 * features/tic6x-core.c: Generated.
1489 * features/tic6x-gp.c: Generated.
1490 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1495 * mi/mi-main.c (list_available_thread_groups): Change map value
1496 type to std::vector.
1500 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1504 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1506 <children_requested>: ... this.
1507 (varobj_get_num_children, varobj_update): Adjust.
1511 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1512 (ada_value_has_mutated): Likewise.
1513 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1514 (c_is_path_expr_parent): Likewise.
1515 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1516 (mi_cmd_var_set_frozen): Likewise.
1517 (mi_cmd_var_update_iter): Likewise.
1518 (mi_cmd_var_update): Likewise.
1519 * varobj.c (pretty_printing): Likewise.
1520 (varobj_enable_pretty_printing): Likewise.
1521 (struct varobj_root) <floating, is_valid>: Likewise.
1522 (struct varobj_dynamic) <children_requested>: Likewise.
1523 (delete_variable): Likewise.
1524 (delete_variable_1): Likewise.
1525 (install_variable): Likewise.
1526 (update_type_if_necessary): Likewise.
1527 (install_new_value): Likewise.
1528 (value_of_root): Likewise.
1529 (is_root_p): Likewise.
1530 (varobj_create): Likewise.
1531 (varobj_delete): Likewise.
1532 (varobj_has_more): Likewise.
1533 (varobj_set_frozen): Likewise.
1534 (varobj_get_frozen): Likewise.
1535 (install_dynamic_child): Likewise.
1536 (dynamic_varobj_has_child_method): Likewise.
1537 (update_dynamic_varobj_children): Likewise.
1538 (varobj_get_num_children): Likewise.
1539 (varobj_list_children): Likewise.
1540 (is_path_expr_parent): Likewise.
1541 (varobj_default_is_path_expr_parent): Likewise.
1542 (varobj_is_dynamic_p): Likewise.
1543 (varobj_set_value): Likewise.
1544 (varobj_value_has_mutated): Likewise.
1545 (varobj_update): Likewise.
1546 (check_scope): Likewise.
1547 (value_of_root_1): Likewise.
1548 (varobj_value_get_print_value): Likewise.
1549 (varobj_editable_p): Likewise.
1550 (varobj_value_is_changeable_p): Likewise.
1551 (varobj_floating_p): Likewise.
1552 (varobj_default_value_is_changeable_p): Likewise.
1553 (varobj_invalidate_iter): Likewise.
1554 * varobj.h (struct varobj_update_result) <type_changed,
1555 children_changed, changed, value_installed>: Likewise.
1556 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1557 (struct lang_varobj_ops) <value_is_changeable_p,
1558 value_has_mutated, is_path_expr_parent>: Likewise.
1559 (varobj_delete): Likewise.
1560 (varobj_set_frozen): Likewise.
1561 (varobj_get_frozen): Likewise.
1562 (varobj_set_value): Likewise.
1563 (varobj_update): Likewise.
1564 (varobj_editable_p): Likewise.
1565 (varobj_floating_p): Likewise.
1566 (varobj_has_more): Likewise.
1567 (varobj_is_dynamic_p): Likewise.
1568 (varobj_default_value_is_changeable_p): Likewise.
1569 (varobj_value_is_changeable_p): Likewise.
1570 (varobj_is_anonymous_child): Likewise.
1571 (varobj_default_is_path_expr_parent): Likewise.
1575 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1576 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1577 <type_str>: Convert to 'std::string'.
1578 <expr>: Convert to 'expression_up'.
1579 (dtrace_probe_arg_s): Delete type and VEC.
1580 (dtrace_probe_enabler_s): Likewise.
1581 (struct dtrace_probe): Replace by...
1582 (class dtrace_static_probe_ops): ...this and...
1583 (class dtrace_probe): ...this.
1584 (dtrace_probe_is_linespec): Rename to...
1585 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1587 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1588 Adjust code. Create new instance of 'dtrace_probe'.
1589 (dtrace_build_arg_exprs): Rename to...
1590 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1592 (dtrace_get_probes): Rename to...
1593 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1595 (dtrace_get_arg): Rename to...
1596 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1598 (dtrace_probe_is_enabled): Rename to...
1599 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1601 (dtrace_get_probe_address): Rename to...
1602 (dtrace_probe::get_relocated_address): ...this. Adjust code
1604 (dtrace_get_probe_argument_count): Rename to...
1605 (dtrace_probe::get_argument_count): ...this. Adjust code to
1607 (dtrace_can_evaluate_probe_arguments): Rename to...
1608 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1610 (dtrace_evaluate_probe_argument): Rename to...
1611 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1613 (dtrace_compile_to_ax): Rename to...
1614 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1616 (dtrace_probe_destroy): Delete.
1617 (dtrace_type_name): Rename to...
1618 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1620 (dtrace_probe::get_static_ops): New method.
1621 (dtrace_gen_info_probes_table_header): Rename to...
1622 (dtrace_static_probe_ops::gen_info_probes_table_header):
1623 ...this. Adjust code to reflect change.
1624 (dtrace_gen_info_probes_table_values): Rename to...
1625 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1626 code to reflect change.
1627 (dtrace_enable_probe): Rename to...
1628 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1630 (dtrace_disable_probe): Rename to...
1631 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1633 (struct probe_ops dtrace_probe_ops): Delete.
1634 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1635 instead of 'info_probes_for_ops'.
1636 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1642 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1644 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1645 <aexpr>: Change type to 'expression_up'.
1646 (stap_probe_arg_s): Delete type and VEC.
1647 (struct stap_probe): Delete. Replace by...
1648 (class stap_static_probe_ops): ...this and...
1649 (class stap_probe): ...this. Rename variables to add 'm_'
1650 prefix. Do not use 'union' for arguments anymore.
1651 (stap_get_expected_argument_type): Receive probe name instead
1652 of 'struct stap_probe'. Adjust code.
1653 (stap_parse_probe_arguments): Rename to...
1654 (stap_probe::parse_arguments): ...this. Adjust code to
1656 (stap_get_probe_address): Rename to...
1657 (stap_probe::get_relocated_address): ...this. Adjust code
1659 (stap_get_probe_argument_count): Rename to...
1660 (stap_probe::get_argument_count): ...this. Adjust code
1662 (stap_get_arg): Rename to...
1663 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1665 (can_evaluate_probe_arguments): Rename to...
1666 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1668 (stap_evaluate_probe_argument): Rename to...
1669 (stap_probe::evaluate_argument): ...this. Adjust code
1671 (stap_compile_to_ax): Rename to...
1672 (stap_probe::compile_to_ax): ...this. Adjust code to
1674 (stap_probe_destroy): Delete.
1675 (stap_modify_semaphore): Adjust comment.
1676 (stap_set_semaphore): Rename to...
1677 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1679 (stap_clear_semaphore): Rename to...
1680 (stap_probe::clear_semaphore): ...this. Adjust code to
1682 (stap_probe::get_static_ops): New method.
1683 (handle_stap_probe): Adjust code to create instance of
1685 (stap_get_probes): Rename to...
1686 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1688 (stap_probe_is_linespec): Rename to...
1689 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1691 (stap_type_name): Rename to...
1692 (stap_static_probe_ops::type_name): ...this. Adjust code to
1694 (stap_gen_info_probes_table_header): Rename to...
1695 (stap_static_probe_ops::gen_info_probes_table_header):
1696 ...this. Adjust code to reflect change.
1697 (stap_gen_info_probes_table_values): Rename to...
1698 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1699 code to reflect change.
1700 (struct probe_ops stap_probe_ops): Delete.
1701 (info_probes_stap_command): Use 'info_probes_for_spops'
1702 instead of 'info_probes_for_ops'.
1703 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1708 * break-catch-throw.c (fetch_probe_arguments): Use
1709 'probe.prob' instead of 'probe.probe'.
1710 * breakpoint.c (create_longjmp_master_breakpoint): Call
1711 'can_evaluate_arguments' and 'get_relocated_address' methods
1713 (create_exception_master_breakpoint): Likewise.
1714 (add_location_to_breakpoint): Use 'sal->prob' instead of
1716 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1718 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1719 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1721 (probe_key_free): Call 'delete' on probe.
1722 (check_exception_resume): Use 'probe.prob' instead of
1724 * location.c (string_to_event_location_basic): Call
1725 'probe_linespec_to_static_ops'.
1726 * probe.c (class any_static_probe_ops): New class.
1727 (any_static_probe_ops any_static_probe_ops): New variable.
1728 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1729 argument. Adjust code to reflect change.
1730 (parse_probes): Use 'static_probe_ops' instead of
1731 'probe_ops'. Adjust code to reflect change.
1732 (find_probes_in_objfile): Call methods to get name and
1733 provider from probe.
1734 (find_probe_by_pc): Use 'result.prob' instead of
1735 'result.probe'. Call 'get_relocated_address' method from
1737 (collect_probes): Adjust comment and argument list to receive
1738 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1739 reflect change. Call necessary methods from probe.
1740 (compare_probes): Call methods to get name and provider from
1742 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1743 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1744 adjust code accordingly.
1745 (print_ui_out_not_applicables): Likewise.
1746 (info_probes_for_ops): Rename to...
1747 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1748 as argument instead of 'probe_ops'. Adjust code. Call
1749 necessary methods from probe.
1750 (info_probes_command): Use 'info_probes_for_spops'.
1751 (enable_probes_command): Pass correct argument to
1752 'collect_probes'. Call methods from probe.
1753 (disable_probes_command): Likewise.
1754 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1755 (get_probe_argument_count): Move to
1756 'any_static_probe_ops::get_argument_count'.
1757 (can_evaluate_probe_arguments): Move to
1758 'any_static_probe_ops::can_evaluate_arguments'.
1759 (evaluate_probe_argument): Move to
1760 'any_static_probe_ops::evaluate_argument'.
1761 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1763 (probe_linespec_to_ops): Rename to...
1764 (probe_linespec_to_static_ops): ...this. Adjust code.
1765 (probe_any_is_linespec): Rename to...
1766 (any_static_probe_ops::is_linespec): ...this.
1767 (probe_any_get_probes): Rename to...
1768 (any_static_probe_ops::get_probes): ...this.
1769 (any_static_probe_ops::type_name): New method.
1770 (any_static_probe_ops::gen_info_probes_table_header): New
1772 (compute_probe_arg): Use 'pc_probe.prob' instead of
1773 'pc_probe.probe'. Call methods from probe.
1774 (compile_probe_arg): Likewise.
1775 (std::vector<const probe_ops *> all_probe_ops): Delete.
1776 (std::vector<const static_probe_ops *> all_static_probe_ops):
1778 (_initialize_probe): Use 'all_static_probe_ops' instead of
1780 * probe.h (struct info_probe_column) <field_name>: Delete
1782 (info_probe_column_s): Delete type and VEC.
1783 (struct probe_ops): Delete. Replace with...
1784 (class static_probe_ops): ...this and...
1785 (clas probe): ...this.
1786 (struct bound_probe) <bound_probe>: Delete extraneous
1787 newline. Adjust constructor to receive 'probe' instead of
1789 <probe>: Rename to...
1790 <prob>: ...this. Delete extraneous newline.
1791 <objfile>: Delete extraneous newline.
1792 (register_probe_ops): Delete unused prototype.
1793 (info_probes_for_ops): Rename to...
1794 (info_probes_for_spops): ...this. Adjust comment.
1795 (get_probe_address): Move to 'probe::get_address'.
1796 (get_probe_argument_count): Move to
1797 'probe::get_argument_count'.
1798 (can_evaluate_probe_arguments): Move to
1799 'probe::can_evaluate_arguments'.
1800 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1801 * solib-svr4.c (struct svr4_info): Adjust comment.
1802 (struct probe_and_action) <probe>: Rename to...
1804 (register_solib_event_probe): Receive 'probe' instead of
1805 'struct probe' as argument. Use 'prob' instead of 'probe'
1807 (solib_event_probe_action): Call 'get_argument_count' method
1808 from probe. Adjust comment.
1809 (svr4_handle_solib_event): Adjust comment. Call
1810 'evaluate_argument' method from probe.
1811 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1813 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1814 'struct probe'. Call 'can_evaluate_arguments' from probe.
1815 * symfile.h: Forward declare 'class probe' instead of 'struct
1817 * symtab.h: Likewise.
1818 (struct symtab_and_line) <probe>: Rename to...
1820 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1822 (stop_tracing): Likewise.
1826 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1827 trailing newline at end of string in call to warning.
1831 * osdata.h: Include vector isntead of vec.h.
1832 (osdata_column_s): Remove typedef.
1833 (struct osdata_column): Add constructor.
1834 <name, value>: Change type to std::string.
1835 (DEF_VEC_O (osdata_column_s)): Remove.
1836 (osdata_item_s): Remove typedef.
1837 (struct osdata_item) <columns>: Change type to std::vector.
1838 (DEF_VEC_O (osdata_item_s)): Remove.
1839 (struct osdata): Add constructor.
1840 <type>: Change type to std::string.
1841 <items>: Change type to std::vector.
1842 (osdata_p): Remove typedef.
1843 (DEF_VEC_P (osdata_p)): Remove.
1844 (osdata_parse): Return a unique_ptr.
1845 (osdata_free): Remove.
1846 (make_cleanup_osdata_free): Remove.
1847 (get_osdata): Return a unique_ptr.
1848 (get_osdata_column): Return pointer to std::string, take a
1849 reference to osdata_item as parameter.
1850 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1852 <property_name>: Change type to std::string.
1853 (osdata_start_osdata): Allocate osdata with new and adjust.
1854 (osdata_start_item): Adjust.
1855 (osdata_start_column): Adjust.
1856 (osdata_end_column): Adjust.
1857 (clear_parsing_data): Remove.
1858 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1859 (osdata_item_clear): Remove.
1860 (get_osdata): return a unique_ptr and adjust.
1861 (get_osdata_column): Return a pointer to std::string and adjust.
1862 (info_osdata): Adjust.
1863 * mi/mi-main.c: Include <map>.
1864 (free_vector_of_osdata_items): Remove.
1865 (list_available_thread_groups): Adjust, use std::map instead of
1870 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1875 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1879 * varobj.h (struct varobj_update_result): Add constructor, add
1880 move constructor, disable copy and assign, initialize fields.
1881 <newobj>: Change type to std::vector.
1882 (varobj_update): Return std::vector.
1883 * varobj.c (install_dynamic_child): Change VEC parameters to
1884 std::vector and adjust.
1885 (update_dynamic_varobj_children): Likewise.
1886 (varobj_update): Return std::vector and adjust.
1887 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1891 * varobj.h (struct varobj) <parent>: Remove const.
1892 <children>: Change type to std::vector.
1893 (varobj_list_children): Return std::vector const reference.
1894 (varobj_restrict_range): Change parameter type to std::vector
1896 * varobj.c (varobj_has_more): Adjust.
1897 (varobj_restrict_range): Change parameter type to std::vector
1898 const reference and adjust.
1899 (install_dynamic_child): Adjust.
1900 (update_dynamic_varobj_children): Adjust.
1901 (varobj_list_children): Return std::vector const reference and
1903 (varobj_add_child): Adjust.
1904 (update_type_if_necessary): Adjust.
1905 (varobj_update): Adjust.
1906 (delete_variable_1): Adjust.
1907 * ada-varobj.c (ada_value_has_mutated): Adjust.
1908 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1912 * varobj.h (struct varobj): Add constructor and destructor,
1914 * varobj.c (struct varobj_root): Initialize fields.
1915 (struct varobj_dynamic): Initialize fields.
1916 (varobj_create): Use unique_ptr instead of cleanup. Create
1917 varobj with new instead of new_root_variable.
1918 (delete_variable_1): Free variable with delete instead of
1920 (create_child_with_value): Create variable with new instead of
1922 (varobj::varobj): New.
1923 (varobj::~varobj): New (body mostly coming from free_variable).
1924 (new_variable): Remove.
1925 (free_variable): Remove.
1926 (do_free_variable_cleanup): Remove.
1927 (make_cleanup_free_variable): Remove.
1931 * core-regset.c: Remove file.
1932 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1936 * NEWS: Document use of GNU MPFR.
1939 * Makefile.in (LIBMPFR): Add define.
1940 (CLIBS): Add $(LIBMPFR).
1941 * configure.ac: Add --with-mpfr configure option.
1942 * configure: Regenerate.
1943 * config.in: Regenerate.
1945 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1946 (class mpfr_float_ops): New type.
1947 (mpfr_float_ops::from_target): Two new overloaded functions.
1948 (mpfr_float_ops::to_target): Likewise.
1949 (mpfr_float_ops::to_string): New function.
1950 (mpfr_float_ops::from_string): Likewise.
1951 (mpfr_float_ops::to_longest): Likewise.
1952 (mpfr_float_ops::from_longest): Likewise.
1953 (mpfr_float_ops::from_ulongest): Likewise.
1954 (mpfr_float_ops::to_host_double): Likewise.
1955 (mpfr_float_ops::from_host_double): Likewise.
1956 (mpfr_float_ops::convert): Likewise.
1957 (mpfr_float_ops::binop): Likewise.
1958 (mpfr_float_ops::compare): Likewise.
1959 (get_target_float_ops): Use mpfr_float_ops if available.
1963 * target-float.c: Do not include <math.h>.
1964 Include <cmath> and <limits>.
1965 (DOUBLEST): Do not define.
1966 (class target_float_ops): New type.
1967 (class host_float_ops): New templated type.
1968 (class decimal_float_ops): New type.
1970 (floatformat_to_doublest): Rename to ...
1971 (host_float_ops<T>::from_target): ... this. Use template type T
1972 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1973 (host_float_ops<T>::from_target): New overload using a type argument.
1974 (floatformat_from_doublest): Rename to ...
1975 (host_float_ops<T>::to_target): ... this. Use template type T
1976 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1977 (host_float_ops<T>::to_target): New overload using a type argument.
1978 (floatformat_printf_format): New function.
1979 (struct printf_length_modifier): New templated type.
1980 (floatformat_to_string): Rename to ...
1981 (host_float_ops<T>::to_string): ... this. Use type instead of
1982 floatformat argument. Use floatformat_printf_format and
1983 printf_length_modifier. Remove special handling of invalid numbers,
1984 infinities and NaN (moved to target_float_to_string).
1985 (struct scanf_length_modifier): New templated type.
1986 (floatformat_from_string): Rename to ...
1987 (host_float_ops<T>::from_string): ... this. Use type instead of
1988 floatformat argument. Use scanf_length_modifier.
1989 (floatformat_to_longest): Rename to ...
1990 (host_float_ops<T>::to_longest): ... this. Use type instead of
1991 floatformat argument. Handle out-of-range values deterministically.
1992 (floatformat_from_longest): Rename to ...
1993 (host_float_ops<T>::from_longest): ... this. Use type instead of
1994 floatformat argument.
1995 (floatformat_from_ulongest): Rename to ...
1996 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1997 floatformat argument.
1998 (floatformat_to_host_double): Rename to ...
1999 (host_float_ops<T>::to_host_double): ... this. Use type instead of
2000 floatformat argument.
2001 (floatformat_from_host_double): Rename to ...
2002 (host_float_ops<T>::from_host_double): ... this. Use type instead of
2003 floatformat argument.
2004 (floatformat_convert): Rename to ...
2005 (host_float_ops<T>::convert): ... this. Use type instead of
2006 floatformat arguments. Remove handling of no-op conversions.
2007 (floatformat_binop): Rename to ...
2008 (host_float_ops<T>::binop): ... this. Use type instead of
2009 floatformat arguments.
2010 (floatformat_compare): Rename to ...
2011 (host_float_ops<T>::compare): ... this. Use type instead of
2012 floatformat arguments.
2014 (match_endianness): Use type instead of length/byte_order arguments.
2015 (set_decnumber_context): Likewise.
2016 (decimal_from_number): Likewise. Update calls.
2017 (decimal_to_number): Likewise.
2018 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
2019 (decimal_float_ops::to_host_double): New dummy function.
2020 (decimal_float_ops::from_host_double): Likewise.
2021 (decimal_to_string): Rename to ...
2022 (decimal_float_ops::to_string): ... this. Use type instead of
2023 length/byte_order arguments. Update calls.
2024 (decimal_from_string): Rename to ...
2025 (decimal_float_ops::from_string): ... this. Use type instead of
2026 length/byte_order arguments. Update calls.
2027 (decimal_from_longest): Rename to ...
2028 (decimal_float_ops::from_longest): ... this. Use type instead of
2029 length/byte_order arguments. Update calls.
2030 (decimal_from_ulongest): Rename to ...
2031 (decimal_float_ops::from_ulongest): ... this. Use type instead of
2032 length/byte_order arguments. Update calls.
2033 (decimal_to_longest): Rename to ...
2034 (decimal_float_ops::to_longest): ... this. Use type instead of
2035 length/byte_order arguments. Update calls.
2036 (decimal_binop): Rename to ...
2037 (decimal_float_ops::binop): ... this. Use type instead of
2038 length/byte_order arguments. Update calls.
2039 (decimal_compare): Rename to ...
2040 (decimal_float_ops::compare): ... this. Use type instead of
2041 length/byte_order arguments. Update calls.
2042 (decimal_convert): Rename to ...
2043 (decimal_float_ops::convert): ... this. Use type instead of
2044 length/byte_order arguments. Update calls.
2046 (target_float_same_category_p): New function.
2047 (target_float_same_format_p): Likewise.
2048 (target_float_format_length): Likewise.
2049 (enum target_float_ops_kind): New type.
2050 (get_target_float_ops_kind): New function.
2051 (get_target_float_ops): Three new overloaded functions.
2053 (target_float_is_zero): Update call.
2054 (target_float_to_string): Add special handling of invalid numbers,
2055 infinities and NaN (moved from floatformat_to_string). Use
2056 target_float_ops callback.
2057 (target_float_from_string): Use target_float_ops callback.
2058 (target_float_to_longest): Likewise.
2059 (target_float_from_longest): Likewise.
2060 (target_float_from_ulongest): Likewise.
2061 (target_float_to_host_double): Likewise.
2062 (target_float_from_host_double): Likewise.
2063 (target_float_convert): Add special case for no-op conversions.
2064 Use target_float_ops callback.
2065 (target_float_binop): Use target_float_ops callback.
2066 (target_float_compare): Likewise.
2070 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2074 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2075 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2079 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2080 with event ptid from the lower layer before doing the
2081 ravenscar-specific update.
2085 * ravenscar-thread.c (is_ravenscar_task): Also verify that
2086 the ptid's TID is nonzero.
2090 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2091 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2092 Make non-static. Change return type to char *. Adjust code
2093 accordingly. Rewrite the function's documentation.
2094 (read_atcb): Adjust call to get_tcb_types_info accordingly.
2095 * ravenscar-thread.c (ravenscar_inferior_created): Check that
2096 we have enough debugging information in the runtime to support
2097 Ada task debugging before we enable the ravenscar-thread layer.
2101 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2102 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2103 * ravenscar-thread.c: Add into comment.
2104 (base_magic_null_ptid): Delete.
2105 (base_ptid): Change documentation.
2106 (ravenscar_active_task): Renames ravenscar_running_thread.
2107 All callers updated throughout.
2108 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2109 (ravenscar_task_is_currently_active): Likewise.
2110 (get_base_thread_from_ravenscar_task): Ditto.
2111 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2112 (ravenscar_runtime_initialized): Likewise.
2113 (get_running_thread_id): Add new parameter "cpu". Adjust
2114 implementation to handle this new parameter.
2115 (ravenscar_fetch_registers): Small adjustment to use
2116 is_ravenscar_task and ravenscar_task_is_currently_active in
2117 order to decide whether to use the target beneath or this
2119 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2120 (ravenscar_stopped_by_sw_breakpoint): Use
2121 get_base_thread_from_ravenscar_task to get the underlying
2122 thread, rather than using base_ptid.
2123 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2124 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2126 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2130 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2131 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2132 (get_tcb_types_info): Set fieldnos.base_cpu.
2133 (read_atcb): Set task_info->base_cpu.
2134 (info_task): Print "Base CPU" info if set by runtime.
2138 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2139 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2140 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2142 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2143 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2144 to_stopped_data_address and to_core_of_thread fields of
2149 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2150 (struct gdbarch_tdep): New member long_double_abi.
2151 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2152 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2153 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2154 format depending on long_double_abi tdep member.
2155 (ppc_floatformat_for_type): Handle __ibm128 type.
2159 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2163 * dwarf2read.c (mapped_index::find_name_components_bounds)
2164 <completion mode, upper bound>: Use std::lower_bound instead of
2166 (test_mapped_index_find_name_component_bounds): Remove incorrect
2167 "t1_fund" from expected symbols.
2171 * dwarf2read.c (mapped_index::name_components_casing): New field.
2172 (mapped_index) <build_name_components,
2173 find_name_components_bounds): Declare new methods.
2174 (mapped_index::find_name_components_bounds)
2175 (mapped_index::build_name_components): New methods, factored out
2176 from dw2_expand_symtabs_matching_symbol.
2177 (check_find_bounds_finds)
2178 (test_mapped_index_find_name_component_bounds): New.
2179 (run_test): Rename to ...
2180 (test_dw2_expand_symtabs_matching_symbol): ... this.
2181 (run_test): Reimplement.
2185 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2186 (symbol_end): Use cp_ident_is_alnum.
2187 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2188 * dwarf2read.c (make_sort_after_prefix_name): New function.
2189 (dw2_expand_symtabs_matching_symbol): Use it.
2190 (test_symbols): Add more symbols.
2191 (run_test): Add tests.
2195 * symtab.h (enum symbol_subclass_kind): New.
2196 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2198 <subclass>: New member.
2199 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2200 * rust-lang.c (rust_get_trait_object_pointer): Update.
2201 * dwarf2read.c (read_func_scope): Update.
2202 (read_variable): Update.
2206 * dwarf2read.c (read_func_scope): Update.
2207 * symtab.h (struct template_symbol): Derive from symbol.
2212 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2213 (struct rust_vtable_symbol): New.
2214 (find_symbol_at_address): Declare.
2215 * symtab.c (find_symbol_at_address): New function.
2216 * symfile.h (struct quick_symbol_functions)
2217 <find_compunit_symtab_by_address>: New member.
2218 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2220 (debug_sym_quick_functions): Link to
2221 debug_qf_find_compunit_symtab_by_address.
2222 * rust-lang.c (rust_get_trait_object_pointer): New function.
2223 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2224 rust_get_trait_object_pointer.
2225 * psymtab.c (psym_relocate): Clear psymbol_map.
2226 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2228 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2229 * objfiles.h (struct objfile) <psymbol_map>: New member.
2230 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2231 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2232 (rust_containing_type, read_variable): New functions.
2236 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2240 * common/filestuff.c: Include <algorithm>.
2241 (open_fds): Change type to std::vector<int>.
2242 (do_mark_open_fd): Adjust.
2243 (unmark_fd_no_cloexec): Adjust.
2248 * breakpoint.c (output_thread_groups): Take an std::vector.
2249 (print_one_breakpoint_location): Adjust.
2253 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2254 (ada_evaluate_subexp_for_cast): New function.
2255 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2256 ada_evaluate_subexp_for_cast.
2257 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2259 * eval.c (evaluate_var_value): Make non-static.
2260 (evaluate_var_msym_value, eval_skip_value): Likewise.
2261 * value.h (evaluate_var_value, evaluate_var_msym_value)
2262 (eval_skip_value): Declare.
2266 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2271 * python/py-unwind.c (pyuw_sniffer): Translate
2272 PyExc_KeyboardInterrupt to a GDB Quit exception.
2276 * infrun.c (resume_cleanups): Delete.
2277 (resume): No longer install a resume_cleanups cleanup nor call
2279 (proceed): Pass the terminal to the inferior.
2280 (keep_going_pass_signal): No longer install a resume_cleanups
2285 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2286 if the prompt is blocked.
2290 * breakpoint.c (insert_bp_location): Replace bp_err and
2291 bp_err_message locals by a gdb_exception local.
2295 * inflow.c (scoped_ignore_sigttou): New class.
2296 (child_terminal_ours_1, new_tty): Use it.
2300 * target-float.c (decimal_from_number): Add byte_order argument and
2301 call match_endianness. Error if unknown floating-point type.
2302 (decimal_to_number): Add byte_order argument and call match_endianness.
2303 (decimal_from_longest): Update call. Do not call match_endianness.
2304 (decimal_from_ulongest): Likewise.
2305 (decimal_binop): Likewise.
2306 (decimal_is_zero): Likewise.
2307 (decimal_compare): Likewise.
2308 (decimal_convert): Likewise.
2312 * python/python.c (gdbpy_rbreak): New function.
2313 * NEWS: Document Python rbreak feature.
2317 * features/tic6x-c62x.xml: Remove.
2318 * features/tic6x-c64x.xml: Remove.
2319 * features/tic6x-c64xp.xml: Remove.
2323 * symtab.h: Include <array>.
2327 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2328 (bsd_kvm_proc_cmd): Likewise.
2332 * tui/tui-win.c (window_name_completer): Replace VEC with
2337 * MAINTAINERS: Remove no-longer applicable entries.
2341 * MAINTAINERS: Move self to Past Maintainers.
2345 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2346 * features/nios2-linux.c: Remove.
2347 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2348 initialize_tdesc_nios2_linux.
2352 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2353 M68HC11_LAST_HARD_REG + 1.
2358 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2359 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2360 Return TARGET_XFER_EOF if size of returned data is 0.
2364 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2365 memory-map-selftests.c.
2366 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2367 * memory-map.c (memory_map_start_memory): Fix computation of hi
2369 * unittests/memory-map-selftests.c: New file.
2373 * ada-lang.c: Fix some typos in the general command documenting
2374 how Ada expressions are being evaluated and how their result
2379 * psymtab.c (psymbol_hash): Do not hash string contents.
2380 (psymbol_compare): Add comment.
2384 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2388 * ada-exp.y (write_var_from_sym): Remove parameter
2389 "orig_left_context". Update all callers.
2393 * tracepoint.h (class collection_list) <stringify>: Return
2394 std::vector<std::string>.
2395 (encode_actions_rsp): Change parameters to
2396 std::vector<std::string> *.
2397 * tracepoint.c (collection_list::stringify): Return
2398 std::vector<std::string> and adjust accordingly.
2399 (encode_actions_rsp): Changee parameters to
2400 std::vector<std::string> and adjust accordingly.
2401 * remote.c (free_actions_list),
2402 free_actions_list_cleanup_wrapper): Remove.
2403 (remote_download_tracepoint): Adjust to std::vector.
2407 * dwarf2read.c (symbolp): Remove typedef.
2408 (read_func_scope): Use std::vector.
2409 (process_structure_scope): Use std::vector.
2413 * ada-lang.c (ada_make_symbol_completion_list): Use
2414 completion_skip_symbol.
2415 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2416 (symbol_is_function_or_method(symbol*)): New.
2417 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2418 completion_skip_symbol.
2419 (default_collect_symbol_completion_matches_break_on): Use
2420 completion_skip_symbol. Pass down mode.
2421 (collect_file_symbol_completion_matches): Pass down mode.
2422 * symtab.h (symbol_is_function_or_method): New declarations.
2423 (completion_skip_symbol): New template function.
2427 * linespec.c (iterate_over_all_matching_symtabs): Add
2428 search_domain parameter. Pass it down to expand_symtabs_matching.
2429 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2430 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2432 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2434 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2436 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2441 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2442 text_len locals and don't pass them down.
2443 * symtab.c (completion_list_add_name): Remove
2444 sym_text/sym_text_len parameters and adjust.
2445 (completion_list_add_symbol, completion_list_add_msymbol)
2446 (completion_list_objc_symbol, completion_list_add_fields)
2447 (add_symtab_completions): Likewise.
2448 (default_collect_symbol_completion_matches_break_on)
2449 (collect_file_symbol_completion_matches): Remove sym_text_len
2450 local and don't pass it down.
2451 * symtab.h (completion_list_add_name): Remove
2452 sym_text/sym_text_len parameters.
2456 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2457 unittests/lookup_name_info-selftests.c.
2458 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2459 * cp-support.c: Include "selftest.h".
2460 (cp_remove_params_1): Rename from cp_remove_params. Add
2461 'require_param' parameter, and handle it.
2462 (cp_remove_params): Reimplement.
2463 (cp_remove_params_if_any): New.
2464 (selftests::quote): New.
2465 (selftests::check_remove_params): New.
2466 (selftests::test_cp_remove_params): New.
2467 (_initialize_cp_support): Install
2468 selftests::test_cp_remove_params.
2469 * cp-support.h (cp_remove_params_if_any): Declare.
2470 * dwarf2read.c :Include "selftest.h".
2471 (dw2_expand_symtabs_matching_symbol): Use
2472 lookup_name_info::make_ignore_params.
2473 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2474 (selftests::dw2_expand_symtabs_matching::string_or_null)
2475 (selftests::dw2_expand_symtabs_matching::check_match)
2476 (selftests::dw2_expand_symtabs_matching::test_symbols)
2477 (selftests::dw2_expand_symtabs_matching::run_test): New.
2478 (_initialize_dwarf2_read): Register
2479 selftests::dw2_expand_symtabs_matching::run_test.
2480 * psymtab.c (psym_expand_symtabs_matching): Use
2481 lookup_name_info::make_ignore_params.
2482 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2483 If the lookup name wants to ignore parameters, strip them.
2484 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2486 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2487 (default_collect_symbol_completion_matches_break_on): Don't try to
2489 * symtab.h (lookup_name_info::lookup_name_info): Add
2490 'ignore_parameters' parameter.
2491 (lookup_name_info::ignore_parameters)
2492 (lookup_name_info::make_ignore_params): New methods.
2493 (lookup_name_info::m_ignore_parameters): New field.
2494 * unittests/lookup_name_info-selftests.c: New file.
2498 * dwarf2read.c (dw2_expand_marked_cus)
2499 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2500 (dw2_expand_symtabs_matching): Move further below.
2501 (dw2_expand_marked_cus): Reindent.
2505 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2506 (struct name_component): New.
2507 (mapped_index::name_components): New field.
2508 (mapped_index::symbol_name_at): New method.
2509 (dwarf2_read_index): Call mapped_index ctor.
2510 (dw2_map_matching_symbols): Add comment about name_components
2512 (dw2_expand_symtabs_matching): Factor part to...
2513 (dw2_expand_symtabs_matching_symbol): ... this new function.
2514 Build name components table, and lookup symbols in it before
2515 calling the name matcher.
2516 (dw2_expand_marked_cus): New, factored out from
2517 dw2_expand_symtabs_matching.
2518 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2522 * ada-lang.c (ada_encode): Rename to ..
2523 (ada_encode_1): ... this. Add throw_errors parameter and handle
2525 (ada_encode): Reimplement.
2526 (match_name): Delete, folded into full_name.
2527 (resolve_subexp): No longer pass the encoded name to
2528 ada_lookup_symbol_list.
2529 (should_use_wild_match): Delete.
2530 (name_match_type_from_name): New.
2531 (ada_lookup_simple_minsym): Use lookup_name_info and the
2532 language's symbol_name_matcher_ftype.
2533 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2534 (ada_add_block_renamings): Adjust to use lookup_name_info.
2535 (ada_lookup_name): New.
2536 (add_nonlocal_symbols, ada_add_all_symbols)
2537 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2538 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2539 (ada_name_for_lookup): Delete.
2540 (ada_lookup_encoded_symbol): Construct a verbatim name.
2541 (wild_match): Reverse sense of return type. Use bool.
2542 (full_match): Reverse sense of return type. Inline bits of old
2544 (ada_add_block_symbols): Adjust to use lookup_name_info.
2545 (symbol_completion_match): Delete, folded into...
2546 (ada_lookup_name_info::matches): ... .this new method.
2547 (symbol_completion_add): Delete.
2548 (ada_collect_symbol_completion_matches): Add name_match_type
2549 parameter. Adjust to use lookup_name_info and
2550 completion_list_add_name.
2551 (get_var_value, ada_add_global_exceptions): Adjust to use
2553 (ada_get_symbol_name_cmp): Delete.
2554 (do_wild_match, do_full_match): New functions.
2555 (ada_lookup_name_info::ada_lookup_name_info): New method.
2556 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2558 (ada_language_defn): Install ada_get_symbol_name_matcher.
2559 * ada-lex.l (processId): If name starts with '<', copy it
2561 * block.c (block_iter_match_step, block_iter_match_first)
2562 (block_iter_match_next, block_lookup_symbol)
2563 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2565 * block.h (block_iter_match_first, block_iter_match_next)
2566 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2567 * c-lang.c (c_language_defn, cplus_language_defn)
2568 (asm_language_defn, minimal_language_defn): Adjust comments to
2569 refer to la_get_symbol_name_matcher.
2570 * completer.c (complete_files_symbols)
2571 (collect_explicit_location_matches, symbol_completer): Pass a
2572 symbol_name_match_type down.
2573 * completer.h (class completion_match, completion_match_result):
2575 (completion_tracker::reset_completion_match_result): New method.
2576 (completion_tracker::m_completion_match_result): New field.
2577 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2579 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2581 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2582 * d-lang.c: Adjust comments to refer to
2583 la_get_symbol_name_matcher.
2584 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2585 Adjust to use lookup_name_info.
2586 (dict_iter_match_first, dict_iter_match_next)
2587 (iter_match_first_hashed, iter_match_next_hashed)
2588 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2589 with a lookup_name_info.
2590 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2592 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2593 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2594 (gdb_index_symbol_name_matcher): New class.
2595 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2596 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2597 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2598 with a symbol_name_match_type.
2599 (f_language_defn): Adjust comments to refer to
2600 la_get_symbol_name_matcher.
2601 * go-lang.c (go_language_defn): Adjust comments to refer to
2602 la_get_symbol_name_matcher.
2603 * language.c (default_symbol_name_matcher)
2604 (language_get_symbol_name_matcher): New functions.
2605 (unknown_language_defn, auto_language_defn): Adjust comments to
2606 refer to la_get_symbol_name_matcher.
2607 * language.h (symbol_name_cmp_ftype): Delete.
2608 (language_defn) <la_collect_symbol_completion_matches>: Add match
2610 <la_get_symbol_name_cmp>: Delete field.
2611 <la_get_symbol_name_matcher>: New field.
2612 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2613 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2615 * linespec.c (iterate_over_all_matching_symtabs)
2616 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2617 (find_methods): Add language parameter, and use lookup_name_info
2618 and the language's symbol_name_matcher_ftype.
2619 (linespec_complete_function): Adjust.
2620 (lookup_prefix_sym): Use lookup_name_info.
2621 (add_all_symbol_names_from_pspace): Adjust.
2622 (find_superclass_methods): Add language parameter and pass it
2624 (find_method): Pass symbol language down.
2625 (find_linespec_symbols): Don't demangle or Ada encode here.
2626 (search_minsyms_for_name): Add lookup_name_info parameter.
2627 (add_matching_symbols_to_info): Add name_match_type parameter.
2628 Use lookup_name_info.
2629 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2630 la_get_symbol_name_matcher.
2631 * minsyms.c: Include <algorithm>.
2632 (add_minsym_to_demangled_hash_table): Remove table parameter and
2633 add objfile parameter. Use search_name_hash, and add language to
2634 demangled languages vector.
2635 (struct found_minimal_symbols): New struct.
2636 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2638 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2639 input names here. Use lookup_name_info instead. Lookup up
2640 demangled names once for each language in the demangled names
2642 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2643 demangled names once for each language in the demangled names
2645 (build_minimal_symbol_hash_tables): Adjust.
2646 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2648 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2649 la_get_symbol_name_matcher.
2650 * objfiles.h: Include <vector>.
2651 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2652 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2653 la_get_symbol_name_matcher.
2654 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2655 la_get_symbol_name_matcher.
2656 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2657 (match_partial_symbol): Use symbol_name_match_type,
2658 lookup_name_info and psymbol_name_matches.
2659 (lookup_partial_symbol): Use lookup_name_info.
2660 (map_block): Use symbol_name_match_type and lookup_name_info.
2661 (psym_map_matching_symbols): Use symbol_name_match_type.
2662 (psymbol_name_matches): New.
2663 (recursively_search_psymtabs): Use lookup_name_info and
2664 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2665 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2666 'kind' parameter to 'domain'.
2667 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2668 la_get_symbol_name_matcher.
2669 * symfile-debug.c (debug_qf_map_matching_symbols)
2670 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2671 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2672 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2673 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2674 Adjust to use symbol_name_match_type.
2675 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2676 (expand_symtabs_matching): Adjust to use lookup_name_info.
2677 * symmisc.c (maintenance_expand_symtabs): Use
2678 lookup_name_info::match_any ().
2679 * symtab.c (symbol_matches_search_name): New.
2680 (eq_symbol_entry): Adjust to use lookup_name_info and the
2682 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2683 (lookup_name_info::match_any): New.
2684 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2685 (compare_symbol_name): Add language, lookup_name_info and
2686 completion_match_result parameters, and use them.
2687 (completion_list_add_name): Make extern. Add language and
2688 lookup_name_info parameters. Use them.
2689 (completion_list_add_symbol, completion_list_add_msymbol)
2690 (completion_list_objc_symbol): Add lookup_name_info parameters and
2691 adjust. Pass down language.
2692 (completion_list_add_fields): Add lookup_name_info parameters and
2693 adjust. Pass down language.
2694 (add_symtab_completions): Add lookup_name_info parameters and
2696 (default_collect_symbol_completion_matches_break_on): Add
2697 name_match_type parameter, and use it. Use lookup_name_info.
2698 (default_collect_symbol_completion_matches)
2699 (collect_symbol_completion_matches): Add name_match_type
2700 parameter, and pass it down.
2701 (collect_symbol_completion_matches_type): Adjust.
2702 (collect_file_symbol_completion_matches): Add name_match_type
2703 parameter, and use lookup_name_info.
2704 * symtab.h: Include <string> and "common/gdb_optional.h".
2705 (enum class symbol_name_match_type): New.
2706 (class ada_lookup_name_info): New.
2707 (struct demangle_for_lookup_info): New.
2708 (class lookup_name_info): New.
2709 (symbol_name_matcher_ftype): New.
2710 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2711 (symbol_matches_search_name): Declare.
2712 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2713 (default_collect_symbol_completion_matches)
2714 (collect_symbol_completion_matches)
2715 (collect_file_symbol_completion_matches): Add name_match_type
2717 (iterate_over_symbols): Use lookup_name_info.
2718 (completion_list_add_name): Declare.
2719 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2720 (strncmp_iw_with_mode): Now extern.
2721 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2722 (strncmp_iw_with_mode): Declare.
2727 * ada-lang.c (ada_language_defn): Install
2728 default_search_name_hash.
2729 * buildsym.c (struct buildsym_compunit): <language>: New field.
2730 (finish_block_internal): Pass language when creating dictionaries.
2731 (start_buildsym_compunit, start_symtab): New language parameters.
2733 (restart_symtab): Pass down compilation unit's language.
2734 * buildsym.h (enum language): Forward declare.
2735 (start_symtab): New 'language' parameter.
2736 * c-lang.c (c_language_defn, cplus_language_defn)
2737 (asm_language_defn, minimal_language_defn): Install
2738 default_search_name_hash.
2739 * coffread.c (coff_start_symtab): Adjust.
2740 * d-lang.c (d_language_defn): Install default_search_name_hash.
2741 * dbxread.c (struct symloc): Add 'pst_language' field.
2742 (PST_LANGUAGE): Define.
2743 (start_psymtab, read_ofile_symtab): Use it.
2744 (process_one_symbol): New 'language' parameter. Pass it down.
2745 * dictionary.c (struct dictionary) <language>: New field.
2746 (DICT_LANGUAGE): Define.
2747 (dict_create_hashed, dict_create_hashed_expandable)
2748 (dict_create_linear, dict_create_linear_expandable): New parameter
2749 'language'. Set the dictionary's language.
2750 (iter_match_first_hashed): Adjust to rename.
2751 (insert_symbol_hashed): Assert we don't see mismatching
2752 languages. Adjust to rename.
2753 (dict_hash): Rename to ...
2754 (default_search_name_hash): ... this and make extern.
2755 * dictionary.h (struct language_defn): Forward declare.
2756 (dict_create_hashed): New parameter 'language'.
2757 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2758 * f-lang.c (f_language_defn): Install default_search_name_hash.
2759 * go-lang.c (go_language_defn): Install default_search_name_hash.
2760 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2762 * language.c (unknown_language_defn, auto_language_defn):
2763 * language.h (language_defn::la_search_name_hash): New field.
2764 (default_search_name_hash): Declare.
2765 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2766 * mdebugread.c (new_block): New parameter 'language'.
2767 * mdebugread.c (parse_symbol): Pass symbol language to block
2769 (psymtab_to_symtab_1): Pass down language.
2770 (new_symtab): Pass compunit's language to block allocation.
2771 * objc-lang.c (objc_language_defn): Install
2772 default_search_name_hash.
2773 * opencl-lang.c (opencl_language_defn):
2774 * p-lang.c (pascal_language_defn): Install
2775 default_search_name_hash.
2776 * rust-lang.c (rust_language_defn): Install
2777 default_search_name_hash.
2778 * stabsread.h (enum language): Forward declare.
2779 (process_one_symbol): Add 'language' parameter.
2780 * symtab.c (search_name_hash): New function.
2781 * symtab.h (search_name_hash): Declare.
2782 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2786 * cp-name-parser.y (main): Don't initialize extra_chars.
2790 * event-top.h (command_handler): Constify.
2791 * record-full.c (cmd_record_full_start): Update.
2792 * thread.c (thread_apply_all_command): Update.
2793 * printcmd.c (eval_command): Update.
2794 * mi/mi-main.c (mi_execute_cli_command): Update.
2795 (mi_execute_async_cli_command): Update.
2796 * tui/tui-stack.c (tui_update_command): Update.
2797 * cli/cli-interp.c (safe_execute_command): Constify.
2798 * record.c (record_start): Update.
2799 (record_start, record_stop, cmd_record_start): Update.
2800 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2801 (cmd_record_btrace_pt_start): Update.
2802 (cmd_record_btrace_start): Update.
2803 (cmd_record_btrace_start): Update.
2804 * reverse.c (exec_reverse_once): Update.
2805 * python/python.c (execute_gdb_command): Don't copy the command.
2806 * event-top.c (command_line_handler): Update.
2807 (command_handler): Constify.
2808 * defs.h (deprecated_call_command_hook): Constify.
2809 * cli/cli-script.h (execute_user_command): Constify.
2810 * cli/cli-script.c (execute_user_command): Constify.
2811 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2812 (enum command_control_type): Update.
2813 * main.c (catch_command_errors): Remove non-const overload.
2814 (catch_command_errors_ftype): Remove.
2815 * python/py-cmd.c (cmdpy_function): Constify.
2816 * guile/scm-cmd.c (cmdscm_function): Constify.
2817 * cli/cli-dump.c (call_dump_func): Constify.
2818 * cli/cli-decode.c (do_const_cfunc): Constify.
2819 (do_sfunc): Constify.
2820 (cmd_func): Constify.
2821 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2822 * top.h (execute_command): Constify.
2823 * top.c (execute_command): Constify.
2824 (execute_command_to_string): Constify.
2825 (deprecated_call_command_hook): Constify.
2826 * command.h (cmd_func): Constify.
2827 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2831 * ada-lang.c (catch_ada_exception_command): Constify.
2832 (catch_assert_command): Constify.
2833 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2834 (catch_rethrow_command): Constify.
2835 (catch_exception_command_1): Constify.
2836 * breakpoint.h (add_catch_command): Constify.
2837 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2838 (catch_syscall_split_args): Constify.
2839 * break-catch-sig.c (catch_signal_command): Constify.
2840 (catch_signal_split_args): Constify.
2841 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2842 cmd_const_sfunc_ftype.
2843 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2844 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2845 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2846 (add_setshow_string_cmd, struct cmd_list_element)
2847 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2848 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2849 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2851 (set_cmd_sfunc): Constify.
2852 (empty_sfunc): Constify.
2853 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2854 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2855 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2856 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2857 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2858 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2860 (set_cmd_sfunc): Constify.
2861 (cmd_sfunc_ftype): Remove.
2862 * compile/compile.c (set_compile_args): Constify.
2863 * infrun.c (set_disable_randomization): Constify.
2864 * infcmd.c (set_args_command, set_cwd_command): Constify.
2865 * breakpoint.c (set_condition_evaluation_mode): Constify.
2866 (add_catch_command): Constify.
2867 (catch_fork_command_1, catch_exec_command_1)
2868 (catch_load_command_1, catch_unload_command_1): Constify.
2869 (catch_load_or_unload): Constify.
2870 * guile/scm-param.c (pascm_set_func): Constify.
2871 (add_setshow_generic): Constify.
2872 * python/py-param.c (get_set_value): Constify.
2873 * top.h (set_verbose): Constify.
2874 * tui/tui-win.c (tui_set_var_cmd): Constify.
2875 * mi/mi-main.c (set_mi_async_command): Constify.
2876 * cli/cli-logging.c (set_logging_overwrite)
2877 (set_logging_redirect): Constify.
2878 * value.c (set_max_value_size): Constify.
2879 * valprint.c (set_input_radix, set_output_radix): Constify.
2880 * utils.c (set_width_command, set_height_command): Constify.
2881 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2882 * tracepoint.c (set_disconnected_tracing)
2883 (set_circular_trace_buffer, set_trace_buffer_size)
2884 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2885 * top.c (set_history_size_command, set_verbose, set_editing)
2886 (set_gdb_datadir, set_history_filename): Constify.
2887 * target.c (set_targetdebug, maint_set_target_async_command)
2888 (maint_set_target_non_stop_command, set_target_permissions)
2889 (set_write_memory_permission): Constify.
2890 (open_target): Constify.
2891 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2892 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2893 * symtab.c (set_symbol_cache_size_handler): Constify.
2894 * symfile.c (set_ext_lang_command): Constify.
2895 * symfile-debug.c (set_debug_symfile): Constify.
2896 * source.c (set_directories_command): Constify.
2897 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2898 * serial.c (set_parity): Constify.
2899 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2900 * remote.c (set_remote_exec_file, set_remotebreak)
2901 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2902 * record.c (set_record_insn_history_size)
2903 (set_record_call_history_size): Constify.
2904 * record-full.c (set_record_full_insn_max_num): Constify.
2905 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2906 * osabi.c (set_osabi): Constify.
2907 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2908 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2909 * maint.c (maintenance_set_profile_cmd): Constify.
2910 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2911 * language.c (set_language_command, set_range_command)
2912 (set_case_command): Constify.
2913 * infrun.c (set_non_stop, set_observer_mode)
2914 (set_stop_on_solib_events, set_schedlock_func)
2915 (set_exec_direction_func): Constify.
2916 * infcmd.c (set_inferior_tty_command): Constify.
2917 * disasm.c (set_disassembler_options_sfunc): Constify.
2918 * demangle.c (set_demangling_command): Constify.
2919 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2920 * cris-tdep.c (set_cris_version, set_cris_mode)
2921 (set_cris_dwarf2_cfi): Constify.
2922 * corefile.c (set_gnutarget_command): Constify.
2923 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2924 (set_target_wide_charset_sfunc): Constify.
2925 * breakpoint.c (update_dprintf_commands): Constify.
2926 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2927 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2928 (set_disassembly_style_sfunc): Constify.
2929 * arch-utils.c (set_endian, set_architecture): Constify.
2930 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2931 * agent.c (set_can_use_agent): Constify.
2935 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2936 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2937 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2938 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2939 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2940 (parse_int_arg, show_thread_default_detach_sc_cmd)
2941 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2942 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2943 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2944 (show_task_pause_cmd, set_task_detach_sc_cmd)
2945 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2946 (set_noninvasive_cmd, set_thread_pause_cmd)
2947 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2948 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2949 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2950 * windows-nat.c (display_selectors): Constify.
2951 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2953 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2954 (cmd_cfunc_eq): Likewise.
2955 (struct cmd_list_element): Likewise.
2957 (cli_user_command_p): Update.
2958 * command.h (add_cmd): Remove non-const overload.
2959 (cmd_cfunc_ftype): Remove typedef.
2960 (cmd_cfunc_eq): Remove non-const overload.
2961 * value.c (show_values): Constify.
2962 * thread.c (thread_apply_all_command): Constify.
2963 * symfile.c (load_command): Constify.
2964 * source.c (directory_command): Constify.
2965 * maint.c (maintenance_internal_error)
2966 (maintenance_demangler_warning, maintenance_space_display)
2967 (maintenance_print_architecture, maintenance_translate_address)
2968 (maintenance_info_selftests, maintenance_internal_warning):
2970 * breakpoint.c (disable_trace_command, enable_trace_command):
2972 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2974 (add_auto_load_safe_path): Constify.
2975 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2976 * top.h (show_commands): Constify.
2977 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2978 * sparc64-tdep.c (adi_examine_command): Constify.
2979 (adi_assign_command): Constify.
2983 * frame.h (info_locals_command, info_args_command): Constify.
2984 * auto-load.h (auto_load_info_scripts): Constify.
2985 * inferior.h (registers_info): Constify.
2986 * copying.c: Rebuild.
2987 * copying.awk: Constify generated commands.
2988 * auto-load.c (auto_load_info_scripts)
2989 (info_auto_load_gdb_scripts): Constify.
2990 * cli/cli-decode.c (struct cmd_list_element): Take a
2991 cmd_const_cfunc_ftype.
2992 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2993 * tui/tui-win.c (tui_all_windows_info): Constify.
2994 * python/py-auto-load.c (info_auto_load_python_scripts):
2996 * cli/cli-cmds.c (show_command): Remove non-const overload.
2997 * tracepoint.c (info_tvariables_command, info_scope_command):
2999 (info_static_tracepoint_markers_command): Constify.
3000 * thread.c (info_threads_command): Constify.
3001 (print_thread_info_1): Constify.
3002 * target.c (info_target_command): Constify.
3003 * symtab.c (info_sources_command, info_functions_command)
3004 (info_types_command): Constify.
3005 (info_variables_command): Remove non-const overload.
3006 * symfile.c (info_ext_lang_command): Constify.
3007 * stack.c (info_frame_command, info_locals_command)
3008 (info_args_command): Constify.
3009 (backtrace_command): Remove non-const overload.
3010 * source.c (info_source_command, info_line_command): Constify.
3011 * solib.c (info_sharedlibrary_command): Constify.
3012 * skip.c (info_skip_command): Constify.
3013 * ser-go32.c (info_serial_command): Constify.
3014 * reverse.c (info_bookmarks_command): Constify.
3015 * printcmd.c (info_symbol_command, info_address_command)
3016 (info_display_command): Constify.
3017 * osdata.c (info_osdata_command): Constify.
3018 * objc-lang.c (info_selectors_command, info_classes_command):
3020 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
3021 * memattr.c (info_mem_command): Constify.
3022 * macrocmd.c (info_macro_command, info_macros_command): Constify.
3023 * linux-fork.c (info_checkpoints_command): Constify.
3024 * infrun.c (info_signals_command): Constify.
3025 * inflow.c (info_terminal_command): Constify.
3026 * inferior.c (info_inferiors_command): Constify.
3027 (print_inferior): Constify.
3028 * infcmd.c (info_program_command, info_all_registers_command)
3029 (info_registers_command, info_vector_command)
3030 (info_float_command): Constify.
3031 (registers_info): Constify.
3032 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
3033 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
3035 * f-valprint.c (info_common_command): Constify.
3036 * dcache.c (info_dcache_command): Constify.
3037 (dcache_info_1): Constify.
3038 * darwin-nat-info.c (info_mach_tasks_command)
3039 (info_mach_task_command, info_mach_ports_command)
3040 (info_mach_port_command, info_mach_threads_command)
3041 (info_mach_thread_command, info_mach_regions_command)
3042 (info_mach_regions_recurse_command, info_mach_region_command)
3043 (info_mach_exceptions_command): Constify.
3044 (get_task_from_args): Constify.
3045 * cp-support.c (info_vtbl_command): Constify.
3046 * breakpoint.c (info_watchpoints_command)
3047 (info_tracepoints_command): Constify.
3048 (info_breakpoints_command): Remove non-const overload.
3049 * avr-tdep.c (avr_io_reg_read_command): Constify.
3050 * auxv.c (info_auxv_command): Constify.
3051 * ada-tasks.c (info_tasks_command): Constify.
3052 (info_task): Constify.
3053 * ada-lang.c (info_exceptions_command): Constify.
3057 * solib.h (no_shared_libraries): Constify.
3058 * frame.h (return_command): Constify.
3059 * cli/cli-cmds.h (quit_command): Constify.
3060 * top.h (quit_command, execute_command): Constify.
3061 * target.h (flash_erase_command): Constify.
3062 * inferior.h (set_inferior_args, attach_command): Constify.
3063 * tracepoint.h (start_tracing, stop_tracing): Constify.
3064 * breakpoint.h (break_command, tbreak_command)
3065 (hbreak_command_wrapper, thbreak_command_wrapper)
3066 (rbreak_command_wrapper, watch_command_wrapper)
3067 (awatch_command_wrapper, rwatch_command_wrapper)
3068 (get_tracepoint_by_number): Constify.
3069 * symtab.c (info_variables_command, rbreak_command)
3070 (symtab_symbol_info): Constify.
3071 (info_variables_command): Add non-const overload.
3072 * top.c (dont_repeat_command): Constify.
3073 * breakpoint.c (ignore_command, commands_command)
3074 (condition_command, tbreak_command, hbreak_command)
3075 (thbreak_command, clear_command, break_command)
3076 (info_breakpoints_command, watch_command, rwatch_command)
3077 (awatch_command, trace_command, ftrace_command, strace_command)
3078 (trace_pass_command, break_range_command, dprintf_command)
3079 (agent_printf_command, get_tracepoint_by_number)
3080 (watch_maybe_just_location, trace_pass_command): Constify.
3081 (info_breakpoints_command): Add non-const overload.
3082 * tracefile.c (tsave_command): Constify.
3083 * infcmd.c (attach_command, disconnect_command, signal_command)
3084 (queue_signal_command, stepi_command, nexti_command)
3085 (finish_command, next_command, step_command, until_command)
3086 (advance_command, jump_command, continue_command, run_command)
3087 (start_command, starti_command, interrupt_command)
3088 (run_command_1, set_inferior_args, step_1): Constify.
3089 * inferior.c (add_inferior_command, remove_inferior_command)
3090 (clone_inferior_command): Constify.
3091 * linux-fork.c (checkpoint_command, restart_command): Constify.
3092 * windows-nat.c (signal_event_command): Constify.
3093 * guile/guile.c (guile_repl_command, guile_command): Constify.
3094 * printcmd.c (x_command, display_command, printf_command)
3095 (output_command, set_command, call_command, print_command)
3096 (eval_command): Constify.
3097 (non_const_set_command): Remove.
3098 (_initialize_printcmd): Update.
3099 * source.c (forward_search_command, reverse_search_command):
3101 * jit.c (jit_reader_load_command, jit_reader_unload_command):
3103 * infrun.c (handle_command): Constify.
3104 * memattr.c (mem_command): Constify.
3105 * stack.c (return_command, up_command, up_silently_command)
3106 (down_command, down_silently_command, frame_command)
3107 (backtrace_command, func_command, backtrace_command_1): Constify.
3108 (backtrace_command): Add non-const overload.
3109 * remote-sim.c (simulator_command): Constify.
3110 * exec.c (set_section_command): Constify.
3111 * tracepoint.c (tdump_command, trace_variable_command)
3112 (tstatus_command, tstop_command, tstart_command)
3113 (end_actions_pseudocommand, while_stepping_pseudocommand)
3114 (collect_pseudocommand, teval_pseudocommand, actions_command)
3115 (start_tracing, stop_tracing): Constify.
3116 * value.c (init_if_undefined_command): Constify.
3117 * tui/tui-stack.c (tui_update_command): Constify.
3118 * tui/tui-win.c (tui_refresh_all_command)
3119 (tui_set_tab_width_command, tui_set_win_height_command)
3120 (tui_set_focus_command, tui_scroll_forward_command)
3121 (tui_scroll_backward_command, tui_scroll_left_command)
3122 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3123 (tui_set_win_height): Constify.
3124 * tui/tui-layout.c (tui_layout_command): Constify.
3125 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3126 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3127 (proc_untrace_sysexit_cmd): Constify.
3128 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3129 (threadset_test_cmd, threadlist_update_test_cmd)
3130 (threadalive_test): Constify.
3131 * objc-lang.c (print_object_command): Constify.
3132 * command.h (add_com): Constify.
3133 * cli/cli-dump.c (restore_command): Constify.
3134 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3135 (help_command, complete_command, shell_command, edit_command)
3136 (list_command, disassemble_command, make_command)
3137 (apropos_command, alias_command): Constify.
3138 * cli/cli-script.c (document_command, define_command)
3139 (while_command, if_command, validate_comname): Constify.
3140 * cli/cli-decode.c (struct cmd_list_element): Change type of
3142 * target.c (do_monitor_command, flash_erase_command): Constify.
3143 * regcache.c (reg_flush_command): Constify.
3144 * reverse.c (reverse_step, reverse_next, reverse_stepi)
3145 (reverse_nexti, reverse_continue, reverse_finish)
3146 (save_bookmark_command, goto_bookmark_command)
3147 (exec_reverse_once): Constify.
3148 * python/python.c (python_interactive_command, python_command):
3150 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3152 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3153 * gcore.c (gcore_command): Constify.
3157 * printcmd.c (x_command): Call set_repeat_arguments.
3158 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3159 * top.c (repeat_arguments): New global.
3160 (set_repeat_arguments): New function.
3161 (execute_command): Handle repeat_arguments.
3162 (show_commands): Calls set_repeat_arguments.
3163 * command.h (set_repeat_arguments): Declare.
3167 * stack.c (backtrace_command): Use std::string.
3168 (backtrace_command_1): Make "count_exp" const.
3172 * source.c (directory_switch, mod_path, add_path): Constify.
3173 * defs.h (add_path, mod_path, directory_switch): Constify.
3174 * mi/mi-cmd-env.c (env_mod_path): Constify.
3178 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3179 (run_command_1, continue_command, step_1, jump_command)
3180 (signal_command, until_command, advance_command, finish_command)
3181 (attach_command): Update.
3185 * command.h (set_cmd_cfunc): Don't declare.
3186 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3190 * stack.c (select_frame_command): Constify.
3191 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3192 * command.h (add_com_suppress_notification): Constify.
3196 * breakpoint.c (stop_command): Constify.
3197 * cli/cli-decode.c (struct cmd_list_element): Constify.
3198 * command.h (add_abbrev_prefix_cmd): Constify.
3202 * breakpoint.c (extract_bp_kind): New enum.
3203 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3204 factored out from ...
3205 (extract_bp_number_and_location): ... here.
3206 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3210 * breakpoint.c (extract_bp_number_and_location): Change return
3211 type to void. Throw error instead of warning.
3212 (enable_disable_command): Adjust.
3217 * breakpoint.c (map_breakpoint_number_range): New, factored out
3219 (map_breakpoint_numbers): ... here.
3220 (find_location_by_number): Change parameters from string to
3221 breakpoint number and location.
3222 (extract_bp_number_and_location): New function.
3223 (enable_disable_bp_num_loc)
3224 (enable_disable_breakpoint_location_range)
3225 (enable_disable_command): New functions, factored out ...
3226 (enable_command, disable_command): ... these functions, and
3227 adjusted to support ranges.
3228 * NEWS: Document enable/disable breakpoint location range feature.
3232 * MAINTAINERS (Write After Approval): Update my e-mail address.
3236 * gnu-nat.c (gnu_terminal_init): Delete.
3237 (gnu_target): Don't install gnu_terminal_init.
3238 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3239 (child_terminal_init): ... this function.
3243 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3245 * config.in, configure: Regenerate.
3249 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3250 (async_init_signals): Adjust.
3251 (handle_stop_sig): Rename to ...
3252 (handle_sigtstp): ... this.
3253 (async_stop_sig): Rename to ...
3254 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3256 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3257 instead of STOP_SIGNAL thoughout.
3258 (handle_stop_sig): Rename to ...
3259 (handle_sigtstp): ... this.
3260 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3264 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3265 longer set flags twice in row.
3269 * Makefile.in (SER_HARDWIRE): Update comment.
3270 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3271 * common/gdb_termios.h: Delete file.
3272 * common/job-control.c: Include termios.h and unistd.h instead of
3274 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3276 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3278 * configure.ac: No longer check for termio.h and sgtty.h.
3279 * configure: Regenerate.
3280 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3281 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3282 Replace PROCESS_GROUP_TYPE references with pid_t references
3284 (gdb_getpgrp): Delete.
3285 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3286 (child_terminal_inferior): Remove comment. Remove sgtty code.
3287 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3288 gdb_getpgrp. Use serial_set_tty_state instead aof
3289 serial_noflush_set_tty_state. Remove sgtty code.
3290 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3291 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3292 (inferior_process_group): Now returns pid_t.
3293 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3294 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3295 * ser-event.c (serial_event_ops): Update.
3296 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3298 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3299 * ser-pipe.c (pipe_ops): Update.
3300 * ser-tcp.c (tcp_ops): Update.
3301 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3302 HAVE_TERMIOS checks.
3303 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3304 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3305 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3307 (hardwire_noflush_set_tty_state): Delete.
3308 (hardwire_print_tty_state, hardwire_drain_output)
3309 (hardwire_flush_output, hardwire_flush_input)
3310 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3311 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3312 code, and assume termios.
3313 (hardwire_ops): Update.
3314 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3315 * serial.c (serial_noflush_set_tty_state): Delete.
3316 * serial.h (serial_noflush_set_tty_state): Delete.
3317 (serial_ops::noflush_set_tty_state): Delete.
3321 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3322 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3323 (COMMON_OBS): Remove doublest.o and dfp.o.
3324 Do not build target-float.c (instead of doublest.c)
3325 with -Wformat-nonliteral.
3327 * doublest.c: Remove file.
3328 * doublest.h: Remove file.
3329 * dfp.c: Remove file.
3330 * dfp.h: Remove file.
3332 * target-float.c: Do not include "doublest.h" and "dfp.h".
3333 (DOUBLEST): Move here from doublest.h.
3334 (enum float_kind): Likewise.
3335 (FLOATFORMAT_CHAR_BIT): Likewise.
3336 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3337 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3338 (floatformat_precision): Likewise.
3339 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3340 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3342 (host_float_format, host_double_format, host_long_double_format):
3344 (floatformat_to_string, floatformat_from_string): Likewise.
3345 (floatformat_to_doublest): Likewise. Also, inline the original
3346 convert_floatformat_to_doublest.
3347 (floatformat_from_doublest): Likewise. Also, inline the original
3348 convert_floatformat_from_doublest.
3350 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3351 (MAX_DECIMAL_STRING): Move here from dfp.c.
3352 (match_endianness): Likewise.
3353 (set_decnumber_context, decimal_check_errors): Likewise.
3354 (decimal_from_number, decimal_to_number): Likewise.
3355 (decimal_to_string, decimal_from_string): Likewise. Make static.
3356 (decimal_from_longest, decimal_from_ulongest): Likewise.
3357 (decimal_to_longest): Likewise.
3358 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3359 (decimal_convert): Likewise.
3363 * doublest.c: Do not include "gdbtypes.h".
3364 (extract_typed_floating): Remove.
3365 (store_typed_floating): Remove.
3366 (convert_typed_floating): Remove.
3367 * doublest.h (struct type): Remove.
3368 (DOUBLEST_PRINT_FORMAT): Remove.
3369 (DOUBLEST_SCAN_FORMAT): Remove.
3370 (extract_typed_floating): Remove.
3371 (store_typed_floating): Remove.
3372 (convert_typed_floating): Remove.
3374 * dfp.c (decimal_from_doublest): Remove.
3375 (decimal_to_doublest): Remove.
3376 * dfp.h: Do not include "doublest.h".
3377 (decimal_from_doublest): Remove.
3378 (decimal_to_doublest): Remove.
3380 * value.c: Do not include "doublest.h" and "dfp.h".
3381 (value_as_double): Remove.
3382 (unpack_double): Remove.
3383 (value_from_double): Remove.
3384 (value_from_decfloat): Remove.
3385 * value.h: Do not include "doublest.h".
3386 (value_as_double): Remove.
3387 (unpack_double): Remove.
3388 (value_from_double): Remove.
3389 (value_from_decfloat): Remove.
3393 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3394 (i386_extract_return_value): Use target_float_convert.
3395 (i386_store_return_value): Likewise.
3396 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3397 (i387_value_to_register): Likewise.
3398 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3399 (ia64_register_to_value): Use target_float_convert.
3400 (ia64_value_to_register): Likewise.
3401 (ia64_extract_return_value): Likewise.
3402 (ia64_store_return_value): Likewise.
3403 (ia64_push_dummy_call): Likewise.
3404 * m68k-tdep.c: Include "target-float.h".
3405 (m68k_register_to_value): Use target_float_convert.
3406 (m68k_value_to_register): Likewise.
3407 (m68k_svr4_extract_return_value): Likewise.
3408 (m68k_svr4_store_return_value): Likewise.
3409 * ppc-sysv-tdep.c: Include "target-float.h".
3410 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3411 (do_ppc_sysv_return_value): Likewise.
3412 (ppc64_sysv_abi_push_freg): Likewise.
3413 (ppc64_sysv_abi_return_value_base): Likewise.
3414 * rs6000-aix-tdep.c: Include "target-float.h".
3415 (rs6000_push_dummy_call): Use target_float_convert.
3416 (rs6000_return_value): Likewise.
3417 * rs6000-lynx178-tdep.c: Include "target-float.h".
3418 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3419 (rs6000_lynx178_return_value): Likewise.
3420 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3421 (rs6000_register_to_value): Use target_float_convert.
3422 (rs6000_value_to_register): Likewise.
3423 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3424 (arm_extract_return_value): Use target_float_convert.
3425 (arm_store_return_value): Likewise.
3426 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3427 (sh_register_convert_to_virtual): Use target_float_convert.
3428 (sh_register_convert_to_raw): Likewise.
3429 * sh64-tdep.c: Include "target-float.h".
3430 (sh64_extract_return_value): Use target_float_convert.
3431 (sh64_register_convert_to_virtual): Likewise.
3432 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3436 * target-float.c (floatformat_to_host_double): New function.
3437 (floatformat_from_host_double): Likewise.
3438 (target_float_to_host_double): Likewise.
3439 (target_float_from_host_double): Likewise.
3440 * target-float.h (target_float_to_host_double): Add prototype.
3441 (target_float_from_host_double): Likewise.
3443 * guile/scm-value.c: Include "target-float.h".
3444 (gdbscm_value_to_real): Use target_float_to_host_double.
3445 Handle integer source values via value_as_long.
3446 * guile/scm-math.c: Include "target-float.h". Do not include
3447 "doublest.h", "dfp.h", and "expression.h".
3448 (vlscm_convert_typed_number): Use target_float_from_host_double.
3449 (vlscm_convert_number): Likewise.
3451 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3452 (convert_value_from_python): Use target_float_from_host_double.
3456 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3457 (cast_from_fixed): Likewise.
3458 (ada_scaling_type): New function.
3459 (ada_delta): Return value instead of DOUBLEST. Perform target
3460 arithmetic instead of host arithmetic.
3461 (scaling_factor): Rename to ...
3462 (ada_scaling_factor) ... this. Make non-static. Return value instead
3463 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3464 (ada_fixed_to_float): Remove.
3465 (ada_float_to_fixed): Remove.
3466 * ada-lang.h (ada_fixed_to_float): Remove.
3467 (ada_float_to_fixed): Remove.
3468 (ada_delta): Return value instead of DOUBLEST.
3469 (ada_scaling_factor): Add prototype.
3471 * ada-typeprint.c: Include "target-float.h".
3472 (print_fixed_point_type): Perform target arithmetic instead of
3474 * ada-valprint.c: Include "target-float.h".
3475 (ada_val_print_num): Perform target arithmetic instead of
3476 host arithmetic for fixed-point types.
3480 * target-float.c: Include <math.h>.
3481 (floatformat_binop): New function.
3482 (floatformat_compare): Likewise.
3483 (target_float_binop): Likewise.
3484 (target_float_compare): Likewise.
3485 * target-float.h: Include "expression.h".
3486 (target_float_binop): Add prototype.
3487 (target_float_compare): Likewise.
3489 * valarith.c: Do not include "doublest.h" and "dfp.h".
3490 Include "common/byte-vector.h".
3491 (value_args_as_decimal): Remove, replace by ...
3492 (value_args_as_target_float): ... this function. Handle both
3493 binary and decimal target floating-point formats.
3494 (scalar_binop): Handle both binary and decimal FP using
3495 value_args_as_target_float and target_float_binop.
3496 (value_equal): Handle both binary and decimal FP using
3497 value_args_as_target_float and target_float_compare.
3498 (value_less): Likewise.
3499 (value_pos): Handle all scalar types as simple copy.
3500 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3501 * dfp.c (decimal_binop): Throw error instead of internal_error
3502 when called with an unsupported operation code.
3506 * target-float.c (target_float_to_string): New function.
3507 (target_float_from_string): New function.
3508 * target-float.h (target_float_to_string): Add prototype.
3509 (target_float_from_string): Add prototype.
3511 * valprint.c: Include "target-float.h". Do not include
3512 "doublest.h" and "dfp.h".
3513 (print_floating): Use target_float_to_string.
3514 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3515 (printf_floating): Use target_float_to_string.
3516 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3517 (print_i387_value): Use target_float_to_string.
3518 * mips-tdep.c: Include "target-float.h".
3519 (mips_print_fp_register): Use target_float_to_string.
3520 * sh64-tdep.c: Include "target-float.h".
3521 (sh64_do_fp_register): Use target_float_to_string.
3523 * parse.c: Include "target-float.h". Do not include
3524 "doublest.h" and "dfp.h".
3525 (parse_float): Use target_float_from_string.
3526 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3527 (define_symbol): Use target_float_from_string.
3528 * gdbarch-selftests.c: Include "target-float.h".
3529 (register_to_value_test): Use target_float_from_string.
3533 * Makefile.c (SFILES): Add target-float.c.
3534 (HFILES_NO_SRCDIR): Add target-float.h.
3535 (COMMON_OBS): Add target-float.o.
3536 * target-float.h: New file.
3537 * target-float.c: New file.
3539 * doublest.c (floatformat_classify): Fix detection of float_zero.
3541 * gdbtypes.c (is_floating_type): New function.
3542 * gdbtypes.h (is_floating_type): Add prototype.
3544 * value.c: Do not include "floatformat.h".
3545 (unpack_double): Use target_float_is_valid.
3546 (is_floating_value): New function.
3547 * value.h (is_floating_value): Add prototype-
3549 * valarith.c: Include "target-float.h".
3550 (value_logical_not): Use target_float_is_zero.
3552 * python/py-value.c: Include "target-float.h".
3553 (valpy_nonzero): Use target_float_is_zero.
3557 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3561 * breakpoint.c (set_momentary_breakpoint): Return
3563 (until_break_command): Update.
3564 (new_until_break_fsm): Change argument types to
3566 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3567 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3569 * infcmd.c (finish_forward): Update.
3570 * breakpoint.h (set_momentary_breakpoint)
3571 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3572 (make_cleanup_delete_breakpoint): Remove.
3573 (struct breakpoint_deleter): New.
3574 (breakpoint_up): New typedef.
3575 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3576 (insert_exception_resume_breakpoint): Update.
3577 (insert_exception_resume_from_probe): Update.
3578 (insert_longjmp_resume_breakpoint): Update.
3579 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3580 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3581 * infcall.c (call_function_by_hand_dummy): Update
3585 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3589 * linux-tdep.c (linux_core_info_proc_mappings): Use
3591 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3593 (linux_corefile_thread): Update.
3594 (linux_make_corefile_notes): Remove unused variable.
3598 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3603 * objfiles.c (do_free_objfile_cleanup): Remove.
3604 * compile/compile-object-load.c (compile_object_load): Update.
3605 * objfiles.h (make_cleanup_free_objfile): Remove.
3609 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3610 (adi_read_versions): Change "tags" to "gdb_byte *".
3611 (adi_print_versions): Likewise.
3616 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3617 from start_rbreak_breakpoints.
3618 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3619 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3620 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3621 * symtab.c (do_end_rbreak_breakpoints): Remove.
3622 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3626 * cp-namespace.c (reset_directive_searched): Remove.
3627 (cp_lookup_symbol_via_imports): Use scoped_restore.
3628 * cp-support.c (reset_directive_searched): Remove.
3629 (make_symbol_overload_list_using): Use scoped_restore.
3630 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3631 (reset_directive_searched): Remove.
3635 * symfile.c (find_separate_debug_file_by_debuglink): Use
3640 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3642 (compute_stack_depth): Likewise.
3643 (do_compile_dwarf_expr_to_c): Use std::vector.
3647 * compile/compile-object-load.c (link_callbacks_einfo): Use
3652 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3653 Use scoped_free_pendings.
3654 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3655 scoped_free_pendings.
3656 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3657 (xcoff_initial_scan): Likewise.
3658 * buildsym.c (reset_symtab_globals): Update comment.
3659 (scoped_free_pendings): Rename from really_free_pendings.
3660 (prepare_for_building): Update comment.
3661 (buildsym_init): Likewise.
3662 * buildsym.h (class scoped_free_pendings): New class.
3663 (really_free_pendings): Don't declare.
3667 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3668 output when converting a zero value to a special byteorder format.
3672 * frame.c (do_frame_register_read): Remove aspace.
3673 * jit.c (jit_frame_sniffer): Likwise.
3674 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3675 * regcache.c (regcache::regcache): Pass nullptr.
3676 (regcache_print): Caller updated.
3677 * regcache.h (regcache::regcache): Remove one constructor
3682 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3686 * breakpoint.c (insert_single_step_breakpoints): Update.
3687 * frame.c (struct frame_info) <aspace>: Add const.
3688 (frame_save_as_regcache): Add const.
3689 (get_frame_address_space): Return const address_space *.
3690 * frame.h (get_frame_address_space): Update declaration.
3691 * infrun.c (struct step_over_info) <aspace>: Add const.
3692 (set_step_over_info): Make aspace const.
3693 (displaced_step_prepare_throw): Change variable const.
3695 (proceed): Likewise.
3696 (adjust_pc_after_break): Likewise.
3697 (save_waitstatus): Likewise.
3698 (handle_signal_stop): Likewise.
3699 (keep_going_pass_signal): Likewise.
3700 * jit.c (jit_frame_sniffer): Add const.
3701 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3702 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3703 * record-full.c (record_full_wait_1): Likewise.
3704 * regcache.c (regcache::regcache): Change parameter to const.
3705 * regcache.h (regcache::regcache): Likewise.
3706 (regcache::aspace): Return const address_space *.
3707 (regcache) <m_aspace>: Add const.
3711 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3712 * frame.c (create_sentinel_frame): Likewise.
3713 * infrun.c (displaced_step_prepare_throw): Likewise.
3715 (thread_still_needs_step_over_bp): Likewise.
3716 (proceed): Likewise.
3717 (do_target_wait): Likewise.
3718 (adjust_pc_after_break): Likewise.
3719 (handle_syscall_event): Likewise.
3720 (save_waitstatus): Likewise.
3721 (handle_inferior_event_1): Likewise.
3722 (handle_signal_stop): Likewise.
3723 (keep_going_pass_signal): Likewise.
3724 * linux-nat.c (status_callback): Likewise.
3725 (save_stop_reason): Likewise.
3726 (resume_stopped_resumed_lwps): Likewise.
3727 * record-full.c (record_full_exec_insn): Likewise.
3728 (record_full_wait_1): Likewise.
3729 * regcache.c (get_regcache_aspace): Remove.
3730 * regcache.h (get_regcache_aspace): Remove.
3734 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3735 (init_regcache_descr): Use gdbarch_num_regs.
3736 (regcache::regcache): Likewise.
3737 (regcache::get_register_status): Likewise.
3738 (regcache::assert_raw_regnum): Likewise.
3739 (regcache::cooked_read): Likewise.
3740 (regcache::cooked_read_value): Likewise.
3741 (regcache::cooked_write): Likewise.
3742 (regcache::dump): Likewise.
3743 (regcache::num_raw_registers): New method.
3744 * regcache.h (class regcache) <num_raw_registers>: New.
3748 * regcache.c (regcache::assert_regnum): New method.
3749 (regcache::invalidate): Call assert_regnum.
3750 (regcache::raw_update): Likewise.
3751 (regcache::raw_write): Likewise.
3752 (regcache::raw_read_part): Likewise.
3753 (regcache::raw_write_part): Likewise.
3754 (regcache::raw_supply): Likewise.
3755 (regcache::raw_supply_integer): Likewise.
3756 (regcache::raw_supply_zeroed): Likewise.
3757 (regcache::raw_collect): Likewise.
3758 (regcache::raw_collect_integer): Likewise.
3759 * regcache.h (regcache::assert_regnum): Declare.
3763 * regcache.c (regcache::dump): Remove code.
3767 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3769 <sizeof_cooked_register_status>: Remove.
3770 (init_regcache_descr): Update.
3771 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3772 (regcache::save): Likewise.
3773 (regcache::dump): Likewise.
3777 * ft32-tdep.c (ft32_fetch_instruction): New function.
3778 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3782 * cli/cli-script.c (execute_control_command): Rename to ...
3783 (execute_control_command_1): ... this.
3784 (execute_control_command): New function.
3788 * tracepoint.c (tfind_command): Remove const_cast.
3792 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3796 * common/common-utils.h (in_inclusive_range): New function.
3797 * arm-tdep.c (arm_record_extension_space): Use
3799 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3800 * cris-tdep.c (cris_spec_reg_applicable): Use
3806 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3807 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3811 * common/common-utils.c (string_appendf, string_vappendf): New
3813 * common/common-utils.h (string_appendf, string_vappendf): New
3815 * unittests/common-utils-selftests.c (string_appendf_func)
3816 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3817 (string_vappendf_tests): New functions.
3818 (_initialize_common_utils_selftests): Register "string_appendf" and
3819 "string_vappendf tests".
3823 * unittests/common-utils-selftests.c (format_func): New typedef.
3824 (string_printf_tests, string_vprintf_tests): Tests factored out
3826 (test_format_func): ... this new function.
3827 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3832 * darwin-nat.c: Remove include of gdb.h.
3836 * xtensa-xtregs.c: Fix formatting issues.
3840 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3845 * python/py-infthread.c (thpy_get_inferior): Increment reference
3846 of inferior before returning it.
3850 * unittests/common-utils-selftests.c (format): Add
3855 * xml-syscall.c (struct syscall_desc): Add constructor.
3856 <name>: Change type to std::string.
3857 (syscall_desc_up): New typedef.
3858 (syscall_desc_p): Remove typeder.
3859 (DEF_VEC_P(syscall_desc_p)): Remove.
3860 (struct syscall_group_desc): Add constructor.
3861 <name>: Change type to std::string.
3862 <syscalls>: Change type to std::vector.
3863 (syscall_group_desc_up): New typedef.
3864 (syscall_group_desc_p): Remove typedef.
3865 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3866 (struct syscalls_info) <syscalls>: Change type to std::vector of
3869 <my_gdb_datadir>: Change type to std::string.
3870 (syscalls_info_up): New typedef.
3871 (allocate_syscalls_info): Remove.
3872 (syscalls_info_free_syscalls_desc): Remove.
3873 (syscalls_info_free_syscall_group_desc): Remove.
3874 (free_syscalls_info): Remove.
3875 (make_cleanup_free_syscalls_info): Remove.
3876 (syscall_group_create_syscall_group_desc): Adjust.
3877 (syscall_group_add_syscall): Adjust.
3878 (syscall_create_syscall_desc): Adjust.
3879 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3880 (init_syscalls_info): Adjust.
3881 (syscall_group_get_group_by_name): Adjust.
3882 (xml_get_syscall_number): Adjust.
3883 (xml_get_syscall_name): Adjust.
3884 (xml_list_of_syscalls): Adjust.
3885 (xml_list_syscalls_by_group): Adjust.
3886 (xml_list_of_groups): Adjust.
3890 * probe.h: Don't include gdb_vecs.h.
3891 (DEF_VEC_P (probe_p)): Remove.
3892 (find_probes_in_objfile): Return an std::vector.
3893 * probe.c (find_probes_in_objfile): Likewise.
3894 * breakpoint.c (breakpoint_objfile_data)
3895 <longjmp_probes>: Change type to std::vector.
3896 <exception_probes>: Likewise.
3897 (free_breakpoint_probes): Don't manually free vectors.
3898 (create_longjmp_master_breakpoint): Adjust.
3899 (create_exception_master_breakpoint): Adjust.
3900 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3901 parameter type, adjust.
3902 (svr4_create_solib_event_breakpoints): Adjust.
3906 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3907 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3909 (free_breakpoint_probes): Rename to ...
3910 (free_breakpoint_objfile_data): ... this, and call delete on
3915 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3916 (loaded_script_ptr): Remove typedef.
3917 (DEF_VEC_P (loaded_script_ptr)): Remove.
3918 (struct collect_matching_scripts_data): Add constructor.
3919 <scripts_p>: Change type to (pointer to) std::vector.
3920 (collect_matching_scripts_data): Adjust.
3921 (sort_scripts_by_name): Make suitable for std::sort.
3922 (print_scripts): Don't sort vector, adjust to std::vector.
3923 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3927 * symfile.c (filename_language): Make struct, not typedef. Add
3929 <ext>: Change type to std::string.
3930 (DEF_VEC_O (filename_language)): Remove.
3931 (filename_language_table): Change type to std::vector.
3932 (add_filename_language): Adjust.
3933 (set_ext_lang_command): Adjust.
3934 (info_ext_lang_command): Adjust.
3935 (deduce_language_from_filename): Adjust.
3936 (class scoped_restore_filename_language_table): Remove.
3937 (test_filename_language): Use scoped_restore.
3938 (test_set_ext_lang_command): Use scoped_restore, adjust to
3943 * symfile.c: Include selftest.h.
3944 (class scoped_restore_filename_language_table): New.
3945 (test_filename_language): New test.
3946 (test_set_ext_lang_command): New test.
3947 (_initialize_symfile): Register tests.
3951 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3952 in the bp_location, falling back to find_pc_sect_function when
3954 (add_location_to_breakpoint): Save sal->symbol.
3955 * breakpoint.h (struct bp_location) <symbol>: New field.
3956 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3957 * symtab.h (struct symtab_and_line) <symbol>: New field.
3962 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3967 * remote.c (remote_async_terminal_ours_p): Delete.
3968 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3969 Remove references to 'remote_async_terminal_ours_p'.
3973 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3977 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3979 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3981 * breakpoint.c (bpstat_check_location): Remove cast.
3982 (breakpoint_hit_catch_fork): Make aspce const.
3983 (breakpoint_hit_catch_solib): Likewise.
3984 (breakpoint_hit_catch_exec): Likewise.
3985 (breakpoint_hit_ranged_breakpoint): Likewise.
3986 (breakpoint_hit_watchpoint): Likewise.
3987 (base_breakpoint_breakpoint_hit): Likewise.
3988 (bkpt_breakpoint_hit): Likewise.
3989 (dprintf_breakpoint_hit): Likewise.
3990 (tracepoint_breakpoint_hit): Likewise.
3991 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3995 * breakpoint.c (breakpoint_location_address_match): Change
3996 "struct address_space *" to "const address_space".
3997 (breakpoint_location_address_range_overlap): Likewise.
3998 (breakpoint_here_p): Likewise.
3999 (breakpoint_in_range_p): Likewise.
4000 (moribund_breakpoint_here_p): Likewise.
4001 (bp_location_inserted_here_p): Likewise.
4002 (software_breakpoint_inserted_here_p): Likewise.
4003 (hardware_breakpoint_inserted_here_p): Likewise.
4004 (hardware_watchpoint_inserted_in_range): Likewise.
4005 (bpstat_check_location): Likewise.
4006 (bpstat_stop_status): Likewise.
4007 (breakpoint_address_match): Likewise.
4008 (breakpoint_address_match_range): Likewise.
4009 (breakpoint_location_address_match): Likewise.
4010 (breakpoint_location_address_range_overlap): Likewise.
4011 (insert_single_step_breakpoint): Likewise.
4012 (breakpoint_has_location_inserted_here): Likewise.
4013 (single_step_breakpoint_inserted_here_p): Likewise.
4014 (pc_at_non_inline_function): Likewise.
4015 * breakpoint.h (bpstat_stop_status): Update declaration.
4016 (breakpoint_here_p): Likewise.
4017 (breakpoint_in_range_p): Likewise.
4018 (moribund_breakpoint_here_p): Likewise.
4019 (breakpoint_inserted_here_p): Likewise.
4020 (software_breakpoint_inserted_here_p): Likewise.
4021 (hardware_breakpoint_inserted_here_p): Likewise.
4022 (breakpoint_has_location_inserted_here): Likewise.
4023 (single_step_breakpoint_inserted_here_p): Likewise.
4024 (hardware_watchpoint_inserted_in_range): Likewise.
4025 (breakpoint_address_match): Likewise.
4026 (insert_single_step_breakpoint): Likewise.
4027 (pc_at_non_inline_function): Likewise.
4028 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
4029 * record.c (record_check_stopped_by_breakpoint): Likewise.
4030 * record.h (record_check_stopped_by_breakpoint): Likewise.
4031 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
4035 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4036 regcache->arch () instead get_regcache_arch.
4037 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
4039 (aarch64_fbsd_store_inferior_registers): Likewise.
4040 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
4041 (store_gregs_to_thread): Likewise.
4042 (fetch_fpregs_from_thread): Likewise.
4043 (store_fpregs_to_thread): Likewise.
4044 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
4045 (aarch64_store_return_value): Likewise.
4046 (aarch64_software_single_step): Likewise.
4047 * aix-thread.c (aix_thread_wait): Likewise.
4048 (supply_reg32): Likewise.
4049 (supply_sprs64): Likewise.
4050 (supply_sprs32): Likewise.
4051 (fill_gprs64): Likewise.
4052 (fill_gprs32): Likewise.
4053 (fill_sprs64): Likewise.
4054 (fill_sprs32): Likewise.
4055 (store_regs_user_thread): Likewise.
4056 (store_regs_kernel_thread): Likewise.
4057 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4058 (alphabsd_store_inferior_registers): Likewise.
4059 * alpha-tdep.c (alpha_extract_return_value): Likewise.
4060 (alpha_store_return_value): Likewise.
4061 (alpha_deal_with_atomic_sequence): Likewise.
4062 (alpha_next_pc): Likewise.
4063 (alpha_software_single_step): Likewise.
4064 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4065 (amd64bsd_store_inferior_registers): Likewise.
4066 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4068 (amd64_linux_store_inferior_registers): Likewise.
4069 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4070 (amd64_collect_native_gregset): Likewise.
4071 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4072 (amd64obsd_collect_uthread): Likewise.
4073 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4074 (amd64_collect_fpregset): Likewise.
4075 (amd64_supply_fxsave): Likewise.
4076 (amd64_supply_xsave): Likewise.
4077 (amd64_collect_fxsave): Likewise.
4078 (amd64_collect_xsave): Likewise.
4079 * arc-tdep.c (arc_write_pc): Likewise.
4080 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4081 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4082 (arm_fbsd_store_inferior_registers): Likewise.
4083 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4084 (store_vfp_regs): Likewise.
4085 (arm_linux_fetch_inferior_registers): Likewise.
4086 (arm_linux_store_inferior_registers): Likewise.
4087 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4088 (arm_linux_sigreturn_next_pc): Likewise.
4089 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4090 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4091 (fetch_register): Likewise.
4092 (store_register): Likewise.
4093 * arm-tdep.c (arm_is_thumb): Likewise.
4094 (displaced_in_arm_mode): Likewise.
4095 (bx_write_pc): Likewise.
4096 (arm_get_next_pcs_addr_bits_remove): Likewise.
4097 (arm_software_single_step): Likewise.
4098 (arm_extract_return_value): Likewise.
4099 (arm_store_return_value): Likewise.
4100 (arm_write_pc): Likewise.
4101 * bfin-tdep.c (bfin_extract_return_value): Likewise.
4102 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4103 (bsd_uthread_store_registers): Likewise.
4104 * core-regset.c (fetch_core_registers): Likewise.
4105 * corelow.c (get_core_registers): Likewise.
4106 * cris-tdep.c (cris_store_return_value): Likewise.
4107 (cris_extract_return_value): Likewise.
4108 (find_step_target): Likewise.
4109 (find_step_target): Likewise.
4110 (cris_software_single_step): Likewise.
4111 * ctf.c (ctf_fetch_registers): Likewise.
4112 * darwin-nat.c (cancel_breakpoint): Likewise.
4113 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4114 * frv-tdep.c (frv_extract_return_value): Likewise.
4115 * ft32-tdep.c (ft32_store_return_value): Likewise.
4116 (ft32_extract_return_value): Likewise.
4117 * go32-nat.c (fetch_register): Likewise.
4118 (go32_fetch_registers): Likewise.
4119 (go32_store_registers): Likewise.
4120 (store_register): Likewise.
4121 * h8300-tdep.c (h8300_extract_return_value): Likewise.
4122 (h8300_store_return_value): Likewise.
4123 * hppa-linux-nat.c (fetch_register): Likewise.
4124 (store_register): Likewise.
4125 (hppa_linux_fetch_inferior_registers): Likewise.
4126 (hppa_linux_store_inferior_registers): Likewise.
4127 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4128 (i386_darwin_store_inferior_registers): Likewise.
4129 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4130 (gnu_store_registers): Likewise.
4131 * i386-linux-nat.c (fetch_register): Likewise.
4132 (store_register): Likewise.
4133 (supply_gregset): Likewise.
4134 (fill_gregset): Likewise.
4135 (i386_linux_fetch_inferior_registers): Likewise.
4136 (i386_linux_store_inferior_registers): Likewise.
4137 (i386_linux_resume): Likewise.
4138 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4140 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4141 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4142 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4143 (i386obsd_collect_uthread): Likewise.
4144 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4145 (i386_supply_gregset): Likewise.
4146 (i386_collect_gregset): Likewise.
4147 (i386_supply_fpregset): Likewise.
4148 (i386_collect_fpregset): Likewise.
4149 (i386_mpx_bd_base): Likewise.
4150 * i386-v4-nat.c (supply_fpregset): Likewise.
4151 (fill_fpregset): Likewise.
4152 * i387-tdep.c (i387_supply_fsave): Likewise.
4153 (i387_collect_fsave): Likewise.
4154 (i387_supply_fxsave): Likewise.
4155 (i387_collect_fxsave): Likewise.
4156 (i387_supply_xsave): Likewise.
4157 (i387_collect_xsave): Likewise.
4158 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4159 (ia64_linux_store_registers): Likewise.
4160 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4161 (ia64_extract_return_value): Likewise.
4162 (ia64_store_return_value): Likewise.
4163 (find_func_descr): Likewise.
4164 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4165 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4166 (inf_ptrace_store_registers): Likewise.
4167 * infrun.c (use_displaced_stepping): Likewise.
4168 (displaced_step_prepare_throw): Likewise.
4170 (proceed): Likewise.
4171 (do_target_wait): Likewise.
4172 (adjust_pc_after_break): Likewise.
4173 (handle_inferior_event_1): Likewise.
4174 (handle_signal_stop): Likewise.
4175 (save_infcall_suspend_state): Likewise.
4176 (restore_infcall_suspend_state): Likewise.
4177 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4178 * jit.c (jit_frame_prev_register): Likewise.
4179 * linux-nat.c (save_stop_reason): Likewise.
4180 (linux_nat_wait_1): Likewise.
4181 (resume_stopped_resumed_lwps): Likewise.
4182 * linux-record.c (record_linux_sockaddr): Likewise.
4183 (record_linux_msghdr): Likewise.
4184 (record_linux_system_call): Likewise.
4185 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4186 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4187 (lm32_store_return_value): Likewise.
4188 * m32c-tdep.c (m32c_read_flg): Likewise.
4189 (m32c_pseudo_register_read): Likewise.
4190 (m32c_pseudo_register_write): Likewise.
4191 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4192 (m32r_linux_collect_gregset): Likewise.
4193 * m32r-tdep.c (m32r_store_return_value): Likewise.
4194 (m32r_extract_return_value): Likewise.
4195 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4196 (m68kbsd_collect_fpregset): Likewise.
4197 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4198 * m68k-linux-nat.c (fetch_register): Likewise.
4199 (old_fetch_inferior_registers): Likewise.
4200 (old_store_inferior_registers): Likewise.
4201 (store_regs): Likewise.
4202 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4203 (m68k_svr4_store_return_value): Likewise.
4204 * m88k-tdep.c (m88k_store_arguments): Likewise.
4205 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4206 (mi_cmd_data_write_register_values): Likewise.
4207 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4208 (mips_fbsd_store_inferior_registers): Likewise.
4209 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4210 (mips_fbsd_supply_gregs): Likewise.
4211 (mips_fbsd_collect_fpregs): Likewise.
4212 (mips_fbsd_collect_gregs): Likewise.
4213 (mips_fbsd_supply_fpregset): Likewise.
4214 (mips_fbsd_collect_fpregset): Likewise.
4215 (mips_fbsd_supply_gregset): Likewise.
4216 (mips_fbsd_collect_gregset): Likewise.
4217 * mips-linux-nat.c (supply_gregset): Likewise.
4218 (fill_gregset): Likewise.
4219 (supply_fpregset): Likewise.
4220 (fill_fpregset): Likewise.
4221 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4222 (mips_fill_gregset): Likewise.
4223 (mips_supply_fpregset): Likewise.
4224 (mips_fill_fpregset): Likewise.
4225 (mips64_supply_gregset): Likewise.
4226 (micromips_linux_sigframe_validate): Likewise.
4227 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4228 (mipsnbsd_fetch_inferior_registers): Likewise.
4229 (mipsnbsd_store_inferior_registers): Likewise.
4230 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4231 (mipsnbsd_supply_gregset): Likewise.
4232 (mipsnbsd_iterate_over_regset_sections): Likewise.
4233 (mipsnbsd_supply_reg): Likewise.
4234 (mipsnbsd_supply_fpreg): Likewise.
4235 * mips-tdep.c (mips_in_frame_stub): Likewise.
4236 (mips_dummy_id): Likewise.
4237 (is_octeon_bbit_op): Likewise.
4238 (micromips_bc1_pc): Likewise.
4239 (extended_mips16_next_pc): Likewise.
4240 (mips16_next_pc): Likewise.
4241 (deal_with_atomic_sequence): Likewise.
4242 * moxie-tdep.c (moxie_process_readu): Likewise.
4243 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4244 * nto-procfs.c (procfs_store_registers): Likewise.
4245 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4246 (ppcfbsd_store_inferior_registers): Likewise.
4247 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4248 (fetch_altivec_register): Likewise.
4249 (get_spe_registers): Likewise.
4250 (fetch_spe_register): Likewise.
4251 (fetch_altivec_registers): Likewise.
4252 (fetch_all_gp_regs): Likewise.
4253 (fetch_all_fp_regs): Likewise.
4254 (store_vsx_register): Likewise.
4255 (store_altivec_register): Likewise.
4256 (set_spe_registers): Likewise.
4257 (store_spe_register): Likewise.
4258 (store_altivec_registers): Likewise.
4259 (store_all_gp_regs): Likewise.
4260 (store_all_fp_regs): Likewise.
4261 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4262 (ppc_linux_collect_gregset): Likewise.
4263 (ppc_canonicalize_syscall): Likewise.
4264 (ppc_linux_record_signal): Likewise.
4265 (ppu2spu_prev_register): Likewise.
4266 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4267 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4268 (ppcobsd_store_registers): Likewise.
4269 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4271 (ppc_ravenscar_generic_store_registers): Likewise.
4272 * procfs.c (procfs_fetch_registers): Likewise.
4273 (procfs_store_registers): Likewise.
4274 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4275 (ravenscar_store_registers): Likewise.
4276 (ravenscar_prepare_to_store): Likewise.
4277 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4278 * record-full.c (record_full_wait_1): Likewise.
4279 (record_full_registers_change): Likewise.
4280 (record_full_store_registers): Likewise.
4281 (record_full_core_fetch_registers): Likewise.
4282 (record_full_save): Likewise.
4283 (record_full_goto_insn): Likewise.
4284 * regcache.c (regcache_register_size): Likewise.
4285 (get_regcache_arch): Remove.
4286 (regcache_read_pc): Likewise.
4287 * regcache.h (get_regcache_arch): Remove.
4288 * remote-sim.c (gdbsim_fetch_register): Likewise.
4289 (gdbsim_store_register): Likewise.
4290 * remote.c (fetch_register_using_p): Likewise.
4291 (send_g_packet): Likewise.
4292 (remote_prepare_to_store): Likewise.
4293 (store_registers_using_G): Likewise.
4294 * reverse.c (save_bookmark_command): Likewise.
4295 (goto_bookmark_command): Likewise.
4296 * rs6000-aix-tdep.c (branch_dest): Likewise.
4297 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4298 (fetch_register): Likewise.
4299 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4300 (ppc_collect_reg): Likewise.
4301 (ppc_collect_gregset): Likewise.
4302 (ppc_collect_fpregset): Likewise.
4303 (ppc_collect_vsxregset): Likewise.
4304 (ppc_collect_vrregset): Likewise.
4305 (ppc_displaced_step_hw_singlestep): Likewise.
4306 (rs6000_pseudo_register_read): Likewise.
4307 (rs6000_pseudo_register_write): Likewise.
4308 * s390-linux-nat.c (supply_gregset): Likewise.
4309 (fill_gregset): Likewise.
4310 (s390_linux_fetch_inferior_registers): Likewise.
4311 * s390-linux-tdep.c (s390_write_pc): Likewise.
4312 (s390_software_single_step): Likewise.
4313 (s390_all_but_pc_registers_record): Likewise.
4314 (s390_linux_syscall_record): Likewise.
4315 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4316 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4317 (shnbsd_store_inferior_registers): Likewise.
4318 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4319 (sh_extract_return_value_fpu): Likewise.
4320 (sh_store_return_value_nofpu): Likewise.
4321 (sh_corefile_supply_regset): Likewise.
4322 (sh_corefile_collect_regset): Likewise.
4323 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4324 (sh64_store_return_value): Likewise.
4325 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4326 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4327 (sparc_store_inferior_registers): Likewise.
4328 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4329 (sparc_ravenscar_prepare_to_store): Likewise.
4330 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4331 (sparc_analyze_control_transfer): Likewise.
4332 (sparc_step_trap): Likewise.
4333 (sparc_software_single_step): Likewise.
4334 (sparc32_gdbarch_init): Likewise.
4335 (sparc_supply_rwindow): Likewise.
4336 (sparc_collect_rwindow): Likewise.
4337 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4338 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4339 (sparc64nbsd_collect_gregset): Likewise.
4340 (sparc64nbsd_supply_fpregset): Likewise.
4341 (sparc64nbsd_collect_fpregset): Likewise.
4342 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4343 (sparc64_supply_gregset): Likewise.
4344 (sparc64_collect_gregset): Likewise.
4345 (sparc64_supply_fpregset): Likewise.
4346 (sparc64_collect_fpregset): Likewise.
4347 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4348 * spu-tdep.c (spu_unwind_sp): Likewise.
4349 (spu2ppu_prev_register): Likewise.
4350 (spu_memory_remove_breakpoint): Likewise.
4351 * stack.c (return_command): Likewise.
4352 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4353 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4354 * tracefile.c (trace_save_ctf): Likewise.
4355 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4356 (do_windows_store_inferior_registers): Likewise.
4357 (windows_resume): Likewise.
4358 * xtensa-linux-nat.c (fill_gregset): Likewise.
4359 (supply_gregset_reg): Likewise.
4360 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4361 (xtensa_register_read_masked): Likewise.
4362 (xtensa_supply_gregset): Likewise.
4363 (xtensa_extract_return_value): Likewise.
4364 (xtensa_store_return_value): Likewise.
4368 * doublest.c (floatformat_from_string): New function.
4369 * doublest.h (floatformat_from_string): Add prototype.
4371 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4372 (OP_FLOAT): ... this.
4373 * expression.h: Do not include "doublest.h".
4374 (union exp_element): Replace doubleconst and decfloatconst by
4375 new element floatconst.
4376 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4377 (ada_evaluate_subexp): Likewise.
4378 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4379 OP_DOUBLE and OP_DECFLOAT.
4380 * expprint.c (print_subexp_standard): Likewise.
4381 (dump_subexp_body_standard): Likewise.
4382 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4384 * parse.c: Include "dfp.h".
4385 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4386 (write_exp_elt_floatcst): New function.
4387 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4389 (operator_check_standard): Likewise.
4390 (parse_float): Do not accept suffix. Take type as input. Return bool.
4391 Return target format buffer instead of host DOUBLEST.
4392 Use floatformat_from_string and decimal_from_string to parse
4393 either binary or decimal floating-point types.
4394 (parse_c_float): Remove.
4395 * parser-defs.h: Do not include "doublest.h".
4396 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4397 (write_exp_elt_floatcst): Add prototype.
4398 (parse_float): Update prototype.
4399 (parse_c_float): Remove.
4401 * c-exp.y: Do not include "dfp.h".
4402 (typed_val_float): Use byte buffer instead of DOUBLEST.
4403 (typed_val_decfloat): Remove.
4405 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4406 (parse_number): Update to new parse_float interface.
4407 Parse suffixes and determine type before calling parse_float.
4408 Handle decimal and binary FP types the same way.
4410 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4411 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4412 (parse_number): Update to new parse_float interface.
4413 Parse suffixes and determine type before calling parse_float.
4415 * f-exp.y: Replace dval by typed_val_float.
4416 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4417 (parse_number): Use parse_float instead of atof.
4419 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4420 (parse_go_float): Remove.
4421 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4422 (parse_number): Call parse_float instead of parse_go_float.
4423 Parse suffixes and determine type before calling parse_float.
4425 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4426 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4427 (parse_number): Update to new parse_float interface.
4428 Parse suffixes and determine type before calling parse_float.
4430 * m2-exp.y: Replace dval by byte buffer val.
4431 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4432 (parse_number): Call parse_float instead of atof.
4434 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4435 (lex_number): Call parse_float instead of strtod.
4436 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4437 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4438 Use write_exp_elt_floatcst.
4439 (unit_testing): Remove static variable.
4440 (rust_type): Do not check unit_testing.
4441 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4443 * ada-exp.y (type_float, type_double): Remove.
4444 (typed_val_float): Use byte buffer instead of DOUBLEST.
4445 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4446 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4450 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4451 * arch/aarch64.h: New file.
4455 * dfp.h (decimal_from_string): Use const reference for argument.
4456 * dfp.c (decimal_from_string): Likewise.
4460 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4461 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4462 * mips-tdep.c (mips_print_fp_register): Likewise.
4466 * common/format.h (enum argclass): Replace decfloat_arg by
4467 dec32float_arg, dec64float_arg, and dec128float_arg.
4468 * common/format.c (parse_format_string): Update to return
4469 new decimal float argument classes.
4471 * printcmd.c (printf_decfloat): Rename to ...
4472 (printf_floating): ... this. Add argclass argument, and use it
4473 instead of parsing the format string again. Add support for
4474 binary floating-point values, using floatformat_to_string.
4475 Convert value to the target format if it doesn't already match.
4476 (ui_printf): Call printf_floating instead of printf_decfloat,
4477 also for double_arg / long_double_arg. Pass argclass.
4479 * dfp.c (decimal_to_string): Add format string argument.
4480 * dfp.h (decimal_to_string): Likewise.
4482 * doublest.c (floatformat_to_string): Add format string argument.
4483 * doublest.h (floatformat_to_string): Likewise.
4487 * doublest.c (floatformat_precision): New routine.
4488 (floatformat_to_string): Likewise.
4489 * doublest.c (floatformat_to_string): Add prototype.
4491 * printcmd.c (print_scalar_formatted): Only call print_floating
4492 on floating-point types.
4493 * valprint.c: Do not include "floatformat.h".
4494 (generic_val_print_decfloat): Remove.
4495 (generic_val_print): Call generic_val_print_float for both
4496 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4497 (print_floating): Use floatformat_to_string. Handle decimal float.
4498 (print_decimal_floating): Remove, merge into floatformat_to_string.
4499 * value.h (print_decimal_floating): Remove.
4501 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4505 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4509 * memattr.h: Don't include vec.h.
4510 (struct mem_attrib): Initialize fields.
4511 <unknown>: New static method.
4512 (struct mem_region): Add constructors, operator<, initialize
4514 * memattr.c: Include algorithm.
4515 (default_mem_attrib, unknown_mem_attrib): Remove.
4516 (user_mem_region_list): New global.
4517 (target_mem_region_list, mem_region_list): Change type to
4518 std::vector<mem_region>.
4519 (mem_use_target): Now a function.
4520 (target_mem_regions_valid): Change type to bool.
4521 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4522 (require_user_regions): Adjust.
4523 (require_target_regions): Adjust.
4524 (create_mem_region): Adjust.
4525 (lookup_mem_region): Adjust.
4526 (invalidate_target_mem_regions): Adjust.
4527 (mem_clear): Rename to...
4528 (user_mem_clear): ... this, and adjust.
4529 (mem_command): Adjust.
4530 (info_mem_command): Adjust.
4531 (mem_enable, enable_mem_command, mem_disable,
4532 disable_mem_command): Adjust.
4533 (mem_delete): Adjust.
4534 (delete_mem_command): Adjust.
4535 * memory-map.h (parse_memory_map): Return an std::vector.
4536 * memory-map.c (parse_memory_map): Likewise.
4537 (struct memory_map_parsing_data): Add constructor.
4538 <memory_map>: Point to std::vector.
4539 (memory_map_start_memory): Adjust.
4540 (memory_map_end_memory): Adjust.
4541 (memory_map_end_property): Adjust.
4542 (clear_result): Remove.
4543 * remote.c (remote_memory_map): Return an std::vector.
4544 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4546 (target_debug_print_mem_region_vector): New.
4547 * target-delegates.c: Regenerate.
4548 * target.h (mem_region_vector): New typedef.
4549 (to_memory_map): Return mem_region_vector.
4550 (target_memory_map): Return an std::vector.
4551 * target.c (target_memory_map): Return an std::vector.
4552 (flash_erase_command): Adjust.
4556 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4557 Change type to std::string.
4558 (memory_map_start_property): Adjust.
4559 (memory_map_end_property): Adjust.
4563 * infrun.h: Include common/byte-vector.h.
4564 (struct displaced_step_closure): New struct.
4565 (struct buf_displaced_step_closure): New struct.
4566 * infrun.c (displaced_step_closure::~displaced_step_closure):
4567 Provide default implementation.
4568 (displaced_step_clear): Deallocate step closure with delete.
4569 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4570 (aarch64_displaced_step_closure): ... this, extend
4571 displaced_step_closure.
4572 (aarch64_displaced_step_data) <dsc>: Change type to
4573 aarch64_displaced_step_closure.
4574 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4576 (aarch64_displaced_step_fixup): Add cast for displaced step
4578 * amd64-tdep.c (displaced_step_closure): Rename to ...
4579 (amd64_displaced_step_closure): ... this, extend
4580 displaced_step_closure.
4581 <insn_buf>: Change type to std::vector<gdb_byte>.
4583 (fixup_riprel): Change type of DSC parameter, adjust to type
4585 (fixup_displaced_copy): Change type of DSC parameter.
4586 (amd64_displaced_step_copy_insn): Instantiate
4587 amd64_displaced_step_closure.
4588 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4589 to type change of insn_buf.
4590 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4592 (arm_linux_copy_svc): Likewise.
4593 (cleanup_kernel_helper_return): Likewise.
4594 (arm_catch_kernel_helper_return): Likewise.
4595 (arm_linux_displaced_step_copy_insn): Instantiate
4596 arm_displaced_step_closure.
4597 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4598 (displaced_read_reg): Change type of parameter DSC.
4599 (branch_write_pc): Likewise.
4600 (load_write_pc): Likewise.
4601 (alu_write_pc): Likewise.
4602 (displaced_write_reg): Likewise.
4603 (arm_copy_unmodified): Likewise.
4604 (thumb_copy_unmodified_32bit): Likewise.
4605 (thumb_copy_unmodified_16bit): Likewise.
4606 (cleanup_preload): Likewise.
4607 (install_preload): Likewise.
4608 (arm_copy_preload): Likewise.
4609 (thumb2_copy_preload): Likewise.
4610 (install_preload_reg): Likewise.
4611 (arm_copy_preload_reg): Likewise.
4612 (cleanup_copro_load_store): Likewise.
4613 (install_copro_load_store): Likewise.
4614 (arm_copy_copro_load_store) Likewise.
4615 (thumb2_copy_copro_load_store): Likewise.
4616 (cleanup_branch): Likewise.
4617 (install_b_bl_blx): Likewise.
4618 (arm_copy_b_bl_blx): Likewise.
4619 (thumb2_copy_b_bl_blx): Likewise.
4620 (thumb_copy_b): Likewise.
4621 (install_bx_blx_reg): Likewise.
4622 (arm_copy_bx_blx_reg): Likewise.
4623 (thumb_copy_bx_blx_reg): Likewise.
4624 (cleanup_alu_imm): Likewise.
4625 (arm_copy_alu_imm): Likewise.
4626 (thumb2_copy_alu_imm): Likewise.
4627 (cleanup_alu_reg): Likewise.
4628 (install_alu_reg): Likewise.
4629 (arm_copy_alu_reg): Likewise.
4630 (thumb_copy_alu_reg): Likewise.
4631 (cleanup_alu_shifted_reg): Likewise.
4632 (install_alu_shifted_reg): Likewise.
4633 (arm_copy_alu_shifted_reg): Likewise.
4634 (cleanup_load): Likewise.
4635 (cleanup_store): Likewise.
4636 (arm_copy_extra_ld_st): Likewise.
4637 (install_load_store): Likewise.
4638 (thumb2_copy_load_literal): Likewise.
4639 (thumb2_copy_load_reg_imm): Likewise.
4640 (arm_copy_ldr_str_ldrb_strb): Likewise.
4641 (cleanup_block_load_all): Likewise.
4642 (cleanup_block_store_pc): Likewise.
4643 (cleanup_block_load_pc): Likewise.
4644 (arm_copy_block_xfer): Likewise.
4645 (thumb2_copy_block_xfer): Likewise.
4646 (cleanup_svc): Likewise.
4647 (install_svc): Likewise.
4648 (arm_copy_svc): Likewise.
4649 (thumb_copy_svc): Likewise.
4650 (arm_copy_undef): Likewise.
4651 (thumb_32bit_copy_undef): Likewise.
4652 (arm_copy_unpred): Likewise.
4653 (arm_decode_misc_memhint_neon): Likewise.
4654 (arm_decode_unconditional): Likewise.
4655 (arm_decode_miscellaneous): Likewise.
4656 (arm_decode_dp_misc): Likewise.
4657 (arm_decode_ld_st_word_ubyte): Likewise.
4658 (arm_decode_media): Likewise.
4659 (arm_decode_b_bl_ldmstm): Likewise.
4660 (arm_decode_ext_reg_ld_st): Likewise.
4661 (thumb2_decode_dp_shift_reg): Likewise.
4662 (thumb2_decode_ext_reg_ld_st): Likewise.
4663 (arm_decode_svc_copro): Likewise.
4664 (thumb2_decode_svc_copro): Likewise.
4665 (install_pc_relative): Likewise.
4666 (thumb_copy_pc_relative_16bit): Likewise.
4667 (thumb_decode_pc_relative_16bit): Likewise.
4668 (thumb_copy_pc_relative_32bit): Likewise.
4669 (thumb_copy_16bit_ldr_literal): Likewise.
4670 (thumb_copy_cbnz_cbz): Likewise.
4671 (thumb2_copy_table_branch): Likewise.
4672 (cleanup_pop_pc_16bit_all): Likewise.
4673 (thumb_copy_pop_pc_16bit): Likewise.
4674 (thumb_process_displaced_16bit_insn): Likewise.
4675 (decode_thumb_32bit_ld_mem_hints): Likewise.
4676 (thumb_process_displaced_32bit_insn): Likewise.
4677 (thumb_process_displaced_insn): Likewise.
4678 (arm_process_displaced_insn): Likewise.
4679 (arm_displaced_init_closure): Likewise.
4680 (arm_displaced_step_fixup): Add cast for closure.
4681 * arm-tdep.h: Include infrun.h.
4682 (displaced_step_closure): Rename to ...
4683 (arm_displaced_step_closure): ... this, extend
4684 displaced_step_closure.
4685 <u::svc::copy_svc_os>: Change type of parameter DSC.
4686 <cleanup>: Likewise.
4687 (arm_process_displaced_insn): Likewise.
4688 (arm_displaced_init_closure): Likewise.
4689 (displaced_read_reg): Likewise.
4690 (displaced_write_reg): Likewise.
4691 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4693 * i386-tdep.h: Include infrun.h.
4694 (i386_displaced_step_closure): New typedef.
4695 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4696 i386_displaced_step_closure.
4697 (i386_displaced_step_fixup): Adjust.
4698 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4699 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4701 (ppc_displaced_step_fixup): Adjust.
4702 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4703 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4705 (s390_displaced_step_fixup): Adjust.
4709 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4710 Remove declarations.
4714 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4716 (gdb_bfd_record_inclusion): Update.
4717 (bfdp): Remove typedef.
4721 * gdb_bfd.c (gdb_bfd_ref): Use new.
4722 (struct gdb_bfd_data): Add constructor, destructor, and member
4724 (gdb_bfd_unref): Use delete.
4728 * exec.c (exec_file_attach): Use new_bfd_ref.
4729 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4730 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4731 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4733 * gdb_bfd.h (new_bfd_ref): New function.
4737 * main.c (captured_command_loop): Add attribute noinline.
4741 * interps.c (struct interp_factory): Add constructor.
4742 (interp_factory_p): Remove typedef.
4743 (DEF_VEC_P(interp_factory_p)): Remove.
4744 (interpreter_factories): Change type to std::vector.
4745 (interp_factory_register): Adjust.
4746 (interp_lookup): Adjust.
4747 (interpreter_completer): Adjust.
4751 * break-catch-syscall.c (catch_syscall_completer): Use
4752 std::string, gdb::unique_xmalloc_ptr.
4756 * infcall.c (call_function_by_hand_dummy): Use std::string.
4760 * mi/mi-main.c (mi_cmd_execute): Update.
4761 * top.h (prepare_execute_command): Return scoped_value_mark.
4762 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4763 Add move constructor.
4764 * top.c (prepare_execute_command): Return scoped_value_mark.
4765 (execute_command): Update.
4769 * xml-support.c (xml_fetch_content_from_file): Check fread's
4774 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4776 (handle_error_fd): New function.
4777 (ser_base_async): Add/delete an event loop file handler for
4782 * xml-support.c (xml_fetch_content_from_file): Don't read in
4783 chunks. Instead use fseek to determine the file's size, and read
4788 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4790 Add whitespace to front of type name.
4794 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4795 DW_AT_accessibility.
4799 * features/tic6x-c62x-linux.c: Remove.
4803 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4804 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4805 (do_mixed_source_and_assembly): Likewise.
4809 * regcache.c (regcache::xfer_part): Remove assertion.
4813 * xml-support.c (xml_fetch_content_from_file): Call
4814 unique_ptr::release() instead unique_ptr::get() when passing
4819 * regcache.c (regcache::xfer_part): Remove parameters read and
4820 write, add parameter is_raw. All callers are updated.
4824 * c-typeprint.c (enum access_specifier): Moved here from
4826 (output_access_specifier): New function.
4827 (c_type_print_base): Consider typedefs when assessing
4828 whether access labels are needed.
4829 Use output_access_specifier as needed.
4830 Output access specifier for typedefs, if needed.
4831 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4832 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4834 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4839 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4840 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4841 * target.c (target_fileio_read_stralloc): Update.
4842 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4843 * target.h (target_fileio_read_stralloc): Return
4848 * xml-syscall.c (xml_init_syscalls_info): Update.
4849 * xml-support.c (xinclude_start_include): Update.
4850 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4851 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4852 (xml_fetch_content_from_file): Likewise.
4853 * osdata.c (get_osdata): Update.
4854 * target.h (target_read_stralloc, target_get_osdata): Return
4856 * solib-aix.c (solib_aix_get_library_list): Update.
4857 * solib-target.c (solib_target_current_sos): Update.
4858 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4859 * xml-tdesc.c (fetch_available_features_from_target): Update.
4860 (target_fetch_description_xml): Update.
4861 (file_read_description_xml): Update.
4862 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4863 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4864 (remote_pid_to_exec_file): Update.
4865 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4866 (target_get_osdata): Likewise.
4870 * remote.c (remote_register_number_and_offset): Use std::vector.
4871 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4872 (putpkt_binary): Use gdb::def_vector.
4873 (compare_sections_command): Use gdb::byte_vector.
4877 * ppc-linux-nat.c (hwdebug_insert_point): Use
4878 gdb::unique_xmalloc_ptr, XDUP.
4882 * probe.c (parse_probes): Use std::string.
4883 (info_probes_for_ops, enable_probes_command)
4884 (disable_probes_command): Remove cleanups.
4888 * buildsym.c (block_compar): Remove.
4889 (end_symtab_get_static_block): Use std::vector.
4893 * memrange.h (struct mem_range): Define operator< and operator==.
4894 (mem_range_s): Remove.
4895 (DEF_VEC_O (mem_range_s)): Remove.
4896 (normalize_mem_ranges): Change parameter type to std::vector.
4897 * memrange.c (compare_mem_ranges): Remove.
4898 (normalize_mem_ranges): Change parameter type to std::vector,
4899 adjust to vector change.
4900 * exec.c (section_table_available_memory): Return vector, remove
4902 (section_table_read_available_memory): Adjust to std::vector
4904 * remote.c (remote_read_bytes): Adjust to std::vector
4906 * tracepoint.h (traceframe_available_memory): Change parameter
4907 type to std::vector.
4908 * tracepoint.c (traceframe_available_memory): Change parameter
4909 type to std::vector, adjust.
4910 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4912 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4913 unittests/memrange-selftests.c.
4914 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4915 * gdb/unittests/memrange-selftests.c: New file.
4919 * elfread.c (probe_key_free): Rename range-for variable.
4920 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4921 (find_probe_by_pc, collect_probes): Rename range-for variable.
4925 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4926 * features/tic6x-c62x.c: Remove.
4927 * features/tic6x-c64x-linux.c: Remove.
4928 * features/tic6x-c64x.c: Remove.
4929 * features/tic6x-c64xp-linux.c: Remove.
4930 * features/tic6x-c64xp.c: Remove.
4931 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4932 initialize_tdesc_tic6x_*_linux functions.
4933 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4934 initialize_tdesc_tic6x_* functions.
4938 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4940 * regformats/tic6x-c62x.dat: Remove.
4941 * regformats/tic6x-c64x.dat: Remove.
4942 * regformats/tic6x-c64xp.dat: Remove.
4946 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4947 (the !HAVE_LIBEXPAT version).
4951 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4956 * target.h: Include tracepoint.h.
4957 (enum trace_find_type): Move to tracepoint.h.
4958 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4959 * tracepoint.h: Don't include target.h
4960 (enum trace_find_type): Move from target.h.
4961 (parse_traceframe_info): Return a unique ptr.
4962 * tracepoint.c (current_traceframe_info): Change type to unique
4964 (free_traceframe_info): Remove.
4965 (clear_traceframe_info): Don't manually free
4966 current_traceframe_info.
4967 (free_result): Remove.
4968 (parse_traceframe_info): Return a unique ptr.
4969 (get_traceframe_info): Adjust to unique ptr.
4970 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4971 * remote.c (remote_traceframe_info): Return a unique ptr.
4972 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4974 * target-debug.h (target_debug_print_traceframe_info_up): New
4976 * target-delegates.c: Regenerate.
4980 * memrange.h (struct mem_range): Add constructors.
4981 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4982 std::vector<mem_range>.
4983 * tracepoint.c (free_traceframe_info): Don't manually free
4985 (traceframe_info_start_memory): Adjust to vector change.
4986 (traceframe_available_memory): Likewise.
4987 * tracefile-tfile.c (build_traceframe_info): Likewise.
4988 * ctf.c (ctf_traceframe_info): Likewise.
4992 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4994 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4995 (traceframe_info_start_tvar): Adjust to vector change.
4996 (parse_traceframe_info): Allocate with new.
4997 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4999 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
5001 tfile_traceframe_info): Allocate with new.
5002 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
5007 * tracepoint.c (traceframe_info): Rename to...
5008 (current_traceframe_info): ...this.
5009 (clear_traceframe_info): Adjust.
5010 (get_traceframe_info): Adjust.
5014 * nat/linux-osdata.c: Include algorithm.
5015 (compare_processes): Remove.
5016 (struct pid_pgid_entry): New struct.
5017 (linux_xfer_osdata_processgroups): Use std::vector instead of
5022 * objfiles.h: Don't include symfile.h.
5023 (struct partial_symbol): Remove forward-declaration.
5024 (struct objfile) <global_psymbols, static_psymbols>: Change type
5025 to std::vector<partial_symbol *>.
5026 * objfiles.c (objfile::objfile): Don't memset those fields.
5027 (objfile::~objfile): Don't free those fields.
5028 * psympriv.h (struct psymbol_allocation_list): Remove
5029 forward-declaration.
5030 (add_psymbol_to_list): Change psymbol_allocation_list parameter
5032 (start_psymtab_common): Change parameters to std::vector.
5033 * psymtab.c: Include algorithm.
5034 (require_partial_symbols): Call shrink_to_fit.
5035 (find_pc_sect_psymbol): Adjust to vector change.
5036 (match_partial_symbol): Likewise.
5037 (lookup_partial_symbol): Likewise.
5038 (psym_relocate): Likewise.
5039 (dump_psymtab): Likewise.
5040 (recursively_search_psymtabs): Likewise.
5041 (compare_psymbols): Remove.
5042 (sort_pst_symbols): Adjust to vector change.
5043 (start_psymtab_common): Likewise.
5044 (end_psymtab_common): Likewise.
5045 (psymbol_bcache_full): De-constify return value.
5046 (add_psymbol_to_bcache): Likewise.
5047 (extend_psymbol_list): Remove.
5048 (append_psymbol_to_list): Adjust to vector change.
5049 (add_psymbol_to_list): Likewise.
5050 (init_psymbol_list): Likewise.
5051 (maintenance_info_psymtabs): Likewise.
5052 (maintenance_check_psymtabs): Likewise.
5053 * symfile.h (struct psymbol_allocation_list): Remove.
5054 * symfile.c (reread_symbols): Adjust to vector change.
5055 * dbxread.c (start_psymtab): Change type of parameters.
5056 (dbx_symfile_read): Adjust to vector change.
5057 (read_dbx_symtab): Likewise.
5058 (start_psymtab): Change type of parameters.
5059 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5060 (create_partial_symtab): Likewise.
5061 (add_partial_symbol): Likewise.
5062 (write_one_signatured_type): Likewise.
5063 (recursively_write_psymbols): Likewise.
5064 * mdebugread.c (parse_partial_symbols): Likewise.
5065 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5066 (scan_xcoff_symtab): Adjust to vector change.
5067 (xcoff_initial_scan): Likewise.
5071 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5075 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5076 Remove s390x-*-expedite, add s390x-expedite.
5080 * features/s390-gs-linux64.c: Regenerated.
5081 * features/s390x-gs-linux64.c: Regenerated.
5085 * compile/compile-object-run.c (do_module_cleanup): Use delete.
5086 * solib.c (update_solib_list, reload_shared_libraries_1): Use
5088 * symfile.c (symbol_file_add_with_addrs): Use new.
5089 (symbol_file_add_separate): Update comment.
5090 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5091 * jit.c (jit_object_close_impl): Use new.
5092 (jit_unregister_code): Use delete.
5093 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5094 (~objfile): Rename from free_objfile.
5095 (free_objfile_separate_debug, do_free_objfile_cleanup)
5096 (free_all_objfiles, objfile_purge_solibs): Use delete.
5097 * objfiles.h (struct objfile): Add constructor and destructor.
5098 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
5099 (allocate_objfile, free_objfile): Don't declare.
5100 (struct objstats): Add initializers.
5104 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5105 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5106 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5107 * gdbarch.h: Regenerate.
5108 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5110 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5111 (i386_displaced_step_fixup): Adjust comment.
5112 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5116 * prologue-value.h (pv_area::store_would_trash): Return bool.
5117 (pv_area::find_reg): Likewise.
5118 * prologue-value.c (pv_area::store_would_trash): Return bool.
5119 (pv_area::find_reg): Likewise.
5123 * s390-linux-tdep.c (s390_store, s390_load)
5124 (s390_check_for_saved, s390_analyze_prologue): Update.
5125 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5126 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5127 * prologue-value.h (class pv_area): Move from prologue-value.c.
5128 Change names of members. Add constructor, destructor, member
5130 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5131 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5132 (pv_area_fetch, pv_area_scan): Don't declare.
5133 * prologue-value.c (struct pv_area::area_entry): Now member of
5135 (struct pv_area): Move to prologue-value.h.
5136 (pv_area::pv_area): Rename from make_pv_area.
5137 (pv_area::~pv_area): Rename from free_pv_area.
5138 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5139 (clear_entries, find_entry, overlaps, store_would_trash, store)
5140 (fetch, find_reg, scan): Now member of pv_area.
5141 Remove "area" argument. Update.
5142 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5144 * mn10300-tdep.c (push_reg, check_for_saved)
5145 (mn10300_analyze_prologue): Update.
5146 * mep-tdep.c (is_arg_spill, check_for_saved)
5147 (mep_analyze_prologue): Update.
5148 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5149 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5150 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5151 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5153 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5154 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5158 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5159 * linux-nat.c (linux_nat_delete_thread): New variable.
5160 (lwp_free): Invoke linux_nat_delete_thread if set.
5161 (linux_nat_set_delete_thread): New function.
5162 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5163 thread delete callback.
5164 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5165 (_initialize_arm_linux_nat): Assign thread delete callback.
5166 * s390-linux-nat.c (s390_delete_thread): New function.
5167 (_initialize_s390_nat): Assign thread delete callback.
5168 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5169 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5171 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5173 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5174 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5178 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5180 * tui/tui-layout.c (enum tui_status): Use std::string.
5184 * gdbthread.h (thread_command): Constify.
5185 * inferior.h (detach_command): Constify.
5186 * top.h (set_history, show_history): Constify.
5187 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5188 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5189 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5190 * printcmd.c (set_command): Constify.
5191 (non_const_set_command): New function.
5192 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5193 * breakpoint.c (enable_command, disable_command, delete_command)
5194 (catch_command, tcatch_command, set_breakpoint_cmd)
5195 (show_breakpoint_cmd): Constify.
5196 * macrocmd.c (macro_command): Constify.
5197 * infcmd.c (unset_command, kill_command, detach_command)
5198 (info_proc_cmd): Constify.
5199 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5200 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5201 (info_auto_load_cmd): Constify.
5202 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5203 (unset_tdesc_cmd): Constify.
5204 * ada-lang.c (set_ada_command, show_ada_command)
5205 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5206 * guile/guile.c (set_guile_command, show_guile_command)
5207 (info_guile_command): Constify.
5208 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5210 * skip.c (skip_command): Constify.
5211 * compile/compile.c (_initialize_compile): Constify.
5212 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5213 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5214 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5215 (maint_btrace_pt_show_cmd): Constify.
5216 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5218 * python/python.c (user_show_python, user_set_python): Constify.
5219 * mips-tdep.c (set_mips_command, show_mips_command)
5220 (set_mipsfpu_command): Constify.
5221 * record-btrace.c (cmd_record_btrace_start)
5222 (cmd_set_record_btrace, cmd_show_record_btrace)
5223 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5224 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5225 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5227 * symfile.c (overlay_command): Constify.
5228 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5229 * cli/cli-logging.c (set_logging_command, show_logging_command):
5231 * cli/cli-dump.c (dump_command, append_command)
5232 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5233 (tekhex_dump_command, binary_dump_command)
5234 (binary_append_command): Constify.
5235 * cli/cli-decode.c (struct cmd_list_element): Change type of
5237 * cli/cli-cmds.c (info_command, show_command, set_debug)
5238 (show_debug): Constify.
5239 (show_command): Add non-const overload.
5240 * top.c (set_history, show_history): Constify.
5241 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5242 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5243 * target.c (target_command): Constify.
5244 * sparc64-tdep.c (info_adi_command): Constify.
5245 * record-full.c (cmd_record_full_start): Constify.
5246 (set_record_full_command): Constify. Fix typo.
5247 (show_record_full_command): Constify.
5248 * thread.c (thread_command, thread_apply_command): Constify.
5249 * memattr.c (dummy_cmd): Constify.
5250 * value.c (function_command): Constify.
5251 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5252 * probe.c (info_probes_command): Constify.
5253 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5254 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5255 (show_thread_cmd, set_thread_default_cmd)
5256 (show_thread_default_cmd): Constify.
5257 (check_empty): Constify.
5258 * tracepoint.c (tfind_command): Constify.
5259 * cp-support.c (maint_cplus_command): Constify.
5260 * windows-tdep.c (info_w32_command): Constify.
5261 * record.c (cmd_record_start, set_record_command)
5262 (show_record_command, info_record_command, cmd_record_goto):
5264 * ravenscar-thread.c (set_ravenscar_command)
5265 (show_ravenscar_command): Constify.
5266 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5268 (add_internal_problem_command): Remove casts.
5269 * arc-tdep.c (maintenance_print_arc_command): Constify.
5270 * valprint.c (set_print, show_print, set_print_raw)
5271 (show_print_raw): Constify.
5272 * maint.c (maintenance_command, maintenance_info_command)
5273 (maintenance_print_command, maintenance_set_cmd)
5274 (maintenance_show_cmd, set_per_command_cmd)
5275 (show_per_command_cmd, maintenance_check_command): Constify.
5276 * language.c (set_check, show_check): Constify.
5277 * typeprint.c (show_print_type, set_print_type): Constify.
5278 * go32-nat.c (go32_info_dos_command): Constify.
5282 * breakpoint.c (prepare_re_set_context): Remove.
5283 (breakpoint_re_set_one): Update. Don't use cleanups.
5284 (breakpoint_re_set): Use scoped_restore, std::string, and
5285 scoped_restore_current_language.
5289 * breakpoint.c (commands_command_1): Use std::string.
5290 (cleanup_executing_breakpoints): Remove.
5291 (bpstat_do_actions_1): Use scoped_restore.
5292 (bpstat_check_watchpoint): Use std::string.
5293 (decode_static_tracepoint_spec): Likewise.
5294 (break_range_command): Likewise.
5295 (watch_command_1): Likewise.
5296 (compare_breakpoints): Change argument types.
5297 (clear_command): Use std::vector.
5298 (cleanup_executing_breakpoints): Remove.
5299 (update_global_location_list): Use unique_xmalloc_ptr.
5300 (strace_command): Remove unused declaration.
5304 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5305 * NEWS: Mention new FreeBSD/arm native configuration.
5306 * configure.host: Add arm*-*-freebsd*.
5307 * configure.nat: Likewise.
5308 * arm-fbsd-nat.c: New file.
5312 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5313 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5314 * NEWS: Mention new FreeBSD/arm target.
5315 * configure.tgt: Add arm*-*-freebsd*.
5316 * arm-fbsd-tdep.c: New file.
5317 * arm-fbsd-tdep.h: New file.
5321 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5322 `gdbarch_elfcore_write_linux_prpsinfo'.
5323 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5325 (elf_internal_linux_prpsinfo): Remove declaration.
5326 * gdbarch.h: Regenerate.
5327 * gdbarch.c: Regenerate.
5331 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5332 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5336 * breakpoint.c (reattach_breakpoints): Delete.
5337 * breakpoint.h (reattach_breakpoints): Delete.
5341 * symfile.c (registered_sym_fns): Make struct, not typedef.
5342 (DEF_VEC_O (registered_sym_fns)): Remove.
5343 (symtab_fns): Change type to std::vector.
5344 (add_symtab_fns): Adjust.
5345 (find_sym_fns): Adjust.
5349 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5350 * arc-tdep.h (arc_arch_is_em): New function.
5351 (arc_arch_is_hs): Likewise.
5355 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5356 parentheses in the declaration.
5357 (macro_lookup_inclusion): Likewise.
5358 (macro_lookup_definition): Likewise.
5359 * p-lang.h (pascal_builtin_types): Likewise.
5360 * tui/tui-data.c (tui_win_list): Likewise.
5361 * tui/tui-data.h (tui_win_list): Likewise.
5362 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5366 * target-memory.c (block_boundaries): Fix for block address not
5367 aligned on block size.
5372 * breakpoint.c (struct captured_breakpoint_query_args)
5373 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5374 (print_breakpoint): New.
5375 * breakpoint.h (print_breakpoint): Declare.
5376 * common/common-exceptions.h (enum return_reason): Remove
5377 references to catch_exceptions.
5378 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5380 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5381 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5383 * gdbthread.h (thread_select): Declare.
5384 * mi/mi-cmd-break.c: Don't include gdb.h.
5385 (breakpoint_notify): Use print_breakpoint.
5386 * mi/mi-cmd-catch.c: Don't include gdb.h.
5387 * mi/mi-interp.c: Don't include gdb.h.
5388 (mi_print_breakpoint_for_event): New.
5389 (mi_breakpoint_created, mi_breakpoint_modified): Use
5390 mi_print_breakpoint_for_event.
5391 * mi/mi-main.c: Don't include gdb.h.
5392 (mi_cmd_thread_select): Parse the global thread ID here. Use
5393 thread_select instead of gdb_thread_select.
5394 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5395 of using gdb_list_thread_ids.
5396 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5398 (remote_fileio_request): Use TRY/CATCH instead of
5400 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5401 (symbol_file_add_from_memory_wrapper): Delete.
5402 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5403 * thread.c: Don't include gdb.h.
5404 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5405 (thread_alive): Use thread_select.
5406 (do_captured_thread_select): Delete, parts salvaged as ...
5407 (thread_select): ... this new function.
5408 (gdb_thread_select): Delete.
5413 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5415 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5416 No longer macros. Instead ...
5417 (enum wp_check_result): They're now values of this new
5419 (watchpoint_check): Change return type to wp_check_result and
5420 parameter type to bpstat.
5421 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5422 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5423 catch_errors. Reverse logic of watchpoint_check call.
5424 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5425 pointer as parameter.
5426 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5427 * common/common-exceptions.c (throw_exception_sjlj): Update
5428 comments to avoid mentioning catch_errors.
5429 * exceptions.c (catch_errors): Delete.
5430 * exceptions.h: Update comments to avoid mentioning catch_errors.
5431 (catch_errors_ftype, catch_errors): Delete.
5432 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5433 (hook_stop_stub): Delete.
5434 (restore_selected_frame): Change return type to void, and
5435 parameter type to const frame_id &.
5436 (restore_infcall_control_state): Use TRY/CATCH instead of
5438 * main.c (captured_command_loop): Return void and remove
5439 parameter. Remove references to catch_errors.
5440 (captured_main): Use TRY/CATCH instead of catch_errors.
5441 * objc-lang.c (objc_submethod_helper_data)
5442 (find_objc_msgcall_submethod_helper): Delete.
5443 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5445 * record-full.c (record_full_message): Return void.
5446 (record_full_message_args, record_full_message_wrapper): Delete.
5447 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5448 instead of catch_errors.
5449 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5450 parameter type to int.
5451 * solib-darwin.c (open_symbol_file_object): Ditto.
5452 * solib-dsbt.c (open_symbol_file_object): Ditto.
5453 * solib-frv.c (open_symbol_file_object): Ditto.
5454 * solib-svr4.c (open_symbol_file_object): Ditto.
5455 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5456 * solib.c (update_solib_list): Use TRY/CATCH instead of
5458 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5460 * symmisc.c (struct print_symbol_args): Remove.
5461 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5462 (print_symbol): Change type.
5463 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5464 and remove parameters.
5465 (catch_errors): New.
5466 (get_windows_debug_event): Adjust.
5470 * mi/mi-main.c (free_splay_tree): Remove.
5471 (list_available_thread_groups): Use splay_tree_up.
5472 * common/gdb_splay_tree.h: New file.
5476 * mi/mi-main.c (do_nothing): Remove.
5477 (list_available_thread_groups): Update.
5481 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5482 reading registers when switching context.
5486 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5487 (fbsd_convert_siginfo): Likewise.
5488 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5492 * configure.ac (try_guile_versions): Remove guile-2.2.
5493 * configure: Regenerate.
5497 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5498 (COMPILE.pre): Use $(CXX).
5502 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5504 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5505 * cp-support.h (cp_remove_params): Now returns a
5506 gdb::unique_xmalloc_ptr.
5507 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5508 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5509 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5510 returning a gdb::unique_xmalloc_ptr.
5511 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5512 * stack.c (find_frame_funname): Adjust to cp_remove_params
5513 returning a gdb::unique_xmalloc_ptr.
5517 * dwarf2read.c (dwarf2_get_dwz_file): Use
5518 gdb::unique_xmalloc_ptr.
5519 (find_slot_in_mapped_hash): Likewise.
5520 (dwarf2_physname): Likewise.
5521 (create_dwo_unit_in_dwp_v1): Use std::string.
5522 (create_dwo_unit_in_dwp_v2): Likewise.
5523 (lookup_dwo_cutu): Likewise.
5524 (inherit_abstract_dies): Use std::vector.
5525 (read_array_type): Likewise.
5526 (dwarf_decode_macros): Remove unused declaration.
5527 (unsigned_int_compar): Remove.
5528 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5529 (psymtabs_addrmap_cleanup): Remove.
5533 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5534 * frame.h (frame_cleanup_after_sniffer): Declare.
5535 (frame_prepare_for_sniffer): Return void.
5536 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5538 (frame_prepare_for_sniffer): Return void.
5542 * utils.h (make_cleanup_value_free): Remove.
5543 * utils.c (do_value_free, struct cleanup): Remove.
5544 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5546 * value.h (struct value_deleter): New.
5547 (gdb_value_up): New typedef.
5551 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5552 (make_cleanup_free_search_symbols): Remove.
5553 (search_symbols): Return std::vector.
5554 (symbol_search::compare_search_syms): Now member of
5555 symbol_search. Change arguments.
5556 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5557 (symtab_symbol_info, rbreak_command): Update.
5558 * symtab.h (struct symbol_search) <next>: Remove.
5560 (symbol_search::operator<): New function.
5561 (symbol_search::operator==): New function.
5562 (search_symbols): Remove std::vector.
5563 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5564 (symbol_search::compare_search_syms): Declare.
5568 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5569 arch/aarch64-insn.o.
5571 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5575 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5576 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5577 arch/arm-linux.o respectively.
5578 * configure.tgt: Likewise.
5582 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5583 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5587 * windows-nat.c: Include <algorithm>.
5591 * configure.tgt (i386_tobjs): New variable.
5592 (amd64_tobjs): New variable.
5593 Set $cpu_obs and $os_obs.
5597 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5598 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5599 (clean): Remove object files and dependency files.
5600 (distclean): Remove the directory.
5601 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5602 * configure: Re-generated.
5603 * configure.tgt: Replace amd64.o with arch/amd64.o.
5608 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5613 * linux-nat.c (linux_child_follow_fork): When following the parent
5614 and detaching the child, consult the parent thread's architecture
5615 instead of the child's.
5619 * ax.h: Do not include "doublest.h".
5620 (union agent_val): Remove.
5624 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5625 (decimal_to_string): Return std::string object.
5626 (decimal_from_string): Accept std::string object. Return bool.
5627 (decimal_from_integral, decimal_from_doublest): Remove.
5628 (decimal_from_longest): Add prototype.
5629 (decimal_from_ulongest): Likewise.
5630 (decimal_to_longest): Likewise.
5631 (decimal_from_doublest): Likewise.
5632 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5633 (MAX_DECIMAL_STRING): Move here.
5634 (decimal_to_string): Return std::string object.
5635 (decimal_from_string): Accept std::string object. Return bool.
5636 (decimal_from_integral): Remove, replace by ...
5637 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5638 (decimal_to_longest): New function.
5639 (decimal_from_floating): Remove, replace by ...
5640 (decimal_from_doublest): ... this new function.
5641 (decimal_to_doublest): Update to new decimal_to_string interface.
5643 * value.c (unpack_long): Use decimal_to_longest.
5644 * valops.c (value_cast): Use decimal_from_doublest instead of
5645 decimal_from_floating. Use decimal_from_[u]longest isntead of
5646 decimal_from_integral.
5647 * valarith.c (value_args_as_decimal): Likewise.
5648 * valprint.c (print_decimal_floating): Update to new
5649 decimal_to_string interface.
5650 * printcmd.c (printf_decfloat): Likewise.
5651 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5655 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5656 * gdbtypes.c: Include "floatformat.h".
5657 * value.c: Likewise.
5658 * m68k-tdep.c: Likewise.
5660 * findvar.c: Do not include "floatformat.h".
5661 * amd64-darwin-tdep.c: Likewise.
5662 * arm-linux-tdep.c: Likewise.
5663 * i386-darwin-tdep.c: Likewise.
5664 * i387-tdep.c: Likewise.
5665 * m68k-linux-tdep.c: Likewise.
5666 * mep-tdep.c: Likewise.
5667 * mips-tdep.c: Likewise.
5668 * nios2-tdep.c: Likewise.
5669 * s390-linux-tdep.c: Likewise.
5670 * sparc-obsd-tdep.c: Likewise.
5671 * sparc-tdep.c: Likewise.
5672 * sparc64-tdep.c: Likewise.
5673 * spu-tdep.c: Likewise.
5674 * tic6x-tdep.c: Likewise.
5675 * tilegx-tdep.c: Likewise.
5676 * vax-tdep.c: Likewise.
5677 * xstormy16-tdep.c: Likewise.
5678 * xtensa-tdep.c: Likewise.
5680 * top.c: Do not include "doublest.h".
5681 * aarch64-tdep.c: Likewise.
5682 * alpha-tdep.c: Likewise.
5683 * arm-linux-tdep.c: Likewise.
5684 * m68k-linux-tdep.c: Likewise.
5685 * tilegx-tdep.c: Likewise.
5686 * xstormy16-tdep.c: Likewise.
5690 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5691 (mipsn32_fbsd_sigframe): Define.
5692 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5693 for FreeBSD/mipsn32.
5697 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5702 * MAINTAINERS (Misc): Update my email address.
5706 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5707 it instead of target_gdbarch.
5708 (get_remote_state, get_remote_packet_size): Adjust
5709 get_remote_arch_state calls, passing down target_gdbarch
5711 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5712 'gdbarch' and use it instead of target_gdbarch.
5713 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5714 passing down target_gdbarch explicitly.
5715 (struct stop_reply) <arch>: New field.
5716 (remote_parse_stop_reply): Use the stopped thread's architecture,
5717 not the current inferior's. Save the architecture in the
5719 (process_stop_reply): Use the stop reply's architecture.
5720 (process_g_packet, remote_fetch_registers)
5721 (remote_prepare_to_store, store_registers_using_G)
5722 (remote_store_registers): Adjust get_remote_arch_state calls,
5723 using the regcache's architecture.
5724 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5725 passing down target_gdbarch explicitly.
5726 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5727 beneath instead of calling target_gdbarch.
5728 * target.c (default_thread_architecture): Use the specified
5729 inferior's architecture, instead of the current inferior's
5730 architecture (via target_gdbarch).
5734 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5736 (regcache_print): Handle !target_has_registers here instead.
5740 * frame.c (create_test_frame): Delete.
5741 * frame.h (create_test_frame): Delete.
5742 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5743 (class regcache_test): Delete.
5744 (test_target_has_registers, test_target_has_stack)
5745 (test_target_has_memory, test_target_prepare_to_store)
5746 (test_target_store_registers): New functions.
5747 (test_target_ops): New class.
5748 (register_to_value_test): Error out if there's already a
5749 process_stratum (or higher) target pushed. Create a fuller mock
5750 environment, with mock target_ops, inferior, address space, thread
5752 * progspace.c (struct address_space): Move to ...
5753 * progspace.h (struct address_space): ... here.
5754 * regcache.h (regcache::~regcache, regcache::raw_write)
5755 [GDB_SELF_TEST]: No longer virtual.
5759 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5763 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5764 out of 'between TRY and CATCH'.
5768 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5769 * common/common-exceptions.h (TRY): Open an outermost scope.
5770 Expand intro comment.
5772 (END_CATCH): Close the outermost scope.
5773 * completer.c (complete_line_internal): Add missing END_CATCH.
5777 * NEWS (Changes since GDB 8.0): Add entry about new
5778 'set-cwd-on-gdbserver' feature.
5779 (New remote packets): Add entry for QSetWorkingDir.
5780 * common/common-inferior.h (set_inferior_cwd): New prototype.
5781 * infcmd.c (set_inferior_cwd): Remove "static".
5782 (show_cwd_command): Expand text to include remote debugging.
5783 * remote.c: Add PACKET_QSetWorkingDir.
5784 (remote_protocol_features) <QSetWorkingDir>: New entry for
5785 PACKET_QSetWorkingDir.
5786 (extended_remote_set_inferior_cwd): New function.
5787 (extended_remote_create_inferior): Call
5788 "extended_remote_set_inferior_cwd".
5789 (_initialize_remote): Call "add_packet_config_cmd" for
5794 * NEWS (New commands): Mention "set/show cwd".
5795 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5796 "cd" command's help text.
5797 * common/common-inferior.h (get_inferior_cwd): New prototype.
5798 * infcmd.c (inferior_cwd_scratch): New global variable.
5799 (set_inferior_cwd): New function.
5800 (get_inferior_cwd): Likewise.
5801 (set_cwd_command): Likewise.
5802 (show_cwd_command): Likewise.
5803 (_initialize_infcmd): Add "set/show cwd" commands.
5804 * inferior.h (class inferior) <cwd>: New field.
5805 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5806 (fork_inferior): Change inferior's cwd before its execution.
5807 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5812 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5813 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5814 (COMMON_OBS): Add gdb_tilde_expand.o.
5815 * common/gdb_tilde_expand.c: New file.
5816 * common/gdb_tilde_expand.h: Likewise.
5820 * gdbarch.sh (objfile): Remove duplicate declaration.
5821 * gdbarch.h: Regenerate.
5825 * utils.c (internal_vproblem): Use string_vprintf.
5829 * printcmd.c (info_symbol_command): Use std::string.
5833 * top.c (gdb_safe_append_history): Use std::string.
5837 * event-top.c (stdin_event_handler): Update.
5838 * main.c (captured_main_1): Update.
5839 * top.h (make_delete_ui_cleanup): Remove.
5840 (struct ui): Add constructor and destructor.
5841 (new_ui, delete_ui): Remove.
5842 * top.c (make_delete_ui_cleanup): Remove.
5843 (new_ui_command): Use std::unique_ptr.
5844 (delete_ui_cleanup): Remove.
5845 (ui::ui): Rename from new_ui. Update.
5847 (ui::~ui): Rename from delete_ui. Update.
5851 * symfile.c (load_progress): Use gdb::byte_vector.
5855 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5857 * printcmd.c (x_command): Remove unused declaration.
5858 * symfile.c (symbol_file_command): Remove unused declaration.
5862 * utils.c (internal_vproblem): Use std::string.
5863 (defaulted_query): Likewise.
5867 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5868 * top.c (execute_command_to_string): Update.
5869 * utils.c (make_cleanup_restore_page_info): Remove.
5870 (do_restore_page_info_cleanup): Remove.
5871 (set_batch_flag_and_restore_page_info):
5873 (make_cleanup_restore_page_info): Remove.
5874 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5875 (~set_batch_flag_and_restore_page_info): New
5876 (make_cleanup_restore_uinteger): Remove.
5877 (make_cleanup_restore_integer): Remove.
5878 (struct restore_integer_closure): Remove.
5879 (restore_integer): Remove.
5880 * utils.h (struct set_batch_flag_and_restore_page_info): New
5882 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5883 (make_cleanup_restore_page_info): Remove.
5884 (make_cleanup_restore_uinteger) Remove.
5885 (make_cleanup_restore_integer) Remove.
5889 * record-full.h (record_full_gdb_operation_disable_set): Return
5890 scoped_restore_tmpl<int>.
5891 * infrun.c (adjust_pc_after_break): Update.
5892 (handle_signal_stop): Update.
5893 * record-full.c (record_full_gdb_operation_disable_set): Return
5894 scoped_restore_tmpl<int>.
5895 (record_full_wait_1, record_full_insert_breakpoint)
5896 (record_full_remove_breakpoint, record_full_save)
5897 (record_full_goto_insn): Update.
5902 * rust-lang.c (rust_val_print_str): New function.
5903 (val_print_struct): Call it.
5904 (rust_subscript): Preserve name of slice type.
5908 * rust-lang.c (rust_subscript): Handle slices in
5909 EVAL_AVOID_SIDE_EFFECTS case.
5913 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5917 * rust-lang.h (rust_slice_type): Add "extern".
5922 * ada-lang.h (ada_exc_info::operator<): Make const.
5923 (ada_exc_info::operator==): Make const.
5924 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5929 * target.c (read_whatever_is_readable): Change type of "result".
5931 (free_memory_read_result_vector): Remove.
5932 (read_memory_robust): Change return type. Update.
5933 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5934 bin2hex, std::string.
5935 * target.h (memory_read_result_s): Remove typedef.
5936 (free_memory_read_result_vector): Remove.
5937 (read_memory_robust): Return std::vector.
5941 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5945 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5946 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5947 operator< and operator==.
5948 (ada_exceptions_list): Return a std::vector.
5949 * ada-lang.c (ada_exc_info::operator<): Rename from
5950 compare_ada_exception_info.
5951 (ada_exc_info::operator==): New.
5952 (sort_remove_dups_ada_exceptions_list): Change type of
5954 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5955 (ada_add_global_exceptions): Likewise.
5956 (ada_exceptions_list_1): Return a std::vector.
5957 (ada_exceptions_list): Likewise.
5961 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5963 (print_one_inferior): Update.
5964 (free_vector_of_ints): Remove.
5965 (list_available_thread_groups): Change "ids" to std::set.
5966 (mi_cmd_list_thread_groups): Update.
5967 (struct collect_cores_data) <core>: Now a std::set.
5968 (collect_cores): Update.
5970 (print_one_inferior): Update.
5974 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5975 (mi_execute_async_cli_command): Likewise.
5976 (mi_cmd_trace_frame_collected): Use field_fmt.
5980 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5985 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5989 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5993 * varobj.h (varobj_gen_name): Return std::string.
5994 * varobj.c (varobj_gen_name): Return std::string.
5995 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5996 (mi_cmd_var_delete): Don't copy "name".
6000 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
6001 (mi_cmd_break_insert_1): Update.
6005 * target.h (make_scoped_defer_target_commit_resume): Update.
6006 * target.c (make_scoped_defer_target_commit_resume): Rename from
6007 make_cleanup_defer_target_commit_resume. Return a
6009 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
6013 * main.c (captured_main_1): Remove unused declaration.
6014 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
6018 * symtab.c (search_symbols): Remove unused outer cleanup.
6019 (make_source_files_completion_list): Remove unused declaration.
6023 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
6027 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
6032 * complaints.c (vcomplaint): Use std::string.
6036 * tracepoint.c (trace_variable_command): Use std::string.
6037 (encode_actions_1): Remove unused declarations.
6038 (create_tsv_from_upload): Use std::string.
6042 * cp-support.c (gdb_demangle): Use std::string.
6046 * stack.c (parse_frame_specification): Use std::string
6047 (info_frame_command): Use gdb::unique_xmalloc_ptr.
6051 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6055 * utils.c (vfprintf_maybe_filtered): Use std::string.
6056 (vfprintf_unfiltered): Likewise.
6060 * event-top.c (top_level_prompt): Return std::string.
6061 (display_gdb_prompt): Update.
6065 * unittests/common-utils-selftests.c (format): New function.
6066 (string_vprintf_tests): New function.
6067 (_initialize_common_utils_selftests): Register new tests.
6068 * common/common-utils.c (string_vprintf): New function.
6069 * common/common-utils.h (string_vprintf): Declare.
6073 * common/rsp-low.c (unpack_varlen_hex): Constify.
6074 * common/rsp-low.h (unpack_varlen_hex): Constify.
6075 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6077 * remote.c (remote_set_permissions, read_ptid)
6078 (remote_current_thread, remote_get_threads_with_qthreadinfo)
6079 (remote_static_tracepoint_marker_at)
6080 (remote_static_tracepoint_markers_by_strid)
6081 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6082 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6083 (parse_tracepoint_definition, parse_tsv_definition)
6084 (parse_static_tracepoint_marker_definition): Constify.
6085 * tracepoint.h (parse_static_tracepoint_marker_definition)
6086 (parse_trace_status, parse_tracepoint_status)
6087 (parse_tracepoint_definition, parse_tsv_definition): Constify.
6091 * remote.c (target_buf, target_buf_size): Delete.
6092 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6093 Use the connection's packet buffer instead.
6094 All callers adjusted.
6095 (_initialize_remote): Remove references to target_buf and
6100 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6101 unittests/common-utils-selftests.c.
6102 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6103 (COMMON_OBS): Remove utils-selftests.o.
6104 * utils-selftests.c: Move to ...
6105 * unittests/common-utils-selftests.c: ... here and rename self
6106 test to "string_printf".
6110 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6111 having NULL cus or tus.
6115 * arm-tdep.c: (convert_from_extended): Remove.
6116 (convert_to_extended): Likewise.
6117 (arm_extract_return_value): Use convert_typed_floating.
6118 (arm_store_return_value): Likewise.
6120 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6121 * sh-tdep.c: Do not include "floatformat.h".
6122 (sh_littlebyte_bigword_type): New function.
6123 (sh_register_convert_to_virtual): Use convert_typed_floating.
6124 (sh_register_convert_to_raw): Likewise.
6125 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6126 (sh64_littlebyte_bigword_type): New function.
6127 (sh64_extract_return_value): Use convert_typed_floating.
6128 (sh64_register_convert_to_virtual): Likewise.
6129 (sh64_register_convert_to_raw): Likewise.
6133 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6134 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6136 * gdbtypes.h (union type_specific): Make field floatformat hold
6137 just a single struct floatformat, not an array.
6138 (floatformat_from_type): Move here.
6139 * gdbtypes.c (floatformat_from_type): Move here. Update to
6140 changed TYPE_FLOATFORMAT definition.
6141 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6142 (recursive_dump_type): Likewise.
6143 (init_float_type): Install correct floatformat for byte order.
6144 (arch_float_type): Likewise.
6148 * gdbtypes.c (init_type): Change incoming argument from
6149 length-in-bytes to length-in-bits. Assert length is a
6150 multiple of TARGET_CHAR_BITS.
6151 (arch_type, arch_flags_type): Likewise.
6152 (init_integer_type): Update call to init_type.
6153 (init_character_type): Likewise.
6154 (init_boolean_type): Likewise.
6155 (init_float_type): Likewise.
6156 (init_decfloat_type): Likewise.
6157 (init_complex_type): Likewise.
6158 (init_pointer_type): Likewise.
6159 (objfile_type): Likewise.
6160 (arch_integer_type): Update call to arch_type.
6161 (arch_character_type): Likewise.
6162 (arch_boolean_type): Likewise.
6163 (arch_float_type): Likewise.
6164 (arch_decfloat_type): Likewise.
6165 (arch_complex_type): Likewise.
6166 (arch_pointer_type): Likewise.
6167 (gdbtypes_post_init): Likewise.
6169 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6170 (read_base_type): Likewise.
6171 * mdebugread.c (basic_type): Likewise.
6172 * stabsread.c (dbx_init_float_type): Likewise.
6173 (rs6000_builtin_type): Likewise.
6174 (read_range_type): Likewise. Also, fix call to init_integer_type
6175 with erroneous length argument.
6177 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6178 * d-lang.c (build_d_types): Likewise.
6179 * f-lang.c (build_fortran_types): Likewise.
6180 * go-lang.c (build_go_types): Likewise.
6181 * opencl-lang.c (build_opencl_types): Likewise.
6182 * jit.c (finalize_symtab): Likewise.
6183 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6184 (build_std_type_info_type): Likewise.
6185 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6186 update call to arch_flags_type.
6188 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6190 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6191 * windows-tdep.c (windows_get_tlb_type): Likewise.
6193 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6194 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6195 * m32c-tdep.c (make_types): Likewise.
6196 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6197 (rl78_psw_type): Update call to arch_flags_type.
6198 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6199 * rx-tdep.c (rx_psw_type): Likewise.
6200 (rx_fpsw_type): Likewise.
6201 * sparc-tdep.c (sparc_psr_type): Likewise.
6202 (sparc_fsr_type): Likewise.
6203 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6204 (sparc64_ccr_type): Likewise.
6205 (sparc64_fsr_type): Likewise.
6206 (sparc64_fprs_type): Likewise.
6210 * findcmd.c (find_command): Constify.
6214 * ada-tasks.c (task_command_1, task_command): Constify.
6218 * symtab.c (maintenance_print_symbol_cache)
6219 (maintenance_flush_symbol_cache)
6220 (maintenance_print_symbol_cache_statistics): Constify.
6224 * inferior.c (detach_inferior_command, kill_inferior_command)
6225 (inferior_command): Constify.
6229 * regcache.c (regcache_print, maintenance_print_registers)
6230 (maintenance_print_raw_registers)
6231 (maintenance_print_cooked_registers)
6232 (maintenance_print_register_groups)
6233 (maintenance_print_remote_registers): Constify.
6237 * printcmd.c (map_display_numbers, undisplay_command)
6238 (enable_disable_display_command, enable_display_command)
6239 (disable_display_command): Constify.
6243 * breakpoint.h (delete_command): Don't declare.
6244 * breakpoint.c (delete_command, enable_once_command)
6245 (enable_count_command, enable_delete_command, breakpoint_1)
6246 (maintenance_info_breakpoints, stopin_command, stopat_command)
6247 (delete_command, delete_trace_command, save_breakpoints)
6248 (save_breakpoints_command, save_tracepoints_command): Constify.
6252 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6253 (skip_ws, extract_identifier, macro_define_command)
6254 (macro_undef_command, macro_list_command): Constify.
6258 * infcmd.c (environment_info, set_environment_command)
6259 (unset_environment_command, path_info, info_proc_cmd_1)
6260 (info_proc_cmd_mappings, info_proc_cmd_stat)
6261 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6262 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6266 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6271 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6275 * demangle.c (demangle_command): Constify.
6279 * progspace.c (maintenance_info_program_spaces_command):
6284 * compile/compile.c (check_raw_argument, compile_file_command)
6285 (compile_code_command, compile_print_command): Constify.
6289 * reggroups.c (maintenance_print_reggroups): Constify.
6293 * dwarf2read.c (save_gdb_index_command): Constify.
6297 * stap-probe.c (info_probes_stap_command): Constify.
6301 * fork-child.c (unset_exec_wrapper_command): Constify.
6305 * btrace.c (get_uint, get_context_size, no_chunk)
6306 (maint_btrace_packet_history_cmd)
6307 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6308 (maint_info_btrace_cmd): Constify.
6312 * reverse.c (delete_bookmark_command): Constify.
6316 * remote.c (set_memory_packet_size)
6317 (set_memory_write_packet_size, show_memory_write_packet_size)
6318 (set_memory_read_packet_size, show_memory_read_packet_size)
6319 (compare_sections_command, packet_command, remote_put_command)
6320 (remote_get_command, remote_delete_command): Constify.
6324 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6325 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6326 (set_mipsfpu_auto_command): Constify.
6330 * cli/cli-cmds.h (cd_command): Constify.
6331 * cli/cli-cmds.c (cd_command): Constify.
6335 * thread.c (thread_name_command, thread_find_command): Constify.
6339 * probe.c (enable_probes_command, disable_probes_command):
6344 * symfile.c (symbol_file_command): Constify.
6345 * gdbcore.h (deprecated_file_changed_hook): Constify.
6346 * exec.c (deprecated_file_changed_hook, exec_file_command)
6347 (file_command): Constify.
6348 * defs.h (symbol_file_command): Constify.
6352 * remote-fileio.c (set_system_call_allowed)
6353 (show_system_call_allowed): Constify.
6357 * tracepoint.c (delete_trace_variable_command)
6358 (tfind_end_command, tfind_start_command, tfind_pc_command)
6359 (tfind_tracepoint_command, tfind_line_command)
6360 (tfind_range_command, tfind_outside_command): Constify.
6364 * ax-gdb.c (maint_agent_printf_command, agent_command)
6365 (agent_eval_command): Constify.
6369 * tracepoint.c (info_scope_command): Constify.
6370 * python/python.c (gdbpy_decode_line): Constify.
6371 * python/py-breakpoint.c (bppy_init): Constify.
6372 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6373 * location.h: (new_linespec_location)
6374 (string_to_event_location_basic, string_to_event_location):
6376 * location.c (new_linespec_location)
6377 (string_to_event_location_basic, string_to_event_location):
6379 * linespec.h (decode_line_with_current_source)
6380 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6381 * linespec.c (linespec_lex_to_end)
6382 (decode_line_with_current_source)
6383 (decode_line_with_last_displayed): Constify.
6384 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6386 * cli/cli-cmds.c (edit_command, list_command): Constify.
6387 * breakpoint.h (until_break_command, watch_command_wrapper)
6388 (awatch_command_wrapper, rwatch_command_wrapper)
6389 (init_ada_exception_breakpoint): Constify.
6390 * breakpoint.c (break_command_1, dprintf_command)
6391 (break_range_command, watch_command_wrapper)
6392 (rwatch_command_wrapper, awatch_command_wrapper)
6393 (until_break_command, init_ada_exception_breakpoint)
6394 (strace_marker_create_sals_from_location, trace_command)
6395 (ftrace_command, strace_command, struct tracepoint): Constify.
6396 * ax-gdb.c (agent_command_1): Constify.
6397 * ada-lang.c (ada_exception_sal): Constify.
6401 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6402 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6403 (get_context_size, no_chunk, get_insn_history_modifiers)
6404 (cmd_record_insn_history, get_call_history_modifiers)
6405 (cmd_record_call_history): Constify.
6409 * source.c (show_substitute_path_command)
6410 (unset_substitute_path_command, set_substitute_path_command):
6415 * typeprint.c (maintenance_print_type): Constify.
6416 * maint.c (maintenance_dump_me, maintenance_demangle)
6417 (maintenance_time_display, maintenance_info_sections)
6418 (maintenance_print_statistics, maintenance_deprecate)
6419 (maintenance_undeprecate): Constify.
6420 (maintenance_do_deprecate): Constify. Use std::string.
6421 (maintenance_selftest): Constify.
6422 * gdbtypes.h (maintenance_print_type): Constify.
6426 * hppa-tdep.c (unwind_command): Constify.
6430 * target-descriptions.c (unset_tdesc_filename_cmd)
6431 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6436 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6440 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6444 * tui/tui-regs.c (tui_reg_command): Constify.
6448 * skip.c (skip_file_command, skip_function_command)
6449 (skip_enable_command, skip_disable_command, skip_delete_command):
6454 * record-btrace.c (cmd_record_btrace_bts_start)
6455 (cmd_record_btrace_pt_start): Constify.
6459 * symmisc.c (maintenance_print_symbols)
6460 (maintenance_print_msymbols, maintenance_print_objfiles)
6461 (maintenance_info_symtabs, maintenance_check_symtabs)
6462 (maintenance_expand_symtabs, maintenance_info_line_tables):
6467 * top.c (new_ui_command): Constify.
6471 * symfile.c (add_symbol_file_command)
6472 (remove_symbol_file_command, list_overlays_command)
6473 (map_overlay_command, unmap_overlay_command)
6474 (overlay_auto_command, overlay_manual_command)
6475 (overlay_off_command, overlay_load_command): Constify.
6479 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6480 (info_spu_mailbox_command, info_spu_dma_command)
6481 (info_spu_proxydma_command): Constify.
6485 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6489 * cli/cli-script.c (user_defined_command): Constify.
6493 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6494 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6495 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6496 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6497 (dump_binary_value, append_binary_memory, append_binary_value):
6499 (struct dump_context) <func>: Constify.
6500 (add_dump_command): Update.
6504 * cli/cli-cmds.c (show_version, show_configuration)
6505 (source_command, show_user): Constify.
6509 * target.c (maintenance_print_target_stack): Constify.
6513 * interps.c (interpreter_exec_cmd): Constify.
6517 * record-full.c (cmd_record_full_restore): Constify.
6521 * memattr.c (enable_mem_command, disable_mem_command)
6522 (delete_mem_command): Constify.
6526 * value.c (show_convenience): Constify.
6530 * gdbcore.h (core_file_command): Update.
6531 * corefile.c (core_file_command): Constify.
6535 * user-regs.c (maintenance_print_user_registers): Constify.
6539 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6543 * cp-support.c (first_component_command): Constify.
6547 * psymtab.c (maintenance_print_psymbols)
6548 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6553 * windows-tdep.c (display_tib): Constify.
6557 * linux-fork.c (delete_checkpoint_command)
6558 (detach_checkpoint_command): Constify.
6562 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6566 * arc-tdep.c (dump_arc_instruction_command): Constify.
6570 * valprint.c (set_radix, show_radix): Constify.
6574 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6578 * command.h (not_just_help_class_command): Update.
6579 * cli/cli-decode.h (not_just_help_class_command): Update.
6580 * cli/cli-decode.c (not_just_help_class_command): Constify.
6584 * gdb_bfd.c (maintenance_info_bfds): Constify.
6588 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6590 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6591 (do_const_cfunc): New function.
6592 (cmd_cfunc_eq): New overload.
6593 (cli_user_command_p): Check do_const_cfunc.
6594 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6596 * command.h (add_cmd): Add const overload and no-function
6598 (set_cmd_cfunc): Add const overload.
6599 (cmd_const_cfunc_ftype): Declare.
6600 (cmd_cfunc_eq): Add const overload.
6601 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6602 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6607 * macroexp.c (get_next_token_for_substitution): New function.
6608 (substitute_args): Call it. Check for __VA_OPT__.
6613 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6614 producer_is_icc_lt_14.
6615 (producer_is_icc_lt_14): New function.
6616 (check_producer): Add code for checking version of ICC.
6617 (producer_is_icc): Move to producer.c.
6618 (read_structure_type): Restrict ICC workaround to ICC<14.
6619 * producer.c: Include selftest.h.
6620 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6622 * producer.h (producer_is_icc): New declaration.
6626 * Makefile.in (SFILES): Add producer.c.
6627 (COMMON_OBS): Add producer.o
6628 * amd64-tdep.c (producer.h): Add new include.
6629 * dwarf2read.c (producer.h): Add new include.
6630 * producer.c: New file.
6631 * producer.h: New file.
6632 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6634 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6639 * configure.ac: Search ncursesw before ncurses.
6640 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6641 * gdb_curses.h: Include <ncursesw/ncurses.h>
6642 * config.in, configure: Regenerate.
6647 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6649 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6650 Remove i386sol2 support.
6651 * configure.nat <i386sol2>: Remove.
6652 <sol2-64>: Fold into ...
6654 Move common settings to default section.
6656 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6657 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6658 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6659 <i[34567]86-*-solaris*>: Remove.
6660 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6662 * configure.ac: Remove wctype in libw check.
6663 (_MSE_INT_H): Don't define on Solaris 7-9.
6664 <solaris*>: Remove libthread_db.so.1 check.
6665 * configure: Regenerate.
6666 * config.in: Regenerate.
6668 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6669 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6670 (gdb_ps_size_t): Remove.
6671 Use base types in users.
6672 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6674 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6679 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6680 (adi_is_addr_mapped): Likewise.
6681 (PSR_ICC): Don't redefine.
6682 (PSR_IMPL): Likewise.
6686 * regcache.c (regcache::dump): Use string_printf.
6690 * regcache.c (class regcache_invalidator): New.
6691 (struct register_to_invalidate): Remove.
6692 (make_cleanup_regcache_invalidate): Remove.
6693 (regcache::raw_write): Use regcache_invalidator.
6697 * spu-tdep.c (spu2ppu_sniffer): Update.
6698 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6699 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6701 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6702 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6703 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6704 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6705 (frame_pop): Update.
6709 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6710 * regcache.h (regcache_xfree): Don't declare.
6711 * regcache.c (regcache_xfree): Remove.
6712 (do_regcache_xfree): Use delete.
6713 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6714 * linux-fork.c (free_fork): Use delete.
6715 (fork_save_infrun_state): Likewise.
6716 * jit.c (jit_dealloc_cache): Use delete.
6717 * infrun.c (discard_infcall_suspend_state): Use delete.
6721 * regcache.h (regcache_xmalloc): Don't declare.
6722 (regcache_raw_set_cached_value): Update comment.
6723 * regcache.c (regcache_xmalloc): Remove.
6724 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6725 * jit.c (jit_frame_sniffer): Use new.
6726 * frame.c (frame_save_as_regcache): Use new.
6730 * NEWS: Advertise support for guarded-storage registers on IBM z.
6734 * s390-linux-nat.c (have_regset_gs): New static variable.
6735 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6736 control block and guarded-storage broadcast control regsets.
6737 (s390_read_description): Detect whether the target has
6738 guarded-storage support, return appropriate tdesc.
6739 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6740 (features/s390x-gs-linux64.c): Likewise.
6741 (struct gdbarch_tdep) <have_gs>: New field.
6742 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6743 (s390_gsbc_regset): New variables.
6744 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6745 and s390_gsbc_regset, if applicable.
6746 (s390_core_read_description): Check whether core file was from a
6747 target with guarded-storage support; include appropriate regsets.
6748 (s390_gdbarch_init): Add registers for guarded-storage support.
6749 (_initialize_s390_tdep): Initialize new target descriptions that
6750 include registers for guarded-storage support.
6751 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6752 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6753 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6754 (S390_NUM_REGS): Adjust macro definition.
6755 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6756 (tdesc_s390x_gs_linux64): New declarations.
6760 * features/s390-gs-linux64.xml: New file.
6761 * features/s390-gs.xml: New file.
6762 * features/s390-gsbc.xml: New file.
6763 * features/s390x-gs-linux64.xml: New file.
6764 * features/Makefile (WHICH): Add s390-gs-linux64 and
6766 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6767 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6768 * features/s390-gs-linux64.c: New generated file.
6769 * features/s390x-gs-linux64.c: New file.
6770 * regformats/s390-gs-linux64.dat: New file.
6771 * regformats/s390x-gs-linux64.dat: New file.
6775 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6779 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6780 type to scoped_restore_tmpl.
6781 <scoped_input_handler>: Initialize m_quit_handler directly.
6785 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6786 (cd_command): Likewise. Free "current_directory" before
6788 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6789 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6790 * top.c (gdb_dirbuf): Remove global declaration.
6791 * top.h (gdb_dirbuf): Likewise.
6795 * gnulib/aclocal.m4: Regenerate.
6796 * gnulib/config.in: Regenerate.
6797 * gnulib/configure: Regenerate.
6798 * gnulib/import/Makefile.am: Regenerate.
6799 * gnulib/import/Makefile.in: Regenerate.
6800 * gnulib/import/assure.h: New file.
6801 * gnulib/import/at-func.c: Likewise
6802 * gnulib/import/chdir-long.c: New file.
6803 * gnulib/import/chdir-long.h: New file.
6804 * gnulib/import/cloexec.c: New file.
6805 * gnulib/import/cloexec.h: New file.
6806 * gnulib/import/close.c: New file.
6807 * gnulib/import/closedir.c: New file.
6808 * gnulib/import/dirent-private.h: New file.
6809 * gnulib/import/dup-safer.c: New file.
6810 * gnulib/import/dup.c: New file.
6811 * gnulib/import/dup2.c: New file.
6812 * gnulib/import/error.c: New file.
6813 * gnulib/import/error.h: New file.
6814 * gnulib/import/exitfail.c: New file.
6815 * gnulib/import/exitfail.h: New file.
6816 * gnulib/import/fchdir.c: New file.
6817 * gnulib/import/fcntl.c: New file.
6818 * gnulib/import/fcntl.in.h: New file.
6819 * gnulib/import/fd-hook.c: New file.
6820 * gnulib/import/fd-hook.h: New file.
6821 * gnulib/import/fd-safer.c: New file.
6822 * gnulib/import/fdopendir.c: New file.
6823 * gnulib/import/filename.h: New file.
6824 * gnulib/import/filenamecat-lgpl.c: New file.
6825 * gnulib/import/filenamecat.h: New file.
6826 * gnulib/import/fstat.c: New file.
6827 * gnulib/import/fstatat.c: New file.
6828 * gnulib/import/getcwd-lgpl.c: New file.
6829 * gnulib/import/getcwd.c: New file.
6830 * gnulib/import/getdtablesize.c: New file.
6831 * gnulib/import/getlogin_r.c: New file.
6832 * gnulib/import/getprogname.c: New file.
6833 * gnulib/import/getprogname.h: New file.
6834 * gnulib/import/gettext.h: New file.
6835 * gnulib/import/glob-libc.h: New file.
6836 * gnulib/import/glob.c: New file.
6837 * gnulib/import/glob.in.h: New file.
6838 * gnulib/import/intprops.h: New file.
6839 * gnulib/import/m4/chdir-long.m4: New file.
6840 * gnulib/import/m4/close.m4: New file.
6841 * gnulib/import/m4/closedir.m4: New file.
6842 * gnulib/import/m4/d-ino.m4: New file.
6843 * gnulib/import/m4/d-type.m4: New file.
6844 * gnulib/import/m4/dup.m4: New file.
6845 * gnulib/import/m4/dup2.m4: New file.
6846 * gnulib/import/m4/error.m4: New file.
6847 * gnulib/import/m4/fchdir.m4: New file.
6848 * gnulib/import/m4/fcntl.m4: New file.
6849 * gnulib/import/m4/fcntl_h.m4: New file.
6850 * gnulib/import/m4/fdopendir.m4: New file.
6851 * gnulib/import/m4/filenamecat.m4: New file.
6852 * gnulib/import/m4/fstat.m4: New file.
6853 * gnulib/import/m4/fstatat.m4: New file.
6854 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6855 * gnulib/import/m4/getcwd-path-max.m4: New file.
6856 * gnulib/import/m4/getcwd.m4: New file.
6857 * gnulib/import/m4/getdtablesize.m4: New file.
6858 * gnulib/import/m4/getlogin_r.m4: New file.
6859 * gnulib/import/m4/getprogname.m4: New file.
6860 * gnulib/import/m4/glob.m4: New file.
6861 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6862 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6863 * gnulib/import/m4/mempcpy.m4: New file.
6864 * gnulib/import/m4/memrchr.m4: New file.
6865 * gnulib/import/m4/mode_t.m4: New file.
6866 * gnulib/import/m4/msvc-inval.m4: New file.
6867 * gnulib/import/m4/msvc-nothrow.m4: New file.
6868 * gnulib/import/m4/open.m4: New file.
6869 * gnulib/import/m4/openat.m4: New file.
6870 * gnulib/import/m4/opendir.m4: New file.
6871 * gnulib/import/m4/readdir.m4: New file.
6872 * gnulib/import/m4/realloc.m4: New file.
6873 * gnulib/import/m4/rewinddir.m4: New file.
6874 * gnulib/import/m4/save-cwd.m4: New file.
6875 * gnulib/import/m4/strdup.m4: New file.
6876 * gnulib/import/m4/strerror.m4: New file.
6877 * gnulib/import/m4/unistd-safer.m4: New file.
6878 * gnulib/import/mempcpy.c: New file.
6879 * gnulib/import/memrchr.c: New file.
6880 * gnulib/import/msvc-inval.c: New file.
6881 * gnulib/import/msvc-inval.h: New file.
6882 * gnulib/import/msvc-nothrow.c: New file.
6883 * gnulib/import/msvc-nothrow.h: New file.
6884 * gnulib/import/open.c: New file.
6885 * gnulib/import/openat-die.c: New file.
6886 * gnulib/import/openat-priv.h: New file.
6887 * gnulib/import/openat-proc.c: New file.
6888 * gnulib/import/openat.c: New file.
6889 * gnulib/import/openat.h: New file.
6890 * gnulib/import/opendir.c: New file.
6891 * gnulib/import/pipe-safer.c: New file.
6892 * gnulib/import/readdir.c: New file.
6893 * gnulib/import/realloc.c: New file.
6894 * gnulib/import/rewinddir.c: New file.
6895 * gnulib/import/save-cwd.c: New file.
6896 * gnulib/import/save-cwd.h: New file.
6897 * gnulib/import/strdup.c: New file.
6898 * gnulib/import/strerror-override.c: New file.
6899 * gnulib/import/strerror-override.h: New file.
6900 * gnulib/import/strerror.c: New file.
6901 * gnulib/import/unistd--.h: New file.
6902 * gnulib/import/unistd-safer.h: New file.
6903 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6904 "getcwd" and "glob".
6905 * ser-tcp.c: Undefine "close" before redefining it.
6909 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6914 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6915 <sol2,sparc>: Likewise.
6916 <sol2-64,i386>: Likewise.
6918 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6919 -Wdeprecated-declarations on *-*-solaris*.
6920 * configure: Regenerate.
6922 * procfs.c: Include "nat/inferior.h".
6923 (procfs_info_proc): Fix typo.
6927 * remote.c (vector): Include.
6928 (struct private_thread_info): Add field, thread_handle.
6929 (free_private_thread_info): Deallocate storage associated with
6931 (get_private_info_thread): Initialize `thread_handle' field.
6932 (struct thread_item): Add field, thread_handle.
6933 (clear_threads_listing_context): Deallocate storage associated
6935 (start_thread): Add support for "handle" attribute.
6936 (thread_attributes): Add "handle".
6937 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6939 (remote_update_thread_list): Update thread_handle.
6940 (remote_thread_handle_to_thread_info): New function.
6941 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6945 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6947 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6948 * python/python-internal.h (thread_object_type): Declare.
6952 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6953 (target_thread_handle_to_thread_info): Declare.
6954 * target.c (target_thread_handle_to_thread_info): New function.
6955 * target-delegates.c: Regenerate.
6956 * gdbthread.h (find_thread_by_handle): Declare.
6957 * thread.c (find_thread_by_handle): New function.
6958 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6960 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6964 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6968 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6972 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6977 * breakpoint.c (struct counted_command_line): Remove.
6978 (breakpoint_commands): Update.
6979 (alloc_counted_command_line, incref_counted_command_line)
6980 (decref_counted_command_line, do_cleanup_counted_command_line)
6981 (make_cleanup_decref_counted_command_line): Remove.
6982 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6983 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6984 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6985 (save_breakpoints): Update.
6986 * breakpoint.h (counted_command_line): Now a typedef to
6988 (struct breakpoint) <commands>: Now a counted_command_line.
6989 (struct bpstats) <command>: Likewise.
6993 * breakpoint.c (struct commands_info, do_map_commands_command):
6995 (commands_command_1): Update.
6996 (iterate_over_related_breakpoints): Take a function_view.
6997 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6998 (delete_command): Update.
6999 (map_breakpoint_numbers): Take a function_view.
7000 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
7001 (disable_command): Update.
7002 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
7003 (enable_command): Update.
7004 (struct disp_data, do_enable_breakpoint_disp)
7005 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
7006 (do_map_enable_delete_breakpoint): Remove.
7007 (enable_once_command, enable_count_command, enable_delete_command)
7008 (delete_trace_variable_command): Update.
7012 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
7013 (bpstat_clear): Use delete.
7014 (bpstats): New constructors.
7015 (bpstat_copy, bpstat_stop_status): Use new.
7016 (dprintf_after_condition_true): Update.
7017 * breakpoint.h (bpstats::bpstats): Add constructors.
7018 (bpstats::~bpstats): Add destructor.
7022 * eval.c (make_params): Delete, refactored as ...
7023 (class fake_method): ... this new type's ctor.
7024 (fake_method::~fake_method): New.
7025 (evaluate_subexp_standard): Use 'fake_method'.
7029 * windows-nat.c (get_windows_debug_event, windows_wait)
7030 (do_initial_windows_stuff, windows_attach): Update.
7031 * utils.c (vwarning, internal_vproblem): Update.
7032 (ui_unregister_input_event_handler_cleanup)
7033 (prepare_to_handle_input): Remove.
7034 (class scoped_input_handler): New.
7035 (defaulted_query, prompt_for_continue): Update.
7036 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
7038 * top.c (undo_terminal_modifications_before_exit): Update.
7039 * target/target.h (target_terminal_init, target_terminal_inferior)
7040 (target_terminal_ours): Don't declare.
7041 (class target_terminal): New.
7042 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
7043 (target_terminal_ours_for_output)
7044 (make_cleanup_restore_target_terminal): Don't declare.
7045 (target_terminal_info): Remove.
7046 * target.c (enum terminal_state, terminal_state): Remove.
7047 (target_terminal::terminal_state): Define.
7048 (target_terminal::init): Rename from target_terminal_init.
7049 (target_terminal::inferior): Rename from
7050 target_terminal_inferior.
7051 (target_terminal::ours): Rename from target_terminal_ours.
7052 (target_terminal::ours_for_output): Rename from
7053 target_terminal_ours_for_output.
7054 (target_terminal::info): New method.
7055 (cleanup_restore_target_terminal)
7056 (make_cleanup_restore_target_terminal): Remove.
7057 * solib.c (handle_solib_event): Update.
7058 * remote.c (remote_serial_quit_handler): Update.
7059 (remote_terminal_inferior, remote_wait_as): Update.
7060 * record-full.c (record_full_wait_1): Update.
7061 * nto-procfs.c (procfs_create_inferior): Update.
7062 * nat/fork-inferior.c (startup_inferior): Update.
7063 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7064 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7065 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7066 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7067 (mi_breakpoint_created, mi_breakpoint_deleted)
7068 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7069 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7070 (mi_user_selected_context_changed, report_initial_inferior):
7072 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7073 (linux_nat_terminal_inferior): Update.
7074 * infrun.c (follow_fork_inferior)
7075 (handle_vfork_child_exec_or_exit, do_target_resume)
7076 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7077 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7079 * inflow.c (child_terminal_init, info_terminal_command): Update.
7080 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7081 (attach_command): Update.
7082 * infcall.c (call_thread_fsm_should_stop): Update.
7083 * gnu-nat.c (gnu_attach): Update.
7084 * extension.c (struct active_ext_lang_state)
7085 (restore_active_ext_lang): Update.
7086 * exceptions.c (print_flush): Update.
7087 * event-top.c (async_enable_stdin, default_quit_handler): Update.
7088 (struct quit_handler_cleanup_data, restore_quit_handler)
7089 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7091 * cp-support.c (gdb_demangle): Update.
7092 * breakpoint.c (update_inserted_breakpoint_locations)
7093 (insert_breakpoint_locations, handle_jit_event)
7094 (disable_breakpoints_in_unloaded_shlib): Update.
7095 * annotate.c (annotate_breakpoints_invalid)
7096 (annotate_frames_invalid): Update.
7100 * main.c (catch_command_errors): Rename from
7101 catch_command_errors_const.
7102 (captured_main_1): Update.
7106 * cli/cli-cmds.c (list_command): Use print_sal_location.
7107 (print_sal_location): New function.
7108 (ambiguous_line_spec): Use print_sal_location.
7109 * linespec.c (symbol_to_sal): Record the symbol in the sal.
7110 * symtab.c (find_function_start_sal): Likewise.
7111 * symtab.h (symtab_and_line::symbol): New field.
7115 * linespec.c (minsym_found): Handle non-text minsyms.
7116 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7120 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7125 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7126 vmovups instead vmovaps.
7127 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7131 * NEWS (Changes since GDB 8.0): Add starti.
7132 * infcmd.c (enum run_break): New.
7133 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7135 (run_command): Use enum run_how.
7136 (start_command): Likewise.
7137 (starti_command): New function.
7138 (RUN_ARGS_HELP): New macro.
7139 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7140 commands. Add starti command.
7144 * Makefile.in (monitor.o): Remove the rule.
7148 * annotate.h (struct annotate_arg_emitter): Use
7149 DISABLE_COPY_AND_ASSIGN.
7150 * common/refcounted-object.h (refcounted_object): Likewise.
7151 * completer.h (struct completion_result): Likewise.
7152 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7153 * filename-seen-cache.h (filename_seen_cache): Likewise.
7154 * gdbcore.h (thread_section_name): Likewise.
7155 * gdb_regex.h (compiled_regex): Likewise.
7156 * gdbthread.h (scoped_restore_current_thread): Likewise.
7157 * inferior.h (scoped_restore_current_inferior): Likewise.
7158 * jit.c (jit_reader): Likewise.
7159 * linespec.h (struct linespec_result): Likewise.
7160 * mi/mi-parse.h (struct mi_parse): Likewise.
7161 * nat/fork-inferior.c (execv_argv): Likewise.
7162 * progspace.h (scoped_restore_current_program_space): Likewise.
7163 * python/python-internal.h (class gdbpy_enter): Likewise.
7164 * regcache.h (regcache): Likewise.
7165 * target-descriptions.c (struct tdesc_reg): Likewise.
7166 (struct tdesc_type): Likewise.
7167 (struct tdesc_feature): Likewise.
7168 * ui-out.h (ui_out_emit_type): Likewise.
7172 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7173 label abort_expression.
7177 * common/buffer.c (buffer_xml_printf): Adjust.
7178 * common/xml-utils.c (xml_escape_text): Change return type to
7179 std::string, update code accordingly.
7180 * common/xml-utils.h (xml_escape_text): Change return type to
7182 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7183 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7184 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7189 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7190 (SUBDIR_UNITTESTS_OBS): Add new object file.
7191 * unittests/xml-utils-selftests.c: New file.
7195 * common/selftest.h (selftest): New struct/interface.
7196 (register_test): Add name parameter, add new overload.
7197 (run_tests): Add filter parameter.
7198 (for_each_selftest_ftype): New typedef.
7199 (for_each_selftest): New declaration.
7200 * common/selftest.c (tests): Change type to
7201 map<string, unique_ptr<selftest>>.
7202 (simple_selftest): New struct.
7203 (register_test): New function.
7204 (register_test): Add name parameter and use it.
7205 (run_tests): Add filter parameter and use it. Add prints.
7206 Adjust to vector -> map change.
7207 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7208 registering selftests.
7209 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7210 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7211 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7212 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7213 * findvar.c (_initialize_findvar): Likewise.
7214 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7215 * maint.c (maintenance_selftest): Update call to run_tests.
7216 (maintenance_info_selftests): New function.
7217 (_initialize_maint_cmds): Register "maintenance info selftests"
7218 command. Update "maintenance selftest" doc.
7219 * regcache.c (_initialize_regcache): Add names when registering
7221 * rust-exp.y (_initialize_rust_exp): Likewise.
7222 * selftest-arch.c (gdbarch_selftest): New struct.
7223 (gdbarch_tests): Remove.
7224 (register_test_foreach_arch): Add name parameter. Call
7226 (tests_with_arch): Remove, move most content to
7227 gdbarch_selftest::operator().
7228 (_initialize_selftests_foreach_arch): Remove.
7229 * selftest-arch.h (register_test_foreach_arch): Add name
7231 (run_tests_with_arch): New declaration.
7232 * utils-selftests.c (_initialize_utils_selftests): Add names
7233 when registering selftests.
7234 * utils.c (_initialize_utils): Likewise.
7235 * unittests/array-view-selftests.c
7236 (_initialize_array_view_selftests): Likewise.
7237 * unittests/environ-selftests.c (_initialize_environ_selftests):
7239 * unittests/function-view-selftests.c
7240 (_initialize_function_view_selftests): Likewise.
7241 * unittests/offset-type-selftests.c
7242 (_initialize_offset_type_selftests): Likewise.
7243 * unittests/optional-selftests.c
7244 (_initialize_optional_selftests): Likewise.
7245 * unittests/scoped_restore-selftests.c
7246 (_initialize_scoped_restore_selftests): Likewise.
7247 * NEWS: Document "maintenance selftest" and "maint info
7252 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7257 * mi/mi-main.c (mi_load_progress): Make uiout variable
7262 * compile/compile-c-types.c (convert_enum, convert_int)
7263 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7267 * dwarf2read.c (copy_string): Remove.
7268 (parse_macro_definition): Replace copy_string with savestring.
7272 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7274 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7276 (i[34567]86-*-linux*): Likewise.
7280 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7281 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7282 <stack>: Change type to std::vector.
7283 <stack_len, stack_allocated>: Remove.
7284 <grow_stack>: Remove.
7285 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7286 (dwarf_expr_context::~dwarf_expr_context): Remove.
7287 (dwarf_expr_context::grow_stack): Remove.
7288 (dwarf_expr_context::push): Adjust.
7289 (dwarf_expr_context::pop): Adjust.
7290 (dwarf_expr_context::fetch): Adjust.
7291 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7292 (dwarf_expr_context::stack_empty_p): Adjust.
7293 (dwarf_expr_context::execute_stack_op): Adjust.
7297 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7298 return type to bool.
7299 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7303 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7304 Change type to bool.
7305 (dwarf_stack_value) <in_stack_memory>: Likewise.
7306 (dwarf_expr_context) <push_address>: Change parameter type to
7308 <fetch_in_stack_memory>: Change return type to bool.
7309 <push>: Change parameter type to bool.
7310 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7312 (dwarf_expr_context::push_address): Likewise.
7313 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7315 (dwarf_expr_context::execute_stack_op): Adjust.
7316 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7320 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7321 (struct dwarf_expr_context) <n_pieces>: Remove.
7322 <pieces>: Change type to std::vector.
7323 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7324 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7326 (dwarf_expr_context::add_piece): Adjust.
7327 * dwarf2loc.c (struct piece_closure): Initialize fields.
7329 <pieces>: Change type to std::vector.
7330 (allocate_piece_closure): Adjust, change parameter to
7331 std::vector rvalue and std::move it to piece_closure.
7332 (rw_pieced_value): Adjust.
7333 (check_pieced_synthetic_pointer): Adjust.
7334 (indirect_synthetic_pointer): Adjust.
7335 (coerce_pieced_ref): Adjust.
7336 (free_pieced_value_closure): Adjust. Use delete to free
7338 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7339 to allocate_piece_closure.
7340 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7344 * probe.h (probe_ops_cp): Remove typedef.
7345 (DEF_VEC_P (probe_ops_cp)): Remove.
7346 (all_probe_ops): Change type to std::vector.
7347 * probe.c (info_probes_for_ops): Adjust to vector change.
7348 (probe_linespec_to_ops): Likewise.
7349 (all_probe_ops): Change type to std::vector.
7350 (_initialize_probe): Adjust to vector change.
7351 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7352 * elfread.c (elf_get_probes): Likewise.
7353 * stap-probe.c (_initialize_stap_probe): Likewise.
7357 * probe.h (struct bound_probe): Define constructors.
7358 * probe.c (bound_probe_s): Remove typedef.
7359 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7360 (collect_probes): Change return type to std::vector, remove
7362 (compare_probes): Return bool, change parameter type. Change
7363 semantic to "less than".
7364 (gen_ui_out_table_header_info): Change parameter to std::vector
7366 (exists_probe_with_pops): Likewise.
7367 (info_probes_for_ops): Update to std::vector change.
7368 (enable_probes_command): Likewise.
7369 (disable_probes_command): Likewise.
7373 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7375 * probe.c (parse_probes_in_pspace): Update.
7376 (find_probes_in_objfile): Update.
7377 (find_probe_by_pc): Update.
7378 (collect_probes): Update.
7379 (probe_any_get_probes): Update.
7380 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7381 return type to reference to std::vector.
7382 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7383 std::vector and update.
7384 (dtrace_process_dof): Likewise.
7385 (dtrace_get_probes): Likewise.
7386 * elfread.c (elf_get_probes): Change return type to std::vector,
7387 store an std::vector in bfd_data.
7388 (probe_key_free): Update to std::vector.
7389 * stap-probe.c (handle_stap_probe): Change parameter to
7390 std::vector and update.
7391 (stap_get_probes): Likewise.
7392 * symfile-debug.c (debug_sym_get_probes): Change return type to
7393 std::vector and update.
7397 * breakpoint.c (program_breakpoint_here_p): Update.
7398 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7399 from make_show_memory_breakpoints_cleanup. Return a
7400 scoped_restore_tmpl<int>.
7401 (restore_show_memory_breakpoints): Remove.
7402 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7403 * mem-break.c (memory_validate_breakpoint): Update.
7404 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7405 (ia64_memory_remove_breakpoint): Update.
7406 (ia64_breakpoint_from_pc): Update.
7407 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7408 from make_show_memory_breakpoints_cleanup.
7412 * d-namespace.c (d_lookup_symbol): Use std::string.
7413 (find_symbol_in_baseclass): Likewise.
7417 * ctf.c (ctf_start): Use std::string.
7421 * ada-lang.c (is_known_support_routine): Update.
7422 (ada_unhandled_exception_name_addr_from_raise): Update.
7423 * guile/scm-frame.c (gdbscm_frame_name): Update.
7424 * python/py-frame.c (frapy_name): Update.
7425 (frapy_function): Update.
7426 * stack.h (find_frame_funname): Update.
7427 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7428 (print_frame): Update.
7432 * findcmd.c (put_bits): Take a gdb::byte_vector.
7433 (parse_find_args): Return gdb::byte_vector. "args" now const.
7434 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7436 (find_command): Update.
7440 * cli/cli-script.c (class scoped_restore_hook_in): New.
7441 (clear_hook_in_cleanup): Remove.
7442 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7443 scoped_restore_hook_in.
7447 * cli/cli-script.c (restore_interp): Remove.
7448 (read_command_lines): Use scoped_restore_interp.
7449 * interps.c (scoped_restore_interp::set_temp): Rename from
7451 * interps.h (class scoped_restore_interp): New.
7452 (interp_set_temp): Remove.
7456 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7457 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7458 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7460 (mi_cmd_break_insert_1): Update.
7461 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7466 * demangle.c (demangle_command): Update.
7467 * breakpoint.c (disable_command): Update.
7468 (enable_command): Update.
7469 (find_location_by_number): Make "number" const. Use
7471 * cli/cli-utils.c (extract_arg): Return std::string.
7472 * probe.c (parse_probe_linespec): Update. Change types.
7473 (collect_probes): Take string arguments.
7474 (parse_probe_linespec): Likewise.
7475 (info_probes_for_ops): Update.
7476 (enable_probes_command): Update.
7477 (disable_probes_command): Update.
7478 * break-catch-sig.c (catch_signal_split_args): Update.
7479 * mi/mi-parse.c (mi_parse): Update.
7483 * language.h (language_enum): Make argument const.
7484 * language.c (language_enum): Make argument const.
7488 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7490 (skip_to_space): Rename from skip_to_space_const.
7491 * common/common-utils.c (skip_to_space): New function.
7492 (skip_to_space): Rename from skip_to_space_const.
7493 * cli/cli-utils.h (get_number): Rename from get_number_const.
7494 (extract_arg): Rename from extract_arg_const.
7495 * cli/cli-utils.c (get_number): Rename from get_number_const.
7496 (extract_arg): Rename from extract_arg_const.
7497 (number_or_range_parser::get_number): Use ::get_number.
7498 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7499 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7500 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7501 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7502 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7503 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7504 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7505 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7509 * python/python.c (do_start_initialization): Use
7510 py-event-types.def to initialize types.
7511 Define all object type structures.
7512 * python/python-internal.h: Don't declare event initialization
7514 * python/py-threadevent.c (thread_event_object_type): Don't
7516 * python/py-stopevent.c (stop_event_object_type): Don't define.
7517 * python/py-signalevent.c (signal_event_object_type): Don't
7519 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7520 (clear_objfiles_event_object_type): Don't declare or define.
7521 * python/py-infevents.c (inferior_call_pre_event_object_type)
7522 (inferior_call_post_event_object_type)
7523 (register_changed_event_object_type)
7524 (memory_changed_event_object_type): Don't declare or define.
7525 * python/py-inferior.c (new_thread_event_object_type)
7526 (new_inferior_event_object_type)
7527 (inferior_deleted_event_object_type): Don't declare or define.
7528 * python/py-exitedevent.c (exited_event_object_type): Don't
7530 * python/py-evts.c (gdbpy_initialize_py_events): Use
7532 * python/py-events.h (thread_event_object_type): Don't declare.
7533 (events_object): Use py-all-events.def.
7534 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7536 * python/py-event-types.def: New file.
7537 * python/py-continueevent.c (create_continue_event_object): Don't
7539 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7541 * python/py-all-events.def: New file.
7545 * python/py-threadevent.c (create_thread_event_object): Return
7547 * python/py-stopevent.h (create_stop_event_object)
7548 (create_breakpoint_event_object, create_signal_event_object):
7550 * python/py-stopevent.c (create_stop_event_object): Return
7552 (emit_stop_event): Update.
7553 * python/py-signalevent.c (create_signal_event_object): Return
7555 * python/py-infevents.c (create_inferior_call_event_object):
7557 * python/py-event.h (create_event_object)
7558 (create_thread_event_object): Update.
7559 * python/py-event.c (create_event_object): Return gdbpy_ref.
7560 * python/py-continueevent.c: Return gdbpy_ref.
7561 * python/py-bpevent.c (create_breakpoint_event_object): Return
7568 * python/python.c (do_start_initialization): Initialize new event
7570 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7571 (gdbpy_initialize_inferior_deleted_event)
7572 (gdbpy_initialize_new_thread_event): Declare.
7573 * python/py-threadevent.c (create_thread_event_object): Add option
7575 * python/py-inferior.c (new_thread_event_object_type)
7576 (new_inferior_event_object_type)
7577 (inferior_deleted_event_object_type): Declare.
7578 (python_new_inferior, python_inferior_deleted): New functions.
7579 (add_thread_object): Emit new_thread event.
7580 (gdbpy_initialize_inferior): Attach new functions to corresponding
7582 (new_thread, new_inferior, inferior_deleted): Define new event
7584 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7586 * python/py-events.h (events_object) <new_inferior,
7587 inferior_deleted, new_thread>: New fields.
7588 * python/py-event.h (create_thread_event_breakpoint): Add optional
7593 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7594 check current_ui instead.
7595 (internal_vproblem): Likewise.
7599 * thread.c (print_thread_info_1): Remove unnecessary calls to
7600 uiout->is_mi_like_p.
7604 * namespace.h (add_using_directive): Update.
7605 * namespace.c (add_using_directive): Change type of excludes to
7607 * dwarf2read.c (read_import_statement): Use std::vector.
7608 (read_namespace): Update.
7609 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7613 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7617 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7621 * stack.c (func_command): Use gdb::def_vector.
7625 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7626 ui_out_emit_list, ui_out_emit_tuple.
7627 (mi_cmd_var_update): Likewise.
7631 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7632 ui_out_redirect_pop.
7633 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7634 ui_out_redirect_pop.
7635 * utils.c (do_ui_out_redirect_pop)
7636 (make_cleanup_ui_out_redirect_pop): Remove.
7637 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7638 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7639 * ui-out.h (ui_out_redirect_pop): New class.
7643 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7644 (list_available_thread_groups, mi_cmd_list_thread_groups)
7645 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7646 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7651 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7656 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7657 * stack.c (print_frame): Use ui_out_emit_tuple.
7658 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7659 (info_spu_mailbox_command, info_spu_dma_command)
7660 (info_spu_proxydma_command): Likewise.
7661 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7662 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7663 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7665 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7669 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7670 (class ui_out_emit_table): Update comment.
7671 * ui-out.c (do_cleanup_table_end)
7672 (make_cleanup_ui_out_table_begin_end): Remove.
7673 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7674 (info_spu_dma_cmdlist): Likewise.
7675 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7676 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7681 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7682 ui_out_emit_list, gdb::optional.
7686 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7688 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7690 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7692 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7693 * ada-exp.y: Remove _initialize_ada_exp prototype.
7694 * ada-lang.c: Remove _initialize_ada_language prototype.
7695 * ada-tasks.c: Remove _initialize_tasks prototype.
7696 * addrmap.c: Remove _initialize_addrmap prototype.
7697 * agent.c: Remove _initialize_agent prototype.
7698 * aix-thread.c: Remove _initialize_aix_thread prototype.
7699 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7700 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7701 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7703 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7704 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7705 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7706 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7708 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7710 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7711 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7712 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7713 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7715 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7716 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7717 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7718 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7719 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7720 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7721 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7723 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7725 * annotate.c: Remove _initialize_annotate prototype.
7726 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7727 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7728 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7729 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7730 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7731 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7732 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7733 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7735 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7736 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7737 * auto-load.c: Remove _initialize_auto_load prototype.
7738 * auxv.c: Remove _initialize_auxv prototype.
7739 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7740 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7741 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7742 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7743 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7744 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7746 * break-catch-throw.c: Remove _initialize_break_catch_throw
7748 * breakpoint.c: Remove _initialize_breakpoint prototype.
7749 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7750 * btrace.c: Remove _initialize_btrace prototype.
7751 * charset.c: Remove _initialize_charset prototype.
7752 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7753 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7754 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7755 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7756 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7757 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7758 * coffread.c: Remove _initialize_coffread prototype.
7759 * compile/compile.c: Remove _initialize_compile prototype.
7760 * complaints.c: Remove _initialize_complaints prototype.
7761 * completer.c: Remove _initialize_completer prototype.
7762 * copying.awk: Remove _initialize_copying prototype.
7763 * copying.c: Regenerate.
7764 * core-regset.c: Remove _initialize_core_regset prototype.
7765 * corefile.c: Remove _initialize_core prototype.
7766 * corelow.c: Remove _initialize_corelow prototype.
7767 * cp-abi.c: Remove _initialize_cp_abi prototype.
7768 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7769 * cp-support.c: Remove _initialize_cp_support prototype.
7770 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7771 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7772 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7773 * ctf.c: Remove _initialize_ctf prototype.
7774 * d-lang.c: Remove _initialize_d_language prototype.
7775 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7777 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7778 * dbxread.c: Remove _initialize_dbxread prototype.
7779 * dcache.c: Remove _initialize_dcache prototype.
7780 * demangle.c: Remove _initialize_demangler prototype.
7781 * disasm-selftests.c: Remove _initialize_disasm_selftests
7783 * disasm.c: Remove _initialize_disasm prototype.
7784 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7785 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7786 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7788 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7789 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7790 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7791 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7792 * elfread.c: Remove _initialize_elfread prototype.
7793 * exec.c: Remove _initialize_exec prototype.
7794 * extension.c: Remove _initialize_extension prototype.
7795 * f-lang.c: Remove _initialize_f_language prototype.
7796 * f-valprint.c: Remove _initialize_f_valprint prototype.
7797 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7798 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7799 * filesystem.c: Remove _initialize_filesystem prototype.
7800 * findcmd.c: Remove _initialize_mem_search prototype.
7801 * fork-child.c: Remove _initialize_fork_child prototype.
7802 * frame-base.c: Remove _initialize_frame_base prototype.
7803 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7804 * frame.c: Remove _initialize_frame prototype.
7805 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7806 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7807 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7808 * gcore.c: Remove _initialize_gcore prototype.
7809 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7810 * gdbarch.c: Regenerate.
7811 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7812 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7813 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7814 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7815 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7816 * go-lang.c: Remove _initialize_go_language prototype.
7817 * go32-nat.c: Remove _initialize_go32_nat prototype.
7818 * guile/guile.c: Remove _initialize_guile prototype.
7819 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7820 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7821 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7822 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7823 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7824 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7825 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7826 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7827 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7828 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7830 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7832 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7833 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7834 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7835 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7836 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7837 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7838 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7839 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7840 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7841 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7842 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7843 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7844 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7845 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7846 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7847 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7849 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7851 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7852 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7853 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7854 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7855 * infcall.c: Remove _initialize_infcall prototype.
7856 * infcmd.c: Remove _initialize_infcmd prototype.
7857 * inferior.c: Remove _initialize_inferiors prototype.
7858 * inflow.c: Remove _initialize_inflow prototype.
7859 * infrun.c: Remove _initialize_infrun prototype.
7860 * interps.c: Remove _initialize_interpreter prototype.
7861 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7862 * jit.c: Remove _initialize_jit prototype.
7863 * language.c: Remove _initialize_language prototype.
7864 * linux-fork.c: Remove _initialize_linux_fork prototype.
7865 * linux-nat.c: Remove _initialize_linux_nat prototype.
7866 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7867 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7868 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7869 * m2-lang.c: Remove _initialize_m2_language prototype.
7870 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7871 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7872 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7873 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7874 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7875 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7876 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7877 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7878 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7879 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7880 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7881 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7882 * machoread.c: Remove _initialize_machoread prototype.
7883 * macrocmd.c: Remove _initialize_macrocmd prototype.
7884 * macroscope.c: Remove _initialize_macroscope prototype.
7885 * maint.c: Remove _initialize_maint_cmds prototype.
7886 * mdebugread.c: Remove _initialize_mdebugread prototype.
7887 * memattr.c: Remove _initialize_mem prototype.
7888 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7889 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7890 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7891 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7892 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7893 * microblaze-linux-tdep.c: Remove
7894 _initialize_microblaze_linux_tdep prototype.
7895 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7896 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7897 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7898 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7899 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7900 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7901 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7902 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7903 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7904 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7905 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7907 * mipsread.c: Remove _initialize_mipsread prototype.
7908 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7910 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7911 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7912 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7913 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7914 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7915 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7917 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7918 * nto-procfs.c: Remove _initialize_procfs prototype.
7919 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7920 * objc-lang.c: Remove _initialize_objc_language prototype.
7921 * objfiles.c: Remove _initialize_objfiles prototype.
7922 * observer.c: Remove observer_test_first_notification_function,
7923 observer_test_second_notification_function,
7924 observer_test_third_notification_function, and
7925 _initialize_observer prototypes.
7926 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7927 * osabi.c: Remove _initialize_gdb_osabi prototype.
7928 * osdata.c: Remove _initialize_osdata prototype.
7929 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7930 * parse.c: Remove _initialize_parse prototype.
7931 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7932 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7933 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7934 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7935 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7936 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7937 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7938 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7939 * printcmd.c: Remove _initialize_printcmd prototype.
7940 * probe.c: Remove _initialize_probe prototype.
7941 * proc-api.c: Remove _initialize_proc_api prototype.
7942 * proc-events.c: Remove _initialize_proc_events prototype.
7943 * proc-service.c: Remove _initialize_proc_service prototype.
7944 * procfs.c: Remove _initialize_procfs prototype.
7945 * psymtab.c: Remove _initialize_psymtab prototype.
7946 * python/python.c: Remove _initialize_python prototype.
7947 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7948 * record-btrace.c: Remove _initialize_record_btrace prototype.
7949 * record-full.c: Remove _initialize_record_full prototype.
7950 * record.c: Remove _initialize_record prototype.
7951 * regcache.c: Remove _initialize_regcache prototype.
7952 * reggroups.c: Remove _initialize_reggroup prototype.
7953 * remote-notif.c: Remove _initialize_notif prototype.
7954 * remote-sim.c: Remove _initialize_remote_sim prototype.
7955 * remote.c: Remove _initialize_remote prototype.
7956 * reverse.c: Remove _initialize_reverse prototype.
7957 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7958 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7959 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7961 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7962 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7963 * rust-exp.y: Remove _initialize_rust_exp prototype.
7964 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7965 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7966 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7967 * score-tdep.c: Remove _initialize_score_tdep prototype.
7968 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7970 * ser-go32.c: Remove _initialize_ser_dos prototype.
7971 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7972 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7973 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7974 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7975 * serial.c: Remove _initialize_serial prototype.
7976 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7977 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7978 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7979 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7980 * skip.c: Remove _initialize_step_skip prototype.
7981 * sol-thread.c: Remove _initialize_sol_thread prototype.
7982 * solib-aix.c: Remove _initialize_solib_aix prototype.
7983 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7984 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7985 * solib-frv.c: Remove _initialize_frv_solib prototype.
7986 * solib-spu.c: Remove _initialize_spu_solib prototype.
7987 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7988 * solib-target.c: Remove _initialize_solib_target prototype.
7989 * solib.c: Remove _initialize_solib prototype.
7990 * source.c: Remove _initialize_source prototype.
7991 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7992 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7994 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7995 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7996 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7997 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7999 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
8000 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
8001 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
8002 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
8004 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
8006 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
8008 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
8010 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
8011 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
8013 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
8015 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
8017 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
8019 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
8021 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
8022 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
8023 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
8024 * stabsread.c: Remove _initialize_stabsread prototype.
8025 * stack.c: Remove _initialize_stack prototype.
8026 * stap-probe.c: Remove _initialize_stap_probe prototype.
8027 * std-regs.c: Remove _initialize_frame_reg prototype.
8028 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
8029 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
8030 * symfile.c: Remove _initialize_symfile prototype.
8031 * symmisc.c: Remove _initialize_symmisc prototype.
8032 * symtab.c: Remove _initialize_symtab prototype.
8033 * target-dcache.c: Remove _initialize_target_dcache prototype.
8034 * target-descriptions.c: Remove _initialize_target_descriptions
8036 * thread.c: Remove _initialize_thread prototype.
8037 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
8039 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
8040 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
8041 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
8043 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
8044 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
8045 * tracefile.c: Remove _initialize_tracefile prototype.
8046 * tracepoint.c: Remove _initialize_tracepoint prototype.
8047 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
8048 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
8049 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
8050 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8051 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8052 * tui/tui-win.c: Remove _initialize_tui_win prototype.
8053 * tui/tui.c: Remove _initialize_tui prototype.
8054 * typeprint.c: Remove _initialize_typeprint prototype.
8055 * user-regs.c: Remove _initialize_user_regs prototype.
8056 * utils.c: Remove _initialize_utils prototype.
8057 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8058 * valarith.c: Remove _initialize_valarith prototype.
8059 * valops.c: Remove _initialize_valops prototype.
8060 * valprint.c: Remove _initialize_valprint prototype.
8061 * value.c: Remove _initialize_values prototype.
8062 * varobj.c: Remove _initialize_varobj prototype.
8063 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8064 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8065 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8066 * windows-nat.c: Remove _initialize_windows_nat,
8067 _initialize_check_for_gdb_ini, and _initialize_loadable
8069 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8070 * xcoffread.c: Remove _initialize_xcoffread prototype.
8071 * xml-support.c: Remove _initialize_xml_support prototype.
8072 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8073 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8075 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8077 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8081 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8086 * f-valprint.c (f_val_print): Remove check for one byte
8087 sized integers. Remove printing of character type.
8093 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8094 to maintain proper indentation when printing pointers/refs.
8102 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8106 * parse.c (funcall_chain): Now a std::vector.
8107 (start_arglist, end_arglist): Simplify.
8108 (free_funcalls): Remove.
8109 (parse_exp_in_context_1): Remove cleanup.
8113 * go-exp.y (go_parse): Don't create a cleanup.
8117 * d-exp.y (PrimaryExpression): Use std::string.
8118 (d_parse): Don't create a cleanup.
8122 * utils.c (do_clear_parser_state): Remove.
8123 (make_cleanup_clear_parser_state): Remove.
8124 * p-exp.y (pascal_parse): Use scoped_restore.
8125 * m2-exp.y (m2_parse): Use scoped_restore.
8126 * f-exp.y (f_parse): Use scoped_restore.
8127 * d-exp.y (d_parse): Use scoped_restore.
8128 * c-exp.y (c_parse): Use scoped_restore.
8129 * ada-exp.y (ada_parse): Use scoped_restore.
8130 * utils.h (make_cleanup_clear_parser_state): Remove.
8134 * dwarf2read.c (dw2_linkage_name_attr): New function.
8135 (dw2_linkage_name): New function.
8136 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8137 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8138 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8142 * config/djgpp/djconfig.sh: Correct shell portability issue.
8146 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8150 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8151 * NEWS: Mention new FreeBSD/mips native configuration.
8152 * configure.host: Add aarch64*-*-freebsd*.
8153 * configure.nat: Likewise.
8154 * aarch64-fbsd-nat.c: New file.
8158 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8159 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8160 * NEWS: Mention new FreeBSD/aarch64 target.
8161 * configure.tgt: Add aarch64*-*-freebsd*.
8162 * aarch64-fbsd-tdep.c: New file.
8163 * aarch64-fbsd-tdep.h: New file.
8167 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8171 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8176 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8181 * infrun.c (follow_exec): Call add_thread after
8182 target_find_description.
8186 * infrun.c (handle_inferior_event_1): When exec'ing, read
8187 stop_pc after follow_exec.
8191 * remote.c (process_g_packet): Update error message.
8195 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8200 * eval.c (eval_call, evaluate_funcall): New functions, factored
8202 (evaluate_subexp_standard): ... this.
8206 * amd64-tdep.c (amd64_target_description): Create target
8208 (_initialize_amd64_tdep): Don't call functions
8209 initialize_tdesc_amd64_*. Add self tests.
8210 * arch/amd64.c (amd64_create_target_description): Add parameter
8211 is_linux. Call set_tdesc_osabi if is_linux is true.
8212 * arch/amd64.h (amd64_create_target_description): Update the
8214 * arch/i386.c (i386_create_target_description): Add parameter
8215 is_linux. Call set_tdesc_osabi if is_linux is true.
8216 * arch/i386.h (i386_create_target_description): Update
8218 * configure.tgt: Add i386.o to gdb_target_obs.
8219 * features/Makefile (XMLTOC): Remove i386/*.xml.
8220 * features/i386/amd64-avx-avx512.c: Remove.
8221 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8222 * features/i386/amd64-avx-mpx.c: Remove.
8223 * features/i386/amd64-avx.c: Remove.
8224 * features/i386/amd64-mpx.c: Remove.
8225 * features/i386/amd64.c: Remove.
8226 * features/i386/i386-avx-avx512.c: Remove.
8227 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8228 * features/i386/i386-avx-mpx.c: Remove.
8229 * features/i386/i386-avx.c: Remove.
8230 * features/i386/i386-mmx.c: Remove.
8231 * features/i386/i386-mpx.c: Remove.
8232 * features/i386/i386.c: Remove.
8233 * i386-tdep.c: Don't include features/i386/i386*.c., include
8234 target-descriptions.h and arch/i386.h.
8235 (i386_target_description): Create target descriptions.
8236 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8237 functions. Do self tests.
8241 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8242 * features/i386/amd64-avx-avx512-linux.c: Removed.
8243 * features/i386/amd64-avx-linux.c: Removed.
8244 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8245 * features/i386/amd64-avx-mpx-linux.c: Removed.
8246 * features/i386/amd64-linux.c: Removed.
8247 * features/i386/amd64-mpx-linux.c: Removed.
8248 * features/i386/x32-avx-avx512-linux.c: Removed.
8249 * features/i386/x32-avx-linux.c: Removed.
8250 * features/i386/x32-linux.c: Removed.
8254 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8256 (amd64_linux_read_description): Call
8257 amd64_create_target_description.
8258 * arch/amd64.c: New file.
8259 * arch/amd64.h: New file.
8260 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8261 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8265 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8266 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8267 (amd64_linux_read_description): Create target descriptions.
8268 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8269 functions. Add unit tests.
8270 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8272 * features/i386/64bit-avx.c: Generated.
8273 * features/i386/64bit-avx512.c: Generated.
8274 * features/i386/64bit-core.c: Generated.
8275 * features/i386/64bit-linux.c: Generated.
8276 * features/i386/64bit-mpx.c: Generated.
8277 * features/i386/64bit-pkeys.c: Generated.
8278 * features/i386/64bit-segments.c: Generated.
8279 * features/i386/64bit-sse.c: Generated.
8280 * features/i386/x32-core.c: Generated.
8281 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8282 c files for amd64-linux and x32-linux.
8286 * amd64-linux-tdep.c (amd64_linux_read_description): New
8288 (amd64_linux_core_read_description): Call
8289 amd64_linux_read_description.
8290 (amd64_linux_init_abi): Likewise.
8291 (amd64_x32_linux_init_abi): Likewise.
8292 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8293 * x86-linux-nat.c (x86_linux_read_description): Call
8294 amd64_linux_read_description.
8298 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8303 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8304 * features/i386/i386-avx-avx512-linux.c: Remove.
8305 * features/i386/i386-avx-linux.c: Remove.
8306 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8307 * features/i386/i386-avx-mpx-linux.c: Remove.
8308 * features/i386/i386-linux.c: Remove.
8309 * features/i386/i386-mmx-linux.c: Remove.
8310 * features/i386/i386-mpx-linux.c: Remove.
8314 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8315 (SFILES): Add arch/i386.c.
8316 (HFILES_NO_SRCDIR): Add arch/i386.h.
8317 * arch/i386.c: New file.
8318 * arch/i386.h: New file.
8319 * arch/tdesc.h (allocate_target_description): Declare.
8320 (set_tdesc_architecture): Declare.
8321 (set_tdesc_osabi): Declare.
8322 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8323 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8324 include arch/i386.h.
8325 (i386_linux_read_description): Remove code and call
8326 i386_create_target_description.
8327 (set_tdesc_architecture): New function.
8328 (set_tdesc_osabi): New function.
8329 * target-descriptions.h (allocate_target_description): Remove.
8333 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8334 * target-descriptions.c (tdesc_create_feature): Likewise, and
8336 * features/i386/32bit-avx.c: Re-generated.
8337 * features/i386/32bit-avx512.c: Re-generated.
8338 * features/i386/32bit-core.c: Re-generated.
8339 * features/i386/32bit-linux.c: Re-generated.
8340 * features/i386/32bit-mpx.c: Re-generated.
8341 * features/i386/32bit-pkeys.c: Re-generated.
8342 * features/i386/32bit-sse.c: Re-generated.
8346 * regformats/regdef.h (struct reg): Override operator == and !=.
8350 * arch/tdesc.h: New file.
8351 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8352 * target-descriptions.c: Update comments.
8353 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8355 * features/i386/32bit-avx.c: Re-generated.
8356 * features/i386/32bit-avx512.c: Re-generated.
8357 * features/i386/32bit-core.c: Re-generated.
8358 * features/i386/32bit-linux.c: Re-generated.
8359 * features/i386/32bit-mpx.c: Re-generated.
8360 * features/i386/32bit-pkeys.c: Re-generated.
8361 * features/i386/32bit-sse.c: Re-generated.
8365 * regformats/regdat.sh: Update generated code.
8369 * regformats/regdat.sh: Adjust code order.
8373 * expprint.c (dump_subexp_body_standard): Use constant format
8374 string in fprintf_filtered call.
8378 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8380 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8384 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8388 * bsd-kvm.o: Define _KMEMUSER.
8389 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8390 * configure: Regenerate.
8394 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8395 * i386-fbsd-nat.c: Likewise.
8399 * unittests/array-view-selftests.c: Add include of <array>.
8403 * spu-tdep.c (flush_ea_cache): Add missing argument to
8404 call_function_by_hand.
8408 * NEWS (Safer support for debugging with no debug info): New.
8412 * c-exp.y (function_method, function_method_void): Add current
8413 instance flags to TYPE_INSTANCE.
8414 * dwarf2read.c (check_modifier): New.
8415 (compute_delayed_physnames): Assert that only C++ adds delayed
8416 physnames. Mark fn_fields as const/volatile depending on
8418 * eval.c (make_params): New type_instance_flags parameter. Use
8419 it as the new type's instance flags.
8420 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8421 flags element and pass it to make_params.
8422 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8423 instance flags element.
8424 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8425 * gdbtypes.h: Include "enum-flags.h".
8426 (type_instance_flags): New enum-flags type.
8427 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8428 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8429 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8430 (follow_type_instance_flags): New function.
8431 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8432 * parser-defs.h (follow_type_instance_flags): Declare.
8433 * valops.c (value_struct_elt_for_reference): const/volatile must
8438 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8439 function/method scopes; lookup the nested name as a function local
8444 (%type <voidval>): Add function_method.
8445 * c-exp.y (exp): New production for calls with no arguments.
8446 (function_method, function_method_void_or_typelist): New
8448 (exp): New production for "method()::static_var".
8449 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8450 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8451 Handle OP_FUNC_STATIC_VAR.
8452 * parse.c (operator_length_standard):
8453 Handle OP_FUNC_STATIC_VAR.
8457 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8459 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8461 * parse.c (operator_length_standard, operator_check_standard):
8463 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8467 * ax-gdb.c: Include "typeprint.h".
8468 (gen_expr_for_cast): New function.
8469 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8470 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8472 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8473 nodebug_data_symbol.
8474 * eval.c: Include "typeprint.h".
8475 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8476 Error out if symbol has unknown type.
8477 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8478 evaluate_subexp_for_cast.
8479 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8481 (evaluate_subexp_for_cast): New function.
8482 * gdbtypes.c (init_nodebug_var_type): New function.
8483 (objfile_type): Use it to initialize types of variables with no
8485 * typeprint.c (error_unknown_type): New.
8486 * typeprint.h (error_unknown_type): New declaration.
8487 * compile/compile-c-types.c (convert_type_basic): Handle
8488 TYPE_CODE_ERROR; warn and fallback to int for variables with
8493 * eval.c (evaluate_var_value): New function, factored out from ...
8494 (evaluate_subexp_standard): ... here.
8498 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8499 Remove useless assignments to 'op'.
8503 * eval.c (eval_skip_value): New function.
8504 (evaluate_subexp_standard): Use it.
8508 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8509 function name from symbol/minsym and pass it to
8510 error_call_unknown_return_type.
8514 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8515 * ax-gdb.c (gen_msym_var_ref): New function.
8516 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8517 * eval.c (evaluate_var_msym_value): New function.
8518 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8519 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8520 to call_function_by_hand.
8521 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8522 Handle OP_VAR_MSYM_VALUE.
8523 (union exp_element) <msymbol>: New field.
8524 * minsyms.h (struct type): Forward declare.
8525 (find_minsym_type_and_address): Declare.
8526 * parse.c (write_exp_elt_msym): New function.
8527 (write_exp_msymbol): Delete, refactored as ...
8528 (find_minsym_type_and_address): ... this new function.
8529 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8530 (operator_length_standard, operator_check_standard): Handle
8532 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8536 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8537 TYPE_GNU_IFUNC specially here. Throw error if return type is
8539 * ada-typeprint.c (print_func_type): Handle functions with unknown
8541 * c-typeprint.c (c_type_print_base): Handle functions and methods
8542 with unknown return type.
8543 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8544 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8545 * compile/compile-c-types.c: Include "objfiles.h".
8546 (convert_func): For functions with unknown return type, warn and
8548 * compile/compile-object-run.c (compile_object_run): Adjust call
8549 to call_function_by_hand_dummy.
8550 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8551 call_function_by_hand.
8552 * eval.c (evaluate_subexp_standard): Adjust calls to
8553 call_function_by_hand. Handle functions and methods with unknown
8554 return type. Pass expect_type to call_function_by_hand.
8555 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8557 * gcore.c (call_target_sbrk): Adjust call to
8558 call_function_by_hand.
8559 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8560 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8561 an integer address type instead of nodebug.
8562 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8563 call_function_by_hand.
8564 * infcall.c (error_call_unknown_return_type): New function.
8565 (call_function_by_hand): New "default_return_type" parameter.
8567 (call_function_by_hand_dummy): New "default_return_type"
8568 parameter. Use it instead of defaulting to int. If there's no
8569 default and the return type is unknown, throw an error. If
8570 there's a default return type, and the called function has no
8571 debug info, then assume the function is prototyped.
8572 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8573 New "default_return_type" parameter.
8574 (error_call_unknown_return_type): New declaration.
8575 * linux-fork.c (call_lseek): Cast return type of lseek.
8576 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8577 call_function_by_hand.
8578 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8579 calls to call_function_by_hand.
8580 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8582 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8583 (value_nsstring, print_object_command): Adjust calls to
8584 call_function_by_hand.
8585 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8586 functions with unknown return type.
8587 (pascal_type_print_func_varspec_suffix): New function.
8588 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8589 TYPE_CODE_METHOD>: Use it.
8590 * python/py-value.c (valpy_call): Adjust call to
8591 call_function_by_hand.
8592 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8593 call_function_by_hand.
8594 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8595 call_function_by_hand.
8596 * valops.c (value_allocate_space_in_inferior): Adjust call to
8597 call_function_by_hand.
8598 * typeprint.c (type_print_unknown_return_type): New function.
8599 * typeprint.h (type_print_unknown_return_type): New declaration.
8603 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8604 types with more than one parameter as prototyped.
8608 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8609 (disassemble_command): Use gdb_disassembly_flags instead of bare
8611 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8612 (dump_insns, do_mixed_source_and_assembly_deprecated)
8613 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8614 Use gdb_disassembly_flags instead of bare int.
8615 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8616 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8617 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8618 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8619 (enum gdb_disassembly_flag): ... values of this new enumeration.
8620 (gdb_disassembly_flags): Define.
8622 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8623 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8624 gdb_disassembly_flags instead of bare int.
8625 * record-btrace.c (btrace_insn_history)
8626 (record_btrace_insn_history, record_btrace_insn_history_range)
8627 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8628 instead of bare int.
8629 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8630 Use gdb_disassembly_flags instead of bare int.
8631 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8633 * target-delegates.c: Regenerate.
8634 * target.c (target_insn_history, target_insn_history_from)
8635 (target_insn_history_range): Use gdb_disassembly_flags instead of
8637 * target.h: Include "disasm.h".
8638 (struct target_ops) <to_insn_history, to_insn_history_from,
8639 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8641 (target_insn_history, target_insn_history_from)
8642 (target_insn_history_range): Use gdb_disassembly_flags instead of
8647 * cli/cli-script.c (build_command_line): For if/while commands,
8648 check whether args is empty.
8652 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8653 (enum command_control_type): Likewise.
8654 (struct command_line): Likewise.
8655 (free_command_lines): Likewise.
8656 (struct command_lines_deleter): Likewise.
8657 (command_line_up): Likewise.
8658 (read_command_lines): Likewise.
8659 (read_command_lines_1): Likewise.
8660 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8661 (enum command_control_type): Likewise.
8662 (struct command_line): Likewise.
8663 (free_command_lines): Likewise.
8664 (struct command_lines_deleter): Likewise.
8665 (command_line_up): Likewise.
8666 (read_command_lines): Likewise.
8667 (read_command_lines_1): Likewise.
8668 * breakpoint.h: Include cli/cli-script.h.
8669 * extension-priv.h: Likewise.
8670 * gdbcmd.h: Likewise.
8674 * ada-lang.c (is_known_support_routine): Move sal declaration to
8675 where it is initialized.
8676 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8677 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8678 (clear_command, update_static_tracepoint): Remove init_sal
8679 references. Move declarations closer to initializations.
8680 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8682 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8683 references. Move sal declarations closer to initializations.
8684 * frame.c (find_frame_sal): Return a symtab_and_line via function
8685 return instead of output parameter. Remove init_sal references.
8686 * frame.h (find_frame_sal): Return a symtab_and_line via function
8687 return instead of output parameter.
8688 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8689 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8691 (gdbscm_find_pc_line): Remove init_sal reference.
8692 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8693 references. Move declarations closer to initializations.
8694 * infcmd.c (set_step_frame): Update. Move declarations closer to
8696 (finish_backward): Remove init_sal references. Move declarations
8697 closer to initializations.
8698 * infrun.c (process_event_stop_test, handle_step_into_function)
8699 (insert_hp_step_resume_breakpoint_at_frame)
8700 (insert_step_resume_breakpoint_at_caller): Likewise.
8701 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8702 (symbol_to_sal): Likewise.
8703 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8704 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8705 to its initialization.
8706 * reverse.c (save_bookmark_command): Use new/delete. Remove
8707 init_sal references. Move declarations closer to initializations.
8708 * source.c (get_current_source_symtab_and_line): Remove brace
8710 (set_current_source_symtab_and_line): Now takes the sal by const
8711 reference. Remove brace initialization.
8712 (line_info): Remove init_sal reference.
8713 * source.h (set_current_source_symtab_and_line): Now takes a
8714 symtab_and_line via const reference.
8715 * stack.c (set_current_sal_from_frame): Adjust.
8716 (print_frame_info): Adjust.
8717 (get_last_displayed_sal): Return the sal via function return
8718 instead of via output parameter. Simplify.
8719 (frame_info): Adjust.
8720 * stack.h (get_last_displayed_sal): Return the sal via function
8721 return instead of via output parameter.
8722 * symtab.c (init_sal): Delete.
8723 (find_pc_sect_line): Remove init_sal references. Move
8724 declarations closer to initializations.
8725 (find_function_start_sal): Remove init_sal references. Move
8726 declarations closer to initializations.
8727 * symtab.h (struct symtab_and_line): In-class initialize all
8729 * tracepoint.c (set_traceframe_context)
8730 (print_one_static_tracepoint_marker): Remove init_sal references.
8731 Move declarations closer to initializations.
8732 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8733 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8734 declarations closer to initializations.
8735 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8736 init_sal references. Adjust.
8740 * ax-gdb.c (agent_command_1): Use range-for.
8741 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8742 * breakpoint.c: Include "common/array-view.h".
8743 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8744 parameter from struct symtabs_and_lines to
8745 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8746 (breakpoint_sals_to_pc): Change sals parameter from struct
8747 symtabs_and_lines to std::vector reference.
8748 (check_fast_tracepoint_sals): Change sals parameter from struct
8749 symtabs_and_lines to std::array_view. Use range-for.
8750 (decode_static_tracepoint_spec): Return a std::vector instead of
8751 symtabs_and_lines. Update.
8752 (create_breakpoint): Update.
8753 (break_range_command, until_break_command, clear_command): Update.
8754 (base_breakpoint_decode_location, bkpt_decode_location)
8755 (bkpt_probe_create_sals_from_location)
8756 (bkpt_probe_decode_location, tracepoint_decode_location)
8757 (tracepoint_probe_decode_location)
8758 (strace_marker_create_sals_from_location): Return a std::vector
8759 instead of symtabs_and_lines.
8760 (strace_marker_create_breakpoints_sal): Update.
8761 (strace_marker_decode_location): Return a std::vector instead of
8762 symtabs_and_lines. Update.
8763 (update_breakpoint_locations): Change struct symtabs_and_lines
8764 parameters to gdb::array_view. Adjust.
8765 (location_to_sals): Return a std::vector instead of
8766 symtabs_and_lines. Update.
8767 (breakpoint_re_set_default): Use std::vector instead of struct
8769 (decode_location_default): Return a std::vector instead of
8770 symtabs_and_lines. Update.
8771 * breakpoint.h: Include "common/array-view.h".
8772 (struct breakpoint_ops) <decode_location>: Now returns a
8773 std::vector instead of returning a symtabs_and_lines via output
8775 (update_breakpoint_locations): Change sals parameters to use
8777 * cli/cli-cmds.c (edit_command, list_command): Update to use
8778 std::vector and gdb::array_view.
8779 (ambiguous_line_spec): Adjust to use gdb::array_view and
8781 (compare_symtabs): Rename to ...
8782 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8783 const reference and adjust.
8784 (filter_sals): Rewrite using std::vector and standard algorithms.
8785 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8786 (jump_command): Update to use std::vector.
8787 * linespec.c (struct linespec_state) <canonical_names>: Update
8789 (add_sal_to_sals_basic): Delete.
8790 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8791 (decode_line_2, create_sals_line_offset)
8792 (convert_address_location_to_sals, convert_linespec_to_sals)
8793 (convert_explicit_location_to_sals, parse_linespec)
8794 (event_location_to_sals, decode_line_full, decode_line_1)
8795 (decode_line_with_current_source)
8796 (decode_line_with_last_displayed, decode_objc)
8797 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8798 (linespec_result::~linespec_result): Adjust to use std::vector
8799 instead of symtabs_and_lines.
8800 * linespec.h (linespec_sals::sals): Now a std::vector.
8801 (struct linespec_result): Use std::vector, bool, and in-class
8803 (decode_line_1, decode_line_with_current_source)
8804 (decode_line_with_last_displayed): Return std::vector.
8805 * macrocmd.c (info_macros_command): Use std::vector.
8806 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8807 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8809 * probe.h (parse_probes): Return a std::vector.
8810 * python/python.c (gdbpy_decode_line): Use std::vector and
8812 * source.c (select_source_symtab, line_info): Use std::vector.
8813 * stack.c (func_command): Use std::vector.
8814 * symtab.h (struct symtabs_and_lines): Delete.
8815 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8819 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8820 unittests/array-view-selftests.c.
8821 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8822 * common/array-view.h: New file.
8823 * unittests/array-view-selftests.c: New file.
8827 * cli/cli-cmds.c (edit_command): Pass message to
8828 ambiguous_line_spec.
8829 (list_command): Pass message to ambiguous_line_spec. Say
8830 "first"/"last" instead of "start" and "end" to be consistent with
8832 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8833 them to print formatted message.
8837 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8838 ftrace_update_insns by reference instead of pointer.
8842 * i386-go32-tdep.c: Include x86-xstate.h.
8843 (i386_go32_init_abi): Call i386_target_description.
8844 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8845 if xcr0 is X86_XSTATE_X87_MASK.
8846 * i386-tdep.h (tdesc_i386): Remove the declaration.
8847 (tdesc_i386_mmx): Likewise.
8851 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8852 X86_XSTATE_SSE_MASK instead of 0.
8856 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8857 i386_target_description.
8858 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8859 i386_target_description.
8860 * i386-tdep.c (i386_gdbarch_init): Likewise.
8864 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8865 (x86_darwin_init_abi_64): Call amd64_target_description.
8866 * amd64-dicos-tdep.c: Likewise.
8867 * amd64-fbsd-nat.c: Likewise.
8868 * amd64-fbsd-tdep.c: Likewise.
8869 * amd64-nbsd-tdep.c: Likewise.
8870 * amd64-obsd-tdep.c: Likewise.
8871 * amd64-sol2-tdep.c: Likewise.
8872 * amd64-windows-tdep.c: Likewise.
8873 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8877 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8878 (btrace_function) <insn>: Change type to use std::vector.
8879 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8880 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8881 ftrace_update_insns, ftrace_compute_global_level_offset,
8882 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8883 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8884 change to std::vector.
8885 (ftrace_update_insns): Adjust to change to std::vector, change
8886 type of INSN parameter.
8887 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8888 * record-btrace.c (btrace_call_history_insn_range,
8889 btrace_compute_src_line_range,
8890 record_btrace_frame_prev_register): Adjust to change to
8892 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8893 to change to std::vector.
8897 * corefile.c (reopen_exec_file): Use std::string.
8901 * compile/compile.c (compile_register_name_mangled): Return
8903 * compile/compile-loc2c.c (pushf_register_address): Update.
8904 (pushf_register): Update.
8905 * compile/compile-c-types.c (convert_array): Update.
8906 * compile/compile-c-symbols.c (generate_vla_size): Update.
8907 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8908 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8909 (convert_one_symbol): Update.
8910 (generate_c_for_for_one_variable): Update.
8911 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8913 (generate_register_struct): Update.
8914 * compile/compile-internal.h (c_get_range_decl_name): Return a
8916 (compile_register_name_mangled): Return std::string.
8920 * utils.c (perror_string): Return a std::string.
8921 (throw_perror_with_name, perror_warning_with_name): Update.
8925 * demangle.c (demangle_command): Use std::string,
8930 * cli/cli-setshow.c (do_set_command): Use std::string.
8934 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8938 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8942 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8943 gdb::unique_xmalloc_ptr.
8947 * thread.c (print_thread_info_1): Use string_printf.
8948 (thread_apply_command, thread_apply_all_command): Use
8953 * valprint.c (val_print_string): Update.
8954 * gdbcore.h (memory_error_message): Return std::string.
8955 * corefile.c (memory_error_message): Return std::string.
8956 (memory_error): Update.
8957 * breakpoint.c (insert_bp_location): Update.
8961 * target/waitstatus.h (target_waitstatus_to_string): Change
8962 return type to std::string.
8963 * target/waitstatus.c (target_waitstatus_to_string): Return
8965 * target.h (target_waitstatus_to_string): Remove declaration.
8966 * infrun.c (resume, clear_proceed_status_thread,
8967 print_target_wait_results, do_target_wait, save_waitstatus,
8968 stop_all_threads): Adjust.
8969 * record-btrace.c (record_btrace_wait): Adjust.
8971 (target_debug_print_struct_target_waitstatus_p): Adjust.
8976 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8981 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8982 for setting/unsetting environment variables on the remote target.
8983 (New remote packets): Add entries for QEnvironmentHexEncoded,
8984 QEnvironmentUnset and QEnvironmentReset.
8985 * common/environ.c (gdb_environ::operator=): Extend method to
8986 handle m_user_set_env_list and m_user_unset_env_list.
8987 (gdb_environ::clear): Likewise.
8988 (match_var_in_string): Change type of first parameter from 'char
8989 *' to 'const char *'.
8990 (gdb_environ::set): Extend method to handle
8991 m_user_set_env_list and m_user_unset_env_list.
8992 (gdb_environ::unset): Likewise.
8993 (gdb_environ::clear_user_set_env): New method.
8994 (gdb_environ::user_set_envp): Likewise.
8995 (gdb_environ::user_unset_envp): Likewise.
8996 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8997 m_user_unset_env_list on move constructor/assignment.
8998 (unset): Add new default parameter 'update_unset_list = true'.
8999 (clear_user_set_env): New method.
9000 (user_set_envp): Likewise.
9001 (user_unset_envp): Likewise.
9002 (m_user_set_env_list): New std::set.
9003 (m_user_unset_env_list): Likewise.
9004 * common/rsp-low.c (hex2str): New function.
9005 (bin2hex): New overload for bin2hex function.
9006 * common/rsp-low.c (hex2str): New prototype.
9007 (str2hex): New overload prototype.
9008 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
9009 QEnvironmentUnset and QEnvironmentReset.
9010 (remote_protocol_features): Add QEnvironmentHexEncoded,
9011 QEnvironmentUnset and QEnvironmentReset packets.
9012 (send_environment_packet): New function.
9013 (extended_remote_environment_support): Likewise.
9014 (extended_remote_create_inferior): Call
9015 extended_remote_environment_support.
9016 (_initialize_remote): Add QEnvironmentHexEncoded,
9017 QEnvironmentUnset and QEnvironmentReset packet configs.
9018 * unittests/environ-selftests.c (gdb_selftest_env_var):
9020 (test_vector_initialization): New function.
9021 (test_init_from_host_environ): Likewise.
9022 (test_reinit_from_host_environ): Likewise.
9023 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
9025 (test_unset_set_empty_vector): Likewise.
9026 (test_vector_clear): Likewise.
9027 (test_std_move): Likewise.
9028 (test_move_constructor):
9029 (test_self_move): Likewise.
9030 (test_set_unset_reset): Likewise.
9031 (run_tests): Rewrite in terms of the functions above.
9035 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
9036 (adi_available): Use a temp variable of type CORE_ADDR as argument
9037 3 when calling target_auxv_search.
9038 (adi_normalize_address): Use masks and xor operators to calculate
9040 (adi_read_versions, adi_write_versions, adi_print_versions)
9041 (do_examine, do_assign): Use paddress.
9045 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
9046 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
9047 out of loop and add supply of FIR.
9048 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
9054 * cli/cli-script.c (define_command): Don't convert command name
9059 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9060 Update all callers accordingly. Remove all code blocks handling
9061 the case where DISPP is not NULL.
9066 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9067 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9068 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9072 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9073 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9074 (read_comp_units_from_section): New parameter abbrev_section, use
9075 read_and_check_comp_unit_head, allocate signatured_type if needed.
9076 (create_all_comp_units): Update read_comp_units_from_section caller.
9081 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9082 to null_ptid and switch to thread without reading the registers
9083 after adding the inferior.
9087 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9089 * compile/compile.c (compile_gcc, show_compile_gcc): New.
9090 (compile_to_object): Implement compile_gcc.
9091 (_initialize_compile): Install "set compile-gcc". Initialize
9096 * compile/compile.c (compile_to_object): Conditionally call
9097 set_verbose. Conditionally call compile or compile_v0.
9101 * sparc64-tdep.h: (adi_normalize_address): New export.
9102 * sparc-nat.h: (open_adi_tag_fd): New export.
9103 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9104 * sparc64-linux-tdep.c:
9105 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9106 (sparc64_linux_handle_segmentation_fault): New function.
9107 (sparc64_linux_init_abi): Register
9108 sparc64_linux_handle_segmentation_fault
9109 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9110 (sparc64_addr_bits_remove): New function.
9111 (sparc64_init_abi): Register sparc64_addr_bits_remove.
9112 (MAX_PROC_NAME_SIZE): New macro.
9113 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9114 (sparc64adilist): New variable.
9115 (adi_proc_list): New variable.
9116 (find_adi_info): New function.
9117 (add_adi_info): New function.
9118 (get_adi_info_proc): New function.
9119 (get_adi_info): New function.
9120 (info_adi_command): New function.
9121 (read_maps_entry): New function.
9122 (adi_available): New function.
9123 (adi_normalize_address): New function.
9124 (adi_align_address): New function.
9125 (adi_convert_byte_count): New function.
9126 (adi_tag_fd): New function.
9127 (adi_is_addr_mapped): New function.
9128 (adi_read_versions): New function.
9129 (adi_write_versions): New function.
9130 (adi_print_versions): New function.
9131 (do_examine): New function.
9132 (do_assign): New function.
9133 (adi_examine_command): New function.
9134 (adi_assign_command): New function.
9135 (_initialize_sparc64_adi_tdep): New function.
9139 * breakpoint.c (breakpoints_info): Rename to ...
9140 (info_breakpoints_command): ... this.
9141 (watchpoints_info): Rename to ...
9142 (info_watchpoints_command): ... this.
9143 (tracepoints_info): Rename to ...
9144 (info_tracepoints_command): ... this.
9145 (_initialize_breakpoint): Adjust.
9146 * dcache.c (dcache_info): Rename to ...
9147 (info_display_command): ... this.
9148 (_initialize_dcache): Adjust.
9149 * frame.h (args_info): Rename to ...
9150 (info_args_command): ... this.
9151 (locals_info): Rename to ...
9152 (info_locals_command): ... this.
9153 * infcmd.c (nofp_registers_info): Rename to ...
9154 (info_registers_command): ... this.
9155 (float_info): Rename to ...
9156 (info_float_command): ... this.
9157 (program_info): Rename to ...
9158 (info_program_command): ... this.
9159 (all_registers_info): Rename to ...
9160 (info_all_registers_command): ... this.
9161 (vector_info): Rename to ...
9162 (info_vector_command): ... this.
9163 (float_info): Rename to ...
9164 (info_float_command): ... this.
9165 (_initialize_infcmd): Adjust.
9166 * inferior.h (term_info): Rename to ...
9167 (info_terminal_command): ... this.
9168 * inflow.c (term_info): Rename to ...
9169 (info_terminal_command): ... this.
9170 (_initialize_inflow): Adjust.
9171 * infrun.c (signals_info): Rename to ...
9172 (info_signals_command): ... this.
9173 (_initialize_infrun): Adjust.
9174 * objc-lang.c (classes_info): Rename to ...
9175 (info_classes_command): ... this.
9176 (selectors_info): Rename to ...
9177 (info_selectors_command): ... this.
9178 (_initialize_objc_language): Adjust.
9179 * printcmd.c (sym_info): Rename to ...
9180 (info_symbol_command): ... this.
9181 (address_info): Rename to ...
9182 (info_address_command): ... this.
9183 (display_info): Rename to ...
9184 (info_display_command): ... this.
9185 (_initialize_printcmd): Adjust.
9186 * reverse.c (bookmarks_info): Rename to ...
9187 (info_breakpoints_command): ... this.
9188 (_initialize_reverse): Adjust.
9189 * ser-go32.c (dos_info): Rename to ...
9190 (info_serial_command): ... this.
9191 (_initialize_ser_dos): Adjust.
9192 * skip.c (skip_info): Rename to ...
9193 (info_skip_command): ... this.
9194 (_initialize_step_skip): Adjust.
9195 * source.c (line_info): Rename to ...
9196 (info_line_command): ... this.
9197 (source_info): Rename to ...
9198 (info_source_command)
9199 * stack.c (frame_info): Rename to ...
9200 (info_frame_command): ... this.
9201 (locals_info): Rename to ...
9202 (info_locals_command): ... this.
9203 (args_info): Rename to ...
9204 (info_args_command): ... this.
9205 (_initialize_stack): Adjust.
9206 * symtab.c (sources_info): Rename to ...
9207 (info_sources_command): ... this.
9208 (variables_info): Rename to ...
9209 (info_variables_command): ... this.
9210 (functions_info): Rename to ...
9211 (info_functions_command): ... this.
9212 (types_info): Rename to ...
9213 (info_types_command): ... this.
9214 (_initialize_symtab): Adjust.
9215 * target.c (target_info): Rename to ...
9216 (info_target_command): ... this.
9217 (initialize_targets): Adjust.
9218 * tracepoint.c (tvariables_info): Rename to ...
9219 (info_tvariables_command): ... this.
9220 (scope_info): Rename to ...
9221 (info_scope_command): ... this.
9222 (trace_dump_actions): Adjust.
9223 (_initialize_tracepoint): Adjust.
9227 * breakpoint.h (install_breakpoint): Update.
9228 * breakpoint.c (add_solib_catchpoint): Update.
9229 (install_breakpoint): Change argument to a std::unique_ptr.
9230 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9231 (create_breakpoint_sal, create_breakpoint): Update.
9232 (watch_command_1, catch_exec_command_1)
9233 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9234 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9235 Return the breakpoint.
9236 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9237 (new_single_step_breakpoint): Update.
9238 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9240 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9242 * break-catch-sig.c (create_signal_catchpoint): Use
9244 * ada-lang.c (create_ada_exception_catchpoint): Use
9249 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9253 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9254 (lookup_partial_symbol): Update.
9258 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9259 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9260 (find_and_open_source, symtab_to_fullname): Update.
9261 * psymtab.c (psymtab_to_fullname): Update.
9265 * exec.c (exec_file_attach): Update.
9266 * linux-thread-db.c (try_thread_db_load): Update.
9267 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9268 * utils.c (gdb_realpath): Change return type.
9269 (gdb_realpath_keepfile): Update.
9270 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9271 (_initialize_utils): Register the new self test.
9272 * source.c (openp): Update.
9273 (find_and_open_source): Update.
9274 * nto-tdep.c (nto_find_and_open_solib): Update.
9275 * main.c (set_gdb_data_directory): Update.
9276 (captured_main_1): Update.
9277 * dwarf2read.c (dwarf2_get_dwz_file): Update
9278 (dw2_map_symbol_filenames): Update.
9279 * auto-load.c (auto_load_safe_path_vec_update): Update.
9280 (filename_is_in_auto_load_safe_path_vec): Change type of
9282 (auto_load_objfile_script): Update.
9283 (file_is_auto_load_safe): Update. Use std::string.
9284 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9288 * utils.c (gdb_realpath_keepfile): Return a
9289 gdb::unique_xmalloc_ptr.
9290 * exec.c (exec_file_attach): Update.
9291 * utils.h (gdb_realpath_keepfile): Return a
9292 gdb::unique_xmalloc_ptr.
9296 * compile/compile.c (compile_file_command): Use
9297 gdb::unique_xmalloc_ptr, std::string.
9298 * utils.c (gdb_abspath): Change return type.
9299 * source.c (openp): Update.
9300 * objfiles.c (allocate_objfile): Update.
9301 * main.c (set_gdb_data_directory): Update.
9302 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9306 * cli-cmds.c (list_commands): List actual code around more than
9311 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9316 * c-exp.y (variable production): Handle function aliases.
9317 * minsyms.c (msymbol_is_text): New function.
9318 * minsyms.h (msymbol_is_text): Declare.
9319 * symtab.c (find_function_alias_target): New function.
9320 * symtab.h (find_function_alias_target): Declare.
9324 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9326 * typeprint.c (whatis_exp): If handling "whatis", and expression
9327 is OP_TYPE, strip one typedef level. Otherwise don't strip
9329 * valops.c (value_cast): Save "to" type before resolving
9330 stubs/typedefs. Use that type as resulting value's type.
9335 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9336 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9337 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9338 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9339 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9340 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9341 (linux_get_siginfo_data): Add "thread" argument. Use
9343 * linux-nat.c (linux_child_follow_fork)
9344 (check_stopped_by_watchpoint): Use scoped_restore.
9345 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9346 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9347 (restore_inferior_ptid, save_inferior_ptid): Remove.
9348 * btrace.c (btrace_fetch): Use scoped_restore.
9349 * bsd-uthread.c (bsd_uthread_fetch_registers)
9350 (bsd_uthread_store_registers): Use scoped_restore.
9351 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9353 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9354 (aix_thread_xfer_partial): Use scoped_restore.
9355 * inferior.h (save_inferior_ptid): Remove.
9360 * arm-tdep.c (gdb_print_insn_arm): Mark
9361 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9365 * NEWS: Mention GDBserver's new option "--selftest".
9366 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9367 * selftest.c: Move it to common/selftest.c.
9368 * selftest.h: Move it to common/selftest.h.
9369 * selftest-arch.c (reset): New function.
9370 (tests_with_arch): Call reset.
9374 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9375 instead of exception_fprintf and printf_filtered.
9379 * selftest.c (register_self_test): Rename it to
9380 selftests::register_test.
9381 (run_self_tests): selftest::run_tests.
9382 * selftest.h: Update declarations.
9383 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9384 selftests::register_test_foreach_arch.
9385 * selftest-arch.h: Update declaration.
9386 * aarch64-tdep.c: Update.
9387 * arm-tdep.c: Likewise.
9388 * disasm-selftests.c: Likewise.
9389 * dwarf2loc.c: Likewise.
9390 * dwarf2-frame.c: Likewise.
9391 * findvar.c: Likewise.
9392 * gdbarch-selftests.c: Likewise.
9393 * maint.c (maintenance_selftest): Likewise.
9394 * regcache.c: Likewise.
9395 * rust-exp.y: Likewise.
9396 * selftest-arch.c: Likewise.
9397 * unittests/environ-selftests.c: Likewise.
9398 * unittests/function-view-selftests.c: Likewise.
9399 * unittests/offset-type-selftests.c: Likewise.
9400 * unittests/optional-selftests.c: Likewise.
9401 * unittests/scoped_restore-selftests.c: Likewise.
9402 * utils-selftests.c: Likewise.
9406 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9411 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9413 (reset_die_in_process): Delete, replaced by ...
9414 (process_die_scope): ... this new class. Make it responsible for
9415 freeing cu->line_header too.
9416 (process_die): Use process_die_scope.
9417 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9418 cu->line_header_die_owner. Don't release the line header if it's
9420 (setup_type_unit_groups): Make the CU/DIE own the line header.
9421 Don't release the line header here.
9425 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9429 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9434 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9439 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9443 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9448 * infcmd.c (unset_environment_command): Use the 'clear' method on
9449 the environment instead of resetting it.
9453 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9458 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9459 (print_binary_chars): Likewise.
9460 (BITS_IN_BYTES): Remove.
9465 * valprint.c (LOW_ZERO): Change value to 034.
9466 (print_octal_chars): Add static_asserts for octal constants.
9467 * printcmd.c (print_scalar_formatted): Add 'd' case.
9471 * symfile.c (add_symbol_file_command): Use std::vector.
9475 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9476 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9478 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9482 * infrun.c (process_event_stop_test): Adjust
9483 function_name_is_marked_for_skip call.
9484 * skip.c: Include <list>.
9485 (skiplist_entry): Make it a class with private fields, and
9487 (skiplist_entry_chain): Delete.
9488 (skiplist_entries): New.
9489 (skiplist_entry_count): Delete.
9490 (highest_skiplist_entry_num): New.
9491 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9492 (add_skiplist_entry): Delete.
9493 (skiplist_entry::skiplist_entry): New.
9494 (skiplist_entry::add_entry): New.
9495 (skip_file_command, skip_function): Adjust.
9496 (compile_skip_regexp): Delete.
9497 (skip_command): Don't compile regexp here. Adjust to use
9498 skiplist_entry::add_entry.
9499 (skip_info): Adjust to use range-for and getters.
9500 (skip_enable_command, skip_disable_command): Adjust to use
9501 range-for and setters.
9502 (skip_delete_command): Adjust to use std::list.
9503 (add_skiplist_entry): Delete.
9504 (skip_file_p): Delete, refactored as ...
9505 (skiplist_entry::do_skip_file_p): ... this new method.
9506 (skip_gfile_p): Delete, refactored as ...
9507 (skiplist_entry::do_gskip_file_p): ... this new method.
9508 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9509 (skiplist_entry::skip_function_p): ... this new method.
9510 (function_name_is_marked_for_skip): Now returns bool, and takes
9511 the function sal by const reference. Adjust to use range-for and
9512 skiplist_entry methods.
9513 (_initialize_step_skip): Remove references to
9514 skiplist_entry_chain, skiplist_entry_count.
9515 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9516 takes the function sal by const reference.
9520 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9521 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9522 (dwarf2_frame_cache):
9523 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9524 RETURN_MASK_ALL and set *this_case to NULL.
9525 * frame-unwind.h: Update comments.
9529 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9530 (dwarf2_frame_state_copy_regs): Remove.
9531 (dwarf2_frame_state_free_regs): Remove.
9532 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9533 (dwarf2_restore_rule): Call method .alloc_regs instead of
9534 dwarf2_frame_state_alloc_regs.
9535 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9536 constructor. Call std::move.
9537 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9538 (dwarf2_frame_cache): Likewise.
9540 [GDB_SELF_TEST]: Include selftest.h and
9542 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9543 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9544 execute_cfa_program_test.
9546 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9547 copy ctor, assignment operator, move assignment.
9548 <alloc_regs>: New method.
9550 (struct dwarf2_frame_state): Delete dtor.
9551 (dwarf2_frame_state_alloc_regs): Remove declaration.
9552 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9553 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9557 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9558 (dwarf2_frame_state::dwarf2_frame_state): New.
9559 (dwarf2_frame_state::~dwarf2_frame_state): New.
9560 (dwarf2_fetch_cfa_info): Update.
9561 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9562 rather than a pointer. Update code.
9563 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9565 <data_align, code_align, retaddr_column>: Change them to const.
9566 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9571 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9572 <loc.exp>: New field.
9573 * dwarf2-frame.c (execute_cfa_program): Update.
9574 (dwarf2_frame_prev_register): Update.
9578 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9582 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9583 (fbsd_pending_children): Use std::list.
9584 (fbsd_remember_child): Likewise.
9585 (fbsd_is_child_pending): Likewise.
9586 (fbsd_pending_vfork_done): Use std::forward_list.
9587 (fbsd_add_vfork_done): Likewise.
9588 (fbsd_is_vfork_done_pending): Likewise.
9589 (fbsd_next_vfork_done): Likewise.
9593 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9594 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9595 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9597 (fbsd_xfer_partial): Use gdb::byte_vector.
9598 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9602 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9604 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9608 * skip.c (skiplist_entry): New constructor.
9609 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9610 (skiplist_entry::file_is_glob): Now bool.
9611 (skiplist_entry::file, skiplist_entry::function): Now
9613 (make_skip_entry): Return a unique_ptr. Use new.
9614 (free_skiplist_entry, free_skiplist_entry_cleanup)
9615 (make_free_skiplist_entry_cleanup): Remove.
9616 (skip_command, skip_disable_command, add_skiplist_entry)
9617 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9618 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9619 (function_name_is_marked_for_skip): Update.
9620 (skip_delete_command): Update. Use delete.
9624 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9625 (aarch64_linux_core_read_description): New function.
9626 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9630 * cp-name-parser.y (cp_comp_to_string): Return a
9631 gdb::unique_xmalloc_ptr<char>.
9632 * cp-support.c (replace_typedefs_qualified_name)
9633 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9634 (cp_canonicalize_string_full): Use op= instead of explicit
9636 (cp_class_name_from_physname, method_name_from_physname)
9637 (cp_func_name, cp_remove_params): Adjust to use
9638 gdb::unique_xmalloc_ptr<char>.
9639 * cp-support.h (cp_comp_to_string): Return a
9640 gdb::unique_xmalloc_ptr<char>.
9641 * python/py-type.c (typy_lookup_type): Adjust to use
9642 gdb::unique_xmalloc_ptr<char>.
9646 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9651 * cp-support.c (cp_canonicalize_string_full): Use
9652 gdb::unique_xmalloc_ptr<char>.
9653 (cp_canonicalize_string): Likewise.
9657 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9658 * regformats/i386/amd64-avx-avx512.dat: Remove.
9659 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9660 * regformats/i386/amd64-avx-mpx.dat:Remove.
9661 * regformats/i386/amd64-avx.dat: Remove.
9662 * regformats/i386/amd64-mpx.dat: Remove.
9663 * regformats/i386/i386-avx-avx512.dat: Remove.
9664 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9665 * regformats/i386/i386-avx-mpx.dat: Remove.
9666 * regformats/i386/i386-mmx.dat: Remove.
9667 * regformats/i386/i386-mpx.dat: Remove.
9671 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9672 * amd64-tdep.c: Don't include features/i386/x32*.c.
9673 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9675 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9676 and i386/x32-avx-avx512.
9677 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9679 * features/i386/x32-avx-avx512.c: Removed.
9680 * features/i386/x32-avx-avx512.xml: Removed.
9681 * features/i386/x32-avx.c: Removed.
9682 * features/i386/x32-avx.xml: Removed.
9683 * features/i386/x32.c: Removed.
9684 * features/i386/x32.xml: Removed.
9685 * regformats/i386/x32-avx-avx512.dat: Removed.
9686 * regformats/i386/x32-avx.dat: Removed.
9687 * regformats/i386/x32.dat: Removed.
9691 PR breakpoints/21886
9692 * mem-break.c (default_memory_insert_breakpoint): Use
9693 `->placed_address' rather than `->reqstd_address' for the
9694 breakpoint location.
9698 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9703 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9704 a union of `tdep_info', `tdesc_data' and `id'.
9705 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9706 rather than `info.tdep_info'.
9707 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9708 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9709 * i386-tdep.c (i386_gdbarch_init): Likewise.
9710 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9711 * mips-tdep.c (mips_gdbarch_init): Likewise.
9712 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9713 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9714 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9716 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9718 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9719 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9721 * spu-tdep.c (spu_gdbarch_init): Likewise.
9722 * gdbarch.h: Regenerate.
9727 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9731 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9732 (gdbsim_open): Rename gdb_argv args object to argv.
9736 * compile/compile-object-load.c (compile_object_load): Use
9737 gdb::unique_xmalloc_ptr.
9738 * cli/cli-dump.c (scan_filename): Rename from
9739 scan_filename_with_cleanup. Change return type.
9740 (scan_expression): Rename from scan_expression_with_cleanup.
9742 (dump_memory_to_file, dump_value_to_file, restore_command):
9743 Use gdb::unique_xmalloc_ptr. Update.
9744 * cli/cli-cmds.c (find_and_open_script): Use
9745 gdb::unique_xmalloc_ptr.
9746 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9747 * symmisc.c (maintenance_print_symbols)
9748 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9749 * symfile.c (symfile_bfd_open, generic_load)
9750 (add_symbol_file_command, remove_symbol_file_command): Use
9751 gdb::unique_xmalloc_ptr.
9752 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9753 * psymtab.c (maintenance_print_psymbols): Use
9754 gdb::unique_xmalloc_ptr.
9755 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9756 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9757 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9758 (reload_shared_libraries_1): Likewise.
9762 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9763 (rust_op_vector, rust_set_vector): New typedefs.
9764 (current_parser): New global.
9765 (work_obstack): Change to pointer type. Update all users.
9766 (rust_ast, pstate): Remove globals.
9767 (struct rust_parser): New.
9768 (%union) <params, field_inits>: Change type.
9769 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9770 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9771 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9772 (convert_params_to_types, convert_params_to_expression): Change
9774 (ast_string): Change type of "fields".
9775 (rust_parse): Make a rust_parser. Remove cleanups.
9776 (rust_lex_tests): Make and install an auto_obstack.
9780 * configure.srv (ipa_x32_linux_regobj): New.
9781 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9782 instead of X86_TDESC_AVX512.
9783 (initialize_low_tracepoint): Call
9784 init_registers_x32_avx_avx512_linux.
9788 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9792 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9796 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9798 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9802 * python/py-param.c (compute_enum_values): Use gdb_argv.
9806 * utils.h (struct gdb_argv_deleter): New.
9807 (gdb_argv): New class.
9808 * utils.c (gdb_argv::reset): New method.
9809 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9810 * tracefile.c (tsave_command): Use gdb_argv.
9811 * top.c (new_ui_command): Use gdb_argv.
9812 * symmisc.c (maintenance_print_symbols)
9813 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9814 * symfile.c (symbol_file_command, generic_load)
9815 (remove_symbol_file_command): Use gdb_argv.
9816 * stack.c (backtrace_command): Use gdb_argv.
9817 * source.c (add_path, show_substitute_path_command)
9818 (unset_substitute_path_command, set_substitute_path_command):
9820 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9821 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9822 * remote.c (extended_remote_run, remote_put_command)
9823 (remote_get_command, remote_delete_command): Use gdb_argv.
9824 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9825 (gdbsim_open): Use gdb_argv.
9826 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9827 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9828 * procfs.c (procfs_info_proc): Use gdb_argv.
9829 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9830 * infrun.c (handle_command): Use gdb_argv.
9831 * inferior.c (add_inferior_command, clone_inferior_command):
9833 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9834 * exec.c (exec_file_command): Use gdb_argv.
9835 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9836 * compile/compile.c (build_argc_argv): Use gdb_argv.
9840 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9844 * python/python.c (compute_python_string): Return std::string.
9845 (gdbpy_eval_from_control_command): Update.
9846 (do_start_initialization): Use std::string.
9847 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9849 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9854 * top.h (do_restore_instream_cleanup): Remove.
9855 * top.c (do_restore_instream_cleanup): Remove.
9856 (read_command_file): Use scoped_restore.
9857 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9861 * cli/cli-script.c (execute_user_command)
9862 (execute_control_command): Use scoped_restore.
9866 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9867 (execute_user_command): Remove user_call_depth; use
9868 user_args_stack's size instead.
9872 * top.h (in_user_command): Remove.
9873 * top.c (in_user_command): Remove.
9874 * cli/cli-script.c (do_restore_user_call_depth)
9875 (execute_user_command): Update.
9879 * valops.c (search_struct_method): Use gdb::byte_vector.
9880 * valarith.c (value_concat): Use std::vector.
9881 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9882 (simple_search_memory): Likewise.
9883 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9884 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9885 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9886 * elfread.c (elf_rel_plt_read): Use std::string.
9887 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9888 * cli/cli-dump.c (restore_section_callback): Use
9893 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9897 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9898 (tui_register_format): Use scoped_restore.
9902 * reverse.c (exec_direction_default): Remove.
9903 (exec_reverse_once): Use scoped_restore.
9904 * remote.c (restore_remote_timeout): Remove.
9905 (remote_flash_erase, remote_flash_write, remote_flash_done)
9906 (readchar, remote_serial_write): Use scoped_restore.
9907 * cli/cli-script.c (struct source_cleanup_lines_args)
9908 (source_cleanup_lines): Remove.
9909 (script_from_file): Use scoped_restore.
9910 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9911 (source_command): Use scoped_restore.
9915 * utils.h (make_cleanup_free_so): Remove.
9916 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9917 * solist.h (struct so_deleter): New.
9918 (so_list_up): New typedef.
9919 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9923 * utils.h (make_cleanup_restore_current_language): Remove.
9924 * utils.c (do_restore_current_language)
9925 (make_cleanup_restore_current_language): Remove.
9926 * parse.c (parse_exp_in_context_1)
9927 (parse_expression_with_language): Use
9928 scoped_restore_current_language.
9929 * mi/mi-main.c (mi_cmd_execute): Use
9930 scoped_restore_current_language.
9931 * language.h (scoped_restore_current_language): New class.
9935 * compile/compile.c (cleanup_unlink_file): Remove.
9936 (compile_to_object): Use gdb::unlinker.
9937 (eval_compile_command): Likewise.
9941 * utils.h (make_cleanup_fclose): Remove.
9942 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9946 * top.c (open_terminal_stream): Return gdb_file_up.
9947 (new_ui_command): Update.
9951 * source.c (print_source_lines_base, forward_search_command)
9952 (reverse_search_command): Use gdb_file_up.
9956 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9960 * cli/cli-cmds.c (find_and_open_script): Change return type.
9961 Remove "streamp" and "full_path" parameters.
9962 (source_script_with_search): Update.
9963 * auto-load.c (source_script_file): Update.
9964 * cli/cli-cmds.h (find_and_open_script): Change type.
9965 (open_script): New struct.
9969 * xml-support.c (xml_fetch_content_from_file): Update.
9970 * ui-file.c (stdio_file::open): Update.
9971 * tracefile-tfile.c (tfile_start): Update.
9972 * remote.c (remote_file_put, remote_file_get): Update.
9973 * nat/linux-procfs.c (linux_proc_get_int)
9974 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9975 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9976 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9977 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9978 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9979 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9980 * linux-nat.c (linux_proc_pending_signals): Update.
9981 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9982 (file_closer): Remove.
9983 * compile/compile.c (compile_to_object): Update.
9984 * common/filestuff.h (struct gdb_file_deleter): New.
9985 (gdb_file_up): New typedef.
9986 (gdb_fopen_cloexec): Change return type.
9987 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9988 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9989 (dump_binary_file, restore_binary_file): Update.
9990 * auto-load.c (auto_load_objfile_script_1): Update.
9994 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9995 (info_static_tracepoint_markers_command): Likewise.
9996 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9997 * skip.c (skip_info): Use ui_out_emit_table.
9998 * progspace.c (print_program_space): Use ui_out_emit_table.
9999 * osdata.c (info_osdata): Use ui_out_emit_table.
10000 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
10002 * linux-thread-db.c (info_auto_load_libthread_db): Use
10004 * inferior.c (print_inferior): Use ui_out_emit_table.
10005 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
10006 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
10007 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
10008 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
10009 * ui-out.h (class ui_out_emit_table): New.
10013 * mips-tdep.c (mips_fpu_type_str): New function.
10014 (mips_dump_tdep): Call it.
10018 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
10023 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
10027 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
10031 * cli/cli-cmds.c (maintenancechecklist): New variable.
10032 * gdbcmd.h (maintenancechecklist): Declare it.
10033 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
10034 Call i386_linux_read_description with different masks.
10035 * maint.c (maintenance_check_command): New function.
10036 (_initialize_maint_cmds): Call add_prefix_cmd.
10037 * target-descriptions.c (tdesc_reg): override operator != and ==.
10038 (tdesc_type): Likewise.
10039 (tdesc_feature): Likewise.
10040 (target_desc): Likewise.
10041 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
10042 (maintenance_check_xml_descriptions): New function.
10043 (_initialize_target_descriptions) Add command "xml-descriptions".
10044 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
10048 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
10049 Include features/i386/32bit-*.c.
10050 (i386_linux_read_description): Generate target description if it
10052 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10054 * features/i386/32bit-linux.c: Re-generated.
10055 * features/i386/32bit-sse.c: Likewise.
10056 * target-descriptions.c (print_c_feature::visit): Print code to
10057 set register number if needed.
10058 (print_c_feature) <m_next_regnum>: New field.
10062 * features/Makefile (CFILES): Rename with TDESC_CFILES.
10063 (FEATURE_XMLFILES): New.
10064 (FEATURE_CFILES): New.
10066 (clean-cfiles): Remove generated c files.
10067 * features/i386/32bit-avx.c: Generated.
10068 * features/i386/32bit-avx512.c: Generated.
10069 * features/i386/32bit-core.c: Generated.
10070 * features/i386/32bit-linux.c: Generated.
10071 * features/i386/32bit-mpx.c: Generated.
10072 * features/i386/32bit-pkeys.c: Generated.
10073 * features/i386/32bit-sse.c: Generated.
10074 * target-descriptions.c: Include algorithm.
10075 (tdesc_element_visitor): Add method visit_end.
10076 (print_c_tdesc): Implement visit_end.
10077 (print_c_tdesc:: m_filename_after_features): Move it to
10079 (print_c_feature): New class.
10080 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10081 name starts with "i386/32bit-".
10085 * target-descriptions.c (tdesc_element_visitor): New class.
10086 (tdesc_element): New class.
10087 (tdesc_reg): Inherit from tdesc_element.
10088 (tdesc_reg::accept): New function.
10089 (tdesc_type): Inherit from tdesc_element.
10090 (tdesc_type::accept): New function.
10091 (tdesc_feature): Inherit from tdesc_element.
10092 (tdesc_feature::accept): New function.
10093 (target_desc): Inherit from tdesc_element.
10094 (target_desc::target_desc): New.
10095 (target_desc::~target_desc): New.
10096 (target_desc::accept): New.
10097 (allocate_target_description): Use new.
10098 (free_target_description): Use delete.
10099 (print_c_tdesc): New class.
10100 (maint_print_c_tdesc_cmd): Adjust.
10102 * features/aarch64.c: Re-generated.
10103 * features/arc-arcompact.c: Re-generated.
10104 * features/arc-v2.c: Re-generated.
10105 * features/arm/arm-with-iwmmxt.c: Re-generated.
10106 * features/arm/arm-with-m.c: Re-generated.
10107 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10108 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10109 * features/arm/arm-with-neon.c: Re-generated.
10110 * features/arm/arm-with-vfpv2.c: Re-generated.
10111 * features/arm/arm-with-vfpv3.c: Re-generated.
10112 * features/i386/amd64-avx-avx512.c: Re-generated.
10113 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10114 * features/i386/amd64-avx.c: Re-generated.
10115 * features/i386/amd64-avx-linux.c: Re-generated.
10116 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10117 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10118 * features/i386/amd64-avx-mpx.c: Re-generated.
10119 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10120 * features/i386/amd64.c: Re-generated.
10121 * features/i386/amd64-linux.c: Re-generated.
10122 * features/i386/amd64-mpx.c: Re-generated.
10123 * features/i386/amd64-mpx-linux.c: Re-generated.
10124 * features/i386/i386-avx-avx512.c: Re-generated.
10125 * features/i386/i386-avx-avx512-linux.c: Re-generated.
10126 * features/i386/i386-avx.c: Re-generated.
10127 * features/i386/i386-avx-linux.c: Re-generated.
10128 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10129 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10130 * features/i386/i386-avx-mpx.c: Re-generated.
10131 * features/i386/i386-avx-mpx-linux.c: Re-generated.
10132 * features/i386/i386.c: Re-generated.
10133 * features/i386/i386-linux.c: Re-generated.
10134 * features/i386/i386-mmx.c: Re-generated.
10135 * features/i386/i386-mmx-linux.c: Re-generated.
10136 * features/i386/i386-mpx.c: Re-generated.
10137 * features/i386/i386-mpx-linux.c: Re-generated.
10138 * features/i386/x32-avx-avx512.c: Re-generated.
10139 * features/i386/x32-avx-avx512-linux.c: Re-generated.
10140 * features/i386/x32-avx.c: Re-generated.
10141 * features/i386/x32-avx-linux.c: Re-generated.
10142 * features/i386/x32.c: Re-generated.
10143 * features/i386/x32-linux.c: Re-generated.
10144 * features/microblaze.c: Re-generated.
10145 * features/microblaze-with-stack-protect.c: Re-generated.
10146 * features/mips64-dsp-linux.c: Re-generated.
10147 * features/mips64-linux.c: Re-generated.
10148 * features/mips-dsp-linux.c: Re-generated.
10149 * features/mips-linux.c: Re-generated.
10150 * features/nds32.c: Re-generated.
10151 * features/nios2.c: Re-generated.
10152 * features/nios2-linux.c: Re-generated.
10153 * features/rs6000/powerpc-32.c: Re-generated.
10154 * features/rs6000/powerpc-32l.c: Re-generated.
10155 * features/rs6000/powerpc-403.c: Re-generated.
10156 * features/rs6000/powerpc-403gc.c : Re-generated.
10157 * features/rs6000/powerpc-405.c: Re-generated.
10158 * features/rs6000/powerpc-505.c: Re-generated.
10159 * features/rs6000/powerpc-601.c: Re-generated.
10160 * features/rs6000/powerpc-602.c: Re-generated.
10161 * features/rs6000/powerpc-603.c: Re-generated.
10162 * features/rs6000/powerpc-604.c: Re-generated.
10163 * features/rs6000/powerpc-64.c: Re-generated.
10164 * features/rs6000/powerpc-64l.c: Re-generated.
10165 * features/rs6000/powerpc-7400.c: Re-generated.
10166 * features/rs6000/powerpc-750.c: Re-generated.
10167 * features/rs6000/powerpc-860.c: Re-generated.
10168 * features/rs6000/powerpc-altivec32.c: Re-generated.
10169 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10170 * features/rs6000/powerpc-altivec64.c: Re-generated.
10171 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10172 * features/rs6000/powerpc-cell32l.c: Re-generated.
10173 * features/rs6000/powerpc-cell64l.c: Re-generated.
10174 * features/rs6000/powerpc-e500.c: Re-generated.
10175 * features/rs6000/powerpc-e500l.c: Re-generated.
10176 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10177 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10178 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10179 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10180 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10181 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10182 * features/rs6000/powerpc-vsx32.c: Re-generated.
10183 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10184 * features/rs6000/powerpc-vsx64.c: Re-generated.
10185 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10186 * features/rs6000/rs6000.c: Re-generated.
10187 * features/s390-linux32.c: Re-generated.
10188 * features/s390-linux32v1.c: Re-generated.
10189 * features/s390-linux32v2.c: Re-generated.
10190 * features/s390-linux64.c: Re-generated.
10191 * features/s390-linux64v1.c: Re-generated.
10192 * features/s390-linux64v2.c: Re-generated.
10193 * features/s390-te-linux64.c: Re-generated.
10194 * features/s390-tevx-linux64.c: Re-generated.
10195 * features/s390-vx-linux64.c: Re-generated.
10196 * features/s390x-linux64.c: Re-generated.
10197 * features/s390x-linux64v1.c: Re-generated.
10198 * features/s390x-linux64v2.c: Re-generated.
10199 * features/s390x-te-linux64.c: Re-generated.
10200 * features/s390x-tevx-linux64.c: Re-generated.
10201 * features/s390x-vx-linux64.c: Re-generated.
10202 * features/sparc/sparc32-solaris.c: Re-generated.
10203 * features/sparc/sparc64-solaris.c: Re-generated.
10204 * features/tic6x-c62x.c: Re-generated.
10205 * features/tic6x-c62x-linux.c: Re-generated.
10206 * features/tic6x-c64x.c: Re-generated.
10207 * features/tic6x-c64x-linux.c: Re-generated.
10208 * features/tic6x-c64xp.c: Re-generated.
10209 * features/tic6x-c64xp-linux.c: Re-generated.
10213 * i386-linux-tdep.c (i386_linux_read_description): New function.
10214 (i386_linux_core_read_description): Call
10215 i386_linux_read_description.
10216 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10217 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10218 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10219 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10220 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10221 * x86-linux-nat.c (x86_linux_read_description): Call
10222 i386_linux_read_description.
10226 * NEWS: Mention it.
10227 * features/Makefile (%.c: %.xml): Pass the xml file name to
10228 command "maint print c-tdesc".
10229 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10234 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10235 in-class initialization.
10236 (tdesc_create_feature): Call new instead of XCNEW.
10237 (free_target_description): Ue delete.
10241 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10245 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10247 (amd64_x32_init_abi): Likewise.
10248 * amd64-tdep.h (amd64_init_abi): Update declaration.
10249 (amd64_x32_init_abi): Likewise.
10254 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10255 condition for FPSCR.
10256 (arm_linux_store_inferior_registers): Likewise.
10260 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10261 <syscalls_counts>: Now a std::vector.
10262 (get_catch_syscall_inferior_data): Use "new".
10263 (catch_syscall_inferior_data_cleanup): Use "delete".
10264 (insert_catch_syscall, remove_catch_syscall)
10265 (clear_syscall_counts): Update.
10269 * break-catch-syscall.c (syscall_catchpoint)
10270 <syscalls_to_be_caught>: Now a std::vector<int>
10271 (~syscall_catchpoint): Remove.
10272 (insert_catch_syscall, remove_catch_syscall)
10273 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10274 (print_mention_catch_syscall, print_recreate_catch_syscall):
10276 (create_syscall_event_catchpoint): Change type of "filter"
10278 (catch_syscall_split_args): Return a std::vector.
10279 (catch_syscall_command_1, catching_syscall_number_1): Update.
10283 * break-catch-throw.c (struct exception_catchpoint)
10284 <exception_rx>: Now a std::string.
10285 (~exception_catchpoint): Remove.
10286 (print_one_detail_exception_catchpoint): Update.
10287 (handle_gnu_v3_exceptions): Change type of except_rx.
10288 (extract_exception_regexp): Return a std::string.
10289 (catch_exception_command_1): Update.
10293 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10294 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10296 <catch_all>: Now a bool.
10297 (~signal_catchpoint): Remove.
10298 (signal_catchpoint_insert_location)
10299 (signal_catchpoint_remove_location)
10300 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10301 (signal_catchpoint_print_mention)
10302 (signal_catchpoint_print_recreate)
10303 (signal_catchpoint_explains_signal): Update.
10304 (create_signal_catchpoint): Change type of "filter" and
10306 (catch_signal_split_args): Return a std::vector. Change type of
10308 (catch_signal_command): Update.
10312 * ada-lang.c (ada_language_defn): Make extern.
10313 (_initialize_ada_language): Remove add_language call.
10314 * c-lang.c (c_language_defn, cplus_language_defn)
10315 (asm_language_defn, minimal_language_defn): Make extern.
10316 (_initialize_c_language): Delete.
10317 * completer.c (compare_cstrings): Delete, moved to utils.h.
10318 * d-lang.c (d_language_defn): Make extern.
10319 (_initialize_d_language): Remove add_language calls.
10320 * defs.h (enum language): Add comment.
10321 * f-lang.c (f_language_defn): Make extern.
10322 (_initialize_f_language): Remove add_language call.
10323 * go-lang.c (go_language_defn): Make extern.
10324 (_initialize_go_language): Remove add_language call.
10325 * language.c: Include <algorithm>.
10326 (languages): Redefine as const array.
10327 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10328 (set_language_command): Handle "local". Use for-range loop.
10329 (set_language): Remove loop.
10330 (language_enum): Rewrite.
10331 (language_def, language_str): Remove loops.
10332 (add_language): Delete.
10333 (add_set_language_command): New, based on add_languages.
10334 (skip_language_trampoline): Adjust.
10335 (local_language_defn): Delete.
10336 (language_gdbarch_post_init): Adjust.
10337 (_initialize_language): Remove add_language calls. Call
10338 add_set_language_command.
10339 * language.h (add_language): Delete.
10340 (auto_language_defn)
10341 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10342 (asm_language_defn, c_language_defn, cplus_language_defn)
10343 (d_language_defn, f_language_defn, go_language_defn)
10344 (m2_language_defn, objc_language_defn, opencl_language_defn)
10345 (pascal_language_defn, rust_language_defn): Declare.
10346 * m2-lang.c (m2_language_defn): Make extern.
10347 (_initialize_m2_language): Remove add_language call.
10348 * objc-lang.c (objc_language_defn): Make extern.
10349 (_initialize_objc_language): Remove add_language call.
10350 * opencl-lang.c (opencl_language_defn): Make extern.
10351 (_initialize_opencl_language): Remove add_language call.
10352 * p-lang.c (pascal_language_defn): Make extern.
10353 (_initialize_pascal_language): Delete.
10354 * rust-lang.c (rust_language_defn): Make extern.
10355 (_initialize_rust_language): Delete.
10356 * utils.h (compare_cstrings): New static inline function.
10360 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10361 (get_var_value): Constify parameters.
10362 (get_int_var_value): Change prototype.
10363 (to_fixed_range_type): Adjust.
10364 * ada-lang.h (get_int_var_value): Change prototype.
10368 * dwarf2read.c (dw2_lookup_symbol): Use
10369 SYMBOL_MATCHES_SEARCH_NAME.
10370 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10374 * block.c (block_iter_name_step, block_iter_name_first)
10375 (block_iter_name_next): Delete.
10376 (block_lookup_symbol_primary): Adjust to use
10377 dict_iter_match_first/dict_iter_match_next.
10378 * block.h (block_iter_name_first, block_iter_name_next): Delete
10380 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10381 dict_iter_match_first/dict_iter_match_next.
10385 * cp-support.c (cp_find_first_component_aux): Add missing case for
10390 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10391 of dwo_cu's dwo_file.
10395 * remote.c (store_registers_using_G): Remove one line comment.
10399 * regcache.c (regcache_cpy): Simplify it.
10400 (regcache::cpy_no_passthrough): Remove it.
10401 * regcache.h (cpy_no_passthrough): Remove it.
10402 (regcache_dup, regcache_cpy): Update comments.
10406 * remote-sim.c (sim_command_completer): Adjust to work with a
10407 completion_tracker instead of a VEC.
10411 * completer.c (complete_source_filenames): New function.
10412 (complete_address_and_linespec_locations): New function.
10413 (location_completer): Use complete_address_and_linespec_locations.
10414 (completion_tracker::build_completion_result): Honor the tracker's
10415 request to suppress append.
10416 * completer.h (completion_tracker::suppress_append_ws)
10417 (completion_tracker::set_suppress_append_ws): New methods.
10418 (completion_tracker::m_suppress_append_ws): New field.
10419 (complete_source_filenames): New declaration.
10420 * linespec.c (linespec_complete_what): New.
10421 (struct ls_parser) <complete_what, completion_word,
10422 completion_quote_char, completion_quote_end, completion_tracker>:
10424 (string_find_incomplete_keyword_at_end): New.
10425 (linespec_lexer_lex_string): Record quote char. If in completion
10427 (linespec_lexer_consume_token): Advance the completion word point.
10428 (linespec_lexer_peek_token): Save/restore completion info.
10429 (save_stream_and_consume_token): New.
10430 (set_completion_after_number): New.
10431 (linespec_parse_basic): Set what to complete next depending on
10432 token. Handle function and label completions specially.
10433 (parse_linespec): Disable objc shortcut in completion mode. Set
10434 what to complete next depending on token type. Skip keyword if in
10436 (complete_linespec_component, linespec_complete): New.
10437 * linespec.h (linespec_complete): Declare.
10441 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10442 Handle 'operator<' / 'operator<<'.
10446 * completer.c (collect_explicit_location_matches): Handle
10448 (convert_explicit_location_to_linespec): New, factored out from
10450 (convert_explicit_location_to_sals): ... this.
10451 (complete_label): New.
10452 (linespec_complete_label, find_label_symbols_in_block): New.
10453 (find_label_symbols): Add completion_mode parameter and adjust to
10454 call find_label_symbols_in_block.
10455 * linespec.h (linespec_complete_label): Declare.
10459 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10460 complete_symbol_mode parameter.
10461 * cli/cli-cmds.c (complete_command): Get the completion result out
10462 of the handle_brkchars tracker if used a custom word point.
10463 * completer.c: Include "linespec.h".
10464 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10465 (advance_to_expression_complete_word_point): New.
10466 (completion_tracker::completes_to_completion_word): New.
10467 (complete_files_symbols): Pass down
10468 complete_symbol_mode::EXPRESSION.
10469 (explicit_options, probe_options): New.
10470 (collect_explicit_location_matches): Complete on the
10471 explictit_loc->foo instead of word. Use
10472 linespec_complete_function. Handle MATCH_LINE. Handle offering
10473 keyword and options completions.
10474 (backup_text_ptr): Delete.
10475 (skip_keyword): New.
10476 (complete_explicit_location): Remove 'word' parameter. Add
10477 language, quoted_arg_start and quoted_arg_end parameters.
10478 Rewrite, parsing left to right.
10479 (location_completer): Rewrite.
10480 (location_completer_handle_brkchars): New function.
10481 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10482 (enum complete_line_internal_reason): Adjust comments.
10483 (completion_tracker::discard_completions): New.
10484 (completer_handle_brkchars_func_for_completer): Handle
10485 location_completer.
10486 (gdb_custom_word_point_brkchars)
10487 (gdb_org_rl_basic_quote_characters): New.
10488 (gdb_completion_word_break_characters_throw)
10489 (completion_find_completion_word): Handle trackers that use a
10491 (completion_tracker::advance_custom_word_point_by): New.
10492 (completion_tracker::build_completion_result): Don't rely on
10493 readline appending the quote char.
10494 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10495 use a custom word point.
10496 (gdb_rl_attempted_completion_function): Restore
10497 rl_basic_quote_characters.
10498 * completer.h (class completion_tracker): Extend intro comment.
10499 (completion_tracker::set_quote_char)
10500 (completion_tracker::quote_char)
10501 (completion_tracker::set_use_custom_word_point)
10502 (completion_tracker::use_custom_word_point)
10503 (completion_tracker::custom_word_point)
10504 (completion_tracker::set_custom_word_point)
10505 (completion_tracker::advance_custom_word_point_by)
10506 (completion_tracker::completes_to_completion_word)
10507 (completion_tracker::discard_completions): New methods.
10508 (completion_tracker::m_quote_char)
10509 (completion_tracker::m_use_custom_word_point)
10510 (completion_tracker::m_custom_word_point): New fields.
10511 (advance_to_expression_complete_word_point): Declare.
10512 * f-lang.c (f_collect_symbol_completion_matches): Add
10513 complete_symbol_mode parameter.
10514 * language.h (struct language_defn)
10515 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10517 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10518 (linespec_complete_function): New function.
10519 (linespec_lexer_lex_keyword): Adjust.
10520 * linespec.h (linespec_keywords, linespec_complete_function): New
10522 * location.c (find_end_quote): New function.
10523 (explicit_location_lex_one): Add explicit_completion_info
10524 parameter. Save quoting info. Don't throw if being called for
10525 completion. Don't handle Ada operators here.
10526 (is_cp_operator, skip_op_false_positives, first_of)
10527 (explicit_location_lex_one_function): New function.
10528 (string_to_explicit_location): Replace 'dont_throw' parameter with
10529 an explicit_completion_info pointer parameter. Handle it. Don't
10530 use explicit_location_lex_one to lex function names. Use
10531 explicit_location_lex_one_function instead.
10532 * location.h (struct explicit_completion_info): New.
10533 (string_to_explicit_location): Replace 'dont_throw' parameter with
10534 an explicit_completion_info pointer parameter.
10535 * symtab.c (default_collect_symbol_completion_matches_break_on):
10536 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10537 (default_collect_symbol_completion_matches)
10538 (collect_symbol_completion_matches): Add complete_symbol_mode
10540 (collect_symbol_completion_matches_type): Pass down
10541 complete_symbol_mode::EXPRESSION.
10542 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10543 parameter. Handle LINESPEC mode.
10544 * symtab.h (complete_symbol_mode): New.
10545 (default_collect_symbol_completion_matches_break_on)
10546 (default_collect_symbol_completion_matches)
10547 (collect_symbol_completion_matches)
10548 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10553 * utils.c (enum class strncmp_iw_mode): New.
10554 (strcmp_iw): Rename to ...
10555 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10556 parameters. Handle them.
10558 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10559 * utils.h (strncmp_iw): Declare.
10560 (strcmp_iw): Move describing comments here.
10564 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10566 * c-typeprint.c (is_type_conversion_operator): Use
10568 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10569 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10571 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10572 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10573 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10574 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10576 * location.c: Include "cp-support.h".
10577 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10579 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10584 * cli/cli-cmds.c (complete_command): Use a completion tracker
10585 along with completion_find_completion_word for handle_brkchars
10587 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10588 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10589 (struct gdb_rl_completion_word_info): New.
10590 (gdb_rl_find_completion_word): New.
10591 (completion_find_completion_word): New.
10592 * completer.h (completion_find_completion_word): Declare.
10596 * ada-lang.c (symbol_completion_match): Adjust comments.
10597 (symbol_completion_add): Replace vector parameter with
10598 completion_tracker parameter. Use it.
10599 (ada_make_symbol_completion_list): Rename to...
10600 (ada_collect_symbol_completion_matches): ... this. Add
10601 completion_tracker parameter and use it.
10602 (ada_language_defn): Adjust.
10603 * break-catch-syscall.c (catch_syscall_completer): Adjust
10604 prototype and work with completion_tracker instead of VEC.
10605 * breakpoint.c (condition_completer): Adjust prototype and work
10606 with completion_tracker instead of VEC.
10607 * c-lang.c (c_language_defn, cplus_language_defn)
10608 (asm_language_defn, minimal_language_defn): Adjust to renames.
10609 * cli/cli-cmds.c (complete_command): Rework using
10610 completion_tracker. Catch exceptions when completing.
10611 * cli/cli-decode.c (integer_unlimited_completer)
10612 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10613 with completion_tracker instead of VEC.
10614 * command.h (struct completion_tracker): Forward declare.
10615 (completer_ftype, completer_handle_brkchars_ftype): Change
10617 (complete_on_cmdlist, complete_on_enum): Adjust.
10618 * completer.c: Include <algorithm>.
10619 (struct gdb_completer_state): New.
10620 (current_completion): New global.
10621 (readline_line_completion_function): Delete.
10622 (noop_completer, filename_completer)
10623 (filename_completer_handle_brkchars, complete_files_symbols)
10624 (linespec_location_completer): Adjust to work with a
10625 completion_tracker instead of a VEC.
10626 (string_or_empty): New.
10627 (collect_explicit_location_matches): Adjust to work with a
10628 completion_tracker instead of a VEC.
10629 (explicit_location_completer): Rename to ...
10630 (complete_explicit_location): ... this and adjust to work with a
10631 completion_tracker instead of a VEC.
10632 (location_completer): Adjust to work with a completion_tracker
10634 (add_struct_fields): Adjust to work with a completion_list instead
10636 (expression_completer): Rename to ...
10637 (complete_expression): ... this and adjust to work with a
10638 completion_tracker instead of a VEC. Use complete_files_symbols.
10639 (expression_completer): Reimplement on top of complete_expression.
10640 (symbol_completer): Adjust to work with a completion_tracker
10642 (enum complete_line_internal_reason): Add describing comments.
10643 (complete_line_internal_normal_command): Adjust to work with a
10644 completion_tracker instead of a VEC.
10645 (complete_line_internal): Rename to ...
10646 (complete_line_internal_1): ... this and adjust to work with a
10647 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10648 handle_brkchars phase.
10649 (new_completion_tracker): Delete.
10650 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10651 complete_line_internal_1.
10652 (free_completion_tracker): Delete.
10653 (INITIAL_COMPLETION_HTAB_SIZE): New.
10654 (completion_tracker::completion_tracker)
10655 (completion_tracker::~completion_tracker): New.
10656 (maybe_add_completion): Delete.
10657 (completion_tracker::maybe_add_completion)
10658 (completion_tracker::add_completion)
10659 (completion_tracker::add_completions): New.
10660 (throw_max_completions_reached_error): Delete.
10661 (complete_line): Adjust to work with a completion_tracker instead
10662 of a VEC. Don't create a completion_tracker_t or check for max
10664 (command_completer, command_completer_handle_brkchars)
10665 (signal_completer, reg_or_group_completer_1)
10666 (reg_or_group_completer, default_completer_handle_brkchars):
10667 Adjust to work with a completion_tracker.
10668 (gdb_completion_word_break_characters_throw): New.
10669 (gdb_completion_word_break_characters): Reimplement.
10670 (line_completion_function): Delete.
10671 (completion_tracker::recompute_lowest_common_denominator)
10672 (expand_preserving_ws)
10673 (completion_tracker::build_completion_result)
10674 (completion_result::completion_result)
10675 (completion_result::completion_result)
10676 (completion_result::~completion_result)
10677 (completion_result::completion_result)
10678 (completion_result::release_match_list, compare_cstrings)
10679 (completion_result::sort_match_list)
10680 (completion_result::reset_match_list)
10681 (gdb_rl_attempted_completion_function_throw)
10682 (gdb_rl_attempted_completion_function): New.
10683 * completer.h (completion_list, struct completion_result)
10684 (class completion_tracker): New.
10685 (complete_line): Add completion_tracker parameter.
10686 (readline_line_completion_function): Delete.
10687 (gdb_rl_attempted_completion_function): New.
10688 (noop_completer, filename_completer, expression_completer)
10689 (location_completer, symbol_completer, command_completer)
10690 (signal_completer, reg_or_group_completer): Update prototypes.
10691 (completion_tracker_t, new_completion_tracker)
10692 (make_cleanup_free_completion_tracker): Delete.
10693 (enum maybe_add_completion_enum): Delete.
10694 (maybe_add_completion): Delete.
10695 (throw_max_completions_reached_error): Delete.
10696 * corefile.c (complete_set_gnutarget): Adjust to work with a
10697 completion_tracker instead of a VEC.
10698 * cp-abi.c (cp_abi_completer): Adjust to work with a
10699 completion_tracker instead of a VEC.
10700 * d-lang.c (d_language_defn): Adjust.
10701 * disasm.c (disassembler_options_completer): Adjust to work with a
10702 completion_tracker instead of a VEC.
10703 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10704 (f_collect_symbol_completion_matches): ... this. Adjust to work
10705 with a completion_tracker instead of a VEC.
10706 (f_language_defn): Adjust.
10707 * go-lang.c (go_language_defn): Adjust.
10708 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10709 Adjust to work with a completion_tracker instead of a VEC.
10710 * infrun.c (handle_completer): Likewise.
10711 * interps.c (interpreter_completer): Likewise.
10712 * interps.h (interpreter_completer): Likewise.
10713 * language.c (unknown_language_defn, auto_language_defn)
10714 (local_language_defn): Adjust.
10715 * language.h (language_defn::la_make_symbol_completion_list):
10717 (language_defn::la_collect_symbol_completion_matches): ... this
10718 and adjust to work with a completion_tracker instead of a VEC.
10719 * m2-lang.c (m2_language_defn): Adjust.
10720 * objc-lang.c (objc_language_defn): Adjust.
10721 * opencl-lang.c (opencl_language_defn): Adjust.
10722 * p-lang.c (pascal_language_defn): Adjust.
10723 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10724 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10725 with a completion_tracker.
10726 * rust-lang.c (rust_language_defn): Adjust.
10727 * symtab.c (free_completion_list, do_free_completion_list)
10728 (return_val, completion_tracker): Delete.
10729 (completion_list_add_name, completion_list_add_symbol)
10730 (completion_list_add_msymbol, completion_list_objc_symbol)
10731 (completion_list_add_fields, add_symtab_completions): Add
10732 completion_tracker parameter and use it.
10733 (default_make_symbol_completion_list_break_on_1): Rename to...
10734 (default_collect_symbol_completion_matches_break_on): ... this.
10735 Add completion_tracker parameter and use it instead of allocating
10736 a completion tracker here.
10737 (default_make_symbol_completion_list_break_on): Delete old
10739 (default_make_symbol_completion_list): Delete.
10740 (default_collect_symbol_completion_matches): New.
10741 (make_symbol_completion_list): Delete.
10742 (collect_symbol_completion_matches): New.
10743 (make_symbol_completion_type): Rename to ...
10744 (collect_symbol_completion_matches_type): ... this. Add
10745 completion_tracker parameter and use it instead of VEC.
10746 (make_file_symbol_completion_list_1): Rename to...
10747 (collect_file_symbol_completion_matches): ... this. Add
10748 completion_tracker parameter and use it instead of VEC.
10749 (make_file_symbol_completion_list): Delete.
10750 (add_filename_to_list): Use completion_list instead of a VEC.
10751 (add_partial_filename_data::list): Now a completion_list.
10752 (make_source_files_completion_list): Work with a completion_list
10754 * symtab.h: Include "completer.h".
10755 (default_make_symbol_completion_list_break_on)
10756 (default_make_symbol_completion_list, make_symbol_completion_list)
10757 (make_symbol_completion_type, make_file_symbol_completion_list)
10758 (make_source_files_completion_list): Delete.
10759 (default_collect_symbol_completion_matches_break_on)
10760 (default_collect_symbol_completion_matches)
10761 (collect_symbol_completion_matches)
10762 (collect_symbol_completion_matches_type)
10763 (collect_file_symbol_completion_matches)
10764 (make_source_files_completion_list): New.
10765 * top.c (init_main): Don't install a rl_completion_entry_function
10766 hook. Install a rl_attempted_completion_function hook instead.
10767 * tui/tui-layout.c (layout_completer): Adjust to work with a
10768 completion_tracker.
10769 * tui/tui-regs.c (tui_reggroup_completer):
10770 * tui/tui-win.c (window_name_completer, focus_completer)
10771 (winheight_completer): Adjust to work with a completion_tracker.
10772 * value.c: Include "completer.h".
10773 (complete_internalvar): Adjust to work with a completion_tracker.
10774 * value.h (complete_internalvar): Likewise.
10778 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10780 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10781 comments to completer_ftype's declaration.
10782 <completer_handle_brkchars>: Change type to
10783 completer_handle_brkchars_ftype.
10784 * command.h (completer_ftype): Add describing comment and give
10785 names to parameters.
10786 (completer_ftype_void): Rename to ...
10787 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10788 (set_cmd_completer_handle_brkchars): Adjust.
10789 * completer.c (filename_completer_handle_brkchars): New function.
10790 (complete_line_internal_normal_command): New function, factored
10792 (complete_line_internal): ... here.
10793 (command_completer_handle_brkchars)
10794 (default_completer_handle_brkchars)
10795 (completer_handle_brkchars_func_for_completer): New functions.
10796 * completer.h (set_gdb_completion_word_break_characters): Delete
10798 (completer_handle_brkchars_func_for_completer): New declaration.
10799 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10800 completer_handle_brkchars_func_for_completer.
10804 * completer.c (symbol_completer): New function, based on
10805 make_symbol_completion_list_fn.
10806 * completer.h (symbol_completer): New declaration.
10807 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10808 * python/py-cmd.c (completers): Adjust.
10809 * symtab.c (make_symbol_completion_list_fn): Delete.
10810 * symtab.h (make_symbol_completion_list_fn): Delete.
10811 * cli/cli-decode.c (add_cmd): Adjust.
10815 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10816 * dwarf2read.c: Include "filename-seen-cache.h".
10817 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10818 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10819 * filename-seen-cache.c: New file.
10820 * filename-seen-cache.h: New file.
10821 * symtab.c: Include "filename-seen-cache.h".
10822 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10823 (create_filename_seen_cache, clear_filename_seen_cache)
10824 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10825 to filename-seen-cache.h/filename-seen-cache.c.
10826 (output_source_filename, sources_info)
10827 (maybe_add_partial_symtab_filename)
10828 (make_source_files_completion_list): Adjust to use
10829 filename_seen_cache.
10833 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10835 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10836 dwarf2_debug_sections*)): New.
10837 (dwarf2_per_objfile::dwarf2_per_objfile(const
10838 dwarf2_per_objfile&)): Declare as deleted.
10839 (dwarf2_per_objfile::operator=): Declare as deleted.
10840 (dwarf2_per_objfile::dwarf2_per_objfile)
10841 (dwarf2_per_objfile::~dwarf2_per_objfile)
10842 (dwarf2_per_objfile::free_cached_comp_units): New.
10843 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10844 ctor. Call dwarf2_per_objfile's ctor manually.
10845 (dwarf2_locate_sections): Deleted/refactored as ...
10846 (dwarf2_per_objfile::locate_sections): ... this new method.
10847 (free_cached_comp_units): Defer to
10848 dwarf2_per_objfile::free_cached_comp_units.
10849 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10854 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10856 <UNOP_SIZEOF>: Split into separate case.
10857 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10862 * symtab.c (symbol_matches_domain): Add language_rust to special
10864 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10865 treat LOC_TYPEDEF symbols as variables.
10869 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10870 symtabs matching all symtabs with SRCFILE as file name instead of
10871 only considering the first hit, with lookup_symtab.
10875 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10876 operator_name parameters.
10877 (gen_expr): Update function call.
10881 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10883 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10885 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10886 parameter, use agent_expr::gdbarch instead, update function
10888 (locexpr_tracepoint_var_ref): Likewise.
10889 (loclist_tracepoint_var_ref): Likewise.
10890 * ax-gdb.c (gen_trace_static_fields): Likewise.
10891 (gen_traced_pop): Likewise.
10892 (gen_frame_args_address): Likewise.
10893 (gen_frame_locals_address): Likewise.
10894 (gen_var_ref): Likewise.
10895 (gen_struct_ref_recursive): Likewise.
10896 (gen_static_field): Likewise.
10897 (gen_maybe_namespace_elt): Likewise.
10898 (gen_expr): Likewise.
10899 (gen_trace_for_var): Likewise.
10900 (gen_trace_for_expr): Likewise.
10901 (gen_trace_for_return_address): Likewise.
10905 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10907 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10911 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10912 from ax, update calls.
10913 (gen_usual_arithmetic): Likewise.
10914 (gen_integral_promotions): Likewise.
10915 (gen_bitfield_ref): Likewise.
10916 (gen_primitive_field): Likewise.
10917 (gen_struct_ref_recursive): Likewise.
10918 (gen_struct_ref): Likewise.
10919 (gen_maybe_namespace_elt): Likewise.
10920 (gen_struct_elt_for_reference): Likewise.
10921 (gen_namespace_elt): Likewise.
10922 (gen_aggregate_elt_ref): Likewise.
10923 (gen_expr): Get gdbarch from ax, update calls.
10924 (gen_expr_binop_rest): Likewise.
10928 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10930 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10931 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10932 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10933 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10935 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10936 Get final tdesc from the tdep.
10937 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10939 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10940 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10941 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10942 Use it as default tdesc.
10943 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10944 down to amd_init_abi. No longer handle fallback tdesc here.
10945 * amd64-tdep.h (tdesc_x32): Declare.
10946 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10948 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10953 * s390-linux-tdep.c (s390_process_record): Add support for
10954 instructions new in arch12.
10958 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10959 PT_GETFSBASE and PT_GETGSBASE.
10960 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10965 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10966 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10967 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10969 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10970 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10971 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10972 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10973 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10974 * features/i386/amd64.xml: Add 64bit-segments.xml.
10975 * features/i386/amd64-avx-avx512.c: Regenerated.
10976 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10977 * features/i386/amd64-avx-mpx.c: Regenerated.
10978 * features/i386/amd64-avx.c: Regenerated.
10979 * features/i386/amd64-mpx.c: Regenerated.
10980 * features/i386/amd64.c: Regenerated.
10981 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10982 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10983 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10984 * regformats/i386/amd64-avx.dat: Regenerated.
10985 * regformats/i386/amd64-mpx.dat: Regenerated.
10986 * regformats/i386/amd64.dat: Regenerated.
10990 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10991 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10995 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10997 * gnulib/aclocal.m4: Regenerate.
10998 * gnulib/config.in: Regenerate.
10999 * gnulib/configure: Regenerate.
11000 * gnulib/import/Makefile.am: Regenerate.
11001 * gnulib/import/Makefile.in: Regenerate.
11002 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
11003 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
11004 * gnulib/import/m4/environ.m4: New file.
11005 * gnulib/import/m4/setenv.m4: New file.
11006 * gnulib/import/setenv.c: New file.
11007 * gnulib/import/unsetenv.c: New file.
11011 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
11012 address when op is DW_OP_addr.
11016 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
11017 check and apply to outer type.
11021 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
11022 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
11023 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
11024 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
11028 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
11032 * corelow.c (get_core_siginfo): Remove.
11033 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
11034 instead of get_core_siginfo.
11035 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
11036 * gdbarch.h: Re-generate.
11037 * gdbarch.c: Re-generate.
11038 * linux-tdep.c (linux_core_xfer_siginfo): New.
11039 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
11043 * corelow.c (thread_section_name): Move to ...
11044 * gdbcore.h (thread_section_name): ... here.
11048 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
11049 (struct siginfo32): New.
11050 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11051 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11052 via ptrace(PT_LWPINFO).
11056 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11057 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11058 (fbsd_get_siginfo_type): New.
11059 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11060 (_initialize_fbsd_tdep): New.
11064 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11065 a singular dwo_unit*) to support multiple CUs in the same way that
11066 multiple TUs are supported.
11067 (create_cus_hash_table): Replace create_dwo_cu with a function for
11068 parsing multiple CUs from a DWO file.
11069 (open_and_init_dwo_file): Use create_cus_hash_table rather than
11071 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11072 htab_find, rather than comparing the signature to a singleton CU in
11077 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11081 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11082 * gdbtypes.h (TYPE_STATIC): Delete.
11083 (struct fn_field) <is_public, is_abstract, is_static, is_final,
11084 is_synchronized, is_native>: Delete.
11086 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11087 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11088 (TYPE_FN_FIELD_ABSTRACT): Delete.
11092 * buffer.h (buffer_finish): Fix spelling mistakes.
11096 * .dir-locals.el: Automatically switch to C-style comments in
11097 versions of Emacs that support the feature.
11103 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11104 (process_next_line): New variable 'inline_cmd'.
11105 Adjust 'if' clauses for "python", "compile" and "guile" to use
11106 'command_name_equals' and check for '!inline_cmd'.
11111 * cli/cli-script.c (command_name_equals_not_inline): New function.
11112 (process_next_line): Adjust 'if' clauses for "python", "compile"
11113 and "guile" to use command_name_equals_not_inline.
11117 * completer.c (expression_completer): Call
11118 linespec_location_completer instead of location_completer.
11122 * completer.c (expression_completer): Remove code that recomputes
11123 'text' from 'word'.
11127 * regformats/regdat.sh: Generate code with
11128 "ifndef IN_PROCESS_AGENT".
11132 * command.h: Include "common/scoped_restore.h".
11136 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11137 instead of obstack_grow.
11142 * symfile.c (reread_symbols): Call objfiles_changed just before
11147 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11148 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11149 (completion_list_add_symbol, completion_list_add_msymbol):
11150 ... these new functions.
11151 (add_symtab_completions)
11152 (default_make_symbol_completion_list_break_on_1): Adjust.
11156 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11157 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11158 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11160 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11161 'storage_obstack' field an auto_obstack. In-class initialize all
11162 non-bitfield fields. Make minsyms_read bool.
11163 * symfile.c (read_symbols): Adjust.
11167 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11168 (gdbsim_store_register): Likewise.
11172 * c-exp.y (name_obstack): Now an auto_obstack.
11173 (yylex): Use auto_obstack::clear.
11174 (c_parse): Use auto_obstack::clear instead of reinitializing and
11175 freeing the obstack.
11176 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11177 * d-exp.y (name_obstack): Now an auto_obstack.
11178 (yylex): Use auto_obstack::clear.
11179 (d_parse): Use auto_obstack::clear instead of reinitializing and
11180 freeing the obstack.
11181 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11183 * dwarf2read.c (create_addrmap_from_index)
11184 (dwarf2_build_psymtabs_hard)
11185 (update_enumeration_type_from_children): Likewise.
11186 * gdb_obstack.h (auto_obstack): New type.
11187 * go-exp.y (name_obstack): Now an auto_obstack.
11188 (build_packaged_name): Use auto_obstack::clear.
11189 (go_parse): Use auto_obstack::clear instead of reinitializing and
11190 freeing the obstack.
11191 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11193 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11194 * rust-exp.y (work_obstack): Now an auto_obstack.
11195 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11196 reinitializing and freeing the obstack.
11197 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11198 (host_char_to_target): Use auto_obstack.
11199 * utils.h (make_cleanup_obstack_free): Delete declaration.
11200 * valprint.c (generic_emit_char, generic_printstr): Use
11205 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11207 (darwin_init_thread_list): Don't update dummy thread.
11208 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11212 * record-full.c (netorder16): Remove.
11216 * common/diagnostics.h: Define macros for GCC.
11217 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11218 * common/vec.h: Include diagnostics.h.
11219 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11220 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11225 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11227 * ada-lex.l: Ignore deprecated register warnings.
11231 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11232 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11236 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11241 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11245 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11246 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11247 (xtensa_register_read_masked): Likewise.
11251 * common/environ.c (gdb_environ::unset): Update comment.
11255 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11260 * record-full.c (record_full_exec_insn): Use byte_vector.
11264 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11265 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11269 * remote.c (cached_reg): Move from here...
11270 * regcache.h (cached_reg): ...to here.
11271 * python/py-unwind.c (struct reg_info): Remove.
11272 (cached_frame_info): Use cached_reg_t.
11273 (pyuw_prev_register): Likewise.
11274 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11275 (pyuw_dealloc_cache): Free all registers.
11280 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11282 * common/diagnostics.h: New file.
11286 * common/agent.h: Add include guards.
11290 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11291 talk about addressable units instead of bytes.
11295 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11296 of '::const_iterator'.
11300 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11301 'unittests/environ-selftests.c'.
11302 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11303 * charset.c (find_charset_names): Declare object 'iconv_env'.
11304 Update code to use 'iconv_env' object. Remove call to
11306 * common/environ.c: Include <utility>.
11307 (make_environ): Delete function.
11308 (free_environ): Delete function.
11309 (gdb_environ::clear): New function.
11310 (gdb_environ::operator=): New function.
11311 (gdb_environ::get): Likewise.
11312 (environ_vector): Delete function.
11313 (set_in_environ): Delete function.
11314 (gdb_environ::set): New function.
11315 (unset_in_environ): Delete function.
11316 (gdb_environ::unset): New function.
11317 (gdb_environ::envp): Likewise.
11318 * common/environ.h: Include <vector>.
11319 (struct gdb_environ): Delete; transform into...
11320 (class gdb_environ): ... this class.
11321 (free_environ): Delete prototype.
11322 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11323 environ_vector): Likewise.
11324 * infcmd.c (run_command_1): Update code to call
11325 'envp' from 'gdb_environ' class.
11326 (environment_info): Update code to call methods from 'gdb_environ'
11328 (unset_environment_command): Likewise.
11329 (path_info): Likewise.
11330 (path_command): Likewise.
11331 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11332 (inferior::inferior): Initialize 'environment' using the host's
11334 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11335 Include "environ.h".
11336 (class inferior) <environment>: Change type from 'struct
11337 gdb_environ' to 'gdb_environ'.
11338 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11339 methods from 'gdb_environ' class.
11340 * solib.c (solib_find_1): Likewise
11341 * unittests/environ-selftests.c: New file.
11345 * features/i386/i386-linux.xml: Exchange the order of including
11346 32bit-linux.xml and 32bit-sse.xml.
11347 * features/i386/i386-linux.c: Regenerated.
11351 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11352 Delete copy ctor and assignment operator.
11353 (tdesc_type): Likewise.
11354 (tdesc_feature): Likewise.
11355 (tdesc_free_reg): Remove.
11356 (tdesc_create_reg): Use new.
11357 (tdesc_free_type): Remove.
11358 (tdesc_create_vector): Use new.
11359 (tdesc_create_union): Likewise.
11360 (tdesc_create_flags): Likewise.
11361 (tdesc_create_enum): Likewise.
11362 (tdesc_free_feature): Delete.
11363 (free_target_description): Use delete.
11367 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11372 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11373 after gdb::unlinker.
11377 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11378 gdb_environ to access an environment variable.
11382 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11387 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11391 * configure: Re-generate.
11392 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11396 * configure: Re-generate.
11397 * warning.m4: Pass -Werror to compiler when checking for
11398 supported warning flags.
11402 * Makefile.in (COMPILE.pre): Add "-x c++".
11408 * defs.h (RequireLongest): New.
11409 (extract_integer): Declare function template.
11410 (extract_signed_integer): Remove the declaration, but define it
11412 (extract_unsigned_integer): Likewise.
11413 (store_integer): Declare function template.
11414 (store_signed_integer): Remove the declaration, but define it
11416 (store_unsigned_integer): Likewise.
11417 * findvar.c (extract_integer): New function template.
11418 (extract_signed_integer): Remove.
11419 (extract_unsigned_integer): Remove.
11420 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11422 (store_integer): New function template.
11423 (store_signed_integer): Remove.
11424 (store_unsigned_integer): Remove.
11425 (store_integer): Explicit instantiations.
11426 * regcache.c (regcache_raw_read_signed): Update.
11427 (regcache::raw_read): New function.
11428 (regcache::raw_read_signed): Remove.
11429 (regcache::raw_read_unsigned): Remove.
11430 (regcache_raw_read_unsigned): Update.
11431 (regcache_raw_write_unsigned): Update.
11432 (regcache::raw_write_signed): Remove.
11433 (regcache::raw_write): New function.
11434 (regcache_cooked_read_signed): Update.
11435 (regcache::raw_write_unsigned): Remove.
11436 (regcache::cooked_read_signed): Remove.
11437 (regcache_cooked_read_unsigned): Update.
11438 (regcache::cooked_read_unsigned): Remove.
11439 (regcache_cooked_write_signed): Update.
11440 (regcache_cooked_write_unsigned): Update.
11441 * regcache.h (regcache) <raw_read_signed>: Remove.
11442 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11443 <raw_read, raw_write>: New.
11444 <cooked_read_signed, cooked_write_signed>: Remove.
11445 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11446 <cooked_read, cooked_write>: New.
11447 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11448 (sh64_pseudo_register_write): Update.
11452 * arc-tdep.c (arc_disassembler_options): New variable.
11453 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11454 of default_print_insn.
11455 (arc_delayed_print_insn): Set info->section when needed,
11456 use default_print_insn to retrieve a disassembler.
11461 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11462 to mention $SHELL and startup-with-shell.
11466 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11470 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11471 default_print_insn instead of print_insn_aarch64.
11472 * arm-tdep.c (gdb_print_insn_arm): Call
11473 default_print_insn instead of print_insn_big_arm
11474 and print_insn_little_arm.
11475 * i386-tdep.c (i386_print_insn): Call default_print_insn
11476 instead of print_insn_i386.
11477 * ia64-tdep.c (ia64_print_insn): Call
11478 default_print_insn instead of print_insn_ia64.
11479 * mips-tdep.c (gdb_print_insn_mips): Call
11480 default_print_insn instead of print_insn_big_mips
11481 and print_insn_little_mips.
11482 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11483 instead of print_insn_spu.
11487 * ada-lang.c: Include "common/byte-vector.h".
11488 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11489 * charset.c (wchar_iterator::iterate): Resize the vector instead
11491 * common/byte-vector.h: Include "common/def-vector.h".
11492 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11493 * cli/cli-dump.c: Include "common/byte-vector.h".
11494 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11495 * common/byte-vector.h: New file.
11496 * common/def-vector.h: New file.
11497 * common/default-init-alloc.h: New file.
11498 * dwarf2loc.c: Include "common/byte-vector.h".
11499 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11500 instead of reserving it.
11501 * dwarf2read.c: Include "common/byte-vector.h".
11502 (data_buf::m_vec): Now a gdb::byte_vector.
11503 * gdb_regex.c: Include "common/def-vector.h".
11504 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11505 * mi/mi-main.c: Include "common/byte-vector.h".
11506 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11507 * printcmd.c: Include "common/byte-vector.h".
11508 (print_scalar_formatted): Use gdb::byte_vector.
11509 * valprint.c: Include "common/byte-vector.h".
11510 (maybe_negate_by_bytes, print_decimal_chars): Use
11515 * darwin-nat.c: Include "nat/fork-inferior.h".
11519 * configure.nat: Factor out Darwin bits that are not
11520 architecture-specific. Add fork-inferior.o.
11524 * configure.nat: Factor out AIX bits that are not
11525 architecture-specific. Add fork-inferior.o.
11529 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11530 (read_pieced_value, write_pieced_value): ...here. Reduce to
11531 wrappers that just call rw_pieced_value.
11535 * dwarf2loc.c (write_pieced_value): When writing the data for a
11536 memory piece, use write_memory_with_notification instead of
11541 * valops.c (read_value_memory): Change embedded_offset to
11542 represent a bit offset instead of a byte offset.
11543 * value.h (read_value_memory): Adjust comment.
11547 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11548 dest_offset_bits and source_offset_bits.
11549 (write_pieced_value): Likewise.
11553 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11554 given by DW_OP_bit_piece.
11555 (write_pieced_value): Likewise.
11559 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11560 some other preparations to the places where sufficient information
11562 (write_pieced_value): Likewise.
11566 * dwarf2loc.c (bits_to_bytes): New function.
11567 (read_pieced_value): Fix offset calculations for register pieces
11568 on big-endian targets.
11569 (write_pieced_value): Likewise.
11573 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11574 (write_pieced_value): Likewise.
11578 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11579 transfer the source value's least significant bits, instead of its
11580 lowest-addressed ones. Rename type_len to max_offset.
11581 (read_pieced_value): Mirror above changes to write_pieced_value as
11586 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11587 truncate full bytes from dest_offset_bits before using it as an
11588 offset into the buffer.
11592 * dwarf2loc.c (write_pieced_value): Include transfer size in
11597 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11598 calculation of this_size.
11602 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11603 when targeting a bit-field.
11604 (write_pieced_value): Likewise.
11608 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11609 (allocate_piece_closure): Drop addr_size parameter.
11610 (dwarf2_evaluate_loc_desc_full): Adjust call to
11611 allocate_piece_closure.
11616 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11617 the LSB end, independent of endianness.
11621 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11626 * mips-linux-nat.c: Move include features/mips*-linux.c to
11628 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11629 to mips-linux-tdep.c.
11630 * mips-linux-tdep.c: Include features/mips*-linux.c
11631 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11633 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11634 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11635 (tdesc_mips64_dsp_linux): Declare.
11639 * valprint.h (val_print_type_code_int): Remove.
11640 * valprint.c (generic_val_print_int): Always call
11641 val_print_scalar_formatted.
11642 (val_print_type_code_int): Remove.
11643 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11644 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11645 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11646 * ada-valprint.c (ada_val_print_num): Use
11647 val_print_scalar_formatted.
11651 * printcmd.c (print_scalar_formatted): Unify the two switches.
11652 Don't convert scalars to LONGEST.
11657 * valprint.h (print_decimal_chars): Update.
11658 * valprint.c (maybe_negate_by_bytes): New function.
11659 (print_decimal_chars): Add "is_signed" argument.
11660 * printcmd.c (print_scalar_formatted): Update.
11665 * valprint.h (print_binary_chars, print_hex_chars): Update.
11666 * valprint.c (val_print_type_code_int): Update.
11667 (print_binary_chars): Add "zero_pad" argument.
11668 (emit_octal_digit): New function.
11669 (print_octal_chars): Don't zero-pad.
11670 (print_decimal_chars): Likewise.
11671 (print_hex_chars): Add "zero_pad" argument.
11672 * sh64-tdep.c (sh64_do_fp_register): Update.
11673 * regcache.c (regcache::dump): Update.
11674 * printcmd.c (print_scalar_formatted): Update.
11675 * infcmd.c (default_print_one_register_info): Update.
11680 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11681 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11682 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11683 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11684 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11688 * dwarf2read.c (mapped_symtab::data): Now a vector of
11689 symtab_index_entry instead of vector of
11690 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11691 whether an element's name is NULL instead of checking whether the
11692 element itself is NULL.
11693 (find_slot): Change return type. Adjust.
11694 (hash_expand, , add_index_entry, uniquify_cu_indices)
11695 (write_hash_table): Adjust.
11699 * dwarf2read.c (recursively_count_psymbols): New function.
11700 (write_psymtabs_to_index): Call it to compute number of psyms and
11701 pass estimate size of psyms_seen to unordered_set's ctor.
11705 * dwarf2read.c (write_hash_table): Check if key already exists
11710 * dwarf2read.c (data_buf::append_space): Rename to...
11711 (data_buf::grow): ... this, and make private. Adjust all callers.
11712 (data_buf::append_uint): New method.
11713 (add_address_entry, write_one_signatured_type)
11714 (write_psymtabs_to_index): Use it.
11718 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11719 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11720 (data_buf::file_write): Call ::fwrite directly.
11724 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11725 std::vector::erase.
11729 Code cleanup: C++ify .gdb_index producer.
11730 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11731 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11732 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11733 (create_strtab, add_string): Remove.
11734 (file_write, data_buf): New.
11735 (struct symtab_index_entry): Use std::vector for cu_indices.
11736 (struct mapped_symtab): Use std::vector for data.
11737 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11738 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11740 (find_slot): Change return type. Update it to the new data structures.
11741 (hash_expand, add_index_entry): Update it to the new data structures.
11742 (offset_type_compare): Remove.
11743 (uniquify_cu_indices): Update it to the new data structures.
11744 (c_str_view, c_str_view_hasher, vector_hasher): New.
11745 (add_indices_to_cpool): Remove.
11746 (write_hash_table): Update it to the new data structures.
11747 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11748 (eq_psymtab_cu_index): Remove.
11749 (psym_index_map): New typedef.
11750 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11751 reference and std::unordered_map for cu_index_htab.
11752 (add_address_entry, add_address_entry_worker, write_address_map)
11753 (write_psymbols): Update it to the new data structures.
11754 (write_obstack): Remove.
11755 (struct signatured_type_index_data): Change types_list to a data_buf
11756 reference and psyms_seen to a std::unordered_set reference.
11757 (write_one_signatured_type, recursively_write_psymbols)
11758 (write_psymtabs_to_index): Update it to the new data structures.
11762 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11763 separate-debug-file commands.
11764 * symfile.h (separate_debug_file_debug): New global.
11765 * symfile.c (separate_debug_file_debug): New global.
11766 (separate_debug_file_exists, find_separate_debug_file): Add
11768 (_initialize_symfile): Add "set debug separate-debug-file"
11770 * build-id.c (build_id_to_debug_bfd,
11771 find_separate_debug_file_by_buildid): Add debug output.
11775 * gdbarch.sh (displaced_step_free_closure): Remove.
11776 * gdbarch.h, gdbarch.c: Re-generate.
11777 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11778 displaced_step_free_closure.
11779 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11780 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11781 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11782 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11783 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11784 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11785 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11786 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11787 * infrun.c (displaced_step_clear): Call xfree instead of
11788 gdbarch_displaced_step_free_closure.
11792 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11797 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11798 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11799 (mn10300_push_dummy_call): Likewise.
11803 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11807 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11811 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11812 able to start inferiors using a shell.
11813 (New remote packets): Announce new packet "QStartupWithShell".
11814 * remote.c: Add PACKET_QStartupWithShell.
11815 (extended_remote_create_inferior): Handle new
11816 PACKET_QStartupWithShell.
11817 (remote_protocol_features) <QStartupWithShell>: New entry for
11818 PACKET_QStartupWithShell.
11819 (_initialize_remote): Call "add_packet_config_cmd" for
11825 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11826 and "nat/fork-inferior.h".
11827 * common/common-inferior.h: New file, with contents from
11829 * commom/common-utils.c: Include "common-utils.h".
11830 (stringify_argv): New function.
11831 * common/common-utils.h (stringify_argv): New prototype.
11832 * configure.nat: Add "fork-inferior.o" as a dependency for
11833 "*linux*", "fbsd*" and "nbsd*" hosts.
11834 * corefile.c (get_exec_file): Update comment.
11835 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11836 instead of "startup_inferior".
11837 (darwin_create_inferior): Call "add_thread_silent" after
11839 * fork-child.c: Cleanup unnecessary includes.
11840 (SHELL_FILE): Move to "common/common-fork-child.c".
11841 (environ): Likewise.
11842 (exec_wrapper): Initialize.
11843 (get_exec_wrapper): New function.
11844 (breakup_args): Move to "common/common-fork-child.c"; rename to
11845 "breakup_args_for_exec".
11846 (escape_bang_in_quoted_argument): Move to
11847 "common/common-fork-child.c".
11848 (saved_ui): New variable.
11849 (prefork_hook): New function.
11850 (postfork_hook): Likewise.
11851 (postfork_child_hook): Likewise.
11852 (gdb_startup_inferior): Likewise.
11853 (fork_inferior): Move to "common/common-fork-child.c". Update
11854 function to support gdbserver.
11855 (startup_inferior): Likewise.
11856 * gdbcore.h (get_exec_file): Remove declaration.
11857 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11858 instead of "startup_inferior". Call "add_thread_silent" after
11860 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11861 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11862 instead of "startup_inferior". Call "add_thread_silent" after
11864 * inferior.h: Include "common-inferior.h".
11865 (trace_start_error): Move to "common/common-utils.h".
11866 (trace_start_error_with_name): Likewise.
11867 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11868 (startup_inferior): Likewise.
11869 (gdb_startup_inferior): New prototype.
11870 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11871 * nat/fork-inferior.h: New file.
11872 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11873 instead of "startup_inferior". Call "add_thread_silent" after
11875 * target.h (target_terminal_init): Move prototype to
11877 (target_terminal_inferior): Likewise.
11878 (target_terminal_ours): Likewise.
11879 * target/target.h (target_terminal_init): New prototype, moved
11881 (target_terminal_inferior): Likewise.
11882 (target_terminal_ours): Likewise.
11883 * utils.c (gdb_flush_out_err): New function.
11887 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11888 * common/common-gdbthread.h: New file, with parts from
11890 * gdbthread.h: Include "common-gdbthread.h".
11891 (switch_to_thread): Moved to "common/common-gdbthread.h".
11895 * Makefile.in (SFILES): Add "common/job-control.c".
11896 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11897 (COMMON_OBS): Add "job-control.o".
11898 * common/job-control.c: New file, with contents from
11900 * common/job-control.h: New file, with contents from "terminal.h".
11901 * fork-child.c: Include "job-control.h".
11902 * inflow.c: Include "job-control.h".
11903 (gdb_setpgid): Move to "common/common-inflow.c".
11904 (_initialize_inflow): Move setting of "job_control" to
11905 "handle_job_control".
11906 * terminal.h (job_control): Moved to "common/common-terminal.h".
11907 (gdb_setpgid): Likewise.
11908 * top.c: Include "job_control.h".
11909 * utils.c: Likewise.
11910 (job_control): Moved to "job-control.c".
11914 * Makefile.in (SFILES): Add gdb_regex.c.
11915 (COMMON_OBS): Add gdb_regex.o.
11916 * ada-lang.c (ada_add_standard_exceptions)
11917 (ada_add_exceptions_from_frame, name_matches_regex)
11918 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11919 parameter type to compiled_regex. Adjust.
11920 (ada_exceptions_list): Use compiled_regex.
11921 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11922 std::unique_ptr<compiled_regex>.
11923 (exception_catchpoint::~exception_catchpoint): Remove regfree
11925 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11926 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11927 * breakpoint.c (solib_catchpoint::compiled): Now a
11928 std::unique_ptr<compiled_regex>.
11929 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11930 (check_status_catch_solib): Adjust to use compiled_regex.
11931 (add_solib_catchpoint): Adjust to use compiled_regex.
11932 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11933 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11934 compiled_regex reference. Adjust to use it.
11935 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11936 declaration. Include "gdb_regex.h".
11937 (apropos_cmd): Change regex parameter to compiled_regex reference.
11938 * gdb_regex.c: New file.
11939 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11941 (class compiled_regex): New.
11942 * linux-tdep.c: Include "common/gdb_optional.h".
11943 (struct mapping_regexes): New, factored out from
11944 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11945 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11946 gdb::optional and remove cleanups. Adjust to compiled_regex.
11947 * probe.c: Include "common/gdb_optional.h".
11948 (collect_probes): Use compiled_regex and gdb::optional and remove
11950 * skip.c: Include "common/gdb_optional.h".
11951 (skiplist_entry::compiled_function_regexp): Now a
11952 gdb::optional<compiled_regex>.
11953 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11954 (free_skiplist_entry): Remove regfree call.
11955 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11956 compiled_regex and gdb::optional.
11957 * symtab.c: Include "common/gdb_optional.h".
11958 (search_symbols): Use compiled_regex and gdb::optional.
11959 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11960 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11965 * regcache.c (regcache::save): Avoid buffer use.
11966 (regcache::dump): Likewise.
11970 * sh-tdep.c (sh_pseudo_register_read): Remove
11972 (sh_pseudo_register_write): Likewise.
11973 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11974 (sh64_pseudo_register_write): Likewise
11978 * aarch64-tdep.c (aarch64_store_return_value): Use
11980 (aarch64_pseudo_read_value): Likewise.
11981 (aarch64_pseudo_write): Likewise.
11985 * regformats/regdef.h (set_register_cache): Remove the
11990 * frame.c (frame_unwind_register_signed): Use
11991 frame_unwind_register_value.
11995 PR breakpoints/21553
11996 * breakpoint.c (create_breakpoints_sal_default)
11997 (init_breakpoint_sal, create_breakpoint_sal): Use
11998 gdb::unique_xmalloc_ptr for string parameters.
11999 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12000 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
12001 (base_breakpoint_create_breakpoints_sal)
12002 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
12003 (strace_marker_create_breakpoints_sal)
12004 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
12006 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
12007 gdb::unique_xmalloc_ptr for string parameters.
12008 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12013 * alpha-tdep.c (alpha_register_to_value): Use
12014 get_frame_register_value.
12015 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
12019 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
12020 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
12021 (ia64_value_to_register): Likewise.
12022 (ia64_extract_return_value): Likewise.
12023 (ia64_store_return_value): Likewise.
12024 (ia64_push_dummy_call): Likewise.
12032 * x86-linux-nat.c (struct arch_lwp_info): Remove.
12036 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
12038 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
12042 * event-loop.c (poll_timers): Unallocate timer using delete
12047 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
12048 (struct breakpoint) <~breakpoint>: New.
12049 (struct watchpoint): Inherit from breakpoint.
12050 <~watchpoint>: New.
12052 (struct tracepoint): Inherit from breakpoint.
12054 * breakpoint.c (longjmp_breakpoint_ops): Remove.
12055 (struct longjmp_breakpoint): Inherit from breakpoint.
12056 <~longjmp_breakpoint>: New.
12058 (new_breakpoint_from_type): Remove casts.
12059 (watchpoint_in_thread_scope): Remove reference to base field.
12060 (watchpoint_del_at_next_stop): Likewise.
12061 (update_watchpoint): Likewise.
12062 (watchpoint_check): Likewise.
12063 (bpstat_check_watchpoint): Likewise.
12064 (set_longjmp_breakpoint): Likewise.
12065 (struct fork_catchpoint): Inherit from breakpoint.
12067 (struct solib_catchpoint): Inherit from breakpoint.
12068 <~solib_catchpoint>: New.
12070 (dtor_catch_solib): Change to ...
12071 (solib_catchpoint::~solib_catchpoint): ... this.
12072 (breakpoint_hit_catch_solib): Remove reference to base field.
12073 (add_solib_catchpoint): Likewise.
12074 (create_fork_vfork_event_catchpoint): Likewise.
12075 (struct exec_catchpoint): Inherit from breakpoint.
12076 <~exec_catchpoint>: New.
12078 (dtor_catch_exec): Change to ...
12079 (exec_catchpoint::~exec_catchpoint): ... this.
12080 (dtor_watchpoint): Change to ...
12081 (watchpoint::~watchpoint): ... this.
12082 (watch_command_1): Remove reference to base field.
12083 (catch_exec_command_1): Likewise.
12084 (base_breakpoint_dtor): Change to ...
12085 (breakpoint::~breakpoint): ... this.
12086 (base_breakpoint_ops): Remove dtor field value.
12087 (longjmp_bkpt_dtor): Change to ...
12088 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12089 (strace_marker_create_breakpoints_sal): Remove reference to base
12091 (delete_breakpoint): Don't manually call breakpoint destructor.
12092 (create_tracepoint_from_upload): Remove reference to base field.
12093 (trace_pass_set_count): Likewise.
12094 (initialize_breakpoint_ops): Don't initialize
12095 momentary_breakpoint_ops, don't set dtors.
12096 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12097 <~ada_catchpoint>: New.
12099 (create_excep_cond_exprs): Remove reference to base field.
12100 (dtor_exception): Change to ...
12101 (ada_catchpoint::~ada_catchpoint): ... this.
12102 (dtor_catch_exception): Remove.
12103 (dtor_catch_exception_unhandled): Remove.
12104 (dtor_catch_assert): Remove.
12105 (create_ada_exception_catchpoint): Remove reference to base
12107 (initialize_ada_catchpoint_ops): Don't set dtors.
12108 * break-catch-sig.c (struct signal_catchpoint): Inherit from
12110 <~signal_catchpoint>: New.
12112 (signal_catchpoint_dtor): Change to ...
12113 (signal_catchpoint::~signal_catchpoint): ... this.
12114 (create_signal_catchpoint): Remove reference to base field.
12115 (initialize_signal_catchpoint_ops): Don't set dtor.
12116 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12118 <~syscall_catchpoint>: New.
12120 (dtor_catch_syscall): Change to ...
12121 (syscall_catchpoint::~syscall_catchpoint): ... this.
12122 (create_syscall_event_catchpoint): Remove reference to base
12124 (initialize_syscall_catchpoint_ops): Don't set dtor.
12125 * break-catch-throw.c (struct exception_catchpoint): Inherit
12127 <~exception_catchpoint>: New.
12129 (dtor_exception_catchpoint): Change to ...
12130 (exception_catchpoint::~exception_catchpoint): ... this.
12131 (handle_gnu_v3_exceptions): Remove reference to base field.
12132 (initialize_throw_catchpoint_ops): Don't set dtor.
12133 * ctf.c (ctf_get_traceframe_address): Remove reference to base
12135 * remote.c (remote_get_tracepoint_status): Likewise.
12136 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12137 * tracefile.c (tracefile_fetch_registers): Likewise.
12138 * tracepoint.c (actions_command): Likewise.
12139 (validate_actionline): Likewise.
12140 (tfind_1): Likewise.
12141 (get_traceframe_location): Likewise.
12142 (find_matching_tracepoint_location): Likewise.
12143 (parse_tracepoint_status): Likewise.
12144 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12148 * breakpoint.c (struct longjmp_breakpoint): New struct.
12149 (is_tracepoint_type): Change return type to bool.
12150 (is_longjmp_type): New function.
12151 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12152 (set_raw_breakpoint_without_location): Use
12153 new_breakpoint_from_type.
12154 (set_raw_breakpoint): Likewise.
12158 * breakpoint.c (new_breakpoint_from_type): New function.
12159 (create_breakpoint_sal): Use new_breakpoint_from_type and
12161 (create_breakpoint): Likewise.
12165 * memattr.c (mem_info_command): Rename to ...
12166 (info_mem_command): ... this.
12167 (mem_enable_command): Rename to ...
12168 (enable_mem_command): ... this.
12169 (mem_disable_command): Rename to ...
12170 (disable_mem_command): ... this.
12171 (mem_delete_command): Rename to ...
12172 (delete_mem_command): ... this.
12173 (_initialize_mem): Adjust function names.
12177 * btrace.c (handle_pt_insn_events): New.
12178 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12179 STATUS. Split into this and ...
12180 (handle_pt_insn_event_flags): ... this.
12184 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12185 and struct pt_insn.resynced.
12186 * configure: Regenerated.
12187 * config.in: Regenerated.
12191 * btrace.c (ftrace_find_call_by_number): New function.
12192 (ftrace_new_function): Store objects, not pointers.
12193 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12194 ftrace_new_gap, ftrace_update_function,
12195 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12196 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12197 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12198 btrace_ends_with_single_insn, btrace_call_get): Account for
12199 btrace_thread_info::functions now storing objects.
12200 * btrace.h (struct btrace_thread_info): Add constructor.
12201 (struct btrace_thread_info) <functions>: Make std::vector.
12202 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12203 Initialize with default values.
12204 * record-btrace.c (record_btrace_frame_sniffer): Account for
12205 btrace_thread_info::functions now storing objects.
12209 * btrace.c: Remove typedef bfun_s.
12210 (ftrace_new_gap): Directly add gaps to the list of gaps.
12211 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12212 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12213 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12214 instead of gdb VEC.
12218 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12219 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12220 with btrace_thread_info::next_segment and
12221 btrace_thread_info::prev_segment.
12222 * btrace.h: Remove struct btrace_func_link.
12223 (struct btrace_function): Replace pair of function segment pointers
12224 with pair of indices.
12225 * python/py-record-btrace.c (btpy_call_prev_sibling,
12226 btpy_call_next_sibling): Replace references to
12227 btrace_thread_info::segment with btrace_thread_info::next_segment and
12228 btrace_thread_info::prev_segment.
12229 * record-btrace.c (record_btrace_frame_this_id): Use
12230 btrace_find_call_by_number.
12234 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12235 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12236 btrace_insn_next, btrace_insn_prev): Remove references to
12237 btrace_thread_info::flow.
12238 * btrace.h (struct btrace_function): Remove FLOW.
12242 * btrace.c (ftrace_find_call_by_number): New function.
12243 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12244 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12245 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12246 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12248 * btrace.h (struct btrace_function): Turn UP into an index.
12249 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12251 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12252 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12253 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12257 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12258 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12259 ftrace_update_function, ftrace_compute_global_level_offset,
12260 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12261 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12262 btrace_insn_end, btrace_is_empty): Remove references to
12263 btrace_thread_info::begin and btrace_thread_info::end.
12264 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12265 (struct btrace_thread_info) <functions>: Adjust comment.
12266 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12267 btrace_thread_info::begin.
12271 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12272 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12273 ftrace_update_function): Remove arguments that implicitly were always
12275 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12276 Don't pass BTINFO->END.
12280 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12281 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12282 btrace_find_insn_by_number): Replace function segment pointer with
12284 (btrace_insn_cmp): Simplify.
12285 * btrace.h: (struct btrace_insn_iterator) Rename index to
12286 insn_index. Replace function segment pointer with index into function
12288 * record-btrace.c (record_btrace_call_history): Replace function
12289 segment pointer use with index.
12290 (record_btrace_frame_sniffer): Retrieve function call segment through
12292 (record_btrace_set_replay): Remove defunc't safety check.
12296 * btrace.c (btrace_ends_with_single_insn): New function.
12297 (btrace_call_get, btrace_call_number, btrace_call_begin,
12298 btrace_call_end, btrace_call_next, btrace_call_prev,
12299 btrace_find_call_by_number): Use index into call segment vector
12300 instead of pointer.
12301 (btrace_call_cmp): Simplify.
12302 * btrace.h (struct btrace_call_iterator): Replace function call segment
12303 pointer with index into vector.
12304 * record-btrace.c (record_btrace_call_history): Use index instead of
12309 * btrace.c (btrace_insn_begin, btrace_insn_end,
12310 btrace_find_insn_by_number): Add btinfo to iterator.
12311 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12315 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12316 and save pointers directly.
12317 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12318 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12319 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12320 changed signature of functions.
12321 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12322 (btrace_fetch): Remove code that adds btrace_function pointers to
12323 vector of btrace_functions.
12324 (btrace_clear): Simplify freeing vector of btrace_functions.
12328 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12329 Replace VEC_* with std::vector functions.
12330 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12331 (struct btrace_thread_info)<functions>: Change type to std::vector.
12335 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12336 "Removed targets and native configurations" up. Merge duplicate
12337 "New commands" sub-sections. Add "New options" sub-sections.
12341 * defs.h (copy_integer_to_size): New declaration.
12342 * findvar.c (copy_integer_to_size): New function.
12343 (do_cint_test): New selftest function.
12344 (copy_integer_to_size_test): Likewise.
12345 (_initialize_findvar): Likewise.
12346 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12347 (mips_fbsd_collect_reg): Use raw_collect_integer.
12348 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12349 (mips64_fill_gregset): Use raw_collect_integer
12350 (mips64_fill_fpregset): Use raw_supply_integer.
12351 * regcache.c (regcache::raw_supply_integer): New function.
12352 (regcache::raw_collect_integer): Likewise.
12353 * regcache.h: (regcache::raw_supply_integer): New declaration.
12354 (regcache::raw_collect_integer): Likewise.
12358 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12359 (COMMON_OBS): Add gdbarch-selftests.o.
12360 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12361 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12362 * gdbarch-selftests.c: New file.
12363 * regcache.h (regcache) <~regcache>: Mark it virtual if
12365 <raw_write>: Likewise.
12369 * regcache.c (current_regcache): Change it to
12370 regcache::current_regcache.
12371 (regcache_observer_target_changed): Update.
12372 (regcache_thread_ptid_changed): Make it a regcache static
12374 (regcache_thread_ptid_changed): Update.
12375 (class regcache_access): New.
12376 (current_regcache_test): Update.
12377 (_initialize_regcache): Update.
12378 * regcache.h: Include forward_list.
12379 (regcache): Declare regcache_thread_ptid_changed and declare
12380 registers_changed_ptid as friend.
12384 * i387-tdep.c (i387_register_to_value): Use register_size
12385 instead of TYPE_LENGTH.
12386 * m68k-tdep.c (m68k_register_to_value): Likewise.
12390 * i387-tdep.c (i387_convert_register_p): Return false if type
12391 code isn't TYPE_CODE_FLT.
12395 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12397 (alpha_register_to_value): Remove type length check.
12398 (alpha_value_to_register): Likewise.
12402 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12407 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12408 TYPE_CODE_FLT or not.
12412 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12413 * avr-tdep.c (avr_gdbarch_init): Likewise.
12414 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12415 * cris-tdep.c (cris_gdbarch_init): Likewise.
12416 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12417 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12418 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12419 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12420 * mep-tdep.c (mep_gdbarch_init): Likewise.
12421 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12422 * mips-tdep.c (mips_gdbarch_init): Likewise.
12423 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12424 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12425 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12426 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12427 * v850-tdep.c (v850_gdbarch_init): Likewise.
12431 * selftest-arch.c (tests_with_arch): Call registers_changed
12432 and reinit_frame_cache.
12433 * selftest.c (run_self_tests): Likewise.
12437 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12438 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12442 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12443 set_gdbarch_print_insn.
12447 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12448 set_gdbarch_print_insn.
12452 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12453 set_gdbarch_print_insn.
12454 * arc-tdep.c (arc_gdbarch_init): Likewise.
12455 * arch-utils.c: include dis-asm.h.
12456 (default_print_insn): New function.
12457 * arch-utils.h (default_print_insn): Declare.
12458 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12459 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12460 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12461 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12462 * frv-tdep.c (frv_gdbarch_init): Likewise.
12463 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12464 * gdbarch.sh (print_insn): Use default_print_insn.
12465 * gdbarch.c: Regenerated.
12466 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12467 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12468 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12469 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12470 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12471 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12472 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12473 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12474 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12475 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12476 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12477 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12478 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12479 * mt-tdep.c (mt_gdbarch_init): Likewise.
12480 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12481 * nios2-tdep.c (nios2_print_insn): Remove.
12482 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12483 * rx-tdep.c (rx_gdbarch_init): Likewise.
12484 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12485 * score-tdep.c (score_print_insn): Remove.
12486 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12487 * sh-tdep.c (sh_gdbarch_init): Likewise.
12488 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12489 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12490 * tic6x-tdep.c (tic6x_print_insn): Remove.
12491 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12492 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12493 * v850-tdep.c (v850_gdbarch_init): Likewise.
12494 * vax-tdep.c (vax_gdbarch_init): Likewise.
12495 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12496 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12500 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12501 (MIPS_FP0_REGNUM): Remove.
12502 (MIPS_FSR_REGNUM): Remove.
12503 (mips_fbsd_supply_fpregs): Use mips_regnum.
12504 (mips_fbsd_supply_gregs): Likewise.
12505 (mips_fbsd_collect_fpregs): Likewise.
12506 (mips_fbsd_collect_gregs): Likewise.
12510 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12511 (getpfpregs_supplies): New function.
12512 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12513 getfpregs_supplies.
12514 (mips_fbsd_store_inferior_registers): Likewise.
12518 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12523 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12524 (store_register): Likewise.
12525 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12526 (get_decimal_float_return_value): Likewise.
12527 (do_ppc_sysv_return_value): Likewise.
12528 (ppc64_sysv_abi_push_integer): Likewise.
12529 (ppc64_sysv_abi_push_freg): Likewise.
12530 (ppc64_sysv_abi_return_value_base): Likewise.
12531 (ppc64_sysv_abi_return_value): Likewise.
12532 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12533 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12534 * rs6000-nat.c: Likewise.
12535 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12536 (rs6000_value_to_register): Likewise.
12537 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12542 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12543 arrays as "[T]", not "[T; ]".
12548 * rust-lang.c (exp_descriptor_rust): New function.
12549 (rust_language_defn): Use it.
12550 * p-lang.c (pascal_language_defn): Update.
12551 * opencl-lang.c (opencl_language_defn): Update.
12552 * objc-lang.c (objc_language_defn): Update.
12553 * m2-lang.c (m2_language_defn): Update.
12554 * language.h (struct language_defn)
12555 <la_watch_location_expression>: New member.
12556 * language.c (unknown_language_defn, auto_language_defn)
12557 (local_language_defn): Update.
12558 * go-lang.c (go_language_defn): Update.
12559 * f-lang.c (f_language_defn): Update.
12560 * d-lang.c (d_language_defn): Update.
12561 * c-lang.h (c_watch_location_expression): Declare.
12562 * c-lang.c (c_watch_location_expression): New function.
12563 (c_language_defn, cplus_language_defn, asm_language_defn)
12564 (minimal_language_defn): Use it.
12565 * breakpoint.c (watch_command_1): Call
12566 la_watch_location_expression.
12567 * ada-lang.c (ada_language_defn): Update.
12572 * gdb_curses.h (NOMACROS): Define.
12573 (NCURSES_NOMACROS): Define.
12578 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12580 * tui/tui-wingeneral.c (box_win): Likewise.
12581 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12582 (tui_show_source_line): Likewise.
12583 (tui_show_exec_info_content): Likewise.
12587 * sparc-tdep.c (sparc_structure_return_p)
12588 (sparc_arg_on_registers_p): New functions.
12589 (sparc32_store_arguments): Use them.
12590 * sparc64-tdep.c (sparc64_16_byte_align_p)
12591 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12592 Handle TYPE_CODE_ARRAY.
12596 * cli/cli-decode.c (add_alias_cmd): New function.
12597 * command.h (add_alias_cmd): Declare.
12598 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12599 instead call add_alias_cmd.
12603 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12604 (nat_makefile_frag): ... this. All references updated.
12605 * configure.ac: Likewise.
12606 * configure.nat: Likewise. Enhance comments.
12607 * configure: Regenerate.
12611 * procfs.c (procfs_create_inferior): Change prototype to match
12616 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12617 C++ compiler warning.
12622 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12623 recurse, just call value_struct_elt directly.
12627 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12628 OP_RUST_ARRAY>: Fix.
12632 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12636 * regcache.c: Include <forward_list>.
12637 (struct regcache_list): Remove.
12638 (current_regcache): Update.
12639 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12640 (regcache_thread_ptid_changed): Likewise.
12641 (registers_changed_ptid): Likewise.
12642 (current_regcache_size): Likewise.
12646 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12647 (current_regcache_size): New function.
12648 (current_regcache_test): New function.
12649 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12653 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12654 (print_gp_register_row): Use get_frame_register_value.
12658 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12659 (mips_supply_fpregset): Likewise.
12660 (mips64_supply_gregset): Likewise.
12664 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12665 regcache->raw_supply_zeroed.
12669 * configure.nat: Rearrange 'case' statements to match
12674 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12675 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12676 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12677 "@nat_extra_makefile_frag@".
12678 (Makefile): Remove dependency on "@frags@".
12679 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12680 (data-directory/Makefile): Likewise.
12681 * config/aarch64/linux.mh: Deleted; moved contents to
12682 "gdb/configure.nat".
12683 * config/alpha/alpha-linux.mh: Likewise.
12684 * config/alpha/nbsd.mh: Likewise.
12685 * config/arm/linux.mh: Likewise.
12686 * config/arm/nbsdelf.mh: Likewise.
12687 * config/i386/cygwin.mh: Likewise.
12688 * config/i386/cygwin64.mh: Likewise.
12689 * config/i386/darwin.mh: Likewise.
12690 * config/i386/fbsd.mh: Likewise.
12691 * config/i386/fbsd64.mh: Likewise.
12692 * config/i386/go32.mh: Likewise.
12693 * config/i386/i386gnu.mh: Likewise.
12694 * config/i386/i386sol2.mh: Likewise.
12695 * config/i386/linux.mh: Likewise.
12696 * config/i386/linux64.mh: Likewise.
12697 * config/i386/mingw.mh: Likewise.
12698 * config/i386/mingw64.mh: Likewise.
12699 * config/i386/nbsd64.mh: Likewise.
12700 * config/i386/nbsdelf.mh: Likewise.
12701 * config/i386/nto.mh: Likewise.
12702 * config/i386/obsd.mh: Likewise.
12703 * config/i386/obsd64.mh: Likewise.
12704 * config/i386/sol2-64.mh: Likewise.
12705 * config/ia64/linux.mh: Likewise.
12706 * config/m32r/linux.mh: Likewise.
12707 * config/m68k/linux.mh: Likewise.
12708 * config/m68k/nbsdelf.mh: Likewise.
12709 * config/m68k/obsd.mh: Likewise.
12710 * config/m88k/obsd.mh: Likewise.
12711 * config/mips/fbsd.mh: Likewise.
12712 * config/mips/linux.mh: Likewise.
12713 * config/mips/nbsd.mh: Likewise.
12714 * config/mips/obsd64.mh: Likewise.
12715 * config/pa/linux.mh: Likewise.
12716 * config/pa/nbsd.mh: Likewise.
12717 * config/pa/obsd.mh: Likewise.
12718 * config/powerpc/aix.mh: Likewise.
12719 * config/powerpc/fbsd.mh: Likewise.
12720 * config/powerpc/linux.mh: Likewise.
12721 * config/powerpc/nbsd.mh: Likewise.
12722 * config/powerpc/obsd.mh: Likewise.
12723 * config/powerpc/ppc64-linux.mh: Likewise.
12724 * config/powerpc/spu-linux.mh: Likewise.
12725 * config/s390/linux.mh: Likewise.
12726 * config/sh/nbsd.mh: Likewise.
12727 * config/sparc/fbsd.mh: Likewise.
12728 * config/sparc/linux.mh: Likewise.
12729 * config/sparc/linux64.mh: Likewise.
12730 * config/sparc/nbsd64.mh: Likewise.
12731 * config/sparc/nbsdelf.mh: Likewise.
12732 * config/sparc/obsd64.mh: Likewise.
12733 * config/sparc/sol2.mh: Likewise.
12734 * config/tilegx/linux.mh: Likewise.
12735 * config/vax/nbsdelf.mh: Likewise.
12736 * config/vax/obsd.mh: Likewise.
12737 * config/xtensa/linux.mh: Likewise.
12738 * config/i386/i386gnu.mn: New file, with excerpts from
12739 "config/i386/i386gnu.mh".
12740 * configure: Regenerate.
12741 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12742 *.mh files under "gdb/config".
12743 * configure.nat: New file, with contents from the
12744 "gdb/config/*/*.mh" files.
12748 * btrace.c (btrace_clear): Free insn vector.
12752 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12753 * configure: Regenerate.
12757 * Makefile.in (SFILES): Add progspace-and-thread.c.
12758 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12759 (COMMON_OBS): Add progspace-and-thread.o.
12760 * breakpoint.c: Include "progspace-and-thread.h".
12761 (update_inserted_breakpoint_locations)
12762 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12763 Use scoped_restore_current_pspace_and_thread.
12764 (create_std_terminate_master_breakpoint): Use
12765 scoped_restore_current_program_space.
12766 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12767 (print_breakpoint_location): Use
12768 scoped_restore_current_program_space.
12769 (bp_loc_is_permanent): Use
12770 scoped_restore_current_pspace_and_thread.
12771 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12772 (download_tracepoint_locations): Use
12773 scoped_restore_current_pspace_and_thread.
12774 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12775 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12776 (enum step_over_calls_kind): Moved from inferior.h.
12777 (class scoped_restore_current_thread): New class.
12778 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12780 (scoped_restore_current_thread): New class.
12781 * infcmd.c: Include "common/gdb_optional.h".
12782 (continue_1, proceed_after_attach): Use
12783 scoped_restore_current_thread.
12784 (notice_new_inferior): Use scoped_restore_current_thread.
12785 * inferior.c: Include "progspace-and-thread.h".
12786 (restore_inferior, save_current_inferior): Delete.
12787 (add_inferior_command, clone_inferior_command): Use
12788 scoped_restore_current_pspace_and_thread.
12789 * inferior.h (scoped_restore_current_inferior): New class.
12790 * infrun.c: Include "progspace-and-thread.h" and
12791 "common/gdb_optional.h".
12792 (follow_fork_inferior): Use
12793 scoped_restore_current_pspace_and_thread.
12794 (scoped_restore_exited_inferior): New class.
12795 (handle_vfork_child_exec_or_exit): Use
12796 scoped_restore_exited_inferior,
12797 scoped_restore_current_pspace_and_thread,
12798 scoped_restore_current_thread and scoped_restore.
12799 (fetch_inferior_event): Use scoped_restore_current_thread.
12800 * linespec.c (decode_line_full, decode_line_1): Use
12801 scoped_restore_current_program_space.
12802 * mi/mi-main.c: Include "progspace-and-thread.h".
12803 (exec_continue): Use scoped_restore_current_thread.
12804 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12805 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12806 * proc-service.c (ps_pglobal_lookup): Use
12807 scoped_restore_current_program_space.
12808 * progspace-and-thread.c: New file.
12809 * progspace-and-thread.h: New file.
12810 * progspace.c (release_program_space, clone_program_space): Use
12811 scoped_restore_current_program_space.
12812 (restore_program_space, save_current_program_space)
12813 (save_current_space_and_thread): Delete.
12814 (switch_to_program_space_and_thread): Moved to
12815 progspace-and-thread.c.
12816 * progspace.h (save_current_program_space)
12817 (save_current_space_and_thread): Delete declarations.
12818 (scoped_restore_current_program_space): New class.
12819 * remote.c (remote_btrace_maybe_reopen): Use
12820 scoped_restore_current_thread.
12821 * symtab.c: Include "progspace-and-thread.h".
12822 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12823 * thread.c (print_thread_info_1): Use
12824 scoped_restore_current_thread.
12825 (struct current_thread_cleanup): Delete.
12826 (do_restore_current_thread_cleanup)
12827 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12828 (scoped_restore_current_thread::~scoped_restore_current_thread):
12830 (make_cleanup_restore_current_thread): Rename/convert to ...
12831 (scoped_restore_current_thread::scoped_restore_current_thread):
12833 (thread_apply_all_command): Use scoped_restore_current_thread.
12834 (thread_apply_command): Use scoped_restore_current_thread.
12835 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12836 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12840 * thread.c (make_cleanup_restore_current_thread): Move
12841 find_thread_ptid call before the is_stopped call. Assert that the
12842 thread is found. Replace is_stopped call by checking the thread's
12843 state directly. Remove unnecessary NULL-thread check.
12847 * corelow.c (thread_section_name): New class.
12848 (get_core_register_section, get_core_siginfo): Use it.
12852 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12853 (get_core_register_section): Remove xfree of NULL pointer.
12857 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12858 * regcache.c (regcache::raw_supply_zeroed): New function.
12859 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12863 * gdbarch.sh: Remove commented out definition of
12865 * gdbarch.h: Re-generate.
12869 * configure: Regenerate.
12873 * solib-target.c (solib_target_relocate_section_addresses):
12874 Remove num_section_bases, num_bases, segment_bases variables.
12878 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12882 * solib-target.c: Include <vector>
12883 (struct lm_info_target) <~lm_info_target>: Remove.
12884 <segment_bases, section_bases>: Change type to
12885 std::vector<CORE_ADDR>.
12886 (library_list_start_segment, library_list_start_section,
12887 library_list_end_library,
12888 solib_target_relocate_section_addresses): Adjust.
12892 * gdbarch.sh (software_single_step): Change return type to
12893 std::vector<CORE_ADDR>.
12894 * gdbarch.c, gdbarch.h: Re-generate.
12895 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12897 (arm_deal_with_atomic_sequence_raw): Adjust.
12898 (thumb_get_next_pcs_raw): Adjust.
12899 (arm_get_next_pcs_raw): Adjust.
12900 (arm_get_next_pcs): Adjust.
12901 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12902 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12903 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12904 (alpha_software_single_step): Adjust.
12905 * alpha-tdep.h (alpha_software_single_step): Adjust.
12906 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12907 * arm-tdep.c (arm_software_single_step): Adjust.
12908 (arm_breakpoint_kind_from_current_state): Adjust.
12909 * arm-tdep.h (arm_software_single_step): Adjust.
12910 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12911 * cris-tdep.c (cris_software_single_step): Adjust.
12912 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12913 (micromips_deal_with_atomic_sequence): Adjust.
12914 (deal_with_atomic_sequence): Adjust.
12915 (mips_software_single_step): Adjust.
12916 * mips-tdep.h (mips_software_single_step): Adjust.
12917 * moxie-tdep.c (moxie_software_single_step): Adjust.
12918 * nios2-tdep.c (nios2_software_single_step): Adjust.
12919 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12920 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12921 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12922 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12923 * sparc-tdep.c (sparc_software_single_step): Adjust.
12924 * spu-tdep.c (spu_software_single_step): Adjust.
12925 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12929 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12930 * gdbarch.h: Re-generate.
12934 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12935 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12936 * python/py-instruction.c, python/py-instruction.h: New file.
12937 * python/py-record.c: Add py-instruction.h include.
12938 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12939 gdb.RecordInstruction.
12940 * python/python-internal.h: Add gdbpy_initialize_instruction
12942 * python/python.c (do_start_initialization): Add
12943 gdbpy_initialize_instruction.
12947 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12949 (btrace_func_from_recpy_func): New function.
12950 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12951 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12952 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12953 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12954 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12955 Also, use new helper functions.
12956 (btpy_list_item): Use new helper functions.
12957 (recpy_bt_function_call_history): Use new type name.
12958 (btpy_call_getset): Remove.
12959 (gdbpy_initialize_btrace): Remove code to initialize
12960 gdb.BtraceFunctionCall.
12961 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12962 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12963 recpy_bt_func_prev, recpy_bt_func_next): New export.
12964 * python/py-record.c (recpy_func_type): New static object.
12965 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12966 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12967 recpy_func_next): New function.
12968 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12969 (recpy_func_getset): New static object.
12970 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12971 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12975 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12976 (btpy_object, btpy_insn_type, btpy_new): Remove.
12977 (btpy_list_object): Use gdb.RecordInstruction type instead of
12978 gdb.BtraceInstruction type.
12979 (btrace_insn_from_recpy_insn): New function.
12980 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12982 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12983 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12984 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12985 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12986 instead of btpy_object.
12987 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12988 btpy_insn_data, btpy_insn_decode): Rename to ...
12989 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12990 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12991 recpy_bt_insn_decode): This. Also, use new helper functions.
12992 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12994 (btpy_insn_getset): Remove.
12995 (gdbpy_initialize_btrace): Remove code to initialize
12996 gdb.BtraceInstruction. Use recpy_element_object.
12997 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12998 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12999 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
13000 * python/py-record.c (recpy_insn_type): New static object.
13001 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
13002 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
13003 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
13005 (recpy_insn_getset): New static object.
13006 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
13007 * python/py-record.h (recpy_element_object): New typedef.
13008 (recpy_insn_type, recpy_insn_new): New export.
13012 * py-record-btrace.c (btpy_insn_new): Removed.
13013 (btpy_insn_or_gap_new): New function.
13014 (btpy_insn_error): Removed.
13015 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13016 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
13017 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
13018 btpy_insn_or_gap_new instead of btpy_insn_new.
13019 (btpy_insn_getset): Remove btpy_insn_error.
13020 * py-record.c (recpy_gap_type): New static object.
13021 (recpy_gap_object): New typedef.
13022 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
13023 recpy_gap_reason_string): New function.
13024 (recpy_gap_getset): New static object.
13025 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
13026 * py-record.h (recpy_gap_new): New export.
13030 * python/py-record.c (recpy_ptid): Remove.
13031 (recpy_record_getset): Remove recpy_ptid.
13035 * btrace.c (btrace_fetch): Set inferior_ptid.
13036 * python/py-record-btrace.c: Add "py-record.h" include.
13037 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
13038 recpy_bt_end, recpy_bt_instruction_history,
13039 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
13040 in gdb.Record object instead of current ptid.
13041 * python/py-record.c: Include new "py-record.h" file.
13042 (recpy_record_object): Moved to py-record.h.
13043 * python/py-record.h: New file.
13047 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
13048 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
13053 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13054 the past maintainers section.
13058 * infcmd.c (get_return_value): Use regcache ctor, and remove
13064 * regcache.c (regcache::regcache): New tag dispatch ctor.
13065 (do_cooked_read): Moved above.
13066 (regcache_dup): Use the tag dispatch ctor..
13067 * regcache.h (regcache): Declare ctor, delete copy ctor and
13068 assignment operator, remove friend regcache_dup.
13072 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13073 call method save instead of regcache_cpy.
13074 * regcache.h (struct regcache): Make regcache_dup a friend.
13078 * regcache.c (struct regcache): Move to regcache.h
13079 (regcache::arch): New method.
13080 (regcache_get_ptid): Update.
13081 (get_regcache_arch): Call arch method.
13082 (get_regcache_aspace): Call method aspace.
13083 (register_buffer): Change it to method.
13084 (regcache_save): Change it to regcache::save.
13085 (regcache_restore): Likewise.
13086 (regcache_cpy_no_passthrough): Remove the declaration.
13087 (regcache_cpy): Call methods restore and cpy_no_passthrough.
13088 (regcache_cpy_no_passthrough): Change it to method
13089 cpy_no_passthrough.
13090 (regcache_register_status): Change it to method
13091 get_register_status.
13092 (regcache_invalidate): Change it to method invalidate.
13093 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13094 (regcache_raw_update): Change it to method raw_update.
13095 (regcache_raw_read): Likewise.
13096 (regcache_raw_read_signed): Likewise.
13097 (regcache_raw_read_unsigned): Likewise.
13098 (regcache_raw_write_signed): Likewise.
13099 (regcache_raw_write_unsigned): Likewise.
13100 (regcache_cooked_read): Likewise.
13101 (regcache_cooked_read_value): Likewise.
13102 (regcache_cooked_read_signed): Likewise.
13103 (regcache_cooked_read_unsigned): Likewise.
13104 (regcache_cooked_write_signed): Likewise.
13105 (regcache_cooked_write_unsigned): Likewise.
13106 (regcache_raw_set_cached_value): Likewise.
13107 (regcache_raw_write): Likewise.
13108 (regcache_cooked_write): Likewise.
13109 (regcache_xfer_part): Likewise.
13110 (regcache_raw_read_part): Likewise.
13111 (regcache_raw_write_part): Likewise.
13112 (regcache_cooked_read_part): Likewise.
13113 (regcache_cooked_write_part): Likewise.
13114 (regcache_raw_supply): Likewise.
13115 (regcache_raw_collect): Likewise.
13116 (regcache_transfer_regset): Likewise.
13117 (regcache_supply_regset): Likewise.
13118 (regcache_collect_regset): Likewise.
13119 (regcache_debug_print_register): Likewise.
13120 (enum regcache_dump_what): Move it to regcache.h.
13121 (regcache_dump): Change it to method dump.
13122 * regcache.h (enum regcache_dump_what): New.
13123 (class regcache): New.
13124 * target.c (target_fetch_registers): Call method
13125 debug_print_register.
13126 (target_store_registers): Likewise.
13130 * windows-nat.c (struct lm_info_windows): Initialize field.
13131 (windows_make_so): Allocate lm_info_windows with new.
13132 (windows_free_so): Free lm_info_windows with delete.
13136 * solib-darwin.c (struct lm_info_darwin): Initialize field.
13137 (darwin_current_sos): Allocate lm_info_darwin with new, remove
13139 (darwin_free_so): Free lm_info_darwin with delete.
13143 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13144 <l_addr_p>: Change type to bool.
13145 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13146 (svr4_free_so): Free lm_info_svr4 with delete.
13147 (svr4_copy_library_list): Replace memcpy with call to copy
13149 (library_list_start_library, svr4_default_sos): Allocate
13150 lm_info_svr4 with new.
13154 * solib-target.c (struct lm_info_target): Add destructor,
13156 <name>: Change type to std::string.
13157 (library_list_start_library): Allocate lm_info_target with new.
13158 (solib_target_free_library_list): Free lm_info_target with
13160 (solib_target_current_sos): Adapt to std::string.
13161 (solib_target_free_so): Free lm_info_target with delete.
13165 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13167 (frv_current_sos): Allocate lm_info_frv with new.
13168 (frv_relocate_main_executable): Free lm_info_frv with delete,
13170 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13174 * solib-frv.c (struct lm_info_frv): Fix indentation.
13178 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13180 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13181 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13182 and allocate with new.
13183 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13187 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13188 <filename, member_name>: Change type to std::string.
13189 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13190 (library_list_start_library): Allocate lm_info_aix with new.
13191 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13192 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13193 with copy constructor.
13197 * solist.h (struct lm_info): Remove.
13198 (struct lm_info_base): New class.
13199 (struct so_list) <lm_info>: Change type to lm_info_base *.
13200 * nto-tdep.c (struct lm_info): Remove.
13202 * solib-aix.c (struct lm_info): Rename to ...
13203 (struct lm_info_aix): ... this. Extend lm_info_base.
13204 (lm_info_p): Rename to ...
13205 (lm_info_aix_p): ... this, and adjust.
13206 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13207 solib_aix_parse_libraries, library_list_start_library,
13208 solib_aix_free_library_list, solib_aix_parse_libraries,
13209 solib_aix_get_library_list,
13210 solib_aix_relocate_section_addresses, solib_aix_free_so,
13211 solib_aix_get_section_offsets,
13212 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13214 (struct solib_aix_inferior_data) <library_list>: Adjust.
13215 * solib-darwin.c (struct lm_info): Rename to ...
13216 (struct lm_info_darwin): ... this. Extend lm_info_base.
13217 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13218 * solib-dsbt.c (struct lm_info): Rename to ...
13219 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13220 (struct dsbt_info) <main_executable_lm_info): Adjust.
13221 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13222 dsbt_relocate_section_addresses): Adjust.
13223 * solib-frv.c (struct lm_info): Rename to ...
13224 (struct lm_info_frv): ... this. Extend lm_info_base.
13225 (main_executable_lm_info): Adjust.
13226 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13227 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13228 find_canonical_descriptor_in_load_object,
13229 frv_fdpic_find_canonical_descriptor): Adjust.
13230 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13232 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13233 svr4_clear_so, svr4_copy_library_list,
13234 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13235 svr4_current_sos, svr4_fetch_objfile_link_map,
13236 solist_update_incremental): Adjust.
13237 * solib-svr4.h (struct lm_info_svr4): Move here from
13239 * solib-target.c (struct lm_info): Rename to ...
13240 (struct lm_info_target): ... this. Extend lm_info_base.
13241 (lm_info_p): Rename to ...
13242 (lm_info_target_p): ... this.
13243 (solib_target_parse_libraries, library_list_start_segment,
13244 library_list_start_section, library_list_start_library,
13245 library_list_end_library, solib_target_free_library_list,
13246 solib_target_current_sos, solib_target_free_so,
13247 solib_target_relocate_section_addresses): Adjust.
13248 * windows-nat.c (struct lm_info): Rename to ...
13249 (struct lm_info_windows): ... this. Extend lm_info_base.
13250 (windows_make_so, handle_load_dll, handle_unload_dll,
13251 windows_xfer_shared_libraries): Adjust.
13255 * solib-darwin.c (struct darwin_so_list): Remove.
13256 (darwin_current_sos): Allocate an so_list object instead of a
13257 darwin_so_list, separately allocate an lm_info object.
13258 (darwin_free_so): Free lm_info.
13262 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13263 with fprintf_filtered.
13267 * regcache.c (regcache::regcache): New function.
13268 (regcache::~regcache): New function.
13269 (regcache_xmalloc_1): Remove.
13270 (regcache_xmalloc): Call new regcache.
13271 (regcache_xfree): Call delete regcache.
13272 (get_thread_arch_aspace_regcache): Call new regcache.
13276 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13277 lwp instead of ptid_get_lwp.
13281 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13282 lwp_info instead of getting from inferior_ptid.
13286 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13287 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13288 (CV_CONVERSION_BADNESS): Define.
13289 (rank_one_type): Remove overly restrictive rvalue reference
13291 Add cv-qualifier checks and subranks for type equality.
13292 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13293 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13294 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13298 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13299 count when creating the object.
13304 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13305 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13307 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13308 (process_xcoff_symbol): Likewise.
13309 (scan_xcoff_symtab): Likewise.
13313 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13314 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13315 (ia64_access_reg): Use get_frame_register_unsigned.
13316 (ia64_access_rse_reg): Likewise.
13317 (ia64_libunwind_frame_prev_register): Likewise.
13321 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13322 * gdbarch.c: Regenerated.
13323 * gdbarch.h: Regenerated.
13324 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13325 visibility external.
13326 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13327 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13328 (enum cfa_how_kind): Move to ...
13329 (struct dwarf2_frame_state_reg_info): Likewise.
13330 (struct dwarf2_frame_state): Likewise.
13331 * dwarf2-frame.h: ... here.
13332 (dwarf2_frame_state_alloc_regs): New declaration.
13333 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13334 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13338 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13339 regcache_raw_read_unsigned.
13340 (xtensa_pseudo_register_write): Likewise.
13344 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13345 (nds32_pseudo_register_write): Likewise.
13349 * regcache.c (struct regcache) <readonly_p>: Change its type
13351 (regcache_xmalloc_1): Update parameter type and callers update.
13355 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13356 set_gdbarch_wchar_bit.
13357 * arm-tdep.c (arm_gdbarch_init): Likewise.
13361 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13362 (BothAreRelocatable, memcopy, memmove): Don't define.
13363 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13368 * common/common-defs.h: Include "common/poison.h".
13369 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13371 * common/poison.h: New file.
13372 * common/traits.h: Include <type_traits>.
13373 (Not, Or, Requires): New, moved from common/function-view.h.
13377 * breakpoint.h (struct breakpoint): In-class initialize all
13378 fields. Make boolean fields "bool".
13379 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13380 memset call and initializations no longer necessary.
13384 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13386 (pt_btrace_insn): New function.
13387 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13391 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13392 "base" field and inherit from "bp_location" instead. Add
13394 (allocate_location_exception): Use new non-default ctor.
13395 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13396 (init_bp_location): Convert to ...
13397 (bp_location::bp_location): ... this new ctor, and remove memset
13399 (base_breakpoint_allocate_location): Use the new non-default ctor.
13400 * breakpoint.h (bp_location): Now a class. Declare default and
13401 non-default ctors. In-class initialize all members.
13402 (init_bp_location): Remove declaration.
13406 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13407 assignment operator.
13411 * doublest.c (convert_doublest_to_floatformat): Call
13412 floatformat_totalsize_bytes.
13416 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13418 * stack.c (print_frame): Use ui_out_emit_list.
13419 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13421 * mi/mi-main.c (print_one_inferior)
13422 (mi_cmd_data_list_register_names)
13423 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13424 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13426 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13427 (mi_output_solib_attribs): Use ui_out_emit_list,
13429 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13430 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13431 (mi_cmd_stack_list_args, list_args_or_locals): Use
13433 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13434 * breakpoint.c (print_solib_event, output_thread_groups): Use
13439 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13440 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13441 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13445 * tracepoint.c (tvariables_info_1)
13446 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13450 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13451 annotate_arg_emitter.
13452 * breakpoint.c (print_mention_watchpoint)
13453 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13454 * annotate.h (struct annotate_arg_emitter): New.
13458 * record-btrace.c (record_btrace_insn_history)
13459 (record_btrace_insn_history_range, record_btrace_call_history)
13460 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13461 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13463 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13464 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13465 * skip.c (skip_info): Use ui_out_emit_tuple.
13466 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13467 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13468 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13469 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13470 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13472 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13473 (output_register, mi_cmd_data_read_memory)
13474 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13475 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13476 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13477 Use ui_out_emit_tuple.
13478 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13480 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13481 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13482 * linux-thread-db.c (info_auto_load_libthread_db): Use
13484 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13485 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13486 * disasm.c (do_mixed_source_and_assembly_deprecated)
13487 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13488 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13489 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13490 * breakpoint.c (print_one_breakpoint_location)
13491 (print_one_breakpoint): Use ui_out_emit_tuple.
13492 * auto-load.c (print_script, info_auto_load_cmd): Use
13494 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13498 * thread.c (print_thread_info_1): Remove dead code.
13502 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13504 * arm-tdep.c (selftests::arm_record_test): Likewise.
13508 * regcache.c (regcache_restore): Remove argument 2. Replace
13509 argument 3 with regcache. Get register status from
13510 src->register_status and get register contents from
13511 register_buffer (src, regnum).
13512 (regcache_cpy): Update.
13516 * gdbthread.h (thread): Add missing closing parenthesis in
13521 * common/refcounted-object.h: New file.
13522 * gdbthread.h: Include "common/refcounted-object.h".
13523 (thread_info): Inherit from refcounted_object and add comments.
13524 (thread_info::incref, thread_info::decref)
13525 (thread_info::m_refcount): Delete.
13526 (thread_info::deletable): Use the refcounted_object::refcount()
13528 * inferior.c (current_inferior_): Add comment.
13529 (set_current_inferior): Increment/decrement refcounts.
13530 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13531 not-deletable instead of comparing with the current inferior.
13532 (initialize_inferiors): Increment the initial inferior's refcount.
13533 * inferior.h (struct inferior): Forward declare.
13534 Include "common/refcounted-object.h".
13535 (current_inferior, set_current_inferior): Move declaration to
13536 before struct inferior's definition, and fix comment.
13537 (inferior): Inherit from refcounted_object. Add comments.
13538 * thread.c (switch_to_thread_no_regs): Reference the thread's
13539 inferior pointer directly instead of doing a ptid lookup.
13540 (switch_to_no_thread): New function.
13541 (switch_to_thread(thread_info *)): New function, factored out
13543 (switch_to_thread(ptid_t)): ... this.
13544 (restore_current_thread): Delete.
13545 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13546 fields, and add 'inf' field.
13547 (do_restore_current_thread_cleanup): Check whether old->inf is
13548 alive instead of looking up an inferior by ptid. Use
13549 switch_to_thread and switch_to_no_thread.
13550 (restore_current_thread_cleanup_dtor): Use old->inf directly
13551 instead of lookup up an inferior by id. Decref the inferior.
13552 Don't restore 'removable'.
13553 (make_cleanup_restore_current_thread): Same the inferior pointer
13554 in old, instead of the inferior number. Incref the inferior.
13555 Don't save/clear 'removable'.
13559 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13560 unittests/scoped_restore-selftests.c.
13561 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13562 * common/scoped_restore.h (scoped_restore_base): Make "class".
13563 (scoped_restore_base::release): New public method.
13564 (scoped_restore_base::scoped_restore_base): New protected ctor.
13565 (scoped_restore_base::m_saved_var): New protected field.
13566 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13567 scoped_restore_base base class instead of m_saved_var directly.
13568 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13569 (scoped_restore_tmpl::scoped_restore_tmpl(const
13570 scoped_restore_tmpl<T>&)): Likewise.
13571 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13573 (scoped_restore_tmpl::saved_var): New method.
13574 (scoped_restore_tmpl::m_saved_var): Delete.
13575 * inferior.h (inferior::detaching): Now a bool.
13576 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13578 * unittests/scoped_restore-selftests.c: New file.
13582 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13583 Re-sort in alphabetic order.
13587 * xml-support.c (obstack_xml_printf): Delete.
13588 * xml-support.h (obstack_xml_printf): Delete.
13592 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13593 vdebug, verror, body_text, start_element, end_element, name,
13594 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13595 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13596 is_xinclude>: Make private and add m_ prefix.
13597 (gdb_xml_parser::body_text): New method, based on ...
13598 (gdb_xml_body_text): ... this. Adjust.
13599 (gdb_xml_parser::vdebug): New method, based on ...
13600 (gdb_xml_debug): ... this. Adjust.
13601 (gdb_xml_parser::verror): New method, based on ...
13602 (gdb_xml_error): ... this. Adjust.
13603 (gdb_xml_parser::start_element): New method, based on ...
13604 (gdb_xml_start_element): ... this. Adjust.
13605 (gdb_xml_start_element_wrapper): Defer to
13606 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13607 (gdb_xml_parser::end_element): New method, based on ...
13608 (gdb_xml_end_element_wrapper): ... this. Adjust.
13609 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13610 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13611 (gdb_xml_parser::use_dtd): New method, based on ...
13612 (gdb_xml_use_dtd): ... this. Adjust.
13613 (gdb_xml_parser::parse): New method, based on ...
13614 (gdb_xml_parse): ... this. Adjust.
13615 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13616 (xinclude_start_include): Adjust to call the parser's name method.
13617 (xml_xinclude_default, xml_xinclude_start_doctype)
13618 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13620 (xml_process_xincludes): Adjust to call parser methods.
13621 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13626 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13627 gdb::optional<std::string>.
13628 * xml-support.c: Include <string>.
13629 (scope_level::scope_level(scope_level &&))
13630 (scope_level::~scope_level): Delete.
13631 (scope_level::body): Now a std::string.
13632 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13633 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13635 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13636 (xinclude_parsing_data::output): Now a std::string reference.
13637 (xinclude_start_include): Adjust.
13638 (xml_xinclude_default): Adjust.
13639 (xml_process_xincludes): Add 'output' parameter, and return bool.
13640 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13642 * xml-tdesc.c: Include <unordered_map> and <string>.
13643 (tdesc_xml_cache): Delete.
13644 (tdesc_xml_cache_s): Delete.
13645 (xml_cache): Now an std::unordered_map.
13646 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13647 (target_fetch_description_xml): Change return type to
13648 gdb::optional<std::string>, and adjust.
13649 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13650 (target_fetch_description_xml): Change return type to
13651 gdb::optional<std::string>.
13655 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13656 unittests/optional-selftests.c.
13657 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13658 * unittests/optional-selftests.c: New file.
13659 * unittests/optional/assignment/1.cc: New file.
13660 * unittests/optional/assignment/2.cc: New file.
13661 * unittests/optional/assignment/3.cc: New file.
13662 * unittests/optional/assignment/4.cc: New file.
13663 * unittests/optional/assignment/5.cc: New file.
13664 * unittests/optional/assignment/6.cc: New file.
13665 * unittests/optional/assignment/7.cc: New file.
13666 * unittests/optional/cons/copy.cc: New file.
13667 * unittests/optional/cons/default.cc: New file.
13668 * unittests/optional/cons/move.cc: New file.
13669 * unittests/optional/cons/value.cc: New file.
13670 * unittests/optional/in_place.cc: New file.
13671 * unittests/optional/observers/1.cc: New file.
13672 * unittests/optional/observers/2.cc: New file.
13676 * common/gdb_optional.h: Include common/traits.h.
13677 (in_place_t): New type.
13678 (in_place): New constexpr variable.
13679 (optional::optional): Remove member initialization of
13681 (optional::optional(in_place_t...)): New constructor.
13682 (optional::~optional): Use reset.
13683 (optional::optional(const optional&)): New.
13684 (optional::optional(const optional&&)): New.
13685 (optional::optional(T &)): New.
13686 (optional::optional(T &&)): New.
13687 (operator::operator=(const optional &)): New.
13688 (operator::operator=(optional &&)): New.
13689 (operator::operator= (const T &))
13690 (operator::operator= (T &&))
13691 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13692 (operator::reset): New.
13693 (operator::m_instantiated):: Add in-class initializer.
13694 * common/traits.h: Include <type_traits>.
13695 (struct And): New types.
13699 * xml-support.c: Include <vector>.
13700 (scope_level::scope_level(const gdb_xml_element *))
13701 (scope_level::scope_level(scope_level&&)): New.
13702 (scope_level::~scope_level): New.
13703 (scope_level_s): Delete.
13704 (gdb_xml_parser::scopes): Now a std::vector.
13705 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13707 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13708 scope cleanup code.
13709 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13710 of the scopes member. Use std::vector::emplace_back.
13714 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13716 (gdb_xml_end_element): Change type of first parameter.
13717 (gdb_xml_cleanup): Rename to ...
13718 (gdb_xml_parser::~gdb_xml_parser): ... this.
13719 (gdb_xml_create_parser_and_cleanup): Delete with ...
13720 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13722 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13723 using gdb_xml_create_parser_and_cleanup.
13724 (xinclude_parsing_data): Add ctor/dtor.
13725 (xml_xinclude_cleanup): Delete.
13726 (xml_process_xincludes): Create a local xinclude_parsing_data
13727 instead of heap-allocating one. Create a local gdb_xml_parser
13728 instead of heap-allocating one with
13729 gdb_xml_create_parser_and_cleanup.
13734 * fbsd-nat.c (resume_one_thread_cb): Remove.
13735 (resume_all_threads_cb): Remove.
13736 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13737 iterate_over_threads.
13741 * NEWS: Create a new section for the next release branch.
13742 Rename the section of the current branch, now that it has
13747 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13748 * version.in: Bump version to 8.0.50.DATE-git.
13753 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13754 independently of the host, and fix build breakage on Cygwin.
13758 * inferior.c (free_inferior): Convert to ...
13759 (inferior::~inferior): ... this dtor.
13760 (inferior::inferior): New ctor, factored out from ...
13761 (add_inferior_silent): ... here. Allocate the inferior with a new
13763 (delete_inferior): Call delete instead of free_inferior.
13764 * inferior.h (gdb_environ, continuation): Forward declare.
13765 (inferior): Now a class. Add in-class initialization to all
13766 members. Make boolean fields bool, except 'detaching'.
13767 (inferior::inferior): New explicit ctor.
13768 (inferior::~inferior): New.
13772 * inferior.c (init_inferior_list): Delete.
13773 * inferior.h (init_inferior_list): Delete.
13778 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13779 (top level): Call it twice, with different thread sets.
13783 * thread.c: Include <algorithm>.
13784 (thread_array_cleanup): Delete.
13785 (scoped_inc_dec_ref): New class.
13786 (live_threads_count): New function.
13787 (set_thread_refcount): Delete.
13788 (tp_array_compar_ascending): Now a bool.
13789 (tp_array_compar): Convert to a std::sort comparison function.
13790 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13791 and live_threads_count.
13795 * infrun.c (follow_fork_inferior): Also switch the current
13800 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13801 before calling create_internal_breakpoint.
13805 * fork-child.c (execv_argv): New class.
13806 (breakup_args): Refactored as ...
13807 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13808 Copy arguments to storage and replace separators with NULL
13809 terminators in place.
13810 (escape_bang_in_quoted_argument): Adjust to return bool.
13811 (execv_argv::execv_argv): New ctor.
13812 (execv_argv::init_for_shell): New method, factored out from
13813 fork_inferior. Don't strdup strings into the vector.
13814 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13815 Remove free_vector_argv call.
13819 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13824 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13825 * rx-tdep.c (rx_gdbarch_init): Likewise.
13829 * breakpoint.h (struct breakpoint): Reindent.
13833 * breakpoint.c (bp_location): Rename to ...
13834 (bp_locations): ... this. All references updated.
13835 (bp_location_count): Rename to ...
13836 (bp_locations_count): ... this. All references updated.
13837 (bp_location_placed_address_before_address_max): Rename to ...
13838 (bp_locations_placed_address_before_address_max): ... this. All
13839 references updated.
13840 (bp_location_shadow_len_after_address_max): Rename to ...
13841 (bp_locations_shadow_len_after_address_max): ... this. All
13842 references updated.
13843 (bp_location_compare_addrs): Rename to ...
13844 (bp_locations_compare_addrs): ... this. All references updated.
13845 (bp_location_compare):Rename to ...
13846 (bp_locations_compare): ... this. All references updated.
13847 (bp_location_target_extensions_update): Rename to ...
13848 (bp_locations_target_extensions_update): ... this. All references
13853 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13854 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13856 * common/gdb_termios.h: New file, with parts of "terminal.h".
13857 * inflow.c: Include "gdb_termios.h".
13858 * ser-unix.c: Include "gdb_termios.h".
13859 * terminal.h: Move terminal-related defines to
13860 "common/gdb_termios.h".
13864 * probe.c (parse_probes): Update.
13865 * location.h (delete_event_location): Don't declare.
13866 (event_location_deleter::operator()): Update.
13867 * location.c (event_location_deleter::operator()): Rename from
13868 delete_event_location.
13869 * linespec.h (linespec_result) <location>: Change type to
13871 * linespec.c (canonicalize_linespec, event_location_to_sals)
13872 (decode_objc): Update.
13873 (linespec_result): Don't call delete_event_location.
13874 * breakpoint.c (create_breakpoints_sal)
13875 (bkpt_probe_create_sals_from_location)
13876 (strace_marker_create_sals_from_location): Update.
13880 * linespec.h (struct linespec_result): Add constructor and
13882 (init_linespec_result, destroy_linespec_result)
13883 (make_cleanup_destroy_linespec_result): Don't declare.
13884 * linespec.c (init_linespec_result): Remove.
13885 (linespec_result::~linespec_result): Rename from
13886 destroy_linespec_result. Update.
13887 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13889 * breakpoint.c (create_breakpoint, break_range_command)
13890 (decode_location_default): Update.
13891 * ax-gdb.c (agent_command_1): Update.
13895 * remote.c (remote_download_tracepoint): Update.
13896 * python/py-breakpoint.c (bppy_get_location): Update.
13897 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13898 (gdbscm_breakpoint_location): Update.
13899 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13900 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13901 Change type to event_location_up.
13902 * breakpoint.c (create_overlay_event_breakpoint)
13903 (create_longjmp_master_breakpoint)
13904 (create_std_terminate_master_breakpoint)
13905 (create_exception_master_breakpoint)
13906 (breakpoint_event_location_empty_p, print_breakpoint_location)
13907 (print_one_breakpoint_location, create_thread_event_breakpoint)
13908 (init_breakpoint_sal, create_breakpoint)
13909 (print_recreate_ranged_breakpoint, break_range_command)
13910 (init_ada_exception_breakpoint, say_where): Update.
13911 (base_breakpoint_dtor): Don't call delete_event_location.
13912 (bkpt_print_recreate, tracepoint_print_recreate)
13913 (dprintf_print_recreate, update_static_tracepoint)
13914 (breakpoint_re_set_default): Update.
13918 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13919 type of "to_do". Update.
13920 (compute_stack_depth): Use std::vector.
13924 * printcmd.c (find_instruction_backward): Use std::vector.
13928 * symfile.c (objfilep): Remove typedef.
13929 (reread_symbols): Use a std::vector.
13933 * mi/mi-main.c (exec_direction_forward): Remove.
13934 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13935 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13937 * guile/guile.c (guile_repl_command, guile_command)
13938 (gdbscm_execute_gdb_command): Use scoped_restore.
13939 * go-exp.y (go_parse): Use scoped_restore.
13940 * d-exp.y (d_parse): Use scoped_restore.
13941 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13942 * c-exp.y (c_parse): Use scoped_restore.
13946 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13947 (mi_parse): Update return type.
13948 (mi_parse_free): Remove.
13949 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13950 (mi_parse::~mi_parse): Rename from mi_parse_free.
13951 (mi_parse_cleanup): Remove.
13952 (mi_parse): Return a unique_ptr. Use new.
13953 * mi/mi-main.c (mi_execute_command): Update.
13957 * location.c (explicit_location_lex_one): Return a
13958 unique_xmalloc_ptr.
13959 (string_to_explicit_location): Update. Remove cleanups.
13963 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13964 (compare_value_and_voffset): Change type. Update.
13965 (compute_vtable_size): Change type of "offset_vec".
13966 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13967 (gnuv3_get_typeid): Remove extraneous declaration.
13971 * charset.h (wchar_iterator): Fix comment.
13975 * charset.c (iconv_wrapper): New class.
13976 (cleanup_iconv): Remove.
13977 (convert_between_encodings): Use it.
13981 * symfile.h (increment_reading_symtab): Update type.
13982 * symfile.c (decrement_reading_symtab): Remove.
13983 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13984 * psymtab.c (psymtab_to_symtab): Update.
13985 * dwarf2read.c (dw2_instantiate_symtab): Update.
13989 * jit.c (struct jit_reader): Declare separately. Add constructor
13990 and destructor. Change type of "handle".
13991 (loaded_jit_reader): Define separately.
13992 (jit_reader_load): Update. New "new".
13993 (jit_reader_unload_command): Use "delete".
13994 * gdb-dlfcn.h (struct dlclose_deleter): New.
13995 (gdb_dlhandle_up): New typedef.
13996 (gdb_dlopen, gdb_dlsym): Update types.
13997 (gdb_dlclose): Remove.
13998 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13999 (gdb_dlsym): Change type of "handle".
14000 (make_cleanup_dlclose): Remove.
14001 (dlclose_deleter::operator()): Rename from gdb_dlclose.
14002 * compile/compile-c-support.c (load_libcc): Update.
14006 * symtab.h (find_pcs_for_symtab_line): Change return type.
14007 * symtab.c (find_pcs_for_symtab_line): Change return type.
14008 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
14009 type of "vec". Update.
14010 (ltpy_get_pcs_for_line): Update.
14011 * linespec.c (decode_digits_ordinary): Update.
14015 * tracepoint.c (actions_command): Update.
14016 * python/python.c (python_command, python_interactive_command):
14018 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
14019 * guile/guile.c (guile_command): Update.
14020 * defs.h (read_command_lines, read_command_lines_1): Return
14022 (command_lines_deleter): New struct.
14023 (command_line_up): New typedef.
14024 * compile/compile.c (compile_code_command)
14025 (compile_print_command): Update.
14026 * cli/cli-script.h (get_command_line, copy_command_lines): Return
14028 (make_cleanup_free_command_lines): Remove.
14029 * cli/cli-script.c (get_command_line, read_command_lines_1)
14030 (copy_command_lines): Return command_line_up.
14031 (while_command, if_command, read_command_lines, define_command)
14032 (document_command): Update.
14033 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
14035 * breakpoint.h (breakpoint_set_commands): Change type of
14037 * breakpoint.c (breakpoint_set_commands): Change type of
14038 "commands". Update.
14039 (do_map_commands_command, update_dprintf_command_list)
14040 (create_tracepoint_from_upload): Update.
14044 * tracepoint.c (scope_info): Update.
14045 * spu-tdep.c (spu_catch_start): Update.
14046 * python/python.c (gdbpy_decode_line): Update.
14047 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
14048 * python/py-breakpoint.c (bppy_init): Update.
14049 * probe.c (parse_probes): Update.
14050 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14051 * location.h (event_location_deleter): New struct.
14052 (event_location_up): New typedef.
14053 (new_linespec_location, new_address_location, new_probe_location)
14054 (new_explicit_location, copy_event_location)
14055 (string_to_event_location, string_to_event_location_basic)
14056 (string_to_explicit_location): Update return type.
14057 (make_cleanup_delete_event_location): Remove.
14058 * location.c (new_linespec_location, new_address_location)
14059 (new_probe_location, new_explicit_location, copy_event_location):
14060 Return event_location_up.
14061 (delete_event_location_cleanup)
14062 (make_cleanup_delete_event_location): Remove.
14063 (string_to_explicit_location, string_to_event_location_basic)
14064 (string_to_event_location): Return event_location_up.
14065 * linespec.c (canonicalize_linespec, event_location_to_sals)
14066 (decode_line_with_current_source)
14067 (decode_line_with_last_displayed, decode_objc): Update.
14068 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14069 * completer.c (location_completer): Update.
14070 * cli/cli-cmds.c (edit_command, list_command): Update.
14071 * breakpoint.c (create_overlay_event_breakpoint)
14072 (create_longjmp_master_breakpoint)
14073 (create_std_terminate_master_breakpoint)
14074 (create_exception_master_breakpoint)
14075 (create_thread_event_breakpoint): Update.
14076 (init_breakpoint_sal): Update. Remove some dead code.
14077 (create_breakpoint_sal): Change type of "location". Update.
14078 (create_breakpoints_sal, create_breakpoint, break_command_1)
14079 (dprintf_command, break_range_command, until_break_command)
14080 (init_ada_exception_breakpoint)
14081 (strace_marker_create_sals_from_location)
14082 (update_static_tracepoint, trace_command, ftrace_command)
14083 (strace_command, create_tracepoint_from_upload): Update.
14084 * break-catch-throw.c (re_set_exception_catchpoint): Update.
14085 * ax-gdb.c (agent_command_1): Update.
14089 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14090 * configure.tgt: Handle i[34567]86-*-go32* and
14091 i[34567]86-*-msdosdjgpp*.
14092 * i386-tdep.c (i386_svr4_reg_to_regnum):
14094 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14096 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14097 * i386-go32-tdep.c: New file.
14098 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14103 * aix-thread.c (pd_status2str): Change return type to const char *.
14107 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14108 calls to set_gdbarch_gnu_triplet_regexp.
14113 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14115 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14116 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14117 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14118 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14119 * gdbarch.h, gdbarch.c: Regenerate.
14120 * aarch64-tdep.c (aarch64_gdbarch_init): Override
14121 gdbarch_wchar_bit and gdbarch_wchar_signed.
14122 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14123 * arm-tdep.c (arm_gdbarch_init): Likewise.
14124 * avr-tdep.c (avr_gdbarch_init): Likewise.
14125 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14126 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14127 * i386-tdep.c (i386_go32_init_abi): Likewise.
14128 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14129 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14130 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14131 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14132 * sh-tdep.c (sh_gdbarch_init): Likewise.
14133 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14134 * sparc64-tdep.c (sparc64_init_abi): Likewise.
14135 * windows-tdep.c (windows_init_abi): Likewise.
14136 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14141 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14142 cplus_primitive_type_char32_t>: New enum values.
14143 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14144 and cplus_primitive_type_char32_t.
14145 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14146 32, use the archtecture's built-in type for char16_t and char32_t,
14147 respectively. Otherwise, fallback to init_integer_type as before,
14148 but make the type unsigned, and issue a complaint.
14149 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14153 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
14154 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14158 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14163 * common/common-utils.c (free_vector_argv): New function.
14164 * common/common-utils.h: Include <vector>.
14165 (free_vector_argv): New prototype.
14166 * darwin-nat.c (darwin_create_inferior): Rewrite function
14167 prototype in order to constify "exec_file" and accept a
14168 "std::string" for "allargs".
14169 * fork-child.c: Include <vector>.
14170 (breakup_args): Rewrite function, using C++.
14171 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14172 and accept "std::string" for "allargs". Update the code to
14173 calculate "argv" based on "allargs". Update calls to "exec_fun"
14175 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14176 order to constify "exec_file" and accept a "std::string" for
14178 * go32-nat.c (go32_create_inferior): Likewise.
14179 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14180 * infcmd.c (run_command_1): Constify "exec_file". Use
14181 "std::string" for inferior arguments.
14182 * inferior.h (fork_inferior): Update prototype.
14183 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14184 prototype in order to constify "exec_file" and accept a
14185 "std::string" for "allargs".
14186 * nto-procfs.c (procfs_create_inferior): Likewise.
14187 * procfs.c (procfs_create_inferior): Likewise.
14188 * remote-sim.c (gdbsim_create_inferior): Likewise.
14189 * remote.c (extended_remote_run): Update code to accept
14190 "std::string" as argument.
14191 (extended_remote_create_inferior): Rewrite function prototype in
14192 order to constify "exec_file" and accept a "std::string" for
14194 * rs6000-nat.c (super_create_inferior): Likewise.
14195 (rs6000_create_inferior): Likewise.
14196 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14197 * windows-nat.c (windows_create_inferior): Likewise.
14201 * thread.c: Fix whitespace throughout.
14205 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14209 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14214 * osdata.c (info_osdata): Check if 'type' is an empty string
14219 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14220 (ptid_to_global_thread_id, in_thread_list)
14221 (do_captured_list_thread_ids, set_resumed, set_running)
14222 (set_executing, set_stop_requested, finish_thread_state)
14223 (validate_registers_access, can_access_registers_ptid)
14224 (print_thread_info_1, switch_to_thread)
14225 (do_restore_current_thread_cleanup)
14226 (make_cleanup_restore_current_thread, thread_command)
14227 (thread_name_command): Use operator== instead of ptid_equal.
14231 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14232 (current_thread_cleanup_chain): Delete.
14233 (restore_current_thread_cleanup_dtor)
14234 (make_cleanup_restore_current_thread): Remove references to
14235 current_thread_cleanup_chain.
14239 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14245 * gdbthread.h (thread_info::deletable): New method.
14246 (thread_info::incref): New method.
14247 (thread_info::decref): New method.
14248 (thread_info::refcount): Move it to private.
14249 * infrun.c (save_stop_context): Call inc_refcount.
14250 (release_stop_context_cleanup): Likewise.
14251 * thread.c (set_thread_exited): New function.
14252 (init_thread_list): Delete "tp" only it is deletable, otherwise
14253 call set_thread_exited.
14254 (delete_thread_1): Call set_thread_exited.
14255 (current_thread_cleanup) <inferior_pid>: Remove.
14256 <thread>: New field.
14257 (restore_current_thread_ptid_changed): Removed.
14258 (do_restore_current_thread_cleanup): Adjust.
14259 (restore_current_thread_cleanup_dtor): Don't call
14261 (set_thread_refcount): Use dec_refcount.
14262 (make_cleanup_restore_current_thread): Adjust.
14263 (thread_apply_all_command): Call inc_refcount.
14264 (_initialize_thread): Don't call
14265 observer_attach_thread_ptid_changed.
14269 * thread.c (delete_thread_1): Hoist code on marking thread as
14274 * windows-nat.c (windows_detach): Initialize ptid with
14279 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14283 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14284 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14285 (bfin_pseudo_register_write): Likewise
14289 * common/ptid.h (struct ptid): Change to...
14290 (class ptid_t): ... this.
14291 <ptid_t>: New constructors.
14292 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14293 matches>: New methods.
14294 <make_null, make_minus_one>: New static methods.
14295 <pid>: Rename to...
14297 <lwp>: Rename to...
14299 <tid>: Rename to...
14301 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14302 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14303 as references, move comment to class ptid_t.
14304 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14305 ptid_t static methods.
14306 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14307 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14308 Take ptid arguments as references, implement using ptid_t methods.
14309 * unittests/ptid-selftests.c: New file.
14310 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14311 unittests/ptid-selftests.c.
14312 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14316 * python/python.c (python_run_simple_file): Cast mode literal to
14317 non-const char pointer as expected by PyFile_FromString.
14321 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14322 minus_one_ptid and null_ptid.
14326 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14327 * configure: Regenerate.
14331 * ada-exp.y (yyerror): Constify.
14332 * ada-lang.c (bound_name, get_selections)
14333 (ada_variant_discrim_type)
14334 (ada_variant_discrim_name, ada_value_struct_elt)
14335 (ada_lookup_struct_elt_type, is_unchecked_variant)
14336 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14337 (catch_ada_exception_command_split)
14338 (catch_ada_assert_command_split, catch_assert_command)
14339 (ada_op_name): Constify.
14340 * ada-lang.h (ada_yyerror, get_selections)
14341 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14342 * arc-tdep.c (arc_print_frame_cache): Constify.
14343 * arm-tdep.c (arm_skip_stub): Constify.
14344 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14345 (gen_aggregate_elt_ref): Constify.
14346 * bcache.c (print_bcache_statistics): Constify.
14347 * bcache.h (print_bcache_statistics): Constify.
14348 * break-catch-throw.c (catch_exception_command_1):
14349 * breakpoint.c (struct ep_type_description::description):
14351 (add_solib_catchpoint): Constify.
14352 (catch_fork_command_1): Add cast.
14353 (add_catch_command): Constify.
14354 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14356 * bsd-uthread.c (bsd_uthread_state): Constify.
14357 * buildsym.c (patch_subfile_names): Constify.
14358 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14360 * c-exp.y (yyerror): Constify.
14361 (token::oper): Constify.
14362 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14363 * c-varobj.c (cplus_describe_child): Constify.
14364 * charset.c (find_charset_names): Add cast.
14365 (find_charset_names): Constify array and add const_cast.
14366 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14367 (edit_command): Constify.
14368 * cli/cli-decode.c (lookup_cmd): Constify.
14369 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14371 (struct dump_context): Constify.
14372 (add_dump_command, restore_command): Constify.
14373 * cli/cli-script.c (get_command_line): Constify.
14374 * cli/cli-script.h (get_command_line): Constify.
14375 * cli/cli-utils.c (check_for_argument): Constify.
14376 * cli/cli-utils.h (check_for_argument): Constify.
14377 * coff-pe-read.c (struct read_pe_section_data): Constify.
14378 * command.h (lookup_cmd): Constify.
14379 * common/print-utils.c (decimal2str): Constify.
14380 * completer.c (gdb_print_filename): Constify.
14381 * corefile.c (set_gnutarget): Constify.
14382 * cp-name-parser.y (yyerror): Constify.
14383 * cp-valprint.c (cp_print_class_member): Constify.
14384 * cris-tdep.c (cris_register_name, crisv32_register_name):
14386 * d-exp.y (yyerror): Constify.
14387 (struct token::oper): Constify.
14388 * d-lang.h (d_yyerror): Constify.
14389 * dbxread.c (struct header_file_location::name): Constify.
14390 (add_old_header_file, add_new_header_file, last_function_name)
14391 (dbx_next_symbol_text, add_bincl_to_list)
14392 (find_corresponding_bincl_psymtab, set_namestring)
14393 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14394 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14395 * defs.h (command_line_input, print_address_symbolic)
14396 (deprecated_readline_begin_hook): Constify.
14397 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14399 * event-top.c (handle_line_of_input): Constify and add cast.
14400 * exceptions.c (catch_errors): Constify.
14401 * exceptions.h (catch_errors): Constify.
14402 * expprint.c (print_subexp_standard, op_string, op_name)
14403 (op_name_standard, dump_raw_expression, dump_raw_expression):
14404 * expression.h (op_name, op_string, dump_raw_expression):
14406 * f-exp.y (yyerror): Constify.
14407 (struct token::oper): Constify.
14408 (struct f77_boolean_val::name): Constify.
14409 * f-lang.c (f_word_break_characters): Constify.
14410 * f-lang.h (f_yyerror): Constify.
14411 * fork-child.c (fork_inferior): Add cast.
14412 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14413 (new_variant): Constify.
14414 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14415 * gdbarch.c: Regenerate.
14416 * gdbcore.h (set_gnutarget): Constify.
14417 * go-exp.y (yyerror): Constify.
14418 (token::oper): Constify.
14419 * go-lang.h (go_yyerror): Constify.
14420 * go32-nat.c (go32_sysinfo): Constify.
14421 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14422 * guile/scm-cmd.c (cmdscm_function): Constify.
14423 * guile/scm-param.c (pascm_param_value): Constify.
14424 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14425 (h8300sx_register_name): Constify.
14426 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14428 * ia64-tdep.c (ia64_register_names): Constify.
14429 * infcmd.c (construct_inferior_arguments): Constify.
14430 (path_command, attach_post_wait): Constify.
14431 * language.c (show_range_command, show_case_command)
14432 (unk_lang_error): Constify.
14433 * language.h (language_defn::la_error)
14434 (language_defn::la_name_of_this): Constify.
14435 * linespec.c (decode_line_2): Constify.
14436 * linux-thread-db.c (thread_db_err_str): Constify.
14437 * lm32-tdep.c (lm32_register_name): Constify.
14438 * m2-exp.y (yyerror): Constify.
14439 * m2-lang.h (m2_yyerror): Constify.
14440 * m32r-tdep.c (m32r_register_names): Constify and make static.
14441 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14442 * m88k-tdep.c (m88k_register_name): Constify.
14443 * macroexp.c (appendmem): Constify.
14444 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14445 (upgrade_type, parse_external, parse_partial_symbols)
14446 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14447 (new_symbol): Constify.
14448 * memattr.c (mem_info_command): Constify.
14449 * mep-tdep.c (register_name_from_keyword): Constify.
14450 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14452 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14453 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14454 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14456 (mi_execute_async_cli_command): Constify.
14457 * mips-tdep.c (mips_register_name): Constify.
14458 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14459 (am33_register_name, am33_2_register_name)
14460 * moxie-tdep.c (moxie_register_names): Constify.
14461 * nat/linux-osdata.c (osdata_type): Constify fields.
14462 * nto-tdep.c (nto_parse_redirection): Constify.
14463 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14464 (lookup_child_selector): Constify.
14465 (objc_methcall::name): Constify.
14466 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14467 (lookup_struct_typedef): Constify.
14468 * objfiles.c (pc_in_section): Constify.
14469 * objfiles.h (pc_in_section): Constify.
14470 * p-exp.y (struct token::oper): Constify.
14471 (yyerror): Constify.
14472 * p-lang.h (pascal_yyerror): Constify.
14473 * parser-defs.h (op_name_standard): Constify.
14474 (op_print::string): Constify.
14475 (exp_descriptor::op_name): Constify.
14476 * printcmd.c (print_address_symbolic): Constify.
14477 * psymtab.c (print_partial_symbols): Constify.
14478 * python/py-breakpoint.c (stop_func): Constify.
14479 (bppy_get_expression): Constify.
14480 * python/py-cmd.c (cmdpy_completer::name): Constify.
14481 (cmdpy_function): Constify.
14482 * python/py-event.c (evpy_add_attribute)
14483 (gdbpy_initialize_event_generic): Constify.
14484 * python/py-event.h (evpy_add_attribute)
14485 (gdbpy_initialize_event_generic): Constify.
14486 * python/py-evts.c (add_new_registry): Constify.
14487 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14488 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14489 * python/py-inferior.c (get_buffer): Add cast.
14490 * python/py-param.c (parm_constant::name): Constify.
14491 * python/py-unwind.c (fprint_frame_id): Constify.
14492 * python/python.c (gdbpy_parameter_value): Constify.
14493 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14494 * remote.c (memory_packet_config::name): Constify.
14495 (show_packet_config_cmd, remote_write_bytes)
14496 (remote_buffer_add_string):
14497 * reverse.c (exec_reverse_once): Constify.
14498 * rs6000-tdep.c (variant::name, variant::description): Constify.
14499 * rust-exp.y (rustyyerror): Constify.
14500 * rust-lang.c (rust_op_name): Constify.
14501 * rust-lang.h (rustyyerror): Constify.
14502 * serial.h (serial_ops::name): Constify.
14503 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14504 (sh_sh3e_register_name, sh_sh2e_register_name)
14505 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14506 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14507 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14508 (sh_sh4al_dsp_register_name): Constify.
14509 * sh64-tdep.c (sh64_register_name): Constify.
14510 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14511 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14512 * stabsread.c (patch_block_stabs, read_type_number)
14513 (ref_map::stabs, ref_add, process_reference)
14514 (symbol_reference_defined, define_symbol, define_symbol)
14515 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14516 (read_one_struct_field, read_struct_fields, read_baseclasses)
14517 (read_tilde_fields, read_struct_type, read_array_type)
14518 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14519 (read_huge_number, read_range_type, read_args, common_block_start)
14520 (find_name_end): Constify.
14521 * stabsread.h (common_block_start, define_symbol)
14522 (process_one_symbol, symbol_reference_defined, ref_add):
14523 * symfile.c (get_section_index, add_symbol_file_command):
14524 * symfile.h (get_section_index): Constify.
14525 * target-descriptions.c (tdesc_type::name): Constify.
14526 (tdesc_free_type): Add cast.
14527 * target.c (find_default_run_target):
14528 (add_deprecated_target_alias, find_default_run_target)
14529 (target_announce_detach): Constify.
14530 (do_option): Constify.
14531 * target.h (add_deprecated_target_alias): Constify.
14532 * thread.c (print_thread_info_1): Constify.
14533 * top.c (deprecated_readline_begin_hook, command_line_input):
14535 (init_main): Add casts.
14536 * top.h (handle_line_of_input): Constify.
14537 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14538 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14539 (tfind_command): Rename to ...
14540 (tfind_command_1): ... this and constify.
14541 (tfind_command): New function.
14542 (tfind_end_command, tfind_start_command): Adjust.
14543 (encode_source_string): Constify.
14544 * tracepoint.h (encode_source_string): Constify.
14545 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14546 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14547 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14548 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14549 * tui/tui-win.c (parse_scrolling_args): Constify.
14550 * tui/tui-windata.c (tui_erase_data_content): Constify.
14551 * tui/tui-windata.h (tui_erase_data_content): Constify.
14552 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14553 * tui/tui.c (tui_enable): Add cast.
14554 * utils.c (defaulted_query): Constify.
14555 (init_page_info): Add cast.
14556 (puts_debug, subset_compare): Constify.
14557 * utils.h (subset_compare): Constify.
14558 * varobj.c (varobj_format_string): Constify.
14559 * varobj.h (varobj_format_string): Constify.
14560 * vax-tdep.c (vax_register_name): Constify.
14561 * windows-nat.c (windows_detach): Constify.
14562 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14563 * xml-support.c (gdb_xml_end_element): Constify.
14564 * xml-tdesc.c (tdesc_start_reg): Constify.
14565 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14566 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14567 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14571 * proc-api.c (struct trans): Constify.
14572 (procfs_note): Constify.
14573 * proc-events.c (struct trans, syscall_table):
14574 * proc-flags.c (struct trans): Constify.
14575 * proc-utils.h (procfs_note): Constify.
14576 * proc-why.c (struct trans): Constify.
14577 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14578 (procfs_detach): Constify.
14579 * sol-thread.c (struct string_map): Constify.
14580 (td_err_string, td_state_string): Constify.
14584 * proc-api.c (procfs_filename): Don't initialize
14586 (prepare_to_trace): Assume procfs_filename is non-NULL.
14587 (_initialize_proc_api): Give procfs_filename a default value here.
14591 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14592 'cond_string' parameter.
14593 (extract_exception_regexp): Constify 'string' parameter.
14594 (catch_exception_command_1): Constify.
14595 * breakpoint.c (init_catchpoint)
14596 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14598 (ep_parse_optional_if_clause, catch_fork_command_1)
14599 (catch_exec_command_1): Constify.
14600 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14602 (ep_parse_optional_if_clause): Constify.
14603 * cli/cli-utils.c (remove_trailing_whitespace)
14604 (check_for_argument): Constify.
14605 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14606 non-const overload.
14607 (check_for_argument): Likewise.
14611 * event-top.c (command_line_handler): Add cast to execute_command
14613 * record-btrace.c (cmd_record_btrace_bts_start)
14614 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14615 (cmd_record_btrace_start): Add cast to execute_command call.
14616 * record-full.c (record_full_goto_insn):
14617 * record.c (record_start, record_stop): Add cast to
14618 execute_command_to_string calls.
14619 (cmd_record_start): Add cast to execute_command calls.
14623 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14624 static inline function.
14625 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14626 array and use gdb_PyArg_ParseTupleAndKeywords.
14627 * python/py-cmd.c (cmdpy_init): Likewise.
14628 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14629 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14630 (infpy_search_memory): Likewise.
14631 * python/py-objfile.c (objfpy_add_separate_debug_file)
14632 (gdbpy_lookup_objfile): Likewise.
14633 * python/py-symbol.c (gdbpy_lookup_symbol)
14634 (gdbpy_lookup_global_symbol): Likewise.
14635 * python/py-type.c (gdbpy_lookup_type): Likewise.
14636 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14637 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14642 * python/python-internal.h (gdb_PyGetSetDef): New type.
14643 * python/py-block.c (block_object_getset)
14644 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14645 * python/py-event.c (event_object_getset)
14646 (finish_breakpoint_object_getset): Likewise.
14647 * python/py-inferior.c (inferior_object_getset): Likewise.
14648 * python/py-infthread.c (thread_object_getset): Likewise.
14649 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14650 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14651 * python/py-objfile.c (objfile_getset): Likewise.
14652 * python/py-progspace.c (pspace_getset): Likewise.
14653 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14655 * python/py-record.c (recpy_record_getset): Likewise.
14656 * python/py-symbol.c (symbol_object_getset): Likewise.
14657 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14659 * python/py-type.c (type_object_getset, field_object_getset):
14661 * python/py-value.c (value_object_getset): Likewise.
14665 * python/python-internal.h (gdb_PyObject_CallMethod)
14666 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14668 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14669 (PySys_GetObject, PySys_SetPath): New macros.
14673 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14674 info_osdata_command.
14675 * osdata.c (info_osdata_command): Rename to ...
14676 (info_osdata): ... this. Constify 'type' parameter, and remove
14677 the 'from_tty' parameter. Accept NULL TYPE.
14678 (info_osdata_command): New function.
14679 * osdata.h (info_osdata_command): Remove declaration.
14680 (info_osdata): New declaration.
14684 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14685 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14686 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14688 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14689 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14690 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14692 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14693 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14694 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14695 (mi_cmd_file_list_exec_source_files)
14696 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14697 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14698 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14700 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14701 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14702 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14703 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14704 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14705 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14706 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14707 'command' parameter.
14708 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14709 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14710 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14711 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14712 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14713 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14714 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14715 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14716 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14717 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14718 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14720 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14721 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14722 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14723 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14724 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14725 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14726 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14727 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14728 (mi_cmd_data_list_changed_registers)
14729 (mi_cmd_data_write_register_values)
14730 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14731 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14732 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14733 (mi_cmd_list_features, mi_cmd_list_target_features)
14734 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14735 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14736 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14737 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14738 (mi_cmd_trace_frame_collected): Constify 'command'
14740 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14741 'command' parameter.
14745 * ada-lang.c (ada_completer_word_break_characters): Now a const
14747 (ada_get_gdb_completer_word_break_characters): Constify.
14748 * completer.c (gdb_completer_command_word_break_characters)
14749 (gdb_completer_file_name_break_characters)
14750 (gdb_completer_quote_characters): Now const arrays.
14751 (get_gdb_completer_quote_characters): Constify.
14752 (set_rl_completer_word_break_characters): New function.
14753 (set_gdb_completion_word_break_characters)
14754 (complete_line_internal): Use it.
14755 * completer.h (get_gdb_completer_quote_characters): Constify.
14756 (set_rl_completer_word_break_characters): Declare.
14757 * f-lang.c (f_word_break_characters): Constify.
14758 * language.c (default_word_break_characters): Constify.
14759 * language.h (language_defn::la_word_break_characters): Constify.
14760 (default_word_break_characters): Constify.
14761 * top.c (init_main): Use set_rl_completer_word_break_characters.
14765 * aix-thread.c (aix_thread_pid_to_str)
14766 (aix_thread_extra_thread_info): Constify.
14767 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14768 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14769 (bsd_uthread_pid_to_str): Constify.
14770 * corelow.c (core_pid_to_str): Constify.
14771 * darwin-nat.c (darwin_pid_to_str): Constify.
14772 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14773 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14775 * gnu-nat.c (gnu_pid_to_str): Constify.
14776 * go32-nat.c (go32_pid_to_str): Constify.
14777 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14778 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14779 * inferior.c (inferior_pid_to_str): Constify.
14780 * linux-nat.c (linux_nat_pid_to_str): Constify.
14781 * linux-tdep.c (linux_core_pid_to_str): Constify.
14782 * linux-thread-db.c (thread_db_pid_to_str)
14783 (thread_db_extra_thread_info): Constify.
14784 * nto-tdep.c (nto_extra_thread_info): Constify.
14785 * nto-tdep.h (nto_extra_thread_info): Constify.
14786 * obsd-nat.c (obsd_pid_to_str): Constify.
14787 * procfs.c (procfs_pid_to_str): Constify.
14788 * ravenscar-thread.c (ravenscar_extra_thread_info)
14789 (ravenscar_pid_to_str): Constify.
14790 * remote-sim.c (gdbsim_pid_to_str): Constify.
14791 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14793 * sol-thread.c (solaris_pid_to_str): Constify.
14794 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14795 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14796 * target.c (default_pid_to_str, target_pid_to_str)
14797 (normal_pid_to_str, default_pid_to_str): Constify.
14798 * target.h (target_ops::to_pid_to_str)
14799 (target_ops::to_extra_thread_info): Constify.
14800 (target_pid_to_str, normal_pid_to_str): Constify.
14801 * windows-nat.c (windows_pid_to_str): Constify.
14802 * gdbarch.sh (core_pid_to_str): Constify.
14803 * target-delegates.c: Regenerate.
14804 * gdbarch.h, gdbarch.c: Regenerate.
14808 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14809 the memory of the temporary warning_pre_print override.
14810 * utils.c (warning_pre_print): Constify.
14811 * utils.h (warning_pre_print): Constify.
14815 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14816 (shell_command): New function.
14817 (make_command): Use std::string.
14818 (init_cli_cmds): Register shell_command instead of shell_escape.
14822 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14823 * tracepoint.c (default_collect): Don't initialize.
14827 * macroexp.c (macro_buffer::shared): Now a bool.
14828 (init_buffer): Update.
14829 (init_shared_buffer): Constify 'addr' parameter.
14830 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14835 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14836 * disasm.c (set_disassembler_options): Constify local.
14837 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14842 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14847 * frame.c (frame_unwind_register_unsigned): Call
14848 frame_unwind_register_value.
14852 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14853 Use gdb_test_multiple, and don't match anchor.
14857 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14858 (Write After Approval): Remove Simon Marchi.
14862 * common/gdb_optional.h (optional::optional): Make constexpr and
14863 initialize m_dummy.
14867 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14868 (amd64fbsd_jmp_buf_reg_offset): Remove.
14869 (amd64fbsd_supply_uthread): Remove function.
14870 (amd64fbsd_collect_uthread): Remove function.
14871 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14872 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14873 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14874 (fbsd-nat.c): Update comment.
14875 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14876 (i386fbsd_jmp_buf_reg_offset): Remove.
14877 (i386fbsd_supply_uthread): Remove function.
14878 (i386fbsd_collect_uthread): Remove function.
14879 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14883 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14884 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14885 * NEWS: Mention that support for FreeBSD/alpha was removed.
14886 * alpha-fbsd-tdep.c: Delete file.
14887 * config/alpha/fbsd.mh: Delete file.
14888 * configure.host: Delete alpha*-*-freebsd* and
14889 alpha*-*-kfreebsd*-gnu.
14890 * configure.tgt: Delete alpha*-*-freebsd* and
14891 alpha*-*-kfreebsd*-gnu.
14895 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14896 amd64bsd_store_inferior_registers): Use ptid from regcache.
14900 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14901 data fields, make them private and add "m_" prefixes.
14902 (lnp_state_machine::lnp_state_machine): New ctor.
14903 (record_line, check_line_address, handle_set_discriminator)
14904 (handle_set_address, handle_advance_pc, handle_special_opcode)
14905 (handle_advance_line, handle_set_file, handle_negate_stmt)
14906 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14907 (end_sequence, advance_line): New methods.
14908 (m_gdbarch, m_record_lines_p): New fields.
14909 (lnp_reader_state): Delete.
14910 (dwarf_record_line): Rename to ...
14911 (lnp_state_machine::record_line): ... adjust.
14912 (init_lnp_state_machine): Delete.
14913 (lnp_state_machine::lnp_state_machine): New.
14914 (check_line_address): Rename to ...
14915 (lnp_state_machine::check_line_address): This.
14916 (dwarf_decode_lines_1): Remove reference to "reader_state".
14917 Adjust lnp_state_machine having a non-default ctor. Use bool.
14918 State machine internal state manipulation moved to
14919 lnp_state_machine methods.
14923 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14924 unittests/offset-type-selftests.c.
14925 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14926 * common/offset-type.h: New file.
14927 * common/preprocessor.h: New file.
14928 * common/traits.h: New file.
14929 * common/valid-expr.h: New file.
14930 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14931 sect_offset and cu_offset strong typedefs throughout.
14932 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14933 typedefs throughout.
14934 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14935 sect_offset and cu_offset strong typedefs throughout.
14936 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14937 typedefs throughout.
14938 * gdbtypes.h: Include "common/offset-type.h".
14939 (cu_offset): Now an offset type (strong typedef) instead of a
14941 (sect_offset): Likewise.
14942 (union call_site_parameter_u): Rename "param_offset" field to
14944 * unittests/offset-type-selftests.c: New file.
14948 * common/underlying.h: New file.
14949 * dwarf2read.c: Include "common/gdb_optional.h" and
14950 "common/underlying.h".
14951 (dir_index, file_name_index): New types.
14952 (file_entry): Use them.
14953 (file_entry::include): Use to_underlying.
14954 (line_header::add_file_name): Use dir_index.
14955 (read_formatted_entries): Use gdb::optional. Read form before
14956 writting to file_entry.
14957 (dwarf_decode_line_header): Use dir_index.
14958 (lnp_state_machine::current_file): Use to_underlying.
14959 (lnp_state_machine::file): Change type to file_name_index.
14960 (dwarf_record_line): Use to_underlying.
14961 (init_lnp_state_machine): Use file_name_index.
14962 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14966 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14967 operator bool, has_value and get methods.
14971 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14973 (line_header): Initialize all data fields. Change type of
14974 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14975 Change type of include_dirs to std::vector<const char *>. Remove
14976 num_include_dirs, include_dirs_size. Change type of file_names to
14977 std::vector<file_entry>. Remove num_file_names, file_names_size.
14978 (line_header::line_header): New.
14979 (line_header::add_include_dir, line_header::add_file_name): New
14981 (line_header::include_dir_at): Remove NULL check.
14982 (line_header::file_name_at): Add const overload.
14983 (line_header_up): New unique_ptr typedef.
14984 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14985 std::vector. Remove free_line_header call.
14986 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14987 free_line_header call.
14988 (free_cu_line_header): Delete.
14989 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14990 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14991 Adjust to use std::vector.
14992 (free_line_header): Delete.
14993 (free_line_header_voidp): Use delete.
14994 (add_include_dir): Replace with ...
14995 (line_header::add_include_dir): ... this method. Use std::vector.
14996 (add_file_name): Replace with ...
14997 (line_header::add_file_name): ... this method. Use std::vector.
14998 (add_include_dir_stub): Delete.
14999 (read_formatted_entries): Remove memset.
15000 (dwarf_decode_line_header): Return a line_header_up instead of a
15001 raw pointer. Remove cleanup handling. Pass lambdas to
15002 read_formatted_entries. Adjust to use line_header methods.
15003 (dwarf_decode_lines_1): Adjust to use line_header methods.
15004 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
15009 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
15010 instead of struct ptid.
15014 * frame.c (get_frame_register_bytes): Unwind using value.
15015 (put_frame_register_bytes): Likewise.
15019 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
15024 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
15028 * gdbthread.h (struct thread_info): Declare constructor and
15029 destructor. Add some in-class member initializers.
15030 * thread.c (free_thread): Remove.
15031 (init_thread_list): Call delete instead of free_thread.
15032 (new_thread): Call thread_info constructor.
15033 (thread_info::thread_info): New function.
15034 (thread_info::~thread_info): New function.
15035 (delete_thread_1): Call delete instead of free_thread.
15036 (make_cleanup_restore_current_thread): Move tp and frame to
15041 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
15042 (arc_skip_prologue): Likewise.
15043 (arc_make_frame_cache): Likewise.
15044 (arc_pv_get_operand): New function.
15045 (arc_is_in_prologue): Likewise.
15046 (arc_analyze_prologue): Likewise.
15047 (arc_print_frame_cache): Likewise.
15048 (MAX_PROLOGUE_LENGTH): New constant.
15052 * configure.tgt: Add arc-insn.o.
15053 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15054 (dump_arc_instruction_command): New function.
15055 (arc_fprintf_disasm): Likewise.
15056 (arc_disassemble_info): Likewise.
15057 (arc_insn_get_operand_value): Likewise.
15058 (arc_insn_get_operand_value_signed): Likewise.
15059 (arc_insn_get_memory_base_reg): Likewise.
15060 (arc_insn_get_memory_offset): Likewise.
15061 (arc_insn_get_branch_target): Likewise.
15062 (arc_insn_dump): Likewise.
15063 (arc_insn_get_linear_next_pc): Likewise.
15064 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15065 (arc_disassemble_info): Likewise.
15066 (arc_insn_get_branch_target): Likewise.
15067 (arc_insn_get_linear_next_pc): Likewise.
15068 * NEWS: Mention new "maint print arc arc-instruction".
15072 * arc-tdep (maintenance_print_arc_list): New variable.
15073 (maintenance_print_arc_command): New function.
15077 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15078 Add "limm" and "reserved".
15079 (arc_cannot_fetch_register, arc_cannot_store_register): Add
15080 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15081 * arc-tdep.h (arc_regnum): Likewise.
15085 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15086 for THREADPTR register.
15087 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15089 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15090 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15091 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15095 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15096 registers above gdbarch_num_regs (gdbarch) as privileged in
15101 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15102 for a single specified register or for all registers in
15103 a0_base..a0_base + C0_NREGS range.
15104 (supply_gregset_reg): Call regcache_raw_supply for a single
15105 specified register or for all registers in a0_base..a0_base +
15110 * arch/xtensa.h (C0_NREGS): Add definition.
15111 * xtensa-tdep.c (C0_NREGS): Remove definition.
15115 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15116 Drop xtensa_default_isa initialization.
15117 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15121 * dwarf2read.c (file_entry) <dir_index>: Add comment.
15122 (file_entry::include_dir): New method.
15123 (line_header::include_dir_at, line_header::file_name_at): New
15125 (setup_type_unit_groups, setup_type_unit_groups)
15126 (psymtab_include_file_name): Simplify using the new methods.
15127 (lnp_state_machine) <the_line_header>: New field.
15128 <file>: Add comment.
15129 (lnp_state_machine::current_file): New method.
15130 (dwarf_record_line): Simplify using the new methods.
15131 (init_lnp_state_machine): Initialize the "the_line_header" field.
15132 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15133 Simplify using the new methods.
15137 * cp-name-parser.y (make_empty): Delete.
15138 (demangler_special, nested_name, ptr_operator, array_indicator)
15139 (direct_declarator, declarator_1): Use fill_comp instead of
15144 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15145 to ATTRIBUTE_PRINTF.
15146 * solib-target.c (library_list_start_list): Print "string" not
15148 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15149 gdb_xml_error call.
15153 * dwarf2read.c (struct file_and_directory): New.
15154 (dwarf2_get_dwz_file): Adjust to use std::string.
15155 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15156 (find_file_and_directory): Adjust to return a file_and_directory
15158 (read_file_scope): Adjust to use file_and_directory. Remove
15159 make_cleanup/do_cleanups calls.
15160 (open_and_init_dwp_file): Adjust to use std::string. Remove
15161 make_cleanup/do_cleanups calls.
15162 * python/python.c (do_start_initialization): Adjust to ldirname
15163 returning a std::string.
15164 * utils.c (ldirname): Now returns a std::string.
15165 * utils.h (ldirname): Change return type to std::string.
15166 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15167 returning a std::string.
15168 * xml-tdesc.c (file_read_description_xml): Likewise.
15172 * regcache.c (regcache_debug_print_register): New function.
15173 * regcache.h (regcache_debug_print_register): New declaration.
15174 * target.c (debug_print_register): Remove.
15175 (target_fetch_registers): Call regcache_debug_print_register.
15176 (target_store_registers): Likewise.
15180 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15181 reference beyond the 'lh->include_dirs' array before accessing to
15183 (psymtab_include_file_name): Likewise.
15184 (dwarf_decode_lines_1): Likewise.
15185 (dwarf_decode_lines): Likewise.
15186 (file_file_name): Likewise.
15190 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15192 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15193 ps_lsetfpregs): Likewise.
15194 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15195 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15196 ps_lsetfpregs): Likewise.
15197 * target.c (target_fetch_registers, target_store_registers):
15202 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15206 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15207 (_initialize_aarch64_tdep): Register it.
15208 (aarch64_record_load_store): Handle PRFM instruction.
15209 (aarch64_process_record_test): New function.
15213 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15218 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15222 python/python.c (do_start_initialization): Fix memory leak.
15226 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15227 using get_ptrace_pid.
15228 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15230 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15231 inferior_ptid instead of pid.
15235 * aarch64-tdep.c: Wrap locally used classes in anonymous
15237 * arm-tdep.c: Likewise.
15238 * linespec.c: Likewise.
15239 * ui-out.c: Likewise.
15244 * python/lib/gdb/printer/bound_registers.py: Import sys.
15248 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15249 windows_thread_info parameter and use it instead of
15251 (windows_fetch_inferior_registers): Don't set current_thread,
15252 pass the thread to do_windows_fetch_inferior_registers. Use
15253 ptid from regcache instead of inferior_ptid.
15254 (do_windows_store_inferior_registers): Add windows_thread_info
15255 parameter and use it instead of current_thread.
15256 (windows_store_inferior_registers): Don't set current_thread,
15257 pass the thread to do_windows_store_inferior_registers. Use
15258 ptid from regcache instead of inferior_ptid.
15262 * ser-mingw.c (ser_windows_raw): Remove reference to
15263 struct serial::current_timeout.
15268 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15269 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15270 (sparc64_fsr_type): Fix %fsr decoding.
15274 * python/py-record-btrace.c (btpy_insn_data): Change return type
15279 * spu-linux-nat.c (spu_fetch_inferior_registers,
15280 spu_store_inferior_registers): Use ptid from regcache, set and
15281 restore inferior_ptid.
15282 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15287 * i386-linux-nat.c (fetch_register, store_register,
15288 i386_linux_fetch_inferior_registers,
15289 i386_linux_store_inferior_registers): Use ptid from regcache.
15290 * ia64-linux-nat.c (ia64_linux_fetch_register,
15291 ia64_linux_store_register): Likewise.
15292 * inf-ptrace.c (inf_ptrace_fetch_register,
15293 inf_ptrace_store_register): Likewise.
15294 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15295 m32r_linux_store_inferior_registers): Likewise.
15296 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15297 m68kbsd_store_inferior_registers): Likewise.
15298 * m68k-linux-nat.c (fetch_register, store_register,
15299 m68k_linux_fetch_inferior_registers,
15300 m68k_linux_store_inferior_registers): Likewise.
15301 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15302 m88kbsd_store_inferior_registers): Likewise.
15303 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15304 mips_fbsd_store_inferior_registers): Likewise.
15305 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15306 mips64_linux_regsets_store_registers): Likewise.
15307 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15308 mipsnbsd_store_inferior_registers): Likewise.
15309 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15310 mips64obsd_store_inferior_registers): Likewise.
15311 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15313 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15314 ppcfbsd_store_inferior_registers): Likewise.
15315 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15316 ppc_linux_store_inferior_registers): Likewise.
15317 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15318 ppcnbsd_store_inferior_registers): Likewise.
15319 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15320 ppcobsd_store_registers): Likewise.
15321 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15323 * ravenscar-thread.c (ravenscar_fetch_registers,
15324 ravenscar_store_registers, ravenscar_prepare_to_store):
15326 * record-btrace.c (record_btrace_fetch_registers,
15327 record_btrace_store_registers, record_btrace_prepare_to_store):
15329 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15330 Lookup inferior using ptid from regcache, instead of
15332 * remote.c (remote_fetch_registers, remote_store_registers): Use
15333 ptid from regcache.
15334 * rs6000-nat.c (fetch_register, store_register): Likewise.
15335 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15336 s390_linux_store_inferior_registers): Likewise.
15337 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15338 shnbsd_store_inferior_registers): Likewise.
15339 * sol-thread.c (sol_thread_fetch_registers,
15340 sol_thread_store_registers): Likewise.
15341 * sparc-nat.c (sparc_fetch_inferior_registers,
15342 sparc_store_inferior_registers): Likewise.
15343 * tilegx-linux-nat.c (fetch_inferior_registers,
15344 store_inferior_registers): Likewise.
15345 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15346 vaxbsd_store_inferior_registers): Likewise.
15347 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15348 store_xtregs): Likewise.
15353 * NEWS: Mention support for rvalue references in GDB and python.
15354 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15355 supports both lvalue and rvalue references.
15360 * gdbtypes.c (rank_one_type): Implement overloading
15361 resolution rules regarding rvalue references.
15366 * aarch64-tdep.c (aarch64_type_align)
15367 (aarch64_extract_return_value, aarch64_store_return_value): Change
15368 lvalue reference type checks to general reference type checks.
15369 * amd64-tdep.c (amd64_classify): Likewise.
15370 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15372 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15373 (arm_store_return_value): Likewise.
15374 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15375 * c-typeprint.c (c_print_type): Likewise.
15376 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15377 (cplus_number_of_children, cplus_describe_child): Likewise.
15378 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15379 * completer.c (expression_completer): Likewise.
15380 * cp-support.c (make_symbol_overload_list_adl_namespace):
15382 * darwin-nat-info.c (info_mach_region_command): Likewise.
15383 * dwarf2loc.c (entry_data_value_coerce_ref)
15384 (value_of_dwarf_reg_entry): Likewise.
15385 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15386 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15388 * findvar.c (extract_typed_address, store_typed_address):
15390 * gdbtypes.c (rank_one_type): Likewise.
15391 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15392 * infcall.c (value_arg_coerce): Likewise.
15393 * language.c (pointer_type): Likewise.
15394 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15396 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15397 * mn10300-tdep.c (mn10300_type_align): Likewise.
15398 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15399 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15400 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15402 * printcmd.c (print_formatted, x_command): Likewise.
15403 * python/py-type.c (typy_get_composite, typy_template_argument):
15405 * python/py-value.c (valpy_referenced_value)
15406 (valpy_get_dynamic_type, value_has_field): Likewise.
15407 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15408 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15409 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15410 * spu-tdep.c (spu_scalar_value_p): Likewise.
15411 * symtab.c (lookup_symbol_aux): Likewise.
15412 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15413 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15415 * valops.c (value_cast_pointers, value_cast)
15416 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15417 (value_struct_elt, value_struct_elt_bitpos)
15418 (value_find_oload_method_list, find_overload_match)
15419 (value_rtti_indirect_type): Likewise.
15420 * valprint.c (val_print_scalar_type_p, generic_val_print):
15422 * value.c (value_actual_type, value_as_address, unpack_long)
15423 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15424 (coerce_ref): Likewise.
15425 * varobj.c (varobj_get_value_type): Likewise.
15430 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15431 table of constants.
15432 * python/lib/gdb/command/explore.py: Support exploring values
15433 of rvalue reference types.
15434 * python/lib/gdb/types.py: Implement get_basic_type() for
15435 rvalue reference types.
15436 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15438 * python/py-value.c (valpy_getitem): Add an rvalue reference
15440 (valpy_reference_value): Add new parameter "refcode".
15441 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15442 New wrappers for valpy_reference_value().
15443 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15444 (gdbpy_invoke_xmethod): Likewise.
15449 * dwarf2read.c (process_die, read_type_die_1): Handle the
15450 DW_TAG_rvalue_reference_type DIE.
15451 (read_tag_reference_type): Add new parameter "refcode".
15456 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15457 (c_type_print_modifier, c_type_print_varspec_suffix)
15458 (c_type_print_base): Support printing rvalue reference types.
15459 * c-valprint.c (c_val_print, c_value_print): Support printing
15460 rvalue reference values.
15465 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15467 * cp-support.c (replace_typedefs): Handle
15468 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15469 * python/py-type.c (typy_lookup_type): Likewise.
15474 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15475 * parse.c (insert_type): Change assert statement.
15476 (follow_types): Handle rvalue reference types.
15477 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15483 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15484 value_ref() interface.
15485 * c-valprint.c (c_value_print): Likewise.
15486 * infcall.c (value_arg_coerce): Likewise.
15487 * python/py-value.c (valpy_reference_value): Likewise.
15488 * valops.c (value_cast, value_reinterpret_cast)
15489 (value_dynamic_cast, typecmp): Likewise.
15490 (value_ref): Parameterize by kind of return value reference type.
15491 * value.h (value_ref): Add new parameter "refcode".
15496 * dwarf2read.c (read_tag_reference_type): Use
15497 lookup_lvalue_reference_type() instead of lookup_reference_type().
15498 * eval.c (evaluate_subexp_standard): Likewise.
15499 * f-exp.y: Likewise.
15500 * gdbtypes.c (make_reference_type, lookup_reference_type):
15501 Generalize with rvalue reference types.
15502 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15503 convenience wrappers for lookup_reference_type().
15504 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15505 reference kind parameter.
15506 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15507 wrappers for lookup_reference_type().
15508 * guile/scm-type.c (gdbscm_type_reference): Use
15509 lookup_lvalue_reference_type() instead of lookup_reference_type().
15510 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15511 * parse.c (follow_types): Likewise.
15512 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15513 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15515 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15516 (gdbpy_invoke_xmethod): Likewise.
15517 * stabsread.c: Provide extra argument to make_reference_type()
15519 * valops.c (value_ref, value_rtti_indirect_type): Use
15520 lookup_lvalue_reference_type() instead of lookup_reference_type().
15525 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15526 (TYPE_IS_REFERENCE): New macro.
15527 (struct type): Add rvalue_reference_type field.
15528 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15532 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15533 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15534 New function definition.
15535 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15536 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15537 New function declaration.
15538 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15539 * mi/mi-interp.h: New file.
15540 * solib.c (info_sharedlibrary_command): Replace for loop with
15542 * solib.h (update_solib_list): New function declaration.
15543 (so_list_head): Move macro.
15544 * solist.h (ALL_SO_LIBS): New macro.
15548 * infcmd.c (post_create_inferior): Remove unused argument in
15550 * remote.c (remote_start_remote): Likewise.
15551 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15552 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15553 (enable_break): Likewise.
15554 * solib.c (update_solib_list): Remove unused target argument
15555 and its documentation.
15556 (solib_add): Remove unused target argument. Remove unused
15557 argument in call to update_solib_list.
15558 (info_sharedlibrary_command): Remove unused argument in call
15559 to update_solib_list.
15560 (sharedlibrary_command): Remove unused argument in call to
15562 (handle_solib_event): Likewise.
15563 (reload_shared_libraries): Likewise.
15564 * solib.h (solib_add): Remove unused target argument.
15568 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15569 (s390_displaced_step_fixup): Cover relative branches with the
15570 default fixup handling. This fixes lack of support for some
15571 relative branch instructions.
15575 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15576 ptid from regcache.
15580 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15581 i386_darwin_store_inferior_registers): Use ptid from regcache.
15585 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15586 i386bsd_store_inferior_registers): Use ptid from regcache.
15590 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15591 hppaobsd_store_registers): Use ptid from regcache.
15595 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15596 hppanbsd_store_registers): Use ptid from regcache.
15600 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15601 from regcache. Use get_ptrace_pid.
15605 * corelow.c (get_core_register_section): Use ptid from regcache,
15610 * bsd-uthread.c (bsd_uthread_fetch_registers,
15611 bsd_uthread_store_registers): Use ptid from regcache, set and
15612 restore inferior_ptid.
15616 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15617 fetch_fp_regs, store_register, store_regs, store_fp_register,
15618 store_fp_regs): Use ptid from regcache.
15622 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15623 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15624 store_vfp_regs): Use ptid from regcache.
15629 * ser-base.c (ser_base_wait_for): Add comment.
15630 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15632 * ser-unix.c (hardwire_raw): Remove reference to
15633 scb->current_timeout.
15634 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15635 (hardwire_ops): Install ser_base_readchar instead of
15637 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15643 * python/lib/gdb/printer/bound_registers.py: Add support for
15648 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15649 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15650 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15651 byte_offset to subobj_byte_offset. Fix the handling of
15652 DWARF_VALUE_STACK on big-endian targets when coming via an
15654 (dwarf2_evaluate_loc_desc): Adjust call to
15655 dwarf2_evaluate_loc_desc_full.
15656 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15657 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15661 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15662 and REVSH instructions.
15666 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15667 (arm_record_test): Declare.
15668 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15669 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15670 align with the manual.
15671 (thumb_record_misc): Adjust the code order to align with the
15673 (thumb2_record_decode_insn_handler): Fix instruction matching.
15674 (instruction_reader_thumb): New class.
15675 (arm_record_test): New function.
15679 * arm-tdep.c (abstract_memory_reader): New class.
15680 (instruction_reader): New class.
15681 (extract_arm_insn): Add argument 'reader'. Callers updated.
15682 (decode_insn): Likewise.
15686 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15687 member. Change type of TYPE member to SCM. All uses updated.
15688 (lsscm_make_lazy_string_smob): Add assert.
15689 (lsscm_make_lazy_string): Flag bad length values.
15690 (lsscm_elt_type): New function.
15691 (gdbscm_lazy_string_to_value): Rewrite to use
15692 lsscm_safe_lazy_string_to_value.
15693 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15694 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15695 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15697 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15698 * guile/scm-type.c (tyscm_scm_to_type): New function.
15702 PR python/17728, python/18439, python/18779
15703 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15704 member. Change type of TYPE member to PyObject *. All uses updated.
15705 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15706 (gdbpy_create_lazy_string_object): Flag bad length values.
15707 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15708 Handle typedefs in incoming type.
15709 (stpy_lazy_string_elt_type): New function.
15710 (gdbpy_extract_lazy_string): Call it.
15711 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15712 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15713 typedefs in incoming type.
15717 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15718 * guile/scm-type.c (tyscm_scm_to_type): New function.
15722 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15723 "ULONGEST" for "skip".
15728 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15729 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15730 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15731 over ptrace peek/poke until end of buffer or error.
15735 * parse.c (length_of_subexp): Make static.
15736 * parser-defs.h (length_of_subexp): Remove.
15740 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15745 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15746 (main): Use std::unique_ptr. Remove calls to
15747 cp_demangled_name_parse_free.
15751 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15752 alphabsd_store_inferior_registers): Use regcache->ptid instead
15757 * aix-thread.c (aix_thread_fetch_registers,
15758 aix_thread_store_registers): Use regcache->ptid instead of
15763 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15764 store_gregs_to_thread, fetch_fpregs_from_thread,
15765 store_fpregs_to_thread): Use regcache->ptid instead of
15770 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15771 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15772 instead of inferior_ptid.
15776 * target.c (target_fetch_registers, target_store_registers): Add
15781 * regcache.h (regcache_get_ptid): New function.
15782 * regcache.c (regcache_get_ptid): New function.
15786 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15791 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15796 * infrun.c (start_step_over, do_target_resume, resume)
15797 (restart_threads): Assert we're not resuming a thread that is
15798 meant to be stopped.
15799 (infrun_thread_stop_requested_callback): Delete.
15800 (infrun_thread_stop_requested): If the thread is internally
15801 stopped, queue a pending stop event and clear the thread's
15802 inline-frame state.
15803 (handle_stop_requested): New function.
15804 (handle_syscall_event, handle_inferior_event_1): Use
15805 handle_stop_requested.
15806 (handle_stop_requested): New function.
15807 (handle_signal_stop): Set the thread's stop_signal here instead of
15809 (finish_step_over): Clear step over info unconditionally.
15810 (handle_signal_stop): If the user had interrupted the event
15811 thread, consider the stop a random signal.
15812 (handle_signal_stop) <signal arrived while stepping over
15813 breakpoint>: Don't restart threads here.
15814 (stop_waiting): Don't clear step-over info here.
15819 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15820 goes to argument 2, not 1.
15825 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15826 display_gdb_prompt.
15827 (command_line_input): Add comment.
15832 * tui/tui-file.c (tui_file::write): New.
15833 * tui/tui-file.h (tui_file): Override "write".
15834 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15835 factored out from ...
15836 (tui_puts): ... here.
15837 (tui_putc): Use them.
15838 (tui_write): New function.
15839 * tui/tui-io.h (tui_write): Declare.
15843 * Makefile.in (SFILES): Replace "environ.c" with
15844 "common/environ.c".
15845 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15846 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15848 * common/environ.c: ... here.
15849 * environ.h: Moved to...
15850 * common/environ.h: ... here.
15854 * gdbarch.sh (pstring_ptr): New static function.
15855 (gdbarch_disassembler_options): Use it.
15856 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15857 not valid_disassembler_option->name.
15858 * gdbarch.c: Regenerate.
15862 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15866 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15870 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15871 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15872 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15873 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15877 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15881 * remote.c (remote_add_target_side_commands): Use range-based
15887 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15889 * valprint.c (common_val_print): Likewise.
15893 * NEWS: Mention new set/show disassembler-options commands.
15894 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15895 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15896 (prospective_options): New static variable.
15897 (gdb_disassembler::gdb_disassembler): Initialize
15898 m_di.disassembler_options.
15899 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15900 (get_disassembler_options): New function.
15901 (set_disassembler_options): Likewise.
15902 (set_disassembler_options_sfunc): Likewise.
15903 (show_disassembler_options_sfunc): Likewise.
15904 (disassembler_options_completer): Likewise.
15905 (_initialize_disasm): Likewise.
15906 * disasm.h (get_disassembler_options): New prototype.
15907 (set_disassembler_options): Likewise.
15908 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15909 (gdbarch_verify_disassembler_options): Likewise.
15910 * gdbarch.c: Regenerate.
15911 * gdbarch.h: Likewise.
15912 * arm-tdep.c (num_disassembly_options): Delete.
15913 (set_disassembly_style): Likewise.
15914 (arm_disassembler_options): New static variable.
15915 (set_disassembly_style_sfunc): Convert short style name into long
15916 option name. Call set_disassembler_options.
15917 (show_disassembly_style_sfunc): New function.
15918 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15919 set_gdbarch_verify_disassembler_options.
15920 (_initialize_arm_tdep): Delete regnames variable and update callers.
15921 (arm_disassembler_options): Initialize.
15922 (disasm_options): New variable.
15923 (num_disassembly_options): Rename from this...
15924 (num_disassembly_styles): ...to this. Compute by scanning through
15926 (valid_disassembly_styles): Initialize using disasm_options.
15927 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15928 set_arm_regname_option.
15929 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15930 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15931 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15932 set_gdbarch_verify_disassembler_options.
15933 * s390-tdep.c (s390_disassembler_options): New static variable.
15934 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15935 set_gdbarch_verify_disassembler_options.
15939 * remote.c (remote_add_target_side_condition): Remove "struct"
15940 keyword from range-based for loop.
15944 * remote.c (remote_add_target_side_condition): Use range-based
15945 for loop. Update comment.
15949 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15953 * regcache.c (regcache_raw_update): New function.
15954 (regcache_raw_read): Move code to regcache_raw_update.
15955 * regcache.h (regcache_raw_update): New declaration.
15956 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15960 * dwarf2read.c (create_debug_type_hash_table): Initialize
15961 header.signature and header.type_offset_in_tu.
15965 * symtab.c (make_file_symbol_completion_list_1): Use
15966 add_symtab_completions.
15970 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15974 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15975 I386_MAX_REGISTER_SIZE.
15976 (i386_pseudo_register_write): Likewise.
15977 (i386_process_record): Likewise.
15978 * i387-tdep.c (i387_supply_xsave): Likewise.
15979 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15980 (store_register): Likewise.
15984 * ada-lang.c: Include "common/function-view.h".
15985 (ada_iterate_over_symbols): Adjust to use function_view as
15987 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15988 (ada_make_symbol_completion_list): Use a lambda.
15989 (ada_exc_search_name_matches): Delete.
15990 (name_matches_regex): New.
15991 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15992 * compile/compile-c-support.c: Include "common/function-view.h".
15993 (print_one_macro): Change prototype to accept a ui_file pointer.
15994 (write_macro_definitions): Use a lambda.
15995 * dwarf2read.c: Include "common/function-view.h".
15996 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15997 (dw2_expand_symtabs_matching): Adjust to use function_view as
15999 * language.h: Include "common/function-view.h".
16000 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
16001 function_view as callback type.
16002 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
16003 * linespec.c: Include "common/function-view.h".
16004 (collect_info::add_symbol): New method.
16005 (struct symbol_and_data_callback, iterate_inline_only, struct
16006 symbol_matcher_data, iterate_name_matcher): Delete.
16007 (iterate_over_all_matching_symtabs): Adjust to use function_view
16008 as callback type and lambdas.
16009 (iterate_over_file_blocks): Adjust to use function_view as
16011 (decode_compound_collector): Now a class with private fields.
16012 (decode_compound_collector::release_symbols): New method.
16013 (collect_one_symbol): Rename to...
16014 (decode_compound_collector::operator()): ... this and adjust.
16015 (lookup_prefix_sym): decode_compound_collector construction bits
16016 move to decode_compound_collector ctor. Pass the
16017 decode_compound_collector object directly as callback. Remove
16018 cleanups and use decode_compound_collector::release_symbols
16020 (symtab_collector): Now a class with private fields.
16021 (symtab_collector::release_symtabs): New method.
16022 (add_symtabs_to_list): Rename to...
16023 (symtab_collector::operator()): ... this and adjust.
16024 (collect_symtabs_from_filename): symtab_collector construction
16025 bits move to symtab_collector ctor. Pass the symtab_collector
16026 object directly as callback. Remove cleanups and use
16027 symtab_collector::release_symtabs instead.
16028 (collect_symbols): Delete.
16029 (add_matching_symbols_to_info): Use lambdas.
16030 * macrocmd.c (print_macro_callback): Delete.
16031 (info_macro_command): Use a lambda.
16032 (info_macros_command): Pass print_macro_definition as callable
16034 (print_one_macro): Remove 'ignore' parameter.
16035 (macro_list_command): Adjust.
16036 * macrotab.c (macro_for_each_data::fn): Now a function_view.
16037 (macro_for_each_data::user_data): Delete field.
16038 (foreach_macro): Adjust to call the function_view.
16039 (macro_for_each): Adjust to use function_view as callback type.
16040 (foreach_macro_in_scope): Adjust to call the function_view.
16041 (macro_for_each_in_scope): Adjust to use function_view as callback
16043 * macrotab.h: Include "common/function-view.h".
16044 (macro_callback_fn): Declare a prototype instead of a pointer.
16045 Remove "user_data" parameter.
16046 (macro_for_each, macro_for_each_in_scope): Adjust to use
16047 function_view as callback type.
16048 * psymtab.c (partial_map_expand_apply)
16049 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
16050 Adjust to use function_view as callback type and to return bool.
16051 (psym_expand_symtabs_matching): Adjust to use function_view as
16053 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16054 to use function_view as callback type and to return bool.
16055 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16057 * symfile.c (expand_symtabs_matching): Adjust to use function_view
16059 * symfile.h: Include "common/function-view.h".
16060 (expand_symtabs_file_matcher_ftype)
16061 (expand_symtabs_symbol_matcher_ftype)
16062 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16064 (quick_symbol_functions::map_symtabs_matching_filename)
16065 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16066 function_view as callback type and return bool.
16067 (expand_symtabs_matching): Adjust to use function_view as callback
16069 (maintenance_expand_name_matcher)
16070 (maintenance_expand_file_matcher): Delete.
16071 (maintenance_expand_symtabs): Use lambdas.
16072 * symtab.c (iterate_over_some_symtabs): Adjust to use
16073 function_view as callback types and return bool.
16074 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
16076 (lookup_symtab_callback): Delete.
16077 (lookup_symtab): Use a lambda.
16078 (iterate_over_symbols): Adjust to use function_view as callback
16080 (struct search_symbols_data, search_symbols_file_matches)
16081 (search_symbols_name_matches): Delete.
16082 (search_symbols): Use a pair of lambdas.
16083 (struct add_name_data, add_macro_name, symbol_completion_matcher)
16084 (symtab_expansion_callback): Delete.
16085 (default_make_symbol_completion_list_break_on_1): Use lambdas.
16086 * symtab.h: Include "common/function-view.h".
16087 (iterate_over_some_symtabs): Adjust to use function_view as
16088 callback type and return bool.
16089 (iterate_over_symtabs): Adjust to use function_view as callback
16091 (symbol_found_callback_ftype): Remove 'data' parameter and return
16093 (iterate_over_symbols): Adjust to use function_view as callback
16098 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16099 (%.o) <unittests/%.c>: New pattern.
16100 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16101 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16102 * common/function-view.h: New file.
16103 * unittests/function-view-selftests.c: New file.
16104 * configure: Regenerate.
16108 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16110 * go32-nat.c (go32_thread_alive): Likewise.
16114 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16119 * varobj.c (varobj_clear_saved_item): Use delete instead of
16121 (update_dynamic_varobj_children): Likewise.
16125 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16129 * common/enum-flags.h (enum_flags::enum_flags): Initialize
16130 m_enum_value to 0 in default constructor.
16134 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16135 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16136 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16137 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16138 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16139 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16140 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16141 IS_STORE_CONDITIONAL_INSN.
16145 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16149 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16153 * dwarf2read.c (skip_one_die, read_attribute_value)
16154 (dwarf2_const_value_attr, dump_die_shallow)
16155 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16156 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16160 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16161 (dwarf_parse_macro_header): Accept DWARF version 5.
16162 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16166 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16168 * common/common-exceptions.h (enum errors): Likewise.
16169 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16170 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16171 (dwarf_expr_context::execute_stack_op): Likewise.
16172 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16174 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16175 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16176 (show_entry_values_debug, call_site_to_target_addr)
16177 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16178 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16179 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16180 (value_of_dwarf_block_entry, indirect_pieced_value)
16181 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16182 (disassemble_dwarf_expression): Likewise.
16183 * dwarf2read.c (process_die, inherit_abstract_dies)
16184 (read_call_site_scope): Likewise.
16185 * gdbtypes.h (struct func_type, struct call_site_parameter)
16186 (struct call_site): Likewise.
16187 * stack.c (read_frame_arg): Likewise.
16188 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16192 * defs.h (read_unsigned_leb128): New declaration.
16193 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16194 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16195 (dwarf2_find_location_expression): Call also
16196 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16197 * dwarf2loc.h (dwarf2_version): New declaration.
16198 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16200 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16202 (struct dwop_section_names): Add loclists_dwo.
16203 (dwop_section_names): Add .debug_loclists.dwo.
16204 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16205 (struct dwarf2_per_cu_data): Add dwarf_version.
16206 (struct dwo_sections): Add loclists.
16207 (struct attr_abbrev): Add implicit_const.
16208 (read_indirect_line_string): New declaration.
16209 (read_unsigned_leb128): Delete declaration.
16210 (rcuh_kind): New definition.
16211 (read_and_check_comp_unit_head): Change parameter
16212 is_debug_types_section to section_kind.
16213 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16214 (read_comp_unit_head): Change parameter abfd to section, add parameter
16215 section_kind. Handle DWARF-5.
16216 (error_check_comp_unit_head): Accept also DWARF version 5.
16217 (read_and_check_comp_unit_head): Change parameter
16218 is_debug_types_section to section_kind.
16219 (read_and_check_type_unit_head): Delete function.
16220 (read_abbrev_offset): Handle DWARF-5.
16221 (create_debug_type_hash_table): Add parameter section_kind. Process
16222 only DW_UT_type. Use signature and type_offset_in_tu from struct
16224 (create_debug_types_hash_table): Update create_debug_type_hash_table
16226 (create_all_type_units): Call create_debug_type_hash_table.
16227 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16228 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16230 (skip_one_die): Handle DW_FORM_implicit_const.
16231 (dwarf2_rnglists_process): New function.
16232 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16233 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16234 (read_attribute_value): Handle DW_FORM_implicit_const,
16236 (read_attribute): Handle DW_FORM_implicit_const.
16237 (read_indirect_string_at_offset_from): New function from
16238 read_indirect_string_at_offset.
16239 (read_indirect_string_at_offset): Call
16240 read_indirect_string_at_offset_from.
16241 (read_indirect_line_string_at_offset): New function.
16242 (read_indirect_string): New function comment.
16243 (read_indirect_line_string): New function.
16244 (read_unsigned_leb128): Make it global.
16245 (dwarf2_string_attr): Handle DWARF-5.
16246 (add_include_dir_stub, read_formatted_entries): New functions.
16247 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16249 (per_cu_header_read_in): Update read_comp_unit_head caller.
16250 (dwarf2_version): New function.
16251 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16253 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16258 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16262 * dwarf2read.c (dwarf2_ranges_process): New function from
16263 dwarf2_ranges_read.
16264 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16265 dwarf2_ranges_process.
16269 * dwarf2read.c (create_debug_type_hash_table): New function from
16270 create_debug_types_hash_table.
16271 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16272 (create_all_type_units, open_and_init_dwo_file): Update
16273 create_debug_types_hash_table callers.
16278 * fork-child.c (trace_start_error): Fix thinko. va_end should
16279 refer to 'ap', not 'args'.
16285 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16287 * fork-child.c (trace_start_error): New function.
16288 (trace_start_error_with_name): Likewise.
16289 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16290 * inf-ptrace.c (inf_ptrace_me): Likewise.
16291 * inferior.h (trace_start_error): New prototype.
16292 (trace_start_error_with_name): Likewise.
16297 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16298 NULL before using it.
16299 * symmisc.c (maintenance_print_symbols): Likewise.
16300 (maintenance_print_msymbols): Likewise.
16304 * NEWS: Add record Python bindings entry.
16308 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16310 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16311 * python/py-record-btrace.c, python/py-record-btrace.h,
16312 python/py-record-full.c, python/py-record-full.h: New file.
16313 * python/py-record.c: Add include for py-record-btrace.h and
16315 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16316 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16317 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16318 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16320 (gdbpy_initialize_btrace): New export.
16321 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16325 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16326 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16327 * python/py-record.c: New file.
16328 * python/python-internal.h (gdbpy_start_recording,
16329 gdbpy_current_recording, gdpy_stop_recording,
16330 gdbpy_initialize_record): New export.
16331 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16332 (python_GdbMethods): Add gdbpy_start_recording,
16333 gdbpy_current_recording and gdbpy_stop_recording.
16337 * record-btrace.c (record_btrace_record_method): New function.
16338 (init_record_btrace_ops): Initialize to_record_method.
16339 * record-full.c (record_full_record_method): New function.
16340 (init_record_full_ops, init_record_full_core_ops): Add
16341 record_full_record_method.
16342 * record.h (enum record_method): New enum.
16343 * target-debug.h (target_debug_print_enum_record_method: New define.
16344 * target-delegates.c: Regenerate.
16345 * target.c (target_record_method): New function.
16346 * target.h: Include record.h.
16347 (struct target_ops) <to_record_method>: New field.
16348 (target_record_method): New export.
16352 * record.h (record_start, record_stop): New export.
16353 * record.c (record_start, record_stop): New function.
16357 * btrace.c (btrace_fetch): Copy function call segments pointer
16359 (btrace_clear): Clear the vector.
16360 (btrace_find_insn_by_number): Use binary search to find the correct
16361 function call segment.
16362 * btrace.h (brace_fun_p): New typedef.
16363 (struct btrace_thread_info) <functions>: New field.
16367 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16368 * btrace.c (btrace_decode_error): ... here. New function.
16369 * btrace.h (btrace_decode_error): New export.
16373 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16374 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16375 btrace_find_insn_by_number): Remove special case for gaps.
16376 * btrace.h (btrace_insn_get_error): New export.
16377 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16378 * record-btrace.c (btrace_insn_history): Print number for gaps.
16379 (record_btrace_info, record_btrace_goto): Handle gaps.
16384 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16386 * python/py-evts.c (gdbpy_initialize_py_events): Add
16387 before_prompt registry.
16388 * python/py-events.h (events_object) <before_prompt>: New field.
16392 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16396 * symfile (_initialize_symfile): Add usage text to the load command's
16401 * utils.c (defaulted_query): Don't query on secondary UIs.
16405 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16409 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16411 * python/py-type.c (typy_legacy_template_argument): Remove
16412 unnecessary "cleanup" local.
16416 * python/python.c (do_start_initialization): New function, from
16417 _initialize_python.
16418 (_initialize_python): Call do_start_initialization.
16419 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16424 * python/py-prettyprint.c (pretty_print_one_value): Use
16429 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16430 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16432 * python/py-type.c (field_new): Use gdbpy_ref.
16433 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16435 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16436 (py_free_pspace): Likewise.
16437 (pspace_to_pspace_object): Likewise.
16438 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16439 (py_free_objfile): Likewise.
16440 (objfile_to_objfile_object): Likewise.
16441 * python/py-inferior.c (delete_thread_object): Use
16443 (infpy_read_memory): Likewise.
16444 (py_free_inferior): Likewise.
16445 * python/py-evtregistry.c (create_eventregistry_object): Use
16447 * python/py-event.c (create_event_object): Use gdbpy_ref.
16451 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16452 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16454 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16455 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16456 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16457 python/py-framefilter.c, python/py-function.c,
16458 python/py-inferior.c, python/py-infevents.c,
16459 python/py-linetable.c, python/py-newobjfileevent.c,
16460 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16461 python/py-signalevent.c, python/py-stopevent.c,
16462 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16463 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16464 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16465 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16469 * ui-out.h (ui_out_emit_type): New class.
16470 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16471 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16472 and ui_out_emit_tuple.
16473 (enumerate_locals): Likewise.
16474 (py_mi_print_variables, py_print_locals, py_print_args): Use
16476 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16478 * common/gdb_optional.h: New file.
16482 * MAINTAINERS (Write After Approval): Update my e-mail address.
16487 * breakpoint.c (_initialize_breakpoint): Update the help description
16488 of the 'commands' command to indicate that it takes a list argument.
16492 * interps.c (current_interp_set_logging): Remove "return".
16496 * symtab.c (add_symtab_completions): Prevent NULL pointer
16501 * interps.c (interp::interp): Remove reference to quiet_p.
16502 (interp_set): Make static. Remove dead "Switching to" output
16504 (interp_quiet_p, interp_set_quiet): Delete.
16505 (interpreter_exec_cmd): Don't set the interpreter quiet.
16506 * interps.h (interp_quiet_p): Make static.
16507 (class interp) <quiet_p>: Remove field
16511 * cli/cli-decode.c (find_command_name_length): Make it extern.
16512 * cli/cli-decode.h (find_command_name_length): Declare.
16513 * cli/cli-script.c (command_name_equals, line_first_arg):
16515 (process_next_line): Use cli-decode to parse command names.
16516 (build_command_line): Make args a constant pointer.
16520 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16521 Remove case-insensitive search.
16525 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16526 at the end of the line. Avoids an ARI warning.
16530 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16531 rdseed instructions.
16532 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16537 Provide and use sparc32 and sparc64 target description XML files.
16538 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16539 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16540 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16541 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16542 * features/sparc/sparc32-solaris.xml: New file.
16543 * features/sparc/sparc64-solaris.xml: New file.
16544 * features/sparc/sparc32-solaris.c: Generated.
16545 * features/sparc/sparc64-solaris.c: Generated.
16546 * sparc-tdep.h: Account for differences in target descriptions.
16547 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16548 (sparc32_register_type): Use target provided registers.
16549 (validate_tdesc_registers): New function.
16550 (sparc32_gdbarch_init): Use tdesc_has_registers.
16551 Set pseudoregister functions.
16552 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16553 (sparc64_register_type): Use target provided registers.
16554 (sparc64_init_abi): Set pseudoregister functions.
16559 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16560 with a single member.
16564 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16565 (cli_interp_base::~cli_interp_base): New.
16566 (cli_interp): New struct.
16567 (as_cli_interp): Cast the interp itself to cli_interp.
16568 (cli_interpreter_pre_command_loop): Rename to ...
16569 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16571 (cli_interpreter_init): Rename to ...
16572 (cli_interp::init): ... this. Remove 'self' parameter. Use
16573 boolean. Make extern.
16574 (cli_interpreter_resume): Rename to ...
16575 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16577 (cli_interpreter_suspend): Rename to ...
16578 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16580 (cli_interpreter_exec): Rename to ...
16581 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16583 (cli_interpreter_supports_command_editing): Rename to ...
16584 (cli_interp_base::supports_command_editing): ... this. Remove
16585 'interp' parameter. Make extern.
16586 (cli_ui_out): Rename to ...
16587 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16589 (cli_set_logging): Rename to ...
16590 (cli_interp_base::set_logging): ... this. Remove 'interp'
16591 parameter. Make extern.
16592 (cli_interp_procs): Delete.
16593 (cli_interp_factory): Adjust to use "new".
16594 * cli/cli-interp.h: Include "interps.h".
16595 (struct cli_interp_base): New struct.
16596 * interps.c (struct interp): Delete. Fields moved to interps.h.
16597 (interp_new): Delete.
16598 (interp::interp, interp::~interp): New.
16599 (interp_set): Use bool, and return void. Assume the interpreter
16600 has suspend, init and resume methods, and that the all return
16602 (set_top_level_interpreter): interp_set returns void.
16603 (interp_ui_out): Adapt.
16604 (current_interp_set_logging): Adapt.
16605 (interp_data): Delete.
16606 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16607 (interp_exec): Adapt.
16608 (top_level_interpreter_data): Delete.
16609 * interps.h (interp_init_ftype, interp_resume_ftype)
16610 (interp_suspend_ftype, interp_exec_ftype)
16611 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16612 (class interp): New.
16613 (interp_new): Delete.
16614 (interp_set): Now returns void. Use bool.
16615 (interp_data, top_level_interpreter_data): Delete.
16616 * mi/mi-common.h: Include interps.h.
16617 (class mi_interp): Inherit from interp. Define a ctor. Declare
16618 init, resume, suspect, exec, interp_ui_out, set_logging and
16619 pre_command_loop methods.
16620 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16621 (mi_interpreter_init): Rename to ...
16622 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16623 bool, return void and make extern. Adjust.
16624 (mi_interpreter_resume): ... Rename to ...
16625 (mi_interp::resume): ... this. Remove the 'data' parameter,
16626 return void and make extern. Adjust.
16627 (mi_interpreter_suspend): ... Rename to ...
16628 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16629 return void and make extern. Adjust.
16630 (mi_interpreter_exec): ... Rename to ...
16631 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16633 (mi_interpreter_pre_command_loop): ... Rename to ...
16634 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16635 parameter and make extern.
16636 (mi_on_normal_stop_1): Adjust.
16637 (mi_ui_out): Rename to ...
16638 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16639 parameter and make extern. Adjust.
16640 (mi_set_logging): Rename to ...
16641 (mi_interp::set_logging): ... this. Remove the 'interp'
16642 parameter and make extern. Adjust.
16643 (mi_interp_procs): Delete.
16644 (mi_interp_factory): Adjust to use 'new'.
16645 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16646 (mi_print_exception, mi_execute_command, mi_load_progress):
16648 * tui/tui-interp.c (tui_interp): New class.
16649 (as_tui_interp): Return a tui_interp pointer.
16650 (tui_on_normal_stop, tui_on_signal_received)
16651 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16652 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16653 to use interp::interp_ui_out.
16654 (tui_init): Rename to ...
16655 (tui_interp::init): ... this. Remove the 'self' parameter, use
16656 bool, return void and make extern. Adjust.
16657 (tui_resume): Rename to ...
16658 (tui_interp::resume): ... this. Remove the 'data' parameter,
16659 return void and make extern. Adjust.
16660 (tui_suspend): Rename to ...
16661 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16662 return void and make extern. Adjust.
16663 (tui_ui_out): Rename to ...
16664 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16665 parameter, and make extern. Adjust.
16666 (tui_exec): Rename to ...
16667 (tui_interp::exec): ... this. Remove the 'data' parameter and
16669 (tui_interp_procs): Delete.
16670 (tui_interp_factory): Use "new".
16674 * rust-exp.y (ends_raw_string, space_then_number)
16675 (rust_identifier_start_p): Return bool.
16676 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16677 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16678 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16679 (rust_chartype_p): Return bool.
16680 (val_print_struct, rust_print_struct_def, rust_print_type):
16682 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16687 * rust-lang.c: Reindent.
16691 * rust-lang.h (rust_crate_for_block): Update.
16692 * rust-lang.c (rust_crate_for_block): Return std::string.
16693 (rust_get_disr_info): Use std:;string, not
16694 gdb::unique_xmalloc_ptr.
16695 * rust-exp.y (crate_name): Update.
16699 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16700 field out of gdb_disassembler_test and make it static.
16704 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16705 mi1_interp and mi_interp fields.
16709 * cli/cli-interp.c (struct saved_output_files, saved_output):
16710 Moved from cli/cli-logging.c.
16711 (cli_set_logging): New function.
16712 (cli_interp_procs): Install cli_set_logging.
16713 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16715 * cli/cli-logging.c (struct saved_output_files, saved_output):
16716 Moved to cli/cli-interp.c.
16717 (pop_output_files): Don't save outputs here.
16718 (make_logging_output): New function.
16719 (handle_redirections): Don't build tee nor save previous outputs
16721 * interps.c (current_interp_set_logging): Change prototype.
16722 Assume there's always a set_logging_proc method installed.
16723 * interps.h (interp_set_logging_ftype): Change prototype.
16724 (current_interp_set_logging): Change prototype and adjust comment.
16725 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16726 use make_logging_output.
16727 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16730 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16732 (set_logging_overwrite): ... here.
16733 (logging_no_redirect_file): Delete.
16734 (set_logging_redirect): Don't handle redirection on the fly.
16735 Instead warn that "logging off" / "logging on" is necessary.
16736 (pop_output_files): Delete references to logging_no_redirect_file.
16737 (show_logging_command): Always speak in terms of what will happen
16738 once logging is reenabled.
16742 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16746 * disasm.c (gdb_pretty_print_insn): Rename to ...
16747 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16748 Remove gdbarch parameter. Adapt to clear the object's buffers
16749 instead of allocating new buffers, and to print using the object's
16750 gdb_disassembler instead of calling gdb_print_insn.
16751 (dump_insns): Use gdb_pretty_print_disassembler.
16752 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16753 (gdb_pretty_print_disassembler): New class.
16754 * record-btrace.c (btrace_insn_history): Use
16755 gdb_pretty_print_disassembler.
16759 * ada-lang.c (type_as_string): Use string_file.
16760 * ada-valprint.c (ada_print_floating): Use string_file.
16761 * ada-varobj.c (ada_varobj_scalar_image)
16762 (ada_varobj_get_value_image): Use string_file.
16763 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16764 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16765 * breakpoint.c (update_inserted_breakpoint_locations)
16766 (insert_breakpoint_locations, reattach_breakpoints)
16767 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16768 (print_it_watchpoint): Use string_file.
16769 (save_breakpoints): Use stdio_file.
16770 * c-exp.y (oper): Use string_file.
16771 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16773 (pop_output_files): Use delete.
16774 (handle_redirections): Use stdio_file and tee_file.
16775 * cli/cli-setshow.c (do_show_command): Use string_file.
16776 * compile/compile-c-support.c (c_compute_program): Use
16778 * compile/compile-c-symbols.c (generate_vla_size): Take a
16779 'string_file &' instead of a 'ui_file *'.
16780 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16781 of a 'ui_file *'. Use string_file.
16782 (generate_c_for_variable_locations): Take a 'string_file &'
16783 instead of a 'ui_file *'.
16784 * compile/compile-internal.h (generate_c_for_for_one_variable):
16785 Take a 'string_file &' instead of a 'ui_file *'.
16786 * compile/compile-loc2c.c (push, pushf, unary, binary)
16787 (print_label, pushf_register_address, pushf_register)
16788 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16789 'ui_file *'. Adjust.
16790 * compile/compile.c (compile_to_object): Use string_file.
16791 * compile/compile.h (compile_dwarf_expr_to_c)
16792 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16794 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16795 (replace_typedefs_qualified_name): Use string_file and
16797 * disasm.c (gdb_pretty_print_insn): Use string_file.
16798 (gdb_disassembly): Adjust reference the null_stream global.
16799 (do_ui_file_delete): Delete.
16800 (gdb_insn_length): Use null_stream.
16801 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16802 * dwarf2loc.c (dwarf2_compile_property_to_c)
16803 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16804 'string_file &' instead of a 'ui_file *'.
16805 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16806 * dwarf2read.c (do_ui_file_peek_last): Delete.
16807 (dwarf2_compute_name): Use string_file.
16808 * event-top.c (gdb_setup_readline): Use stdio_file.
16809 * gdbarch.sh (verify_gdbarch): Use string_file.
16810 * gdbtypes.c (safe_parse_type): Use null_stream.
16811 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16813 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16814 'string_file *' instead of a 'ui_file *'.
16815 (gdbscm_arch_disassemble): Use string_file.
16816 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16817 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16818 inherits from ui_file.
16819 (ioscm_file_port_delete, ioscm_file_port_rewind)
16820 (ioscm_file_port_put): Delete.
16821 (ioscm_file_port_write): Rename to ...
16822 (ioscm_file_port::write): ... this. Remove file_port_magic
16824 (ioscm_file_port_new): Delete.
16825 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16827 * guile/scm-type.c (tyscm_type_name): Use string_file.
16828 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16830 * infcmd.c (print_return_value_1): Use string_file.
16831 * infrun.c (print_target_wait_results): Use string_file.
16832 * language.c (add_language): Use string_file.
16833 * location.c (explicit_to_string_internal): Use string_file.
16834 * main.c (captured_main_1): Use null_file.
16835 * maint.c (maintenance_print_architecture): Use stdio_file.
16836 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16837 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16838 event_channel>: Change type to mi_console_file pointer.
16839 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16840 (mi_console_file_delete): Delete.
16841 (struct mi_console_file): Delete.
16842 (mi_console_file_magic): Delete.
16843 (mi_console_file_new): Delete.
16844 (mi_console_file::mi_console_file): New.
16845 (mi_console_file_delete): Delete.
16846 (mi_console_file_fputs): Delete.
16847 (mi_console_file::write): New.
16848 (mi_console_raw_packet): Delete.
16849 (mi_console_file::flush): New.
16850 (mi_console_file_flush): Delete.
16851 (mi_console_set_raw): Rename to ...
16852 (mi_console_file::set_raw): ... this.
16853 * mi/mi-console.h (class mi_console_file): New class.
16854 (mi_console_file_new, mi_console_set_raw): Delete.
16855 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16856 (mi_set_logging): Use delete and tee_file. Adjust.
16857 * mi/mi-main.c (output_register): Use string_file.
16858 (mi_cmd_data_evaluate_expression): Use string_file.
16859 (mi_cmd_data_read_memory): Use string_file.
16860 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16861 * mi/mi-out.c (mi_ui_out::main_stream): New.
16862 (mi_ui_out::rewind): Use main_stream and
16864 (mi_ui_out::put): Use main_stream and string_file.
16865 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16866 Allocate a 'string_file' instead.
16867 (mi_out_new): Don't allocate a mem_fileopen stream here.
16868 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16869 (mi_ui_out::main_stream): Declare method.
16870 * printcmd.c (eval_command): Use string_file.
16871 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16872 * python/py-arch.c (archpy_disassemble): Use string_file.
16873 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16874 * python/py-frame.c (frapy_str): Use string_file.
16875 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16877 * python/py-type.c (typy_str): Use string_file.
16878 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16879 * python/py-value.c (valpy_str): Use string_file.
16880 * record-btrace.c (btrace_insn_history): Use string_file.
16881 * regcache.c (regcache_print): Use stdio_file.
16882 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16883 * remote.c (escape_buffer): Use string_file.
16884 * rust-lang.c (rust_get_disr_info): Use string_file.
16885 * serial.c (serial_open_ops_1): Use stdio_file.
16886 (do_serial_close): Use delete.
16887 * stack.c (print_frame_arg): Use string_file.
16888 (print_frame_args): Remove local mem_fileopen stream, not used.
16889 (print_frame): Use string_file.
16890 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16891 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16892 Take a 'string_file *' instead of a 'ui_file *'.
16893 * top.c (new_ui): Use stdio_file and stderr_file.
16894 (free_ui): Use delete.
16895 (execute_command_to_string): Use string_file.
16896 (quit_confirm): Use string_file.
16897 * tracepoint.c (collection_list::append_exp): Use string_file.
16898 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16899 * tui/tui-file.c: Don't include "ui-file.h".
16900 (enum streamtype, struct tui_stream): Delete.
16901 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16902 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16903 (tui_file::tui_file): New method.
16904 (tui_file_fputs): Delete.
16905 (tui_file_get_strbuf): Delete.
16906 (tui_file::puts): New method.
16907 (tui_file_adjust_strbuf): Delete.
16908 (tui_file_flush): Delete.
16909 (tui_file::flush): New method.
16910 * tui/tui-file.h: Tweak intro comment.
16912 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16913 (tui_file_adjust_strbuf): Delete declarations.
16914 (class tui_file): New class.
16915 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16916 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16917 (tui_register_format): Use string_stream.
16918 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16919 (tui_get_function_from_frame): Use string_file.
16920 * typeprint.c (type_to_string): Use string_file.
16921 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16922 (null_stream): New global.
16923 (ui_file_delete): Delete.
16924 (ui_file::ui_file): New.
16925 (null_file_isatty): Delete.
16926 (ui_file::~ui_file): New.
16927 (null_file_rewind): Delete.
16928 (ui_file::printf): New.
16929 (null_file_put): Delete.
16930 (null_file_flush): Delete.
16931 (ui_file::putstr): New.
16932 (null_file_write): Delete.
16933 (ui_file::putstrn): New.
16934 (null_file_read): Delete.
16935 (ui_file::putc): New.
16936 (null_file_fputs): Delete.
16937 (null_file_write_async_safe): Delete.
16938 (ui_file::vprintf): New.
16939 (null_file_delete): Delete.
16940 (null_file::write): New.
16941 (null_file_fseek): Delete.
16942 (null_file::puts): New.
16943 (ui_file_data): Delete.
16944 (null_file::write_async_safe): New.
16945 (gdb_flush, ui_file_isatty): Adjust.
16946 (ui_file_put, ui_file_rewind): Delete.
16947 (ui_file_write): Adjust.
16948 (ui_file_write_for_put): Delete.
16949 (ui_file_write_async_safe, ui_file_read): Adjust.
16950 (ui_file_fseek): Delete.
16951 (fputs_unfiltered): Adjust.
16952 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16953 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16954 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16955 (set_ui_file_data): Delete.
16956 (string_file::~string_file, string_file::write)
16957 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16958 (do_ui_file_as_string, ui_file_as_string): Delete.
16959 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16960 (struct mem_file): Delete.
16961 (mem_file_new): Delete.
16962 (stdio_file::stdio_file): New.
16963 (mem_file_delete): Delete.
16964 (stdio_file::stdio_file): New.
16965 (mem_fileopen): Delete.
16966 (stdio_file::~stdio_file): New.
16967 (mem_file_rewind): Delete.
16968 (stdio_file::set_stream): New.
16969 (mem_file_put): Delete.
16970 (stdio_file::open): New.
16971 (mem_file_write): Delete.
16972 (stdio_file_magic, struct stdio_file): Delete.
16973 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16974 (stdio_file::flush): New.
16975 (stdio_file_read): Rename to ...
16976 (stdio_file::read): ... this. Adjust.
16977 (stdio_file_write): Rename to ...
16978 (stdio_file::write): ... this. Adjust.
16979 (stdio_file_write_async_safe): Rename to ...
16980 (stdio_file::write_async_safe) ... this. Adjust.
16981 (stdio_file_fputs): Rename to ...
16982 (stdio_file::puts) ... this. Adjust.
16983 (stdio_file_isatty): Delete.
16984 (stdio_file_fseek): Delete.
16985 (stdio_file::isatty): New.
16986 (stderr_file_write): Rename to ...
16987 (stderr_file::write) ... this. Adjust.
16988 (stderr_file_fputs): Rename to ...
16989 (stderr_file::puts) ... this. Adjust.
16990 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16991 (stderr_file::stderr_file): New.
16992 (tee_file_magic): Delete.
16993 (struct tee_file): Delete.
16994 (tee_file::tee_file): New.
16995 (tee_file_new): Delete.
16996 (tee_file::~tee_file): New.
16997 (tee_file_delete): Delete.
16998 (tee_file_flush): Rename to ...
16999 (tee_file::flush): ... this. Adjust.
17000 (tee_file_write): Rename to ...
17001 (tee_file::write): ... this. Adjust.
17002 (tee_file::write_async_safe): New.
17003 (tee_file_fputs): Rename to ...
17004 (tee_file::puts): ... this. Adjust.
17005 (tee_file_isatty): Rename to ...
17006 (tee_file::isatty): ... this. Adjust.
17007 * ui-file.h (struct obstack, struct ui_file): Don't
17009 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
17010 (ui_file_write_ftype)
17011 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
17012 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
17013 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
17014 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
17015 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
17016 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
17017 (set_ui_file_fseek): Delete.
17018 (ui_file_data, ui_file_delete, ui_file_rewind)
17019 (struct ui_file): New.
17021 (class null_file): New.
17022 (null_stream): Declare.
17023 (ui_file_write_for_put, ui_file_put): Delete.
17024 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
17026 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
17027 (gdb_fopen, tee_file_new): Delete.
17028 (struct string_file): New.
17029 (struct stdio_file): New.
17030 (stdio_file_up): New.
17031 (struct stderr_file): New.
17032 (class tee_file): New.
17033 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
17034 of a 'ui_file *'. Adjust.
17035 * ui-out.h (class ui_out) <field_stream>: Likewise.
17036 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
17037 (null_stream): Delete.
17038 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
17040 * utils.h (struct ui_file): Delete forward declaration..
17041 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
17042 (error_stream): Take a 'string_file &' instead of a
17044 * varobj.c (varobj_value_get_print_value): Use string_file.
17045 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
17046 * gdbarch.c: Regenerate.
17050 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17051 (gdb_pretty_print_insn): ... this. Now a free function. Add back
17052 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
17053 Adjust to call gdb_print_insn instead of
17054 gdb_disassembler::print_insn.
17055 (dump_insns, do_mixed_source_and_assembly_deprecated)
17056 (do_mixed_source_and_assembly, do_assembly_only): Add back a
17057 'gdbarch' parameter. Remove gdb_disassembler parameter.
17058 (gdb_disassembly): Don't allocate a gdb_disassembler here.
17059 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17061 (gdb_pretty_print_insn): Re-add declaration.
17062 * record-btrace.c (btrace_insn_history): Don't allocate a
17063 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
17067 * disasm.h (gdb_disassembly): Remove file_string parameter.
17068 * disasm.c (gdb_disassembly): Likewise.
17069 * cli/cli-cmds.c (print_disassembly): Adapt.
17070 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17071 * stack.c (do_gdb_disassembly): Likewise.
17075 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17076 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17077 targets. And if the implicit value is longer than needed, extract
17078 the first bytes instead of the "least significant" ones.
17082 * btrace.c (btrace_enable): Do not call btrace_add_pc for
17083 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17084 (btrace_fetch): Assert can_access_registers_ptid.
17085 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17086 validate_registers_access.
17090 * gdbthread.h (can_access_registers_ptid): New.
17091 * thread.c (can_access_registers_ptid): New.
17095 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17099 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17104 * stack.c (print_frame_args): Remove local mem_fileopen stream,
17109 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17113 * common/scoped_restore.h
17114 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17115 change the value's parameter type to T2.
17116 (make_scoped_restore): Likewise.
17121 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17122 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17123 GS_BASE for older kernels.
17124 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17125 GS_BASE for older kernels.
17126 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17127 and GS_BASE to the offset table.
17128 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17129 system register group.
17130 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17132 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17134 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17135 AMD64_GSBASE_REGNUM.
17136 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17137 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17138 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17139 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17140 i386/64bit-segments.xml in those rules.
17141 * features/i386/64bit-segments.xml: New file.
17142 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17143 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17144 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17145 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17146 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17147 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17148 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17149 * features/i386/amd64-avx-linux.c: Regenerated.
17150 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17151 * features/i386/amd64-avx-mpx.c: Regenerated.
17152 * features/i386/amd64-avx512-linux.c: Regenerated.
17153 * features/i386/amd64-linux.c: Regenerated.
17154 * features/i386/amd64-mpx-linux.c: Regenerated.
17155 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17156 * features/i386/i386-avx-mpx.c: Regenerated.
17157 * features/i386/x32-avx-linux.c: Regenerated.
17158 * features/i386/x32-avx512-linux.c: Regenerated.
17159 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17160 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17161 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17162 * regformats/i386/amd64-linux.dat: Regenerated.
17163 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17164 * regformats/i386/x32-avx-linux.dat: Regenerated.
17165 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17166 * regformats/i386/x32-linux.dat: Regenerated.
17170 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17171 Set to AMD64_NUM_REGS.
17175 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17176 that checks validity of a register number.
17180 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17181 fetch_fpregs if target has fpa registers.
17182 (arm_linux_store_inferior_registers): Call store_fpregs if target
17187 * cris-tdep.c (cris_gdbarch_init): Remove check for
17188 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17192 * corelow.c (get_core_register_section): Check for regset
17193 existence before checking for REGSET_VARIABLE_SIZE.
17199 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17200 call memory_error, save memaddr instead.
17201 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17202 negative, cal memory_error.
17203 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17207 * disasm-selftests.c (memory_error_test): New function.
17208 (_initialize_disasm_selftests): Register memory_error_test.
17212 * Makefile.in (SFILES): Add disasm-selftests.c and
17214 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17215 * disasm-selftests.c: New file.
17216 * selftest-arch.c: New file.
17217 * selftest-arch.h: New file.
17221 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17222 to bfd_arch_mep. Don't return 0 if section is not
17223 found. Call print_insn_mep.
17228 * arm-tdep.c: Include "disasm.h".
17229 (gdb_print_insn_arm): Update code to get gdbarch.
17230 * disasm.c (dis_asm_read_memory): Change it to
17231 gdb_disassembler::dis_asm_read_memory.
17232 (dis_asm_memory_error): Likewise.
17233 (dis_asm_print_address): Likewise.
17234 (gdb_pretty_print_insn): Change it to
17235 gdb_disassembler::pretty_print_insn.
17236 (dump_insns): Add one argument gdb_disassemlber. All
17238 (do_mixed_source_and_assembly_deprecated): Likewise.
17239 (do_mixed_source_and_assembly): Likewise.
17240 (do_assembly_only): Likewise.
17241 (gdb_disassembler::gdb_disassembler): New.
17242 (gdb_disassembler::print_insn): New.
17243 * disasm.h (class gdb_disassembler): New.
17244 (gdb_pretty_print_insn): Remove declaration.
17245 (gdb_disassemble_info): Likewise.
17246 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17247 (gdbscm_disasm_read_memory_worker): Update.
17248 (gdbscm_disasm_read_memory): Update.
17249 (gdbscm_disasm_memory_error): Remove.
17250 (gdbscm_disasm_print_address): Remove.
17251 (gdbscm_disassembler::gdbscm_disassembler): New.
17252 (gdbscm_print_insn_from_port): Update.
17253 * mips-tdep.c: Include disasm.h.
17254 (gdb_print_insn_mips): Update code to get gdbarch.
17255 * record-btrace.c (btrace_insn_history): Update.
17256 * spu-tdep.c: Include disasm.h.
17257 (struct spu_dis_asm_data): Remove.
17258 (struct spu_dis_asm_info): New.
17259 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17261 (gdb_print_insn_spu): Cast disassemble_info to
17266 * disasm.c (do_ui_file_delete): Delete.
17267 (gdb_insn_length): Move code creating stream to ...
17268 * utils.c (null_stream): ... here. New function.
17269 * utils.h (null_stream): Declare.
17273 * python/py-inferior.c (find_thread_object): Return directly
17274 from the loop. Remove "found" variable.
17278 GDB 7.12.1 released.
17282 * python/py-function.c (fnpy_call): Reorder declarations to have
17283 the gdbpy_enter object declared first.
17284 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17289 * python/python-internal.h (PyMem_RawMalloc): Define for
17291 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17292 PyMem_RawMalloc instead of PyMem_Malloc.
17297 * NEWS (New commands): Mention flash-erase.
17298 (New MI commands): Mention target-flash-erase.
17299 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17301 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17302 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17303 * target.c (flash_erase_command): New function.
17304 (initialize_targets): Add new flash-erase command.
17305 * target.h (flash_erase_command): New declaration.
17309 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17310 HAVE_SYS_PROCFS_H is defined.
17314 * remote.c (struct cached_reg): Change data into a pointer.
17315 * (stop_reply_dtr): Free data pointers before deleting vector.
17316 (process_stop_reply): Likewise.
17317 (remote_parse_stop_reply): Allocate space for data
17321 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17323 (amd64_pseudo_register_read_value): Likewise.
17324 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17325 (store_register_using_P): Likewise.
17326 * regcache.c (regcache_xfer_part): Likewise.
17330 Split real and pseudo registers.
17331 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17332 (sparc32_pseudo_regnum): New enum.
17333 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17334 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17335 (SPARC32_CP0_REGISTERS): New macro.
17336 (sparc32_pseudo_register_name): New function.
17337 (sparc32_register_name): Use sparc32_pseudo_register_name.
17338 (sparc32_pseudo_register_type): New function.
17339 (sparc32_register_type): Use sparc32_pseudo_register_type.
17340 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17341 pseudo register numbers.
17342 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17343 (SPARC64_CP0_REGISTERS): New macro.
17344 (sparc64_pseudo_register_name): New function.
17345 (sparc64_register_name): Use sparc64_pseudo_register_name.
17346 (sparc64_pseudo_register_type): New function.
17347 (sparc64_register_type): Use sparc64_pseudo_register_type.
17348 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17349 pseudo register numbers.
17350 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17351 sparc64_store_arguments): Handle pseudo register numbers.
17355 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17356 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17358 (getpkt_or_notif_sane_1): Likewise.
17362 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17363 of CC. Pass "-x c++-header" instead of "-x c".
17367 * remote.c (remote_can_async_p): Update comment.
17371 * linux-nat.c (linux_nat_can_async_p): Update comment.
17375 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17379 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17383 * python/py-type.c (typy_legacy_template_argument): Update.
17384 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17385 ~demangle_parse_info): Declare new members.
17386 (cp_demangled_name_to_comp): Return unique_ptr.
17387 (cp_demangled_name_parse_free)
17388 (make_cleanup_cp_demangled_name_parse_free)
17389 (cp_new_demangle_parse_info): Remove.
17390 * cp-support.c (do_demangled_name_parse_free_cleanup)
17391 (make_cleanup_cp_demangled_name_parse_free): Remove.
17392 (inspect_type, cp_canonicalize_string_full)
17393 (cp_canonicalize_string): Update.
17394 (mangled_name_to_comp): Change return type.
17395 (cp_class_name_from_physname, method_name_from_physname)
17396 (cp_func_name, cp_remove_params): Update.
17397 * cp-name-parser.y (demangle_parse_info): New constructor, from
17398 cp_new_demangle_parse_info.
17399 (~demangle_parse_info): New destructor, from
17400 cp_demangled_name_parse_free.
17401 (cp_merge_demangle_parse_infos): Update.
17402 (cp_demangled_name_to_comp): Change return type.
17406 * top.c (prevent_dont_repeat): Change return type.
17407 * python/python.c (execute_gdb_command): Use std::string.
17409 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17410 * command.h (prevent_dont_repeat): Change return type.
17411 * breakpoint.c (bpstat_do_actions_1): Update.
17415 * value.h (scoped_value_mark::~scoped_value_mark): Call
17417 (scoped_value_mark::free_to_mark): New method.
17418 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17423 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17424 (valpy_reference_value, valpy_const_value, valpy_get_address)
17425 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17426 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17427 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17428 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17430 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17431 * value.h (scoped_value_mark): New class.
17435 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17436 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17437 * psymtab.c (discard_psymtabs_upto): Remove.
17438 (make_cleanup_discard_psymtabs): Remove.
17439 (struct psymtab_state): Remove.
17443 * record-full.c (record_full_save_cleanups): Remove.
17444 (record_full_save): Use gdb::unlinker.
17445 * gcore.c (do_bfd_delete_cleanup): Remove.
17446 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17448 * dwarf2read.c (unlink_if_set): Remove.
17449 (write_psymtabs_to_index): Use gdb::unlinker.
17450 * common/gdb_unlinker.h: New file.
17454 * windows-tdep.c (windows_xfer_shared_library): Update.
17455 * windows-nat.c (windows_make_so): Update.
17456 * utils.h (make_cleanup_bfd_unref): Remove.
17457 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17458 * symfile.h (symfile_bfd_open)
17459 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17460 * symfile.c (read_symbols, symbol_file_add)
17461 (separate_debug_file_exists): Update.
17462 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17463 (generic_load, reread_symbols): Update.
17464 * symfile-mem.c (symbol_file_add_from_memory): Update.
17465 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17466 (spu_symbol_file_add_from_memory): Update.
17467 * solist.h (struct target_so_ops) <bfd_open>: Return
17469 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17470 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17472 (solib_map_sections, reload_shared_libraries_1): Update.
17473 * solib-svr4.c (enable_break): Update.
17474 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17475 * solib-frv.c (enable_break2): Update.
17476 * solib-dsbt.c (enable_break): Update.
17477 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17479 (darwin_solib_get_all_image_info_addr_at_init): Update.
17480 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17481 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17482 * record-full.c (record_full_save): Update.
17483 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17484 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17485 * minidebug.c (find_separate_debug_file_in_section): Return
17487 * machoread.c (macho_add_oso_symfile): Change abfd to
17489 (macho_symfile_read_all_oso): Update.
17490 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17491 (macho_symfile_read): Update.
17492 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17493 (jit_bfd_try_read_symtab): Update.
17494 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17495 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17496 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17498 (gdb_bfd_ref_policy): New struct.
17499 (gdb_bfd_ref_ptr): New typedef.
17500 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17501 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17502 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17504 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17505 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17506 (gcore_command): Update.
17507 * exec.c (exec_file_attach): Update.
17508 * elfread.c (elf_symfile_read): Update.
17509 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17510 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17511 (open_and_init_dwo_file): Update.
17512 (open_dwp_file): Return gdb_bfd_ref_ptr.
17513 (open_and_init_dwp_file): Update.
17514 * corelow.c (core_open): Update.
17515 * compile/compile-object-load.c (compile_object_load): Update.
17516 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17517 * coffread.c (coff_symfile_read): Update.
17518 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17519 gdb_bfd_ref_ptr. Rename.
17520 (dump_bfd_file, restore_command): Update.
17521 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17522 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17523 (find_separate_debug_file_by_buildid): Update.
17527 * common/gdb_ref_ptr.h: New file.
17528 * python/py-ref.h (struct gdbpy_ref_policy): New.
17529 (gdbpy_ref): Now a typedef.
17533 * utils.h (make_cleanup_htab_delete): Don't declare.
17534 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17536 * linespec.c (decode_compound_collector): Add constructor,
17538 (lookup_prefix_sym): Remove cleanup.
17539 (symtab_collector): Add constructor, destructor.
17540 (collect_symtabs_from_filename): Remove cleanup.
17541 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17542 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17544 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17545 * dwarf2read.c (dw2_expand_symtabs_matching)
17546 (dw2_map_symbol_filenames, dwarf_decode_macros)
17547 (write_psymtabs_to_index): Use htab_up.
17548 * dwarf2loc.c (func_verify_no_selftailcall)
17549 (call_site_find_chain_1, func_verify_no_selftailcall)
17550 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17551 std::vector, gdb::unique_xmalloc_ptr.
17552 (call_sitep): Remove typedef.
17553 (dwarf2_locexpr_baton_eval): Remove unused variable.
17557 * python/python-internal.h (make_cleanup_py_decref)
17558 (make_cleanup_py_xdecref): Don't declare.
17559 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17560 (py_xdecref, make_cleanup_py_xdecref): Remove.
17564 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17565 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17569 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17573 * python/py-utils.c (unicode_to_encoded_string)
17574 (python_string_to_target_string)
17575 (python_string_to_target_python_string)
17576 (python_string_to_host_string, gdbpy_obj_to_string)
17577 (get_addr_from_python): Use gdbpy_ref.
17581 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17586 * python/python.c (eval_python_command, gdbpy_decode_line)
17587 (gdbpy_run_events, gdbpy_start_type_printers)
17588 (gdbpy_apply_type_printers): Use gdbpy_ref.
17592 * python/py-param.c (get_doc_string, compute_enum_values): Use
17597 * python/py-inferior.c (find_thread_object, build_inferior_list):
17602 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17606 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17611 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17613 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17618 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17623 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17624 decref results of PyArg_ParseTupleAndKeywords.
17628 * python/python.c (python_run_simple_file): Use
17629 unique_xmalloc_ptr, gdbpy_ref.
17633 * python/py-prettyprint.c (print_stack_unless_memory_error)
17634 (print_string_repr, print_children): Use gdbpy_ref.
17635 (dummy_python_frame): New class.
17636 (dummy_python_frame::dummy_python_frame): Rename from
17637 push_dummy_python_frame.
17638 (py_restore_tstate): Remove.
17642 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17646 * python/python.c (ensure_python_env, restore_python_env):
17648 * python/python-internal.h (ensure_python_env): Don't declare.
17649 * varobj.h (varobj_ensure_python_env): Don't declare.
17650 * varobj.c (varobj_ensure_python_env): Remove.
17654 * varobj.c (varobj_value_get_print_value): Use
17655 gdbpy_enter_varobj.
17659 * python/py-prettyprint.c (print_string_repr, print_children):
17661 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17663 * varobj.c (varobj_value_get_print_value): Update.
17664 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17668 * varobj.c (varobj_get_display_hint)
17669 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17670 (varobj_set_visualizer, free_variable): Use
17671 gdbpy_enter_varobj.
17675 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17676 (do_finish_initialization): New function. Use gdbpy_ref.
17677 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17678 do_finish_initialization.
17682 * python/py-param.c (get_set_value, get_show_value): Use
17683 gdbpy_enter, gdbpy_ref.
17687 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17691 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17695 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17696 Use gdbpy_enter_varobj.
17700 * varobj.c (gdbpy_enter_varobj): New constructor.
17701 * python/python-internal.h (gdbpy_enter_varobj): New class.
17702 * python/py-varobj.c (py_varobj_get_iterator): Use
17703 gdbpy_enter_varobj.
17707 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17708 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17709 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17710 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17711 unique_xmalloc_ptr.
17712 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17716 * python/py-xmethods.c (invoke_match_method): Use
17721 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17722 gdbpy_enter, gdbpy_ref.
17726 * python/python.c (python_interactive_command): Use gdbpy_enter.
17730 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17735 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17736 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17740 * utils.h (htab_deleter): New struct.
17741 (htab_up): New typedef.
17742 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17743 gdbpy_enter, gdbpy_ref, htab_up.
17747 * python/py-unwind.c (pending_frame_invalidate): Remove.
17748 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17752 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17753 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17757 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17761 * python/python.c (gdbpy_eval_from_control_command)
17762 (gdbpy_source_script, gdbpy_run_events)
17763 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17764 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17769 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17773 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17777 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17778 (python_on_inferior_call_pre, python_on_inferior_call_post)
17779 (python_on_memory_change, python_on_register_change)
17780 (python_inferior_exit, python_new_objfile, add_thread_object)
17781 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17785 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17786 (bpfinishpy_handle_exit): Use gdbpy_enter.
17790 * python/py-cmd.c (cmdpy_destroyer)
17791 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17796 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17798 (gdbpy_breakpoint_has_cond): Likewise.
17802 * python/python.c (gdbpy_enter): New constructor.
17803 (~gdbpy_enter): New destructor.
17804 (restore_python_env, ensure_python_env): Rewrite.
17805 * python/python-internal.h (gdbpy_enter): New class.
17809 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17813 * python/py-value.c (value_has_field, get_field_flag)
17814 (get_field_type, valpy_getitem, convert_value_from_python): Use
17819 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17824 * python/py-prettyprint.c (search_pp_list)
17825 (find_pretty_printer_from_objfiles)
17826 (find_pretty_printer_from_progspace)
17827 (find_pretty_printer_from_gdb, find_pretty_printer)
17828 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17833 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17837 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17838 (ltpy_get_all_source_lines): Use gdbpy_ref.
17842 * python/py-framefilter.c (extract_sym, extract_value)
17843 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17848 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17852 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17856 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17861 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17865 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17866 (typy_range): Use gdbpy_ref.
17870 * python/py-threadevent.c (create_thread_event_object): Use
17872 * python/py-stopevent.c (create_stop_event_object): Simplify.
17873 (emit_stop_event): Use gdbpy_ref.
17874 * python/py-signalevent.c (create_signal_event_object): Use
17876 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17877 (emit_new_objfile_event, create_clear_objfiles_event_object)
17878 (emit_clear_objfiles_event): Use gdbpy_ref.
17879 * python/py-infevents.c (create_inferior_call_event_object)
17880 (create_register_changed_event_object)
17881 (create_memory_changed_event_object, emit_inferior_call_event)
17882 (emit_memory_changed_event, emit_register_changed_event): Use
17884 * python/py-exitedevent.c (create_exited_event_object)
17885 (emit_exited_event): Use gdbpy_ref.
17886 * python/py-event.h (evpy_emit_event): Remove
17887 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17888 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17889 * python/py-continueevent.c (emit_continue_event): Use
17891 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17892 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17894 * python/py-bpevent.c (create_breakpoint_event_object): Use
17899 * python/py-ref.h: New file.
17903 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17905 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17906 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17907 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17908 * ui-out.c (ui_out::redirect): Likewise.
17909 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17910 * cli/cli-logging.c (set_logging_redirect): Update call site of
17912 (handle_redirections): Likewise.
17913 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17914 * top.c (execute_command_to_string): Likewise.
17915 * utils.c (do_ui_out_redirect_pop): Likewise.
17919 * stack.c (_initialize_stack): Update "frame" command help message.
17923 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17927 * x86-linux-nat.h: Include gdb_proc_service.h.
17931 * ser-base.h: Include serial.h.
17935 * ppc-linux-tdep.h: Include ppc-tdep.h.
17939 * nat/amd64-linux-siginfo.h: Include signal.h.
17943 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17947 * mi/mi-parse.h: Include mi-cmds.h.
17951 * inf-loop.c: Don't include "target.h".
17952 * inf-loop.h: Include it here.
17956 * dfp.h: Include "dboulest.h" and "expression.h".
17960 * ax-gdb.h: Include "ax.h".
17964 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17965 with nat/gdb_ptrace.h.
17969 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17971 (mips64_fbsd_sigframe_init): Likewise.
17975 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17976 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17980 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17981 * NEWS: Mention new FreeBSD/mips native configuration.
17982 * config/mips/fbsd.mh: New file.
17983 * configure.host: Add mips*-*-freebsd*.
17984 * mips-fbsd-nat.c: New file.
17988 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17989 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17990 * NEWS: Mention new FreeBSD/mips target.
17991 * configure.tgt: Add mips*-*-freebsd*.
17992 * mips-fbsd-tdep.c: New file.
17993 * mips-fbsd-tdep.h: New file.
17997 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17998 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
18002 Update copyright year range in all GDB files.
18006 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
18008 For older changes see ChangeLog-2016.
18014 version-control: never