3 * linespec.c (complete_linespec_component): Add cast to "char".
4 * completer.c (completion_tracker::build_completion_result): Add
9 * solist.h (struct solist, struct target_so_ops): Fix
14 * ada-tasks.c (ada_task_info_s): Remove typedef.
15 (DEF_VEC_O(ada_task_info_s)): Remove.
16 (struct ada_tasks_inferior_data): Initialize fields.
17 <task_list>: Make an std::vector.
18 (get_ada_tasks_inferior_data): Allocate with new.
19 (ada_get_task_number): Adjust.
20 (get_task_number_from_id): Likewise.
21 (valid_task_id): Likewise.
22 (ada_get_task_info_from_ptid): Likewise.
23 (iterate_over_live_ada_tasks): Likewise.
24 (add_ada_task): Likewise.
25 (read_known_tasks): Likewise.
26 (ada_build_task_list): Likewise.
27 (print_ada_task_info): Likewise.
28 (info_task): Likewise.
29 (task_command_1): Likewise.
33 * ada-lang.c (add_angle_brackets): Return std::string.
37 * python/py-threadevent.c (py_get_event_thread): Initialize
42 * python/py-bpevent.c (create_breakpoint_event_object): Use
44 * python/py-continueevent.c (emit_continue_event): Use
46 * python/py-exitedevent.c (create_exited_event_object): Return a
48 (emit_exited_event): Use copy-initialization.
49 * python/py-inferior.c (python_new_inferior)
50 (python_inferior_deleted, add_thread_object): Use
52 * python/py-infevents.c (create_inferior_call_event_object)
53 (create_register_changed_event_object)
54 (create_memory_changed_event_object): Return a gdbpy_ref<>.
55 (emit_inferior_call_event, emit_memory_changed_event)
56 (emit_register_changed_event): Use copy-initialization.
57 * python/py-newobjfileevent.c (create_new_objfile_event_object):
59 (emit_new_objfile_event): Use copy-initialization.
60 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
61 (emit_clear_objfiles_event): Use copy-initialization.
62 * python/py-signalevent.c (create_signal_event_object): Use
64 * python/py-threadevent.c (create_thread_event_object): Use
71 * python/py-continueevent.c: Include "gdbthread.h".
72 (create_continue_event_object): Add intro comment. Add 'ptid'
73 parameter. Use it to find thread to pass to
74 create_thread_event_object.
75 (emit_continue_event): Pass PTID down to
76 create_continue_event_object.
77 * python/py-event.h (py_get_event_thread): Declare.
78 (create_thread_event_object): Remove default from 'thread'
80 * python/py-stopevent.c (create_stop_event_object): Use
82 * python/py-threadevent.c (get_event_thread): Rename to ...
83 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
84 and use it to find the thread.
85 (create_thread_event_object): Assert that THREAD isn't null.
86 Don't find the event thread here.
90 * block.h (blockrange, blockranges): New struct declarations.
91 (struct block): Add new field named `ranges'.
92 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
93 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
94 macros for accessing ranges in struct block.
95 (make_blockranges): New declaration.
96 block.c (make_blockranges): New function.
97 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
99 * symtab.h (find_pc_partial_function): Add new parameter `block'.
100 * blockframe.c (cache_pc_function_block): New static global.
101 (clear_pc_function_cache): Clear cache_pc_function_block.
102 (find_pc_partial_function): Move comment to symtab.h. Add
103 support for non-contiguous blocks.
104 * cli/cli-cmds.c (block.h): Include.
105 (print_disassembly): Handle printing of non-contiguous blocks.
106 (disassemble_current_function): Likewise.
107 (disassemble_command): Likewise.
109 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
111 * blockframe.c (get_pc_function_start): Likewise.
112 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
113 (gcc_symbol_address): Likewise.
114 * compile/compile-object-run.c (compile_object_run): Likewise.
115 * compile/compile.c (get_expr_block_and_pc): Likewise.
116 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
117 (func_addr_to_tail_call_list): Likewise.
118 * findvar.c (default_read_var_value): Likewise.
119 * inline-frame.c (inline_frame_this_id): Likewise.
120 (skip-inline_frames): Likewise.
121 * infcmd.c (until_next_command): Likewise.
122 * linespec.c (convert_linespec_to_sals): Likewise.
123 * parse.c (parse_exp_in_context_1): Likewise.
124 * printcmd.c (build_address_symbolic): likewise.
125 (info_address_command): Likewise.
126 symtab.c (find_function_start_sal): Likewise.
127 (skip_prologue_sal): Likewise.
128 (find_function_alias_target): Likewise.
129 (find_gnu_ifunc): Likewise.
130 * stack.c (find_frame_funname): Likewise.
131 * symtab.c (fixup_symbol_section): Likewise.
132 (find_function_start_sal): Likewise.
133 (skip_prologue_sal): Likewsie.
134 (find_function_alias_target): Likewise.
135 (find_gnu_ifunc): Likewise.
136 * tracepoint.c (info_scope_command): Likewise.
137 * value.c (value_fn_field): Likewise.
139 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
140 in place of find_pc_partial_function.
141 * blockframe.c (find_function_entry_range_from_pc): New function.
142 * symtab.h (find_function_entry_range_from_pc): Declare and document.
143 * objfiles.c (objfile_relocate1): Relocate start and end addresses
144 for each range in a block.
149 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
154 * solib-svr4.c (read_program_headers_from_bfd): Return
155 gdb::optional<gdb::byte_vector>.
156 (svr4_exec_displacement): Adjust.
160 * solib-svr4.c (read_program_header): Return
161 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
162 (find_program_interpreter): Return
163 gdb::optional<gdb::byte_vector>.
164 (scan_dyntag_auxv): Adjust.
165 (enable_break): Adjust.
166 (svr4_exec_displacement): Adjust.
170 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
171 * inf-child.c (inf_child_target::terminal_save_inferior): New.
175 * guile/scm-string.c (gdbscm_scm_from_printf): Use
177 * guile/scm-utils.c (gdbscm_printf): Likewise.
178 * serial.c (serial_printf): Likewise.
179 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
183 * stack.c (print_frame): Print frame architecture when printing on
185 * NEWS: Mention new "arch" attribute in frame output.
189 * arch/aarch64.h (aarch64_regnum): Update comment.
193 * NEWS: Add SVE to 8.2 section.
197 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
198 out from gdbscm_parse_function_args.
199 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
200 gdbscm_parse_function_args_1.
205 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
210 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
215 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
220 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
221 dwarf_variable_value.
222 * dwarf2-frame.c (class dwarf_expr_executor):
223 Add override for dwarf_variable_value.
224 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
225 (class symbol_needs_eval_context): Likewise.
226 (indirect_synthetic_pointer): Add forward declaration.
227 (sect_variable_value): New function.
228 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
229 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
230 for DW_OP_GNU_variable_value.
234 * top.c (read_command_file): Update.
235 (command_line_input): Remove "repeat" argument.
236 * ada-lang.c (get_selections): Update.
237 * linespec.c (decode_line_2): Update.
238 * defs.h (command_line_input): Remove argument.
239 * cli/cli-script.c (read_next_line): Update.
240 * python/py-gdb-readline.c: Update.
244 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
249 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
253 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
254 If used, use find_pc_partial_function to find address range
256 * mi/mi-main.c (mi_cmd_list_features): Report
257 "data-disassemble-a-option" feature.
258 * NEWS: Mention new -data-disassemble option -a.
262 * common/common-defs.h (_FORTIFY_SOURCE): Define.
266 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
267 (aarch64_linux_collect_sve_regset): Likewise.
268 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
269 * regcache.h (regcache_map_entry_size): New function.
273 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
274 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
275 (SVE_HEADER_VL_LENGTH): Likewise.
276 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
277 (SVE_HEADER_FLAGS_LENGTH): Likewise.
278 (SVE_HEADER_RESERVED_LENGTH): Likewise.
279 (SVE_HEADER_SIZE_OFFSET): Likewise.
280 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
281 (SVE_HEADER_VL_OFFSET): Likewise.
282 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
283 (SVE_HEADER_FLAGS_OFFSET): Likewise.
284 (SVE_HEADER_RESERVED_OFFSET): Likewise.
285 (SVE_HEADER_SIZE): Likewise.
286 (aarch64_linux_core_read_vq): Add function.
287 (aarch64_linux_core_read_description): Check for SVE section.
291 * aarch64-fbsd-tdep.c
292 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
294 * aarch64-linux-tdep.c
295 (aarch64_linux_iterate_over_regset_sections): Likewise.
297 (alpha_linux_iterate_over_regset_sections):
299 (alphanbsd_iterate_over_regset_sections): Likewise.
301 (amd64fbsd_iterate_over_regset_sections): Likewise.
303 (amd64_linux_iterate_over_regset_sections): Likewise.
305 (armbsd_iterate_over_regset_sections): Likewise.
307 (arm_fbsd_iterate_over_regset_sections): Likewise.
309 (arm_linux_iterate_over_regset_sections): Likewise.
310 * corelow.c (get_core_registers_cb): Likewise.
311 (core_target::fetch_registers): Likewise.
312 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
313 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
314 * gdbarch.h (void): Regenerate.
315 * gdbarch.sh: Add supply_size and collect_size.
316 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
317 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
318 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
319 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
320 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
321 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
322 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
323 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
324 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
325 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
326 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
327 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
328 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
329 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
330 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
331 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
332 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
333 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
334 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
335 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
336 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
337 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
338 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
339 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
340 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
341 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
342 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
343 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
344 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
345 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
349 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
354 * compile/compile-c-support.c (add_code_header, add_code_footer):
355 Move into policy class.
356 (c_push_user_expression, pop_user_expression_nop)
357 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
358 (compile_program): New host class.
359 (c_compile_program): New typedef.
360 (c_compute_porgram): Use c_compile_program.
364 * compile/compile-internal.h (compile_instance::~compile_instance):
365 Remove calls to htab_delete.
366 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
367 * compile.c (compile_instance::compile_instance): Initialize
368 htab unique pointers.
369 (compile_instance::get_cached_type, compile_instance::insert_type)
370 (compile_instance::error_symbol_once): Update for unique_ptr.
374 * compile/compile-c-symbols.c (struct symbol_error)
375 (hash_symbol_error, eq_symbol_error, del_symbol_error)
376 (compile_instance::insert_symbol_error)
377 (compile_instance::error_symbol_once): Move to ...
378 * compile/compile.c: ... here.
382 * compile/compile-c-support.c (c_get_compile_context): Use `new'
383 instead of `new_compile_instance'.
384 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
386 If the symbol error map is not initialized, create it.
387 (generate_c_for_for_one_symbol): Do not check/initialize
388 the symbol error map.
389 * compile/compile-c-types.c (compile_c_instance): Make a class.
391 (compile_instance::compile_instance): Initialize the type cache.
392 (get_cached_type): New function.
393 (insert_type): Update description.
394 (compile_c_instance::m_default_cflags): Define.
395 (convert_type): Update description. Use get_cached_type.
396 (delete_instance): Moved to destructor.
397 (new_compile_instance): Moved to constructor.
398 * compile/compile-c.h (compile_c_instance): Make class inheriting
399 from compile_instance.
400 <base>: Remove field.
401 <type_map, symbol_err_map>: Move to base class.
402 <c_plugin>: Rename to `m_plugin' and remove pointer type.
403 * compile/compile-internal.h (compile_instance): Make class.
404 <type_map_t, symbol_err_map_t>: Define.
405 <fe>: Rename to `m_gcc_fe'.
406 <scope, block, gcc_target_options>: Add `m_' prefix.
407 <m_type_map, m_symbol_err_map>: New fields, moved from
410 (convert_type, new_compile_instance): Remove.
411 * compile/compile.c (cleanup_compile_instance): Remove.
412 (compile_to_object): Use unique_ptr to eliminate cleanups.
413 (compile_instance::set_print_callback, compile_instance::version)
414 (compile_instance::set_verbose)
415 (compile_instance::set_driver_filename)
416 (compile_instance::set_triplet_regexp)
417 (compile_instance::set_arguments)
418 (compile_instance::set_source_file)
419 (compile_instance::compile): Define.
423 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
424 * compile/compile-c-types.c: Define GCC_METHODN macros and include
425 gcc-c-fe.def to define C plugin.
426 (delete_instance): Delete `c_plugin'.
427 (new_compile_instance): Initialize `c_plugin'.
428 * compile/compile-c.h: Include gcc_c_plugin.h.
429 (struct compile_c_instance) <c_plugin>: New member.
430 * gcc-c-plugin.h: New file.
431 Update all callers with API change.
435 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
436 (HFILES_NO_SRCDIR): ... to here.
437 Add compile-internal.h and compile-c.h.
438 * compile/compile-c-support.c: Include compile-c.h.
439 * compile/compile-c-symbols.c: Include compile-c.h.
440 (generate_c_for_variable_locations): Update comment.
441 * compile/compile-c-types.c: Include compile-c.h.
442 * compile/compile-c.h: New file -- moved C language declarations
443 from other files here.
444 * compile/compile-internal.h: Do not include hashtab.h or
446 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
447 (gcc_convert_symbol, gcc_symbol_address)
448 (generate_c_for_variable_locations, c_get_mode_for_size)
449 (c_get_range_decl_name): Definitions moved to compile-c.h.
450 * compile/compile-loc2c.c: Include compile-c.h.
454 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
455 (c_symbol_substitution_name): ... this.
460 * compile/compile-c-support.c (c_compute_program): Use
461 unique_xmalloc_ptr to eliminate cleanup.
462 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
463 Return a unique_xmalloc_ptr and eliminate cleanup.
464 * compile/compile-internal.h (generate_c_for_variable_locations):
465 Return unique_xmalloc_ptr and update description.
469 * corelow.c (core_target::get_core_register_section): Rename
470 min_size to section_min_size.
474 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
475 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
476 * NEWS: Mention new GNU/Linux RISC-V target.
477 * configure.host: Add riscv*-*-linux*.
478 * configure.nat: Add riscv*.
479 * configure.tgt: Add riscv*-*-linux*.
480 * riscv-linux-nat.c: New file.
481 * riscv-linux-tdep.c: New file.
485 * infrun.c (resume): Make static, add forward declaration.
486 (proceed): Update header comment.
487 * infrun.h (resume): Delete declaration.
491 * riscv-tdep.h: Minor formatting fixes.
495 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
496 * dwarf-index-cache.c (create_dir_and_check): Likewise.
497 (test_mkdir_recursive): Likewise.
498 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
502 * valarith.c (value_subscripted_rvalue): If an array is not in
503 memory, and we don't know the upper bound, then we can't know that
504 the requested element exists or not.
508 * target.c (str_comma_list_concat_elem): Fix typo in comment.
509 (target_options_to_string): Add comment.
513 * unittests/scoped_mmap-selftests.c: Check result of "write".
517 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
518 (decode_register_index_short): New.
519 (decode_j_type_insn, decode_cj_type_insn): New.
520 (decode_b_type_insn, decode_cb_type_insn): New.
521 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
522 local xlen. Check xlen when decoding ambiguous compressed insns. In
523 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
524 is_c_sw_insn instead of is_sw_insn.
525 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
526 (riscv_software_single_step): New.
527 * riscv-tdep.h (riscv_software_single_step): Declare.
529 * riscv-tdep.c (riscv_isa_xlen): Drop static.
530 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
535 * target.c (dispose_inferior): Don't dispose of inferiors that are
540 * remote.c (remote_target::download_tracepoint): Change char* to
545 * target.h (target_options_to_string): Return an std::string.
546 * target.c (str_comma_list_concat_elem): Return void, use
548 (do_option): Likewise.
549 (target_options_to_string): Return an std::string.
550 * linux-nat.c (linux_nat_target::wait): Adjust.
551 * target-debug.h (target_debug_print_options): Adjust.
555 * Makefile.in (CPPFLAGS): New variable.
556 (INTERNAL_CPPFLAGS): Use it.
560 * NEWS: Mention the index cache.
564 * common/pathstuff.h (get_standard_cache_dir): New.
565 * common/pathstuff.c (get_standard_cache_dir): New.
566 * build-id.h (build_id_to_string): New.
567 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
568 DEBUG_STR_SUFFIX): Move to here.
569 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
570 DEBUG_STR_SUFFIX): Move from there.
571 (write_psymtabs_to_index): Make non-static, add basename
572 parameter. Write to temporary files, rename when done.
573 (save_gdb_index_command): Adjust call to
574 write_psymtabs_to_index.
575 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
577 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
578 (get_gdb_index_contents_from_cache): New.
579 (get_gdb_index_contents_from_cache_dwz): New.
580 (dwarf2_initialize_objfile): Read index from cache.
581 (dwarf2_build_psymtabs): Save to index.
582 * dwarf-index-cache.h: New file.
583 * dwarf-index-cache.c: New file.
584 * dwarf-index-write.h: New file.
588 * gnulib/aclocal.m4: Re-generate.
589 * gnulib/config.in: Re-generate.
590 * gnulib/configure: Re-generate.
591 * gnulib/import/Makefile.am: Re-generate.
592 * gnulib/import/Makefile.in: Re-generate.
593 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
594 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
595 * gnulib/import/m4/mkdir.m4: New file.
596 * gnulib/import/mkdir.c: New file.
597 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
602 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
603 * common/scoped_mmap.c: New file.
604 * common/scoped_mmap.h (destroy): New method.
605 (~scoped_mmap, reset): Use destroy.
606 (scoped_mmap): New move constructor.
607 (mmap_file): New declaration.
608 * unittests/scoped_mmap-selftests.c (test_normal,
609 test_invalid_filename, run_tests): New functions.
610 (_initialize_scoped_mmap_selftests): Register selftest.
614 * dwarf2read.c (read_gdb_index_from_section): Rename to...
615 (read_gdb_index_from_buffer): ... this. Remove section
616 parameter, add buffer parameter.
617 (get_gdb_index_contents_ftype,
618 get_gdb_index_contents_dwz_ftype): New typedefs.
619 (dwarf2_read_gdb_index): Add callback parameters to get the
621 (get_gdb_index_contents_from_section): New.
622 (dwarf2_initialize_objfile): Update call to
623 dwarf2_read_gdb_index.
627 * common/filestuff.h (gdb_fopen_cloexec): New overload.
628 (gdb_open_cloexec): Likewise.
629 * nat/linux-osdata.c (command_from_pid): Use string_printf.
630 (commandline_from_pid): Likewise.
631 (linux_xfer_osdata_threads): Likewise.
632 (linux_xfer_osdata_fds): Likewise.
633 * ada-lang.c (is_package_name): Likewise.
634 * auxv.c (procfs_xfer_auxv): Likewise.
635 * breakpoint.c (print_one_breakpoint_location): Use
637 (print_one_catch_solib): Use string_printf.
638 * coff-pe-read.c (add_pe_exported_sym): Likewise.
639 (add_pe_forwarded_sym): Likewise.
640 * dwarf2read.c (create_type_unit_group): Likewise.
641 (build_error_marker_type): Likewise.
642 * infcall.c (get_function_name): Likewise.
643 * valprint.c (print_converted_chars_to_obstack): Likewise.
644 * xtensa-tdep.c (xtensa_register_type): Likewise.
648 * remote.c (remote_target::download_tracepoint): Fix format
653 * tracefile.c: Include common/byte-vector.h.
654 (trace_save): Change type of buf to gdb::byte_vector. Initialize
655 with trace_regblock_size if needed. Update uses of buf.
659 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
660 std::vector<unsigned char>.
661 * tracepoint.c (collection_list::collection_list): Remove
662 m_regs_mask initializer from initializer list. Resize
663 m_regs_mask using the largest remote register number.
664 (collection_list::add_remote_register): Remove size check on
665 m_regs_mask. Use at to access element.
666 (collection_list::stringify): Change type of temp_buf to
667 gdb::char_vector. Update uses of temp_buf. Resize if needed to
668 stringify the register mask. Use pack_hex_byte for the register
673 * tracepoint.h (class collection_list) <add_register>: Remove.
674 <add_remote_register, add_ax_registers, add_local_register>:
676 <add_memrange>: Add scope parameter.
677 * tracepoint.c (encode_actions_1): Likewise.
678 (collection_list::add_register): Rename to ...
679 (collection_list::add_remote_register): ... this. Update
681 (collection_list::add_ax_registers, add_local_register): New
683 (collection_list::add_memrange): Add scope parameter. Call
684 add_local_register instead of add_register.
685 (finalize_tracepoint_aexpr): New function.
686 (collection_list::collect_symbol): Update calls to add_memrange.
687 Call add_local_register instead of add_register. Call
688 add_ax_registers. Call finalize_tracepoint_aexpr.
689 (encode_actions_1): Get remote regnos for $reg action. Call
690 add_remote_register, add_ax_registers, and add_local_register.
691 Update call to add_memrange. Call finalize_tracepoint_aexpr.
692 (validate_actionline): Call finalize_tracepoint_aexpr.
696 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
697 Replace array buf with gdb::char_vector buf, of size
698 get_remote_packet_size (). Replace references to buf and
699 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
700 and xsnprintf with snprintf. Raise errors if the buffer is too
705 * remote.c (remote_target::download_tracepoint): Fix the has_more
706 predicate in the QTDP action list iteration.
710 * remote.c (remote_target::download_tracepoint): Fix indentation
715 * proc-api.c (_initialize_proc_api): Remove c, unused.
716 * procfs.c (procfs_init_inferior): Remove signals, unused.
717 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
723 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
724 'W_STOPCODE (0)' as this could be ambiguous.
728 * ser-tcp.c (net_open): Fix thinko when deciding whether to
729 disable TCP's Nagle algorithm (use "ai_protocol" instead of
735 * dwarf2read.c (read_func_scope): Set symtab on template parameter
737 (process_structure_scope): Likewise.
742 * darwin-nat.c (darwin_kill_inferior): Fix handling of
747 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
748 (darwin_suspend_inferior, darwin_resume_inferior)
749 (darwin_decode_notify_message, darwin_resume_inferior_threads)
750 (darwin_check_new_threads): Check result of get_darwin_inferior.
758 * varobj.c (varobj_get_path_expr_parent): Report an error if
759 parent is a dynamic varobj.
763 * gnulib/aclocal.m4: Re-generate.
764 * gnulib/config.in: Re-generate.
765 * gnulib/configure: Re-generate.
766 * gnulib/import/Makefile.in: Re-generate.
767 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
768 * gnulib/import/m4/onceonly.m4: Re-generate.
772 * target-descriptions.c (struct xml_test_tdesc): New.
773 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
774 (record_xml_tdesc): Update.
775 (maintenance_check_xml_descriptions): Update.
776 * target-descriptions.h (record_xml_tdesc): Update comment.
780 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
781 checking array bounds are defined.
785 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
786 irreflexivity violation.
790 * cli/cli-decode.c (lookup_cmd): Remove lint code.
791 * value.c (unpack_long): Remove lint code.
792 * valops.c (value_ind): Remove lint code.
793 * valarith.c (value_x_binop, value_x_unop, value_equal)
794 (value_pos): Remove lint code.
798 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
799 with undefined upper bound as <optimized out>.
803 * gcore.in: Rename variable "name" to "prefix". Expand
808 * windows-nat.c (windows_nat_target::create_inferior): Update to
809 call close() in global namespace.
813 * dwarf-index-write.c (add_address_entry): Don't add objfile
815 * dbxread.c (find_stab_function): Rename from
816 find_stab_function_addr. Return a bound_minimal_symbol.
817 (read_dbx_symtab): Use raw_text_low, raw_text_high.
818 Don't add objfile offsets.
819 (end_psymtab): Use raw_text_low, raw_text_high,
820 MSYMBOL_VALUE_RAW_ADDRESS.
821 (read_ofile_symtab): Update.
822 (process_one_symbol): Update.
823 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
825 (dw2_relocate): Remove.
826 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
828 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
830 (process_psymtab_comp_unit_reader, add_partial_symbol)
831 (add_partial_subprogram, dwarf2_ranges_read): Update.
832 (load_partial_dies): Update.
833 (add_address_entry): Don't add objfile offsets.
834 (dwarf2_build_include_psymtabs): Update.
835 (create_addrmap_from_aranges): Don't add objfile offsets.
836 (dw2_find_pc_sect_compunit_symtab): Update.
837 * mdebugread.c (parse_symbol): Don't add objfile offsets.
838 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
840 (parse_partial_symbols): Don't add objfile offsets. Use
841 raw_text_low, raw_text_high. Update.
842 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
843 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
844 or call 'relocate' quick function. Clear psymbol_map.
845 * psympriv.h (struct partial_symbol) <address>: Add section
847 <set_unrelocated_address>: Rename from set_address.
848 <raw_text_low, raw_text_high>: New methods.
849 <text_low, text_high>: Add objfile parameter.
850 (add_psymbol_to_bcache): Add 'section' parameter. Call
851 set_unrelocated_address.
852 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
853 (find_pc_psymbol): Update.
854 (fixup_psymbol_section, relocate_psymtabs): Remove.
855 (dump_psymtab, psym_functions): Update.
856 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
858 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
859 (start_psymtab_common): Update.
860 * symfile-debug.c (debug_qf_relocate): Remove.
861 (debug_sym_quick_functions): Update.
862 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
863 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
868 * dbxread.c (end_psymtab): Use text_high_valid and
870 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
871 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
872 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
874 <text_low_valid, text_high_valid>: New fields.
875 <set_text_low, set_text_high>: Update.
876 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
880 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
882 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
883 textlow and texthigh fields.
884 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
886 * mdebugread.c (parse_lines, parse_partial_symbols)
887 (psymtab_to_symtab_1): Update.
888 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
889 Rename fields. Update comment. Now private.
890 <text_low, text_high, set_text_low, set_text_high>: New methods.
891 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
892 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
893 (start_psymtab_common, maintenance_info_psymtabs)
894 (maintenance_check_psymtabs): Update.
895 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
897 (scan_xcoff_symtab): Update.
901 * psympriv.h (struct partial_symbol) <unrelocated_address,
902 address, set_address>: New methods.
903 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
904 (fixup_psymbol_section, relocate_psymtabs): Update.
905 (print_partial_symbols): Add 'objfile' parameter. Update.
906 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
911 * dwarf-index-write.c (write_psymbols, debug_names::insert)
912 (debug_names::write_psymbols): Update.
913 * psympriv.h (struct partial_symbol): Derive from
915 <obj_section>: New method.
916 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
917 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
918 (find_pc_sect_psymbol, fixup_psymbol_section)
919 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
920 (print_partial_symbols, recursively_search_psymtabs)
921 (compare_psymbols, psymbol_hash, psymbol_compare)
922 (add_psymbol_to_bcache, maintenance_check_psymtabs)
923 (psymbol_name_matches, psym_fill_psymbol_map): Update.
927 * dbxread.c (end_psymtab): Remove dead code.
931 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
932 DWARF unwinders are disabled.
933 * dwarf2-frame.c: Add dwarf2read.h include.
934 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
936 (dwarf2_frame_unwinders_enabled_p): Define.
937 (show_dwarf_unwinders_enabled_p): New function.
938 (_initialize_dwarf2_frame): Register switch to control DWARF
940 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
941 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
942 (show_dwarf_cmdlist): Remove static keyword.
943 * dwarf2read.h (set_dwarf_cmdlist): Declare.
944 (show_dwarf_cmdlist): Declare.
945 * NEWS: Document new feature.
950 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
954 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
955 DW_AT_count can't be translated to a dynamic prop.
959 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
964 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
968 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
973 * dwarf2read.c (dw2_add_symbol_to_list): New function.
974 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
975 instead of add_symbol_to_list.
976 (read_file_scope): Call prepare_one_comp_unit before reading
981 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
985 * utils.c (malloc, realloc, free): Don't declare.
986 * configure, config.in: Rebuild.
987 * configure.ac: Don't check for declarations of free, malloc, or
992 * aarch64-linux-nat.c
993 (aarch64_linux_nat_target::stopped_data_address): Remove unused
995 * arm-linux-nat.c (fetch_regs): Likewise.
996 (store_regs): Likewise.
997 (fetch_vfp_regs): Likewise.
998 (store_vfp_regs): Likewise.
999 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1000 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1001 (arm_linux_nat_target::insert_watchpoint): Likewise.
1002 (arm_linux_nat_target::remove_watchpoint): Likewise.
1003 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1005 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1007 * ppc-linux-nat.c (fetch_register): Likewise.
1008 (fetch_all_gp_regs): Likewise.
1009 (fetch_ppc_registers): Likewise.
1010 (store_all_gp_regs): Likewise.
1011 (store_ppc_registers): Likewise.
1012 (hwdebug_insert_point): Likewise.
1013 (can_use_watchpoint_cond_accel): Likewise.
1014 * remote-sim.c (gdb_os_write_stdout): Likewise.
1019 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1021 * configure: Rebuild.
1025 * regformats/regdat.sh: Define xmltarget_${name} inside
1026 #ifndef IN_PROCESS_AGENT.
1030 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1034 * symfile.c (reread_symbols): Notify iter, not objfile.
1038 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1040 (ravenscar_thread_target::prepare_to_store): Likewise.
1044 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1045 unused variable. Call value_fetch_lazy when needed.
1046 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1047 Remove unused variable. Call value_fetch_lazy when needed.
1051 * m32c-tdep.c (mark_dma): Return void.
1052 (make_regs): Remove unused declarations.
1056 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1057 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1058 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1059 bkscm_get_valid_block_smob_arg_unsafe for effect.
1063 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1068 * windows-nat.c (saved_context): Conditionally define.
1069 * remote.c (remote_target::remote_btrace_maybe_reopen):
1070 Conditionally declare "warned".
1071 * inflow.c (sigquit_ours): Conditionally define.
1072 (new_tty): Move "tty" declaration inside #if.
1073 * guile/guile.c (guile_datadir): Conditionally define.
1074 * charset.c (set_be_le_names): Move some declarations inside #if.
1075 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1077 (parse_xml_btrace_conf): Likewise.
1081 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1085 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1086 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1087 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1088 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1089 * stack.c (frame_apply_level_command): Remove unused variable.
1090 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1091 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1092 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1094 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1095 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1096 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1098 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1099 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1101 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1102 Remove unused variable.
1103 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1105 * common/tdesc.c (print_xml_feature::visit): Remove unused
1107 * compile/compile-object-load.c (store_regs): Remove unused
1109 * complaints.c (clear_complaints): Remove unused variable.
1110 * corelow.c (core_target_open): Remove unused variable.
1111 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1113 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1115 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1117 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1119 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1121 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1123 * ia64-tdep.c (examine_prologue): Remove unused variable.
1124 * infcall.c (run_inferior_call): Remove unused variable.
1125 * inferior.c (exit_inferior): Remove unused variable.
1126 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1127 * linespec.c (decode_line_2): Remove unused variable.
1128 * linux-nat.c (super_close): Remove.
1129 * linux-tdep.c (linux_info_proc): Remove unused variable.
1130 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1131 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1132 Remove unused variable.
1133 * parse.c (find_minsym_type_and_address): Remove unused variable.
1134 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1136 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1138 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1140 * record-btrace.c (record_btrace_target::store_registers): Remove
1142 (cmd_show_record_btrace_cpu): Remove unused variable.
1143 * riscv-tdep.c (riscv_register_reggroup_p)
1144 (riscv_push_dummy_call, riscv_return_value): Remove unused
1146 * rust-exp.y (literal): Remove unused variable.
1147 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1149 <STRUCTOP_ANONYMOUS>: Likewise.
1150 * s390-linux-tdep.c (s390_linux_init_abi_31)
1151 (s390_linux_init_abi_64): Remove unused variable.
1152 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1153 (file_select_thread, net_windows_open, _initialize_ser_windows):
1154 Remove unused variables.
1155 * symtab.c (find_pc_sect_line): Remove unused variable.
1156 * target-memory.c (compute_garbled_blocks): Remove unused
1158 (target_write_memory_blocks): Remove unused variable.
1159 * target.c (target_stack::unpush): Remove unused variables.
1160 * tracepoint.c (start_tracing, all_tracepoint_actions)
1161 (merge_uploaded_trace_state_variables)
1162 (print_one_static_tracepoint_marker): Remove unused variable.
1163 * unittests/basic_string_view/element_access/char/1.cc (test01):
1164 Remove unused variable.
1165 * windows-nat.c (windows_continue, windows_add_all_dlls)
1166 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1167 Remove unused variables.
1171 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1172 attr_profile in HAVE_ELF.
1173 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1178 * frame.c (frame_register_unwind): Change parameter name.
1179 (frame_unwind_register): Likewise.
1180 (frame_unwind_register_value): Likewise.
1181 (frame_unwind_register_signed): Likewise.
1182 (frame_unwind_register_unsigned): Likewise.
1183 * frame.h (frame_register_unwind): Likewise.
1184 (frame_unwind_register): Likewise.
1185 (frame_unwind_register_value): Likewise.
1186 (frame_unwind_register_signed): Likewise.
1187 (frame_unwind_register_unsigned): Likewise.
1188 (frame_unwind_arch): Likewise.
1192 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1197 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1198 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1203 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1204 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1205 m_compunit_symtab, m_language>: Add "m_" prefix.
1207 * buildsym.c: Update all uses.
1211 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1212 * buildsym.h (record_line_ftype): Remove typedef.
1216 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1217 (end_expandable_symtab): Likewise.
1218 (end_symtab_get_static_block): Likewise.
1219 (end_symtab_from_static_block): Likewise.
1220 * buildsym-legacy.c (augment_type_symtab): Remove.
1221 (end_expandable_symtab): Remove.
1222 (end_symtab_get_static_block): Remove.
1223 (end_symtab_from_static_block): Remove.
1227 * dwarf2read.c: Include buildsym.h.
1228 (struct dwarf2_cu) <builder>: New method.
1229 (fixup_go_packaging): Update.
1230 (process_full_comp_unit, process_full_type_unit): Update. Don't
1231 use scoped_free_pendings.
1232 (using_directives): Add "cu" parameter, remove "language".
1233 (read_import_statement, setup_type_unit_groups, )
1234 (read_func_scope, read_lexical_block_scope)
1235 (dwarf2_record_block_ranges, read_namespace): Update.
1236 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1237 (lnp_state_machine::handle_end_sequence): Update.
1238 (class lnp_state_machine) <m_cu>: New member.
1239 <m_record_line_callback>: Remove.
1240 <m_currently_recording_lines>: New member.
1241 (lnp_state_machine::handle_set_file): Update.
1242 (noop_record_line): Remove.
1243 (dwarf_record_line_p): Add cu parameter.
1244 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1245 (lnp_state_machine::record_line)
1246 (lnp_state_machine::lnp_state_machine)
1247 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1248 (dwarf_decode_lines): Update.
1249 (dwarf2_start_subfile): Add cu parameter.
1250 (dwarf2_start_symtab, new_symbol): Update.
1251 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1252 Remove dwarf2_per_objfile parameter.
1253 (dwarf_decode_macros): Update.
1257 * stabsread.c (define_symbol): Update.
1258 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1259 * dwarf2read.c (new_symbol): Update.
1260 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1261 * cp-namespace.c: Include buildsym.h.
1262 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1263 * buildsym-legacy.c (get_buildsym_compunit): New function.
1267 * xcoffread.c: Include buildsym-legacy.h.
1268 * windows-nat.c: Include buildsym-legacy.h.
1269 * stabsread.c: Include buildsym-legacy.h.
1270 * mdebugread.c: Include buildsym-legacy.h.
1271 * buildsym-legacy.h: New file.
1272 * buildsym-legacy.c: New file, from buildsym.c.
1273 * go32-nat.c: Include buildsym-legacy.h.
1274 * dwarf2read.c: Include buildsym-legacy.h.
1275 * dbxread.c: Include buildsym-legacy.h.
1276 * cp-namespace.c: Include buildsym-legacy.h.
1277 * coffread.c: Include buildsym-legacy.h.
1278 * buildsym.h: Move some contents to buildsym-legacy.h.
1279 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1281 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1285 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1286 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1287 (buildsym_compunit::buildsym_compunit)
1288 (buildsym_compunit::~buildsym_compunit)
1289 (buildsym_compunit::get_macro_table): Define.
1293 * buildsym.c (reset_symtab_globals): Remove.
1294 (buildsym_compunit::end_symtab_from_static_block): Update.
1295 (buildsym_compunit::augment_type_symtab): Update.
1296 (end_symtab_from_static_block): Call free_buildsym_compunit.
1297 (augment_type_symtab, end_symtab, end_expandable_symtab):
1302 * arch-utils.c: Do not include buildsym.h.
1303 * mipsread.c: Do not include buildsym.h.
1304 * machoread.c: Do not include buildsym.h.
1305 * elfread.c: Do not include buildsym.h.
1309 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1311 (buildsym_compunit): Add new constructor.
1312 (struct buildsym_compunit) <get_last_source_file, finish_block,
1313 record_block_range, start_subfile, patch_subfile_names,
1314 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1315 set_last_source_start_addr, get_last_source_start_addr,
1316 get_local_using_directives, set_local_using_directives,
1317 get_global_using_directives, outermost_context_p,
1318 get_current_context_stack, get_context_stack_depth,
1319 get_current_subfile, get_local_symbols, get_file_symbols,
1320 get_global_symbols, record_debugformat, record_producer,
1321 push_context, pop_context, end_symtab_get_static_block,
1322 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1324 <record_pending_block, finish_block_internal, make_blockvector,
1325 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1331 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1333 (finish_block_internal): Update.
1337 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1339 (finish_block_internal): Update.
1343 * buildsym.h (EXTERN): Don't define or undef.
1344 * buildsym.c (EXTERN): Don't define.
1348 * buildsym.c: Remove TODO comment.
1352 * coffread.c (coff_symtab_read): Update.
1353 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1354 (xcoff_new_init): Update.
1355 * mipsread.c (mipscoff_new_init): Update.
1356 * mdebugread.c (mdebug_build_psymtabs): Update.
1357 * elfread.c (elf_new_init): Update.
1358 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1360 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1361 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1362 (stabsect_build_psymtabs): Update.
1363 * buildsym.h (buildsym_init): Don't declare.
1364 * buildsym.c: Update comment.
1365 (prepare_for_building): Remove.
1366 (start_symtab, restart_symtab): Update.
1367 (reset_symtab_globals): Update comment.
1368 (buildsym_init): Remove.
1372 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1373 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1374 (read_enum_type, common_block_start, common_block_end)
1375 (cleanup_undefined_types_1, finish_global_stabs): Update.
1376 * mdebugread.c (psymtab_to_symtab_1): Update.
1377 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1378 (read_lexical_block_scope, new_symbol): Update.
1379 * dbxread.c (process_one_symbol): Update.
1380 * coffread.c (coff_symtab_read, process_coff_symbol)
1381 (coff_read_enum_type): Update.
1382 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1384 (get_local_symbols, get_file_symbols, get_global_symbols): New
1386 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1388 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1389 (~scoped_free_pendings): Update.
1390 (finish_block, prepare_for_building, reset_symtab_globals)
1391 (end_symtab_get_static_block, end_symtab_with_blockvector)
1392 (augment_type_symtab, push_context): Update.
1393 (get_local_symbols, get_file_symbols, get_global_symbols): New
1395 (buildsym_init): Update.
1399 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1400 (process_full_type_unit): Likewise.
1401 (dwarf2_start_symtab): Set list_in_scope.
1405 * dwarf2read.c (process_psymtab_comp_unit_reader)
1406 (build_type_psymtabs_reader): Do not set list_in_scope.
1410 * buildsym.c (free_pendings): Remove.
1411 (add_symbol_to_list, scoped_free_pendings)
1412 (finish_block_internal, buildsym_init): Update.
1416 * xcoffread.c (read_xcoff_symtab): Update.
1417 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1419 * dbxread.c (process_one_symbol): Update.
1420 * coffread.c (coff_symtab_read): Update.
1421 * buildsym.h (finish_block): Update.
1422 * buildsym.c (finish_block): Remove "listhead" argument.
1423 (end_symtab_get_static_block): Update.
1427 * buildsym.h (class scoped_free_pendings): Remove constructor.
1428 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1430 <m_pending_block_obstack, m_pending_blocks>: New members.
1431 (pending_block_obstack, pending_blocks): Remove.
1432 (scoped_free_pendings::scoped_free_pendings): Default.
1433 (~scoped_free_pendings): Update.
1434 (free_pending_blocks): Remove.
1435 (finish_block_internal, record_pending_block, make_blockvector)
1436 (end_symtab_get_static_block, augment_type_symtab, push_context)
1437 (buildsym_init): Update.
1441 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1442 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1444 (pending_addrmap, pending_addrmap_obstack)
1445 (pending_addrmap_interesting): Remove.
1446 (scoped_free_pendings, record_block_range, make_blockvector)
1447 (prepare_for_building, reset_symtab_globals, buildsym_init):
1452 * xcoffread.c (process_linenos): Update.
1453 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1454 * mdebugread.c (psymtab_to_symtab_1): Update.
1455 * dwarf2read.c (setup_type_unit_groups)
1456 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1457 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1458 * dbxread.c (process_one_symbol): Update.
1459 * coffread.c (coff_symtab_read, enter_linenos)
1460 (process_coff_symbol): Update.
1461 * buildsym.h (current_subfile): Don't declare.
1462 (get_current_subfile): Declare.
1463 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1465 (start_subfile, free_buildsym_compunit, push_subfile)
1466 (prepare_for_building, start_symtab): Update.
1467 (get_current_subfile): New function.
1471 * coffread.c (coff_symtab_read): Update.
1472 * xcoffread.c (read_xcoff_symtab): Update.
1473 * dwarf2read.c (new_symbol): Update.
1474 (read_func_scope, read_lexical_block_scope): Update.
1475 * dbxread.c (process_one_symbol): Update.
1476 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1477 (outermost_context_p): Remove macro.
1478 (outermost_context_p, get_current_context_stack)
1479 (get_context_stack_depth): Declare.
1480 (pop_context): Return struct context_stack.
1481 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1483 (context_stack_size): Remove.
1484 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1485 (prepare_for_building, end_symtab_get_static_block)
1486 (augment_type_symtab, push_context): Update.
1487 (pop_context): Return struct context_stack.
1488 (outermost_context_p, get_current_context_stack)
1489 (get_context_stack_depth): New functions.
1490 (buildsym_init): Update.
1494 * rust-exp.y: Now a pure parser. Update all rules.
1495 (%union): Move earlier.
1496 (current_parser, work_obstack): Remove globals.
1497 (rust_parser, ~rust_parser): Update.
1498 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1499 lex_character, lex_number, lex_string, lex_identifier,
1500 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1501 convert_name, convert_params_to_expression,
1502 convert_ast_to_expression, ast_basic_type, ast_operation,
1503 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1504 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1505 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1506 ast_array_type, ast_slice_type, ast_reference_type,
1507 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1508 (rust_parse): Update.
1509 (rustyyerror, rustyylex): Add parser parameter.
1510 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1511 (rust_lex_stringish_test, rust_lex_test_sequence)
1512 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1513 (rust_lex_test_push_back, rust_lex_tests): Update.
1517 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1518 gdb::unique_xmalloc_ptr.
1519 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1520 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1521 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1522 copy-initialization.
1523 * guile/scm-pretty-print.c (ppscm_print_children): Use
1524 gdb::unique_xmalloc_ptr instead of cleanups.
1525 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1526 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1527 gdb::unique_xmalloc_ptr.
1528 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1529 Adjust to use gdb::unique_xmalloc_ptr.
1530 * guile/scm-utils.c (extract_arg): Adjust.
1531 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1532 gdb::unique_xmalloc_ptr instead of a cleanup.
1536 * utils.c (do_value_free_to_mark)
1537 (make_cleanup_value_free_to_mark): Remove.
1538 * utils.h (make_cleanup_value_free_to_mark): Remove.
1542 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1543 forwarding reference.
1547 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1548 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1553 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1555 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1557 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1558 directly instead of a cleanup.
1559 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1560 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1561 (vlscm_binop_gdbthrow): New, factored out from ...
1562 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1563 (vlscm_rich_compare): Use gdbscm_wrap.
1564 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1565 instead of a cleanup.
1566 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1568 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1569 Use xfree directly instead of a cleanup.
1570 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1571 Adjust to use gdbscm_wrap and scoped_value_mark.
1572 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1573 (gdbscm_value_address, gdbscm_value_dereference)
1574 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1576 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1577 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1579 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1580 gdbscm_wrap and scoped_value_mark.
1581 (gdbscm_value_to_string): Use xfree directly instead of a
1582 cleanup. Move 'buffer' unique_ptr to TRY scope.
1583 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1584 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1586 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1587 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1589 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1594 * findvar.c (default_read_var_value): Also resolve dynamic type for
1595 LOC_OPTIMIZED_OUT vars.
1599 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1604 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1605 (compute_enum_list, pascm_set_param_value_x)
1606 (gdbscm_parameter_value): Update.
1607 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1608 (gdbscm_scm_to_host_string): Update.
1609 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1611 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1612 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1613 * guile/scm-string.c (gdbscm_scm_to_string): Return
1615 (gdbscm_scm_to_host_string): Likewise.
1619 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1620 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1621 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1622 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1627 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1628 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1630 * guile/scm-cmd.c (cmdscm_function): Update.
1631 * guile/scm-pretty-print.c
1632 (ppscm_print_exception_unless_memory_error): Update.
1633 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1634 Return unique_xmalloc_ptr.
1638 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1643 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1644 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1645 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1646 unecessary braces after EF_RISCV_RVC test. Delete call to
1647 set_gdbarch_decr_pc_after_break.
1649 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1650 RISCV_LAST_FP_REGNUM + 1.
1651 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1655 * configure.ac: Remove --disable-gdbcli.
1656 * configure: Rebuild.
1657 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1658 (SUBDIR_CLI_CFLAGS): Remove.
1659 (SFILES): Use SUBDIR_CLI_SRCS.
1660 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1665 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1669 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1673 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1675 (libunwind_frame_sniffer): Likewise.
1676 (libunwind_frame_prev_register): Likewise.
1677 (libunwind_sigtramp_frame_sniffer): Likewise.
1678 * ia64-tdep.c (ia64_access_reg): Likewise.
1679 (ia64_access_rse_reg): Likewise.
1680 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1681 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1685 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1689 * remote-sim.c (gdbsim_target::close,
1690 gdbsim_target::mourn_inferior): Remove unused variables.
1694 * ia64-tdep.c (ktab_buf): New global.
1695 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1696 (get_kernel_table): Adjust.
1700 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1701 * dwarf2read.c (using_directives, new_symbol): Use
1702 outermost_context_p.
1703 * dbxread.c (process_one_symbol): Use outermost_context_p.
1704 * coffread.c (coff_symtab_read): Use outermost_context_p.
1708 * dwarf2read.c (using_directives, read_func_scope)
1709 (read_lexical_block_scope): Update.
1710 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1711 * buildsym.h (local_using_directives, global_using_directives):
1713 (get_local_using_directives, set_local_using_directives)
1714 (get_global_using_directives): Declare.
1715 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1716 m_global_using_directives>: New members.
1717 (finish_block_internal, prepare_for_building)
1718 (reset_symtab_globals, end_symtab_get_static_block)
1719 (push_context): Update.
1720 (get_local_using_directives, set_local_using_directives)
1721 (get_global_using_directives): New functions.
1722 (buildsym_init): Update.
1726 * xcoffread.c (xcoff_initial_scan): Don't call
1727 free_pending_blocks.
1728 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1729 * buildsym.h (class scoped_free_pendings): Add constructor.
1730 (free_pending_blocks): Don't declare.
1731 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1732 (free_pending_blocks): Now static.
1736 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1737 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1739 (struct subfile_stack): Remove.
1740 (subfile_stack): Remove.
1741 (push_subfile, pop_subfile, buildsym_init): Update.
1745 * buildsym.c (push_subfile): Use gdb_assert.
1746 (pop_subfile): Use gdb_assert.
1750 * buildsym.h (merge_symbol_lists): Remove.
1751 * buildsym.c (merge_symbol_lists): Remove.
1755 * stabsread.c (scan_file_globals): Update comment.
1756 * stabsread.h (scan_file_globals): Move from buildsym.h.
1757 * buildsym.h (scan_file_globals): Move to stabsread.h.
1761 * xcoffread.c (xcoff_new_init): Update.
1762 * mipsread.c (mipscoff_new_init): Update.
1763 * mdebugread.c (mdebug_build_psymtabs): Update.
1764 * elfread.c (elf_new_init): Update.
1765 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1766 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1767 * buildsym.h (buildsym_new_init): Don't declare.
1768 * buildsym.c (buildsym_new_init): Remove.
1772 * stabsread.h (within_function): Move from buildsym.h.
1773 * stabsread.c (start_stabs): Clear within_function.
1774 * coffread.c (coff_start_symtab): Clear within_function.
1775 * buildsym.h (within_function): Move to stabsread.h.
1776 * buildsym.c (prepare_for_building): Update.
1780 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1781 * dwarf2read.c (dwarf2_start_symtab): Don't set
1782 processing_gcc_compilation.
1783 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1787 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1788 (next_symbol_text_func): Move from buildsym.h.
1789 * stabsread.c (hashname): Move from buildsym.c.
1790 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1791 (next_symbol_text_func, hashname): Move to stabsread.h.
1792 * buildsym.c: Don't include bcache.h
1793 (hashname): Move to stasbread.c.
1797 * buildsym.h (context_stack_size): Don't declare.
1798 * buildsym.c (context_stack_size): New global.
1802 * dbxread.c (processing_acc_compilation): New global.
1803 * buildsym.h (processing_acc_compilation): Don't declare.
1807 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1808 * dbxread.c (read_ofile_symtab): Update.
1809 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1810 * buildsym.h (last_source_start_addr): Remove.
1811 (set_last_source_start_addr, get_last_source_start_addr):
1813 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1815 (struct buildsym_compunit) <m_last_source_start_addr>: New
1817 (prepare_for_building): Remove start_addr parameter.
1818 (start_symtab, restart_symtab, end_symtab_get_static_block)
1819 (end_symtab_with_blockvector): Update.
1820 (set_last_source_start_addr, get_last_source_start_addr): New
1825 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1827 (have_line_numbers): Remove.
1828 (record_line, prepare_for_building, end_symtab_get_static_block)
1829 (augment_type_symtab): Update.
1833 * buildsym.c (~buildsym_compunit): Free the macro table.
1834 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1836 <m_pending_macros>: New member.
1837 (pending_macros): Remove.
1838 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1839 (reset_symtab_globals, end_symtab_get_static_block)
1840 (end_symtab_with_blockvector, augment_type_symtab)
1841 (buildsym_init): Update.
1845 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1847 (buildsym_compunit::set_last_source_file): New method.
1848 <m_last_source_file>: New member.
1849 (prepare_for_building): Remove "name" parameter.
1850 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1851 (last_source_file): Remove.
1852 (set_last_source_file, get_last_source_file): Update.
1856 * buildsym.c (prepare_for_building): Add assert.
1860 * buildsym.c (~buildsym_compunit): Update.
1861 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1862 (start_subfile, patch_subfile_names)
1863 (end_symtab_with_blockvector): Update.
1867 * buildsym.c (struct buildsym_compunit): Add constructor,
1868 destructor, initializers.
1869 (start_buildsym_compunit): Remove.
1870 (free_buildsym_compunit): Use "delete".
1871 (start_symtab, restart_symtab): Use "new".
1875 * symfile.c (set_objfile_default_section_offset): Remove struct
1880 * (Responsible Maintainers): Add myself as or1k maintainer.
1884 * symfile.c (set_objfile_default_section_offset): Use extra braces
1889 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1894 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1895 unittests/cli-utils-selftests.c
1896 * unittests/cli-utils-selftests.c: New file.
1900 * NEWS: Mention new commands. Mention change to 'thread apply'.
1904 * thread.c (thr_try_catch_cmd): New function.
1905 (thread_apply_all_command): Handle qcs flags.
1906 (thread_apply_command): Handle qcs flags.
1907 (taas_command): New function.
1908 (tfaas_command): New function.
1909 (_initialize_thread): Update to setup the new commands 'taas
1910 and 'tfaas'. Change doc string for 'thread apply'.
1914 * stack.c: (trailing_outermost_frame): New function, mostly
1915 extracted from backtrace_command_1.
1916 (leading_innermost_frame): New function.
1917 (backtrace_command_1): Update to call trailing_outermost_frame.
1918 (frame_apply_command_count): New function.
1919 (frame_apply_level_command): New function.
1920 (frame_apply_all_command): New function.
1921 (frame_apply_command): New function.
1922 (faas_command): New function.
1923 (frame_cmd_list): New variable.
1924 (_initialize_stack): Update to setup the new commands 'frame apply'
1929 * cli-utils.c (number_or_range_parser::get_number): Only handle
1930 numbers or convenience var as numbers.
1931 (parse_flags): New function.
1932 (parse_flags_qcs): New function.
1933 (number_or_range_parser::finished): Ensure parsing end is detected
1934 before end of string.
1935 * cli-utils.h (parse_flags): New function.
1936 (parse_flags_qcs): New function.
1937 (number_or_range_parser): Remove m_finished bool.
1938 (number_or_range_parser::skip_range): Set m_in_range to false.
1942 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1951 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1952 'unittests/parse-connection-spec-selftests.c'.
1953 (COMMON_SFILES): Add 'common/netstuff.c'.
1954 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1955 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1956 * common/netstuff.c: New file.
1957 * common/netstuff.h: New file.
1958 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1959 (wait_for_connect): Update comment. New parameter
1960 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1961 Use 'sock' directly instead of 'scb->fd'.
1962 (try_connect): New function, with code from 'net_open'.
1963 (net_open): Rewrite main loop to deal with multiple
1964 sockets/addresses. Handle IPv6-style hostnames; implement
1965 support for IPv6 connections.
1966 * unittests/parse-connection-spec-selftests.c: New file.
1971 * remote.c (remote_target::remote_detach_pid): Call
1972 set_current_process.
1976 * h8300-tdep.c (h8300_gdbarch_init): Remove
1977 set_gdbarch_ecoff_reg_to_regnum calls.
1982 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1983 offsets/sizes for static members of a class/struct.
1987 * target-descriptions.c (tdesc_register_bitsize): Rename.
1988 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1989 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1990 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1994 * breakpoint.c (moribund_locations): Now static and a
1996 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1997 (build_bpstat_chain, update_global_location_list)
1998 (breakpoint_retire_moribund): Update.
1999 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2004 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2005 (riscv_register_reggroup_p): Use new function, remove unneeded
2007 (riscv_push_dummy_call): Extend assert to compare against xlen or
2008 flen based on register type.
2012 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2016 * remote.c (show_hardware_watchpoint_limit): New function.
2017 (show_hardware_watchpoint_length_limit): New function.
2018 (show_hardware_breakpoint_limit): New function.
2019 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2020 where appropriate, update help text.
2024 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2025 (CLIBS): Don't mention NAT_CLIBS.
2029 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2030 (LIBGDB_OBS, clean mostlyclean): Update.
2031 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2035 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2036 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2037 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2041 * Makefile.in (ALLDEPFILES): Remove exec.c.
2042 (COMMON_OBS): Remove exec.o.
2043 (COMMON_SFILES): Add exec.c.
2047 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2051 * Makefile.in (clean mostlyclean): Remove stamp-version.
2052 (version.c): Depend on stamp-version.
2053 (stamp-version): New rule, from version.c rule.
2057 * Makefile.in (init.c): Depend on stamp-init.
2058 (stamp-init): New rule, from init.c rule.
2059 (clean mostlyclean): Remove stamp-init.
2063 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2064 SUBDIR_GCC_COMPILE_SRCS.
2068 * Makefile.in (init.c): Remove some unused sed rules.
2072 * Makefile.in (TSOBS): Remove.
2073 (INIT_FILES): Update.
2074 (LIBGDB_OBS): Update.
2075 (COMMON_SFILES): Add inflow.c.
2076 (SFILES): Remove inflow.c.
2080 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2084 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2085 get_saveloc_name, is_signal_frame_name, step_name,
2086 init_remote_name, create_addr_space_name,
2087 destroy_addr_space_name, search_unwind_table_name,
2088 find_dyn_list_name): Constify.
2092 * darwin-nat.c (darwin_pthread_kill): New function.
2093 (darwin_resume_thread): Use darwin_pthread_kill.
2097 * macroexp.c (macro_buffer) <operator=>: New member function.
2101 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2105 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2106 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2107 * maint.c: Likewise.
2112 * NEWS: Create a new section for the next release branch.
2113 Rename the section of the current branch, now that it has
2118 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2119 * version.in: Bump version to 8.2.50.DATE-git.
2124 * linux-nat.c (linux_init_ptrace): Rename to ...
2125 (linux_init_ptrace_procfs): ... this. Call
2126 linux_proc_init_warnings.
2127 (linux_nat_target::post_attach)
2128 (linux_nat_target::post_startup_inferior): Adjust.
2129 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2130 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2134 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2136 (read_comp_unit_head): ... here.
2140 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2141 (stop_tracing, tstatus_command)
2142 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2143 (print_one_static_tracepoint_marker): Update.
2144 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2146 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2148 (all_tracepoints, static_tracepoints_here): Return std::vector.
2152 * common/ptid.c (ptid_equal): Remove.
2153 * common/ptid.h (ptid_equal): Don't declare.
2154 * ada-tasks.c: Update.
2155 * breakpoint.c: Update.
2156 * common/agent.c: Update.
2157 * corelow.c: Update.
2158 * darwin-nat-info.c: Update.
2159 * darwin-nat.c: Update.
2161 * dtrace-probe.c: Update.
2162 * dummy-frame.c: Update.
2163 * fbsd-nat.c: Update.
2165 * gdbthread.h: Update.
2166 * gnu-nat.c: Update.
2167 * go32-nat.c: Update.
2168 * inf-loop.c: Update.
2169 * inf-ptrace.c: Update.
2170 * infcall.c: Update.
2174 * linux-fork.c: Update.
2175 * linux-nat.c: Update.
2176 * linux-thread-db.c: Update.
2177 * mi/mi-cmd-var.c: Update.
2178 * mi/mi-interp.c: Update.
2179 * mi/mi-main.c: Update.
2180 * nto-procfs.c: Update.
2181 * ppc-linux-tdep.c: Update.
2183 * python/py-inferior.c: Update.
2184 * python/py-record-btrace.c: Update.
2185 * python/py-record.c: Update.
2186 * ravenscar-thread.c: Update.
2187 * regcache.c: Update.
2188 * remote-sim.c: Update.
2190 * sol-thread.c: Update.
2193 * tui/tui-stack.c: Update.
2195 * windows-nat.c: Update.
2196 * windows-tdep.c: Update.
2200 * common/ptid.c (ptid_match): Remove.
2201 * common/ptid.h (ptid_match): Don't declare.
2202 * fbsd-nat.c: Update.
2205 * linux-nat.c: Update.
2206 * record-btrace.c: Update.
2207 * regcache.c: Update.
2212 * common/ptid.c (ptid_tid_p): Remove.
2213 * common/ptid.h (ptid_tid_p): Don't declare.
2214 * sol-thread.c: Update.
2218 * common/ptid.c (ptid_lwp_p): Remove.
2219 * common/ptid.h (ptid_lwp_p): Don't declare.
2220 * fbsd-nat.c: Update.
2221 * linux-nat.c: Update.
2222 * nat/linux-procfs.c: Update.
2223 * nat/x86-linux-dregs.c: Update.
2224 * sol-thread.c: Update.
2228 * common/ptid.c (ptid_is_pid): Remove.
2229 * common/ptid.h (ptid_is_pid): Don't declare.
2231 * linux-nat.c: Update.
2232 * mi/mi-interp.c: Update.
2238 * common/ptid.c (ptid_get_tid): Remove.
2239 * common/ptid.h (ptid_get_tid): Don't declare.
2240 * ada-tasks.c: Update.
2241 * aix-thread.c: Update.
2242 * bsd-uthread.c: Update.
2243 * darwin-nat.c: Update.
2244 * fbsd-nat.c: Update.
2245 * i386-darwin-nat.c: Update.
2247 * linux-tdep.c: Update.
2248 * nto-procfs.c: Update.
2249 * ppc-ravenscar-thread.c: Update.
2250 * python/py-infthread.c: Update.
2251 * ravenscar-thread.c: Update.
2252 * sol-thread.c: Update.
2253 * sparc-ravenscar-thread.c: Update.
2254 * windows-nat.c: Update.
2258 * common/ptid.c (ptid_get_lwp): Remove.
2259 * common/ptid.h (ptid_get_lwp): Don't declare.
2260 * aarch64-linux-nat.c: Update.
2261 * ada-tasks.c: Update.
2262 * aix-thread.c: Update.
2263 * amd64-linux-nat.c: Update.
2264 * arm-linux-nat.c: Update.
2265 * corelow.c: Update.
2266 * fbsd-nat.c: Update.
2267 * fbsd-tdep.c: Update.
2268 * gnu-nat.c: Update.
2269 * i386-cygwin-tdep.c: Update.
2270 * i386-gnu-nat.c: Update.
2271 * i386-linux-nat.c: Update.
2272 * ia64-linux-nat.c: Update.
2273 * inf-ptrace.c: Update.
2275 * linux-fork.c: Update.
2276 * linux-nat.c: Update.
2277 * linux-tdep.c: Update.
2278 * linux-thread-db.c: Update.
2279 * mips-linux-nat.c: Update.
2280 * nat/aarch64-linux-hw-point.c: Update.
2281 * nat/aarch64-linux.c: Update.
2282 * nat/linux-btrace.c: Update.
2283 * nat/linux-osdata.c: Update.
2284 * nat/linux-procfs.c: Update.
2285 * nat/x86-linux-dregs.c: Update.
2286 * obsd-nat.c: Update.
2287 * ppc-fbsd-nat.c: Update.
2288 * ppc-linux-nat.c: Update.
2290 * python/py-infthread.c: Update.
2291 * ravenscar-thread.c: Update.
2293 * s390-linux-nat.c: Update.
2294 * sol-thread.c: Update.
2295 * sol2-tdep.c: Update.
2296 * spu-linux-nat.c: Update.
2297 * x86-linux-nat.c: Update.
2298 * xtensa-linux-nat.c: Update.
2302 * common/ptid.c (ptid_get_pid): Remove.
2303 * common/ptid.h (ptid_get_pid): Don't declare.
2304 * aarch64-linux-nat.c: Update.
2305 * ada-lang.c: Update.
2306 * aix-thread.c: Update.
2307 * alpha-bsd-nat.c: Update.
2308 * amd64-fbsd-nat.c: Update.
2309 * amd64-linux-nat.c: Update.
2310 * arm-linux-nat.c: Update.
2311 * arm-nbsd-nat.c: Update.
2313 * break-catch-syscall.c: Update.
2314 * breakpoint.c: Update.
2315 * bsd-uthread.c: Update.
2316 * corelow.c: Update.
2318 * darwin-nat.c: Update.
2319 * fbsd-nat.c: Update.
2320 * fbsd-tdep.c: Update.
2322 * gnu-nat.c: Update.
2323 * hppa-nbsd-nat.c: Update.
2324 * hppa-obsd-nat.c: Update.
2325 * i386-fbsd-nat.c: Update.
2326 * ia64-linux-nat.c: Update.
2327 * inf-ptrace.c: Update.
2329 * inferior.c: Update.
2330 * inferior.h: Update.
2333 * linux-fork.c: Update.
2334 * linux-nat.c: Update.
2335 * linux-tdep.c: Update.
2336 * linux-thread-db.c: Update.
2337 * m68k-bsd-nat.c: Update.
2338 * mi/mi-interp.c: Update.
2339 * mi/mi-main.c: Update.
2340 * mips-linux-nat.c: Update.
2341 * mips-nbsd-nat.c: Update.
2342 * mips64-obsd-nat.c: Update.
2343 * nat/aarch64-linux-hw-point.c: Update.
2344 * nat/aarch64-linux.c: Update.
2345 * nat/linux-btrace.c: Update.
2346 * nat/linux-osdata.c: Update.
2347 * nat/linux-procfs.c: Update.
2348 * nat/x86-linux-dregs.c: Update.
2349 * nto-procfs.c: Update.
2350 * obsd-nat.c: Update.
2351 * ppc-linux-nat.c: Update.
2352 * ppc-nbsd-nat.c: Update.
2353 * ppc-obsd-nat.c: Update.
2354 * proc-service.c: Update.
2356 * python/py-inferior.c: Update.
2357 * python/py-infthread.c: Update.
2358 * ravenscar-thread.c: Update.
2360 * remote-sim.c: Update.
2362 * rs6000-nat.c: Update.
2363 * s390-linux-nat.c: Update.
2364 * sh-nbsd-nat.c: Update.
2365 * sol-thread.c: Update.
2366 * sparc-nat.c: Update.
2367 * sparc64-tdep.c: Update.
2368 * spu-linux-nat.c: Update.
2369 * spu-tdep.c: Update.
2370 * target-debug.h: Update.
2373 * tid-parse.c: Update.
2374 * tracefile-tfile.c: Update.
2375 * vax-bsd-nat.c: Update.
2376 * windows-nat.c: Update.
2377 * x86-linux-nat.c: Update.
2378 * x86-nat.c: Update.
2382 * common/ptid.c (pid_to_ptid): Remove.
2383 * common/ptid.h (pid_to_ptid): Don't declare.
2384 * aix-thread.c: Update.
2385 * arm-linux-nat.c: Update.
2386 * common/ptid.c: Update.
2387 * common/ptid.h: Update.
2388 * corelow.c: Update.
2390 * darwin-nat.c: Update.
2391 * fbsd-nat.c: Update.
2392 * fork-child.c: Update.
2393 * gnu-nat.c: Update.
2394 * go32-nat.c: Update.
2395 * inf-ptrace.c: Update.
2397 * inferior.c: Update.
2399 * linux-fork.c: Update.
2400 * linux-nat.c: Update.
2401 * nat/aarch64-linux-hw-point.c: Update.
2402 * nat/fork-inferior.c: Update.
2403 * nat/x86-linux-dregs.c: Update.
2404 * nto-procfs.c: Update.
2405 * obsd-nat.c: Update.
2407 * progspace.c: Update.
2409 * rs6000-nat.c: Update.
2410 * s390-linux-nat.c: Update.
2411 * sol-thread.c: Update.
2412 * spu-linux-nat.c: Update.
2415 * tracefile-tfile.c: Update.
2416 * windows-nat.c: Update.
2420 * common/ptid.h (ptid_build): Don't declare.
2421 * common/ptid.c (ptid_build): Remove.
2422 * aix-thread.c: Update.
2423 * bsd-kvm.c: Update.
2424 * bsd-uthread.c: Update.
2425 * common/agent.c: Update.
2426 * common/ptid.c: Update.
2427 * common/ptid.h: Update.
2428 * corelow.c: Update.
2429 * darwin-nat.c: Update.
2430 * fbsd-nat.c: Update.
2431 * gnu-nat.c: Update.
2432 * linux-fork.c: Update.
2433 * linux-nat.c: Update.
2434 * linux-thread-db.c: Update.
2435 * nat/linux-osdata.c: Update.
2436 * nat/linux-procfs.c: Update.
2437 * nto-procfs.c: Update.
2438 * obsd-nat.c: Update.
2439 * proc-service.c: Update.
2441 * ravenscar-thread.c: Update.
2442 * remote-sim.c: Update.
2444 * sol-thread.c: Update.
2446 * windows-nat.c: Update.
2450 * infrun.c (follow_exec): Use exit_inferior_silent.
2451 * inferior.c (exit_inferior_num_silent): Remove.
2452 * inferior.h (exit_inferior_num_silent): Don't declare.
2457 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2458 inferior_ptid on error.
2464 * disasm.h (gdb_disassembler): Add
2465 `m_disassembler_options_holder'. member
2466 * disasm.c (get_all_disassembler_options): New function.
2467 (gdb_disassembler::gdb_disassembler): Use it.
2468 (gdb_buffered_insn_length_init_dis): Likewise.
2469 (gdb_buffered_insn_length): Adjust accordingly.
2470 (set_disassembler_options): Handle options with arguments.
2471 (show_disassembler_options_sfunc): Likewise. Add a leading new
2472 line if showing options with descriptions.
2473 (disassembler_options_completer): Adapt to using the
2474 `disasm_options_and_args_t' structure.
2475 * mips-tdep.c (mips_disassembler_options): New variable.
2476 (mips_disassembler_options_o32): Likewise.
2477 (mips_disassembler_options_n32): Likewise.
2478 (mips_disassembler_options_n64): Likewise.
2479 (gdb_print_insn_mips): Don't set `disassembler_options'.
2480 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2482 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2483 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2484 `gdbarch_disassembler_options_implicit' and
2485 `gdbarch_valid_disassembler_options'.
2486 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2487 `disasm_options_and_args_t' structure.
2488 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2490 (valid_disassembler_options): Switch from `disasm_options_t' to
2491 the `disasm_options_and_args_t' structure.
2492 * NEWS: Document `set disassembler-options' support for the MIPS
2494 * gdbarch.h: Regenerate.
2495 * gdbarch.c: Regenerate.
2499 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2503 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2504 parameter in call to amd64_target_description.
2505 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2506 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2507 (amd64fbsd_init_abi): Likewise.
2508 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2509 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2510 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2511 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2515 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2516 "segments" parameter.
2517 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2518 (_initialize_amd64_tdep): Update call to
2519 amd64_create_target_description.
2520 (amd64_target_description): Add "segments" parameter. Adjust
2521 the implementation to use it.
2522 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2523 call to amd64_create_target_description.
2524 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2525 * gdb/arch/amd64.h (amd64_create_target_description): Add
2526 "segments" register.
2527 * gdb/arch/amd64.c (amd64_create_target_description): Add
2528 "segments" parameter. Call create_feature_i386_64bit_segments
2529 only if SEGMENTS is true.
2530 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2531 call to amd64_create_target_description.
2535 * thread.c (thread_target_id_str): New, factored out from ...
2536 (print_thread_info_1): ... here. Use it to compute the max
2537 "Target Id" column width.
2541 * remote.c (remote_target::extra_thread_info): Delete
2542 'display_buf' and 'n' locals. from the cache, regardless of
2543 packet mechanims is in use. Use cache for qThreadExtra and qP
2548 * blockframe.c (find_pc_sect_containing_function): New function.
2549 * breakpoint.c (print_breakpoint_location): Don't call
2550 find_pc_sect_function.
2551 * linespec.c (create_sals_line_offset): Record the location's
2553 * linespec.c (convert_address_location_to_sals): Fill in sal's
2554 symbol with find_pc_sect_containing_function.
2555 * symtab.c (find_function_start_sal): Rename to ...
2556 (find_function_start_sal_1): ... this.
2557 (find_function_start_sal): Reimplement as wrapper around
2558 find_function_start_sal_1, and use
2559 find_pc_sect_containing_function to fill in the sal's symbol.
2560 (find_function_start_sal(symbol*, bool)): Adjust.
2561 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2563 (find_pc_sect_containing_function): Declare.
2567 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2568 true if the the location has no symbol.
2572 * NEWS: Mention --enable-codesign.
2573 * silent-rules.mk (ECHO_SIGN): New variable.
2574 * configure.ac: Add --enable-codesign.
2575 * configure: Rebuild.
2576 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2577 (gdb$(EXEEXT)): Optionally invoke codesign.
2581 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2583 (switch_to_thread_no_regs): Adjust comment.
2584 * infcmd.c (stop_pc): Delete.
2585 (post_create_inferior, info_program_command): Replace references
2586 to stop_pc with references to thread_info->suspend.stop_pc.
2587 * inferior.h (stop_pc): Delete declaration.
2588 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2589 (handle_inferior_event_1, handle_signal_stop)
2590 (process_event_stop_test, keep_going_stepped_thread)
2591 (handle_step_into_function, handle_step_into_function_backward)
2592 (print_stop_location): Replace references to stop_pc with
2593 references to thread_info->suspend.stop_pc.
2594 (struct infcall_suspend_state) <stop_pc>: Delete field.
2595 (save_infcall_suspend_state, restore_infcall_suspend_state):
2596 Remove references to inf_stat->stop_pc.
2597 * linux-fork.c (fork_load_infrun_state): Likewise.
2598 * record-btrace.c (record_btrace_set_replay): Likewise.
2599 * record-full.c (record_full_goto_entry): Likewise.
2600 * remote.c (print_one_stopped_thread): Likewise.
2601 * target.c (target_resume): Extend comment.
2602 * thread.c (set_executing_thread): New.
2603 (set_executing): Use it.
2604 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2605 Remove references to stop_pc.
2609 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2610 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2614 * coffread.c (coff_symfile_finish): Update.
2615 * xcoffread.c (xcoff_symfile_finish): Update.
2616 * elfread.c (elf_symfile_finish): Update.
2617 * symfile.h (dwarf2_free_objfile): Don't declare.
2618 * dwarf2read.c (_initialize_dwarf2_read): Use
2619 register_objfile_data_with_cleanup.
2620 (dwarf2_free_objfile): Now static. Change signature.
2624 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2625 option "-o" to add-symbol-file-load to add an offset to each
2626 section's load address.
2627 * symfile.c (set_objfile_default_section_offset): New function.
2631 * symfile.c (add_symbol_file_command): Make sure that sections
2632 with the same name are sorted in the same order.
2636 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2637 require the second argument. If omitted, load sections at the
2638 addresses specified in the file.
2642 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2643 (_initialize_symfile): Add option "-o" to symbol-file to add an
2644 offset to each section of the symbol file.
2648 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2652 * stack.c (_initialize_stack): Update "func" help text.
2656 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2658 (unwind_infopy_str, pyuw_create_unwind_info)
2659 (unwind_infopy_add_saved_register, pyuw_sniffer)
2660 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2662 (struct saved_reg): Add constructor.
2663 <value>: Now a gdbpy_ref<>.
2667 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2671 * gdb-gdb.py.in: Format using autopep8.
2675 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2676 (type_lookup_function): Recognize CORE_ADDR values.
2680 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2685 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2690 * gdb-gdb.py: Move to...
2691 * gdb-gdb.py.in: ... here.
2692 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2693 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2695 (distclean): Remove gdb-gdb.py when cleaning.
2696 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2697 * configure: Re-generate.
2701 * proc-service.c (get_ps_regcache): New.
2702 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2703 (ps_lsetfpregs): Use it.
2708 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2709 (dwarf_decode_lines_1): Adjust.
2713 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2715 <info_proc>: Likewise.
2719 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2720 to windows_fetch_one_register, and only handle the case of
2721 fetching one register. Move the code that reloads the context
2722 and iterates over all registers if R is negative to...
2723 (windows_nat_target::fetch_registers): ... here.
2724 (do_windows_store_inferior_registers): Rename to
2725 windows_store_one_register, and only handle the case of storing
2726 one register. Move the code that handles the case where r is
2728 (windows_nat_target::store_registers) ... here.
2733 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2734 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2736 (rust_internal_print_type): Add podata parameter.
2737 (rust_print_type): Update.
2741 * typeprint.h (struct print_offset_data) <update, finish,
2742 maybe_print_hole>: New methods.
2743 <indentation>: New constant.
2744 * typeprint.c (print_offset_data::indentation): Define.
2745 (print_offset_data::maybe_print_hole, print_offset_data::update)
2746 (print_offset_data::finish): Move from c-typeprint.c and rename.
2747 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2748 (print_spaces_filtered_with_print_options): Update.
2749 (c_print_type_union_field_offset, maybe_print_hole)
2750 (c_print_type_struct_field_offset): Move to typeprint.c and
2752 (c_type_print_base_struct_union): Update.
2756 * gdbthread.h (thread_info_ref, delete_thread)
2757 (delete_thread_silent, first_thread_of_inferior)
2758 (any_thread_of_inferior, switch_to_thread)
2759 (enable_thread_stack_temporaries)
2760 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2761 (get_last_thread_stack_temporary)
2762 (value_in_thread_stack_temporaries, can_access_registers_thread):
2763 Spell out "struct thread_info" instead of just "thread_info".
2764 * inferior.h (notice_new_inferior): Likewise.
2768 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2769 pass thread_info pointer to delete_thread.
2770 (windows_nat_target::detach): Pass inferior pointer to
2772 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2774 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2775 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2776 and pass a thread_info pointer to delete_thread.
2777 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2778 pass thread_info pointer to delete_thread.
2779 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2780 delete_thread_silent call.
2781 * procfs.c (procfs_target::detach): Pass inferior pointer to
2783 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2784 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2785 delete_thread_silent call.
2786 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2787 pass thread_info pointer to delete_thread.
2788 (windows_nat_target::detach): Pass inferior pointer to
2793 * regcache.c (readable_regcache::read_part): Fix asserts.
2794 (reg_buffer::raw_collect_part): New function.
2795 (regcache::write_part): Fix asserts.
2796 (reg_buffer::raw_supply_part): New function.
2797 (regcache::transfer_regset_register): New helper function.
2798 (regcache::transfer_regset): Call new functions.
2799 (regcache_supply_regset): Use gdb_byte*.
2800 (regcache::supply_regset): Likewise.
2801 (regcache_collect_regset): Likewise.
2802 (regcache::collect_regset): Likewise.
2803 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2804 (reg_buffer::raw_supply_part): Likewise.
2805 (regcache::transfer_regset_register): Likewise.
2806 (regcache::transfer_regset): Use gdb_byte*.
2810 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2814 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2815 instead of a ptid_t. All callers adjusted.
2816 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2818 (print_ada_task_info, display_current_task_id, task_command_1):
2820 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2822 (breakpoint_kind): Adjust.
2823 (remove_breakpoints_pid): Rename to ...
2824 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2825 pointer. All callers adjusted.
2826 (bpstat_clear_actions): Use inferior_thread.
2827 (get_bpstat_thread): New.
2828 (bpstat_do_actions): Use it.
2829 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2830 to take a thread_info pointer. All callers adjusted.
2831 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2832 (breakpoint_re_set_thread): Use inferior_thread.
2833 * breakpoint.h (struct inferior): Forward declare.
2834 (bpstat_stop_status): Update.
2835 (remove_breakpoints_pid): Delete.
2836 (remove_breakpoints_inf): New.
2837 * bsd-uthread.c (bsd_uthread_target::wait)
2838 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2839 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2840 (maint_btrace_packet_history_cmd)
2841 (maint_btrace_clear_packet_history_cmd): Adjust.
2842 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2844 * cli/cli-interp.c: Include "inferior.h".
2845 * common/refcounted-object.h (struct
2846 refcounted_object_ref_policy): New.
2847 * compile/compile-object-load.c: Include gdbthread.h.
2848 (store_regs): Use inferior_thread.
2849 * corelow.c (core_target::close): Use current_inferior.
2850 (core_target_open): Adjust to use first_thread_of_inferior and use
2851 the current inferior.
2852 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2853 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2854 <thread>: ... this new field. All references adjusted.
2855 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2856 Take a thread_info pointer instead of a ptid_t.
2857 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2858 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2859 thread_info pointer instead of a ptid_t.
2860 * elfread.c: Include "inferior.h".
2861 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2862 Use inferior_thread.
2863 * eval.c (evaluate_subexp): Likewise.
2864 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2866 * gdb_proc_service.h (struct thread_info): Forward declare.
2867 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2868 <thread>: ... this new field. All references adjusted.
2869 * gdbarch.h, gdbarch.c: Regenerate.
2870 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2871 'thread' parameter. All implementations and callers adjusted.
2872 * gdbthread.h (thread_info) <set_running>: New method.
2873 (delete_thread, delete_thread_silent): Take a thread_info pointer
2875 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2876 (first_thread_of_process): Delete, replaced by ...
2877 (first_thread_of_inferior): ... this new function. All callers
2879 (any_live_thread_of_process): Delete, replaced by ...
2880 (any_live_thread_of_inferior): ... this new function. All callers
2882 (switch_to_thread, switch_to_no_thread): Declare.
2883 (is_executing): Delete.
2884 (enable_thread_stack_temporaries): Update comment.
2885 <enable_thread_stack_temporaries>: Take a thread_info pointer
2886 instead of a ptid_t. Incref the thread.
2887 <~enable_thread_stack_temporaries>: Decref the thread.
2890 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2891 (get_last_thread_stack_temporary)
2892 (value_in_thread_stack_temporaries, can_access_registers_thread):
2893 Take a thread_info pointer instead of a ptid_t. All callers
2895 * infcall.c (get_call_return_value): Use inferior_thread.
2896 (run_inferior_call): Work with thread pointers instead of ptid_t.
2897 (call_function_by_hand_dummy): Work with thread pointers instead
2898 of ptid_t. Use thread_info_ref.
2899 * infcmd.c (proceed_thread_callback): Access thread's state
2901 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2902 access thread's state directly.
2903 (continue_command): Use inferior_thread.
2904 (info_program_command): Use find_thread_ptid and access thread
2906 (proceed_after_attach_callback): Use thread state directly.
2907 (notice_new_inferior): Take a thread_info pointer instead of a
2908 ptid_t. All callers adjusted.
2909 (exit_inferior): Take an inferior pointer instead of a pid. All
2911 (exit_inferior_silent): New.
2912 (detach_inferior): Delete.
2913 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2914 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2915 (detach_inferior_command, kill_inferior_command): Use
2916 find_inferior_id instead of valid_gdb_inferior_id and
2917 gdb_inferior_id_to_pid.
2918 (inferior_command): Use inferior and thread pointers.
2919 * inferior.h (struct thread_info): Forward declare.
2920 (notice_new_inferior): Take a thread_info pointer instead of a
2921 ptid_t. All callers adjusted.
2922 (detach_inferior): Delete declaration.
2923 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2924 instead of a pid. All callers adjusted.
2925 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2926 (valid_gdb_inferior_id): Delete.
2927 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2928 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2929 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2931 <inf>: ... this new field.
2932 <step_ptid>: Delete, replaced by ...
2933 <step_thread>: ... this new field.
2934 (get_displaced_stepping_state): Take an inferior pointer instead
2935 of a pid. All callers adjusted.
2936 (displaced_step_in_progress_any_inferior): Adjust.
2937 (displaced_step_in_progress_thread): Take a thread pointer instead
2938 of a ptid_t. All callers adjusted.
2939 (displaced_step_in_progress, add_displaced_stepping_state): Take
2940 an inferior pointer instead of a pid. All callers adjusted.
2941 (get_displaced_step_closure_by_addr): Adjust.
2942 (remove_displaced_stepping_state): Take an inferior pointer
2943 instead of a pid. All callers adjusted.
2944 (displaced_step_prepare_throw, displaced_step_prepare)
2945 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2946 All callers adjusted.
2947 (start_step_over): Adjust.
2948 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2949 displaced step queue.
2950 (do_target_resume): Adjust.
2951 (fetch_inferior_event): Use inferior_thread.
2952 (context_switch, get_inferior_stop_soon): Take an
2953 execution_control_state pointer instead of a ptid_t. All callers
2955 (switch_to_thread_cleanup): Delete.
2956 (stop_all_threads): Use scoped_restore_current_thread.
2957 * inline-frame.c: Include "gdbthread.h".
2958 (inline_state) <inline_state>: Take a thread pointer instead of a
2959 ptid_t. All callers adjusted.
2960 <ptid>: Delete, replaced by ...
2961 <thread>: ... this new field.
2962 (find_inline_frame_state): Take a thread pointer instead of a
2963 ptid_t. All callers adjusted.
2964 (skip_inline_frames, step_into_inline_frame)
2965 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2966 pointer instead of a ptid_t. All callers adjusted.
2967 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2968 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2969 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2971 * linux-nat.c (get_detach_signal): Likewise.
2972 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2973 (thread_db_notice_clone): Adjust.
2974 (thread_db_find_new_threads_silently)
2975 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2976 a thread pointer instead of a ptid_t. All callers adjusted.
2977 * mi/mi-cmd-var.c: Include "inferior.h".
2978 (mi_cmd_var_update_iter): Update to use thread pointers.
2979 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2981 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2983 (mi_output_running): ... this new function.
2984 (mi_on_resume_1): Adjust to use it.
2985 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2986 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2988 (interrupt_thread_callback): : Adjust to use thread and inferior
2990 * proc-service.c: Include "gdbthread.h".
2991 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2992 * progspace-and-thread.c: Include "inferior.h".
2993 * progspace.c: Include "inferior.h".
2994 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2995 hold a reference to an inferior_object.
2996 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2998 * python/py-inferior.c (struct inferior_object): Give the type a
2999 tag name instead of a typedef.
3000 (python_on_normal_stop): No need to check if the current thread is
3002 (inferior_to_inferior_object): Change return type to
3003 inferior_object. All callers adjusted.
3004 (find_thread_object): Delete, bits factored out to ...
3005 (thread_to_thread_object): ... this new function.
3006 * python/py-infthread.c (create_thread_object): Use
3007 inferior_to_inferior_object.
3008 (thpy_is_stopped): Use thread pointer directly.
3009 (gdbpy_selected_thread): Use inferior_thread.
3010 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3011 field, replaced with ...
3012 <thread>: ... this new field. All users adjusted.
3013 (btpy_insn_or_gap_new): Drop const.
3014 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3016 * python/py-record.c: Include "gdbthread.h".
3017 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3018 a ptid_t. All callers adjusted.
3019 (gdbpy_current_recording): Use inferior_thread.
3020 * python/py-record.h (recpy_record_object) <ptid>: Delete
3021 field, replaced with ...
3022 <thread>: ... this new field. All users adjusted.
3023 (recpy_element_object) <ptid>: Delete
3024 field, replaced with ...
3025 <thread>: ... this new field. All users adjusted.
3026 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3027 a ptid_t. All callers adjusted.
3028 * python/py-threadevent.c: Include "gdbthread.h".
3029 (get_event_thread): Use thread_to_thread_object.
3030 * python/python-internal.h (struct inferior_object): Forward
3032 (find_thread_object, find_inferior_object): Delete declarations.
3033 (thread_to_thread_object, inferior_to_inferior_object): New
3035 * record-btrace.c: Include "inferior.h".
3036 (require_btrace_thread): Use inferior_thread.
3037 (record_btrace_frame_sniffer)
3038 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3039 (get_thread_current_frame): Use scoped_restore_current_thread and
3041 (get_thread_current_frame): Use thread pointer directly.
3042 (record_btrace_replay_at_breakpoint): Use thread's inferior
3044 * record-full.c: Include "inferior.h".
3045 * regcache.c: Include "gdbthread.h".
3046 (get_thread_arch_regcache): Use the inferior's address space
3048 (get_thread_regcache, registers_changed_thread): New.
3049 * regcache.h (get_thread_regcache(thread_info *thread)): New
3051 (registers_changed_thread): New.
3052 (remote_target) <remote_detach_1>: Swap order of parameters.
3053 (remote_add_thread): <remote_add_thread>: Return the new thread.
3054 (get_remote_thread_info(ptid_t)): New overload.
3055 (remote_target::remote_notice_new_inferior): Use thread pointers
3057 (remote_target::process_initial_stop_replies): Use
3058 thread_info::set_running.
3059 (remote_target::remote_detach_1, remote_target::detach)
3060 (extended_remote_target::detach): Adjust.
3061 * stack.c (frame_show_address): Use inferior_thread.
3062 * target-debug.h (target_debug_print_thread_info_pp): New.
3063 * target-delegates.c: Regenerate.
3064 * target.c (default_thread_address_space): Delete.
3065 (memory_xfer_partial_1): Use current_inferior.
3066 (target_detach): Use current_inferior.
3067 (target_thread_address_space): Delete.
3068 (generic_mourn_inferior): Use current_inferior.
3069 * target.h (struct target_ops) <thread_address_space>: Delete.
3070 (target_thread_address_space): Delete.
3071 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3073 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3074 thread pointer instead of a ptid_t. Adjust all callers.
3075 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3076 (first_thread_of_process): Delete, replaced by ...
3077 (first_thread_of_inferior): ... this new function. All callers
3079 (any_thread_of_process): Rename to ...
3080 (any_thread_of_inferior): ... this, and take an inferior pointer.
3081 (any_live_thread_of_process): Rename to ...
3082 (any_live_thread_of_inferior): ... this, and take an inferior
3084 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3085 (value_in_thread_stack_temporaries)
3086 (get_last_thread_stack_temporary): Take a thread pointer instead
3087 of a ptid_t. Adjust all callers.
3088 (thread_info::set_running): New.
3089 (validate_registers_access): Use inferior_thread.
3090 (can_access_registers_ptid): Rename to ...
3091 (can_access_registers_thread): ... this, and take a thread
3093 (print_thread_info_1): Adjust to compare thread pointers instead
3095 (switch_to_no_thread, switch_to_thread): Make extern.
3096 (scoped_restore_current_thread::~scoped_restore_current_thread):
3097 Use m_thread pointer directly.
3098 (scoped_restore_current_thread::scoped_restore_current_thread):
3099 Use inferior_thread.
3100 (thread_command): Use thread pointer directly.
3101 (thread_num_make_value_helper): Use inferior_thread.
3102 * top.c (execute_command): Use inferior_thread.
3103 * tui/tui-interp.c: Include "inferior.h".
3104 * varobj.c (varobj_create): Use inferior_thread.
3105 (value_of_root_1): Use find_thread_global_id instead of
3106 global_thread_id_to_ptid.
3110 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3112 (regcache::write_part): Likewise.
3113 (readable_regcache::cooked_read_part): Update comment.
3114 (readable_regcache::cooked_write_part): Likewise.
3115 * regcache.h: (readable_regcache::read_part): Likewise.
3116 (regcache::write_part): Likewise.
3121 * aarch64-linux-nat.c (post_attach): New.
3122 (aarch64_linux_nat_target::post_attach): Override post_attach to
3123 record the number of hardware debug registers.
3127 * python/py-param.c (add_setshow_generic): Make parameters const.
3128 (parmpy_init): Update.
3132 * regcache.h (regcache_cooked_read_ftype): Rename to...
3133 (register_read_ftype): ...this, change type to function_view.
3134 (class reg_buffer) <save>: Remove src parameter.
3135 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3136 parameter non-const in first overload. Remove src parameter in
3138 * regcache.c (do_cooked_read): Remove.
3139 (readonly_detached_regcache::readonly_detached_regcache): Make
3140 parameter non-const, adjust call to other constructor.
3141 (reg_buffer::save): Remove src parameter.
3142 * frame.c (do_frame_register_read): Remove.
3143 (frame_save_as_regcache): Use lambda function.
3144 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3145 parameter to ppu2spu_data *.
3146 (ppu2spu_sniffer): Use lambda function.
3150 * record-full.c (record_full_target::insert_breakpoint): Remove
3151 "struct" keyword, add const.
3155 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3156 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3157 * configure.ac: Remove AC_PREREQ, add missing quoting.
3158 * gnulib/configure.ac: Modernize usage of
3159 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3160 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3161 (AUTOMAKE_VERSION): Bump to 1.15.1.
3162 * configure: Re-generate.
3163 * config.in: Re-generate.
3164 * aclocal.m4: Re-generate.
3165 * gnulib/aclocal.m4: Re-generate.
3166 * gnulib/config.in: Re-generate.
3167 * gnulib/configure: Re-generate.
3168 * gnulib/import/Makefile.in: Re-generate.
3172 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3173 (lookup_minimal_symbol_by_pc_section): ... here with
3174 gdb_assert_not_reached added.
3178 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3179 parameter with a block parameter. Compare location's block symbol
3180 with the frame's block instead of addresses.
3181 (skip_inline_frames): Pass the current block instead of the
3182 frame's address. Break out as soon as we determine the frame
3183 should not be skipped.
3187 * solib-aix.c (solib_aix_get_section_offsets): Return
3189 (solib_aix_solib_create_inferior_hook): Update.
3193 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3197 * solib-frv.c (frv_relocate_main_executable): Use
3199 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3204 * objfiles.h (inhibit_section_map_updates): Update.
3205 (resume_section_map_updates, resume_section_map_updates_cleanup):
3207 * solib-svr4.c (svr4_handle_solib_event): Update.
3208 * objfiles.c (inhibit_section_map_updates): Return
3209 scoped_restore_tmpl<int>.
3210 (resume_section_map_updates, resume_section_map_updates_cleanup):
3215 * valprint.h (read_string): Update.
3216 * valprint.c (read_string): Change type of "buffer".
3217 (val_print_string): Update.
3218 * python/py-value.c (valpy_string): Update.
3219 * language.h (struct language_defn) <la_get_string>: Change
3221 (default_get_string, c_get_string): Update.
3222 * language.c (default_get_string): Change type of "buffer".
3223 * guile/scm-value.c (gdbscm_value_to_string): Update.
3224 * c-lang.c (c_get_string): Change type of "buffer".
3228 * ser-mingw.c (struct pipe_state_destroyer): New.
3229 (pipe_state_up): New typedef.
3230 (cleanup_pipe_state): Remove.
3231 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3235 * rust-lang.h (rust_yyerror): Don't declare.
3236 * rust-lang.c (rust_language_defn): Update.
3237 * rust-exp.y (yyerror): Now static.
3238 * parse.c (parse_exp_in_context_1): Update.
3239 * p-lang.h (p_yyerror): Don't declare.
3240 * p-lang.c (p_language_defn): Update.
3241 * p-exp.y (yyerror): Now static.
3242 * opencl-lang.c (opencl_language_defn): Update.
3243 * objc-lang.c (objc_language_defn): Update.
3244 * m2-lang.h (m2_yyerror): Don't declare.
3245 * m2-lang.c (m2_language_defn): Update.
3246 * m2-exp.y (yyerror): Now static.
3247 * language.h (struct language_defn) <la_error>: Remove.
3248 * language.c (unk_lang_error): Remove.
3249 (unknown_language_defn, auto_language_defn): Remove.
3250 * go-lang.h (go_yyerror): Don't declare.
3251 * go-lang.c (go_language_defn): Update.
3252 * go-exp.y (yyerror): Now static.
3253 * f-lang.h (f_yyerror): Don't declare.
3254 * f-lang.c (f_language_defn): Update.
3255 * f-exp.y (yyerror): Now static.
3256 * d-lang.h (d_yyerror): Don't declare.
3257 * d-lang.c (d_language_defn): Update.
3258 * d-exp.y (yyerror): Now static.
3259 * c-lang.h (c_yyerror): Don't declare.
3260 * c-lang.c (c_language_defn, cplus_language_defn)
3261 (asm_language_defn, minimal_language_defn): Update.
3262 * c-exp.y (yyerror): Now static.
3263 * ada-lang.h (ada_yyerror): Don't declare.
3264 * ada-lang.c (ada_language_defn): Update.
3265 * ada-exp.y (yyerror): Now static.
3269 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3270 (store_sveregs_to_thread): Likewise.
3271 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3272 (aarch64_linux_store_inferior_registers): Likewise.
3273 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3275 (aarch64_sve_regs_copy_to_regcache): Likewise.
3276 (aarch64_sve_regs_copy_from_regcache): Likewise.
3277 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3279 (aarch64_sve_regs_copy_to_regcache): Likewise.
3280 (aarch64_sve_regs_copy_from_regcache): Likewise.
3281 (sve_context): Structure from Linux headers.
3282 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3283 (SVE_SIG_ZREG_SIZE): Likewise.
3284 (SVE_SIG_PREG_SIZE): Likewise.
3285 (SVE_SIG_FFR_SIZE): Likewise.
3286 (SVE_SIG_REGS_OFFSET): Likewise.
3287 (SVE_SIG_ZREGS_OFFSET): Likewise.
3288 (SVE_SIG_ZREG_OFFSET): Likewise.
3289 (SVE_SIG_ZREGS_SIZE): Likewise.
3290 (SVE_SIG_PREGS_OFFSET): Likewise.
3291 (SVE_SIG_PREG_OFFSET): Likewise.
3292 (SVE_SIG_PREGS_SIZE): Likewise.
3293 (SVE_SIG_FFR_OFFSET): Likewise.
3294 (SVE_SIG_REGS_SIZE): Likewise.
3295 (SVE_SIG_CONTEXT_SIZE): Likewise.
3296 (SVE_PT_REGS_MASK): Likewise.
3297 (SVE_PT_REGS_FPSIMD): Likewise.
3298 (SVE_PT_REGS_SVE): Likewise.
3299 (SVE_PT_VL_INHERIT): Likewise.
3300 (SVE_PT_VL_ONEXEC): Likewise.
3301 (SVE_PT_REGS_OFFSET): Likewise.
3302 (SVE_PT_FPSIMD_OFFSET): Likewise.
3303 (SVE_PT_FPSIMD_SIZE): Likewise.
3304 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3305 (SVE_PT_SVE_PREG_SIZE): Likewise.
3306 (SVE_PT_SVE_FFR_SIZE): Likewise.
3307 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3308 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3309 (__SVE_SIG_TO_PT): Likewise.
3310 (SVE_PT_SVE_OFFSET): Likewise.
3311 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3312 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3313 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3314 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3315 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3316 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3317 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3318 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3319 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3320 (SVE_PT_SVE_SIZE): Likewise.
3321 (SVE_PT_SIZE): Likewise.
3322 (HAS_SVE_STATE): New define.
3326 * nat/aarch64-sve-linux-sigcontext.h: New file.
3327 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3329 (SVE_VQ_MIN): Likewise.
3330 (SVE_VQ_MAX): Likewise.
3331 (SVE_VL_MIN): Likewise.
3332 (SVE_VL_MAX): Likewise.
3333 (SVE_NUM_ZREGS): Likewise.
3334 (SVE_NUM_PREGS): Likewise.
3335 (sve_vl_valid): Likewise.
3336 (struct user_sve_header): Likewise.
3341 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3342 was requested by GDB.
3346 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3350 * gnulib/update-gnulib.sh: Print expected versions of
3355 * arch-utils.c (default_type_align): Use type_length_units.
3356 * gdbtypes.c (type_align): Use type_length_units.
3360 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3361 of 'define' command.
3366 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3367 get_no_prettyformat_print_options.
3371 * sparc-nat.h: Include target.h.
3372 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3373 <fetch_registers>: Remove this argument in function call.
3374 <store_registers>: Remove this argument in function call, remove
3376 <low_forget_process>: Call sparc64_forget_process instead of
3377 sparc_forget_process.
3381 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3382 (procfs_target::make_corefile_notes): Adjust to new
3383 target_read_alloc return type.
3389 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3390 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3391 Move should_notify_stop local into more inner scope.
3397 * infrun.c (resume_1): Add call to mark_async_event_handler.
3401 * infrun.c (do_target_wait): Change old version of $pc printed.
3405 * dwarf2read.c (read_index_from_section): Rename to...
3406 (read_gdb_index_from_section): ... this, update all callers.
3407 (dwarf2_read_index): Rename to...
3408 (dwarf2_read_gdb_index): ... this, update all callers.
3412 * gdb/hppa-linux-nat.c
3413 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3414 hppa_linux_nat_target::fetch_registers.
3418 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3419 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3420 (AARCH64_DWARF_SVE_FFR): Likewise.
3421 (AARCH64_DWARF_SVE_P0): Likewise.
3422 (AARCH64_DWARF_SVE_Z0): Likewise.
3426 * common/common-regcache.h (raw_compare): New function.
3427 * regcache.c (regcache::raw_compare): Likewise.
3428 * regcache.h (regcache::raw_compare): New declaration.
3432 * common/common-regcache.h (reg_buffer_common): New structure.
3433 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3434 (reg_buffer::raw_supply): Likewise.
3435 (reg_buffer::raw_supply_integer): Likewise.
3436 (reg_buffer::raw_supply_zeroed): Likewise.
3437 (reg_buffer::raw_collect): Likewise.
3438 (reg_buffer::raw_collect_integer): Likewise.
3439 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3440 (reg_buffer::raw_supply): Likewise.
3441 (reg_buffer::raw_supply_integer): Likewise.
3442 (reg_buffer::raw_supply_zeroed): Likewise.
3443 (reg_buffer::raw_collect): Likewise.
3444 (reg_buffer::raw_collect_integer): Likewise.
3448 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3449 (class remote_state) <stop_reply_queue>: Now std::vector.
3450 (remote_state::~remote_state)
3451 (remote_target::stop_reply_queue_length): Update.
3452 (struct queue_iter_param, remove_child_of_pending_fork)
3453 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3454 (check_pending_event_prevents_wildcard_vcont_callback)
3455 (remove_stop_reply_for_inferior)
3456 (remove_stop_reply_of_remote_state)
3457 (remote_notif_remove_once_on_match)
3458 (stop_reply_match_ptid_and_ws)
3459 (remote_kill_child_of_pending_fork): Remove.
3460 (remote_target::remove_new_fork_children)
3461 (remote_target::check_pending_events_prevent_wildcard_vcont)
3462 (remote_target::discard_pending_stop_replies)
3463 (remote_target::discard_pending_stop_replies_in_queue)
3464 (remote_target::remote_notif_remove_queued_reply)
3465 (remote_target::queued_stop_reply)
3466 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3467 (remote_target::wait, remote_target::kill_new_fork_children)
3468 (remote_target::async): Update.
3472 * record-full.c (record_full_arch_list_cleanups): Remove.
3473 (record_full_message): Use try/catch.
3474 (record_full_wait_cleanups): Remove.
3475 (record_full_wait_1): Use try/catch.
3476 (record_full_restore): Likewise.
3480 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3481 declare VEC. Add constructor.
3482 <in_target_beneath>: Now bool.
3483 (record_full_breakpoints): Now a std::vector, static.
3484 (record_full_sync_record_breakpoints)
3485 (record_full_init_record_breakpoints)
3486 (record_full_target::insert_breakpoint)
3487 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3491 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3492 * serial.c (serial_interface_lookup): Remove struct keyword.
3496 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3498 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3500 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3502 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3503 "beneath" as a method.
3504 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3505 Use "beneath" as a method.
3509 * tracefile.c (struct trace_file_writer_deleter): New.
3510 <operator()>: Rename from trace_file_writer_xfree.
3511 (trace_file_writer_up): New typedef.
3512 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3516 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3517 <m_registers, m_register_status>: Change type to
3519 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3524 * common/common-regcache.h (enum register_status): Add
3525 underlying type "signed char".
3526 * regcache.h (reg_buffer) <m_register_status>: Change type to
3528 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3529 register_status instead of signed char.
3530 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3531 (reg_buffer::get_register_status): Remove cast.
3532 (readable_regcache::raw_read): Remove cast.
3533 (readable_regcache::cooked_read): Remove cast.
3537 * source.c (reverse_search_command, forward_search_command): Use
3542 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3543 (serial_ops_list): Now static, std::vector.
3544 (serial_interface_lookup, serial_add_interface): Update.
3548 * dwarf2read.c (process_cu_includes): Update.
3549 (process_full_comp_unit): Update.
3550 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3557 * python/python.c (do_start_initialization):
3558 Avoid call to internal Python API.
3559 (init__gdb_module): New function.
3563 * linux-thread-db.c (valprint.h): New include.
3564 (struct check_thread_db_info): New structure.
3565 (check_thread_db_on_load, tdb_testinfo): New static globals.
3566 (check_thread_db, check_thread_db_callback): New functions.
3567 (try_thread_db_load_1): Run integrity checks if requested.
3568 (maintenance_check_libthread_db): New function.
3569 (_initialize_thread_db): Register "maint check libthread-db"
3570 and "maint set/show check-libthread-db".
3571 * NEWS: Mention the above new commands.
3575 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3580 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3584 * common/btrace-common.h (struct btrace_data): Add constructor,
3585 destructor, move assignment operator.
3586 <empty, clear, fini>: New methods.
3587 <format>: Initialize.
3588 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3589 (btrace_data_empty): Don't declare.
3590 * common/btrace-common.c (btrace_data_init): Remove.
3591 (btrace_data::fini): Rename from btrace_data_fini.
3592 (btrace_data::empty): Rename from btrace_data_empty.
3593 (btrace_data::clear): Rename from btrace_data_clear. Return
3595 * btrace.h (make_cleanup_btrace_data): Don't declare.
3596 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3597 (parse_xml_btrace): Update.
3598 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3599 (maint_btrace_clear_packet_history_cmd): Update.
3603 * target.h (target_ops) <beneath>: Now a method. All references
3605 (class target_stack): New.
3606 * target.c (g_target_stack): New.
3607 (g_current_top_target): Delete.
3608 (current_top_target): Get the top target out of g_target_stack.
3609 (target_stack::push, target_stack::unpush): New.
3610 (push_target, unpush_target): Reimplement.
3611 (target_is_pushed): Reimplement in terms of g_target_stack.
3612 (target_ops::beneath, target_stack::find_beneath): New.
3616 * target.h (find_target_beneath): Delete declaration.
3617 * target.c (find_target_beneath): Delete definition.
3618 * aix-thread.c: All callers of find_target_beneath adjusted to
3619 call target_ops::beneath instead.
3620 * bsd-uthread.c: Likewise.
3621 * linux-thread-db.c: Likewise.
3622 * ravenscar-thread.c: Likewise.
3623 * sol-thread.c: Likewise.
3624 * spu-multiarch.c: Likewise.
3628 * target.h (target_ops) <beneath>: Now a method. All references
3630 (target_ops) <m_beneath>: New.
3631 * target.c (target_ops::beneath): New.
3632 * corelow.c: Adjust all references to target_ops::beneath.
3633 * linux-thread-db.c: Likewise.
3634 * make-target-delegates: Likewise.
3635 * record-btrace.c: Likewise.
3636 * record-full.c: Likewise.
3637 * remote.c: Likewise.
3638 * target.c: Likewise.
3639 * target-delegates.c: Regenerate.
3643 * target.h (target_stack): Delete.
3644 (current_top_target): Declare function.
3645 * target.c (target_stack): Delete.
3646 (g_current_top_target): New.
3647 (current_top_target): New function.
3648 * auxv.c: Use current_top_target instead of target_stack
3650 * avr-tdep.c: Likewise.
3651 * breakpoint.c: Likewise.
3652 * corefile.c: Likewise.
3653 * elfread.c: Likewise.
3655 * exceptions.c: Likewise.
3656 * frame.c: Likewise.
3657 * gdbarch-selftests.c: Likewise.
3658 * gnu-v3-abi.c: Likewise.
3659 * ia64-tdep.c: Likewise.
3660 * ia64-vms-tdep.c: Likewise.
3661 * infcall.c: Likewise.
3662 * infcmd.c: Likewise.
3663 * infrun.c: Likewise.
3664 * linespec.c: Likewise.
3665 * linux-tdep.c: Likewise.
3666 * minsyms.c: Likewise.
3667 * ppc-linux-nat.c: Likewise.
3668 * ppc-linux-tdep.c: Likewise.
3669 * procfs.c: Likewise.
3670 * regcache.c: Likewise.
3671 * remote.c: Likewise.
3672 * rs6000-tdep.c: Likewise.
3673 * s390-linux-nat.c: Likewise.
3674 * s390-tdep.c: Likewise.
3675 * solib-aix.c: Likewise.
3676 * solib-darwin.c: Likewise.
3677 * solib-dsbt.c: Likewise.
3678 * solib-spu.c: Likewise.
3679 * solib-svr4.c: Likewise.
3680 * solib-target.c: Likewise.
3681 * sparc-tdep.c: Likewise.
3682 * sparc64-tdep.c: Likewise.
3683 * spu-tdep.c: Likewise.
3684 * symfile.c: Likewise.
3685 * symtab.c: Likewise.
3686 * target-descriptions.c: Likewise.
3687 * target-memory.c: Likewise.
3688 * target.c: Likewise.
3689 * target.h: Likewise.
3690 * tracefile-tfile.c: Likewise.
3691 * tracepoint.c: Likewise.
3692 * valops.c: Likewise.
3693 * valprint.c: Likewise.
3694 * value.c: Likewise.
3695 * windows-tdep.c: Likewise.
3696 * mi/mi-main.c: Likewise.
3700 * valprint.h (build_address_symbolic): Declare.
3701 * printcmd.c (print_address_symbolic): Update.
3702 (build_address_symbolic): Change "name" and "filename" to
3704 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3706 * defs.h (build_address_symbolic): Remove declaration.
3710 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3711 (aarch64_vnv_type): Add function.
3712 (aarch64_pseudo_register_name): Add V regs for SVE.
3713 (aarch64_pseudo_register_type): Likewise.
3714 (aarch64_pseudo_register_reggroup_p): Likewise.
3715 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3716 (aarch64_pseudo_read_value): Add V regs for SVE.
3717 (aarch64_pseudo_write_2): Use V0 offset for SVE
3718 (aarch64_pseudo_write): Add V regs for SVE.
3719 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3723 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3724 (sve_vl_from_vq): Likewise.
3728 * cli/cli-cmds.c (show_version): Update.
3729 * top.c (print_gdb_version): Add "interactive" parameter.
3731 * main.c (captured_main_1): Update.
3732 * top.h (print_gdb_version): Add "interactive" parameter and a
3737 * common/enum-flags.h: Add trailing semicolon to example in
3743 * NEWS: Add entry about pager.
3744 * utils.c (pagination_disabled_for_command): New global.
3745 (prompt_for_continue): Allow "c" response to prompt.
3746 (reinitialize_more_filter): Clear
3747 pagination_disabled_for_command.
3748 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3752 * ada-lang.h (ada_lookup_symbol_list): Update.
3753 * ada-lang.c (resolve_subexp): Update.
3754 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3756 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3757 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3758 results parameter to std::vector.
3759 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3761 * ada-exp.y (block_lookup): Update.
3762 (select_possible_type_sym): Change type of syms. Remove nsyms
3764 (write_var_or_type, write_name_assoc): Update.
3768 * windows-nat.c (windows_nat_target::xfer_partial): Return
3769 TARGET_XFER_E_IO if we need to delegate to the target beneath
3770 but BENEATH is NULL.
3774 * Makefile.in (config.status): Add configure.nat as a
3779 * cp-name-parser.y (cpname_state): Add method declarations.
3780 (HANDLE_QUAL): Update.
3781 (cpname_state::d_grab, cpname_state::fill_comp)
3782 (cpname_state::make_operator, cpname_state::make_dtor)
3783 (cpname_state::make_builtin_type, cpname_state::make_name)
3784 (cpname_state::d_qualify, cpname_state::d_int_type)
3785 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3786 (%union): Move earlier.
3790 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3794 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3795 (aarch64_pseudo_write_1): Likewise.
3796 (aarch64_pseudo_read_value): Use helper.
3797 (aarch64_pseudo_write): Likewise.
3801 * darwin-nat.c (darwin_ops): Delete.
3802 (darwin_attach_pid): Use get_native_target.
3806 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3807 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3811 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3812 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3813 (aarch64_gdbarch_init): Check for SVE.
3814 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3818 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3819 * aarch64-tdep.h (aarch64_read_description): Likewise.
3820 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3821 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3822 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3823 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3824 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3828 * value.c (value_fetch_lazy_bitfield): New.
3829 (value_fetch_lazy_memory): New.
3830 (value_fetch_lazy_register): New.
3831 (value_fetch_lazy): Factor out to smaller functions.
3835 * cp-name-parser.y (backslashable, represented): Now const.
3839 * cp-name-parser.y: Include parser-defs.h.
3840 (parser_fprintf): Remove declaration.
3844 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3846 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3847 (global_result): Remove globals.
3848 (struct cpname_state): New.
3849 (yyparse): Don't declare.
3850 (yylex, yyerror): Move declarations after %union.
3851 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3852 (make_name): Add state parameter.
3854 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3856 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3858 (yylex): Add lvalp, state parameters.
3859 (yyerror): Add state parameter.
3860 (cp_demangled_name_to_comp): Update.
3864 * cp-name-parser.y (parser_fprintf): Declare.
3865 (GDB_YY_REMAP_PREFIX): Define.
3866 Include yy-remap.h. Don't redefine yy* identifiers.
3870 * python/py-type.c (typy_legacy_template_argument): Update.
3871 * cp-support.h (cp_demangled_name_to_comp): Update.
3872 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3873 parameter to be a "std::string *".
3878 * ada-lex.l: Include "diagnostics.h" instead of
3879 "common/diagnostics.h".
3880 * unittests/environ-selftests.c: Likewise.
3881 * common/diagnostics.h: Moved to ../include.
3885 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3886 to language_mode_manual while calling breakpoint_re_set_one.
3890 * valops.c (value_cast_structs, destructor_name_p): Update.
3891 * symtab.c (gdb_mangle_name): Update.
3892 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3894 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3895 (pascal_object_print_value_fields, pascal_object_print_value):
3897 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3898 * linespec.c (find_methods): Update.
3899 * gdbtypes.h (type_name_no_tag): Remove.
3900 (type_name_or_error): Rename from type_name_no_tag_or_error.
3901 * gdbtypes.c (type_name_no_tag): Remove.
3902 (type_name_or_error): Rename from type_name_no_tag_or_error.
3903 (lookup_struct_elt_type, check_typedef): Update.
3904 * expprint.c (print_subexp_standard): Update.
3905 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3906 * d-namespace.c (d_lookup_nested_symbol): Update.
3907 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3908 (cp_print_class_member): Update.
3909 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3910 * completer.c (add_struct_fields): Update.
3911 * c-typeprint.c (cp_type_print_derivation_info)
3912 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3914 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3915 (ada_prefer_type, ada_is_exception_sym): Update.
3919 * valops.c (enum_constant_from_type, value_namespace_elt)
3920 (value_maybe_namespace_elt): Update.
3921 * valarith.c (find_size_for_pointer_math): Update.
3922 * target-descriptions.c (make_gdb_type): Update.
3923 * symmisc.c (print_symbol): Update.
3924 * stabsread.c (define_symbol, read_type)
3925 (complain_about_struct_wipeout, add_undefined_type)
3926 (cleanup_undefined_types_1): Update.
3927 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3928 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3929 (rust_internal_print_type, rust_composite_type)
3930 (rust_evaluate_funcall, rust_evaluate_subexp)
3931 (rust_inclusive_range_type_p): Update.
3932 * python/py-type.c (typy_get_tag): Update.
3933 * p-typeprint.c (pascal_type_print_base): Update.
3934 * mdebugread.c (parse_symbol, parse_type): Update.
3935 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3937 * guile/scm-type.c (gdbscm_type_tag): Update.
3938 * go-lang.c (sixg_string_p): Update.
3939 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3941 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3942 (TYPE_TAG_NAME): Remove.
3943 * gdbtypes.c (type_name_no_tag): Simplify.
3944 (check_typedef, check_types_equal, recursive_dump_type)
3945 (copy_type_recursive, arch_composite_type): Update.
3946 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3947 in summary mode when needed.
3948 * eval.c (evaluate_funcall): Update.
3949 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3950 (process_structure_scope, read_enumeration_type)
3951 (read_namespace_type, read_module_type, determine_prefix): Update.
3952 * cp-support.c (inspect_type): Update.
3953 * coffread.c (process_coff_symbol, decode_base_type): Update.
3954 * c-varobj.c (c_is_path_expr_parent): Update.
3955 * c-typeprint.c (c_type_print_base_struct_union): Update.
3956 (c_type_print_base_1): Update. Print struct/class/union/enum in
3957 summary when using C language.
3958 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3959 (gen_maybe_namespace_elt): Update.
3960 * ada-lang.c (ada_type_name): Simplify.
3961 (empty_record, ada_template_to_fixed_record_type_1)
3962 (template_to_static_fixed_type)
3963 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3967 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3969 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3970 (c_print_type): Update.
3971 (c_print_type): New overload.
3972 (c_type_print_varspec_prefix, c_type_print_args)
3973 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3974 (c_type_print_base_struct_union, c_type_print_base_1)
3975 (cp_type_print_method_args): Add "language" parameter.
3976 (c_type_print_base): Update.
3977 * c-lang.h (c_print_type): Add new overload.
3981 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3982 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3986 * aarch64-tdep.c (aarch64_sve_register_names): New const
3988 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3989 (AARCH64_SVE_Z_REGS_NUM): New define.
3990 (AARCH64_SVE_P_REGS_NUM): Likewise.
3991 (AARCH64_SVE_NUM_REGS): Likewise.
3995 * nat/linux-ptrace.h [__alpha__]
3996 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4001 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4002 the endianness selected.
4003 * NEWS: Document `set endian auto' mode operation update.
4007 * Makefile.in: Add new header.
4008 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4009 (sve_vl_from_vg): Likewise.
4010 (sve_vq_from_vl): Likewise.
4011 (sve_vl_from_vq): Likewise.
4012 (sve_vq_from_vg): Likewise.
4013 (sve_vg_from_vq): Likewise.
4014 * configure.nat: Add new c file.
4015 * nat/aarch64-sve-linux-ptrace.c: New file.
4016 * nat/aarch64-sve-linux-ptrace.h: New file.
4020 * aarch64-linux-nat.c (aarch64_linux_read_description):
4022 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4024 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4025 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4026 (aarch64_gdbarch_init): Add parmeter zero.
4027 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4028 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4029 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4031 * doc/gdb.texinfo: Describe SVE feature
4032 * features/aarch64-sve.c: New file.
4037 * gdbarch.sh (significant_addr_bit): Default to zero when
4038 not set by target architecture.
4039 * gdbarch.c: Re-generated.
4040 * utils.c (address_significant): Update.
4044 * stack.c (func_command): Remove trailing newline in call to error.
4048 * regcache.h (regcache_raw_collect): Remove, update callers to
4049 use regcache::raw_collect.
4050 * regcache.c (regcache_raw_collect): Remove.
4054 * regcache.h (regcache_raw_supply): Remove, update callers to
4055 use detached_regcache::raw_supply.
4056 * regcache.c (regcache_raw_supply): Remove.
4060 * regcache.h (regcache_cooked_write_part): Remove, update
4061 callers to use regcache::cooked_write_part.
4062 * regcache.c (regcache_cooked_write_part): Remove.
4066 * regcache.h (regcache_cooked_read_part): Remove, update callers
4067 to use readable_regcache::cooked_read_part.
4068 * regcache.c (regcache_cooked_read_part): Remove.
4072 * regcache.h (regcache_cooked_read_value): Remove, update
4073 callers to use readable_regcache::cooked_read_value.
4074 * regcache.c (regcache_cooked_read_value): Remove.
4078 * regcache.h (regcache_cooked_write): Remove, update callers to
4079 use regcache::cooked_write.
4080 * regcache.c (regcache_cooked_write): Remove.
4084 * regcache.h (regcache_invalidate): Remove, update callers to
4085 use detached_regcache::invalidate instead.
4086 * regcache.c (regcache_invalidate): Remove.
4090 * regcache.h (regcache_raw_write_part): Remove, update callers
4091 to use regcache::raw_write_part instead.
4092 * regcache.c (regcache_raw_write_part): Remove.
4096 * regcache.h (regcache_raw_read_part): Remove, update callers to
4097 use readable_regcache::raw_read_part instead.
4098 * regcache.c (regcache_raw_read_part): Remove.
4102 * regcache.h (regcache_cooked_read): Remove, update callers to
4103 use readable_regcache::cooked_read instead.
4104 * regcache.c (regcache_cooked_read): Remove.
4108 * regcache.h (regcache_raw_write): Remove, update callers to use
4109 regcache::raw_write instead.
4110 * regcache.c (regcache_raw_write): Remove.
4114 * regcache.h (regcache_raw_read): Remove, update callers to use
4115 readable_regcache::raw_read instead.
4116 * regcache.c (regcache_raw_read): Remove.
4120 * regcache.h (regcache_raw_update): Remove, update callers to
4121 use readable_regcache::raw_update instead.
4122 * regcache.c (regcache_raw_update): Remove.
4126 * regcache.h (regcache_register_status): Remove, update callers
4127 to use reg_buffer::get_register_status directly instead.
4128 * regcache.c (regcache_register_status): Remove.
4132 * regcache.h (regcache_get_ptid): Remove, update all callers to
4133 call regcache::ptid instead.
4134 * regcache.c (regcache_get_ptid): Remove.
4138 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4142 * common/common-exceptions.h (exception_rethrow): Use
4147 * breakpoint.c (print_solib_event, check_status_catch_solib):
4148 Remove struct keyword in range-based for loops.
4149 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4150 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4152 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4154 * symfile.c (addr_info_make_relative): Likewise.
4155 * thread.c (value_in_thread_stack_temporaries): Likewise.
4160 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4161 aggregate type to get its real type before accessing it.
4165 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4166 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4167 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4168 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4169 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4170 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4171 * printcmd.c (info_address_command): Likewise.
4175 * windows-nat.c (handle_exception): Update fall-through comment.
4179 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4180 (struct program_space) <added_solibs>: Now a std::vector.
4181 * breakpoint.c (print_solib_event): Update.
4182 (check_status_catch_solib): Update.
4183 * progspace.c (clear_program_space_solib_cache): Update.
4184 * solib.c (update_solib_list): Update.
4188 * python/py-type.c (typy_richcompare): Update.
4189 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4190 * gdbtypes.h (types_deeply_equal): Return bool.
4191 (types_equal): Likewise.
4192 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4194 (check_types_equal): Change worklist to std::vector. Return
4196 (struct type_equality_entry): Add constructor.
4197 (compare_maybe_null_strings): Return bool.
4198 (check_types_worklist): Return bool. Change worklist to
4200 (types_deeply_equal): Use std::vector.
4201 (types_equal): Return bool.
4202 (compare_maybe_null_strings): Simplify.
4206 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4210 * objc-lang.h: Don't include cp-support.h.
4211 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4216 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4220 * value.c (value::location): Initialize.
4224 * dbxread.c (init_bincl_list): Remove.
4225 (bincl_list): Now a std::vector.
4226 (bincls_allocated, next_bincl): Remove.
4227 (free_bincl_list, do_free_bincl_list_cleanup)
4228 (make_cleanup_free_bincl_list): Remove.
4229 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4231 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4232 (struct header_file_location): Add constructor.
4233 (add_bincl_to_list): Remove.
4237 * tui/tui.c (tui_enable): Update.
4238 * mi/mi-interp.c (mi_interp::init): Update.
4239 * interps.h (class interp) <name>: New method.
4240 <m_name>: Rename from name.
4241 (~scoped_restore_interp): Update.
4242 * interps.c (interp::interp): Update.
4243 (interp_add, interp_set, interp_lookup_existing)
4244 (current_interp_named_p): Update.
4248 * interps.c (interp_name): Remove.
4249 * mi/mi-interp.c (mi_interp::init): Update.
4250 * interps.h (interp_name): Remove.
4251 (~scoped_restore_interp): Update.
4252 * tui/tui.c (tui_enable): Update.
4256 * utils.c (fputs_maybe_filtered): Update.
4257 * linespec.c (decode_line_full): Update.
4258 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4259 (mi_print_breakpoint_for_event, mi_solib_loaded)
4260 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4261 (mi_user_selected_context_changed): Update.
4262 * mi/mi-main.c (mi_execute_command): Update.
4263 * cli/cli-script.c (execute_control_command): Update.
4264 * python/python.c (execute_gdb_command): Update.
4265 * solib.c (info_sharedlibrary_command): Update.
4266 * interps.c (interp_ui_out): Remove.
4267 * interps.h (interp_ui_out): Remove.
4271 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4272 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4273 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4277 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4278 * interps.c (interp_exec): Use scoped_restore.
4282 * remote.c (remote_target::remote_file_get): Use
4284 (remote_target::remote_file_put): Likewise.
4288 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4290 (get_pe_section_index, add_pe_exported_sym): Update.
4291 (read_pe_exported_syms): Use gdb::def_vector.
4295 * frame.c (remove_prev_frame): Remove.
4296 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4300 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4302 * mips-linux-nat.c (supply_fpregset): Always call
4303 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4304 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4305 `mips_fill_fpregset'.
4306 * mips-linux-tdep.c (mips_supply_fpregset)
4307 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4308 (mips_fill_fpregset_wrapper): Remove functions.
4309 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4310 (mips_linux_fpregset): Remove variable.
4311 (mips_linux_iterate_over_regset_sections): Use
4312 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4313 (mips_linux_o32_sigframe_init): Remove comment.
4317 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4318 (struct readahead_cache, struct packet_reg, struct
4319 remote_arch_state, class remote_state): Move higher up in the
4321 (remote_target::m_remote_state): Now an object instead of a pointer.
4322 (remote_target::get_remote_state): Adjust.
4326 * stack.c (select_and_print_frame): Delete.
4327 (struct function_bounds): Move struct within function.
4328 (func_command): Most content moved into new function
4329 find_frame_for_function, use new function, print result, add
4331 (find_frame_for_function): New function, now returns a result.
4335 * stack.c (iterate_over_block_arg_vars): Fix comment.
4336 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4342 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4344 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4346 * frame.h (class scoped_restore_selected_frame): New class.
4347 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4348 of any exception, use scoped_restore_selected_frame to restore the
4353 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4358 * complaints.c (struct complaints): Remove.
4359 (symfile_complaint_book): Remove.
4360 (series): New global.
4361 (complaint_internal): Update.
4362 (clear_complaints): Update.
4366 * complaints.c (counters): New global.
4367 (struct complain): Remove.
4368 (struct complaints) <root>: Remove.
4369 (complaint_sentinel): Remove.
4370 (symfile_complaint_book): Update.
4371 (find_complaint) Remove.
4372 (complaint_internal, clear_complaints): Update.
4376 * complaints.c (struct complain) <file, line>: Remove.
4377 (find_complaint): Remove file, line parameters.
4378 (complaint_internal): Update.
4382 * complaints.c (vcomplaint): Remove.
4383 (complaint_internal) Merge in contents of vcomplaint.
4387 * complaints.c (struct complaints) <explanation>: Remove.
4388 (symfile_explanations): Remove.
4389 (symfile_complaint_book): Update.
4390 (vcomplaint): Update.
4391 (struct explanation): Remove.
4395 * complaints.c (symfile_complaints): Remove.
4396 (complaint_internal): Remove "complaints" parameter.
4397 (clear_complaints, vcomplaint): Remove "c" parameter.
4398 (get_complaints): Remove.
4399 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4400 (dwarf2_debug_line_missing_file_complaint)
4401 (dwarf2_debug_line_missing_end_sequence_complaint)
4402 (dwarf2_complex_location_expr_complaint)
4403 (dwarf2_const_value_length_mismatch_complaint)
4404 (dwarf2_section_buffer_overflow_complaint)
4405 (dwarf2_macro_malformed_definition_complaint)
4406 (dwarf2_invalid_attrib_class_complaint)
4407 (create_addrmap_from_index, dw2_symtab_iter_next)
4408 (dw2_expand_marked_cus)
4409 (dw2_debug_names_iterator::find_vec_in_debug_names)
4410 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4411 (create_debug_type_hash_table, init_cutu_and_read_dies)
4412 (partial_die_parent_scope, add_partial_enumeration)
4413 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4414 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4415 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4416 (create_cus_hash_table, create_dwp_hash_table)
4417 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4418 (dwarf2_rnglists_process, dwarf2_ranges_process)
4419 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4420 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4421 (handle_struct_member_die, process_structure_scope)
4422 (read_array_type, read_common_block, read_module_type)
4423 (read_tag_pointer_type, read_typedef, read_base_type)
4424 (read_subrange_type, load_partial_dies, partial_die_info::read)
4425 (partial_die_info::read, partial_die_info::read)
4426 (partial_die_info::read, read_checked_initial_length_and_offset)
4427 (dwarf2_string_attr, read_formatted_entries)
4428 (dwarf_decode_line_header)
4429 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4430 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4431 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4432 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4433 (get_signatured_type, get_DW_AT_signature_type)
4434 (decode_locdesc, file_file_name, consume_improper_spaces)
4435 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4436 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4437 (dwarf2_symbol_mark_computed, set_die_type)
4438 (read_attribute_value): Update.
4439 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4441 * dbxread.c (unknown_symtype_complaint)
4442 (lbrac_mismatch_complaint, repeated_header_complaint)
4443 (set_namestring, function_outside_compilation_unit_complaint)
4444 (read_dbx_symtab, process_one_symbol): Update.
4445 * gdbtypes.c (stub_noname_complaint): Update.
4446 * windows-nat.c (handle_unload_dll): Update.
4447 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4448 (decode_base_type): Update.
4449 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4450 (eb_complaint, record_include_begin, record_include_end)
4451 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4452 (process_xcoff_symbol, read_symbol)
4453 (function_outside_compilation_unit_complaint)
4454 (scan_xcoff_symtab): Update.
4455 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4456 * buildsym.c (finish_block_internal, make_blockvector)
4457 (end_symtab_get_static_block, augment_type_symtab): Update.
4458 * dtrace-probe.c (dtrace_process_dof)
4459 (dtrace_static_probe_ops::get_probes): Update.
4460 * complaints.h (struct complaint): Don't declare.
4461 (symfile_complaints): Remove.
4462 (complaint_internal): Remove "complaints" parameter.
4463 (complaint): Likewise.
4464 (clear_complaints): Likewise.
4465 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4466 (reread_symbols): Update.
4467 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4468 (dwarf2_frame_cache, decode_frame_entry): Update.
4469 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4470 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4471 (info_selectors_command): Update.
4472 * macrotab.c (macro_include, check_for_redefinition)
4473 (macro_undef): Update.
4474 * objfiles.c (filter_overlapping_sections): Update.
4475 * stabsread.c (invalid_cpp_abbrev_complaint)
4476 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4477 (define_symbol, error_type, read_type, rs6000_builtin_type)
4478 (stabs_method_name_from_physname, read_member_functions)
4479 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4480 (attach_fields_to_type, complain_about_struct_wipeout)
4481 (read_range_type, read_args, common_block_start)
4482 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4484 * mdebugread.c (index_complaint, unknown_ext_complaint)
4485 (basic_type_complaint, bad_tag_guess_complaint)
4486 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4487 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4488 (parse_procedure, parse_lines)
4489 (function_outside_compilation_unit_complaint)
4490 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4491 (bad_tag_guess_complaint, reg_value_complaint): Update.
4492 * cp-support.c (demangled_name_complaint): Update.
4493 * macroscope.c (sal_macro_scope): Update.
4494 * dwarf-index-write.c (class debug_names): Update.
4498 * complaints.c (clear_complaints): Remove "noisy" parameter.
4499 * complaints.h (clear_complaints): Update.
4500 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4501 (reread_symbols): Update.
4505 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4507 (vcomplaint, clear_complaints): Update.
4508 (symfile_explanations): Remove some messages.
4512 * complaints.c (internal_complaint): Remove.
4513 * complaints.h (internal_complaint): Remove.
4517 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4521 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4522 (remote_fileio_badfd, remote_fileio_return_errno)
4523 (remote_fileio_return_success, remote_fileio_func_open)
4524 (remote_fileio_func_open, remote_fileio_func_close)
4525 (remote_fileio_func_read, remote_fileio_func_write)
4526 (remote_fileio_func_lseek, remote_fileio_func_rename)
4527 (remote_fileio_func_unlink, remote_fileio_func_stat)
4528 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4529 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4530 remote_target parameter.
4531 (remote_fio_func_map) <func>: Add remote_target parameter.
4532 (do_remote_fileio_request, remote_fileio_request):
4533 * remote-fileio.h (remote_fileio_request):
4534 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4535 remote_target parameter.
4536 (remote_notif_process, handle_notification): Adjust to pass down
4538 (remote_notif_state_allocate): Add remote_target parameter. Save
4540 * remote-notif.h (struct remote_target): Forward declare.
4541 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4542 remote_target parameter.
4543 (struct remote_notif_state) <remote>: New field.
4544 (remote_notif_ack, remote_notif_parse): Add remote_target
4546 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4547 remote_target parameter.
4548 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4549 (threads_listing_context, rmt_thread_action, protocol_feature)
4550 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4551 (packet_result, struct threads_listing_context, remote_state):
4552 Move definitions and declarations higher up.
4553 (remote_target) <~remote_target>: Declare.
4554 (remote_download_command_source, remote_file_put, remote_file_get)
4555 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4556 (remote_hostio_pread_vFile, remote_hostio_send_command)
4557 (remote_hostio_set_filesystem, remote_hostio_open)
4558 (remote_hostio_close, remote_hostio_unlink, remote_state)
4559 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4560 (get_memory_write_packet_size, get_memory_read_packet_size)
4561 (append_pending_thread_resumptions, remote_detach_1)
4562 (append_resumption, remote_resume_with_vcont)
4563 (add_current_inferior_and_thread, wait_ns, wait_as)
4564 (process_stop_reply, remote_notice_new_inferior)
4565 (process_initial_stop_replies, remote_add_thread)
4566 (btrace_sync_conf, remote_btrace_maybe_reopen)
4567 (remove_new_fork_children, kill_new_fork_children)
4568 (discard_pending_stop_replies, stop_reply_queue_length)
4569 (check_pending_events_prevent_wildcard_vcont)
4570 (discard_pending_stop_replies_in_queue, stop_reply)
4571 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4572 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4573 (remote_interrupt_as, remote_interrupt_ns)
4574 (remote_get_noisy_reply, remote_query_attached)
4575 (remote_add_inferior, remote_current_thread, get_current_thread)
4576 (set_thread, set_general_thread, set_continue_thread)
4577 (set_general_process, write_ptid)
4578 (remote_unpack_thread_info_response, remote_get_threadinfo)
4579 (parse_threadlist_response, remote_get_threadlist)
4580 (remote_threadlist_iterator, remote_get_threads_with_ql)
4581 (remote_get_threads_with_qxfer)
4582 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4583 (get_offsets, remote_check_symbols, remote_supported_packet)
4584 (remote_query_supported, remote_packet_size)
4585 (remote_serial_quit_handler, remote_detach_pid)
4586 (remote_vcont_probe, remote_resume_with_hc)
4587 (send_interrupt_sequence, interrupt_query)
4588 (remote_notif_get_pending_events, fetch_register_using_p)
4589 (send_g_packet, process_g_packet, fetch_registers_using_g)
4590 (store_register_using_P, store_registers_using_G)
4591 (set_remote_traceframe, check_binary_download)
4592 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4593 (remote_xfer_live_readonly_partial, remote_read_bytes)
4594 (remote_send_printf, remote_flash_write, readchar)
4595 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4596 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4597 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4598 (extended_remote_disable_randomization, extended_remote_run)
4599 (send_environment_packet, extended_remote_environment_support)
4600 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4601 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4602 (packet_command): Now methods of ...
4603 (remote_target): ... this class.
4604 (m_remote_state) <remote_target>: New field.
4605 (struct remote_state) <stop_reply_queue,
4606 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4608 (remote_state::remote_state): Allocate stop_reply_queue.
4609 (remote_state): Delete global.
4610 (get_remote_state_raw): Delete.
4611 (remote_target::get_remote_state): Allocate m_remote_state on
4613 (get_current_remote_target): New.
4614 (remote_ops, extended_remote_ops): Delete.
4615 (wait_forever_enabled_p, remote_async_inferior_event_token):
4616 Delete, moved to struct remote_state.
4617 (remote_target::close): Delete self. Destruction bits split to
4619 (remote_target::~remote_target): ... this.
4620 (show_memory_packet_size): Adjust to use
4621 get_current_remote_target.
4622 (struct protocol_feature) <func>: Add remote_target parameter.
4623 All callers adjusted.
4624 (curr_quit_handler_target): New.
4625 (remote_serial_quit_handler): Reimplement.
4626 (remote_target::open_1): Adjust to use get_current_remote_target.
4627 Heap-allocate remote_target/extended_remote_target instances.
4628 (vcont_builder::vcont_builder): Add remote_target parameter, and
4629 save it in m_remote. All callers adjusted.
4630 (vcont_builder::m_remote): New field.
4631 (vcont_builder::restart, vcont_builder::flush)
4632 (vcont_builder::push_action): Use it.
4633 (remote_target::commit_resume): Use it.
4634 (struct queue_iter_param) <remote>: New field.
4635 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4636 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4637 (check_pending_event_prevents_wildcard_vcont_callback)
4638 (remote_target::check_pending_events_prevent_wildcard_vcont)
4639 (remote_target::discard_pending_stop_replies)
4640 (remote_target::discard_pending_stop_replies_in_queue)
4641 (remote_target::remote_notif_remove_queued_reply): Fill in
4643 (remote_notif_get_pending_events): New.
4644 (remote_target::readchar, remote_target::remote_serial_write):
4645 Save/restore curr_quit_handler_target.
4647 (kill_new_fork_children): Fill in 'remote' field.
4648 (packet_command): Use get_current_remote_target, defer to
4649 remote_target method of same name.
4650 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4651 parameter, and save it in m_remote. All callers adjusted.
4652 (scoped_remote_fd::release): Use m_remote.
4653 (scoped_remote_fd::m_remote): New field.
4654 (remote_file_put, remote_file_get, remote_file_delete): Use
4655 get_current_remote_target, defer to remote_target method of same
4657 (remote_btrace_reset): Add remote_state paremeter. Update all
4659 (remote_async_inferior_event_handler). Pass down 'data'.
4660 (remote_new_objfile): Use get_current_remote_target.
4661 (remote_target::vcont_r_supported): New.
4662 (set_range_stepping): Use get_current_remote_target and
4663 remote_target::vcont_r_supported.
4664 (_initialize_remote): Don't allocate 'remote_state' and
4665 'stop_reply_queue' globals.
4666 * remote.h (struct remote_target): Forward declare.
4667 (getpkt, putpkt, remote_notif_get_pending_events): Add
4668 'remote_target' parameter.
4672 * remote.c (vcont_builder): Now a class. Make all data members
4674 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4676 (vcont_builder_restart): Rename to ...
4677 (vcont_builder::restart): ... this.
4678 (vcont_builder_flush): Rename to ...
4679 (vcont_builder::flush): ... this.
4680 (vcont_builder_push_action): Rename to ...
4681 (vcont_builder::push_action): ... this.
4682 (remote_target::commit_resume): Adjust.
4686 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4687 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4688 (get_fixed_memory_packet_size): New.
4689 (get_memory_packet_size): Use it.
4690 (set_memory_packet_size): Don't override the config size with
4691 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4692 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4693 Don't refer to get_memory_packet_size if not connected to a remote
4694 target. Show "(default)" if configured size is 0.
4698 * remote.c (remote_target::mourn_inferior): Move
4699 discard_pending_stop_replies call here from ...
4700 (_initialize_remote): ... here.
4704 * remote.c (compare_section_command): Remove set_general_process
4709 * remote.c (struct packet_reg, struct remote_arch_state):
4710 Move higher up in the file.
4711 (remote_state) <m_arch_states>: Store remote_arch_state values
4712 instead of remote_arch_state pointers.
4713 (remote_state::get_remote_arch_state): Adjust.
4717 * remote.c: Include <unordered_map>.
4718 (remote_state): Now a class.
4719 (remote_state) <get_remote_arch_state>: Declare method.
4720 <get_remote_arch_state>: New field.
4721 (remote_arch_state) <remote_arch_state>: Declare ctor.
4722 <regs>: Now a unique_ptr.
4723 (remote_gdbarch_data_handle): Delete.
4724 (get_remote_arch_state): Delete.
4725 (remote_state::get_remote_arch_state): New.
4726 (get_remote_state): Adjust to call remote_state's
4727 get_remote_arch_state method.
4728 (init_remote_state): Delete, bits factored out to ...
4729 (remote_arch_state::remote_arch_state): ... this new method.
4730 (get_remote_packet_size, get_memory_packet_size)
4731 (process_g_packet, remote_target::fetch_registers)
4732 (remote_target::prepare_to_store, store_registers_using_G)
4733 (remote_target::store_registers, remote_target::get_trace_status):
4734 Adjust to call remote_state's method.
4735 (_initialize_remote): Remove reference to
4736 remote_gdbarch_data_handle.
4740 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4741 pread>: New method declarations.
4742 (remote_target::open_1): Adjust.
4743 (readahead_cache_invalidate): Rename to ...
4744 (readahead_cache::invalidate): ... this, and adjust to be a class
4746 (readahead_cache_invalidate_fd): Rename to ...
4747 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4749 (remote_hostio_pwrite): Adjust.
4750 (remote_hostio_pread_from_cache): Rename to ...
4751 (readahead_cache::pread): ... this, and adjust to be a class
4753 (remote_hostio_close): Adjust.
4757 * remote.c (remote_hostio_close_cleanup): Delete.
4758 (class scoped_remote_fd): New.
4759 (remote_file_put, remote_file_get): Use it.
4763 (struct vCont_action_support): Use bool and initialize all fields.
4764 (struct readahead_cache): Initialize all fields.
4765 (remote_state): Use bool and initialize all fields.
4766 (remote_state::remote_state, remote_state::~remote_state): New.
4767 (new_remote_state): Delete.
4768 (_initialize_remote): Use new to allocate remote_state.
4774 * c-exp.y: Include "c-support.h".
4775 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4776 of tolower. Use c_ident_is_alpha to scan names.
4777 * c-lang.c: Include "c-support.h".
4778 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4779 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4780 * c-support.h: New file, with bits factored out from ...
4781 * cp-name-parser.y: ... this file.
4782 Include "c-support.h".
4783 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4784 c-support.h and renamed.
4785 (symbol_end, yylex): Adjust.
4789 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4790 parameter type to CORE_ADDR.
4791 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4792 parameter type in declaration to CORE_ADDR.
4793 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4794 target_auxv_search to get AT_HWCAP and use the result to get the
4796 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4797 to CORE_ADDR. Remove the cast of the return value to unsigned
4798 long. Fix error predicate of target_auxv_search.
4799 (ppc_linux_nat_target::read_description): Change the type of the
4800 hwcap variable to CORE_ADDR.
4804 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4805 if the size of fpscr is larger than 32 bits.
4809 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4810 (ppc32_linux_vsxregmap): New global.
4811 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4812 regcache_supply_regset, and regcache_collect_regset.
4813 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4814 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4815 (fetch_vsx_register, store_vsx_register): Remove.
4816 (fetch_vsx_registers): Add regno parameter. Get regset using
4817 ppc_linux_vsxregset. Use regset to supply registers.
4818 (store_vsx_registers): Add regno parameter. Get regset using
4819 ppc_linux_vsxregset. Use regset to collect registers.
4820 (fetch_register): Call fetch_vsx_registers instead of
4822 (store_register): Call store_vsx_registers instead of
4824 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4825 new regno parameter.
4826 (store_ppc_registers): Call store_vsx_registers with -1 for the
4827 new regno parameter.
4828 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4829 (ppc_collect_vsxregset): Remove.
4833 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4835 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4836 for vector register offset fields.
4837 (ppc64_fbsd_reg_offsets): Likewise.
4838 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4839 to vector register offset fields.
4840 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4841 to vector register offset fields.
4842 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4843 vector register offset fields.
4844 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4845 initializers for vector register offset fields.
4846 (rs6000_aix64_reg_offsets): Likewise.
4847 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4848 (ppc_supply_vrregset): Remove.
4849 (ppc_collect_vrregset): Remove.
4850 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4851 (ppc_linux_vrregset) : New function.
4852 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4853 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4854 (ppc32_linux_vrregset): Remove.
4855 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4856 and use result instead of ppc32_linux_vrregset.
4857 (ppc32_linux_reg_offsets): Remove initializers for vector register
4859 (ppc64_linux_reg_offsets): Likewise.
4860 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4861 * ppc-linux-nat.c: Include regset.h.
4862 (gdb_vrregset_t): Adjust comment to account for little-endian
4864 (supply_vrregset, fill_vrregset): Remove.
4865 (fetch_altivec_register, store_altivec_register): Remove.
4866 (fetch_altivec_registers): Add regno parameter. Get regset using
4867 ppc_linux_vrregset. Use regset to supply registers.
4868 (store_altivec_registers): Add regno parameter. Get regset using
4869 ppc_linux_vrregset. Use regset to collect registers.
4870 (fetch_register): Call fetch_altivec_registers instead of
4871 fetch_altivec_register.
4872 (store_register): Call store_altivec_registers instead of
4873 store_altivec_register.
4874 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4875 the new regno parameter.
4876 (store_ppc_registers): Call store_altivec_registers with -1 for
4877 the new regno parameter.
4881 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4882 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4883 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4884 (gdb_vrregset_t): Change array type size to
4885 PPC_LINUX_SIZEOF_VRREGSET.
4886 (gdb_vsxregset_t): Change array type size to
4887 PPC_LINUX_SIZEOF_VSXREGSET.
4888 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4889 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4890 PPC_LINUX_SIZEOF_VSXREGSET.
4894 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4895 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4897 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4898 ppc_linux_target_wordsize with tid.
4899 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4901 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4902 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4903 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4904 tid parameter. Remove static specifier.
4905 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4906 (ppc_linux_target_wordsize): New declaration.
4910 * arch/ppc-linux-common.c: New file.
4911 * arch/ppc-linux-common.h: New file.
4912 * arch/ppc-linux-tdesc.h: New file.
4913 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4914 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4915 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4916 arch/ppc-linux-tdesc.h.
4917 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4918 arch/ppc-linux-tdesc.h.
4919 (ppc_linux_nat_target::read_description): Remove target
4920 description matching code. Fill a ppc_linux_features struct and
4921 call ppc_linux_match_description with it. Move comment about ISA
4922 2.05 to ppc-linux-common.c.
4923 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4924 arch/ppc-linux-tdesc.h.
4925 (ppc_linux_core_read_description): Remove target description
4926 matching code. Fill a ppc_linux_features struct and call
4927 ppc_linux_match_description with it.
4928 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4929 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4930 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4931 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4932 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4933 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4934 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4935 (tdesc_powerpc_e500l): Remove.
4939 * ada-lang.c (catch_assert_command): Pass empty string instead
4940 of NULL for excep_string argument.
4944 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4945 the width of the requested register exceeds the width of the
4950 * printcmd.c (output_command): Remove.
4951 (output_command_const): Rename to output_command.
4952 * valprint.h (output_command): Rename from output_command_const.
4953 * tracepoint.c (trace_dump_actions): Call output_command.
4957 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4958 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4959 * ada-lang.h (create_ada_exception_catchpoint): Update.
4960 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4962 (create_excep_cond_exprs, ~ada_catchpoint)
4963 (should_stop_exception, print_one_exception)
4964 (print_mention_exception, print_recreate_exception): Update.
4965 (ada_get_next_arg): Remove.
4966 (catch_ada_exception_command_split): Use std::string. Change type
4967 of "excep_string", "cond_string".
4968 (catch_ada_exception_command): Update.
4969 (create_ada_exception_catchpoint): Change type of excep_string.
4970 (ada_exception_sal): Remove excep_string parameter.
4971 (~ada_catchpoint): Remove.
4975 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4980 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4981 Return unique_xmalloc_ptr.
4982 (print_it_exception): Update.
4986 * tracepoint.c (trace_dump_actions): Use std::string.
4990 * symfile.c (reread_symbols): Use std::string for original_name.
4994 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4995 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5000 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5002 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5003 * objfiles.c (get_objfile_bfd_data): Allocate
5004 objfile_per_bfd_storage with obstack_new when allocating on
5009 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5011 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5012 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5013 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5014 (add_pending): Likewise.
5015 (parse_symbol): Likewise.
5016 (parse_partial_symbols): Likewise.
5017 (psymtab_to_symtab_1): Likewise.
5018 (new_psymtab): Likewise.
5019 (elfmdebug_build_psymtabs): Likewise.
5020 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5021 * objfiles.c (get_objfile_bfd_data): Likewise.
5022 (objfile_register_static_link): Likewise.
5023 * psymtab.c (allocate_psymtab): Likewise.
5024 * stabsread.c (read_member_functions): Likewise.
5025 * xcoffread.c (xcoff_end_psymtab): Likewise.
5029 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5030 compiler supports std::is_trivially_constructible.
5031 * common/poison.h: Include obstack.h.
5032 (IsMallocable): Define to is_trivially_constructible if the
5033 compiler supports it, define to true_type otherwise.
5037 (XOBNEWVEC): Redefine.
5038 * gdb_obstack.h (obstack_zalloc): New.
5039 (OBSTACK_ZALLOC): Redefine.
5040 (obstack_calloc): New.
5041 (OBSTACK_CALLOC): Redefine.
5043 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5044 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5046 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5047 obstack_calloc/obstack_zalloc.
5048 (gdbarch_obstack_zalloc): Remove.
5049 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5053 * stack.c (backtrace_command_1): Remove useless variable int i.
5057 * stack.c (print_frame_info): Fix comment.
5061 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5062 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5063 (~dwarf2_per_objfile): Update
5064 (dwarf2_get_dwz_file): Use new.
5065 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5070 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5072 * dwarf2read.c (struct dwp_file): Add constructor and
5074 (open_and_init_dwp_file): Return a unique_ptr.
5075 (dwarf2_per_objfile, create_dwp_hash_table)
5076 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5077 (lookup_dwo_unit_in_dwp): Update.
5078 (open_and_init_dwp_file, get_dwp_file): Update.
5082 * dwarf2read.c (dwarf2_per_objfile): Update.
5083 (struct mapped_index): Add initializers.
5084 (dwarf2_read_index): Use new.
5085 (dw2_symtab_iter_init): Update.
5086 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5091 * dwarf2read.c (mapped_index) <total_size>: Remove.
5095 * unittests/format_pieces-selftests.c (test_format_specifier):
5100 * c-typeprint.c (maybe_print_hole): New function.
5101 (c_print_type_struct_field_offset): Update.
5102 (c_type_print_base_struct_union): Call maybe_print_hole.
5106 * breakpoint.c (build_bpstat_chain): New function, moved from
5108 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5109 If no stop chain is passed, call build_bpstat_chain to build it.
5110 * breakpoint.h (build_bpstat_chain): Declare.
5111 (bpstat_stop_status): Move documentation here from breakpoint.c.
5112 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5113 build the stop chain and pass it to skip_inline_frames.
5114 Pass this stop chain to bpstat_stop_status.
5115 * inline-frame.c: Include breakpoint.h.
5116 (stopped_by_user_bp_inline_frame): New function.
5117 (skip_inline_frames): Add parameter `stop_chain'.
5118 Move documention to inline-frame.h.
5119 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5120 whether the frame should be elided.
5121 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5122 Add moved documentation and update for new parameter.
5127 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5128 unittests/format_pieces-selftests.c.
5129 * common/format.h (format_piece) <operator==>: New.
5130 (format_pieces) <operator[]>: Remove.
5131 * common/format.c (format_pieces::format_pieces): Handle \e.
5132 * unittests/format_pieces-selftests.c: New.
5137 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5138 (dw2_instantiate_symtab): Add skip_partial parameter.
5139 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5140 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5141 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5142 (dw2_expand_symtabs_matching_one)
5143 (dw2_find_pc_sect_compunit_symtab)
5144 (dw2_debug_names_lookup_symbol)
5145 (dw2_debug_names_expand_symtabs_for_function): Update.
5146 (init_cutu_and_read_dies): Add skip_partial parameter.
5147 (process_psymtab_comp_unit, build_type_psymtabs_1)
5148 (process_skeletonless_type_unit, load_partial_comp_unit)
5149 (psymtab_to_symtab_1): Update.
5150 (load_full_comp_unit): Add skip_partial parameter.
5151 (process_imported_unit_die, dwarf2_read_addr_index)
5152 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5153 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5154 (read_signatured_type): Update.
5158 * value.c (release_value): Remove unused variable.
5159 (record_latest_value): Likewise.
5160 (access_value_history): Likewise.
5161 (preserve_values): Likewise.
5165 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5171 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5172 Also handle registers whose width is not a multiple of
5174 (linux_nat_trad_target::store_register): Likewise.
5178 * gdbcore.h (core_bfd): Redefine.
5179 * corelow.c (core_target::close): Update.
5180 (core_target_open): Update.
5181 * progspace.h (struct program_space) <cbfd>: Now a
5187 * symfile-add-flags.h (enum symfile_add_flags)
5188 <SYMFILE_NOT_FILENAME>: New constant.
5189 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5190 objfile name from BFD.
5191 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5192 * minidebug.c (find_separate_debug_file_in_section): Put
5193 ".gnu_debugdata" into BFD's file name.
5197 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5203 * aarch64-tdep.c (aarch64_analyze_prologue,
5204 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5205 Indicate not interested in errors.
5209 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5210 Supply the MIPS_ZERO_REGNUM register.
5214 * mips-tdep.c (mask_address_var): Make variable static.
5218 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5222 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5223 FXSAVE_ADDR for the mxcsr register.
5227 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5231 * corelow.c (core_target) <core_target>: No longer inline.
5232 Initialize m_core_gdbarch, m_core_vec and build the section table
5234 <~core_target>: New.
5235 <core_gdbarch, get_core_register_section>: New methods.
5236 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5237 factored out from ...
5238 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5240 (sniff_core_bfd): Add gdbarch parameter.
5241 (core_close): Delete, merged into ...
5242 (core_target::close): ... here. Delete self.
5243 (core_close_cleanup): Delete.
5244 (core_target_open): Allocate a core_target on the heap. Use a
5245 unique_ptr instead of a cleanup. Bits moved into the core_target
5246 ctor. Adjust to use core_target methods instead of globals.
5247 (get_core_register_section): Rename to ...
5248 (core_target::get_core_register_section): ... this and adjust.
5249 (struct get_core_registers_cb_data): New.
5250 (get_core_registers_cb): Use it. Use bool.
5251 (core_target::fetch_registers, core_target::files_info)
5252 (core_target::xfer_partial, core_target::read_description)
5253 (core_target::pid_to, core_target::thread_name): Adjust to
5254 reference class fields instead of globals.
5255 * target.h (struct target_ops_deleter, target_ops_up): New.
5259 * corefile.c (core_file_command): Move to corelow.c.
5260 * corelow.c (the_core_target): Delete.
5261 (core_file_command): Moved from corefile.c. Check exec_bfd
5262 instead of the_core_target. Use target_detach instead of calling
5263 into the_core_target directly.
5264 (maybe_say_no_core_file_now): New.
5265 (core_target::detach): Use it.
5266 (_initialize_corelow): Remove references to the_core_target.
5267 * gdbcore.h (the_core_target): Delete.
5272 * corefile.c (core_bfd): Remove.
5273 * gdbcore.h (core_bfd): Now a macro.
5274 * progspace.h (struct program_space) <cbfd>: New field.
5278 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5283 * configure: Rebuild.
5284 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5289 * regformats/regdat.sh: Adjust script, following the addition
5290 of the new expedite_regs parameter to init_target_desc.
5295 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5296 set_gdbarch_significant_addr_bit.
5297 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5298 set_gdbarch_significant_addr_bit.
5299 * utils.c (address_significant): Update to sign extend addr.
5303 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5304 (xtensa_linux_init_abi): Limit tdep->num_regs by
5305 tdep->num_nopriv_regs.
5306 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5307 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5312 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5316 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5317 (I387_MXCSR_INIT_VAL): New constant.
5318 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5319 buffer if it was supplied by the inferior.
5320 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5321 (i387_xsave_get_clear_bv): New function.
5322 (i387_supply_xsave): Only read x87 control registers from the
5323 xsave buffer if the feature is enabled, and the state will have
5324 been written, otherwise, provide a suitable default.
5325 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5326 including x87 control registers. Update control registers if they
5327 have changed from the default value, and mark features as enabled
5329 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5333 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5337 * configure: Rebuild.
5338 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5343 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5344 bit. Use correct value for VDIV.
5348 * configure: Rebuild.
5349 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5353 * linux-record.c (record_linux_system_call) <case
5354 RECORD_SYS_RECVFROM>: Add "break".
5358 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5359 Add missing "break".
5360 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5361 Add missing "break".
5365 * rs6000-tdep.c (ppc_process_record_op4)
5366 (ppc_process_record_op63): Add fall-through comment.
5370 * i386-tdep.c (i386_process_record): Add fall-through comment.
5374 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5379 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5380 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5381 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5383 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5385 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5390 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5394 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5395 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5396 * symfile.c (section_is_mapped): Fix fall-through comment.
5397 * stabsread.c (define_symbol, read_member_functions): Fix
5398 fall-through comment.
5399 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5401 * remote.c (remote_wait_as): Fix fall-through comment.
5402 * p-exp.y (yylex): Fix fall-through comment.
5403 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5405 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5406 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5407 * jv-exp.y (yylex): Fix fall-through comment.
5408 * go-exp.y (lex_one_token): Fix fall-through comment.
5409 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5410 fall-through comment.
5411 * f-exp.y (yylex): Fix fall-through comment.
5412 * dwarf2read.c (process_die): Fix fall-through comments.
5413 * dbxread.c (process_one_symbol): Fix fall-through comment.
5414 * d-exp.y (lex_one_token): Fix fall-through comment.
5415 * cp-name-parser.y (yylex): Fix fall-through comment.
5416 * coffread.c (coff_symtab_read): Fix fall-through comment.
5417 * c-exp.y (lex_one_token): Fix fall-through comment.
5418 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5420 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5426 * NEWS: Mention gdb.execute change.
5427 * gdbcmd.h (execute_control_command): Don't declare.
5428 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5429 execute_control_commands, execute_control_commands_to_string.
5430 * cli/cli-script.h (execute_control_commands)
5431 (execute_control_commands_to_string): Declare.
5432 (execute_control_command): Add from_tty parameter.
5433 * cli/cli-script.c (execute_control_commands)
5434 (execute_control_commands_to_string): New functions.
5435 (execute_user_command): Use execute_control_commands.
5436 (execute_control_command_1): Add "from_tty" parameter. Update.
5437 (execute_control_command): Likewise.
5442 * NEWS: Mention that breakpoint commands are writable.
5443 * python/py-breakpoint.c (bppy_set_commands): New function.
5444 (breakpoint_object_getset) <"commands">: Use it.
5448 * tracepoint.c (actions_command): Update.
5449 * mi/mi-cmd-break.c (mi_command_line_array)
5450 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5451 (mi_read_next_line): Remove.
5452 (mi_cmd_break_commands): Update.
5453 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5455 * cli/cli-script.c (get_command_line): Update.
5456 (process_next_line): Use function_view. Constify.
5457 (recurse_read_control_structure, read_command_lines)
5458 (read_command_lines_1): Change argument types to function_view.
5459 (do_define_command, document_command): Update.
5460 * breakpoint.h (check_tracepoint_command): Don't declare.
5461 * breakpoint.c (check_tracepoint_command): Remove.
5462 (commands_command_1, create_tracepoint_from_upload): Update.
5467 * cli/cli-script.h (enum command_control_type) <define_control>:
5469 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5470 (build_command_line, execute_control_command_1)
5471 (process_next_line): Likewise.
5472 (do_define_command): New function, extracted from define_command.
5473 (define_command): Use it.
5477 * tracepoint.c (actions_command): Update.
5478 * cli/cli-script.h (read_command_lines): Update.
5479 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5480 (MAX_TMPBUF): Remove define.
5481 (define_command): Use string_printf.
5482 (document_command): Likewise.
5483 * breakpoint.c (commands_command_1): Update.
5487 * top.c (execute_command): Update.
5488 * cli/cli-script.h (print_command_lines): Now varargs.
5489 * cli/cli-script.c (print_command_lines): Now varargs.
5490 (execute_control_command_1) <case while_control, case if_control>:
5495 * tracepoint.c (all_tracepoint_actions): Rename from
5496 all_tracepoint_actions_and_cleanup. Change return type.
5497 (actions_command, encode_actions_1, encode_actions)
5498 (trace_dump_actions, tdump_command): Update.
5499 * remote.c (remote_download_command_source): Update.
5500 * python/python.c (gdbpy_eval_from_control_command)
5501 (python_command, python_interactive_command): Update.
5502 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5503 * guile/guile.c (guile_command)
5504 (gdbscm_eval_from_control_command, guile_command): Update.
5505 * compile/compile.c (compile_code_command)
5506 (compile_print_command, compile_to_object): Update.
5507 * cli/cli-script.h (struct command_lines_deleter): New.
5508 (counted_command_line): New typedef.
5509 (struct command_line): Add constructor, destructor.
5510 <body_list>: Remove.
5511 <body_list_0, body_list_1>: New members.
5512 (command_line_up): Remove typedef.
5513 (read_command_lines, read_command_lines_1, get_command_line):
5515 (copy_command_lines): Don't declare.
5516 * cli/cli-script.c (build_command_line): Use "new".
5517 (get_command_line): Return counted_command_line.
5518 (print_command_lines, execute_user_command)
5519 (execute_control_command_1, while_command, if_command): Update.
5520 (realloc_body_list): Remove.
5521 (process_next_line, recurse_read_control_structure): Update.
5522 (read_command_lines, read_command_lines_1): Return counted_command_line.
5523 (free_command_lines): Use "delete".
5524 (copy_command_lines): Remove.
5525 (define_command, document_command, show_user_1): Update.
5526 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5527 a counted_command_line.
5528 * breakpoint.h (counted_command_line): Remove typedef.
5529 (breakpoint_set_commands): Update.
5530 * breakpoint.c (check_no_tracepoint_commands)
5531 (validate_commands_for_breakpoint): Update.
5532 (breakpoint_set_commands): Change commands to be a
5533 counted_command_line.
5534 (commands_command_1, update_dprintf_command_list)
5535 (create_tracepoint_from_upload): Update.
5539 * cli/cli-decode.h (cmd_list_element): New constructor.
5540 (~cmd_list_element): New destructor.
5541 (struct cmd_list_element): Add initializers.
5542 * cli/cli-decode.c (do_add_cmd): Use "new".
5543 (delete_cmd): Use "delete".
5548 PR breakpoints/19806 and support for PR external/20207.
5549 * NEWS: Mention Aarch64 watchpoint improvements.
5550 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5551 watchpoints and PR external/20207 watchpoints.
5552 * nat/aarch64-linux-hw-point.c
5553 (kernel_supports_any_contiguous_range): New.
5554 (aarch64_watchpoint_offset): New.
5555 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5556 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5557 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5558 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5559 next_addr_orig_p. Support PR external/20207 watchpoints.
5560 (aarch64_downgrade_regs): New.
5561 (aarch64_dr_state_insert_one_point): New parameters offset and
5563 (aarch64_dr_state_remove_one_point): Likewise.
5564 (aarch64_handle_breakpoint): Update caller.
5565 (aarch64_handle_aligned_watchpoint): Likewise.
5566 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5568 (aarch64_linux_set_debug_regs): Remove const from state. Call
5569 aarch64_downgrade_regs.
5570 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5571 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5572 (DR_CONTROL_MASK): ... this.
5573 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5574 (unsigned int aarch64_watchpoint_offset): New prototype.
5575 (aarch64_linux_set_debug_regs): Remove const from state.
5576 * utils.c (align_up, align_down): Move to ...
5577 * common/common-utils.c (align_up, align_down): ... here.
5578 * utils.h (align_up, align_down): Move to ...
5579 * common/common-utils.h (align_up, align_down): ... here.
5583 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5584 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5585 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5586 Re-implement to match the ABI as summarized in GCC's
5587 gcc/config/sparc/sparc.c. All callers updated.
5588 (sparc32_store_arguments): Remove assertion.
5592 * printcmd.c: Don't include tui.h.
5593 (decode_format): Use skip_spaces.
5598 * printcmd.c (last_count): New global.
5599 (x_command): Use saved count when repeating.
5603 * nto-procfs.c (do_closedir_cleanup): Remove.
5604 (procfs_pidlist): Use gdb_dir_up.
5605 * procfs.c (do_closedir_cleanup): Remove.
5606 (proc_update_threads): Use gdb_dir_up.
5607 * common/filestuff.h (struct gdb_dir_deleter): New.
5608 (gdb_dir_up): New typedef.
5612 * ada-lang.c (print_mention_exception): Use std::string.
5616 * ada-lang.c (create_excep_cond_exprs): Update.
5617 (ada_exception_catchpoint_cond_string): Use std::string.
5621 * ada-lang.c (xget_renaming_scope): Return std::string.
5622 (old_renaming_is_invisible): Update.
5626 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5627 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5631 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5635 * remote.c (remote_query_supported_append): Change type.
5636 (remote_check_symbols): Update.
5641 * configure.ac: Prepend libpython.
5642 * python/python-config.py: Likewise.
5643 * configure: Regenerate.
5647 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5652 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5653 override. Write 'true' instead of '1'.
5654 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5659 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5660 add_inf_child_target.
5661 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5662 add_inf_child_target.
5663 * aix-thread.c (aix_thread_target_info): New.
5664 (aix_thread_target) <shortname, longname, doc>: Delete.
5666 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5667 add_inf_child_target.
5668 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5669 add_inf_child_target.
5670 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5671 add_inf_child_target.
5672 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5673 add_inf_child_target.
5674 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5675 add_inf_child_target.
5676 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5677 add_inf_child_target.
5678 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5679 add_inf_child_target.
5680 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5681 add_inf_child_target.
5682 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5683 add_inf_child_target.
5684 * bfd-target.c (target_bfd_target_info): New.
5685 (target_bfd) <shortname, longname, doc>: Delete.
5687 * bsd-kvm.c (bsd_kvm_target_info): New.
5688 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5690 (bsd_kvm_target::open): Rename to ...
5691 (bsd_kvm_target_open): ... this. Adjust.
5692 * bsd-uthread.c (bsd_uthread_target_info): New.
5693 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5695 * corefile.c (core_file_command): Adjust.
5696 * corelow.c (core_target_info): New.
5697 (core_target) <shortname, longname, doc>: Delete.
5699 (core_target::open): Rename to ...
5700 (core_target_open): ... this. Adjust.
5701 * ctf.c (ctf_target_info): New.
5702 (ctf_target) <shortname, longname, doc>: Delete.
5704 (ctf_target::open): Rename to ...
5705 (ctf_target_open): ... this.
5706 (_initialize_ctf): Adjust.
5707 * exec.c (exec_target_info): New.
5708 (exec_target) <shortname, longname, doc>: Delete.
5710 (exec_target::open): Rename to ...
5711 (exec_target_open): ... this.
5712 * gdbcore.h (core_target_open): Declare.
5713 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5714 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5715 add_inf_child_target.
5716 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5717 add_inf_child_target.
5718 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5719 add_inf_child_target.
5720 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5721 add_inf_child_target.
5722 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5723 add_inf_child_target.
5724 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5725 add_inf_child_target.
5726 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5727 add_inf_child_target.
5728 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5729 add_inf_child_target.
5730 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5731 add_inf_child_target.
5732 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5733 add_inf_child_target.
5734 * inf-child.c (inf_child_target_info): New.
5735 (inf_child_target::info): New.
5736 (inf_child_open_target): Remove 'target' parameter. Use
5737 get_native_target instead.
5738 (inf_child_target::open): Delete.
5739 (add_inf_child_target): New.
5740 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5743 (add_inf_child_target): Declare.
5744 (inf_child_open_target): Declare.
5745 * linux-thread-db.c (thread_db_target_info): New.
5746 (thread_db_target) <shortname, longname, doc>: Delete.
5748 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5749 add_inf_child_target.
5750 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5751 add_inf_child_target.
5752 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5753 add_inf_child_target.
5754 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5755 add_inf_child_target.
5756 * make-target-delegates (print_class): Adjust.
5757 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5758 add_inf_child_target.
5759 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5760 add_inf_child_target.
5761 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5762 add_inf_child_target.
5763 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5764 add_inf_child_target.
5765 * nto-procfs.c (nto_native_target_info): New.
5766 (nto_procfs_target_native) <shortname, longname, doc>:
5769 (nto_procfs_target_info): New.
5770 (nto_procfs_target_procfs) <shortname, longname, doc>:
5773 (init_procfs_targets): Adjust.
5774 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5775 add_inf_child_target.
5776 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5777 add_inf_child_target.
5778 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5779 add_inf_child_target.
5780 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5781 add_inf_child_target.
5782 * ravenscar-thread.c (ravenscar_target_info): New.
5783 (ravenscar_thread_target) <shortname, longname, doc>:
5786 * record-btrace.c (record_btrace_target_info):
5787 (record_btrace_target) <shortname, longname, doc>: Delete.
5789 (record_btrace_target::open): Rename to ...
5790 (record_btrace_target_open): ... this. Adjust.
5791 * record-full.c (record_longname, record_doc): New.
5792 (record_full_base_target) <shortname, longname, doc>: Delete.
5794 (record_full_target_info): New.
5795 (record_full_target): <shortname>: Delete.
5797 (record_full_core_open_1, record_full_open_1): Update comments.
5798 (record_full_base_target::open): Rename to ...
5799 (record_full_open): ... this.
5800 (cmd_record_full_restore): Update.
5801 (_initialize_record_full): Update.
5802 * remote-sim.c (remote_sim_target_info): New.
5803 (gdbsim_target) <shortname, longname, doc>: Delete.
5805 (gdbsim_target::open): Rename to ...
5806 (gdbsim_target_open): ... this.
5807 (_initialize_remote_sim): Adjust.
5808 * remote.c (remote_doc): New.
5809 (remote_target_info): New.
5810 (remote_target) <shortname, longname, doc>: Delete.
5812 (extended_remote_target_info): New.
5813 (extended_remote_target) <shortname, longname, doc>: Delete.
5815 (remote_target::open_1): Make static. Adjust.
5816 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5817 * s390-linux-nat.c (_initialize_s390_nat): Use
5818 add_inf_child_target.
5819 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5820 add_inf_child_target.
5821 * sol-thread.c (thread_db_target_info): New.
5822 (sol_thread_target) <shortname, longname, doc>: Delete.
5824 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5825 add_inf_child_target.
5826 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5827 add_inf_child_target.
5828 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5829 add_inf_child_target.
5830 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5831 add_inf_child_target.
5832 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5833 add_inf_child_target.
5834 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5835 add_inf_child_target.
5836 * spu-linux-nat.c (_initialize_spu_nat): Use
5837 add_inf_child_target.
5838 * spu-multiarch.c (spu_multiarch_target_info): New.
5839 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5841 * target-delegates.c: Regenerate.
5842 * target.c: Include <unordered_map>.
5843 (target_ops_p): Delete.
5844 (DEF_VEC_P(target_ops_p)): Delete.
5845 (target_factories): New.
5846 (test_target_info): New.
5847 (test_target_ops::info): New.
5848 (open_target): Adjust to use target_factories.
5849 (add_target_with_completer): Rename to ...
5850 (add_target): ... this. Change prototype. Register target_info
5851 and open callback in target_factories. Register target_info in
5852 command context instead of target_ops.
5853 (add_target): Delete old implementation.
5854 (add_deprecated_target_alias): Change prototype. Adjust.
5855 (the_native_target): New.
5856 (set_native_target, get_native_target): New.
5857 (find_default_run_target): Use the_native_target.
5858 (find_attach_target, find_run_target): Simplify.
5859 (target_ops::open): Delete.
5860 (dummy_target_info): New.
5861 (dummy_target::shortname, dummy_target::longname)
5862 (dummy_target::doc): Delete.
5863 (dummy_target::info): New.
5864 (debug_target::shortname, debug_target::longname)
5865 (debug_target::doc): Delete.
5866 (debug_target::info): New.
5867 * target.h (struct target_info): New.
5868 (target_ops::~target_ops): Add comment.
5869 (target_ops::info): New.
5870 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5871 longer virtual. Implement in terms of target_info.
5872 (set_native_target, get_native_target): Declare.
5873 (target_open_ftype): New.
5874 (add_target, add_target_with_completer)
5875 (add_deprecated_target_alias): Change prototype.
5876 (test_target) <shortname, longname, doc>: Delete.
5878 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5879 add_inf_child_target.
5880 * tracefile-tfile.c (tfile_target_info): New.
5881 (tfile_target) <shortname, longname, doc>: Delete.
5883 (tfile_target::open): Rename to ...
5884 (tfile_target_open): ... this.
5885 (_initialize_tracefile_tfile): Adjust.
5886 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5887 add_inf_child_target.
5888 * windows-nat.c (_initialize_windows_nat): Use
5889 add_inf_child_target.
5890 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5891 add_inf_child_target.
5895 * linux-nat.h (linux_nat_target) <low_new_thread,
5896 low_delete_thread, low_new_fork, low_forget_process,
5897 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5898 New virtual methods.
5899 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5900 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5901 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5902 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5903 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5905 * linux-fork.c (delete_fork): Adjust to call low method.
5906 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5907 (linux_nat_new_fork, linux_nat_forget_process_hook)
5908 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5909 (linux_nat_status_is_event):
5910 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5911 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5913 (sigtrap_is_event): Rename to ...
5914 (linux_nat_target::low_status_is_event): ... this.
5915 (linux_nat_set_status_is_event): Delete.
5916 (save_stop_reason, linux_nat_wait_1)
5917 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5919 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5920 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5921 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5922 (linux_nat_set_prepare_to_resume): Delete.
5923 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5924 low virtual methods.
5925 * amd64-linux-nat.c: Likewise.
5926 * arm-linux-nat.c: Likewise.
5927 * i386-linux-nat.c: Likewise.
5928 * ia64-linux-nat.c: Likewise.
5929 * mips-linux-nat.c: Likewise.
5930 * ppc-linux-nat.c: Likewise.
5931 * s390-linux-nat.c: Likewise.
5932 * sparc64-linux-nat.c: Likewise.
5933 * x86-linux-nat.c: Likewise.
5934 * x86-linux-nat.h: Include "nat/x86-linux.h".
5935 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5936 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5941 * target.h (target_ops)
5942 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5943 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5944 stopped_by_watchpoint, have_continuable_watchpoint,
5945 stopped_data_address, watchpoint_addr_within_range,
5946 can_accel_watchpoint_condition, can_run, thread_alive,
5947 has_all_memory, has_memory, has_stack, has_registers,
5948 has_execution, can_async_p, is_async_p, supports_non_stop,
5949 always_non_stop_p, can_execute_reverse, supports_multi_process,
5950 supports_enable_disable_tracepoint,
5951 supports_disable_randomization, supports_string_tracing,
5952 supports_evaluation_of_breakpoint_conditions,
5953 can_run_breakpoint_commands, filesystem_is_local,
5954 can_download_tracepoint, get_trace_state_variable_value,
5955 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5956 record_is_replaying, record_will_replay,
5957 augmented_libraries_svr4_read>: Adjust to return bool.
5958 * aarch64-linux-nat.c: All implementations adjusted.
5959 * aix-thread.c: All implementations adjusted.
5960 * arm-linux-nat.c: All implementations adjusted.
5961 * breakpoint.c: All implementations adjusted.
5962 * bsd-kvm.c: All implementations adjusted.
5963 * bsd-uthread.c: All implementations adjusted.
5964 * corelow.c: All implementations adjusted.
5965 * ctf.c: All implementations adjusted.
5966 * darwin-nat.c: All implementations adjusted.
5967 * darwin-nat.h: All implementations adjusted.
5968 * exec.c: All implementations adjusted.
5969 * fbsd-nat.c: All implementations adjusted.
5970 * fbsd-nat.h: All implementations adjusted.
5971 * gnu-nat.c: All implementations adjusted.
5972 * gnu-nat.h: All implementations adjusted.
5973 * go32-nat.c: All implementations adjusted.
5974 * ia64-linux-nat.c: All implementations adjusted.
5975 * inf-child.c: All implementations adjusted.
5976 * inf-child.h: All implementations adjusted.
5977 * inf-ptrace.c: All implementations adjusted.
5978 * inf-ptrace.h: All implementations adjusted.
5979 * linux-nat.c: All implementations adjusted.
5980 * linux-nat.h: All implementations adjusted.
5981 * mips-linux-nat.c: All implementations adjusted.
5982 * nto-procfs.c: All implementations adjusted.
5983 * ppc-linux-nat.c: All implementations adjusted.
5984 * procfs.c: All implementations adjusted.
5985 * ravenscar-thread.c: All implementations adjusted.
5986 * record-btrace.c: All implementations adjusted.
5987 * record-full.c: All implementations adjusted.
5988 * remote-sim.c: All implementations adjusted.
5989 * remote.c: All implementations adjusted.
5990 * s390-linux-nat.c: All implementations adjusted.
5991 * sol-thread.c: All implementations adjusted.
5992 * spu-multiarch.c: All implementations adjusted.
5993 * target-delegates.c: All implementations adjusted.
5994 * target.c: All implementations adjusted.
5995 * target.h: All implementations adjusted.
5996 * tracefile-tfile.c: All implementations adjusted.
5997 * tracefile.c: All implementations adjusted.
5998 * tracefile.h: All implementations adjusted.
5999 * windows-nat.c: All implementations adjusted.
6000 * x86-linux-nat.h: All implementations adjusted.
6001 * x86-nat.h: All implementations adjusted.
6005 * make-target-delegates (scan_target_h): Don't trim lines here.
6006 Replace sequences of tabs and/or whitespace with a single
6008 (top level, parsing methods): Trim each line before processing it
6014 * target.h (enum strata) <debug_stratum>: New.
6015 (struct target_ops) <all delegation methods>: Replace by C++
6016 virtual methods, and drop "to_" prefix. All references updated
6018 <to_shortname, to_longname, to_doc, to_data,
6019 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6020 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6021 virtual methods. All references updated throughout.
6022 <can_attach, supports_terminal_ours, can_create_inferior,
6023 get_thread_control_capabilities, attach_no_wait>: New
6025 <insert_breakpoint, remove_breakpoint>: Now
6026 TARGET_DEFAULT_NORETURN methods.
6027 <info_proc>: Now returns bool.
6029 (OPS_MAGIC): Delete.
6030 (current_target): Delete. All references replaced by references
6032 (target_stack): ... this. New.
6033 (target_shortname, target_longname): Adjust.
6034 (target_can_run): Now a function declaration.
6035 (default_child_has_all_memory, default_child_has_memory)
6036 (default_child_has_stack, default_child_has_registers)
6037 (default_child_has_execution): Remove target_ops parameter.
6038 (complete_target_initialization): Delete.
6039 (memory_breakpoint_target): New template class.
6040 (test_target_ops): Refactor as a C++ class with virtual methods.
6041 * make-target-delegates (NAME_PART): Tighten.
6042 (POINTER_PART, CP_SYMBOL): New.
6043 (SIMPLE_RETURN_PART): Reimplement.
6044 (VEC_RETURN_PART): Expect less.
6045 (RETURN_PART, VIRTUAL_PART): New.
6046 (METHOD): Adjust to C++ virtual methods.
6047 (scan_target_h): Remove reference to C99.
6048 (dname): Output "target_ops::" prefix.
6049 (write_function_header): Adjust to output a C++ class method.
6050 (write_declaration): New.
6051 (write_delegator): Adjust to output a C++ class method.
6052 (tdname): Output "dummy_target::" prefix.
6053 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6055 (tdefault_names, debug_names): Delete.
6056 (return_types, tdefaults, styles, argtypes_array): New.
6057 (top level): All methods are delegators.
6059 (top level): Print dummy_target and debug_target classes.
6060 * target-delegates.c: Regenerate.
6061 * target-debug.h (target_debug_print_enum_info_proc_what)
6062 (target_debug_print_thread_control_capabilities)
6063 (target_debug_print_thread_info_p): New.
6064 * target.c (dummy_target): Delete.
6065 (the_dummy_target, the_debug_target): New.
6066 (target_stack): Now extern.
6067 (set_targetdebug): Push/unpush debug target.
6068 (default_child_has_all_memory, default_child_has_memory)
6069 (default_child_has_stack, default_child_has_registers)
6070 (default_child_has_execution): Remove target_ops parameter.
6071 (complete_target_initialization): Delete.
6072 (add_target_with_completer): No longer call
6073 complete_target_initialization.
6074 (target_supports_terminal_ours): Use regular delegation.
6075 (update_current_target): Delete.
6076 (push_target): No longer check magic number. Don't call
6077 update_current_target.
6078 (unpush_target): Don't call update_current_target.
6079 (target_is_pushed): No longer check magic number.
6080 (target_require_runnable): Skip for all stratums over
6082 (target_ops::info_proc): New.
6083 (target_info_proc): Use find_target_at and
6084 find_default_run_target.
6085 (target_supports_disable_randomization): Use regular delegation.
6086 (target_get_osdata): Use find_target_at.
6087 (target_ops::open, target_ops::close, target_ops::can_attach)
6088 (target_ops::attach, target_ops::can_create_inferior)
6089 (target_ops::create_inferior, target_ops::can_run)
6090 (target_can_run): New.
6091 (default_fileio_target): Use regular delegation.
6092 (target_ops::fileio_open, target_ops::fileio_pwrite)
6093 (target_ops::fileio_pread, target_ops::fileio_fstat)
6094 (target_ops::fileio_close, target_ops::fileio_unlink)
6095 (target_ops::fileio_readlink): New.
6096 (target_fileio_open_1, target_fileio_unlink)
6097 (target_fileio_readlink): Always call the target method. Handle
6099 (return_zero, return_zero_has_execution): Delete.
6100 (init_dummy_target): Delete.
6101 (dummy_target::dummy_target, dummy_target::shortname)
6102 (dummy_target::longname, dummy_target::doc)
6103 (debug_target::debug_target, debug_target::shortname)
6104 (debug_target::longname, debug_target::doc): New.
6105 (target_supports_delete_record): Use regular delegation.
6106 (setup_target_debug): Delete.
6107 (maintenance_print_target_stack): Skip debug_stratum.
6108 (initialize_targets): Instantiate the_dummy_target and
6110 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6112 (target_auxv_search, fprint_target_auxv): Adjust.
6113 (info_auxv_command): Adjust to use target_stack.
6114 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6115 * exceptions.c (print_flush): Handle a NULL target_stack.
6116 * regcache.c (target_ops_no_register): Refactor as class with
6119 * exec.c (exec_target): New class.
6120 (exec_ops): Now an exec_target.
6121 (exec_open, exec_close_1, exec_get_section_table)
6122 (exec_xfer_partial, exec_files_info, exec_has_memory)
6123 (exec_make_note_section): Refactor as exec_target methods.
6124 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6126 (exec_target::find_memory_regions): New.
6127 (_initialize_exec): Don't call init_exec_ops.
6128 * gdbcore.h (exec_file_clear): Delete.
6130 * corefile.c (core_target): Delete.
6131 (core_file_command): Adjust.
6132 * corelow.c (core_target): New class.
6133 (the_core_target): New.
6134 (core_close): Remove target_ops parameter.
6135 (core_close_cleanup): Adjust.
6136 (core_target::close): New.
6137 (core_open, core_detach, get_core_registers, core_files_info)
6138 (core_xfer_partial, core_thread_alive, core_read_description)
6139 (core_pid_to_str, core_thread_name, core_has_memory)
6140 (core_has_stack, core_has_registers, core_info_proc): Rework as
6141 core_target methods.
6142 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6143 (_initialize_corelow): Initialize the_core_target.
6144 * gdbcore.h (core_target): Delete.
6145 (the_core_target): New.
6147 * ctf.c: (ctf_target): New class.
6148 (ctf_ops): Now a ctf_target.
6149 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6150 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6151 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6153 (init_ctf_ops): Delete.
6154 (_initialize_ctf): Don't call it.
6155 * tracefile-tfile.c (tfile_target): New class.
6156 (tfile_ops): Now a tfile_target.
6157 (tfile_open, tfile_close, tfile_files_info)
6158 (tfile_get_tracepoint_status, tfile_trace_find)
6159 (tfile_fetch_registers, tfile_xfer_partial)
6160 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6161 Refactor as tfile_target methods.
6162 (tfile_xfer_partial_features): Remove target_ops parameter.
6163 (init_tfile_ops): Delete.
6164 (_initialize_tracefile_tfile): Don't call it.
6165 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6166 (tracefile_has_stack, tracefile_has_registers)
6167 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6168 tracefile_target methods.
6169 (init_tracefile_ops): Delete.
6170 (tracefile_target::tracefile_target): New.
6171 * tracefile.h: Include "target.h".
6172 (tracefile_target): New class.
6173 (init_tracefile_ops): Delete.
6175 * spu-multiarch.c (spu_multiarch_target): New class.
6176 (spu_ops): Now a spu_multiarch_target.
6177 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6178 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6179 (spu_search_memory, spu_mourn_inferior): Refactor as
6180 spu_multiarch_target methods.
6181 (init_spu_ops): Delete.
6182 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6183 complete_target_initialization.
6185 * ravenscar-thread.c (ravenscar_thread_target): New class.
6186 (ravenscar_ops): Now a ravenscar_thread_target.
6187 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6188 (ravenscar_thread_alive, ravenscar_pid_to_str)
6189 (ravenscar_fetch_registers, ravenscar_store_registers)
6190 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6191 (ravenscar_stopped_by_hw_breakpoint)
6192 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6193 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6194 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6196 (init_ravenscar_thread_ops): Delete.
6197 (_initialize_ravenscar): Remove references to
6198 init_ravenscar_thread_ops and complete_target_initialization.
6200 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6201 (bsd_uthread_target): New class.
6202 (bsd_uthread_ops): Now a bsd_uthread_target.
6203 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6204 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6205 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6206 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6207 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6208 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6209 (bsd_uthread_target): Delete function.
6210 (_initialize_bsd_uthread): Remove reference to
6211 complete_target_initialization.
6213 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6214 (target_bfd): ... this new class.
6215 (target_bfd_xfer_partial, target_bfd_get_section_table)
6216 (target_bfd_close): Refactor as target_bfd methods.
6217 (target_bfd::~target_bfd): New.
6218 (target_bfd_reopen): Adjust.
6219 (target_bfd::close): New.
6221 * record-btrace.c (record_btrace_target): New class.
6222 (record_btrace_ops): Now a record_btrace_target.
6223 (record_btrace_open, record_btrace_stop_recording)
6224 (record_btrace_disconnect, record_btrace_close)
6225 (record_btrace_async, record_btrace_info)
6226 (record_btrace_insn_history, record_btrace_insn_history_range)
6227 (record_btrace_insn_history_from, record_btrace_call_history)
6228 (record_btrace_call_history_range)
6229 (record_btrace_call_history_from, record_btrace_record_method)
6230 (record_btrace_is_replaying, record_btrace_will_replay)
6231 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6232 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6233 (record_btrace_store_registers, record_btrace_prepare_to_store)
6234 (record_btrace_to_get_unwinder)
6235 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6236 (record_btrace_commit_resume, record_btrace_wait)
6237 (record_btrace_stop, record_btrace_can_execute_reverse)
6238 (record_btrace_stopped_by_sw_breakpoint)
6239 (record_btrace_supports_stopped_by_sw_breakpoint)
6240 (record_btrace_stopped_by_hw_breakpoint)
6241 (record_btrace_supports_stopped_by_hw_breakpoint)
6242 (record_btrace_update_thread_list, record_btrace_thread_alive)
6243 (record_btrace_goto_begin, record_btrace_goto_end)
6244 (record_btrace_goto, record_btrace_stop_replaying_all)
6245 (record_btrace_execution_direction)
6246 (record_btrace_prepare_to_generate_core)
6247 (record_btrace_done_generating_core): Refactor as
6248 record_btrace_target methods.
6249 (init_record_btrace_ops): Delete.
6250 (_initialize_record_btrace): Remove reference to
6251 init_record_btrace_ops.
6252 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6253 the execution_direction global.
6254 (record_full_base_target, record_full_target)
6255 (record_full_core_target): New classes.
6256 (record_full_ops): Now a record_full_target.
6257 (record_full_core_ops): Now a record_full_core_target.
6258 (record_full_target::detach, record_full_target::disconnect)
6259 (record_full_core_target::disconnect)
6260 (record_full_target::mourn_inferior, record_full_target::kill):
6262 (record_full_open, record_full_close, record_full_async): Refactor
6263 as methods of the record_full_base_target class.
6264 (record_full_resume, record_full_commit_resume): Refactor
6265 as methods of the record_full_target class.
6266 (record_full_wait, record_full_stopped_by_watchpoint)
6267 (record_full_stopped_data_address)
6268 (record_full_stopped_by_sw_breakpoint)
6269 (record_full_supports_stopped_by_sw_breakpoint)
6270 (record_full_stopped_by_hw_breakpoint)
6271 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6272 methods of the record_full_base_target class.
6273 (record_full_store_registers, record_full_xfer_partial)
6274 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6275 Refactor as methods of the record_full_target class.
6276 (record_full_can_execute_reverse, record_full_get_bookmark)
6277 (record_full_goto_bookmark, record_full_execution_direction)
6278 (record_full_record_method, record_full_info, record_full_delete)
6279 (record_full_is_replaying, record_full_will_replay)
6280 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6281 (record_full_stop_replaying): Refactor as methods of the
6282 record_full_base_target class.
6283 (record_full_core_resume, record_full_core_kill)
6284 (record_full_core_fetch_registers)
6285 (record_full_core_prepare_to_store)
6286 (record_full_core_store_registers, record_full_core_xfer_partial)
6287 (record_full_core_insert_breakpoint)
6288 (record_full_core_remove_breakpoint)
6289 (record_full_core_has_execution): Refactor
6290 as methods of the record_full_core_target class.
6291 (record_full_base_target::supports_delete_record): New.
6292 (init_record_full_ops): Delete.
6293 (init_record_full_core_ops): Delete.
6294 (record_full_save): Refactor as method of the
6295 record_full_base_target class.
6296 (_initialize_record_full): Remove references to
6297 init_record_full_ops and init_record_full_core_ops.
6299 * remote.c (remote_target, extended_remote_target): New classes.
6300 (remote_ops): Now a remote_target.
6301 (extended_remote_ops): Now an extended_remote_target.
6302 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6303 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6304 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6305 (remote_pass_signals, remote_set_syscall_catchpoint)
6306 (remote_program_signals, )
6307 (remote_thread_always_alive): Remove target_ops parameter.
6308 (remote_thread_alive, remote_thread_name)
6309 (remote_update_thread_list, remote_threads_extra_info)
6310 (remote_static_tracepoint_marker_at)
6311 (remote_static_tracepoint_markers_by_strid)
6312 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6313 (remote_open): Refactor as methods of remote_target.
6314 (extended_remote_open, extended_remote_detach)
6315 (extended_remote_attach, extended_remote_post_attach):
6316 (extended_remote_supports_disable_randomization)
6317 (extended_remote_create_inferior): : Refactor as method of
6318 extended_remote_target.
6319 (remote_set_permissions, remote_open_1, remote_detach)
6320 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6321 (remote_resume, remote_commit_resume, remote_stop)
6322 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6323 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6324 (remote_prepare_to_store, remote_store_registers)
6325 (remote_flash_erase, remote_flash_done, remote_files_info)
6326 (remote_kill, remote_mourn, remote_insert_breakpoint)
6327 (remote_remove_breakpoint, remote_insert_watchpoint)
6328 (remote_watchpoint_addr_within_range)
6329 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6330 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6331 (remote_supports_stopped_by_sw_breakpoint)
6332 (remote_stopped_by_hw_breakpoint)
6333 (remote_supports_stopped_by_hw_breakpoint)
6334 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6335 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6336 (remote_verify_memory): Refactor as methods of remote_target.
6337 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6339 (remote_xfer_partial, remote_get_memory_xfer_limit)
6340 (remote_search_memory, remote_rcmd, remote_memory_map)
6341 (remote_pid_to_str, remote_get_thread_local_address)
6342 (remote_get_tib_address, remote_read_description): Refactor as
6343 methods of remote_target.
6344 (remote_target::fileio_open, remote_target::fileio_pwrite)
6345 (remote_target::fileio_pread, remote_target::fileio_close): New.
6346 (remote_hostio_readlink, remote_hostio_fstat)
6347 (remote_filesystem_is_local, remote_can_execute_reverse)
6348 (remote_supports_non_stop, remote_supports_disable_randomization)
6349 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6350 (remote_supports_enable_disable_tracepoint)
6351 (remote_supports_string_tracing)
6352 (remote_can_run_breakpoint_commands, remote_trace_init)
6353 (remote_download_tracepoint, remote_can_download_tracepoint)
6354 (remote_download_trace_state_variable, remote_enable_tracepoint)
6355 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6356 (remote_trace_start, remote_get_trace_status)
6357 (remote_get_tracepoint_status, remote_trace_stop)
6358 (remote_trace_find, remote_get_trace_state_variable_value)
6359 (remote_save_trace_data, remote_get_raw_trace_data)
6360 (remote_set_disconnected_tracing, remote_core_of_thread)
6361 (remote_set_circular_trace_buffer, remote_traceframe_info)
6362 (remote_get_min_fast_tracepoint_insn_len)
6363 (remote_set_trace_buffer_size, remote_set_trace_notes)
6364 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6365 (remote_disable_btrace, remote_teardown_btrace)
6366 (remote_read_btrace, remote_btrace_conf)
6367 (remote_augmented_libraries_svr4_read, remote_load)
6368 (remote_pid_to_exec_file, remote_can_do_single_step)
6369 (remote_execution_direction, remote_thread_handle_to_thread_info):
6370 Refactor as methods of remote_target.
6371 (init_remote_ops, init_extended_remote_ops): Delete.
6372 (remote_can_async_p, remote_is_async_p, remote_async)
6373 (remote_thread_events, remote_upload_tracepoints)
6374 (remote_upload_trace_state_variables): Refactor as methods of
6376 (_initialize_remote): Remove references to init_remote_ops and
6377 init_extended_remote_ops.
6379 * remote-sim.c (gdbsim_target): New class.
6380 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6381 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6382 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6383 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6384 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6385 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6386 Refactor as methods of gdbsim_target.
6387 (gdbsim_ops): Now a gdbsim_target.
6388 (init_gdbsim_ops): Delete.
6389 (gdbsim_cntrl_c): Adjust.
6390 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6392 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6393 (the_amd64_linux_nat_target): New.
6394 (amd64_linux_fetch_inferior_registers)
6395 (amd64_linux_store_inferior_registers): Refactor as methods of
6396 amd64_linux_nat_target.
6397 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6398 * i386-linux-nat.c: Don't include "linux-nat.h".
6399 (i386_linux_nat_target): New class.
6400 (the_i386_linux_nat_target): New.
6401 (i386_linux_fetch_inferior_registers)
6402 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6403 as methods of i386_linux_nat_target.
6404 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6405 * inf-child.c (inf_child_ops): Delete.
6406 (inf_child_fetch_inferior_registers)
6407 (inf_child_store_inferior_registers): Delete.
6408 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6409 methods of inf_child_target.
6410 (inf_child_target::supports_terminal_ours)
6411 (inf_child_target::terminal_init)
6412 (inf_child_target::terminal_inferior)
6413 (inf_child_target::terminal_ours_for_output)
6414 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6415 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6417 (inf_child_open, inf_child_disconnect, inf_child_close)
6418 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6419 (inf_child_post_startup_inferior, inf_child_can_run)
6420 (inf_child_pid_to_exec_file): Refactor as methods of
6422 (inf_child_follow_fork): Delete.
6423 (inf_child_target::can_create_inferior)
6424 (inf_child_target::can_attach): New.
6425 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6426 (inf_child_target::has_stack, inf_child_target::has_registers)
6427 (inf_child_target::has_execution): New.
6428 (inf_child_fileio_open, inf_child_fileio_pwrite)
6429 (inf_child_fileio_pread, inf_child_fileio_fstat)
6430 (inf_child_fileio_close, inf_child_fileio_unlink)
6431 (inf_child_fileio_readlink, inf_child_use_agent)
6432 (inf_child_can_use_agent): Refactor as methods of
6434 (return_zero, inf_child_target): Delete.
6435 (inf_child_target::inf_child_target): New.
6436 * inf-child.h: Include "target.h".
6437 (inf_child_target): Delete function prototype.
6438 (inf_child_target): New class.
6439 (inf_child_open_target, inf_child_mourn_inferior)
6440 (inf_child_maybe_unpush_target): Delete.
6441 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6442 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6443 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6444 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6445 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6446 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6447 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6448 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6449 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6450 methods of inf_ptrace_target.
6451 (inf_ptrace_target): Delete function.
6452 * inf-ptrace.h: Include "inf-child.h".
6453 (inf_ptrace_target): Delete function declaration.
6454 (inf_ptrace_target): New class.
6455 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6456 * linux-nat.c (linux_target): New.
6457 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6458 (linux_nat_target::~linux_nat_target): New.
6459 (linux_child_post_attach, linux_child_post_startup_inferior)
6460 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6461 (linux_child_remove_fork_catchpoint)
6462 (linux_child_insert_vfork_catchpoint)
6463 (linux_child_remove_vfork_catchpoint)
6464 (linux_child_insert_exec_catchpoint)
6465 (linux_child_remove_exec_catchpoint)
6466 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6467 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6468 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6469 (linux_nat_stopped_data_address)
6470 (linux_nat_stopped_by_sw_breakpoint)
6471 (linux_nat_supports_stopped_by_sw_breakpoint)
6472 (linux_nat_stopped_by_hw_breakpoint)
6473 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6474 (linux_nat_kill, linux_nat_mourn_inferior)
6475 (linux_nat_xfer_partial, linux_nat_thread_alive)
6476 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6477 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6478 (linux_child_static_tracepoint_markers_by_strid)
6479 (linux_nat_is_async_p, linux_nat_can_async_p)
6480 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6481 (linux_nat_supports_multi_process)
6482 (linux_nat_supports_disable_randomization, linux_nat_async)
6483 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6484 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6485 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6486 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6487 methods of linux_nat_target.
6488 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6489 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6491 (check_stopped_by_watchpoint): Adjust.
6492 (linux_xfer_partial): Delete.
6493 (linux_target_install_ops, linux_target, linux_nat_add_target):
6495 (linux_nat_target::linux_nat_target): New.
6496 * linux-nat.h: Include "inf-ptrace.h".
6497 (linux_nat_target): New.
6498 (linux_target, linux_target_install_ops, linux_nat_add_target):
6499 Delete function declarations.
6500 (linux_target): Declare global.
6501 * linux-thread-db.c (thread_db_target): New.
6502 (thread_db_target::thread_db_target): New.
6503 (thread_db_ops): Delete.
6504 (the_thread_db_target): New.
6505 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6506 (thread_db_update_thread_list, thread_db_pid_to_str)
6507 (thread_db_extra_thread_info)
6508 (thread_db_thread_handle_to_thread_info)
6509 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6510 (thread_db_resume): Refactor as methods of thread_db_target.
6511 (init_thread_db_ops): Delete.
6512 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6513 * x86-linux-nat.c: Don't include "linux-nat.h".
6514 (super_post_startup_inferior): Delete.
6515 (x86_linux_nat_target::~x86_linux_nat_target): New.
6516 (x86_linux_child_post_startup_inferior)
6517 (x86_linux_read_description, x86_linux_enable_btrace)
6518 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6519 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6520 methods of x86_linux_nat_target.
6521 (x86_linux_create_target): Delete. Bits folded ...
6522 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6524 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6525 (x86_linux_nat_target): New class.
6526 (x86_linux_create_target): Delete.
6527 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6528 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6529 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6530 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6531 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6532 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6534 (x86_use_watchpoints): Delete.
6535 * x86-nat.h: Include "breakpoint.h" and "target.h".
6536 (x86_use_watchpoints): Delete.
6537 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6538 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6539 (x86_insert_watchpoint, x86_remove_watchpoint)
6540 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6541 (x86_stopped_by_hw_breakpoint): New declarations.
6542 (x86_nat_target): New template class.
6544 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6545 (the_ppc_linux_nat_target): New.
6546 (ppc_linux_fetch_inferior_registers)
6547 (ppc_linux_can_use_hw_breakpoint)
6548 (ppc_linux_region_ok_for_hw_watchpoint)
6549 (ppc_linux_ranged_break_num_registers)
6550 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6551 (ppc_linux_insert_mask_watchpoint)
6552 (ppc_linux_remove_mask_watchpoint)
6553 (ppc_linux_can_accel_watchpoint_condition)
6554 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6555 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6556 (ppc_linux_watchpoint_addr_within_range)
6557 (ppc_linux_masked_watch_num_registers)
6558 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6559 (ppc_linux_read_description): Refactor as methods of
6560 ppc_linux_nat_target.
6561 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6563 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6564 (procfs_target): New class.
6565 (the_procfs_target): New.
6566 (procfs_target): Delete function.
6567 (procfs_auxv_parse, procfs_attach, procfs_detach)
6568 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6569 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6570 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6571 (procfs_create_inferior, procfs_update_thread_list)
6572 (procfs_thread_alive, procfs_pid_to_str)
6573 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6574 (procfs_stopped_data_address, procfs_insert_watchpoint)
6575 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6576 (proc_find_memory_regions, procfs_info_proc)
6577 (procfs_make_note_section): Refactor as methods of procfs_target.
6578 (_initialize_procfs): Adjust.
6579 * sol-thread.c (sol_thread_target): New class.
6580 (sol_thread_ops): Now a sol_thread_target.
6581 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6582 (sol_thread_fetch_registers, sol_thread_store_registers)
6583 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6584 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6585 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6586 (init_sol_thread_ops): Delete.
6587 (_initialize_sol_thread): Adjust. Remove references to
6588 init_sol_thread_ops and complete_target_initialization.
6590 * windows-nat.c (windows_nat_target): New class.
6591 (windows_fetch_inferior_registers)
6592 (windows_store_inferior_registers, windows_resume, windows_wait)
6593 (windows_attach, windows_detach, windows_pid_to_exec_file)
6594 (windows_files_info, windows_create_inferior)
6595 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6596 (windows_close, windows_pid_to_str, windows_xfer_partial)
6597 (windows_get_tib_address, windows_get_ada_task_ptid)
6598 (windows_thread_name, windows_thread_alive): Refactor as
6599 windows_nat_target methods.
6600 (do_initial_windows_stuff): Adjust.
6601 (windows_target): Delete function.
6602 (_initialize_windows_nat): Adjust.
6604 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6605 (darwin_mourn_inferior, darwin_kill_inferior)
6606 (darwin_create_inferior, darwin_attach, darwin_detach)
6607 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6608 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6609 (darwin_supports_multi_process): Refactor as darwin_nat_target
6611 (darwin_resume_to, darwin_files_info): Delete.
6612 (_initialize_darwin_inferior): Rename to ...
6613 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6614 * darwin-nat.h: Include "inf-child.h".
6615 (darwin_nat_target): New class.
6616 (darwin_complete_target): Delete.
6617 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6618 (darwin_target): New.
6619 (i386_darwin_fetch_inferior_registers)
6620 (i386_darwin_store_inferior_registers): Refactor as methods of
6622 (darwin_complete_target): Delete, with ...
6623 (_initialize_i386_darwin_nat): ... bits factored out here.
6625 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6626 (the_alpha_linux_nat_target): New.
6627 (alpha_linux_register_u_offset): Refactor as
6628 alpha_linux_nat_target method.
6629 (_initialize_alpha_linux_nat): Adjust.
6630 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6631 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6632 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6633 methods of linux_nat_trad_target.
6634 (linux_trad_target): Delete.
6635 * linux-nat-trad.h (linux_trad_target): Delete function.
6636 (linux_nat_trad_target): New class.
6637 * mips-linux-nat.c (mips_linux_nat_target): New class.
6638 (super_fetch_registers, super_store_registers, super_close):
6640 (the_mips_linux_nat_target): New.
6641 (mips64_linux_regsets_fetch_registers)
6642 (mips64_linux_regsets_store_registers)
6643 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6644 (mips_linux_register_u_offset, mips_linux_read_description)
6645 (mips_linux_can_use_hw_breakpoint)
6646 (mips_linux_stopped_by_watchpoint)
6647 (mips_linux_stopped_data_address)
6648 (mips_linux_region_ok_for_hw_watchpoint)
6649 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6650 (mips_linux_close): Refactor as methods of mips_linux_nat.
6651 (_initialize_mips_linux_nat): Adjust to C++ification.
6653 * aix-thread.c (aix_thread_target): New class.
6654 (aix_thread_ops): Now an aix_thread_target.
6655 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6656 (aix_thread_fetch_registers, aix_thread_store_registers)
6657 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6658 (aix_thread_thread_alive, aix_thread_pid_to_str)
6659 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6660 Refactor as methods of aix_thread_target.
6661 (init_aix_thread_ops): Delete.
6662 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6663 and complete_target_initialization.
6664 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6665 (rs6000_nat_target): New class.
6666 (the_rs6000_nat_target): New.
6667 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6668 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6669 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6670 (super_create_inferior): Delete.
6671 (_initialize_rs6000_nat): Adjust to C++ification.
6673 * arm-linux-nat.c (arm_linux_nat_target): New class.
6674 (the_arm_linux_nat_target): New.
6675 (arm_linux_fetch_inferior_registers)
6676 (arm_linux_store_inferior_registers, arm_linux_read_description)
6677 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6678 (arm_linux_remove_hw_breakpoint)
6679 (arm_linux_region_ok_for_hw_watchpoint)
6680 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6681 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6682 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6683 arm_linux_nat_target.
6684 (_initialize_arm_linux_nat): Adjust to C++ification.
6686 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6687 (the_aarch64_linux_nat_target): New.
6688 (aarch64_linux_fetch_inferior_registers)
6689 (aarch64_linux_store_inferior_registers)
6690 (aarch64_linux_child_post_startup_inferior)
6691 (aarch64_linux_read_description)
6692 (aarch64_linux_can_use_hw_breakpoint)
6693 (aarch64_linux_insert_hw_breakpoint)
6694 (aarch64_linux_remove_hw_breakpoint)
6695 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6696 (aarch64_linux_region_ok_for_hw_watchpoint)
6697 (aarch64_linux_stopped_data_address)
6698 (aarch64_linux_stopped_by_watchpoint)
6699 (aarch64_linux_watchpoint_addr_within_range)
6700 (aarch64_linux_can_do_single_step): Refactor as methods of
6701 aarch64_linux_nat_target.
6702 (super_post_startup_inferior): Delete.
6703 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6705 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6706 (the_hppa_linux_nat_target): New.
6707 (hppa_linux_fetch_inferior_registers)
6708 (hppa_linux_store_inferior_registers): Refactor as methods of
6709 hppa_linux_nat_target.
6710 (_initialize_hppa_linux_nat): Adjust to C++ification.
6712 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6713 (the_ia64_linux_nat_target): New.
6714 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6715 (ia64_linux_stopped_data_address)
6716 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6717 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6718 ia64_linux_nat_target methods.
6719 (super_xfer_partial): Delete.
6720 (_initialize_ia64_linux_nat): Adjust to C++ification.
6722 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6723 (the_m32r_linux_nat_target): New.
6724 (m32r_linux_fetch_inferior_registers)
6725 (m32r_linux_store_inferior_registers): Refactor as
6726 m32r_linux_nat_target methods.
6727 (_initialize_m32r_linux_nat): Adjust to C++ification.
6729 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6730 (the_m68k_linux_nat_target): New.
6731 (m68k_linux_fetch_inferior_registers)
6732 (m68k_linux_store_inferior_registers): Refactor as
6733 m68k_linux_nat_target methods.
6734 (_initialize_m68k_linux_nat): Adjust to C++ification.
6736 * s390-linux-nat.c (s390_linux_nat_target): New class.
6737 (the_s390_linux_nat_target): New.
6738 (s390_linux_fetch_inferior_registers)
6739 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6740 (s390_insert_watchpoint, s390_remove_watchpoint)
6741 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6742 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6743 (s390_auxv_parse, s390_read_description): Refactor as methods of
6744 s390_linux_nat_target.
6745 (_initialize_s390_nat): Adjust to C++ification.
6747 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6748 (the_sparc_linux_nat_target): New.
6749 (_initialize_sparc_linux_nat): Adjust to C++ification.
6750 * sparc-nat.c (sparc_fetch_inferior_registers)
6751 (sparc_store_inferior_registers): Remove target_ops parameter.
6752 * sparc-nat.h (sparc_fetch_inferior_registers)
6753 (sparc_store_inferior_registers): Remove target_ops parameter.
6754 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6755 (the_sparc64_linux_nat_target): New.
6756 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6758 * spu-linux-nat.c (spu_linux_nat_target): New class.
6759 (the_spu_linux_nat_target): New.
6760 (spu_child_post_startup_inferior, spu_child_post_attach)
6761 (spu_child_wait, spu_fetch_inferior_registers)
6762 (spu_store_inferior_registers, spu_xfer_partial)
6763 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6765 (_initialize_spu_nat): Adjust to C++ification.
6767 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6768 (the_tilegx_linux_nat_target): New.
6769 (fetch_inferior_registers, store_inferior_registers):
6770 Refactor as methods.
6771 (_initialize_tile_linux_nat): Adjust to C++ification.
6773 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6774 (the_xtensa_linux_nat_target): New.
6775 (xtensa_linux_fetch_inferior_registers)
6776 (xtensa_linux_store_inferior_registers): Refactor as
6777 xtensa_linux_nat_target methods.
6778 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6780 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6781 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6782 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6783 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6784 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6785 (fbsd_stopped_by_sw_breakpoint)
6786 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6787 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6788 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6789 (fbsd_post_startup_inferior, fbsd_post_attach)
6790 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6791 (fbsd_set_syscall_catchpoint)
6792 (super_xfer_partial, super_resume, super_wait)
6793 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6794 (fbsd_handle_debug_trap): Remove target_ops parameter.
6795 (fbsd_nat_add_target): Delete.
6796 * fbsd-nat.h: Include "inf-ptrace.h".
6797 (fbsd_nat_add_target): Delete.
6798 (USE_SIGTRAP_SIGINFO): Define.
6799 (fbsd_nat_target): New class.
6801 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6802 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6803 (amd64bsd_target): Delete.
6804 * amd64-bsd-nat.h: New file.
6805 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6807 (amd64_fbsd_nat_target): New class.
6808 (the_amd64_fbsd_nat_target): New.
6809 (amd64fbsd_read_description): Refactor as method of
6810 amd64_fbsd_nat_target.
6811 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6812 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6813 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6814 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6815 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6816 (i386bsd_target): Delete.
6817 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6818 (i386bsd_fetch_inferior_registers)
6819 (i386bsd_store_inferior_registers): Declare.
6820 (i386_bsd_nat_target): New class.
6821 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6822 (the_i386_fbsd_nat_target): New.
6823 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6824 i386_fbsd_nat_target methods.
6825 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6826 (_initialize_i386fbsd_nat): Adjust to C++ification.
6827 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6828 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6829 (_initialize_x86_bsd_nat): Adjust to C++ification.
6830 * x86-bsd-nat.h: Include "x86-nat.h".
6831 (x86bsd_target): Delete declaration.
6832 (x86bsd_nat_target): New class.
6834 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6835 (the_aarch64_fbsd_nat_target): New.
6836 (aarch64_fbsd_fetch_inferior_registers)
6837 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6838 aarch64_fbsd_nat_target.
6839 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6840 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6841 (the_alpha_bsd_nat_target): New.
6842 (alphabsd_fetch_inferior_registers)
6843 (alphabsd_store_inferior_registers): Refactor as
6844 alpha_bsd_nat_target methods.
6845 (_initialize_alphabsd_nat): Refactor as methods of
6846 alpha_bsd_nat_target.
6847 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6848 (the_amd64_nbsd_nat_target): New.
6849 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6850 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6851 (the_amd64_obsd_nat_target): New.
6852 (_initialize_amd64obsd_nat): Adjust to C++ification.
6853 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6854 (the_arm_fbsd_nat_target): New.
6855 (arm_fbsd_fetch_inferior_registers)
6856 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6857 (_initialize_arm_fbsd_nat): Refactor as methods of
6858 arm_fbsd_nat_target.
6859 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6860 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6861 (the_arm_netbsd_nat_target): New.
6862 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6863 arm_netbsd_nat_target.
6864 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6865 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6866 (the_hppa_nbsd_nat_target): New.
6867 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6868 hppa_nbsd_nat_target methods.
6869 (_initialize_hppanbsd_nat): Adjust to C++ification.
6870 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6871 (the_hppa_obsd_nat_target): New.
6872 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6873 methods of hppa_obsd_nat_target.
6874 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6876 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6877 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6879 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6880 (_initialize_i386obsd_nat): Use add_target.
6881 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6882 (the_m68k_bsd_nat_target): New.
6883 (m68kbsd_fetch_inferior_registers)
6884 (m68kbsd_store_inferior_registers): Refactor as methods of
6885 m68k_bsd_nat_target.
6886 (_initialize_m68kbsd_nat): Adjust to C++ification.
6887 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6888 (the_mips_fbsd_nat_target): New.
6889 (mips_fbsd_fetch_inferior_registers)
6890 (mips_fbsd_store_inferior_registers): Refactor as methods of
6891 mips_fbsd_nat_target.
6892 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6894 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6895 (the_mips_nbsd_nat_target): New.
6896 (mipsnbsd_fetch_inferior_registers)
6897 (mipsnbsd_store_inferior_registers): Refactor as methods of
6898 mips_nbsd_nat_target.
6899 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6900 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6901 (the_mips64_obsd_nat_target): New.
6902 (mips64obsd_fetch_inferior_registers)
6903 (mips64obsd_store_inferior_registers): Refactor as methods of
6904 mips64_obsd_nat_target.
6905 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6907 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6909 * nbsd-nat.h: Include "inf-ptrace.h".
6910 (nbsd_nat_target): New class.
6911 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6912 (obsd_wait): Refactor as methods of obsd_nat_target.
6913 (obsd_add_target): Delete.
6914 * obsd-nat.h: Include "inf-ptrace.h".
6915 (obsd_nat_target): New class.
6916 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6917 (the_ppc_fbsd_nat_target): New.
6918 (ppcfbsd_fetch_inferior_registers)
6919 (ppcfbsd_store_inferior_registers): Refactor as methods of
6920 ppc_fbsd_nat_target.
6921 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6923 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6924 (the_ppc_nbsd_nat_target): New.
6925 (ppcnbsd_fetch_inferior_registers)
6926 (ppcnbsd_store_inferior_registers): Refactor as methods of
6927 ppc_nbsd_nat_target.
6928 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6929 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6930 (the_ppc_obsd_nat_target): New.
6931 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6932 methods of ppc_obsd_nat_target.
6933 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6935 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6936 (the_sh_nbsd_nat_target): New.
6937 (shnbsd_fetch_inferior_registers)
6938 (shnbsd_store_inferior_registers): Refactor as methods of
6940 (_initialize_shnbsd_nat): Adjust to C++ification.
6941 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6942 (inf_ptrace_xfer_partial): Delete.
6943 (sparc_xfer_partial, sparc_target): Delete.
6944 * sparc-nat.h (sparc_fetch_inferior_registers)
6945 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6946 (sparc_target): Delete function declaration.
6947 (sparc_target): New template class.
6948 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6949 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6950 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6951 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6953 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6954 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6955 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6956 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6958 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6959 (the_vax_bsd_nat_target): New.
6960 (vaxbsd_fetch_inferior_registers)
6961 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6963 (_initialize_vaxbsd_nat): Adjust to C++ification.
6965 * bsd-kvm.c (bsd_kvm_target): New class.
6966 (bsd_kvm_ops): Now a bsd_kvm_target.
6967 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6968 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6969 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6971 (bsd_kvm_return_one): Delete.
6972 (bsd_kvm_add_target): Adjust to C++ification.
6974 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6975 (nto_procfs_target_procfs): New classes.
6976 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6977 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6978 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6979 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6980 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6981 (procfs_remove_hw_breakpoint, procfs_resume)
6982 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6983 (procfs_kill_inferior, procfs_store_registers)
6984 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6985 as methods of nto_procfs_target.
6986 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6987 (nto_native_ops): Delete.
6988 (procfs_open, procfs_native_open): Delete.
6989 (nto_native_ops): Now an nto_procfs_target_native.
6990 (init_procfs_targets): Adjust to C++ification.
6991 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6992 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6993 Refactor as methods of nto_procfs_target.
6995 * go32-nat.c (go32_nat_target): New class.
6996 (the_go32_nat_target): New.
6997 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6998 (go32_store_registers, go32_xfer_partial, go32_files_info)
6999 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7000 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7001 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7002 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7003 (go32_target): Delete.
7004 (_initialize_go32_nat): Adjust to C++ification.
7006 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7007 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7008 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7009 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7011 (gnu_target): Delete.
7012 * gnu-nat.h (gnu_target): Delete.
7013 (gnu_nat_target): New class.
7014 * i386-gnu-nat.c (gnu_base_target): New.
7015 (i386_gnu_nat_target): New class.
7016 (the_i386_gnu_nat_target): New.
7017 (_initialize_i386gnu_nat): Adjust to C++ification.
7021 * bfd-target.c (target_bfd_xclose): Rename to ...
7022 (target_bfd_close): ... this.
7023 (target_bfd_reopen): Adjust.
7024 * target.c (target_close): Remove references to to_xclose.
7025 * target.h (target_ops::to_xclose): Delete.
7026 (target_ops::to_close): Update comments.
7030 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7032 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7033 * inf-ptrace.c (inf_ptrace_register_u_offset)
7034 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7035 (inf_ptrace_store_register, inf_ptrace_store_registers)
7036 (inf_ptrace_trad_target): Move to ...
7037 * linux-nat-trad.c: ... this new file.
7038 * linux-nat-trad.h: New file.
7039 * linux-nat.c (linux_target_install_ops): Make extern.
7040 (linux_trad_target): Delete.
7041 * linux-nat.h (linux_trad_target): Delete declaration.
7042 (linux_target_install_ops): Declare.
7043 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7048 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7049 procfs_target/add_target here.
7050 * procfs.c (procfs_target): Make static.
7051 (_initialize_procfs): Call add_target here.
7052 * procfs.h (struct target_ops): Remove forward declaration.
7053 (procfs_target): Remove declaration.
7054 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7058 * procfs.c (procfs_stopped_by_watchpoint)
7059 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7060 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7062 (procfs_use_watchpoints): Delete, move contents...
7063 (procfs_target): ... here.
7064 * procfs.h (procfs_use_watchpoints): Delete declaration.
7065 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7066 procfs_use_watchpoints.
7067 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7068 procfs_use_watchpoints.
7073 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7074 and var_zuinteger_unlimited.
7075 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7076 and PARAM_ZUINTEGER_UNLIMITED.
7077 (set_parameter_value): Handle var_zuinteger and
7078 var_zuinteger_unlimited.
7079 (add_setshow_generic): Likewise.
7080 (parmpy_init): Likewise.
7085 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7086 pointer is not null before dereferencing it.
7090 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7095 * breakpoint.c (mention): Remove use of is_mi_like_p.
7096 (print_mention_ranged_breakpoint): Likewise.
7097 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7102 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7106 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7107 (info_spu_event_command): Remove some uses of is_mi_like_p.
7111 * python/py-framefilter.c (py_print_single_arg)
7112 (enumerate_locals, py_print_args, py_print_frame): Remove some
7113 uses of is_mi_like_p.
7118 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7119 * ui-out.h (ui_out::is_mi_like_p): Now const.
7120 (ui_out::do_is_mi_like_p): Now const.
7121 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7125 * varobj.c (varobj_set_visualizer): Use new_reference.
7126 * python/python.c (gdbpy_decode_line): Use new_reference.
7127 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7132 * varobj.c (install_new_value): Use new_reference.
7133 * value.h (value_incref): Return void. Swap intro comment with
7135 * value.c (set_value_parent): Use new_reference.
7136 (value_incref): Return void. Update intro comment.
7137 (release_value): Use new_reference.
7138 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7142 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7143 * gdb_bfd.h (new_bfd_ref): Remove.
7144 (gdb_bfd_open): Update comment.
7145 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7146 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7147 (gdb_bfd_fdopenr): Use new_reference.
7148 * exec.c (exec_file_attach): Use new_reference.
7152 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7157 * jit.c (jit_read_code_entry): Use type_align.
7158 * i386-tdep.c (i386_gdbarch_init): Don't call
7159 set_gdbarch_long_long_align_bit.
7160 * gdbarch.sh: Remove long_long_align_bit.
7161 * gdbarch.c, gdbarch.h: Rebuild.
7162 * arc-tdep.c (arc_type_align): New function.
7163 (arc_gdbarch_init): Use arc_type_align. Don't call
7164 set_gdbarch_long_long_align_bit.
7168 * rust-lang.c (rust_type_alignment): Remove.
7169 (rust_composite_type): Use type_align.
7173 * NEWS: Mention Type.align.
7174 * python/py-type.c (typy_get_alignof): New function.
7175 (type_object_getset): Add "alignof".
7181 * std-operator.def (UNOP_ALIGNOF): New operator.
7182 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7184 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7185 * c-lang.c (c_op_print_tab): Add alignof.
7186 * c-exp.y (ALIGNOF): New token.
7187 (exp): Add "ALIGNOF" production.
7188 (ident_tokens): Add _Alignof and alignof.
7192 * i386-tdep.c (i386_type_align): New function.
7193 (i386_gdbarch_init): Update.
7194 * gdbarch.sh (type_align): New method.
7195 * gdbarch.c, gdbarch.h: Rebuild.
7196 * arch-utils.h (default_type_align): Declare.
7197 * arch-utils.c (default_type_align): New function.
7198 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7199 (struct type) <align_log2>: New field.
7200 <instance_flags>: Now a bitfield.
7201 (TYPE_RAW_ALIGN): New macro.
7202 (type_align, type_raw_align, set_type_align): Declare.
7203 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7205 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7206 (get_alignment, maybe_set_alignment): New functions.
7207 (read_structure_type, read_enumeration_type, read_array_type)
7208 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7209 (read_subrange_type, read_base_type): Set type alignment.
7213 * dwarf2read.c (read_index_from_section): Use bool.
7218 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7224 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7225 last step, and do it atomically.
7229 * compile/compile-c-types.c (convert_int, convert_float):
7235 * rust-lang.c (rust_inclusive_range_type_p): New function.
7236 (rust_range): Handle inclusive ranges.
7237 (rust_compute_range): Likewise.
7238 * rust-exp.y (struct rust_op) <inclusive>: New field.
7239 (DOTDOTEQ): New constant.
7240 (range_expr): Add "..=" productions.
7241 (operator_tokens): Add "..=" token.
7242 (ast_range): Add "inclusive" parameter.
7243 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7245 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7247 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7248 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7250 * expprint.c (print_subexp_standard): Handle new bounds values.
7251 (dump_subexp_body_standard): Likewise.
7255 * configure: Rebuild.
7256 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7257 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7259 (class symbol_needs_eval_context): Likewise.
7260 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7261 (mock_mapped_index::symbol_name_at): Use "override". Remove
7263 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7265 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7266 * aarch64-tdep.c (instruction_reader::read): Use "override".
7267 (instruction_reader_test::read): Likewise.
7268 * arm-tdep.c (instruction_reader::read): Use "override".
7269 (instruction_reader_thumb::read): Likewise.
7274 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7275 instead of remote_send.
7276 (remote_send): Remove.
7280 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7281 find_function_start_sal instead of find_pc_line.
7285 * breakpoint.c (set_breakpoint_location_function): Handle
7287 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7288 * elfread.c (elf_symtab_read): Give data symbols with
7289 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7290 (elf_rel_plt_read): Update comment.
7291 * linespec.c (convert_linespec_to_sals): Handle
7293 (minsym_found): Handle mst_data_gnu_ifunc.
7294 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7295 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7296 * parse.c (find_minsym_type_and_address): Handle
7298 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7299 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7300 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7302 <mst_data_gnu_ifunc>: New enumerator.
7306 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7307 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7308 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7310 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7311 (lookup_minimal_symbol_by_pc): Adjust.
7312 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7313 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7314 * minsyms.h (lookup_msym_prefer): New enum.
7315 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7316 parameter by a lookup_msym_prefer parameter.
7320 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7321 ends in "@plt" instead of looking at the symbol's section.
7325 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7327 (find_pc_partial_function_gnu_ifunc): Rename to ...
7328 (find_pc_partial_function): ... this, and remove references to
7330 (find_pc_partial_function): Delete old implementation.
7331 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7335 * linespec.c (struct bound_minimal_symbol_search_key): New.
7336 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7337 skip first line if we found a GNU ifunc minimal symbol by name.
7338 (compare_msymbols): Change parameters to work with a destructured
7340 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7345 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7346 ifunc targets here. Instead, if we have an ifunc minsym, use its
7348 (add_location_to_breakpoint): Store the minsym and the objfile in
7349 the breakpoint location.
7350 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7351 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7352 Record the minsym in the sal.
7353 * symtab.h (symtab_and_line) <msymbol>: New field.
7357 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7358 unless we actually resolved the ifunc.
7362 * c-exp.y (variable production): Prefer ifunc minsyms over
7363 regular function symbols.
7364 * symtab.c (find_gnu_ifunc): New function.
7365 * minsyms.h (lookup_msym_prefer): New enum.
7366 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7367 parameter by a lookup_msym_prefer parameter.
7368 * symtab.h (find_gnu_ifunc): New declaration.
7372 * blockframe.c (find_gnu_ifunc_target_type): New function.
7373 (find_function_type): New.
7374 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7375 return a value with a memory address.
7376 (eval_call): For calls to GNU ifunc functions, try to find the
7377 type of the target function from the type that the resolver
7379 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7381 * infcall.c (find_function_return_type): Delete.
7382 (find_function_addr): Add 'function_type' parameter. For calls to
7383 GNU ifunc functions, try to find the type of the target function
7384 from the type that the resolver returns, and return it via
7386 (call_function_by_hand_dummy): Adjust to use the function type
7387 returned by find_function_addr.
7388 (find_function_addr): Add 'function_type' parameter and move
7390 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7395 * c-exp.y (variable production): Skip finding an alias for ifunc
7400 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7404 * infcmd.c (kill_command): Print the pid as string, not the whole
7405 thread's ptid. Add comment. s/has been killed/killed/ in output
7407 * remote.c (remote_detach_1): Print the pid as string, not the
7408 whole thread's ptid.
7414 * infcmd.c (kill_command): Print message when inferior has
7416 * inferior.c (print_inferior_events): Remove 'static'. Set as
7418 (add_inferior): Improve message printed when
7419 'print_inferior_events' is on.
7420 (exit_inferior): Remove message printed when
7421 'print_inferior_events' is on.
7422 (detach_inferior): Improve message printed when
7423 'print_inferior_events' is on.
7424 (initialize_inferiors): Use 'add_inferior_silent' to set
7425 'current_inferior_'.
7426 * inferior.h (print_inferior_events): Declare here as
7428 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7429 '[Detaching...]' messages when 'print_inferior_events' is on.
7430 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7431 as prefix/suffix for messages. Remove periods. Fix erroneous
7432 'Detaching after fork from child...', replace it by '... from
7434 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7435 prefix/suffix when printing 'Detaching...' messages. Print
7436 them when 'print_inferior_events' is on.
7437 * remote.c (remote_detach_1): Print message when detaching
7438 from inferior and '!is_fork_parent'.
7442 * cli-out.h: Reindent.
7446 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7447 (cli_ui_out::do_field_string): Use fputs_filtered.
7448 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7452 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7453 gdb::unique_xmalloc_ptr.
7457 * configure: Rebuild.
7462 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7463 prepare_for_testing. Set normal_bp to r_debug_state if target
7469 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7470 * remote.c (extended_remote_attach): In all-stop mode, mark the
7471 thread as executing.
7475 * thread.c (thread_apply_all_command): Fix comment.
7476 (thread_command): Fix comment.
7480 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7482 * features/aarch64-core.c (create_feature_aarch64_core):
7484 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7486 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7488 * features/i386/32bit-avx512.c
7489 (create_feature_i386_32bit_avx512): Likewise.
7490 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7492 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7494 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7496 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7498 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7500 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7502 * features/i386/64bit-avx512.c
7503 (create_feature_i386_64bit_avx512): Likewise.
7504 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7506 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7508 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7510 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7512 * features/i386/64bit-segments.c
7513 (create_feature_i386_64bit_segments): Likewise.
7514 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7516 * features/i386/x32-core.c
7517 (create_feature_i386_x32_core): Likewise.
7518 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7519 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7520 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7521 * target-descriptions.c: In generated code, don't pass xml
7526 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7527 (print_xml_feature::visit_post): Likewise.
7528 (print_xml_feature::visit): Likewise.
7529 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7530 (print_xml_feature): Add new class.
7531 * regformats/regdat.sh: Null xmltarget on feature targets.
7532 * target-descriptions.c (struct target_desc): Add xmltarget.
7533 (maintenance_check_tdesc_xml_convert): Add unittest function.
7534 (tdesc_get_features_xml): Add function to get xml.
7535 (maintenance_check_xml_descriptions): Test xml generation.
7536 * xml-tdesc.c (string_read_description_xml): Add function.
7537 * xml-tdesc.h (string_read_description_xml): Add declaration.
7541 * features/Makefile: Add feature marker to targets with new style
7542 target descriptions.
7543 * regformats/aarch64.dat: Regenerate.
7544 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7545 * regformats/i386/amd64-avx-linux.dat: Likewise.
7546 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7547 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7548 * regformats/i386/amd64-linux.dat: Likewise.
7549 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7550 * regformats/i386/amd64.dat: Likewise.
7551 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7552 * regformats/i386/i386-avx-linux.dat: Likewise.
7553 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7554 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7555 * regformats/i386/i386-linux.dat: Likewise.
7556 * regformats/i386/i386-mmx-linux.dat: Likewise.
7557 * regformats/i386/i386-mpx-linux.dat: Likewise.
7558 * regformats/i386/i386.dat: Likewise.
7559 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7560 * regformats/i386/x32-avx-linux.dat: Likewise.
7561 * regformats/i386/x32-linux.dat: Likewise.
7562 * regformats/tic6x-c62x-linux.dat: Likewise.
7563 * regformats/tic6x-c64x-linux.dat: Likewise.
7564 * regformats/tic6x-c64xp-linux.dat: Likewise.
7565 * regformats/regdat.sh: Parse feature marker.
7569 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7570 (tdesc_osabi_name): Likewise.
7571 * target-descriptions.c (tdesc_architecture_name): Add new
7573 (tdesc_osabi_name): Likewise.
7577 * common/tdesc.c (tdesc_predefined_type): Move to here.
7578 (tdesc_named_type): Likewise.
7579 (tdesc_create_vector): Likewise.
7580 (tdesc_create_struct): Likewise.
7581 (tdesc_set_struct_size): Likewise.
7582 (tdesc_create_union): Likewise.
7583 (tdesc_create_flags): Likewise.
7584 (tdesc_create_enum): Likewise.
7585 (tdesc_add_field): Likewise.
7586 (tdesc_add_typed_bitfield): Likewise.
7587 (tdesc_add_bitfield): Likewise.
7588 (tdesc_add_flag): Likewise.
7589 (tdesc_add_enum_value): Likewise.
7590 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7591 (struct tdesc_type_vector): Likewise.
7592 (struct tdesc_type_field): Likewise.
7593 (struct tdesc_type_with_fields): Likewise.
7594 (tdesc_create_enum): Add declaration.
7595 (tdesc_add_typed_bitfield): Likewise.
7596 (tdesc_add_enum_value): Likewise.
7597 * target-descriptions.c (tdesc_type_field): Move from here.
7598 (tdesc_type_builtin): Likewise.
7599 (tdesc_type_vector): Likewise.
7600 (tdesc_type_with_fields): Likewise.
7601 (tdesc_predefined_types): Likewise.
7602 (tdesc_named_type): Likewise.
7603 (tdesc_create_vector): Likewise.
7604 (tdesc_create_struct): Likewise.
7605 (tdesc_set_struct_size): Likewise.
7606 (tdesc_create_union): Likewise.
7607 (tdesc_create_flags): Likewise.
7608 (tdesc_create_enum): Likewise.
7609 (tdesc_add_field): Likewise.
7610 (tdesc_add_typed_bitfield): Likewise.
7611 (tdesc_add_bitfield): Likewise.
7612 (tdesc_add_flag): Likewise.
7613 (tdesc_add_enum_value): Likewise.
7614 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7615 (tdesc_add_typed_bitfield): Likewise.
7616 (tdesc_add_enum_value): Likewise.
7620 * common/tdesc.c (tdesc_feature::accept): Move to here.
7621 (tdesc_feature::operator==): Likewise.
7622 (tdesc_create_reg): Likewise.
7623 * common/tdesc.h (tdesc_type_kind): Likewise.
7624 (struct tdesc_type): Likewise.
7625 (struct tdesc_feature): Likewise.
7626 * regformats/regdat.sh: Create a feature.
7627 * target-descriptions.c (tdesc_type_kind): Move from here.
7628 (tdesc_type): Likewise.
7629 (tdesc_type_up): Likewise.
7630 (tdesc_feature): Likewise.
7631 (tdesc_create_reg): Likewise.
7635 * Makefile.in: Add arch/tdesc.c
7636 * common/tdesc.c: New file.
7637 * common/tdesc.h (tdesc_element_visitor): Move to here.
7638 (tdesc_element): Likewise.
7639 (tdesc_reg): Likewise.
7640 (tdesc_reg_up): Likewise.
7641 * regformats/regdef.h (reg): Add offset to constructors.
7642 * target-descriptions.c (tdesc_element_visitor): Move from here.
7643 (tdesc_element): Likewise.
7644 (tdesc_reg): Likewise.
7645 (tdesc_reg_up): Likewise.
7649 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7654 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7658 * symtab.c (print_symbol_info): Skip printing filename and line
7659 number when `last' is NULL.
7660 (symtab_symbol_info): Use empty string instead of NULL for first
7661 invocation of print_symbol_info.
7662 (rbreak_command): Pass NULL to `last' parameter of
7667 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7672 * MAINTAINERS (sh): Remove.
7673 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7674 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7675 (ALLDEPFILES): Remove sh64-tdep.c.
7676 * NEWS: Mentions that support for SH-5/SH64 is removed.
7677 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7678 (sh*-*-openbsd*): Ditto.
7679 (sh64-*-elf*): Remove.
7681 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7682 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7683 * sh-tdep.c: No longer include "sh64-tdep.h".
7684 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7685 * sh64-tdep.c, sh64-tdep.h: Remove files.
7689 * MAINTAINERS: Remove m88k.
7690 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7691 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7692 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7693 * NEWS: Mention that support for m88k was removed.
7694 * configure.host (m88*-*-*): Remove support.
7695 * configure.nat (m88k-*-*): Remove support.
7696 * configure.tgt (m88*-*-openbsd*): Remove.
7697 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7701 * configure.tgt (x86_tobjs): New variable.
7702 (amd64_tobjs, i386_tobjs): Use it.
7706 * symtab.c (print_symbol_info): Precede the symbol definition by
7707 the line number when available.
7708 * NEWS: Advertise this enhancement.
7712 * NEWS (New options): announce set/show record btrace cpu.
7713 * btrace.c: Include record-btrace.h.
7714 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7715 the vendor is unknown.
7716 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7717 Maybe overwrite the btrace configuration's cpu.
7718 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7719 (btrace_fetch): Add cpu parameter. Update callers.
7720 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7721 Maybe overwrite the btrace configuration's cpu. Skip enabling
7722 errata workarounds if the vendor is unknown.
7723 * python/py-record-btrace.c: Include record-btrace.h.
7724 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7725 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7726 * record-btrace.c (record_btrace_cpu_state_kind): New.
7727 (record_btrace_cpu): New.
7728 (set_record_btrace_cpu_cmdlist): New.
7729 (record_btrace_get_cpu): New.
7730 (require_btrace_thread, record_btrace_info)
7731 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7732 (cmd_set_record_btrace_cpu_none): New.
7733 (cmd_set_record_btrace_cpu_auto): New.
7734 (cmd_set_record_btrace_cpu): New.
7735 (cmd_show_record_btrace_cpu): New.
7736 (_initialize_record_btrace): Initialize set/show record btrace cpu
7738 * record-btrace.h (record_btrace_get_cpu): New.
7742 * record.c (set_record_command): Fix typo in message.
7746 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7750 * infrun.c (process_event_stop_test): Call
7751 gdbarch_in_indirect_branch_thunk.
7752 * gdbarch.sh (in_indirect_branch_thunk): New.
7753 * gdbarch.c: Regenerated.
7754 * gdbarch.h: Regenerated.
7757 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7758 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7759 (ALLDEPFILES): Add x86-tdep.c.
7760 * arch-utils.h (default_in_indirect_branch_thunk): New.
7761 * arch-utils.c (default_in_indirect_branch_thunk): New.
7762 * i386-tdep: Include x86-tdep.h.
7763 (i386_in_indirect_branch_thunk): New.
7764 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7766 * amd64-tdep: Include x86-tdep.h.
7767 (amd64_in_indirect_branch_thunk): New.
7768 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7773 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7774 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7775 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7780 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7781 (rust_evaluate_subexp): Likewise.
7785 * procfs.c (procfs_detach): Make forward declaration's prototype
7786 match definition's protototype.
7787 (proc_get_LDT_entry): Remove stale do_cleanups call.
7791 * target.h (target_ops::to_has_exited): Delete.
7792 (target_has_exited): Delete.
7793 * target-delegates.c: Regenerate.
7797 * target.c (fileio_fh_t::t): Add comment.
7798 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7799 (target_fileio_close): Handle a NULL target.
7800 (invalidate_fileio_fh): New.
7801 (target_close): Call it.
7802 * remote.c (remote_hostio_send_command): No longer check whether
7803 remote_desc is open.
7807 * target.c (fileio_fh_t): Make it a named struct instead of a
7809 (fileio_fh_t::is_closed): New method.
7810 (DEF_VEC_O (fileio_fh_t)): Remove.
7811 (fileio_fhandles): Now a std::vector.
7812 (is_closed_fileio_fh): Delete.
7813 (acquire_fileio_fd): Adjust. Rename parameters.
7814 (release_fileio_fd): Adjust.
7815 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7816 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7817 (target_fileio_close): Adjust.
7821 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7826 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7827 (scoped_finish_thread_state): New class.
7828 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7830 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7831 (fetch_inferior_event, normal_stop): Likewise.
7832 * thread.c (finish_thread_state_cleanup): Delete.
7837 * value.c: Include "selftest.h" and "common/array-view.h".
7838 (struct range) <operator ==>: New.
7839 (test_ranges_contain): New.
7840 (check_ranges_vector): New.
7841 (test_insert_into_bit_range_vector): New.
7842 (_initialize_values): Register selftests.
7843 * common/array-view.h (operator==, operator!=): New.
7847 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7849 * inline-frame.c: Include <algorithm>.
7850 (struct inline_state): Add constructor.
7851 (inline_state_s): Remove.
7852 (DEF_VEC_O(inline_state_s)): Remove.
7853 (inline_states): Change type to std::vector.
7854 (find_inline_frame_state): Adjust to std::vector.
7855 (allocate_inline_frame_state): Remove.
7856 (clear_inline_frame_state): Adjust to std::vector.
7857 (skip_inline_frames): Adjust to std::vector.
7861 * tracepoint.h (struct trace_state_variable): Add constructor.
7862 <name>: Change type to std::string.
7863 * tracepoint.c (tsv_s): Remove.
7864 (DEF_VEC_O(tsv_s)): Remove.
7865 (tvariables): Change to std::vector.
7866 (create_trace_state_variable): Adjust to std::vector.
7867 (find_trace_state_variable): Likewise.
7868 (find_trace_state_variable_by_number): Likewise.
7869 (delete_trace_state_variable): Likewise.
7870 (trace_variable_command): Adjust to std::string.
7871 (delete_trace_variable_command): Likewise.
7872 (tvariables_info_1): Adjust to std::vector.
7873 (save_trace_state_variables): Likewise.
7874 (start_tracing): Likewise.
7875 (merge_uploaded_trace_state_variables): Adjust to std::vector
7877 * target.h (struct target_ops)
7878 <to_download_trace_state_variable>: Pass reference to
7879 trace_state_variable.
7880 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7881 * target-delegates.c: Re-generate.
7882 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7883 (mi_tsv_deleted): Likewise.
7884 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7885 * remote.c (remote_download_trace_state_variable): Change
7886 pointer to reference and adjust.
7887 * make-target-delegates (parse_argtypes): Handle references.
7888 (write_function_header): Likewise.
7889 (munge_type): Likewise.
7893 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7894 string_view-selftests.c.
7895 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7897 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7898 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7899 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7900 * unittests/basic_string_view/element_access/char/1.cc:
7902 * unittests/basic_string_view/element_access/char/empty.cc:
7904 * unittests/basic_string_view/element_access/char/front_back.cc:
7906 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7907 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7909 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7911 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7913 * unittests/basic_string_view/operations/compare/char/1.cc:
7915 * unittests/basic_string_view/operations/compare/char/13650.cc:
7917 * unittests/basic_string_view/operations/copy/char/1.cc:
7919 * unittests/basic_string_view/operations/data/char/1.cc:
7921 * unittests/basic_string_view/operations/find/char/1.cc:
7923 * unittests/basic_string_view/operations/find/char/2.cc:
7925 * unittests/basic_string_view/operations/find/char/3.cc:
7927 * unittests/basic_string_view/operations/find/char/4.cc:
7929 * unittests/basic_string_view/operations/rfind/char/1.cc:
7931 * unittests/basic_string_view/operations/rfind/char/2.cc:
7933 * unittests/basic_string_view/operations/rfind/char/3.cc:
7935 * unittests/basic_string_view/operations/substr/char/1.cc:
7937 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7938 * unittests/string_view-selftests.c: New file.
7942 * unittests/basic_string_view/capacity/1.cc: New file.
7943 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7944 * unittests/basic_string_view/cons/char/1.cc: New file.
7945 * unittests/basic_string_view/cons/char/2.cc: New file.
7946 * unittests/basic_string_view/cons/char/3.cc: New file.
7947 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7948 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7949 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7950 * unittests/basic_string_view/element_access/char/1.cc: New file.
7951 * unittests/basic_string_view/element_access/char/2.cc: New file.
7952 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7953 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7954 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7955 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7956 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7957 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7958 * unittests/basic_string_view/include.cc: New file.
7959 * unittests/basic_string_view/inserters/char/1.cc: New file.
7960 * unittests/basic_string_view/inserters/char/2.cc: New file.
7961 * unittests/basic_string_view/inserters/char/3.cc: New file.
7962 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7963 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7964 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7965 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7966 * unittests/basic_string_view/literals/types.cc: New file.
7967 * unittests/basic_string_view/literals/values.cc: New file.
7968 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7969 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7970 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7971 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7972 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7973 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7974 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7975 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7976 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7977 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7978 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7979 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7980 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7981 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7982 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7983 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7984 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7985 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7986 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7987 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7988 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7989 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7990 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7991 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7992 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7993 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7994 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7995 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7996 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7997 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7998 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7999 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8000 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8001 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8002 * unittests/basic_string_view/operators/char/2.cc: New file.
8003 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8004 * unittests/basic_string_view/range_access/char/1.cc: New file.
8005 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8006 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8007 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8008 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8009 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8010 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8011 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8012 * unittests/basic_string_view/typedefs.cc: New file.
8013 * unittests/basic_string_view/types/1.cc: New file.
8017 * common/gdb_string_view.h: Remove libstdc++ implementation
8018 details, adjust to gdb reality.
8019 * common/gdb_string_view.tcc: Likewise.
8020 * cli/cli-script.c (struct string_view): Remove.
8021 (user_args) <m_args>: Change element type to gdb::string_view.
8022 (user_args::insert_args): Adjust.
8026 * common/gdb_string_view.h: New file.
8027 * common/gdb_string_view.tcc: New file.
8031 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8032 * configure: Re-generate.
8036 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8037 (set_target_gdbarch): Call
8038 gdb::observers::architecture_changed.notify instead of
8039 observer_notify_architecture_changed.
8043 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8044 (do_restore_current_traceframe_cleanup): Remove.
8045 (restore_current_traceframe_cleanup_dtor): Remove.
8046 (make_cleanup_restore_current_traceframe): Remove.
8047 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8049 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8050 * infrun.c (fetch_inferior_event): Use
8051 scoped_restore_current_traceframe.
8055 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8057 <n_allocated_type_units>: Remove.
8058 <all_type_units>: Change to std::vector.
8059 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8060 to std::vector change.
8061 (dwarf2_per_objfile::get_cutu): Likewise.
8062 (dwarf2_per_objfile::get_tu): Likewise.
8063 (create_signatured_type_table_from_index): Likewise.
8064 (create_signatured_type_table_from_debug_names): Likewise.
8065 (dw2_symtab_iter_next): Likewise.
8066 (dw2_print_stats): Likewise.
8067 (dw2_expand_all_symtabs): Likewise.
8068 (dw2_expand_marked_cus): Likewise.
8069 (dw2_debug_names_iterator::next): Likewise.
8070 (dwarf2_initialize_objfile): Likewise.
8071 (add_signatured_type_cu_to_table): Likewise.
8072 (create_all_type_units): Likewise.
8073 (add_type_unit): Likewise.
8074 (struct tu_abbrev_offset): Add constructor.
8075 (build_type_psymtabs_1): Adjust to std::vector change.
8076 (print_tu_stats): Likewise.
8077 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8078 (write_debug_names): Likewise.
8082 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8083 Make an std::vector.
8084 <n_comp_units>: Remove.
8085 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8086 to std::vector change.
8087 (dwarf2_per_objfile::get_cutu): Likewise.
8088 (dwarf2_per_objfile::get_cu): Likewise.
8089 (create_cus_from_index): Likewise.
8090 (create_addrmap_from_index): Likewise.
8091 (create_addrmap_from_aranges): Likewise.
8092 (dwarf2_read_index): Likewise.
8093 (dw2_find_last_source_symtab): Likewise.
8094 (dw2_map_symtabs_matching_filename): Likewise.
8095 (dw2_symtab_iter_next): Likewise.
8096 (dw2_print_stats): Likewise.
8097 (dw2_expand_all_symtabs): Likewise.
8098 (dw2_expand_symtabs_with_fullname): Likewise.
8099 (dw2_expand_marked_cus): Likewise.
8100 (dw2_map_symbol_filenames): Likewise.
8101 (create_cus_from_debug_names): Likewise.
8102 (dwarf2_read_debug_names): Likewise.
8103 (dw2_debug_names_iterator::next): Likewise.
8104 (dwarf2_initialize_objfile): Likewise.
8105 (set_partial_user): Likewise.
8106 (dwarf2_build_psymtabs_hard): Likewise.
8107 (read_comp_units_from_section): Remove arguments, adjust to
8109 (create_all_comp_units): Adjust to std::vector and
8110 read_comp_units_from_section changes.
8111 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8113 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8114 (psyms_seen_size): Likewise.
8115 (write_gdbindex): Likewise.
8116 (write_debug_names): Likewise.
8120 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8121 with dwarf2_per_objfile.
8122 (create_cus_from_index): Likewise.
8123 (create_signatured_type_table_from_index): Likewise.
8124 (dwarf2_read_index): Likewise.
8125 (dwarf2_initialize_objfile): Likewise.
8126 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8127 per_cu rather than get_dwarf2_per_objfile.
8131 * dwarf2read.h (struct signatured_type): Forward declare.
8132 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8134 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8135 (dw2_get_cutu): ...this.
8136 (dwarf2_per_objfile::get_cu): Rename from...
8137 (dw2_get_cu): ...this.
8138 (dwarf2_per_objfile::get_tu): New.
8139 (create_addrmap_from_index): Adjust.
8140 (create_addrmap_from_aranges): Adjust.
8141 (dw2_find_last_source_symtab): Adjust.
8142 (dw2_map_symtabs_matching_filename): Adjust.
8143 (dw2_symtab_iter_next): Adjust.
8144 (dw2_print_stats): Adjust.
8145 (dw2_expand_all_symtabs): Adjust.
8146 (dw2_expand_symtabs_with_fullname): Adjust.
8147 (dw2_expand_marked_cus): Adjust.
8148 (dw_expand_symtabs_matching_file_matcher): Adjust.
8149 (dw2_map_symbol_filenames): Adjust.
8150 (dw2_debug_names_iterator::next): Adjust.
8151 (dwarf2_initialize_objfile): Adjust.
8152 (set_partial_user): Adjust.
8153 (dwarf2_build_psymtabs_hard): Adjust.
8157 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8158 Remove unused variables.
8159 (dw2_map_symtabs_matching_filename): Likewise.
8160 (dwarf2_record_block_ranges): Likewise.
8161 (dwarf2_read_addr_index): Likewise.
8162 (follow_die_offset): Likewise.
8166 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8167 to symbol_file_add_main.
8172 * mi/mi-console.c (do_fputc_async_safe): New.
8173 (mi_console_file::write_async_safe): New.
8174 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8175 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8177 * ui-file.c (ui_file::putstrn): Adjust call to
8178 fputstrn_unfiltered.
8179 * utils.c (printchar): Replace do_fputs and do_fprintf
8180 parameters by do_fputc.
8181 (fputstr_filtered): Adjust call to printchar.
8182 (fputstr_unfiltered): Likewise.
8183 (fputstrn_filtered): Likewise.
8184 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8186 * utils.h (do_fputc_ftype): New typedef.
8187 (fputstrn_unfiltered): Add do_fputc parameter.
8191 * regformats/i386/i386-avx.dat: Remove.
8196 * amd64-tdep.c (amd64_none_init_abi): New function.
8197 (amd64_x32_none_init_abi): New function.
8198 (_initialize_amd64_tdep): Register handlers for x86-64 and
8199 x64_32 with GDB_OSABI_NONE.
8200 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8201 GDB_OSABI_NONE osabi.
8206 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8208 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8209 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8213 * common/byte-vector.h (char_vector): New type.
8214 * target.h (target_read_alloc): Return
8215 gdb::optional<byte_vector>.
8216 (target_read_stralloc): Return gdb::optional<char_vector>.
8217 (target_get_osdata): Return gdb::optional<char_vector>.
8218 * target.c (target_read_alloc_1): Templatize. Replacement
8219 manual memory management with vector.
8220 (target_read_alloc): Change return type, adjust.
8221 (target_read_stralloc): Change return type, adjust.
8222 (target_get_osdata): Change return type, adjust.
8223 * auxv.c (struct auxv_info) <length>: Remove.
8224 <data>: Change type to gdb::optional<byte_vector>.
8225 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8226 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8227 (target_auxv_search): Adjust.
8228 (fprint_target_auxv): Adjust.
8229 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8230 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8231 (linux_make_corefile_notes): Adjust.
8232 * osdata.c (get_osdata): Adjust.
8233 * remote.c (remote_get_threads_with_qxfer): Adjust.
8234 (remote_memory_map): Adjust.
8235 (remote_traceframe_info): Adjust.
8236 (btrace_read_config): Adjust.
8237 (remote_read_btrace): Adjust.
8238 (remote_pid_to_exec_file): Adjust.
8239 * solib-aix.c (solib_aix_get_library_list): Adjust.
8240 * solib-dsbt.c (decode_loadmap): Don't free buf.
8241 (dsbt_get_initial_loadmaps): Adjust.
8242 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8243 * solib-target.c (solib_target_current_sos): Adjust.
8244 * tracepoint.c (sdata_make_value): Adjust.
8245 * xml-support.c (xinclude_start_include): Adjust.
8246 (xml_fetch_content_from_file): Adjust.
8247 * xml-support.h (xml_fetch_another): Change return type.
8248 (xml_fetch_content_from_file): Change return type.
8249 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8250 * xml-tdesc.c (file_read_description_xml): Adjust.
8251 (fetch_available_features_from_target): Change return type.
8252 (target_fetch_description_xml): Adjust.
8253 (target_read_description_xml): Adjust.
8257 * value.c (~value): Update.
8258 (struct value) <contents>: Now unique_xmalloc_ptr.
8259 (value_contents_bits_eq, allocate_value_contents)
8260 (value_contents_raw, value_contents_all_raw)
8261 (value_contents_for_printing, value_contents_for_printing_const)
8262 (set_value_enclosing_type): Update.
8266 * value.c (range_s): Remove typedef, VEC.
8267 (struct range): Add operator<.
8268 (range_lessthan): Remove.
8269 (ranges_contain): Change type.
8271 (struct value) <unavailable, optimized_out>: Now std::vector.
8272 (value_entirely_available)
8273 (value_entirely_covered_by_range_vector)
8274 (value_entirely_unavailable, value_entirely_optimized_out):
8276 (insert_into_bit_range_vector): Change argument type.
8277 (find_first_range_overlap): Likewise.
8278 (struct ranges_and_idx, value_contents_bits_eq)
8279 (require_not_optimized_out, require_available): Update.
8280 (ranges_copy_adjusted): Change argument types.
8281 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8285 * value.c (~value): Update.
8286 (struct value) <parent>: Now a value_ref_ptr.
8287 (value_parent, set_value_parent, value_address, value_copy):
8292 * value.c (struct value): Add constructor, destructor, and member
8294 (allocate_value_lazy, value_decref): Update.
8298 * value.c (struct value) <released, next>: Remove.
8299 (all_values): Now a std::vector.
8300 (allocate_value_lazy): Update.
8301 (value_next): Remove.
8302 (value_mark, value_free_to_mark, release_value)
8303 (value_release_to_mark): Update.
8307 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8308 (free_value_chain): Remove.
8309 * value.c (free_value_chain): Remove.
8310 (value_release_to_mark): Return a std::vector.
8311 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8313 (check_condition): Update.
8314 * eval.c (fetch_subexp_value): Change "val_chain" to a
8316 * breakpoint.c (update_watchpoint): Update.
8317 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8321 * value.h (free_all_values): Remove.
8322 * value.c (free_all_values): Remove.
8326 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8327 (value_history_chain, value_history_count): Remove.
8328 (value_history): New global.
8329 (record_latest_value, access_value_history, show_values)
8330 (preserve_values): Update.
8334 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8335 * varobj.c (varobj_set_display_format, varobj_set_value)
8336 (install_default_visualizer, construct_visualizer)
8337 (install_new_value, ~varobj, varobj_get_value_type)
8338 (my_value_of_variable, varobj_editable_p): Update.
8339 * c-varobj.c (c_describe_child, c_value_of_variable)
8340 (cplus_number_of_children, cplus_describe_child): Update.
8341 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8342 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8343 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8347 * printcmd.c (last_examine_address): Change type to
8349 (do_examine, x_command): Update.
8353 * value.c (release_value): Update.
8354 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8355 (struct bpstats) <val>: Now a value_ref_ptr.
8356 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8357 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8358 (~watchpoint, print_it_watchpoint, watch_command_1)
8359 (invalidate_bp_value_on_memory_change): Update.
8363 * varobj.c (varobj_clear_saved_item)
8364 (update_dynamic_varobj_children, install_new_value, ~varobj):
8366 * value.h (value_incref): Move declaration earlier.
8367 (value_decref): Rename from value_free.
8368 (struct value_ref_policy): New.
8369 (value_ref_ptr): New typedef.
8370 (struct value_deleter): Remove.
8371 (gdb_value_up): Remove typedef.
8372 (release_value): Change return type.
8373 (release_value_or_incref): Remove.
8374 * value.c (set_value_parent): Update.
8375 (value_incref): Change return type.
8376 (value_decref): Rename from value_free.
8377 (value_free_to_mark, free_all_values, free_value_chain): Update.
8378 (release_value): Return value_ref_ptr.
8379 (release_value_or_incref): Remove.
8380 (record_latest_value, set_internalvar, clear_internalvar):
8382 * stack.c (info_frame_command): Don't call value_free.
8383 * python/py-value.c (valpy_dealloc, valpy_new)
8384 (value_to_value_object): Update.
8385 * printcmd.c (do_examine): Update.
8386 * opencl-lang.c (lval_func_free_closure): Update.
8387 * mi/mi-main.c (register_changed_p): Don't call value_free.
8388 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8389 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8390 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8392 * guile/scm-value.c (vlscm_free_value_smob)
8393 (vlscm_scm_from_value): Update.
8394 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8395 (frame_unwind_register_unsigned, get_frame_register_bytes)
8396 (put_frame_register_bytes): Don't call value_free.
8397 * findvar.c (address_from_register): Don't call value_free.
8398 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8399 * dwarf2loc.c (entry_data_value_free_closure)
8400 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8401 (dwarf2_evaluate_loc_desc_full): Update.
8402 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8403 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8404 (~watchpoint, watch_command_1)
8405 (invalidate_bp_value_on_memory_change): Update.
8406 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8411 * warning.m4: Add -Wno-error=deprecated-register.
8412 * configure: Re-generate.
8416 * linespec.h: Remove include of "vec.h".
8420 * linespec.c (typep): Remove typedef.
8421 (find_methods, find_superclass_methods): Take a std::vector.
8422 (find_method): Use std::vector.
8426 * utils.c (compare_strings): Remove.
8427 * utils.h (compare_strings): Remove.
8428 * objc-lang.h (find_imps): Update.
8429 * objc-lang.c (find_methods): Take a std::vector.
8430 (uniquify_strings, find_imps): Likewise.
8431 * linespec.c (find_methods): Take a std::vector.
8432 (decode_objc): Use std::vector.
8433 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8435 (find_method, find_function_symbols): Use std::vector.
8439 * completer.c (completion_tracker::completion_tracker): Remove
8441 (completion_tracker::discard_completions): Likewise.
8442 * breakpoint.c (ambiguous_names_p): Remove cast.
8443 * ada-lang.c (_initialize_ada_language): Remove cast.
8444 * utils.h (streq): Update.
8445 (streq_hash): Add new declaration.
8446 * utils.c (streq): Return bool.
8447 (streq_hash): New function.
8451 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8452 Remove a string copy.
8456 * linespec.c (filter_results): Use std::vector.
8457 (decode_line_2, decode_line_full): Update.
8461 * linespec.c (canonical_to_fullform): Return std::string.
8462 (filter_results): Update.
8463 (struct decode_line_2_item): Add constructor.
8464 <fullform, displayform>: Now std::string.
8465 (decode_line_2_compare_items): Now a std::sort comparator.
8466 (decode_line_2): Update.
8470 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8471 (unexpected_linespec_error): Update.
8472 (linespec_parse_basic, parse_linespec): Update.
8476 * linespec.c (linespec_parse_basic): Reindent.
8480 * minsyms.h (iterate_over_minimal_symbols): Update.
8481 * minsyms.c (iterate_over_minimal_symbols): Take a
8483 * linespec.c (struct collect_minsyms): Remove.
8484 (compare_msyms): Now a std::sort comparator.
8485 (add_minsym): Add parameters.
8486 (search_minsyms_for_name): Update. Use std::vector.
8490 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8495 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8500 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8501 printing static type.
8505 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8506 (rs6000_xfer_shared_libraries): Update.
8510 * common/gdb_vecs.h (char_ptr): Remove.
8511 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8515 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8517 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8521 * tracepoint.h (struct uploaded_tp): Initialize fields.
8522 <actions, step_actions, cmd_strings>: Change type to
8523 std::vector<char *>.
8524 * tracepoint.c (get_uploaded_tp): Allocate with new.
8525 (free_uploaded_tps): Free with delete.
8526 (parse_tracepoint_definition): Adjust to std::vector change.
8527 * breakpoint.c (read_uploaded_action): Likewise.
8528 (create_tracepoint_from_upload): Likewise.
8529 * ctf.c (ctf_write_uploaded_tp): Likewise.
8530 (SET_ARRAY_FIELD): Likewise.
8531 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8535 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8537 (svr4_keep_data_in_core): Update.
8538 (svr4_read_so_list): Update.
8542 * windows-nat.c (handle_output_debug_string, handle_exception):
8544 * target.h (target_read_string): Update.
8545 * target.c (target_read_string): Change "string" to
8547 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8549 * solib-frv.c (frv_current_sos): Update.
8550 * solib-dsbt.c (dsbt_current_sos): Update.
8551 * solib-darwin.c (darwin_current_sos): Update.
8552 * linux-thread-db.c (inferior_has_bug): Update.
8553 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8554 Update. Remove alloca.
8555 * ada-lang.c (ada_main_name): Update.
8559 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8560 (struct dwo_file_deleter): New.
8561 (dwo_file_up): New typedef.
8562 (open_and_init_dwo_file): Use dwo_file_up.
8563 (free_dwo_file_cleanup): Remove.
8567 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8568 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8572 * dwarf2read.c (class free_cached_comp_units): New class.
8573 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8574 (free_cached_comp_units): Remove function.
8578 * utils.h (make_cleanup_unpush_target): Remove.
8579 * inf-ptrace.c (struct target_unpusher): New.
8580 (target_unpush_up) New typedef.
8581 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8583 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8587 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8592 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8593 destructor. Now a class.
8594 (gdb_readline_wrapper_cleanup): Remove function.
8595 (gdb_readline_wrapper): Remove cleanups.
8599 * typeprint.h (struct type_print_options) <local_typedefs,
8600 global_typedefs>: Remove "struct" keyword.
8601 (class typedef_hash_table): New class.
8602 (recursively_update_typedef_hash, add_template_parameters)
8603 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8604 (find_typedef_in_hash): Don't declare.
8605 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8606 (typedef_hash_table::recursively_update): Rename from
8607 recursively_update_typedef_hash. Now a member.
8608 (typedef_hash_table::add_template_parameters): Rename from
8609 add_template_parameters. Now a member.
8610 (typedef_hash_table::typedef_hash_table): Now a constructor;
8611 rename from create_typedef_hash.
8612 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8613 rename from free_typedef_hash.
8614 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8615 (do_free_global_table): Remove.
8616 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8617 from copy_type_recursive.
8618 (create_global_typedef_table): Remove.
8619 (typedef_hash_table::find_global_typedef): Now a member of
8621 (typedef_hash_table::find_typedef): Rename from
8622 find_typedef_in_hash; now a member.
8623 (whatis_exp): Update.
8624 * extension.h (struct ext_lang_type_printers): Add constructor and
8626 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8628 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8629 Now a constructor; rename from start_ext_lang_type_printers.
8630 (ext_lang_type_printers): Now a destructor; rename from
8631 free_ext_lang_type_printers.
8632 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8634 (c_type_print_base_struct_union): Update. Remove cleanups.
8638 * dwarf-index-write.c: Include <cmath>.
8642 * NEWS: Add entry describing new "set|show varsize-limit" command.
8643 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8645 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8650 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8652 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8653 * dwarf-index-common.c: New file.
8654 * dwarf-index-common.h: New file.
8655 * dwarf-index-write.c: New file.
8656 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8657 (struct dwarf2_section_info): Move from here.
8658 (dwarf2_section_info_def): Likewise.
8659 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8660 (offset_type): Likewise.
8661 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8662 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8663 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8664 (byte_swap): Likewise.
8665 (MAYBE_SWAP): Likewise.
8666 (dwarf2_per_cu_ptr): Likewise.
8667 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8668 (struct tu_stats): Likewise.
8669 (struct dwarf2_per_objfile): Likewise.
8670 (struct dwarf2_per_cu_data): Likewise.
8671 (struct signatured_type): Likewise.
8672 (sig_type_ptr): Likewise.
8673 (DEF_VEC_P (sig_type_ptr)): Likewise.
8674 (INDEX4_SUFFIX): Likewise.
8675 (INDEX5_SUFFIX): Likewise.
8676 (DEBUG_STR_SUFFIX): Likewise.
8677 (dwarf2_read_section): Make non-static.
8678 (mapped_index_string_hash): Move from here.
8679 (dwarf5_djb_hash): Likewise.
8680 (file_write): Likewise.
8681 (class data_buf): Likewise.
8682 (struct symtab_index_entry): Likewise.
8683 (struct mapped_symtab): Likewise.
8684 (find_slot): Likewise.
8685 (hash_expand): Likewise.
8686 (add_index_entry): Likewise.
8687 (uniquify_cu_indices): Likewise.
8688 (class c_str_view): Likewise.
8689 (class c_str_view_hasher): Likewise.
8690 (class vector_hasher): Likewise.
8691 (write_hash_table): Likewise.
8692 (psym_index_map): Likewise.
8693 (struct addrmap_index_data): Likewise.
8694 (add_address_entry): Likewise.
8695 (add_address_entry_worker): Likewise.
8696 (write_address_map): Likewise.
8697 (symbol_kind): Likewise.
8698 (write_psymbols): Likewise.
8699 (struct signatured_type_index_data): Likewise.
8700 (write_one_signatured_type): Likewise.
8701 (recursively_count_psymbols): Likewise.
8702 (recursively_write_psymbols): Likewise.
8703 (class debug_names): Likewise.
8704 (check_dwarf64_offsets): Likewise.
8705 (psyms_seen_size): Likewise.
8706 (write_gdbindex): Likewise.
8707 (write_debug_names): Likewise.
8708 (assert_file_size): Likewise.
8709 (write_psymtabs_to_index): Likewise.
8710 (save_gdb_index_command): Likewise.
8711 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8713 * dwarf2read.h: New file.
8718 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8719 symbol name if the CU's language stores symbol names in linkage
8721 * language.h (struct language_defn)
8722 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8723 all instances of this struct.
8727 * stack.c (backtrace_command_1): Remove verbose code.
8731 * python/py-framefilter.c (py_print_type): Don't catch
8732 exceptions. Return void.
8733 (py_print_value): Likewise.
8734 (py_print_single_arg): Likewise.
8735 (enumerate_args): Don't catch exceptions.
8736 (py_print_args): Likewise.
8737 (py_print_frame): Likewise.
8738 (gdbpy_apply_frame_filter): Catch exceptions here.
8742 * stack.c (_initialize_stack): Remove trailing newlines from help
8743 text. Add "Usage" line to "backtrace" help.
8748 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8752 * python/py-framefilter.c (py_print_single_arg): Return
8753 EXT_LANG_BT_ERROR from catch.
8758 * stack.c (backtrace_command_1): Move some code into no-filters
8763 * python/py-framefilter.c (throw_quit_or_print_exception): New
8765 (gdbpy_apply_frame_filter): Use it.
8770 * python/py-framefilter.c (py_print_type, py_print_value)
8771 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8776 * python/py-framefilter.c (enumerate_args): Use
8777 gdb::unique_xmalloc_ptr.
8781 * python/py-framefilter.c (py_print_frame): Return
8783 (gdbpy_apply_frame_filter): Update comment.
8784 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8786 <EXT_LANG_BT_NO_FILTERS>: Change value.
8791 * stack.c (backtrace_command): Parse "hide" argument.
8792 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8793 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8798 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8800 (backtrace_command): Remove "fulltrace", add "flags".
8804 * stack.c (backtrace_command): Rewrite command line parsing.
8808 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8812 * filename-seen-cache.h: Add include guard.
8816 * symfile.c (place_section): Remove "struct" from section_addr_info
8818 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8819 "struct" keyword from section_addr_info.
8823 * regformats/regdef.h (reg): Add constructors.
8827 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8828 if then/else bodies in var_func_name extraction.
8832 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8833 lookup_minimal_symbol() to find symbol entry.
8834 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8839 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8840 nested type definitions for C++, too.
8844 * machoread.c (struct oso_el): Add a constructor. Don't define as
8846 (macho_register_oso): Remove.
8847 (macho_symtab_read): Take a std::vector.
8848 (oso_el_compare_name): Now a std::sort comparator.
8849 (macho_symfile_read_all_oso): Take a std::vector.
8850 (macho_symfile_read): Use std::vector. Remove cleanups.
8854 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8855 (record_full_goto_bookmark): Use std::string.
8860 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8865 * rs6000-tdep.c (store_insn_p): New function.
8866 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8867 and cr_reg to their unshifted values. Use store_insn_p to
8868 match LR saves using either R1 or fdata->alloca_reg. Use
8869 store_insn_p to match CR saves. Set alloca_reg_offset
8870 when alloca_reg and framep are set. Remove lr_reg shift
8871 when assigning to fdata->lr_register.
8875 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8876 command line args instead of emitting a warning.
8880 * tracepoint.h (struct static_tracepoint_marker): Initialize
8881 fields, define default constructor, move constructor and move
8882 assignment, disable the rest.
8883 <str_id, extra>: Make std::string.
8884 (release_static_tracepoint_marker): Remove.
8885 (free_current_marker): Remove.
8886 * tracepoint.c (free_current_marker): Remove.
8887 (parse_static_tracepoint_marker_definition): Adjust to
8888 std::string, use new hex2str overload.
8889 (release_static_tracepoint_marker): Remove.
8890 (print_one_static_tracepoint_marker): Get marker by reference
8891 and adjust to std::string.
8892 (info_static_tracepoint_markers_command): Adjust to std::vector
8894 * target.h (static_tracepoint_marker_p): Remove typedef.
8895 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8896 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8898 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8900 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8901 (target_debug_print_std_vector_static_tracepoint_marker): New.
8902 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8904 (target_debug_print_static_tracepoint_marker_p): ... this.
8905 * target-delegates.c: Re-generate.
8906 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8908 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8909 (decode_static_tracepoint_spec): Adjust to std::vector.
8910 (tracepoint_print_one_detail): Adjust to std::string.
8911 (strace_marker_decode_location): Adjust to std::string.
8912 (update_static_tracepoint): Adjust to std::string, remove call
8913 to release_static_tracepoint_marker.
8914 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8915 Adjust to std::vector.
8916 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8917 (remote_static_tracepoint_markers_by_strid): Adjust to
8919 * common/rsp-low.h (hex2str): New overload with explicit count
8921 * common/rsp-low.c (hex2str): New overload with explicit count
8923 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8924 (_initialize_rsp_low_selftests): Add test_hex2str test.
8925 * unittests/tracepoint-selftests.c
8926 (test_parse_static_tracepoint_marker_definition): Adjust to
8931 * tracepoint.c (parse_static_tracepoint_marker_definition):
8932 Consider case where the definition is followed by more
8934 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8935 tracepoint-selftests.c.
8936 * unittests/tracepoint-selftests.c: New.
8940 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8945 * symtab.c (find_pc_sect_line): fixed indentation.
8949 * symtab.c (find_pc_sect_line): now uses binary search.
8953 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8959 * unittests/observable-selftests.c: New file.
8960 * common/observable.h: New file.
8961 * observable.h: New file.
8962 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8963 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8964 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8965 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8966 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8967 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8968 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8969 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8970 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8971 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8972 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8973 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8974 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8975 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8976 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8977 tui/tui-interp.c, valops.c: Update all users.
8978 * tui/tui-hooks.c (tui_bp_created_observer)
8979 (tui_bp_deleted_observer, tui_bp_modified_observer)
8980 (tui_inferior_exit_observer, tui_before_prompt_observer)
8981 (tui_normal_stop_observer, tui_register_changed_observer):
8983 (tui_observers_token): New global.
8984 (attach_or_detach, tui_attach_detach_observers): New functions.
8985 (tui_install_hooks, tui_remove_hooks): Use
8986 tui_attach_detach_observers.
8987 * record-btrace.c (record_btrace_thread_observer): Remove.
8988 (record_btrace_thread_observer_token): New global.
8989 * observer.sh: Remove.
8990 * observer.c: Rename to observable.c.
8991 * observable.c (namespace gdb_observers): Define new objects.
8992 (observer_debug): Move into gdb_observers namespace.
8993 (struct observer, struct observer_list, xalloc_observer_list_node)
8994 (xfree_observer_list_node, generic_observer_attach)
8995 (generic_observer_detach, generic_observer_notify): Remove.
8996 (_initialize_observer): Update.
8997 Don't include observer.inc.
8998 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8999 (clean mostlyclean): Likewise.
9000 (observer.h, observer.inc): Remove targets.
9001 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9002 (COMMON_SFILES): Use observable.c, not observer.c.
9003 * .gitignore: Remove observer.h.
9007 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9009 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9013 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9017 * target.c (class scoped_target_fd): New.
9018 (target_fileio_close_cleanup): Remove.
9019 (target_fileio_read_alloc_1): Use scoped_target_fd.
9023 * silent-rules.mk: New.
9024 * Makefile.in: Include silent-rules.mk
9025 (srcdir, VPATH, top_srcdir): Move up.
9026 (COMPILE): Add ECHO_CXX.
9027 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9028 (init.c): Add ECHO_INIT_C.
9029 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9030 (version.c): Add ECHO_GEN.
9031 (printcmd.o): Add ECHO_CXX.
9032 (target-float.o): Add ECHO_CXX.
9033 (ada-exp.o): Add ECHO_CXX.
9034 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9035 (insight$(EXEEXT)): Add ECHO_CXXLD.
9036 * gnulib/configure.ac: Add AM_SILENT_RULES.
9037 * gnulib/aclocal.m4: Re-generate.
9038 * gnulib/configure: Re-generate.
9039 * gnulib/import/Makefile.in: Re-generate.
9043 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9044 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9045 * utils.c (do_free_section_addr_info)
9046 (make_cleanup_free_section_addr_info): Remove.
9047 * symfile.h (struct other_sections): Add constructor.
9048 (struct section_addr_info): Remove.
9049 (section_addr_info): New typedef.
9050 (struct sym_fns) <sym_offsets>: Change type of parameter.
9051 (build_section_addr_info_from_objfile)
9052 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9053 (default_symfile_offsets, symbol_file_add)
9054 (symbol_file_add_from_bfd)
9055 (build_section_addr_info_from_section_table): Update.
9056 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9057 * symfile.c (alloc_section_addr_info): Remove.
9058 (build_section_addr_info_from_section_table): Change return type.
9060 (build_section_addr_info_from_bfd)
9061 (build_section_addr_info_from_objfile): Likewise.
9062 (free_section_addr_info): Remove.
9063 (relative_addr_info_to_section_offsets): Change type of "addrs".
9064 (addrs_section_compar): Now a std::sort comparator.
9065 (addrs_section_sort): Change return type.
9066 (addr_info_make_relative): Change type of "addrs". Update.
9067 (default_symfile_offsets, syms_from_objfile_1)
9068 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9069 (symbol_file_add_separate): Update.
9070 (symbol_file_add): Change type of "addrs". Update.
9071 (add_symbol_file_command): Update. Remove cleanups.
9072 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9074 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9075 * solib.c (solib_read_symbols): Update.
9076 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9077 * machoread.c (macho_symfile_offsets): Update.
9078 * jit.c (jit_bfd_try_read_symtab): Update.
9082 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9083 unittests/utils-selftests.c.
9084 * unittests/utils-selftests.c: New file.
9089 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9095 * printcmd.c (printf_pointer): Allow "-" in format.
9099 * printcmd.c (_initialize_printcmd): Add usage to printf.
9103 * MAINTAINERS: Update my email address.
9107 * machoread.c (macho_check_dsym): Change filenamep to a
9109 (macho_symfile_read): Update.
9110 * symfile.c (load_command): Use std::string.
9114 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9115 to error message string.
9116 (riscv_register_name): Use xsnprintf instead of sprintf.
9117 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9119 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9121 (riscv_push_dummy_call): Likewise.
9125 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9126 Use gdb::byte_vector.
9127 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9131 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9132 parameter type to readable_regcache.
9133 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9138 * dwarf2read.c (struct nextfield): Add initializers.
9139 (struct nextfnfield): Remove.
9140 (struct fnfieldlist): Add initializers. Remove "length" and
9141 "head", use std::vector.
9142 (struct decl_field_list): Remove.
9143 (struct field_info): Add initializers.
9144 <fields, baseclasses>: Now std::vector.
9145 <nbaseclasses, nfnfields, typedef_field_list_count,
9146 nested_types_list_count>: Remove.
9147 (dwarf2_add_field, dwarf2_add_type_defn)
9148 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9149 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9150 (process_structure_scope): Update.
9154 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9155 for use by std::sort.
9156 (build_type_psymtabs_1): Use std::vector.
9160 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9161 and LIBMPFR in the printed configuration.
9165 * source.c (get_filename_and_charpos): Use scoped_fd.
9166 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9167 (procfs_pidlist): Likewise.
9168 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9169 (iterate_over_mappings): Likewise.
9173 * infcall.c (struct call_return_meta_info)
9174 <stack_temporaries_enabled>: Remove.
9175 (get_call_return_value, call_function_by_hand_dummy): Update.
9176 * thread.c (disable_thread_stack_temporaries): Remove.
9177 (enable_thread_stack_temporaries): Remove.
9178 (thread_stack_temporaries_enabled_p): Return bool.
9179 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9180 (get_last_thread_stack_temporary): Update.
9181 * eval.c (evaluate_subexp): Update.
9182 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9183 class, not a function.
9184 (value_ptr, value_vec): Remove typedefs.
9185 (class thread_info) <stack_temporaries_enabled>: Now bool.
9186 <stack_temporaries>: Now a std::vector.
9187 (thread_stack_temporaries_enabled_p)
9188 (value_in_thread_stack_temporaries): Return bool.
9192 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9193 (getpkt_or_notif_sane_1): Likewise.
9197 * build-id.c (build_id_to_debug_bfd): Use std::string.
9201 * build-id.c (find_separate_debug_file_by_buildid): Return
9203 * build-id.h (find_separate_debug_file_by_buildid): Return
9205 * coffread.c (coff_symfile_read): Adjust to std::string.
9206 * elfread.c (elf_symfile_read): Adjust to std::string.
9207 * symfile.c (separate_debug_file_exists): Change parameter to
9209 (find_separate_debug_file): Return std::string.
9210 (find_separate_debug_file_by_debuglink): Return std::string.
9211 * symfile.h (find_separate_debug_file_by_debuglink): Return
9216 * common/xml-utils.c (xml_escape_text): Move code to...
9217 (xml_escape_text_append): ... this new function.
9218 * common/xml-utils.h (xml_escape_text_append): New declaration.
9219 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9221 (_initialize_xml_utils): register test_xml_escape_text_append as
9226 * defs.h: Remove MAX_REGISTER_SIZE.
9227 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9229 * python/py-unwind.c (pyuw_sniffer): Likewise.
9233 * linux-tdep.c (linux_info_proc): Update.
9234 * target.h (struct target_ops) <to_fileio_readlink>: Return
9236 (target_fileio_readlink): Return optional<string>.
9237 * remote.c (remote_hostio_readlink): Return optional<string>.
9238 * inf-child.c (inf_child_fileio_readlink): Return
9240 * target.c (target_fileio_readlink): Return optional<string>.
9244 * regcache.c (cooked_read_test): Add riscv to the list of
9245 architectures that have a save_reggroup.
9249 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9250 value is not a dynamic class object.
9254 * rust-exp.y: Formatting fixes.
9258 * riscv-tdep.c (riscv_register_name): Remove target description
9260 (riscv_gdbarch_init): Remove target description check.
9264 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9266 * riscv-tdep.h: Likewise.
9270 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9271 (riscv_pseudo_register_write): Delete.
9272 (riscv_gdbarch_init): Remove all use of pseudo registers.
9276 * record-btrace.c (btrace_print_lines): Replace cleanup
9277 parameter with RAII equivalents.
9278 (btrace_insn_history): Replace cleanup with RAII equivalents.
9279 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9280 make_cleanup_ui_out_tuple_begin_end): Remove.
9281 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9282 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9283 make_cleanup_ui_out_list_begin_end): Remove.
9287 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9288 parameter types to std::vector. Use bool.
9289 (record_btrace_wait): Replace VEC(tp_t) with
9290 std::vector<thread_info *>.
9291 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9295 * record-btrace.c (record_btrace_disable_callback): Remove.
9296 (struct scoped_btrace_disable): New.
9297 (record_btrace_open): Use scoped_btrace_disable.
9301 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9302 reading values from registers.
9306 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9311 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9312 change parameter type. Use GDB's print functions, and use
9313 core_addr_to_string where appropriate.
9314 (riscv_push_dummy_call): Use core_addr_to_string where
9315 appropriate, update call to riscv_print_arg_location, and reindent
9317 (riscv_return_value): Update call to riscv_print_arg_location.
9324 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9325 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9326 (ALLDEPFILES): Add riscv-tdep.c
9327 * configure.tgt: Add riscv support.
9328 * riscv-tdep.c: New file.
9329 * riscv-tdep.h: New file.
9330 * NEWS: Mention new target.
9331 * MAINTAINERS: Add entry for riscv.
9335 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9336 fields within aggregates.
9340 * record-btrace.c (btrace_print_lines): Change type of flags to
9341 gdb_disassembly_flags.
9345 * fbsd-nat.c: Include "inf-ptrace.h".
9346 (USE_SIGTRAP_SIGINFO): Conditionally define.
9347 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9348 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9349 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9351 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9353 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9355 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9356 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9357 "supports_stopped_by_hw_breakpoint" target methods.
9361 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9362 * fbsd-nat.c (debug_fbsd_nat): New variable.
9363 (show_fbsd_nat_debug): New function.
9364 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9365 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9369 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9370 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9372 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9373 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9378 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9379 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9383 * charset.c (struct charset_vector): New.
9384 (charsets): Change type to charset_vector.
9385 (find_charset_names): Adjust.
9387 (_initialize_charset): Adjust.
9391 * progspace.h (struct program_space) <deleted_solibs>: Change
9392 type to std::vector<std::string>.
9393 * progspace.c (clear_program_space_solib_cache): Adjust.
9394 * breakpoint.c (print_solib_event): Adjust.
9395 (check_status_catch_solib): Adjust.
9396 * solib.c (update_solib_list): Adjust.
9397 * ui-out.h (class ui_out) <field_string>: New overload.
9398 * ui-out.c (ui_out::field_string): New overload.
9402 * progspace.h (struct program_space): Add constructor and
9403 destructor, initialize fields.
9404 (add_program_space): Remove.
9405 * progspace.c (add_program_space): Rename to...
9406 (program_space::program_space): ... this.
9407 (release_program_space): Rename to...
9408 (program_space::~program_space): ... this.
9409 (delete_program_space): Use delete to delete program_space.
9410 (initialize_progspace): Use new to allocate program_space.
9411 * inferior.c (add_inferior_with_spaces): Likewise.
9412 (clone_inferior_command): Likewise.
9413 * infrun.c (follow_fork_inferior): Likewise.
9414 (handle_vfork_child_exec_or_exit): Likewise.
9418 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9419 (delim_string_to_char_ptr_vec): Return std::vector of
9420 gdb::unique_xmalloc_ptr.
9421 (dirnames_to_char_ptr_vec_append): Take std::vector of
9422 gdb::unique_xmalloc_ptr.
9423 (dirnames_to_char_ptr_vec): Return std::vector of
9424 gdb::unique_xmalloc_ptr.
9425 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9426 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9427 (delim_string_to_char_ptr_vec): Return an std::vector of
9428 gdb::unique_xmalloc_ptr, adjust the code.
9429 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9430 gdb::unique_xmalloc_ptr, adjust the code.
9431 (dirnames_to_char_ptr_vec): Return an std::vector of
9432 gdb::unique_xmalloc_ptr, adjust the code.
9433 * auto-load.c (auto_load_safe_path_vec): Change type to
9434 std::vector of gdb::unique_xmalloc_ptr.
9435 (auto_load_expand_dir_vars): Return an std::vector of
9436 gdb::unique_xmalloc_ptr, adjust the code.
9437 (auto_load_safe_path_vec_update): Adjust.
9438 (filename_is_in_auto_load_safe_path_vec): Adjust.
9439 (auto_load_objfile_script_1): Adjust.
9440 * build-id.c (build_id_to_debug_bfd): Adjust.
9441 * linux-thread-db.c (thread_db_load_search): Adjust.
9442 * source.c (add_path): Adjust.
9444 * symfile.c (find_separate_debug_file): Adjust.
9445 * utils.c (do_free_char_ptr_vec): Remove.
9446 (make_cleanup_free_char_ptr_vec): Remove.
9451 * common/pathstuff.c: Conditionally include "<windows.h>".
9456 * gcore.in: Quote variables and switch interpreter to bash.
9460 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9461 assertion. Add assertion for discriminant_index.
9462 (quirk_rust_enum): Use correct base type name in univariant case.
9466 * record.c (get_call_history_modifiers): Return a
9468 (cmd_record_call_history): Adjust.
9469 * record-btrace.c (record_btrace_call_history): Adjust.
9470 (record_btrace_call_history_range): Adjust.
9471 (record_btrace_call_history_from): Adjust.
9472 * target-debug.h (target_debug_print_record_print_flags): New.
9473 * target-delegates.c: Re-generate.
9474 * target.c (target_call_history): Change flags type.
9475 (target_call_history_from): Likewise.
9476 (target_call_history_range): Likewise.
9477 * target.h (struct target_ops) <target_call_history>: Likewise.
9478 (target_call_history_from): Likewise.
9479 (target_call_history_range): Likewise.
9484 * common/common-utils.c: Include "sys/stat.h".
9485 (is_regular_file): Move here from "source.c"; change return
9487 * common/common-utils.h (is_regular_file): New prototype.
9488 * common/pathstuff.c (contains_dir_separator): New function.
9489 * common/pathstuff.h (contains_dir_separator): New prototype.
9490 * source.c: Don't include "sys/stat.h".
9491 (is_regular_file): Move to "common/common-utils.c".
9495 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9496 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9497 * auto-load.c: Include "common/pathstuff.h".
9498 * common/common-def.h (current_directory): Move here.
9499 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9501 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9503 * common/pathstuff.c: New file.
9504 * common/pathstuff.h: New file.
9505 * compile/compile.c: Include "common/pathstuff.h".
9506 * defs.h (current_directory): Move to "common/common-defs.h".
9507 * dwarf2read.c: Include "common/pathstuff.h".
9509 * guile/scm-safe-call.c: Likewise.
9510 * linux-thread-db.c: Likewise.
9512 * nto-tdep.c: Likewise.
9513 * objfiles.c: Likewise.
9514 * source.c: Likewise.
9515 * symtab.c: Likewise.
9516 * utils.c: Include "common/pathstuff.h".
9517 (gdb_realpath): Move to "common/pathstuff.c".
9518 (gdb_realpath_keepfile): Likewise.
9519 (gdb_abspath): Likewise.
9520 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9521 (gdb_realpath_keepfile): Likewise.
9522 (gdb_abspath): Likewise.
9526 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9527 wildcard process pid for super_resume for kernels with a
9532 * compile/compile.c (get_args): Add additional comments
9533 explaining function.
9538 * target.h (memory_write_request_s): Remove typedef. Don't define
9540 (target_write_memory_blocks): Change argument to std::vector.
9541 (struct memory_write_request): Add constructor.
9542 * target-memory.c (compare_block_starting_address): Return bool.
9543 Change argument types.
9544 (claim_memory): Change arguments to use std::vector.
9545 (split_regular_and_flash_blocks, blocks_to_erase)
9546 (compute_garbled_blocks): Likewise.
9547 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9548 (target_write_memory_blocks): Change argument to std::vector.
9549 * symfile.c (struct load_section_data): Add constructor and
9550 destructor. Use std::vector for "requests".
9551 (struct load_progress_data): Add initializers.
9552 (load_section_callback): Update. Use "new".
9553 (clear_memory_write_data): Remove.
9554 (generic_load): Update.
9558 * arch/aarch64.h: Use common/tdesc.h.
9562 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9563 architecture with a 64-bit ABI.
9567 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9568 ahead of target description loading.
9572 * stack.c (backtrace_command_1): Update.
9573 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9575 * python/py-framefilter.c (py_print_frame)
9576 (gdbpy_apply_frame_filter): Change type of "flags".
9577 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9579 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9580 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9581 * extension.h (enum frame_filter_flag): Rename from
9583 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9584 (apply_ext_lang_frame_filter): Change type of "flags".
9585 * extension.c (apply_ext_lang_frame_filter): Change type of
9587 * extension-priv.h (struct extension_language_ops)
9588 <apply_frame_filter>: Change type of "flags".
9593 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9594 off-by-one in py_end computation.
9595 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9597 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9602 * dwarf2read.c (struct variant_field): New.
9603 (struct nextfield) <variant>: New field.
9604 (dwarf2_add_field): Handle DW_TAG_variant_part.
9605 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9606 discriminated union.
9607 (read_structure_type): Handle DW_TAG_variant_part.
9608 (handle_struct_member_die): New function, extracted from
9609 process_structure_scope. Handle DW_TAG_variant.
9610 (process_structure_scope): Handle discriminated unions. Call
9611 handle_struct_member_die.
9615 * rust-lang.h (rust_last_path_segment): Declare.
9616 * rust-lang.c (rust_last_path_segment): Now public. Change
9618 (struct disr_info): Remove.
9619 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9620 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9621 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9622 (rust_enum_p, rust_enum_variant): New function.
9623 (rust_underscore_fields): Remove "offset" parameter.
9624 (rust_print_enum): New function.
9625 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9626 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9627 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9629 (rust_internal_print_type): New function, from rust_print_type.
9631 (rust_print_type): Call rust_internal_print_type.
9632 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9633 Update enum handling.
9634 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9635 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9636 (rust_union_quirks): New functions.
9637 (process_full_comp_unit, process_full_type_unit): Call
9639 (process_structure_scope): Update rust_unions if necessary.
9643 * value.h (value_union_variant): Declare.
9644 * valops.c (value_union_variant): New function.
9645 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9646 (struct discriminant_info): New.
9647 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9649 (struct main_type) <flag_discriminated_union>: New field.
9653 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9654 unittests/unpack-selftests.c.
9655 * unittests/unpack-selftests.c: New file.
9656 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9660 * dwarf2read.c (struct partial_die_info) <read>: New method.
9661 (read_partial_die): Remove the declaration.
9662 (load_partial_dies): Update.
9663 (partial_die_info::partial_die_info):
9664 (read_partial_die): Change it to partial_die_info::read.
9668 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9669 (fixup_partial_die): Remove declaration.
9670 (scan_partial_symbols): Update.
9671 (partial_die_parent_scope): Likewise.
9672 (partial_die_full_name): Likewise.
9673 (fixup_partial_die): Change it to partial_die_info::fixup.
9677 * dwarf2read.c (read_partial_die): Update the declaration.
9678 (load_partial_dies): Caller update.
9679 (read_partial_die): Remove one argument abbrev_len.
9683 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9684 assignment operator.
9685 (load_partial_dies): Use ctor and copy ctor.
9686 (read_partial_die): Update.
9687 (dwarf2_cu::find_partial_die): Use ctor.
9691 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9692 (find_partial_die_in_comp_unit): Change it to
9693 dwarf2_cu::find_partial_die.
9694 (find_partial_die): Update.
9698 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9703 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9707 * arch/amd64.h: Use common/tdesc.h.
9708 * arch/i386.c: Likewise.
9709 * arch/i386.h: Likewise.
9710 * arch/tic6x.c: Likewise.
9711 * arch/tdesc.h: Move file from here...
9712 * common/tdesc.h: ...to here.
9713 * features/aarch64-core.c: Regenerate.
9714 * features/aarch64-fpu.c: Regenerate.
9715 * features/i386/32bit-avx.c: Regenerate.
9716 * features/i386/32bit-avx512.c: Regenerate.
9717 * features/i386/32bit-core.c: Regenerate.
9718 * features/i386/32bit-linux.c: Regenerate.
9719 * features/i386/32bit-mpx.c: Regenerate.
9720 * features/i386/32bit-pkeys.c: Regenerate.
9721 * features/i386/32bit-sse.c: Regenerate.
9722 * features/i386/64bit-avx.c: Regenerate.
9723 * features/i386/64bit-avx512.c: Regenerate.
9724 * features/i386/64bit-core.c: Regenerate.
9725 * features/i386/64bit-linux.c: Regenerate.
9726 * features/i386/64bit-mpx.c: Regenerate.
9727 * features/i386/64bit-pkeys.c: Regenerate.
9728 * features/i386/64bit-segments.c: Regenerate.
9729 * features/i386/64bit-sse.c: Regenerate.
9730 * features/i386/x32-core.c: Regenerate.
9731 * features/tic6x-c6xp.c: Regenerate.
9732 * features/tic6x-core.c: Regenerate.
9733 * features/tic6x-gp.c: Regenerate.
9734 * target-descriptions.c: Use common/tdesc.h.
9735 * target-descriptions.h: Likewise.
9739 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9740 (try_thread_db_load_from_dir, thread_db_load_search): Use
9742 (info_auto_load_libthread_db_compare): Return bool. Change
9744 (info_auto_load_libthread_db): Use std::vector, std::string.
9749 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9751 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9753 * gdbarch.c: Rebuild.
9754 * gdbarch.h: Rebuild.
9755 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9756 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9757 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9762 * gdbtypes.h (sect_offset): Change type to uint64_t.
9763 (sect_offset_str): New function.
9764 * dwarf2read.c (create_addrmap_from_aranges): Use
9766 (error_check_comp_unit_head): Likewise.
9767 (create_debug_type_hash_table): Likewise.
9768 (read_cutu_die_from_dwo): Likewise.
9769 (init_cutu_and_read_dies): Likewise.
9770 (init_cutu_and_read_dies_no_follow): Likewise.
9771 (process_psymtab_comp_unit_reader): Likewise.
9772 (partial_die_parent_scope): Likewise.
9773 (peek_die_abbrev): Likewise.
9774 (process_queue): Likewise.
9775 (dwarf2_physname): Likewise.
9776 (read_namespace_alias): Likewise.
9777 (read_import_statement): Likewise.
9778 (create_dwo_cu_reader): Likewise.
9779 (create_cus_hash_table): Likewise.
9780 (lookup_dwo_cutu): Likewise.
9781 (inherit_abstract_dies): Likewise.
9782 (read_func_scope): Likewise.
9783 (read_call_site_scope): Likewise.
9784 (dwarf2_add_member_fn): Likewise.
9785 (read_common_block): Likewise.
9786 (read_module_type): Likewise.
9787 (read_typedef): Likewise.
9788 (read_subrange_type): Likewise.
9789 (load_partial_dies): Likewise.
9790 (read_partial_die): Likewise.
9791 (find_partial_die): Likewise.
9792 (read_str_index): Likewise.
9793 (dwarf2_string_attr): Likewise.
9794 (build_error_marker_type): Likewise.
9795 (lookup_die_type): Likewise.
9796 (dump_die_shallow): Likewise.
9797 (follow_die_ref): Likewise.
9798 (dwarf2_fetch_die_loc_sect_off): Likewise.
9799 (dwarf2_fetch_constant_bytes): Likewise.
9800 (follow_die_sig): Likewise.
9801 (get_signatured_type): Likewise.
9802 (get_DW_AT_signature_type): Likewise.
9803 (dwarf2_find_containing_comp_unit): Likewise.
9804 (set_die_type): Likewise.
9808 * arch/aarch64.c: Include "common-defs.h".
9809 * arch/amd64.c: Likewise.
9810 * arch/i386.c: Likewise.
9814 * value.h: (extract_field_op): Update.
9815 * eval.c (extract_field_op): Return a const char *.
9816 * expression.h (parse_expression_for_completion): Update.
9817 * completer.c (complete_expression): Update.
9818 (add_struct_fields): Make fieldname const.
9819 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9820 (mark_completion_tag, parse_exp_in_context_1): Update.
9821 (parse_expression_for_completion): Change "name" to
9822 unique_xmalloc_ptr*.
9826 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9830 * avr-tdep.c (avr_read_pc): Change parameter type to
9832 * gdbarch.sh (read_pc): Likewise.
9833 * gdbarch.c: Re-generated.
9834 * gdbarch.h: Re-generated.
9835 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9837 * ia64-tdep.c (ia64_read_pc): Likewise.
9838 * mips-tdep.c (mips_read_pc): Likewise.
9839 * spu-tdep.c (spu_read_pc): Likewise.
9843 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9844 * regcache-dump.c: New file.
9845 * regcache.c: Move register_dump to regcache-dump.c.
9846 (maintenance_print_registers): Likewise.
9847 (maintenance_print_raw_registers): Likewise.
9848 (maintenance_print_cooked_registers): Likewise.
9849 (maintenance_print_register_groups): Likewise.
9850 (maintenance_print_remote_registers): Likewise.
9851 (_initialize_regcache): Likewise.
9852 * regcache.h (register_dump): Moved from regcache.c.
9856 * regcache.c (regcache::regcache): Update.
9857 (regcache::invalidate): Move it to detached_regcache::invalidate.
9858 (get_thread_arch_aspace_regcache): Update.
9859 (regcache::raw_update): Update.
9860 (regcache::cooked_read): Remove some code.
9861 (regcache::cooked_read_value): Likewise.
9862 (regcache::raw_write): Remove assert on m_readonly_p.
9863 (regcache::raw_supply_integer): Move it to
9864 detached_regcache::raw_supply_integer.
9865 (regcache::raw_supply_zeroed): Likewise.
9866 * regcache.h (detached_regcache) <raw_supply_integer>: New
9868 <raw_supply_zeroed, invalidate>: Likewise.
9869 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9870 <invalidate>: Likewise.
9871 <m_readonly_p>: Removed.
9875 * infcmd.c (get_return_value): Let stop_regs point to
9876 get_current_regcache.
9877 * regcache.c (regcache::regcache): Remove.
9878 (register_dump_reg_buffer): New class.
9879 (regcache_print): Adjust.
9880 * regcache.h (regcache): Remove constructors.
9884 * regcache.c (class register_dump): New class.
9885 (register_dump_regcache, register_dump_none): New class.
9886 (register_dump_remote, register_dump_groups): New class.
9887 (regcache_print): Update.
9888 * regcache.h (regcache_dump_what): Move it to regcache.c.
9889 (regcache) <dump>: Remove.
9893 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9895 (jit_unwind_reg_set_impl): Call raw_supply.
9896 (jit_frame_sniffer): Use reg_buffer_rw.
9897 * record-full.c (record_full_core_regbuf): Change its type.
9898 (record_full_core_open_1): Use reg_buffer_rw.
9899 (record_full_close): Likewise.
9900 (record_full_core_fetch_registers): Use regcache->raw_supply.
9901 (record_full_core_store_registers): Likewise.
9902 * regcache.c (regcache::get_register_status): Move it to
9904 (regcache_raw_set_cached_value): Remove.
9905 (regcache::raw_set_cached_value): Remove.
9906 (regcache::raw_write): Call raw_supply.
9907 (regcache::raw_supply): Move it to reg_buffer_rw.
9908 * regcache.h (regcache_raw_set_cached_value): Remove.
9909 (reg_buffer_rw): New class.
9913 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9914 readonly_detached_regcache.
9915 (dummy_frame_prev_register): Use regcache->cooked_read.
9916 * frame.c (frame_save_as_regcache): Change return type.
9917 (frame_pop): Update.
9918 * frame.h (frame_save_as_regcache): Update declaration.
9919 * inferior.h (get_infcall_suspend_state_regcache): Update
9921 * infrun.c (infcall_suspend_state) <registers>: use
9922 readonly_detached_regcache.
9923 (save_infcall_suspend_state): Don't use regcache_dup.
9924 (get_infcall_suspend_state_regcache): Change return type.
9925 * linux-fork.c (struct fork_info) <savedregs>: Change to
9926 readonly_detached_regcache.
9928 (fork_save_infrun_state): Don't use regcache_dup.
9929 (info_checkpoints_command): Adjust.
9930 * mi/mi-main.c (register_changed_p): Update declaration.
9931 (mi_cmd_data_list_changed_registers): Use
9932 readonly_detached_regcache.
9933 (register_changed_p): Change parameter type to
9934 readonly_detached_regcache.
9935 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9936 readonly_detached_regcache.
9937 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9938 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9940 (regcache::save): Move it to reg_buffer.
9941 (regcache::restore): Change parameter type.
9942 (regcache_dup): Remove.
9943 * regcache.h (reg_buffer) <save>: New method.
9944 (readonly_detached_regcache): New class.
9945 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9946 readonly_detached_regcache.
9947 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9951 * frame.c (frame_save_as_regcache): Use regcache method save.
9952 (frame_pop): Use regcache method restore.
9953 * infrun.c (restore_infcall_suspend_state): Likewise.
9954 * linux-fork.c (fork_load_infrun_state): Likewise.
9955 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9957 * regcache.c (regcache_save): Remove.
9958 (regcache::restore): More asserts.
9959 (regcache_cpy): Remove.
9960 * regcache.h (regcache_save): Remove the declaration.
9961 (regcache::restore): Move from private to public.
9962 Remove the friend declaration of regcache_cpy.
9963 (regcache_cpy): Remove declaration.
9967 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9968 parameter type to 'readable_regcache *'.
9969 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9970 * arm-tdep.c (arm_neon_quad_read): Likewise.
9971 (arm_pseudo_read): Likewise.
9972 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9973 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9974 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9975 * gdbarch.c: Re-generated.
9976 * gdbarch.h: Re-generated.
9977 * gdbarch.sh (pseudo_register_read): Change parameter type to
9978 'readable_regcache *'.
9979 (pseudo_register_read_value): Likewise.
9980 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9981 (h8300_pseudo_register_read): Likewise.
9982 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9983 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9984 (i386_pseudo_register_read_into_value): Likewise.
9985 (i386_pseudo_register_read_value): Likewise.
9986 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9988 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9989 * m32c-tdep.c (m32c_raw_read): Likewise.
9990 (m32c_read_flg): Likewise.
9991 (m32c_banked_register): Likewise.
9992 (m32c_banked_read): Likewise.
9993 (m32c_sb_read): Likewise.
9994 (m32c_part_read): Likewise.
9995 (m32c_cat_read): Likewise.
9996 (m32c_r3r2r1r0_read): Likewise.
9997 (m32c_pseudo_register_read): Likewise.
9998 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9999 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10000 (mep_pseudo_cr64_read): Likewise.
10001 (mep_pseudo_register_read): Likewise.
10002 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10003 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10004 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10005 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10006 (regcache::cooked_read): Likewise.
10007 (regcache::cooked_read_value): Likewise.
10008 (regcache_cooked_read_signed):
10009 (regcache::cooked_read): Likewise.
10010 * regcache.h (readable_regcache): New class.
10011 (regcache): Inherit readable_regcache. Move some methods to
10013 * rl78-tdep.c (rl78_pseudo_register_read): Change
10014 parameter type to 'readable_regcache *'.
10015 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10016 (e500_pseudo_register_read): Change parameter type to
10017 'readable_regcache *'.
10018 (dfp_pseudo_register_read): Likewise.
10019 (vsx_pseudo_register_read): Likewise.
10020 (efpr_pseudo_register_read): Likewise.
10021 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10022 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10023 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10024 (sh64_pseudo_register_read): Likewise.
10025 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10026 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10027 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10028 (spu_pseudo_register_read): Likewise.
10029 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10030 (xtensa_pseudo_register_read): Likewise.
10034 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10035 (regcache::arch): Move it to reg_buffer::arch.
10036 (regcache::register_buffer): Likewise.
10037 (regcache::assert_regnum): Likewise.
10038 (regcache::num_raw_registers): Likewise.
10039 * regcache.h (reg_buffer): New class.
10040 (regcache): Inherit reg_buffer.
10044 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10045 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10049 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10053 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10054 (SFILES): Remove common/*.c files.
10055 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10056 * common/common.host: Add common reference.
10057 * configure.ac: Likewise.
10058 * configure: Regenerate.
10062 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10063 (block_initialize_namespace): Use new.
10064 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10065 (dwarf2_free_objfile): Use delete.
10066 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10067 (copy_type_recursive): Use new.
10068 * gdb_obstack.h (allocate_on_obstack): New.
10073 * inferior.c (exit_inferior_1): Reset inf->control.
10077 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10082 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10083 frame_cleanup_after_sniffer on exception.
10087 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10089 (solib_bfd_open): Make pathname const.
10090 * solib.c (solib_bfd_open): Make pathname const.
10091 * solib-spu.c (spu_bfd_fopen): Make name const.
10092 (spu_bfd_open): Make pathname const.
10093 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10094 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10098 * symfile.c (symfile_bfd_open): Update.
10099 * source.h (openp, source_full_path_of, find_and_open_source):
10100 Change argument type to unique_xmalloc_ptr.
10101 * source.c (openp): Take a unique_xmalloc_ptr.
10102 (source_full_path_of, find_and_open_source): Likewise.
10103 (open_source_file, symtab_to_fullname): Update.
10104 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10105 unique_xmalloc_ptr.
10106 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10107 (exec_file_find): Update.
10108 * psymtab.c (psymtab_to_fullname): Update.
10109 * nto-tdep.h (nto_find_and_open_solib): Update.
10110 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10111 unique_xmalloc_ptr.
10112 * exec.c (exec_file_attach): Update.
10113 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10114 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10118 * solib.c: Include source.h.
10119 * nto-tdep.c: Include source.h.
10120 * mi/mi-cmd-env.c: Include source.h.
10121 * infcmd.c: Include source.h.
10122 * exec.c: Include source.h.
10123 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10124 (add_path, directory_switch, source_path, init_source_path): Move
10126 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10127 (add_path, directory_switch, source_path, init_source_path):
10132 * solist.h (exec_file_find, solib_find): Return
10133 unique_xmalloc_ptr.
10134 (solib_bfd_fopen): Take a const char *.
10135 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10136 (exec_file_find, solib_find): Likewise.
10137 (solib_bfd_fopen): Do not take ownership of "pathname".
10138 (solib_bfd_open): Use unique_xmalloc_ptr.
10139 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10140 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10141 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10142 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10146 * ada-lang.c (name_match_type_from_name): Remove reference to
10147 ada_name_for_lookup in function's documentation.
10148 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10152 * defs.h (enum openp_flags): New enum.
10153 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10154 Move to enum openp_flags.
10155 (openp_flags): New enum flags.
10156 (openp): Change parameter type to openp_flags.
10157 * source.c (openp): Change parameter type to openp_flags.
10158 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10159 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10163 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10168 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10170 (class dwarf2_queue_guard): ...the destructor of this new class.
10171 (dw2_do_instantiate_symtab): Create instance of the new class
10172 dwarf2_queue_guard, remove cleanup.
10176 * source.c (find_source_lines): Don't reference past the end of
10181 * remote.c (remote_btrace_maybe_reopen): Change error message.
10182 * btrace.c (btrace_enable): Likewise.
10183 (parse_xml_btrace): Likewise.
10184 (parse_xml_btrace_conf): Likewise.
10188 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10189 (linux_enable_pt, linux_enable_bts): Call
10190 diagnose_perf_event_open_fail.
10194 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10195 Remove parameter and change return type. Update callers. Move it.
10196 (linux_enable_bts, linux_enable_pt): Improve error message.
10197 (linux_enable_pt): Remove zero buffer size check.
10198 (linux_enable_btrace): Improve error messages. Remove NULL return
10203 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10204 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10205 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10206 (linux_supports_pt, linux_supports_btrace): Remove.
10207 (linux_enable_bts): Call cpu_supports_bts.
10208 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10209 * remote.c (remote_supports_btrace): Remove.
10210 (init_remote_ops): Remove remote_supports_btrace.
10211 * target-delegates.c: Regenerated.
10212 * target.c (target_supports_btrace): Remove.
10213 * target.h (target_ops) <to_supports_btrace>: Remove
10214 (target_supports_btrace): Remove.
10215 * x86-linux-nat.c (x86_linux_create_target): Remove
10216 linux_supports_btrace.
10220 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10222 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10223 exception and use message in own exception.
10227 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10228 (perf_event_pt_event_type): Use gdb_file_up.
10229 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10230 scoped_fd, and scoped_mmap.
10234 * common/scoped_mmap.h: New.
10235 * unittests/scoped_mmap-selftest.c: New.
10236 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10237 unittests/scoped_mmap-selftest.c.
10241 * common/scoped_fd.h: New.
10242 * unittests/scoped_fd-selftest.c: New.
10243 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10244 unittests/scoped_fd-selftest.c.
10248 * auto-load.c (auto_load_section_scripts): Use
10249 gdb::unique_xmalloc_ptr.
10253 * auto-load.c (execute_script_contents): Use std::string.
10257 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10258 Python function, rather than a new command.
10262 * solib.c (solib_find_1): Use std::string.
10263 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10267 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10271 * source.c (find_source_lines): Use gdb::def_vector.
10275 * macrocmd.c (struct temporary_macro_definition): New.
10276 (macro_define_command): Use temporary_macro_definition. Remove
10278 (free_macro_definition_ptr): Remove.
10282 * macroexp.c (maybe_expand): Use std::string.
10286 * macroexp.c (struct macro_buffer): Add initializers for some
10288 (init_buffer, init_shared_buffer, free_buffer)
10289 (free_buffer_return_text): Remove.
10290 (macro_buffer): New constructors.
10291 (~macro_buffer): New destructor.
10292 (macro_buffer::set_shared): New method.
10293 (macro_buffer::resize_buffer, macro_buffer::appendc)
10294 (macro_buffer::appendmem): Now methods, not free functions.
10295 (set_token, append_tokens_without_splicing, stringify)
10296 (macro_stringify): Update.
10297 (gather_arguments): Change return type. Remove argc_p argument,
10298 add args_ptr argument. Use std::vector.
10299 (substitute_args): Remove argc argument. Accept std::vector.
10300 (expand): Update. Use std::vector.
10301 (scan, macro_expand, macro_expand_next): Update.
10305 * symtab.c (default_collect_symbol_completion_matches_break_on):
10306 Use unique_xmalloc_ptr.
10307 * macroscope.h: (sal_macro_scope, user_macro_scope)
10308 (default_macro_scope): Return unique_xmalloc_ptr.
10309 * macroscope.c (sal_macro_scope, user_macro_scope)
10310 (default_macro_scope): Return unique_xmalloc_ptr.
10311 * macroexp.h (macro_expand, macro_expand_once): Return
10312 unique_xmalloc_ptr.
10313 * macroexp.c (macro_expand, macro_expand_once): Return
10314 unique_xmalloc_ptr.
10315 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10316 (info_macro_command, info_macros_command): Use
10317 unique_xmalloc_ptr.
10318 * compile/compile-c-support.c (write_macro_definitions): Use
10319 unique_xmalloc_ptr.
10320 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10324 * value.c (value_static_field): Assign field type instead of
10325 containing type when returning an optimized out value.
10329 * ft32-tdep.c (ft32_read_pc): Remove.
10330 (ft32_write_pc): Remove.
10331 (ft32_gdbarch_init): Update.
10332 * m32r-tdep.c (m32r_read_pc): Remove.
10333 (m32r_gdbarch_init): Update.
10334 * mep-tdep.c (mep_read_pc): Remove.
10335 (mep_gdbarch_init): Update.
10336 * microblaze-tdep.c (microblaze_write_pc): Remove.
10337 (microblaze_gdbarch_init): Update.
10338 * mn10300-tdep.c (mn10300_read_pc): Remove.
10339 (mn10300_write_pc): Remove.
10340 (mn10300_gdbarch_init): Update.
10341 * moxie-tdep.c (moxie_read_pc): Remove.
10342 (moxie_write_pc): Remove.
10343 (moxie_gdbarch_init): Update.
10347 * expprint.c (print_subexp_standard): Handle
10348 OP_F77_UNDETERMINED_ARGLIST.
10349 (dump_subexp_body_standard): Likewise.
10353 * target-descriptions.c (tdesc_element_visitor) Add empty
10355 (tdesc_type): Move make_gdb_type from here.
10356 (tdesc_type_builtin): Likewise.
10357 (tdesc_type_vector): Likewise.
10358 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10359 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10360 (make_gdb_type_union): Likewise.
10361 (make_gdb_type_flags): Likewise.
10362 (make_gdb_type_enum): Likewise.
10363 (make_gdb_type): New function.
10364 (tdesc_register_type): Use static make_gdb_type.
10368 * infcmd.c (default_print_one_register_info): Align natural-format
10369 column values consistently one under another.
10370 (pad_to_column): New function.
10374 * dwarf2read.c (dwarf2_physname): Move commment.
10378 * varobj.c (varobj_formatted_print_options): Allow recursive
10379 pretty printing if pretty printing is enabled.
10383 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10384 names after a structop as a filename.
10388 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10389 (arm_record_coproc_data_proc): Likewise.
10393 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10397 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10398 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10402 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10403 * inflow.c (child_terminal_save_inferior): Wrap reference to
10404 tcgetpgrp in HAVE_TERMIOS_H.
10405 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10407 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10408 always iterate over all inferiors.
10409 (gdbsim_cntrl_c): Adjust.
10410 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10414 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10415 index type is objfile-owned if the element type is as well.
10423 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10424 "features/s390x-linux64.c".
10425 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10426 s390_linux32 and s390x_linux64.
10427 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10429 * s390-tdep.c: Include "features/s390-linux32.c" and
10430 "features/s390x-linux64.c".
10431 (s390_tdesc_valid): Add check for tdesc_has_registers.
10432 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10433 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10434 tdesc_s390x_linux64.
10435 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10436 tdesc_s390x_linux64 to...
10437 * s390-tdep.h: ...here.
10442 * config.in, configure: Regenerate.
10443 * configure.ac: Check for getpgid.
10444 * go32-nat.c (go32_pass_ctrlc): New.
10445 (go32_target): Install it.
10446 * inf-child.c (inf_child_target): Install
10447 child_terminal_save_inferior, child_pass_ctrlc and
10449 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10450 (inf_ptrace_target): No longer install it.
10451 * infcmd.c (interrupt_target_1): Adjust.
10452 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10453 (child_interrupt): Declare.
10454 (inferior::terminal_state): New.
10455 * inflow.c (struct terminal_info): Update comments.
10456 (inferior_process_group): Delete.
10457 (terminal_is_ours): Delete.
10458 (gdb_tty_state): New.
10459 (child_terminal_init): Adjust.
10460 (is_gdb_terminal, sharing_input_terminal_1)
10461 (sharing_input_terminal): New functions.
10462 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10463 Set the process's actual process group in the foreground if
10464 possible. Handle is_ours_for_output/is_ours distinction. Don't
10465 mark terminal as the inferior's if not sharing GDB's terminal.
10466 Don't check attach_flag.
10467 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10468 pass down a target_terminal_state.
10469 (child_terminal_save_inferior): New, factored out from ...
10470 (child_terminal_ours_1): ... this. Handle
10471 target_terminal_state::is_ours_for_output.
10472 (child_interrupt, child_pass_ctrlc): New.
10473 (inflow_inferior_exit): Clear the inferior's terminal_state.
10474 (copy_terminal_info): Copy the inferior's terminal state.
10475 (_initialize_inflow): Remove reference to terminal_is_ours.
10476 * inflow.h (inferior_process_group): Delete.
10477 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10478 * procfs.c (procfs_target): Don't install procfs_interrupt.
10479 (procfs_interrupt): Delete.
10480 * remote.c (remote_serial_quit_handler): Adjust.
10481 (remote_interrupt): Remove ptid parameter. Adjust.
10482 * target-delegates.c: Regenerate.
10483 * target.c: Include "terminal.h".
10484 (target_terminal::terminal_state): Rename to ...
10485 (target_terminal::m_terminal_state): ... this.
10486 (target_terminal::init): Adjust.
10487 (target_terminal::inferior): Adjust to per-inferior
10489 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10490 (target_terminal::ours, target_terminal::ours_for_output): Use
10491 target_terminal_is_ours_kind.
10492 (target_interrupt): Remove ptid parameter. Adjust.
10493 (default_target_pass_ctrlc): Adjust.
10494 * target.h (target_ops::to_terminal_save_inferior): New field.
10495 (target_ops::to_interrupt): Remove ptid_t parameter.
10496 (target_interrupt): Remove ptid_t parameter. Update comment.
10497 (target_pass_ctrlc): Update comment.
10498 * target/target.h (target_terminal_state): New scoped enum,
10499 factored out of ...
10500 (target_terminal::terminal_state): ... here.
10501 (target_terminal::inferior): Update comments.
10502 (target_terminal::restore_inferior): New.
10503 (target_terminal::is_inferior, target_terminal::is_ours)
10504 (target_terminal::is_ours_for_output): Adjust.
10505 (target_terminal::scoped_restore_terminal_state): Adjust to
10506 rename, and call restore_inferior() instead of inferior().
10507 (target_terminal::scoped_restore_terminal_state::m_state): Change
10509 (target_terminal::terminal_state): Rename to ...
10510 (target_terminal::m_terminal_state): ... this and change type.
10514 * linux-nat.c (wait_for_signal): New function.
10515 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10517 (async_terminal_is_ours)
10518 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10519 (linux_nat_add_target): Don't override
10520 to_terminal_inferior/to_terminal_ours.
10524 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10528 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10529 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10530 dwarf2_per_objfile_free here.
10531 (dwarf2_per_objfile_free): Remove.
10532 (_initialize_dwarf2_read): Don't register
10533 dwarf2_per_objfile_free as a registry cleanup.
10537 Avoid compilation errors in MinGW native builds
10539 The error is triggered by including python-internal.h, and the
10542 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10543 from build-gnulib/import/math.h:27,
10544 from d:/usr/Python26/include/pyport.h:235,
10545 from d:/usr/Python26/include/Python.h:58,
10546 from python/python-internal.h:94,
10547 from python/py-arch.c:24:
10548 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10552 This happens because Python headers define 'hypot' to expand t
10553 '_hypot' in the Windows builds.
10554 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10555 'hypoth'. This avoids a compilation error.
10559 * MAINTAINERS (Write After Approval): Fix ordering.
10563 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10567 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10568 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10569 Remove nop. Make const. Comment.
10570 (powerpc32_plt_stub_so_2): New.
10571 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10572 Correct count. Update uses.
10573 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10574 Move common code reading PLT entry word. Correct
10575 powerpc32_plt_stub PLT address calculation.
10576 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10577 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10578 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10579 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10580 (ppc64_standard_linkage8): Likewise.
10581 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10582 Correct insns description.
10583 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10587 GCC PR libstdc++/83906
10588 * gdbtypes.c (operator==(const dynamic_prop &,
10589 const dynamic_prop &)): New.
10590 (operator==(const range_bounds &, const range_bounds &)): New.
10591 (check_types_equal): Use them instead of memcmp.
10592 * gdbtypes.h (operator==(const dynamic_prop &,
10593 const dynamic_prop &)): Declare.
10594 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10595 (operator==(const range_bounds &, const range_bounds &)): Declare.
10596 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10600 * s390-linux-tdep.c (s390_record_address_mask)
10601 (s390_record_calc_disp_common, s390_record_calc_disp)
10602 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10603 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10604 (s390_process_record): Move to s390-tdep.c.
10605 (s390_linux_init_abi_any): Adjust.
10606 * s390-tdep.c (s390_record_address_mask)
10607 (s390_record_calc_disp_common, s390_record_calc_disp)
10608 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10609 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10610 (s390_process_record): Moved from s390-linux-tdep.c
10611 (s390_gdbarch_init): Adjust.
10615 * s390-linux-nat.c (s390-tdep.h): New include.
10616 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10617 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10618 (ALLDEPFILES): Add s390-tdep.c.
10619 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10620 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10621 * s390-tdep.h: ...this. New file.
10622 * s390-linux-tdep.c (s390-tdep.h): New include.
10623 (_initialize_s390_tdep): Rename to...
10624 (_initialize_s390_linux_tdep): ...this and adjust.
10625 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10626 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10628 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10629 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10630 (s390_is_partial_instruction, s390_software_single_step)
10631 (is_non_branch_ril, s390_displaced_step_copy_insn)
10632 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10633 (s390_prologue_data, s390_addr, s390_store, s390_load)
10634 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10635 (s390_register_call_saved, s390_guess_tracepoint_registers)
10636 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10637 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10638 (s390_pseudo_register_name, s390_pseudo_register_type)
10639 (s390_pseudo_register_read, s390_pseudo_register_write)
10640 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10641 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10642 (s390_addr_bits_remove, s390_address_class_type_flags)
10643 (s390_address_class_type_flags_to_name)
10644 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10645 (s390_function_arg_float, s390_function_arg_vector)
10646 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10647 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10648 (s390_frame_align, s390_register_return_value, s390_return_value)
10649 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10650 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10651 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10652 (s390_trad_frame_prev_register, s390_unwind_cache)
10653 (s390_prologue_frame_unwind_cache)
10654 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10655 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10656 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10657 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10658 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10659 (s390_frame_base_address, s390_local_base_address)
10660 (s390_frame_base, s390_gcc_target_options)
10661 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10662 (s390_validate_reg_range, s390_tdesc_valid)
10663 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10664 * s390-tdep.c: ...this. New file.
10668 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10669 (s390_process_record, s390_gdbarch_tdep_alloc)
10670 (s390_linux_init_abi_any): Use/set new hook.
10674 * s390-linux-tdep.c (osabi.h): New include.
10675 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10676 (s390_linux_init_abi_any): New functions.
10677 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10681 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10682 tdesc_has_registers check
10686 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10687 (s390_validate_reg_range): New macro.
10688 (s390_gdbarch_init): Adjust.
10692 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10693 (s390_gdbarch_tdep_alloc): Adjust.
10694 (s390_gdbarch_init): Adjust.
10698 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10699 <have_tdb>: Change type to bool.
10700 (s390_gdbarch_tdep_alloc): Adjust.
10701 (s390_gdbarch_init): Adjust.
10705 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10706 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10707 (s390_gdbarch_tdep_alloc): New function.
10708 (s390_gdbarch_init): Allocate tdep at start and use its fields
10709 instead of separate variables.
10713 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10714 when looking for cached gdbarch and add comment for remaining.
10719 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10724 * MAINTAINERS: Update my company e-mail address.
10728 * regcache.c (cooked_write_test): New function.
10729 (_initialize_regcache): Register the test.
10733 * ia64-tdep.c (ia64_pseudo_register_read): Call
10734 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10735 * m32c-tdep.c (m32c_cat_read): Likewise.
10736 (m32c_r3r2r1r0_read): Likewise.
10737 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10738 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10742 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10743 method raw_read instead of regcache_raw_read.
10744 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10745 * arm-tdep.c (arm_neon_quad_read): Likewise.
10746 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10747 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10748 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10749 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10750 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10751 (i386_pseudo_register_read_into_value): Likewise.
10752 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10753 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10754 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10755 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10756 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10757 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10758 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10759 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10760 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10764 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10765 * configure.tgt: Remove target mt.
10766 * mt-tdep.c: Remove.
10767 * regcache.c (cooked_read_test): Remove the check for mt.
10771 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10772 instead of gdbarch_pseudo_register_read_value.
10776 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10781 * linespec.c (create_sals_line_offset): Remove code that preserved
10782 the symtab_and_line's line number.
10786 * varobj.c (varobj_create): Don't set valid_block when creating a
10791 * varobj.c (varobj_create): Remove out of date comment.
10796 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10797 updating innermost block.
10798 * parse.c (innermost_block_tracker::update): Take extra type
10799 parameter, and check types match before updating innermost block.
10800 (write_dollar_variable): Update innermost block for registers.
10801 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10802 (innermost_block_tracker::innermost_block_tracker): Initialise
10804 (innermost_block_tracker::reset): Take type parameter.
10805 (innermost_block_tracker::update): Take type parameter, and pass
10806 type through as needed.
10807 (innermost_block_tracker::m_types): New member.
10808 * varobj.c (varobj_create): Pass type when reseting innermost
10813 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10814 * ada-lang.c (resolve_subexp): Likewise.
10815 * breakpoint.c (set_breakpoint_condition) Likewise.
10816 (watch_command_1) Likewise.
10817 * c-exp.y (variable): Likewise.
10818 * d-exp.y (PrimaryExpression): Likewise.
10819 * f-exp.y (variable): Likewise.
10820 * go-exp.y (variable): Likewise.
10821 * m2-exp.y (variable): Likewise.
10822 * objfiles.c (objfile::~objfile): Likewise.
10823 * p-exp.y (variable): Likewise.
10824 * parse.c (innermost_block): Change type.
10825 * parser-defs.h (class innermost_block_tracker): New.
10826 (innermost_block): Change to innermost_block_tracker.
10827 * printcmd.c (display_command): Switch to innermost_block API.
10828 (do_one_display): Likewise.
10829 * rust-exp.y (do_one_display): Likewise.
10830 * symfile.c (clear_symtab_users): Likewise.
10831 * varobj.c (varobj_create): Switch to innermost_block API, replace
10832 use of innermost_block with block stored on varobj object.
10836 * expression.h (innermost_block): Remove declaration.
10837 * varobj.c: Add 'parser-defs.h' include.
10841 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10842 symbols in the static and global blocks.
10846 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10847 gdb_ptrace.h, and move including gdb_wait.h ...
10848 * nat/linux-ptrace.h: ... to here.
10852 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10853 inf_ptrace_detach_success.
10854 (inf_ptrace_detach_success): Add inferior parameter, use it
10855 instead of inferior_ptid, pass it to detach_inferior.
10856 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10858 * inferior.c (detach_inferior): Add overload that takes an
10860 * inferior.h (detach_inferior): Likewise.
10861 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10862 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10863 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10867 * target.h (struct target_ops) <to_detach>: Add inferior
10869 (target_detach): Likewise.
10870 * target.c (dispose_inferior): Pass inferior down.
10871 (target_detach): Pass inferior down. Assert that it is equal to
10872 the current inferior.
10873 * aix-thread.c (aix_thread_detach): Pass inferior down.
10874 * corefile.c (core_file_command): Pass current_inferior() down.
10875 * corelow.c (core_detach): Add inferior parameter.
10876 * darwin-nat.c (darwin_detach): Likewise.
10877 * gnu-nat.c (gnu_detach): Likewise.
10878 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10879 * infcmd.c (detach_command): Pass current_inferior() down to
10881 * infrun.c (follow_fork_inferior): Pass parent_inf to
10883 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10885 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10886 * linux-thread-db.c (thread_db_detach): Likewise.
10887 * nto-procfs.c (procfs_detach): Likewise.
10888 * procfs.c (procfs_detach): Likewise.
10889 * record.c (record_detach): Likewise.
10890 * record.h (struct inferior): Forward-declare.
10891 (record_detach): Add inferior parameter.
10892 * remote-sim.c (gdbsim_detach): Likewise.
10893 * remote.c (remote_detach_1): Likewise.
10894 (remote_detach): Likewise.
10895 (extended_remote_detach): Likewise.
10896 * sol-thread.c (sol_thread_detach): Likewise.
10897 * target-debug.h (target_debug_print_inferior_p): New macro.
10898 * target-delegates.c: Re-generate.
10899 * top.c (kill_or_detach): Pass inferior down to target_detach.
10900 * windows-nat.c (windows_detach): Add inferior parameter.
10904 * target.h (struct target_ops) <to_detach>: Remove args
10906 (target_detach): Likewise.
10907 * target.c (dispose_inferior): Adjust.
10908 (target_detach): Remove args parameter, adjust.
10909 * aix-thread.c (aix_thread_detach): Adjust.
10910 * corefile.c (core_file_command): Adjust.
10911 * corelow.c (core_detach): Adjust.
10912 * darwin-nat.c (darwin_detach): Adjust.
10913 * gnu-nat.c (gnu_detach): Adjust.
10914 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10915 * infcmd.c (detach_command): Adjust
10916 * infrun.c (follow_fork_inferior): Adjust.
10917 (handle_vfork_child_exec_or_exit): Adjust.
10918 * linux-fork.c (linux_fork_detach): Remove args parameter.
10919 * linux-fork.h (linux_fork_detach): Likewise.
10920 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10921 * linux-thread-db.c (thread_db_detach): Likewise.
10922 * nto-procfs.c (procfs_detach): Likewise.
10923 * procfs.c (procfs_detach): Likewise.
10924 (do_detach): Remove signo parameter.
10925 * record.c (record_detach): Remove args parameter.
10926 * record.h (record_detach): Likewise.
10927 * remote-sim.c (gdbsim_detach): Likewise.
10928 * remote.c (remote_detach_1): Likewise.
10929 (remote_detach): Likewise.
10930 (extended_remote_detach): Likewise.
10931 * sol-thread.c (sol_thread_detach): Likewise.
10932 * target-delegates.c: Re-generate.
10933 * top.c (struct qt_args) <args>: Remove field.
10934 (kill_or_detach): Don't pass args.
10935 (quit_force): Don't set args.
10936 * windows-nat.c (windows_detach): Remove args parameter.
10940 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10941 (arm_linux_init_abi): Install it.
10945 * osabi.c (gdb_osabi_names): Extend the regexp for
10946 arm-linux-gnueabihf.
10950 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10952 (abbrev_table::add_abbrev): Update.
10953 (abbrev_table::lookup_abbrev): Update.
10957 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10961 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10966 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10970 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10971 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10972 (create_array_type_with_stride): Update.
10973 * dwarf2read.c (set_die_type): Update.
10977 * dwarf2read.c (delayed_method_info): Remove typedef.
10978 (dwarf2_cu::method_info): Now a std::vector.
10979 (add_to_method_list): Update.
10980 (free_delayed_list): Remove.
10981 (compute_delayed_physnames): Update.
10982 (process_full_comp_unit, process_full_type_unit): Clear the method
10983 list. Remove cleanups.
10984 (psymtab_include_file_name): Add name_holder parameter. Use
10985 unique_xmalloc_ptr.
10986 (dwarf_decode_lines): Update.
10991 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10992 (dwarf2_per_objfile::free_cached_comp_units)
10993 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10994 (init_cutu_and_read_dies_no_follow): Update.
10995 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10996 (dwarf2_cu::~dwarf2_cu): New.
10997 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10998 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11003 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11004 (struct die_reader_specs) <abbrev_table>: New member.
11005 (struct abbrev_table): Add constructor.
11006 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11007 <abbrev_obstack>: Now an auto_obstack.
11008 (abbrev_table_up): New typedef.
11009 (init_cu_die_reader): Add abbrev_table parameter.
11010 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11011 Add result_dwo_abbrev_table.
11012 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11013 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11015 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11017 (skip_children): Update.
11018 (abbrev_table::alloc_abbrev): Rename from
11019 abbrev_table_alloc_abbrev.
11020 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11021 (abbrev_table::lookup_abbrev): Rename from
11022 abbrev_table_lookup_abbrev.
11023 (abbrev_table_read_table): Return abbrev_table_up.
11024 (abbrev_table_free, abbrev_table_free_cleanup)
11025 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11026 (load_partial_dies): Update.
11030 * dwarf2read.c (dwarf2_compute_name): Update comment.
11031 (read_func_scope, read_variable): Update.
11032 (new_symbol): Remove.
11033 (new_symbol_full): Rename to new_symbol.
11038 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11039 a warning instead of throwing an error, set section size to 0 and return
11041 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11045 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11047 (linux_ptrace_attach_fail_reason_string): Likewise.
11048 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11050 (linux_ptrace_attach_fail_reason_string): Likewise.
11051 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11055 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11060 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11061 checking for fs_base/gs_base fields in struct user_regs_struct.
11062 * configure: Regenerate.
11066 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11068 (aarch64_linux_init_abi): Install it to gdbarch hook
11069 gcc_target_options.
11073 * common/signals-state-save-restore.c
11074 (save_original_signals_state): Fix typos.
11079 * Makefile.in (install-only): Install gdb-add-index.
11083 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11087 * infrun.c (keep_going_pass_signal): Clear step-over info when
11088 insert_breakpoints fails.
11093 * infrun.c (resume): Rename to ...
11094 (resume_1): ... this.
11095 (resume): Reimplement as wrapper around resume_1.
11100 * remote.c (remote_parse_stop_reply): Default to the last-set
11101 general thread instead of to 'magic_null_ptid'.
11105 * language.h (language_get_symbol_name_matcher): Rename ...
11106 (get_symbol_name_matcher): ... this.
11107 * language.c (language_get_symbol_name_matcher): Ditto.
11108 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11115 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11116 Adjust to use language_get_symbol_name_matcher instead of
11117 language_defn::la_get_symbol_name_matcher.
11118 * language.c (language_get_symbol_name_matcher): If in Ada mode
11119 and the lookup name is a verbatim match, return Ada's matcher.
11120 * language.h (language_get_symbol_name_matcher): Adjust comment.
11121 (ada_lookup_name_info::verbatim_p):: New method.
11126 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11127 minsym's language is language_auto or language_cplus, pass down
11128 language_ada instead.
11129 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11134 * minsyms.c (linkage_name_str): New function.
11135 (iterate_over_minimal_symbols): Use it.
11139 * NEWS: Document that 'info proc' now works on FreeBSD.
11143 * configure.ac: Check for kinfo_getfile in libutil.
11144 * configure: Regenerate.
11145 * config.in: Regenerate.
11146 * fbsd-nat.c: Include "fbsd-tdep.h".
11147 (fbsd_fetch_cmdline): New.
11148 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11149 rather than calling error.
11150 (fbsd_info_proc): New.
11151 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11152 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11153 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11157 * fbsd-nat.c (struct free_deleter): Remove.
11158 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11162 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11163 NULL for an empty pathname.
11167 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11168 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11169 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11170 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11171 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11172 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11173 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11174 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11175 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11176 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11177 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11178 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11179 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11180 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11181 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11185 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11186 (gnu_xfer_auxv): New function.
11187 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11188 TARGET_OBJECT_AUXV.
11193 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11195 (COMMON_OBS): Remove selftest.o.
11196 * configure.ac: Append selftest-arch.c and common/selftest.c to
11197 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11198 * configure: Re-generated.
11199 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11201 (maintenance_info_selftests): Likewise.
11205 * ada-valprint.c (val_print_packed_array_elements): Use
11206 proper number of elements when printing an array indexed
11207 by an enumeration type.
11211 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11212 (dw2_get_file_names_reader): Adjust.
11213 (lookup_dwo_signatured_type): Adjust.
11214 (lookup_dwp_signatured_type): Adjust.
11215 (lookup_signatured_type): Adjust.
11216 (create_type_unit_group): Adjust.
11217 (get_type_unit_group): Adjust.
11218 (process_psymtab_comp_unit_reader): Adjust.
11219 (build_type_psymtabs_reader): Adjust.
11220 (scan_partial_symbols): Adjust.
11221 (add_partial_symbol): Adjust.
11222 (add_partial_subprogram): Adjust.
11223 (peek_die_abbrev): Adjust.
11224 (fixup_go_packaging): Adjust.
11225 (process_imported_unit_die): Adjust.
11226 (dwarf2_compute_name): Adjust.
11227 (dwarf2_physname): Adjust.
11228 (read_import_statement): Adjust.
11229 (handle_DW_AT_stmt_list): Adjust.
11230 (read_file_scope): Adjust.
11231 (read_func_scope): Adjust.
11232 (read_lexical_block_scope): Adjust.
11233 (read_call_site_scope): Adjust.
11234 (read_variable): Adjust.
11235 (dwarf2_rnglists_process): Adjust.
11236 (dwarf2_ranges_process): Adjust.
11237 (dwarf2_ranges_read): Adjust.
11238 (dwarf2_get_pc_bounds): Adjust.
11239 (dwarf2_record_block_ranges): Adjust.
11240 (dwarf2_add_field): Adjust.
11241 (dwarf2_add_member_fn): Adjust.
11242 (read_structure_type): Adjust.
11243 (process_structure_scope): Adjust.
11244 (read_enumeration_type): Adjust.
11245 (read_array_type): Adjust.
11246 (mark_common_block_symbol_computed): Adjust.
11247 (read_common_block): Adjust.
11248 (read_namespace_type): Adjust.
11249 (read_namespace): Adjust.
11250 (read_module_type): Adjust.
11251 (read_tag_pointer_type): Adjust.
11252 (read_tag_ptr_to_member_type): Adjust.
11253 (read_tag_string_type): Adjust.
11254 (read_subroutine_type): Adjust.
11255 (read_typedef): Adjust.
11256 (read_base_type): Adjust.
11257 (attr_to_dynamic_prop): Adjust.
11258 (read_subrange_type): Adjust.
11259 (read_unspecified_type): Adjust.
11260 (dwarf2_read_abbrevs): Adjust.
11261 (load_partial_dies): Adjust.
11262 (read_partial_die): Adjust.
11263 (find_partial_die): Adjust.
11264 (guess_partial_die_structure_name): Adjust.
11265 (fixup_partial_die): Adjust.
11266 (read_attribute_value): Adjust.
11267 (read_addr_index): Adjust.
11268 (read_addr_index_from_leb128): Adjust.
11269 (read_str_index): Adjust.
11270 (dwarf2_string_attr): Adjust.
11271 (get_debug_line_section): Adjust.
11272 (dwarf_decode_line_header): Adjust.
11273 (lnp_state_machine::check_line_address): Adjust.
11274 (dwarf_decode_lines_1): Adjust.
11275 (dwarf_decode_lines): Adjust.
11276 (dwarf2_start_symtab): Adjust.
11277 (var_decode_location): Adjust.
11278 (new_symbol_full): Adjust.
11279 (dwarf2_const_value_data): Adjust.
11280 (dwarf2_const_value_attr): Adjust.
11281 (dwarf2_const_value): Adjust.
11282 (die_type): Adjust.
11283 (die_containing_type): Adjust.
11284 (build_error_marker_type): Adjust.
11285 (lookup_die_type): Adjust.
11286 (guess_full_die_structure_name): Adjust.
11287 (anonymous_struct_prefix): Adjust.
11288 (determine_prefix): Adjust.
11289 (dwarf2_name): Adjust.
11290 (follow_die_ref_or_sig): Adjust.
11291 (follow_die_offset): Adjust.
11292 (follow_die_ref): Adjust.
11293 (follow_die_sig_1): Adjust.
11294 (follow_die_sig): Adjust.
11295 (get_signatured_type): Adjust.
11296 (get_DW_AT_signature_type): Adjust.
11297 (decode_locdesc): Adjust.
11298 (dwarf_decode_macros): Adjust.
11299 (cu_debug_loc_section): Adjust.
11300 (fill_in_loclist_baton): Adjust.
11301 (dwarf2_symbol_mark_computed): Adjust.
11302 (init_one_comp_unit): Don't assign
11303 dwarf2_cu::dwarf2_per_objfile.
11304 (set_die_type): Adjust.
11308 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11309 <dwarf2_per_objfile>: New field.
11310 (dwarf2_per_objfile): Remove global.
11311 (get_dwarf2_per_objfile): New function.
11312 (set_dwarf2_per_objfile): New function.
11313 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11314 dwarf2_per_objfile.
11315 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11316 (read_abbrev_offset): Likewise.
11317 (read_indirect_string): Likewise.
11318 (read_indirect_line_string): Likewise.
11319 (read_indirect_string_at_offset): Likewise.
11320 (read_indirect_string_from_dwz): Likewise.
11321 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11322 dwarf2_per_objfile.
11323 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11324 (create_all_comp_units): Change objfile parameter to
11325 dwarf2_per_objfile.
11326 (create_all_type_units): Likewise.
11327 (process_queue): Add dwarf2_per_objfile parameter.
11328 (read_and_check_comp_unit_head): Likewise.
11329 (lookup_dwo_unit_in_dwp): Likewise.
11330 (get_dwp_file): Likewise.
11331 (process_cu_includes): Likewise.
11332 (struct free_dwo_file_cleanup_data): New struct.
11333 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11334 set_dwarf2_per_objfile.
11335 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11336 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11337 context, adjust calls.
11338 (dw2_instantiate_symtab): Likewise.
11339 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11340 (dw2_get_cu): Likewise.
11341 (create_cu_from_index_list): Change objfile parameter to
11342 dwarf2_per_objfile.
11343 (create_cus_from_index_list): Get dwarf2_per_objfile from
11344 context, adjust calls.
11345 (create_cus_from_index): Likewise.
11346 (create_signatured_type_table_from_index): Change objfile
11347 parameter to dwarf2_per_objfile.
11348 (create_signatured_type_table_from_debug_names): Change objfile
11349 parameter to dwarf2_per_objfile.
11350 (create_addrmap_from_index): Likewise.
11351 (create_addrmap_from_aranges): Likewise.
11352 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11353 (dw2_setup): Remove.
11354 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11356 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11357 get_dwarf2_per_objfile.
11358 (dw2_forget_cached_source_info): Likewise.
11359 (dw2_map_symtabs_matching_filename): Likewise.
11360 (struct dw2_symtab_iterator) <index>: Remove.
11361 <dwarf2_per_objfile>: New field.
11362 (dw2_symtab_iter_init): Replace index parameter with
11363 dwarf2_per_objfile.
11364 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11365 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11366 (dw2_print_stats): Likewise.
11367 (dw2_dump): Likewise.
11368 (dw2_expand_symtabs_for_function): Likewise.
11369 (dw2_expand_all_symtabs): Likewise.
11370 (dw2_expand_symtabs_with_fullname): Likewise.
11371 (dw2_expand_marked_cus): Replace index and objfile parameters
11372 with dwarf2_per_objfile.
11373 (dw_expand_symtabs_matching_file_matcher): Add
11374 dwarf2_per_objfile parameter and adjust calls.
11375 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11377 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11378 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11380 (create_cus_from_debug_names_list): Replace objfile parameter
11381 with dwarf2_per_objfile and adjust calls.
11382 (create_cus_from_debug_names): Likewise.
11383 (dwarf2_read_debug_names): Likewise.
11384 (mapped_debug_names::namei_to_name): Adjust call.
11385 (dw2_debug_names_iterator::next): Likewise.
11386 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11387 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11388 (dw2_debug_names_dump): Likewise.
11389 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11390 (dw2_debug_names_expand_symtabs_matching): Likewise.
11391 (dwarf2_initialize_objfile): Likewise.
11392 (dwarf2_build_psymtabs): Likewise.
11393 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11395 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11396 (read_and_check_comp_unit_head): Likewise.
11397 (read_abbrev_offset): Likewise.
11398 (create_debug_type_hash_table): Likewise.
11399 (create_debug_types_hash_table): Likewise.
11400 (create_all_type_units): Replace objfile parameter with
11401 dwarf2_per_objfile.
11402 (add_type_unit): Add dwarf2_per_objfile parameter.
11403 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11404 with dwarf2_per_objfile.
11405 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11406 (lookup_dwp_signatured_type): Likewise.
11407 (lookup_signatured_type): Likewise.
11408 (read_cutu_die_from_dwo): Likewise.
11409 (init_tu_and_read_dwo_dies): Likewise.
11410 (init_cutu_and_read_dies): Likewise.
11411 (init_cutu_and_read_dies_no_follow): Likewise.
11412 (allocate_type_unit_groups_table): Add objfile parameter.
11413 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11414 (get_type_unit_group): Likewise.
11415 (process_psymtab_comp_unit): Update call.
11416 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11417 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11418 (print_tu_stats): Likewise.
11419 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11420 in void* parameter.
11421 (build_type_psymtabs): Change objfile parameter to
11422 dwarf2_per_objfile.
11423 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11424 passed in void* parameter.
11425 (process_skeletonless_type_units): Change objfile parameter to
11426 dwarf2_per_objfile.
11427 (set_partial_user): Likewise.
11428 (dwarf2_build_psymtabs_hard): Likewise.
11429 (read_comp_units_from_section): Likewise.
11430 (create_all_comp_units): Likewise.
11431 (scan_partial_symbols): Update calls.
11432 (add_partial_symbol): Likewise.
11433 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11434 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11435 (process_queue): Add dwarf2_per_objfile parameter.
11436 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11437 (compute_compunit_symtab_includes): Likewise.
11438 (process_cu_includes): Add dwarf2_per_objfile parameter.
11439 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11440 (process_full_type_unit): Likewise.
11441 (process_imported_unit_die): Update call.
11442 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11443 (read_file_scope): Likewise.
11444 (allocate_dwo_file_hash_table): Add objfile parameter.
11445 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11446 (create_cus_hash_table): Likewise.
11447 (create_dwp_hash_table): Likewise.
11448 (create_dwo_unit_in_dwp_v1): Likewise.
11449 (create_dwp_v2_section): Likewise.
11450 (create_dwo_unit_in_dwp_v2): Likewise.
11451 (lookup_dwo_unit_in_dwp): Likewise.
11452 (try_open_dwop_file): Likewise.
11453 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11454 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11455 cleanup to include a reference to dwarf2_per_objfile.
11456 (open_dwp_file): Add dwarf2_per_objfile parameter.
11457 (open_and_init_dwp_file): Likewise.
11458 (get_dwp_file): Likewise.
11459 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11460 (queue_and_load_all_dwo_tus): Update call.
11461 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11463 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11464 (dwarf2_ranges_process): Likewise.
11465 (dwarf2_get_pc_bounds): Likewise.
11466 (mark_common_block_symbol_computed): Likewise.
11467 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11468 (dwarf2_read_abbrevs): Update call.
11469 (read_partial_die): Use dwarf2_per_objfile from cu.
11470 (find_partial_die): Likewise.
11471 (fixup_partial_die): Likewise.
11472 (read_attribute_value): Likewise.
11473 (read_indirect_string_at_offset_from): Add objfile parameter.
11474 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11476 (read_indirect_string_from_dwz): Add objfile parameter.
11477 (read_indirect_string): Add objfile parameter.
11478 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11479 (read_addr_index): Use dwarf2_per_objfile from cu.
11480 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11482 (read_str_index): Use dwarf2_per_objfile from cu.
11483 (get_debug_line_section): Likewise.
11484 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11485 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11486 (new_symbol_full): Use dwarf2_per_objfile from cu.
11487 (build_error_marker_type): Likewise.
11488 (lookup_die_type): Likewise.
11489 (determine_prefix): Likewise.
11490 (follow_die_offset): Likewise.
11491 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11492 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11493 (dwarf2_fetch_die_type_sect_off): Likewise.
11494 (dwarf2_get_die_type): Likewise.
11495 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11496 (get_signatured_type): Likewise.
11497 (get_DW_AT_signature_type): Likewise.
11498 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11499 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11500 (cu_debug_loc_section): Likewise.
11501 (fill_in_loclist_baton): Likewise.
11502 (dwarf2_symbol_mark_computed): Likewise.
11503 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11504 dwarf2_per_objfile.
11505 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11507 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11508 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11509 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11510 (set_die_type): Use dwarf2_free_objfile from cu.
11511 (get_die_type_at_offset): Likewise.
11512 (dwarf2_per_objfile_free): Don't assign global variable.
11513 (debug_names) <constructor>: Add dwarf2_per_objfile
11514 parameter, update m_debugstrlookup construction.
11515 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11517 <m_dwarf2_per_objfile>: New field.
11518 <lookup>: Use m_dwarf2_per_objfile.
11519 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11520 (psyms_seen_size): Likewise.
11521 (write_gdbindex): Replace objfile parameter with
11522 dwarf2_per_objfile.
11523 (write_debug_names): Likewise.
11524 (write_psymtabs_to_index): Likewise.
11525 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11530 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11531 <dwarf2_per_objfile>: New field.
11532 (struct dwarf2_per_cu_data) <objfile>: Remove.
11533 <dwarf2_per_objfile>: New field.
11534 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11536 (create_signatured_type_table_from_index): Likewise.
11537 (create_debug_type_hash_table): Likewise.
11538 (fill_in_sig_entry_from_dwo_entry): Likewise.
11539 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11540 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11542 (create_partial_symtab): Access objfile through
11543 dwarf2_per_objfile.
11544 (process_psymtab_comp_unit_reader): Likewise.
11545 (read_comp_units_from_section): Likewise.
11546 (scan_partial_symbols): Likewise.
11547 (add_partial_symbol): Likewise.
11548 (add_partial_subprogram): Likewise.
11549 (peek_die_abbrev): Likewise.
11550 (fixup_go_packaging): Likewise.
11551 (process_full_comp_unit): Likewise.
11552 (process_full_type_unit): Likewise.
11553 (process_imported_unit_die): Likewise.
11554 (dwarf2_compute_name): Likewise.
11555 (dwarf2_physname): Likewise.
11556 (read_import_statement): Likewise.
11557 (create_cus_hash_table): Assign dwarf2_physname instead of
11559 (read_func_scope): Access objfile through dwarf2_per_objfile.
11560 (read_lexical_block_scope): Likewise.
11561 (read_call_site_scope): Likewise.
11562 (read_variable): Likewise.
11563 (dwarf2_rnglists_process): Likewise.
11564 (dwarf2_ranges_process): Likewise.
11565 (dwarf2_ranges_read): Likewise.
11566 (dwarf2_record_block_ranges): Likewise.
11567 (dwarf2_add_field): Likewise.
11568 (dwarf2_add_member_fn): Likewise.
11569 (read_structure_type): Likewise.
11570 (process_structure_scope): Likewise.
11571 (read_enumeration_type): Likewise.
11572 (read_array_type): Likewise.
11573 (read_common_block): Likewise.
11574 (read_namespace_type): Likewise.
11575 (read_namespace): Likewise.
11576 (read_module_type): Likewise.
11577 (read_tag_pointer_type): Likewise.
11578 (read_tag_ptr_to_member_type): Likewise.
11579 (read_tag_string_type): Likewise.
11580 (read_subroutine_type): Likewise.
11581 (read_typedef): Likewise.
11582 (read_base_type): Likewise.
11583 (attr_to_dynamic_prop): Likewise.
11584 (read_subrange_type): Likewise.
11585 (read_unspecified_type): Likewise.
11586 (load_partial_dies): Likewise.
11587 (read_partial_die): Likewise.
11588 (find_partial_die): Likewise.
11589 (guess_partial_die_structure_name): Likewise.
11590 (fixup_partial_die): Likewise.
11591 (read_attribute_value): Likewise.
11592 (read_addr_index_from_leb128): Likewise.
11593 (dwarf2_read_addr_index): Likewise.
11594 (dwarf2_string_attr): Likewise.
11595 (lnp_state_machine::check_line_address): Likewise.
11596 (dwarf_decode_lines_1): Likewise.
11597 (dwarf_decode_lines): Likewise.
11598 (dwarf2_start_symtab): Likewise.
11599 (var_decode_location): Likewise.
11600 (new_symbol_full): Likewise.
11601 (dwarf2_const_value_data): Likewise.
11602 (dwarf2_const_value_attr): Likewise.
11603 (dwarf2_const_value): Likewise.
11604 (die_type): Likewise.
11605 (die_containing_type): Likewise.
11606 (lookup_die_type): Likewise.
11607 (guess_full_die_structure_name): Likewise.
11608 (anonymous_struct_prefix): Likewise.
11609 (dwarf2_name): Likewise.
11610 (follow_die_ref_or_sig): Likewise.
11611 (follow_die_offset): Likewise.
11612 (follow_die_ref): Likewise.
11613 (dwarf2_fetch_die_loc_sect_off): Likewise.
11614 (dwarf2_fetch_constant_bytes): Likewise.
11615 (dwarf2_fetch_die_type_sect_off): Likewise.
11616 (dwarf2_get_die_type): Likewise.
11617 (follow_die_sig): Likewise.
11618 (decode_locdesc): Likewise.
11619 (dwarf2_per_cu_objfile): Likewise.
11620 (dwarf2_per_cu_text_offset): Likewise.
11621 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11623 (set_die_type): Access objfile through
11624 dwarf2_per_objfile.
11628 * valprint.c (converted_character_d): Remove typedef.
11629 (DEF_VEC_O (converted_character_d)): Remove.
11630 (count_next_character): Use std::vector.
11631 (print_converted_chars_to_obstack): Likewise.
11632 (generic_printstr): Likewise.
11636 * xml-support.h (struct gdb_xml_value): Add constructor.
11637 <value>: Change type to unique_xmalloc_ptr.
11638 (gdb_xml_value_s): Remove typedef.
11639 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11640 (gdb_xml_element_start_handler): Change parameter type to
11642 (xml_find_attribute): Likewise.
11643 * xml-support.c (xml_find_attribute): Change parameter type to
11644 std::vector and adjust.
11645 (gdb_xml_values_cleanup): Remove.
11646 (gdb_xml_parser::start_element): Adjust to std::vector.
11647 (xinclude_start_include): Change paraeter type to std::vector
11649 * btrace.c (check_xml_btrace_version): Likewise.
11650 (parse_xml_btrace_block): Likewise.
11651 (parse_xml_btrace_pt_config_cpu): Likewise.
11652 (parse_xml_btrace_pt): Likewise.
11653 (parse_xml_btrace_conf_bts): Likewise.
11654 (parse_xml_btrace_conf_pt): Likewise.
11655 * memory-map.c (memory_map_start_memory): Likewise.
11656 (memory_map_start_property): Likewise.
11657 * osdata.c (osdata_start_osdata): Likewise.
11658 (osdata_start_item): Likewise.
11659 (osdata_start_column): Likewise.
11660 * remote.c (start_thread): Likewise.
11661 * solib-aix.c (library_list_start_library): Likewise.
11662 (library_list_start_list): Likewise.
11663 * solib-svr4.c (library_list_start_library): Likewise.
11664 (svr4_library_list_start_list): Likewise.
11665 * solib-target.c (library_list_start_segment): Likewise.
11666 (library_list_start_section): Likewise.
11667 (library_list_start_library): Likewise.
11668 (library_list_start_list): Likewise.
11669 * tracepoint.c (traceframe_info_start_memory): Likewise.
11670 (traceframe_info_start_tvar): Likewise.
11671 * xml-syscall.c (syscall_start_syscall): Likewise.
11672 * xml-tdesc.c (tdesc_start_target): Likewise.
11673 (tdesc_start_feature): Likewise.
11674 (tdesc_start_reg): Likewise.
11675 (tdesc_start_union): Likewise.
11676 (tdesc_start_struct): Likewise.
11677 (tdesc_start_flags): Likewise.
11678 (tdesc_start_enum): Likewise.
11679 (tdesc_start_field): Likewise.
11680 (tdesc_start_enum_value): Likewise.
11681 (tdesc_start_vector): Likewise.
11685 * extension.h (struct xmethod_worker) <clone>: Remove.
11686 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11688 (python_xmethod_worker::clone): Remove.
11689 * valops.c (find_overload_match): Use std::move instead of
11694 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11695 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11696 <free_xmethod_worker_data>: Remove.
11697 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11698 <get_xmethod_arg_types>: Remove.
11699 <get_xmethod_result_type>: Remove.
11700 <invoke_xmethod>: Remove.
11701 * extension.c (new_xmethod_worker): Remove.
11702 (clone_xmethod_worker): Remove.
11703 (get_matching_xmethod_workers): Return void, pass std::vector by
11705 (get_xmethod_arg_types): Rename to...
11706 (xmethod_worker::get_arg_types): ... this, and adjust.
11707 (get_xmethod_result_type): Rename to...
11708 (xmethod_worker::get_result_type): ... this, and adjust.
11709 (invoke_xmethod): Remove.
11710 (free_xmethod_worker): Remove.
11711 (free_xmethod_worker_vec): Remove.
11712 * extension.h (enum ext_lang_rc): Move here from
11714 (struct xmethod_worker): Add constructor and destructor.
11717 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11718 virtual pure methods.
11719 <get_arg_types, get_result_type>: New methods.
11720 (xmethod_worker_ptr): Remove typedef.
11721 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11722 (xmethod_worker_vec): Remove typedef.
11723 (xmethod_worker_up): New typedef.
11724 (invoke_xmethod): Remove.
11725 (clone_xmethod_worker): Remove.
11726 (free_xmethod_worker): Remove.
11727 (free_xmethod_worker_vec): Remove.
11728 (get_xmethod_arg_types): Remove.
11729 (get_xmethod_result_type): Remove.
11730 * valops.c (find_method_list): Use std::vector, don't use
11731 intermediate vector.
11732 (value_find_oload_method_list): Use std::vector.
11733 (find_overload_match): Use std::vector.
11734 (find_oload_champ): Use std::vector.
11735 * value.c (value_free): Use operator delete.
11736 (value_of_xmethod): Rename to...
11737 (value_from_xmethod): ... this. Don't assign
11738 xmethod_worker::value, take rvalue-reference.
11739 (result_type_of_xmethod): Adjust.
11740 (call_xmethod): Adjust.
11741 * value.h: Include extension.h.
11742 (struct xmethod_worker): Don't forward-declare.
11743 (value_of_xmethod): Rename to...
11744 (value_from_xmethod): ... this, take rvalue-reference.
11745 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11746 (struct python_xmethod_worker): ... this, add constructor and
11748 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11749 (gdbpy_free_xmethod_worker_data): Rename to...
11750 (python_xmethod_worker::~python_xmethod_worker): ... this and
11752 (gdbpy_clone_xmethod_worker_data): Rename to...
11753 (python_xmethod_worker::clone): ... this and adjust.
11754 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11756 (gdbpy_get_xmethod_arg_types): Rename to...
11757 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11758 (gdbpy_get_xmethod_result_type): Rename to...
11759 (python_xmethod_worker::do_get_result_type): ... this and
11761 (gdbpy_invoke_xmethod): Rename to...
11762 (python_xmethod_worker::invoke): ... this and adjust.
11763 (new_python_xmethod_worker): Rename to...
11764 (python_xmethod_worker::python_xmethod_worker): ... this and
11766 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11768 (gdbpy_free_xmethod_worker_data): Remove.
11769 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11770 (gdbpy_get_xmethod_arg_types): Remove.
11771 (gdbpy_get_xmethod_result_type): Remove.
11772 (gdbpy_invoke_xmethod): Remove.
11773 * python/python.c (python_extension_ops): Remove obsolete
11779 * common/signals-state-save-restore.c
11780 (save_original_signals_state): New parameter 'quiet'. Warn if we
11781 find a custom handler preinstalled, instead of internal erroring.
11782 But only warn if !quiet.
11783 * common/signals-state-save-restore.h
11784 (save_original_signals_state): New parameter 'quiet'.
11785 * main.c (captured_main_1): Move save_original_signals_state call
11786 after option handling, and pass QUIET.
11790 * spu-tdep.c (spu_catch_start): Pass
11791 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11796 * ada-lang.c (literal_symbol_name_matcher): New function.
11797 (ada_get_symbol_name_matcher): Use it for
11798 symbol_name_match_type::SEARCH_NAME.
11799 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11800 it down instead of assuming symbol_name_match_type::FULL.
11801 * block.h (block_lookup_symbol): New parameter 'match_type'.
11802 * c-valprint.c (print_unpacked_pointer): Use
11803 lookup_symbol_search_name instead of lookup_symbol.
11804 * compile/compile-object-load.c (get_out_value_type): Pass down
11805 symbol_name_match_type::SEARCH_NAME.
11806 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11807 symbol_name_match_type::FULL.
11808 * cp-support.c (cp_get_symbol_name_matcher): Handle
11809 symbol_name_match_type::SEARCH_NAME.
11810 * infrun.c (insert_exception_resume_breakpoint): Use
11811 lookup_symbol_search_name.
11812 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11813 * psymtab.c (maintenance_check_psymtabs): Use
11814 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11815 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11816 SYMBOL_SEARCH_NAME.
11817 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11818 if symbol_name_match_type::SEARCH_NAME.
11819 (lookup_symbol_in_language): Pass down
11820 symbol_name_match_type::FULL.
11821 (lookup_symbol_search_name): New.
11822 (lookup_language_this): Pass down
11823 symbol_name_match_type::SEARCH_NAME.
11824 (lookup_symbol_aux, lookup_local_symbol): New parameter
11825 'match_type'. Pass it down.
11826 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11827 (lookup_symbol_search_name): New declaration.
11828 (lookup_symbol_in_block): New 'match_type' parameter.
11833 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11835 (ada_lookup_symbol): Reimplement in terms of
11836 ada_lookup_symbol_list, bits factored out from
11837 ada_lookup_encoded_symbol.
11841 * ada-exp.y (write_object_renaming): When subscripting an array
11842 using a symbol as the index, pass the block in call to
11843 ada_lookup_encoded_symbol when looking that symbol up.
11847 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11852 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11853 the case where VALUE_LVAL (val0) is not lval_memory.
11857 * ada-valprint.c (print_optional_low_bound): Handle
11858 character-indexed array printing like boolean-indexed array
11863 * NEWS: Create a new section for the next release branch.
11864 Rename the section of the current branch, now that it has
11869 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11870 * version.in: Bump version to 8.1.50.DATE-git.
11874 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11876 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11878 (default_exception_support_info) <catch_handlers_sym>: Add field.
11879 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11880 (ada_exception_name_addr_1): Add "catch handlers" handling.
11881 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11882 Update all callers.
11883 (create_excep_cond_exprs) <ex>: Add parameter.
11884 (re_set_exception): Update create_excep_cond_exprs call.
11885 (print_it_exception, print_one_exception, print_mention_exception)
11886 (print_recreate_exception): Add "catch handler" handling.
11887 (allocate_location_catch_handlers, re_set_catch_handlers)
11888 (check_status_catch_handlers, print_it_catch_handlers)
11889 (print_one_catch_handlers, print_mention_catch_handlers)
11890 (print_recreate_catch_handlers): New function.
11891 (catch_handlers_breakpoint_ops): New variable.
11892 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11893 Add parameter. Add "catch handler" handling.
11894 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11895 Add "catch handler" handling.
11896 (ada_exception_catchpoint_cond_string): Add "catch handler"
11898 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11900 (catch_ada_handlers_command): New function.
11901 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11902 operations structure.
11903 (_initialize_ada_language): Add "catch handlers" command entry.
11904 * NEWS: Document "catch handlers" feature.
11908 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11909 account when creating the array type of the slice.
11910 (ada_value_slice): Likewise.
11914 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11916 (create_array_type_with_stride): Add byte_stride_prop parameter.
11917 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11918 New parameter. Update all callers in this file.
11919 (array_type_has_dynamic_stride): New function.
11920 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11921 of arrays with dynamic byte strides.
11922 * dwarf2read.c (read_array_type): Add support for dynamic
11923 DW_AT_byte_stride attributes.
11927 * dwarf2read.c (read_unspecified_type): Treat
11928 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11932 Update copyright year range in all GDB files.
11936 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11937 and gdb/testsuite/gdb.base/step-line.c.
11941 * copyright.py (main): Dump the contents of
11942 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11943 even if BY_HAND is empty.
11947 * top.c (print_gdb_version): Update Copyright year in version
11952 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11954 For older changes see ChangeLog-2017.
11960 version-control: never