3 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
4 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
5 $(EXEEXT) to the script, as it is not a program.
9 * python/py-prettyprint.c (pretty_print_one_value): Return
11 (print_string_repr): Adjust.
12 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
13 * python/python-internal.h (apply_varobj_pretty_printer): Return
15 * varobj.c (varobj_value_get_print_value): Adjust.
20 * python/py-prettyprint.c (pretty_print_one_value): Check for
25 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
26 replace_operator_with_call.
30 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
34 * ada-typeprint.c (print_range): Print the bounds using TYPE
35 rather than its TYPE_TARGET_TYPE.
39 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
40 call to ada_to_fixed_value_create.
44 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
48 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
53 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
54 Move update of loop variable "fi".
58 * ada-lang.c (value_assign_to_component): In the case of
59 big-endian targets, extract the bits of the given VAL
60 using an src_offset of zero if container is not a scalar.
65 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
66 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
67 * fbsd-tdep.c (fbsd_make_note_desc): New.
68 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
69 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
70 * target.h (enum target_object) Add FreeBSD-specific
71 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
75 * compile/compile-c.h (generate_c_for_variable_locations):
76 Change reference to pointer.
77 * compile/compile-c-support.c (compile_program) <compute>:
79 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
80 (generate_c_for_for_one_variable): Likewise
81 (generate_c_for_variable_locations): Likewise
82 * compile/compile-c-types.c (compile_c_instance::convert_type):
84 * compile/compile-cplus-symbols.c (convert_one_symbol):
85 std::move the scope passed to enter_scope.
86 * compile/compile-cplus-types.c
87 (compile_cplus_instance::enter_scope): Make parameter
89 (compile_cplus_instance::new_scope): Change reference to
91 (compile_cplus_instance::convert_type): Likewise
92 (compile_cplus_convert_typedef): std::move the scope passed to
94 (compile_cplus_convert_struct_or_union): Likewise.
95 (compile_cplus_convert_enum): Likewise.
96 (compile_cplus_convert_namespace): Likewise.
97 * compile/compile-cplus.h (compile_cplus_instance)
98 <enter_scope>: Make parameter rvalue-reference.
99 * compile/compile-internal.h (compile_instance)
100 <get_cached_type>: Likewise
101 * compile/compile-loc2c.c (push): Likewise
105 (print_label): Likewise
106 (pushf_register_address): Likewise
107 (pushf_register): Likewise
108 (do_compile_dwarf_expr_to_c): Likewise
109 (compile_dwarf_expr_to_c): Likewise
110 (compile_dwarf_bounds_to_c): Likewise
111 * compile/compile.c (compile_instance::get_cached_type):
113 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
114 (compile_dwarf_bounds_to_c): Likewise
115 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
116 (dwarf2_compile_property_to_c): Likewise
117 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
118 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
123 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
124 * tui/tui-data.c (init_content_element): Don't initialize it.
128 * tui/tui-data.h (struct tui_win_info)
129 <detail::opaque>: Remove.
130 * tui/tui-data.c (init_win_info): Remove assignment.
134 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
136 * target-float.c (host_float_ops<T>::to_string)
137 (host_float_ops<T>::from_string): Use
138 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
139 * configure: Rebuild.
143 * printcmd.c (printf_c_string): Use
144 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
145 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
149 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
153 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
154 with resolve_abstract_p == true.
155 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
156 defaulting to false. Propagate resolve_abstract_p to
157 dwarf2_fetch_die_loc_sect_off.
158 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
159 parameter, defaulting to false.
160 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
161 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
163 * dwarf2read.h (struct die_info): Forward-declare.
164 (die_info_ptr): New typedef.
165 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
174 * gnulib/Makefile.in (aclocal_m4_deps): Move to
175 "aclocal-m4-deps.mk". Include file here.
176 $(srcdir)/aclocal.m4: Add "configure.ac".
177 * gnulib/aclocal-m4-deps.mk: New file.
178 * gnulib/update-gnulib.sh: Automatically update
179 "aclocal-m4-deps.mk".
183 * configure: Rebuild.
184 * configure.ac: Remove multi-ice code.
188 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
193 * Makefile.in (printcmd.o, target-float.o): Remove.
194 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
198 * gnulib/Makefile.in: Remove obsolete comment.
199 * Makefile.in: Remove obsolete comment.
203 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
208 * riscv-tdep.c: Add 'prologue-value.h' include.
209 (struct riscv_unwind_cache): New struct.
210 (riscv_debug_unwinder): New global.
211 (riscv_scan_prologue): Update arguments, capture register details
213 (riscv_skip_prologue): Reformat arguments line, move end of
214 prologue calculation into riscv_scan_prologue.
215 (riscv_frame_cache): Update return type, create
216 riscv_unwind_cache, scan the prologue, and fill in remaining cache
218 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
219 (riscv_frame_prev_register): Use the trad_frame within the
221 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
226 * trad-frame.h (trad_frame_set_realreg): Declare.
227 (trad_frame_set_addr): Declare.
228 * trad-frame.c (trad_frame_set_realreg): Define new function.
229 (trad_frame_set_addr): Define new function.
230 (trad_frame_set_reg_realreg): Use new function.
231 (trad_frame_set_reg_addr): Use new function.
235 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
236 pulongest instead of "%lld".
237 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
242 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
247 * gdbarch.h: Regenerate.
251 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
252 * target.h (Hardware watchpoint interfaces): Describe
253 continuable/steppable/non-steppable watchpoints.
254 * gdbarch.h, gdbarch.c: Regenerate.
258 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
261 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
262 * target.h (target_ops::have_continuable_watchpoint): Delete.
263 (target_have_continuable_watchpoint): Delete.
264 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
265 * target-delegates.c: Regenerate.
269 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
270 the files present in "gnulib/import/m4/".
274 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
275 c.sw, c.swsp, and c.sdsp.
279 * riscv-tdep.c (struct riscv_inferior_data): Delete.
280 (riscv_read_misa_reg): Don't cache value read into inferior data.
281 (riscv_new_inferior_data): Delete.
282 (riscv_inferior_data_cleanup): Delete.
283 (riscv_inferior_data): Delete.
284 (riscv_invalidate_inferior_data): Delete.
285 (_initialize_riscv_tdep): Remove initialisation of inferior data.
289 * compile/compile-cplus-types.c
290 (compile_cplus_instance::leave_scope): Take the address of scope
292 (compile_cplus_instance::convert_qualified_base): Compare quals
297 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
298 Use "%s" and host_address_to_string instead of "%p" in printf.
302 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
303 and compile-cplus-types.c.
304 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
305 * c-lang.c (cplus_language_defn): Set C++ compile functions.
306 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
308 * compile/compile-c-support.c: Include compile-cplus.h.
309 (load_libcompile): Templatize.
310 (get_compile_context): "New" function.
311 (c_get_compile_context): Use get_compile_context.
312 (cplus_get_compile_context): New function.
313 (cplus_push_user_expression, cplus_pop_user_expression)
314 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
315 (cplus_compute_program): Define new structs/functions.
316 * compile/compile-cplus-symmbols.c: New file.
317 * compile/compile-cplus-types.c: New file.
318 * compile/compile-cplus.h: New file.
319 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
321 * compile/compile-object-load.c (get_out_value_type): Use
322 strncmp_iw when comparing symbol names.
323 (compile_object_load): Add mst_bss and mst_data.
324 * compile/compile.c (_initialize_compile): Remove
325 -Wno-implicit-function-declaration from `compile_args'.
326 * compile/gcc-cp-plugin.h: New file.
327 * NEWS: Mention C++ compile support and new debug options.
331 * linespec.c (collect_info::add_symbol): Make virtual.
332 (struct symbol_searcher_collect_info): New struct.
333 (symbol_searcher::find_all_symbols): New method.
334 * symtab.h (class symbol_searcher): New class.
338 * linespec.c (struct linespec) <function_symbols, label_symbols>:
339 Change to vector of block_symbol. Update all users.
340 (struct collect_info) <symbols>: Likewise.
341 (collect_info::add_symbol): Take block_symbol as argument.
343 (decode_compound_collector) <m_symbols>: Change type to vector
344 of block_symbol. Update all users.
345 (decode_compound_collector::operator ()): Change parameter type
347 (find_method, find_function_symbols, find_linespec_symbols)
348 (find_label_symbols_in_block, find_label_symbols): Change symbol
349 vectors to block_symbol vectors.
350 * symtab.h (symbol_found_callback_ftype): Change parameter type to
355 * linespec.c (symbolp): Remove typedef and VEC definitions.
356 (bound_minimal_symbol_d): Likewise.
360 * linespec.c (decode_compound_collector::decode_compound_collector):
361 Remove initialization for `m_symtabs'.
362 (decode_compound_collector::release_symbols): Change return type
363 to std::vector. Update all callers.
364 (class decode_compound_collector) <m_symbols>: Change type to
366 (lookup_prefix_sym): Change return type to std::vector. Update all
368 (compare_symbols): Remove.
369 (std_compare_symbols): Rename to `compare_symbols'.
370 (find_method): Change `sym_classes' parameter to std::vector.
371 Update all callers. Use std::sort to sort sym_classes.
372 (find_linespec_symbols): Remove cleanup.
376 * linespec.c (struct linespec) <minimal_symbols>: Change type to
377 std::vector. Update all users.
378 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
379 (struct collect_info) <minimal_symbols>: Likewise.
380 (compare_msymbols): Return bool. Change parameters to const
381 bound_minimal_symbol references.
382 (find_method, find_function_symbols, find_linespec_symbols): Change
383 `minsyms' parameter to std::vector. Update all callers.
387 * linespec.c (struct linespec) <label_symbols>: Change type to
388 std::vector. Update all users.
389 (find_label_symbols_in_block): Change `result' parameter to
390 std::vector. Update all callers.
391 (find_label_symbols): Return std::vector. Update all callers.
395 * linespec.c (struct linespec) <function_symbols>: Change type to
396 std::vector. Update all users.
397 (struct collect_info) <function_symbols>: Likewise.
398 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
399 (std_compare_symbols): New function.
400 (find_method, find_function_symbols, find_linespec_symbols)
401 (find_label_symbols_in_block): Change `symbols' parameter to
402 std::vector. Update all callers.
403 (find_label_symbols): Likewise for `function_symbols' and
408 * linespec.c (symtab_vector_up): Define.
409 (struct linespec) <file_symtabs>: Change type to std::vector *.
411 (struct collect_info) <file_symtabs>: Likewise.
412 (collect_symtabs_from_filename): Return symtab_vector_up.
414 (decode_objc): Remove cleanup.
415 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
416 (symtab_collector::release_symtabs): Return symtab_vector_up.
418 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
420 (collect_symtabs_from_filename, symtabs_from_filename): Return
421 symtab_vector_up. Update all callers.
425 * csky-tdep.c (csky_analyze_prologue): Use
426 core_addr_to_string_nz.
430 * windows-nat.c (struct xlate_exception) <them>: Change type to
432 (xlate): Fix formatting. Remove last entry.
433 (struct xlate_exception, xlate): Comment out.
434 (windows_nat_target::resume): Use ranged for.
438 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
439 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
441 (riscv_linux_nat_target::store_registers): Likewise.
447 * gnulib/aclocal.m4: Regenerate.
448 * gnulib/config.in: Regenerate.
449 * gnulib/configure: Regenerate.
450 * gnulib/import/Makefile.am: Update.
451 * gnulib/import/Makefile.in: Update.
452 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
453 * gnulib/import/_Noreturn.h: ... this.
454 * gnulib/import/alloca.in.h: Update.
455 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
456 * gnulib/import/arg-nonnull.h: ... this.
457 * gnulib/import/assure.h: Update.
458 * gnulib/import/at-func.c: Update.
459 * gnulib/import/basename-lgpl.c: Update.
460 * gnulib/import/extra/snippet/c++defs.h: Rename to...
461 * gnulib/import/c++defs.h: ... this.
462 * gnulib/import/canonicalize-lgpl.c: Update.
463 * gnulib/import/cdefs.h: Update.
464 * gnulib/import/chdir-long.c: Update.
465 * gnulib/import/chdir-long.h: Update.
466 * gnulib/import/cloexec.c: Update.
467 * gnulib/import/cloexec.h: Update.
468 * gnulib/import/close.c: Update.
469 * gnulib/import/closedir.c: Update.
470 * gnulib/import/config.charset: Update.
471 * gnulib/import/dirent-private.h: Update.
472 * gnulib/import/dirent.in.h: Update.
473 * gnulib/import/dirfd.c: Update.
474 * gnulib/import/dirname-lgpl.c: Update.
475 * gnulib/import/dirname.h: Update.
476 * gnulib/import/dosname.h: Update.
477 * gnulib/import/dup-safer-flag.c: Update.
478 * gnulib/import/dup-safer.c: Update.
479 * gnulib/import/dup.c: Update.
480 * gnulib/import/dup2.c: Update.
481 * gnulib/import/errno.in.h: Update.
482 * gnulib/import/error.c: Update.
483 * gnulib/import/error.h: Update.
484 * gnulib/import/exitfail.c: Update.
485 * gnulib/import/exitfail.h: Update.
486 * gnulib/import/extra/update-copyright: Update.
487 * gnulib/import/fchdir.c: Update.
488 * gnulib/import/fcntl.c: Update.
489 * gnulib/import/fcntl.in.h: Update.
490 * gnulib/import/fd-hook.c: Update.
491 * gnulib/import/fd-hook.h: Update.
492 * gnulib/import/fd-safer-flag.c: Update.
493 * gnulib/import/fd-safer.c: Update.
494 * gnulib/import/fdopendir.c: Update.
495 * gnulib/import/filename.h: Update.
496 * gnulib/import/filenamecat-lgpl.c: Update.
497 * gnulib/import/filenamecat.h: Update.
498 * gnulib/import/flexmember.h: Update.
499 * gnulib/import/float+.h: Update.
500 * gnulib/import/float.c: Update.
501 * gnulib/import/float.in.h: Update.
502 * gnulib/import/fnmatch.c: Update.
503 * gnulib/import/fnmatch.in.h: Update.
504 * gnulib/import/fnmatch_loop.c: Update.
505 * gnulib/import/fpucw.h: Update.
506 * gnulib/import/frexp.c: Update.
507 * gnulib/import/frexpl.c: Update.
508 * gnulib/import/fstat.c: Update.
509 * gnulib/import/fstatat.c: Update.
510 * gnulib/import/getcwd-lgpl.c: Update.
511 * gnulib/import/getcwd.c: Update.
512 * gnulib/import/getdtablesize.c: Update.
513 * gnulib/import/getlogin_r.c: Update.
514 * gnulib/import/getprogname.c: Update.
515 * gnulib/import/getprogname.h: Update.
516 * gnulib/import/gettext.h: Update.
517 * gnulib/import/gettimeofday.c: Update.
518 * gnulib/import/glob-libc.h: Update.
519 * gnulib/import/glob.c: Update.
520 * gnulib/import/glob.in.h: Update.
521 * gnulib/import/glob_internal.h: Update.
522 * gnulib/import/glob_pattern_p.c: Update.
523 * gnulib/import/globfree.c: Update.
524 * gnulib/import/hard-locale.c: Update.
525 * gnulib/import/hard-locale.h: Update.
526 * gnulib/import/intprops.h: Update.
527 * gnulib/import/inttypes.in.h: Update.
528 * gnulib/import/isnan.c: Update.
529 * gnulib/import/isnand-nolibm.h: Update.
530 * gnulib/import/isnand.c: Update.
531 * gnulib/import/isnanl-nolibm.h: Update.
532 * gnulib/import/isnanl.c: Update.
533 * gnulib/import/itold.c: Update.
534 * gnulib/import/libc-config.h: Update.
535 * gnulib/import/limits.in.h: Update.
536 * gnulib/import/localcharset.c: Update.
537 * gnulib/import/localcharset.h: Update.
538 * gnulib/import/localtime-buffer.c: Update.
539 * gnulib/import/localtime-buffer.h: Update.
540 * gnulib/import/lstat.c: Update.
541 * gnulib/import/m4/00gnulib.m4: Update.
542 * gnulib/import/m4/__inline.m4: Update.
543 * gnulib/import/m4/absolute-header.m4: Update.
544 * gnulib/import/m4/alloca.m4: Update.
545 * gnulib/import/m4/builtin-expect.m4: Update.
546 * gnulib/import/m4/canonicalize.m4: Update.
547 * gnulib/import/m4/chdir-long.m4: Update.
548 * gnulib/import/m4/close.m4: Update.
549 * gnulib/import/m4/closedir.m4: Update.
550 * gnulib/import/m4/configmake.m4: Update.
551 * gnulib/import/m4/d-ino.m4: Update.
552 * gnulib/import/m4/d-type.m4: Update.
553 * gnulib/import/m4/dirent_h.m4: Update.
554 * gnulib/import/m4/dirfd.m4: Update.
555 * gnulib/import/m4/dirname.m4: Update.
556 * gnulib/import/m4/double-slash-root.m4: Update.
557 * gnulib/import/m4/dup.m4: Update.
558 * gnulib/import/m4/dup2.m4: Update.
559 * gnulib/import/m4/eealloc.m4: Update.
560 * gnulib/import/m4/environ.m4: Update.
561 * gnulib/import/m4/errno_h.m4: Update.
562 * gnulib/import/m4/error.m4: Update.
563 * gnulib/import/m4/exponentd.m4: Update.
564 * gnulib/import/m4/exponentl.m4: Update.
565 * gnulib/import/m4/extensions.m4: Update.
566 * gnulib/import/m4/extern-inline.m4: Update.
567 * gnulib/import/m4/fchdir.m4: Update.
568 * gnulib/import/m4/fcntl-o.m4: Update.
569 * gnulib/import/m4/fcntl.m4: Update.
570 * gnulib/import/m4/fcntl_h.m4: Update.
571 * gnulib/import/m4/fdopendir.m4: Update.
572 * gnulib/import/m4/filenamecat.m4: Update.
573 * gnulib/import/m4/flexmember.m4: Update.
574 * gnulib/import/m4/float_h.m4: Update.
575 * gnulib/import/m4/fnmatch.m4: Update.
576 * gnulib/import/m4/fnmatch_h.m4: Update.
577 * gnulib/import/m4/fpieee.m4: Update.
578 * gnulib/import/m4/frexp.m4: Update.
579 * gnulib/import/m4/frexpl.m4: Update.
580 * gnulib/import/m4/fstat.m4: Update.
581 * gnulib/import/m4/fstatat.m4: Update.
582 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
583 * gnulib/import/m4/getcwd-path-max.m4: Update.
584 * gnulib/import/m4/getcwd.m4: Update.
585 * gnulib/import/m4/getdtablesize.m4: Update.
586 * gnulib/import/m4/getlogin.m4: Update.
587 * gnulib/import/m4/getlogin_r.m4: Update.
588 * gnulib/import/m4/getpagesize.m4: Update.
589 * gnulib/import/m4/getprogname.m4: Update.
590 * gnulib/import/m4/gettimeofday.m4: Update.
591 * gnulib/import/m4/glibc21.m4: Update.
592 * gnulib/import/m4/glob.m4: Update.
593 * gnulib/import/m4/glob_h.m4: Update.
594 * gnulib/import/m4/gnulib-cache.m4: Update.
595 * gnulib/import/m4/gnulib-common.m4: Update.
596 * gnulib/import/m4/gnulib-comp.m4: Update.
597 * gnulib/import/m4/gnulib-tool.m4: Update.
598 * gnulib/import/m4/hard-locale.m4: Update.
599 * gnulib/import/m4/include_next.m4: Update.
600 * gnulib/import/m4/inttypes-pri.m4: Update.
601 * gnulib/import/m4/inttypes.m4: Update.
602 * gnulib/import/m4/isnand.m4: Update.
603 * gnulib/import/m4/isnanl.m4: Update.
604 * gnulib/import/m4/largefile.m4: Update.
605 * gnulib/import/m4/limits-h.m4: Update.
606 * gnulib/import/m4/localcharset.m4: Update.
607 * gnulib/import/m4/locale-fr.m4: Update.
608 * gnulib/import/m4/locale-ja.m4: Update.
609 * gnulib/import/m4/locale-zh.m4: Update.
610 * gnulib/import/m4/localtime-buffer.m4: Update.
611 * gnulib/import/m4/longlong.m4: Update.
612 * gnulib/import/m4/lstat.m4: Update.
613 * gnulib/import/m4/malloc.m4: Update.
614 * gnulib/import/m4/malloca.m4: Update.
615 * gnulib/import/m4/math_h.m4: Update.
616 * gnulib/import/m4/mbrtowc.m4: Update.
617 * gnulib/import/m4/mbsinit.m4: Update.
618 * gnulib/import/m4/mbsrtowcs.m4: Update.
619 * gnulib/import/m4/mbstate_t.m4: Update.
620 * gnulib/import/m4/memchr.m4: Update.
621 * gnulib/import/m4/memmem.m4: Update.
622 * gnulib/import/m4/mempcpy.m4: Update.
623 * gnulib/import/m4/memrchr.m4: Update.
624 * gnulib/import/m4/mkdir.m4: Update.
625 * gnulib/import/m4/mkstemp.m4: Update.
626 * gnulib/import/m4/mmap-anon.m4: Update.
627 * gnulib/import/m4/mode_t.m4: Update.
628 * gnulib/import/m4/msvc-inval.m4: Update.
629 * gnulib/import/m4/msvc-nothrow.m4: Update.
630 * gnulib/import/m4/multiarch.m4: Update.
631 * gnulib/import/m4/nocrash.m4: Update.
632 * gnulib/import/m4/off_t.m4: Update.
633 * gnulib/import/m4/onceonly.m4: Update.
634 * gnulib/import/m4/open-cloexec.m4: Update.
635 * gnulib/import/m4/open.m4: Update.
636 * gnulib/import/m4/openat.m4: Update.
637 * gnulib/import/m4/opendir.m4: Update.
638 * gnulib/import/m4/pathmax.m4: Update.
639 * gnulib/import/m4/rawmemchr.m4: Update.
640 * gnulib/import/m4/readdir.m4: Update.
641 * gnulib/import/m4/readlink.m4: Update.
642 * gnulib/import/m4/realloc.m4: Update.
643 * gnulib/import/m4/rename.m4: Update.
644 * gnulib/import/m4/rewinddir.m4: Update.
645 * gnulib/import/m4/rmdir.m4: Update.
646 * gnulib/import/m4/save-cwd.m4: Update.
647 * gnulib/import/m4/secure_getenv.m4: Update.
648 * gnulib/import/m4/setenv.m4: Update.
649 * gnulib/import/m4/signal_h.m4: Update.
650 * gnulib/import/m4/ssize_t.m4: Update.
651 * gnulib/import/m4/stat-time.m4: Update.
652 * gnulib/import/m4/stat.m4: Update.
653 * gnulib/import/m4/std-gnu11.m4: Update.
654 * gnulib/import/m4/stdbool.m4: Update.
655 * gnulib/import/m4/stddef_h.m4: Update.
656 * gnulib/import/m4/stdint.m4: Update.
657 * gnulib/import/m4/stdio_h.m4: Update.
658 * gnulib/import/m4/stdlib_h.m4: Update.
659 * gnulib/import/m4/strchrnul.m4: Update.
660 * gnulib/import/m4/strdup.m4: Update.
661 * gnulib/import/m4/strerror.m4: Update.
662 * gnulib/import/m4/string_h.m4: Update.
663 * gnulib/import/m4/strstr.m4: Update.
664 * gnulib/import/m4/strtok_r.m4: Update.
665 * gnulib/import/m4/sys_socket_h.m4: Update.
666 * gnulib/import/m4/sys_stat_h.m4: Update.
667 * gnulib/import/m4/sys_time_h.m4: Update.
668 * gnulib/import/m4/sys_types_h.m4: Update.
669 * gnulib/import/m4/tempname.m4: Update.
670 * gnulib/import/m4/time_h.m4: Update.
671 * gnulib/import/m4/unistd-safer.m4: Update.
672 * gnulib/import/m4/unistd_h.m4: Update.
673 * gnulib/import/m4/warn-on-use.m4: Update.
674 * gnulib/import/m4/wchar_h.m4: Update.
675 * gnulib/import/m4/wchar_t.m4: Update.
676 * gnulib/import/m4/wctype_h.m4: Update.
677 * gnulib/import/m4/wint_t.m4: Update.
678 * gnulib/import/malloc.c: Update.
679 * gnulib/import/malloc/scratch_buffer.h: Update.
680 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
681 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
682 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
683 * gnulib/import/malloca.c: Update.
684 * gnulib/import/malloca.h: Update.
685 * gnulib/import/malloca.valgrind: Update.
686 * gnulib/import/math.in.h: Update.
687 * gnulib/import/mbrtowc.c: Update.
688 * gnulib/import/mbsinit.c: Update.
689 * gnulib/import/mbsrtowcs-impl.h: Update.
690 * gnulib/import/mbsrtowcs-state.c: Update.
691 * gnulib/import/mbsrtowcs.c: Update.
692 * gnulib/import/memchr.c: Update.
693 * gnulib/import/memmem.c: Update.
694 * gnulib/import/mempcpy.c: Update.
695 * gnulib/import/memrchr.c: Update.
696 * gnulib/import/mkdir.c: Update.
697 * gnulib/import/mkstemp.c: Update.
698 * gnulib/import/msvc-inval.c: Update.
699 * gnulib/import/msvc-inval.h: Update.
700 * gnulib/import/msvc-nothrow.c: Update.
701 * gnulib/import/msvc-nothrow.h: Update.
702 * gnulib/import/open.c: Update.
703 * gnulib/import/openat-die.c: Update.
704 * gnulib/import/openat-priv.h: Update.
705 * gnulib/import/openat-proc.c: Update.
706 * gnulib/import/openat.c: Update.
707 * gnulib/import/openat.h: Update.
708 * gnulib/import/opendir.c: Update.
709 * gnulib/import/pathmax.h: Update.
710 * gnulib/import/pipe-safer.c: Update.
711 * gnulib/import/rawmemchr.c: Update.
712 * gnulib/import/readdir.c: Update.
713 * gnulib/import/readlink.c: Update.
714 * gnulib/import/realloc.c: Update.
715 * gnulib/import/ref-add.sin: Update.
716 * gnulib/import/ref-del.sin: Update.
717 * gnulib/import/rename.c: Update.
718 * gnulib/import/rewinddir.c: Update.
719 * gnulib/import/rmdir.c: Update.
720 * gnulib/import/same-inode.h: Update.
721 * gnulib/import/save-cwd.c: Update.
722 * gnulib/import/save-cwd.h: Update.
723 * gnulib/import/scratch_buffer.h: Update.
724 * gnulib/import/secure_getenv.c: Update.
725 * gnulib/import/setenv.c: Update.
726 * gnulib/import/signal.in.h: Update.
727 * gnulib/import/stat-time.c: Update.
728 * gnulib/import/stat-time.h: Update.
729 * gnulib/import/stat-w32.c: Update.
730 * gnulib/import/stat-w32.h: Update.
731 * gnulib/import/stat.c: Update.
732 * gnulib/import/stdbool.in.h: Update.
733 * gnulib/import/stddef.in.h: Update.
734 * gnulib/import/stdint.in.h: Update.
735 * gnulib/import/stdio.in.h: Update.
736 * gnulib/import/stdlib.in.h: Update.
737 * gnulib/import/str-two-way.h: Update.
738 * gnulib/import/strchrnul.c: Update.
739 * gnulib/import/strdup.c: Update.
740 * gnulib/import/streq.h: Update.
741 * gnulib/import/strerror-override.c: Update.
742 * gnulib/import/strerror-override.h: Update.
743 * gnulib/import/strerror.c: Update.
744 * gnulib/import/string.in.h: Update.
745 * gnulib/import/stripslash.c: Update.
746 * gnulib/import/strnlen1.c: Update.
747 * gnulib/import/strnlen1.h: Update.
748 * gnulib/import/strstr.c: Update.
749 * gnulib/import/strtok_r.c: Update.
750 * gnulib/import/sys_stat.in.h: Update.
751 * gnulib/import/sys_time.in.h: Update.
752 * gnulib/import/sys_types.in.h: Update.
753 * gnulib/import/tempname.c: Update.
754 * gnulib/import/tempname.h: Update.
755 * gnulib/import/time.in.h: Update.
756 * gnulib/import/unistd--.h: Update.
757 * gnulib/import/unistd-safer.h: Update.
758 * gnulib/import/unistd.in.h: Update.
759 * gnulib/import/unsetenv.c: Update.
760 * gnulib/import/verify.h: Update.
761 * gnulib/import/extra/snippet/warn-on-use.h: Update.
762 * gnulib/import/wchar.in.h: Update.
763 * gnulib/import/wctype.in.h: Update.
764 * gnulib/import/xalloc-oversized.h: Update.
765 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
766 "53e2c179f26a890fa6685af4b6c1397ee370433b".
771 * gdb/main.c (captured_main_1): Exit with nonzero status
772 in batch mode if the last command to be executed failed.
773 * NEWS: Mention the above.
777 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
778 end of warning message.
783 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
784 (aarch64_extract_return_value): Use
785 aapcs_is_vfp_call_or_return_candidate.
786 (aarch64_return_in_memory): Likewise.
787 (aarch64_store_return_value): Likewise.
792 (aapcs_is_vfp_call_or_return_candidate): Make static
793 (pass_in_v_or_stack): Remove function.
794 (pass_in_v_vfp_candidate): New function.
795 (aarch64_push_dummy_call): Check for float register candidates.
799 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
800 (aapcs_is_vfp_call_or_return_candidate_1): New function.
801 (aapcs_is_vfp_call_or_return_candidate): Likewise.
806 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
807 (struct ipa_sym_addresses): Rename to...
808 (struct ipa_sym_addresses_common): ... this.
809 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
813 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
814 (token_fifo): Now a std::vector.
815 (yylex, c_parse): Update.
816 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
817 (token_fifo): Now a std::vector.
818 (yylex, d_parse): Update.
819 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
820 (token_fifo): Now a std::vector.
821 (yylex, go_parse): Update.
825 * parser-defs.h (struct type_stack) <elements>: Change type to
826 std::vector<union type_stack_elt>.
827 <depth, size>: Remove.
828 * parse.c (parse_exp_in_context_1): Adjust.
829 (type_stack_reserve): Remove.
830 (check_type_stack_depth): Remove.
831 (insert_into_type_stack): Adjust to std::vector.
832 (insert_type): Likewise.
833 (push_type): Likewise.
834 (push_type_int): Likewise.
835 (insert_type_address_space): Likewise.
836 (pop_type): Likewise.
837 (pop_type_int): Likewise.
838 (pop_typelist): Likewise.
839 (pop_type_stack): Likewise.
840 (append_type_stack): Likewise.
841 (push_type_stack): Likewise.
842 (get_type_stack): Likewise.
843 (type_stack_cleanup): Likewise.
844 (push_typelist): Likewise.
845 (follow_types): Likewise.
846 (_initialize_parse): Likewise.
850 * NEWS: Mention csky target.
856 * csky-linux-tdep.c: New file.
857 * csky-tdep.c: Likewise.
858 * csky-tdep.h: Likewise.
859 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
861 (HFILES_NO_SRCDIR): Add csky-tdep.h.
862 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
863 * configure.tgt: Add csky support.
867 * python/py-framefilter.c (py_print_frame): Print frame architecture
868 when printing on an MI output.
873 * configure: Rebuild.
874 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
878 * aarch64-linux-tdep.c
879 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
884 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
886 (ppc64_standard_linkage1, ppc64_standard_linkage2)
887 (ppc64_standard_linkage3, ppc64_standard_linkage4)
888 (ppc64_standard_linkage5, ppc64_standard_linkage6)
889 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
894 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
895 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
899 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
900 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
902 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
904 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
906 * sparc-linux-tdep.c (sparc32_linux_sigframe)
907 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
908 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
910 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
911 (ppc64_linux_sigaction_tramp_frame)
912 (ppc32_linux_sighandler_tramp_frame)
913 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
914 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
915 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
916 * mn10300-linux-tdep.c (am33_linux_sigframe)
917 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
918 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
919 * mips-linux-tdep.c (mips_linux_o32_sigframe)
920 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
921 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
922 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
923 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
924 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
925 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
926 * microblaze-linux-tdep.c
927 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
928 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
929 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
930 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
931 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
932 * common/common-types.h (ULONGEST_MAX): New define.
933 (CORE_ADDR_MAX): Fix formatting.
934 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
935 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
936 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
937 (arm_linux_rt_sigreturn_tramp_frame)
938 (arm_eabi_linux_sigreturn_tramp_frame)
939 (arm_eabi_linux_rt_sigreturn_tramp_frame)
940 (thumb2_eabi_linux_sigreturn_tramp_frame)
941 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
942 (arm_linux_restart_syscall_tramp_frame)
943 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
944 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
945 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
947 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
951 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
953 * mips-tdep.c (mips_deal_with_atomic_sequence)
954 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
955 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
956 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
957 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
959 * aarch64-tdep.c (aarch64_software_single_step): Use
964 * linespec.c (complete_linespec_component): Add cast to "char".
965 * completer.c (completion_tracker::build_completion_result): Add
970 * solist.h (struct solist, struct target_so_ops): Fix
975 * ada-tasks.c (ada_task_info_s): Remove typedef.
976 (DEF_VEC_O(ada_task_info_s)): Remove.
977 (struct ada_tasks_inferior_data): Initialize fields.
978 <task_list>: Make an std::vector.
979 (get_ada_tasks_inferior_data): Allocate with new.
980 (ada_get_task_number): Adjust.
981 (get_task_number_from_id): Likewise.
982 (valid_task_id): Likewise.
983 (ada_get_task_info_from_ptid): Likewise.
984 (iterate_over_live_ada_tasks): Likewise.
985 (add_ada_task): Likewise.
986 (read_known_tasks): Likewise.
987 (ada_build_task_list): Likewise.
988 (print_ada_task_info): Likewise.
989 (info_task): Likewise.
990 (task_command_1): Likewise.
994 * ada-lang.c (add_angle_brackets): Return std::string.
998 * python/py-threadevent.c (py_get_event_thread): Initialize
1003 * python/py-bpevent.c (create_breakpoint_event_object): Use
1004 copy-initialization.
1005 * python/py-continueevent.c (emit_continue_event): Use
1006 copy-initialization.
1007 * python/py-exitedevent.c (create_exited_event_object): Return a
1009 (emit_exited_event): Use copy-initialization.
1010 * python/py-inferior.c (python_new_inferior)
1011 (python_inferior_deleted, add_thread_object): Use
1012 copy-initialization.
1013 * python/py-infevents.c (create_inferior_call_event_object)
1014 (create_register_changed_event_object)
1015 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1016 (emit_inferior_call_event, emit_memory_changed_event)
1017 (emit_register_changed_event): Use copy-initialization.
1018 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1019 Return a gdbpy_ref<>.
1020 (emit_new_objfile_event): Use copy-initialization.
1021 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1022 (emit_clear_objfiles_event): Use copy-initialization.
1023 * python/py-signalevent.c (create_signal_event_object): Use
1024 copy-initialization.
1025 * python/py-threadevent.c (create_thread_event_object): Use
1026 copy-initialization.
1032 * python/py-continueevent.c: Include "gdbthread.h".
1033 (create_continue_event_object): Add intro comment. Add 'ptid'
1034 parameter. Use it to find thread to pass to
1035 create_thread_event_object.
1036 (emit_continue_event): Pass PTID down to
1037 create_continue_event_object.
1038 * python/py-event.h (py_get_event_thread): Declare.
1039 (create_thread_event_object): Remove default from 'thread'
1041 * python/py-stopevent.c (create_stop_event_object): Use
1042 py_get_event_thread.
1043 * python/py-threadevent.c (get_event_thread): Rename to ...
1044 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1045 and use it to find the thread.
1046 (create_thread_event_object): Assert that THREAD isn't null.
1047 Don't find the event thread here.
1051 * block.h (blockrange, blockranges): New struct declarations.
1052 (struct block): Add new field named `ranges'.
1053 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1054 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1055 macros for accessing ranges in struct block.
1056 (make_blockranges): New declaration.
1057 block.c (make_blockranges): New function.
1058 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1060 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1061 * blockframe.c (cache_pc_function_block): New static global.
1062 (clear_pc_function_cache): Clear cache_pc_function_block.
1063 (find_pc_partial_function): Move comment to symtab.h. Add
1064 support for non-contiguous blocks.
1065 * cli/cli-cmds.c (block.h): Include.
1066 (print_disassembly): Handle printing of non-contiguous blocks.
1067 (disassemble_current_function): Likewise.
1068 (disassemble_command): Likewise.
1070 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1072 * blockframe.c (get_pc_function_start): Likewise.
1073 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1074 (gcc_symbol_address): Likewise.
1075 * compile/compile-object-run.c (compile_object_run): Likewise.
1076 * compile/compile.c (get_expr_block_and_pc): Likewise.
1077 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1078 (func_addr_to_tail_call_list): Likewise.
1079 * findvar.c (default_read_var_value): Likewise.
1080 * inline-frame.c (inline_frame_this_id): Likewise.
1081 (skip-inline_frames): Likewise.
1082 * infcmd.c (until_next_command): Likewise.
1083 * linespec.c (convert_linespec_to_sals): Likewise.
1084 * parse.c (parse_exp_in_context_1): Likewise.
1085 * printcmd.c (build_address_symbolic): likewise.
1086 (info_address_command): Likewise.
1087 symtab.c (find_function_start_sal): Likewise.
1088 (skip_prologue_sal): Likewise.
1089 (find_function_alias_target): Likewise.
1090 (find_gnu_ifunc): Likewise.
1091 * stack.c (find_frame_funname): Likewise.
1092 * symtab.c (fixup_symbol_section): Likewise.
1093 (find_function_start_sal): Likewise.
1094 (skip_prologue_sal): Likewsie.
1095 (find_function_alias_target): Likewise.
1096 (find_gnu_ifunc): Likewise.
1097 * tracepoint.c (info_scope_command): Likewise.
1098 * value.c (value_fn_field): Likewise.
1100 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1101 in place of find_pc_partial_function.
1102 * blockframe.c (find_function_entry_range_from_pc): New function.
1103 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1104 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1105 for each range in a block.
1110 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1115 * solib-svr4.c (read_program_headers_from_bfd): Return
1116 gdb::optional<gdb::byte_vector>.
1117 (svr4_exec_displacement): Adjust.
1121 * solib-svr4.c (read_program_header): Return
1122 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1123 (find_program_interpreter): Return
1124 gdb::optional<gdb::byte_vector>.
1125 (scan_dyntag_auxv): Adjust.
1126 (enable_break): Adjust.
1127 (svr4_exec_displacement): Adjust.
1131 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1132 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1136 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1138 * guile/scm-utils.c (gdbscm_printf): Likewise.
1139 * serial.c (serial_printf): Likewise.
1140 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1144 * stack.c (print_frame): Print frame architecture when printing on
1146 * NEWS: Mention new "arch" attribute in frame output.
1150 * arch/aarch64.h (aarch64_regnum): Update comment.
1154 * NEWS: Add SVE to 8.2 section.
1158 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1159 out from gdbscm_parse_function_args.
1160 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1161 gdbscm_parse_function_args_1.
1166 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1171 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1176 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1177 for PT_TLS segments.
1181 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1182 dwarf_variable_value.
1183 * dwarf2-frame.c (class dwarf_expr_executor):
1184 Add override for dwarf_variable_value.
1185 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1186 (class symbol_needs_eval_context): Likewise.
1187 (indirect_synthetic_pointer): Add forward declaration.
1188 (sect_variable_value): New function.
1189 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1190 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1191 for DW_OP_GNU_variable_value.
1195 * top.c (read_command_file): Update.
1196 (command_line_input): Remove "repeat" argument.
1197 * ada-lang.c (get_selections): Update.
1198 * linespec.c (decode_line_2): Update.
1199 * defs.h (command_line_input): Remove argument.
1200 * cli/cli-script.c (read_next_line): Update.
1201 * python/py-gdb-readline.c: Update.
1205 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1210 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1214 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1215 If used, use find_pc_partial_function to find address range
1217 * mi/mi-main.c (mi_cmd_list_features): Report
1218 "data-disassemble-a-option" feature.
1219 * NEWS: Mention new -data-disassemble option -a.
1223 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1227 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1228 (aarch64_linux_collect_sve_regset): Likewise.
1229 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1230 * regcache.h (regcache_map_entry_size): New function.
1234 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1235 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1236 (SVE_HEADER_VL_LENGTH): Likewise.
1237 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1238 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1239 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1240 (SVE_HEADER_SIZE_OFFSET): Likewise.
1241 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1242 (SVE_HEADER_VL_OFFSET): Likewise.
1243 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1244 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1245 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1246 (SVE_HEADER_SIZE): Likewise.
1247 (aarch64_linux_core_read_vq): Add function.
1248 (aarch64_linux_core_read_description): Check for SVE section.
1252 * aarch64-fbsd-tdep.c
1253 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1255 * aarch64-linux-tdep.c
1256 (aarch64_linux_iterate_over_regset_sections): Likewise.
1257 * alpha-linux-tdep.c
1258 (alpha_linux_iterate_over_regset_sections):
1260 (alphanbsd_iterate_over_regset_sections): Likewise.
1262 (amd64fbsd_iterate_over_regset_sections): Likewise.
1263 * amd64-linux-tdep.c
1264 (amd64_linux_iterate_over_regset_sections): Likewise.
1266 (armbsd_iterate_over_regset_sections): Likewise.
1268 (arm_fbsd_iterate_over_regset_sections): Likewise.
1270 (arm_linux_iterate_over_regset_sections): Likewise.
1271 * corelow.c (get_core_registers_cb): Likewise.
1272 (core_target::fetch_registers): Likewise.
1273 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1274 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1275 * gdbarch.h (void): Regenerate.
1276 * gdbarch.sh: Add supply_size and collect_size.
1277 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1278 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1279 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1280 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1281 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1282 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1283 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1284 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1285 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1286 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1287 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1288 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1289 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1290 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1291 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1292 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1293 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1294 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1295 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1296 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1297 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1298 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1299 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1300 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1301 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1302 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1303 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1304 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1305 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1306 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1310 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1315 * compile/compile-c-support.c (add_code_header, add_code_footer):
1316 Move into policy class.
1317 (c_push_user_expression, pop_user_expression_nop)
1318 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1319 (compile_program): New host class.
1320 (c_compile_program): New typedef.
1321 (c_compute_porgram): Use c_compile_program.
1325 * compile/compile-internal.h (compile_instance::~compile_instance):
1326 Remove calls to htab_delete.
1327 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1328 * compile.c (compile_instance::compile_instance): Initialize
1329 htab unique pointers.
1330 (compile_instance::get_cached_type, compile_instance::insert_type)
1331 (compile_instance::error_symbol_once): Update for unique_ptr.
1335 * compile/compile-c-symbols.c (struct symbol_error)
1336 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1337 (compile_instance::insert_symbol_error)
1338 (compile_instance::error_symbol_once): Move to ...
1339 * compile/compile.c: ... here.
1343 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1344 instead of `new_compile_instance'.
1345 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1347 If the symbol error map is not initialized, create it.
1348 (generate_c_for_for_one_symbol): Do not check/initialize
1349 the symbol error map.
1350 * compile/compile-c-types.c (compile_c_instance): Make a class.
1352 (compile_instance::compile_instance): Initialize the type cache.
1353 (get_cached_type): New function.
1354 (insert_type): Update description.
1355 (compile_c_instance::m_default_cflags): Define.
1356 (convert_type): Update description. Use get_cached_type.
1357 (delete_instance): Moved to destructor.
1358 (new_compile_instance): Moved to constructor.
1359 * compile/compile-c.h (compile_c_instance): Make class inheriting
1360 from compile_instance.
1361 <base>: Remove field.
1362 <type_map, symbol_err_map>: Move to base class.
1363 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1364 * compile/compile-internal.h (compile_instance): Make class.
1365 <type_map_t, symbol_err_map_t>: Define.
1366 <fe>: Rename to `m_gcc_fe'.
1367 <scope, block, gcc_target_options>: Add `m_' prefix.
1368 <m_type_map, m_symbol_err_map>: New fields, moved from
1371 (convert_type, new_compile_instance): Remove.
1372 * compile/compile.c (cleanup_compile_instance): Remove.
1373 (compile_to_object): Use unique_ptr to eliminate cleanups.
1374 (compile_instance::set_print_callback, compile_instance::version)
1375 (compile_instance::set_verbose)
1376 (compile_instance::set_driver_filename)
1377 (compile_instance::set_triplet_regexp)
1378 (compile_instance::set_arguments)
1379 (compile_instance::set_source_file)
1380 (compile_instance::compile): Define.
1384 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1385 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1386 gcc-c-fe.def to define C plugin.
1387 (delete_instance): Delete `c_plugin'.
1388 (new_compile_instance): Initialize `c_plugin'.
1389 * compile/compile-c.h: Include gcc_c_plugin.h.
1390 (struct compile_c_instance) <c_plugin>: New member.
1391 * gcc-c-plugin.h: New file.
1392 Update all callers with API change.
1396 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1397 (HFILES_NO_SRCDIR): ... to here.
1398 Add compile-internal.h and compile-c.h.
1399 * compile/compile-c-support.c: Include compile-c.h.
1400 * compile/compile-c-symbols.c: Include compile-c.h.
1401 (generate_c_for_variable_locations): Update comment.
1402 * compile/compile-c-types.c: Include compile-c.h.
1403 * compile/compile-c.h: New file -- moved C language declarations
1404 from other files here.
1405 * compile/compile-internal.h: Do not include hashtab.h or
1406 common/enum-flags.h.
1407 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1408 (gcc_convert_symbol, gcc_symbol_address)
1409 (generate_c_for_variable_locations, c_get_mode_for_size)
1410 (c_get_range_decl_name): Definitions moved to compile-c.h.
1411 * compile/compile-loc2c.c: Include compile-c.h.
1415 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1416 (c_symbol_substitution_name): ... this.
1421 * compile/compile-c-support.c (c_compute_program): Use
1422 unique_xmalloc_ptr to eliminate cleanup.
1423 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1424 Return a unique_xmalloc_ptr and eliminate cleanup.
1425 * compile/compile-internal.h (generate_c_for_variable_locations):
1426 Return unique_xmalloc_ptr and update description.
1430 * corelow.c (core_target::get_core_register_section): Rename
1431 min_size to section_min_size.
1435 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1436 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1437 * NEWS: Mention new GNU/Linux RISC-V target.
1438 * configure.host: Add riscv*-*-linux*.
1439 * configure.nat: Add riscv*.
1440 * configure.tgt: Add riscv*-*-linux*.
1441 * riscv-linux-nat.c: New file.
1442 * riscv-linux-tdep.c: New file.
1446 * infrun.c (resume): Make static, add forward declaration.
1447 (proceed): Update header comment.
1448 * infrun.h (resume): Delete declaration.
1452 * riscv-tdep.h: Minor formatting fixes.
1456 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1457 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1458 (test_mkdir_recursive): Likewise.
1459 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1463 * valarith.c (value_subscripted_rvalue): If an array is not in
1464 memory, and we don't know the upper bound, then we can't know that
1465 the requested element exists or not.
1469 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1470 (target_options_to_string): Add comment.
1474 * unittests/scoped_mmap-selftests.c: Check result of "write".
1478 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1479 (decode_register_index_short): New.
1480 (decode_j_type_insn, decode_cj_type_insn): New.
1481 (decode_b_type_insn, decode_cb_type_insn): New.
1482 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1483 local xlen. Check xlen when decoding ambiguous compressed insns. In
1484 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1485 is_c_sw_insn instead of is_sw_insn.
1486 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1487 (riscv_software_single_step): New.
1488 * riscv-tdep.h (riscv_software_single_step): Declare.
1490 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1491 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1496 * target.c (dispose_inferior): Don't dispose of inferiors that are
1501 * remote.c (remote_target::download_tracepoint): Change char* to
1506 * target.h (target_options_to_string): Return an std::string.
1507 * target.c (str_comma_list_concat_elem): Return void, use
1509 (do_option): Likewise.
1510 (target_options_to_string): Return an std::string.
1511 * linux-nat.c (linux_nat_target::wait): Adjust.
1512 * target-debug.h (target_debug_print_options): Adjust.
1516 * Makefile.in (CPPFLAGS): New variable.
1517 (INTERNAL_CPPFLAGS): Use it.
1521 * NEWS: Mention the index cache.
1525 * common/pathstuff.h (get_standard_cache_dir): New.
1526 * common/pathstuff.c (get_standard_cache_dir): New.
1527 * build-id.h (build_id_to_string): New.
1528 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1529 DEBUG_STR_SUFFIX): Move to here.
1530 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1531 DEBUG_STR_SUFFIX): Move from there.
1532 (write_psymtabs_to_index): Make non-static, add basename
1533 parameter. Write to temporary files, rename when done.
1534 (save_gdb_index_command): Adjust call to
1535 write_psymtabs_to_index.
1536 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1538 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1539 (get_gdb_index_contents_from_cache): New.
1540 (get_gdb_index_contents_from_cache_dwz): New.
1541 (dwarf2_initialize_objfile): Read index from cache.
1542 (dwarf2_build_psymtabs): Save to index.
1543 * dwarf-index-cache.h: New file.
1544 * dwarf-index-cache.c: New file.
1545 * dwarf-index-write.h: New file.
1549 * gnulib/aclocal.m4: Re-generate.
1550 * gnulib/config.in: Re-generate.
1551 * gnulib/configure: Re-generate.
1552 * gnulib/import/Makefile.am: Re-generate.
1553 * gnulib/import/Makefile.in: Re-generate.
1554 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1555 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1556 * gnulib/import/m4/mkdir.m4: New file.
1557 * gnulib/import/mkdir.c: New file.
1558 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1563 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1564 * common/scoped_mmap.c: New file.
1565 * common/scoped_mmap.h (destroy): New method.
1566 (~scoped_mmap, reset): Use destroy.
1567 (scoped_mmap): New move constructor.
1568 (mmap_file): New declaration.
1569 * unittests/scoped_mmap-selftests.c (test_normal,
1570 test_invalid_filename, run_tests): New functions.
1571 (_initialize_scoped_mmap_selftests): Register selftest.
1575 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1576 (read_gdb_index_from_buffer): ... this. Remove section
1577 parameter, add buffer parameter.
1578 (get_gdb_index_contents_ftype,
1579 get_gdb_index_contents_dwz_ftype): New typedefs.
1580 (dwarf2_read_gdb_index): Add callback parameters to get the
1582 (get_gdb_index_contents_from_section): New.
1583 (dwarf2_initialize_objfile): Update call to
1584 dwarf2_read_gdb_index.
1588 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1589 (gdb_open_cloexec): Likewise.
1590 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1591 (commandline_from_pid): Likewise.
1592 (linux_xfer_osdata_threads): Likewise.
1593 (linux_xfer_osdata_fds): Likewise.
1594 * ada-lang.c (is_package_name): Likewise.
1595 * auxv.c (procfs_xfer_auxv): Likewise.
1596 * breakpoint.c (print_one_breakpoint_location): Use
1598 (print_one_catch_solib): Use string_printf.
1599 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1600 (add_pe_forwarded_sym): Likewise.
1601 * dwarf2read.c (create_type_unit_group): Likewise.
1602 (build_error_marker_type): Likewise.
1603 * infcall.c (get_function_name): Likewise.
1604 * valprint.c (print_converted_chars_to_obstack): Likewise.
1605 * xtensa-tdep.c (xtensa_register_type): Likewise.
1609 * remote.c (remote_target::download_tracepoint): Fix format
1614 * tracefile.c: Include common/byte-vector.h.
1615 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1616 with trace_regblock_size if needed. Update uses of buf.
1620 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1621 std::vector<unsigned char>.
1622 * tracepoint.c (collection_list::collection_list): Remove
1623 m_regs_mask initializer from initializer list. Resize
1624 m_regs_mask using the largest remote register number.
1625 (collection_list::add_remote_register): Remove size check on
1626 m_regs_mask. Use at to access element.
1627 (collection_list::stringify): Change type of temp_buf to
1628 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1629 stringify the register mask. Use pack_hex_byte for the register
1634 * tracepoint.h (class collection_list) <add_register>: Remove.
1635 <add_remote_register, add_ax_registers, add_local_register>:
1637 <add_memrange>: Add scope parameter.
1638 * tracepoint.c (encode_actions_1): Likewise.
1639 (collection_list::add_register): Rename to ...
1640 (collection_list::add_remote_register): ... this. Update
1642 (collection_list::add_ax_registers, add_local_register): New
1644 (collection_list::add_memrange): Add scope parameter. Call
1645 add_local_register instead of add_register.
1646 (finalize_tracepoint_aexpr): New function.
1647 (collection_list::collect_symbol): Update calls to add_memrange.
1648 Call add_local_register instead of add_register. Call
1649 add_ax_registers. Call finalize_tracepoint_aexpr.
1650 (encode_actions_1): Get remote regnos for $reg action. Call
1651 add_remote_register, add_ax_registers, and add_local_register.
1652 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1653 (validate_actionline): Call finalize_tracepoint_aexpr.
1657 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1658 Replace array buf with gdb::char_vector buf, of size
1659 get_remote_packet_size (). Replace references to buf and
1660 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1661 and xsnprintf with snprintf. Raise errors if the buffer is too
1666 * remote.c (remote_target::download_tracepoint): Fix the has_more
1667 predicate in the QTDP action list iteration.
1671 * remote.c (remote_target::download_tracepoint): Fix indentation
1676 * proc-api.c (_initialize_proc_api): Remove c, unused.
1677 * procfs.c (procfs_init_inferior): Remove signals, unused.
1678 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1684 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1685 'W_STOPCODE (0)' as this could be ambiguous.
1689 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1690 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1696 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1698 (process_structure_scope): Likewise.
1703 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1708 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1709 (darwin_suspend_inferior, darwin_resume_inferior)
1710 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1711 (darwin_check_new_threads): Check result of get_darwin_inferior.
1719 * varobj.c (varobj_get_path_expr_parent): Report an error if
1720 parent is a dynamic varobj.
1724 * gnulib/aclocal.m4: Re-generate.
1725 * gnulib/config.in: Re-generate.
1726 * gnulib/configure: Re-generate.
1727 * gnulib/import/Makefile.in: Re-generate.
1728 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1729 * gnulib/import/m4/onceonly.m4: Re-generate.
1733 * target-descriptions.c (struct xml_test_tdesc): New.
1734 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1735 (record_xml_tdesc): Update.
1736 (maintenance_check_xml_descriptions): Update.
1737 * target-descriptions.h (record_xml_tdesc): Update comment.
1741 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1742 checking array bounds are defined.
1746 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1747 irreflexivity violation.
1751 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1752 * value.c (unpack_long): Remove lint code.
1753 * valops.c (value_ind): Remove lint code.
1754 * valarith.c (value_x_binop, value_x_unop, value_equal)
1755 (value_pos): Remove lint code.
1759 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1760 with undefined upper bound as <optimized out>.
1764 * gcore.in: Rename variable "name" to "prefix". Expand
1769 * windows-nat.c (windows_nat_target::create_inferior): Update to
1770 call close() in global namespace.
1774 * dwarf-index-write.c (add_address_entry): Don't add objfile
1776 * dbxread.c (find_stab_function): Rename from
1777 find_stab_function_addr. Return a bound_minimal_symbol.
1778 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1779 Don't add objfile offsets.
1780 (end_psymtab): Use raw_text_low, raw_text_high,
1781 MSYMBOL_VALUE_RAW_ADDRESS.
1782 (read_ofile_symtab): Update.
1783 (process_one_symbol): Update.
1784 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1786 (dw2_relocate): Remove.
1787 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1789 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1791 (process_psymtab_comp_unit_reader, add_partial_symbol)
1792 (add_partial_subprogram, dwarf2_ranges_read): Update.
1793 (load_partial_dies): Update.
1794 (add_address_entry): Don't add objfile offsets.
1795 (dwarf2_build_include_psymtabs): Update.
1796 (create_addrmap_from_aranges): Don't add objfile offsets.
1797 (dw2_find_pc_sect_compunit_symtab): Update.
1798 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1799 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1801 (parse_partial_symbols): Don't add objfile offsets. Use
1802 raw_text_low, raw_text_high. Update.
1803 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1804 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1805 or call 'relocate' quick function. Clear psymbol_map.
1806 * psympriv.h (struct partial_symbol) <address>: Add section
1808 <set_unrelocated_address>: Rename from set_address.
1809 <raw_text_low, raw_text_high>: New methods.
1810 <text_low, text_high>: Add objfile parameter.
1811 (add_psymbol_to_bcache): Add 'section' parameter. Call
1812 set_unrelocated_address.
1813 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1814 (find_pc_psymbol): Update.
1815 (fixup_psymbol_section, relocate_psymtabs): Remove.
1816 (dump_psymtab, psym_functions): Update.
1817 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1819 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1820 (start_psymtab_common): Update.
1821 * symfile-debug.c (debug_qf_relocate): Remove.
1822 (debug_sym_quick_functions): Update.
1823 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1824 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1829 * dbxread.c (end_psymtab): Use text_high_valid and
1831 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1832 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1833 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1835 <text_low_valid, text_high_valid>: New fields.
1836 <set_text_low, set_text_high>: Update.
1837 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1841 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1843 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1844 textlow and texthigh fields.
1845 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1847 * mdebugread.c (parse_lines, parse_partial_symbols)
1848 (psymtab_to_symtab_1): Update.
1849 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1850 Rename fields. Update comment. Now private.
1851 <text_low, text_high, set_text_low, set_text_high>: New methods.
1852 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1853 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1854 (start_psymtab_common, maintenance_info_psymtabs)
1855 (maintenance_check_psymtabs): Update.
1856 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1858 (scan_xcoff_symtab): Update.
1862 * psympriv.h (struct partial_symbol) <unrelocated_address,
1863 address, set_address>: New methods.
1864 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1865 (fixup_psymbol_section, relocate_psymtabs): Update.
1866 (print_partial_symbols): Add 'objfile' parameter. Update.
1867 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1872 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1873 (debug_names::write_psymbols): Update.
1874 * psympriv.h (struct partial_symbol): Derive from
1875 general_symbol_info.
1876 <obj_section>: New method.
1877 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1878 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1879 (find_pc_sect_psymbol, fixup_psymbol_section)
1880 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1881 (print_partial_symbols, recursively_search_psymtabs)
1882 (compare_psymbols, psymbol_hash, psymbol_compare)
1883 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1884 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1888 * dbxread.c (end_psymtab): Remove dead code.
1892 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1893 DWARF unwinders are disabled.
1894 * dwarf2-frame.c: Add dwarf2read.h include.
1895 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1897 (dwarf2_frame_unwinders_enabled_p): Define.
1898 (show_dwarf_unwinders_enabled_p): New function.
1899 (_initialize_dwarf2_frame): Register switch to control DWARF
1901 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1902 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1903 (show_dwarf_cmdlist): Remove static keyword.
1904 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1905 (show_dwarf_cmdlist): Declare.
1906 * NEWS: Document new feature.
1910 PR breakpoints/23366
1911 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1915 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1916 DW_AT_count can't be translated to a dynamic prop.
1920 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1925 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1929 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1934 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1935 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1936 instead of add_symbol_to_list.
1937 (read_file_scope): Call prepare_one_comp_unit before reading
1942 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1946 * utils.c (malloc, realloc, free): Don't declare.
1947 * configure, config.in: Rebuild.
1948 * configure.ac: Don't check for declarations of free, malloc, or
1953 * aarch64-linux-nat.c
1954 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1956 * arm-linux-nat.c (fetch_regs): Likewise.
1957 (store_regs): Likewise.
1958 (fetch_vfp_regs): Likewise.
1959 (store_vfp_regs): Likewise.
1960 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1961 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1962 (arm_linux_nat_target::insert_watchpoint): Likewise.
1963 (arm_linux_nat_target::remove_watchpoint): Likewise.
1964 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1966 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1968 * ppc-linux-nat.c (fetch_register): Likewise.
1969 (fetch_all_gp_regs): Likewise.
1970 (fetch_ppc_registers): Likewise.
1971 (store_all_gp_regs): Likewise.
1972 (store_ppc_registers): Likewise.
1973 (hwdebug_insert_point): Likewise.
1974 (can_use_watchpoint_cond_accel): Likewise.
1975 * remote-sim.c (gdb_os_write_stdout): Likewise.
1980 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1982 * configure: Rebuild.
1986 * regformats/regdat.sh: Define xmltarget_${name} inside
1987 #ifndef IN_PROCESS_AGENT.
1991 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1995 * symfile.c (reread_symbols): Notify iter, not objfile.
1999 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2001 (ravenscar_thread_target::prepare_to_store): Likewise.
2005 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2006 unused variable. Call value_fetch_lazy when needed.
2007 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2008 Remove unused variable. Call value_fetch_lazy when needed.
2012 * m32c-tdep.c (mark_dma): Return void.
2013 (make_regs): Remove unused declarations.
2017 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2018 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2019 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2020 bkscm_get_valid_block_smob_arg_unsafe for effect.
2024 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2029 * windows-nat.c (saved_context): Conditionally define.
2030 * remote.c (remote_target::remote_btrace_maybe_reopen):
2031 Conditionally declare "warned".
2032 * inflow.c (sigquit_ours): Conditionally define.
2033 (new_tty): Move "tty" declaration inside #if.
2034 * guile/guile.c (guile_datadir): Conditionally define.
2035 * charset.c (set_be_le_names): Move some declarations inside #if.
2036 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2038 (parse_xml_btrace_conf): Likewise.
2042 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2046 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2047 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2048 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2049 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2050 * stack.c (frame_apply_level_command): Remove unused variable.
2051 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2052 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2053 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2055 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2056 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2057 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2059 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2060 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2062 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2063 Remove unused variable.
2064 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2066 * common/tdesc.c (print_xml_feature::visit): Remove unused
2068 * compile/compile-object-load.c (store_regs): Remove unused
2070 * complaints.c (clear_complaints): Remove unused variable.
2071 * corelow.c (core_target_open): Remove unused variable.
2072 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2074 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2076 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2078 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2080 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2082 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2084 * ia64-tdep.c (examine_prologue): Remove unused variable.
2085 * infcall.c (run_inferior_call): Remove unused variable.
2086 * inferior.c (exit_inferior): Remove unused variable.
2087 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2088 * linespec.c (decode_line_2): Remove unused variable.
2089 * linux-nat.c (super_close): Remove.
2090 * linux-tdep.c (linux_info_proc): Remove unused variable.
2091 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2092 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2093 Remove unused variable.
2094 * parse.c (find_minsym_type_and_address): Remove unused variable.
2095 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2097 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2099 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2101 * record-btrace.c (record_btrace_target::store_registers): Remove
2103 (cmd_show_record_btrace_cpu): Remove unused variable.
2104 * riscv-tdep.c (riscv_register_reggroup_p)
2105 (riscv_push_dummy_call, riscv_return_value): Remove unused
2107 * rust-exp.y (literal): Remove unused variable.
2108 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2110 <STRUCTOP_ANONYMOUS>: Likewise.
2111 * s390-linux-tdep.c (s390_linux_init_abi_31)
2112 (s390_linux_init_abi_64): Remove unused variable.
2113 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2114 (file_select_thread, net_windows_open, _initialize_ser_windows):
2115 Remove unused variables.
2116 * symtab.c (find_pc_sect_line): Remove unused variable.
2117 * target-memory.c (compute_garbled_blocks): Remove unused
2119 (target_write_memory_blocks): Remove unused variable.
2120 * target.c (target_stack::unpush): Remove unused variables.
2121 * tracepoint.c (start_tracing, all_tracepoint_actions)
2122 (merge_uploaded_trace_state_variables)
2123 (print_one_static_tracepoint_marker): Remove unused variable.
2124 * unittests/basic_string_view/element_access/char/1.cc (test01):
2125 Remove unused variable.
2126 * windows-nat.c (windows_continue, windows_add_all_dlls)
2127 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2128 Remove unused variables.
2132 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2133 attr_profile in HAVE_ELF.
2134 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2139 * frame.c (frame_register_unwind): Change parameter name.
2140 (frame_unwind_register): Likewise.
2141 (frame_unwind_register_value): Likewise.
2142 (frame_unwind_register_signed): Likewise.
2143 (frame_unwind_register_unsigned): Likewise.
2144 * frame.h (frame_register_unwind): Likewise.
2145 (frame_unwind_register): Likewise.
2146 (frame_unwind_register_value): Likewise.
2147 (frame_unwind_register_signed): Likewise.
2148 (frame_unwind_register_unsigned): Likewise.
2149 (frame_unwind_arch): Likewise.
2153 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2158 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2159 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2164 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2165 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2166 m_compunit_symtab, m_language>: Add "m_" prefix.
2168 * buildsym.c: Update all uses.
2172 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2173 * buildsym.h (record_line_ftype): Remove typedef.
2177 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2178 (end_expandable_symtab): Likewise.
2179 (end_symtab_get_static_block): Likewise.
2180 (end_symtab_from_static_block): Likewise.
2181 * buildsym-legacy.c (augment_type_symtab): Remove.
2182 (end_expandable_symtab): Remove.
2183 (end_symtab_get_static_block): Remove.
2184 (end_symtab_from_static_block): Remove.
2188 * dwarf2read.c: Include buildsym.h.
2189 (struct dwarf2_cu) <builder>: New method.
2190 (fixup_go_packaging): Update.
2191 (process_full_comp_unit, process_full_type_unit): Update. Don't
2192 use scoped_free_pendings.
2193 (using_directives): Add "cu" parameter, remove "language".
2194 (read_import_statement, setup_type_unit_groups, )
2195 (read_func_scope, read_lexical_block_scope)
2196 (dwarf2_record_block_ranges, read_namespace): Update.
2197 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2198 (lnp_state_machine::handle_end_sequence): Update.
2199 (class lnp_state_machine) <m_cu>: New member.
2200 <m_record_line_callback>: Remove.
2201 <m_currently_recording_lines>: New member.
2202 (lnp_state_machine::handle_set_file): Update.
2203 (noop_record_line): Remove.
2204 (dwarf_record_line_p): Add cu parameter.
2205 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2206 (lnp_state_machine::record_line)
2207 (lnp_state_machine::lnp_state_machine)
2208 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2209 (dwarf_decode_lines): Update.
2210 (dwarf2_start_subfile): Add cu parameter.
2211 (dwarf2_start_symtab, new_symbol): Update.
2212 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2213 Remove dwarf2_per_objfile parameter.
2214 (dwarf_decode_macros): Update.
2218 * stabsread.c (define_symbol): Update.
2219 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2220 * dwarf2read.c (new_symbol): Update.
2221 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2222 * cp-namespace.c: Include buildsym.h.
2223 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2224 * buildsym-legacy.c (get_buildsym_compunit): New function.
2228 * xcoffread.c: Include buildsym-legacy.h.
2229 * windows-nat.c: Include buildsym-legacy.h.
2230 * stabsread.c: Include buildsym-legacy.h.
2231 * mdebugread.c: Include buildsym-legacy.h.
2232 * buildsym-legacy.h: New file.
2233 * buildsym-legacy.c: New file, from buildsym.c.
2234 * go32-nat.c: Include buildsym-legacy.h.
2235 * dwarf2read.c: Include buildsym-legacy.h.
2236 * dbxread.c: Include buildsym-legacy.h.
2237 * cp-namespace.c: Include buildsym-legacy.h.
2238 * coffread.c: Include buildsym-legacy.h.
2239 * buildsym.h: Move some contents to buildsym-legacy.h.
2240 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2242 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2246 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2247 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2248 (buildsym_compunit::buildsym_compunit)
2249 (buildsym_compunit::~buildsym_compunit)
2250 (buildsym_compunit::get_macro_table): Define.
2254 * buildsym.c (reset_symtab_globals): Remove.
2255 (buildsym_compunit::end_symtab_from_static_block): Update.
2256 (buildsym_compunit::augment_type_symtab): Update.
2257 (end_symtab_from_static_block): Call free_buildsym_compunit.
2258 (augment_type_symtab, end_symtab, end_expandable_symtab):
2263 * arch-utils.c: Do not include buildsym.h.
2264 * mipsread.c: Do not include buildsym.h.
2265 * machoread.c: Do not include buildsym.h.
2266 * elfread.c: Do not include buildsym.h.
2270 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2272 (buildsym_compunit): Add new constructor.
2273 (struct buildsym_compunit) <get_last_source_file, finish_block,
2274 record_block_range, start_subfile, patch_subfile_names,
2275 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2276 set_last_source_start_addr, get_last_source_start_addr,
2277 get_local_using_directives, set_local_using_directives,
2278 get_global_using_directives, outermost_context_p,
2279 get_current_context_stack, get_context_stack_depth,
2280 get_current_subfile, get_local_symbols, get_file_symbols,
2281 get_global_symbols, record_debugformat, record_producer,
2282 push_context, pop_context, end_symtab_get_static_block,
2283 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2285 <record_pending_block, finish_block_internal, make_blockvector,
2286 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2292 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2294 (finish_block_internal): Update.
2298 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2300 (finish_block_internal): Update.
2304 * buildsym.h (EXTERN): Don't define or undef.
2305 * buildsym.c (EXTERN): Don't define.
2309 * buildsym.c: Remove TODO comment.
2313 * coffread.c (coff_symtab_read): Update.
2314 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2315 (xcoff_new_init): Update.
2316 * mipsread.c (mipscoff_new_init): Update.
2317 * mdebugread.c (mdebug_build_psymtabs): Update.
2318 * elfread.c (elf_new_init): Update.
2319 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2321 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2322 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2323 (stabsect_build_psymtabs): Update.
2324 * buildsym.h (buildsym_init): Don't declare.
2325 * buildsym.c: Update comment.
2326 (prepare_for_building): Remove.
2327 (start_symtab, restart_symtab): Update.
2328 (reset_symtab_globals): Update comment.
2329 (buildsym_init): Remove.
2333 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2334 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2335 (read_enum_type, common_block_start, common_block_end)
2336 (cleanup_undefined_types_1, finish_global_stabs): Update.
2337 * mdebugread.c (psymtab_to_symtab_1): Update.
2338 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2339 (read_lexical_block_scope, new_symbol): Update.
2340 * dbxread.c (process_one_symbol): Update.
2341 * coffread.c (coff_symtab_read, process_coff_symbol)
2342 (coff_read_enum_type): Update.
2343 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2345 (get_local_symbols, get_file_symbols, get_global_symbols): New
2347 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2349 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2350 (~scoped_free_pendings): Update.
2351 (finish_block, prepare_for_building, reset_symtab_globals)
2352 (end_symtab_get_static_block, end_symtab_with_blockvector)
2353 (augment_type_symtab, push_context): Update.
2354 (get_local_symbols, get_file_symbols, get_global_symbols): New
2356 (buildsym_init): Update.
2360 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2361 (process_full_type_unit): Likewise.
2362 (dwarf2_start_symtab): Set list_in_scope.
2366 * dwarf2read.c (process_psymtab_comp_unit_reader)
2367 (build_type_psymtabs_reader): Do not set list_in_scope.
2371 * buildsym.c (free_pendings): Remove.
2372 (add_symbol_to_list, scoped_free_pendings)
2373 (finish_block_internal, buildsym_init): Update.
2377 * xcoffread.c (read_xcoff_symtab): Update.
2378 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2380 * dbxread.c (process_one_symbol): Update.
2381 * coffread.c (coff_symtab_read): Update.
2382 * buildsym.h (finish_block): Update.
2383 * buildsym.c (finish_block): Remove "listhead" argument.
2384 (end_symtab_get_static_block): Update.
2388 * buildsym.h (class scoped_free_pendings): Remove constructor.
2389 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2391 <m_pending_block_obstack, m_pending_blocks>: New members.
2392 (pending_block_obstack, pending_blocks): Remove.
2393 (scoped_free_pendings::scoped_free_pendings): Default.
2394 (~scoped_free_pendings): Update.
2395 (free_pending_blocks): Remove.
2396 (finish_block_internal, record_pending_block, make_blockvector)
2397 (end_symtab_get_static_block, augment_type_symtab, push_context)
2398 (buildsym_init): Update.
2402 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2403 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2405 (pending_addrmap, pending_addrmap_obstack)
2406 (pending_addrmap_interesting): Remove.
2407 (scoped_free_pendings, record_block_range, make_blockvector)
2408 (prepare_for_building, reset_symtab_globals, buildsym_init):
2413 * xcoffread.c (process_linenos): Update.
2414 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2415 * mdebugread.c (psymtab_to_symtab_1): Update.
2416 * dwarf2read.c (setup_type_unit_groups)
2417 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2418 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2419 * dbxread.c (process_one_symbol): Update.
2420 * coffread.c (coff_symtab_read, enter_linenos)
2421 (process_coff_symbol): Update.
2422 * buildsym.h (current_subfile): Don't declare.
2423 (get_current_subfile): Declare.
2424 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2426 (start_subfile, free_buildsym_compunit, push_subfile)
2427 (prepare_for_building, start_symtab): Update.
2428 (get_current_subfile): New function.
2432 * coffread.c (coff_symtab_read): Update.
2433 * xcoffread.c (read_xcoff_symtab): Update.
2434 * dwarf2read.c (new_symbol): Update.
2435 (read_func_scope, read_lexical_block_scope): Update.
2436 * dbxread.c (process_one_symbol): Update.
2437 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2438 (outermost_context_p): Remove macro.
2439 (outermost_context_p, get_current_context_stack)
2440 (get_context_stack_depth): Declare.
2441 (pop_context): Return struct context_stack.
2442 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2444 (context_stack_size): Remove.
2445 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2446 (prepare_for_building, end_symtab_get_static_block)
2447 (augment_type_symtab, push_context): Update.
2448 (pop_context): Return struct context_stack.
2449 (outermost_context_p, get_current_context_stack)
2450 (get_context_stack_depth): New functions.
2451 (buildsym_init): Update.
2455 * rust-exp.y: Now a pure parser. Update all rules.
2456 (%union): Move earlier.
2457 (current_parser, work_obstack): Remove globals.
2458 (rust_parser, ~rust_parser): Update.
2459 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2460 lex_character, lex_number, lex_string, lex_identifier,
2461 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2462 convert_name, convert_params_to_expression,
2463 convert_ast_to_expression, ast_basic_type, ast_operation,
2464 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2465 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2466 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2467 ast_array_type, ast_slice_type, ast_reference_type,
2468 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2469 (rust_parse): Update.
2470 (rustyyerror, rustyylex): Add parser parameter.
2471 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2472 (rust_lex_stringish_test, rust_lex_test_sequence)
2473 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2474 (rust_lex_test_push_back, rust_lex_tests): Update.
2478 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2479 gdb::unique_xmalloc_ptr.
2480 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2481 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2482 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2483 copy-initialization.
2484 * guile/scm-pretty-print.c (ppscm_print_children): Use
2485 gdb::unique_xmalloc_ptr instead of cleanups.
2486 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2487 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2488 gdb::unique_xmalloc_ptr.
2489 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2490 Adjust to use gdb::unique_xmalloc_ptr.
2491 * guile/scm-utils.c (extract_arg): Adjust.
2492 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2493 gdb::unique_xmalloc_ptr instead of a cleanup.
2497 * utils.c (do_value_free_to_mark)
2498 (make_cleanup_value_free_to_mark): Remove.
2499 * utils.h (make_cleanup_value_free_to_mark): Remove.
2503 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2504 forwarding reference.
2508 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2509 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2514 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2516 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2518 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2519 directly instead of a cleanup.
2520 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2521 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2522 (vlscm_binop_gdbthrow): New, factored out from ...
2523 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2524 (vlscm_rich_compare): Use gdbscm_wrap.
2525 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2526 instead of a cleanup.
2527 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2529 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2530 Use xfree directly instead of a cleanup.
2531 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2532 Adjust to use gdbscm_wrap and scoped_value_mark.
2533 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2534 (gdbscm_value_address, gdbscm_value_dereference)
2535 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2537 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2538 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2540 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2541 gdbscm_wrap and scoped_value_mark.
2542 (gdbscm_value_to_string): Use xfree directly instead of a
2543 cleanup. Move 'buffer' unique_ptr to TRY scope.
2544 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2545 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2547 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2548 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2550 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2555 * findvar.c (default_read_var_value): Also resolve dynamic type for
2556 LOC_OPTIMIZED_OUT vars.
2560 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2565 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2566 (compute_enum_list, pascm_set_param_value_x)
2567 (gdbscm_parameter_value): Update.
2568 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2569 (gdbscm_scm_to_host_string): Update.
2570 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2572 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2573 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2574 * guile/scm-string.c (gdbscm_scm_to_string): Return
2576 (gdbscm_scm_to_host_string): Likewise.
2580 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2581 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2582 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2583 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2588 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2589 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2591 * guile/scm-cmd.c (cmdscm_function): Update.
2592 * guile/scm-pretty-print.c
2593 (ppscm_print_exception_unless_memory_error): Update.
2594 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2595 Return unique_xmalloc_ptr.
2599 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2604 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2605 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2606 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2607 unecessary braces after EF_RISCV_RVC test. Delete call to
2608 set_gdbarch_decr_pc_after_break.
2610 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2611 RISCV_LAST_FP_REGNUM + 1.
2612 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2616 * configure.ac: Remove --disable-gdbcli.
2617 * configure: Rebuild.
2618 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2619 (SUBDIR_CLI_CFLAGS): Remove.
2620 (SFILES): Use SUBDIR_CLI_SRCS.
2621 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2626 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2630 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2634 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2636 (libunwind_frame_sniffer): Likewise.
2637 (libunwind_frame_prev_register): Likewise.
2638 (libunwind_sigtramp_frame_sniffer): Likewise.
2639 * ia64-tdep.c (ia64_access_reg): Likewise.
2640 (ia64_access_rse_reg): Likewise.
2641 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2642 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2646 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2650 * remote-sim.c (gdbsim_target::close,
2651 gdbsim_target::mourn_inferior): Remove unused variables.
2655 * ia64-tdep.c (ktab_buf): New global.
2656 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2657 (get_kernel_table): Adjust.
2661 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2662 * dwarf2read.c (using_directives, new_symbol): Use
2663 outermost_context_p.
2664 * dbxread.c (process_one_symbol): Use outermost_context_p.
2665 * coffread.c (coff_symtab_read): Use outermost_context_p.
2669 * dwarf2read.c (using_directives, read_func_scope)
2670 (read_lexical_block_scope): Update.
2671 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2672 * buildsym.h (local_using_directives, global_using_directives):
2674 (get_local_using_directives, set_local_using_directives)
2675 (get_global_using_directives): Declare.
2676 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2677 m_global_using_directives>: New members.
2678 (finish_block_internal, prepare_for_building)
2679 (reset_symtab_globals, end_symtab_get_static_block)
2680 (push_context): Update.
2681 (get_local_using_directives, set_local_using_directives)
2682 (get_global_using_directives): New functions.
2683 (buildsym_init): Update.
2687 * xcoffread.c (xcoff_initial_scan): Don't call
2688 free_pending_blocks.
2689 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2690 * buildsym.h (class scoped_free_pendings): Add constructor.
2691 (free_pending_blocks): Don't declare.
2692 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2693 (free_pending_blocks): Now static.
2697 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2698 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2700 (struct subfile_stack): Remove.
2701 (subfile_stack): Remove.
2702 (push_subfile, pop_subfile, buildsym_init): Update.
2706 * buildsym.c (push_subfile): Use gdb_assert.
2707 (pop_subfile): Use gdb_assert.
2711 * buildsym.h (merge_symbol_lists): Remove.
2712 * buildsym.c (merge_symbol_lists): Remove.
2716 * stabsread.c (scan_file_globals): Update comment.
2717 * stabsread.h (scan_file_globals): Move from buildsym.h.
2718 * buildsym.h (scan_file_globals): Move to stabsread.h.
2722 * xcoffread.c (xcoff_new_init): Update.
2723 * mipsread.c (mipscoff_new_init): Update.
2724 * mdebugread.c (mdebug_build_psymtabs): Update.
2725 * elfread.c (elf_new_init): Update.
2726 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2727 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2728 * buildsym.h (buildsym_new_init): Don't declare.
2729 * buildsym.c (buildsym_new_init): Remove.
2733 * stabsread.h (within_function): Move from buildsym.h.
2734 * stabsread.c (start_stabs): Clear within_function.
2735 * coffread.c (coff_start_symtab): Clear within_function.
2736 * buildsym.h (within_function): Move to stabsread.h.
2737 * buildsym.c (prepare_for_building): Update.
2741 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2742 * dwarf2read.c (dwarf2_start_symtab): Don't set
2743 processing_gcc_compilation.
2744 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2748 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2749 (next_symbol_text_func): Move from buildsym.h.
2750 * stabsread.c (hashname): Move from buildsym.c.
2751 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2752 (next_symbol_text_func, hashname): Move to stabsread.h.
2753 * buildsym.c: Don't include bcache.h
2754 (hashname): Move to stasbread.c.
2758 * buildsym.h (context_stack_size): Don't declare.
2759 * buildsym.c (context_stack_size): New global.
2763 * dbxread.c (processing_acc_compilation): New global.
2764 * buildsym.h (processing_acc_compilation): Don't declare.
2768 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2769 * dbxread.c (read_ofile_symtab): Update.
2770 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2771 * buildsym.h (last_source_start_addr): Remove.
2772 (set_last_source_start_addr, get_last_source_start_addr):
2774 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2776 (struct buildsym_compunit) <m_last_source_start_addr>: New
2778 (prepare_for_building): Remove start_addr parameter.
2779 (start_symtab, restart_symtab, end_symtab_get_static_block)
2780 (end_symtab_with_blockvector): Update.
2781 (set_last_source_start_addr, get_last_source_start_addr): New
2786 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2788 (have_line_numbers): Remove.
2789 (record_line, prepare_for_building, end_symtab_get_static_block)
2790 (augment_type_symtab): Update.
2794 * buildsym.c (~buildsym_compunit): Free the macro table.
2795 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2797 <m_pending_macros>: New member.
2798 (pending_macros): Remove.
2799 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2800 (reset_symtab_globals, end_symtab_get_static_block)
2801 (end_symtab_with_blockvector, augment_type_symtab)
2802 (buildsym_init): Update.
2806 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2808 (buildsym_compunit::set_last_source_file): New method.
2809 <m_last_source_file>: New member.
2810 (prepare_for_building): Remove "name" parameter.
2811 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2812 (last_source_file): Remove.
2813 (set_last_source_file, get_last_source_file): Update.
2817 * buildsym.c (prepare_for_building): Add assert.
2821 * buildsym.c (~buildsym_compunit): Update.
2822 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2823 (start_subfile, patch_subfile_names)
2824 (end_symtab_with_blockvector): Update.
2828 * buildsym.c (struct buildsym_compunit): Add constructor,
2829 destructor, initializers.
2830 (start_buildsym_compunit): Remove.
2831 (free_buildsym_compunit): Use "delete".
2832 (start_symtab, restart_symtab): Use "new".
2836 * symfile.c (set_objfile_default_section_offset): Remove struct
2841 * (Responsible Maintainers): Add myself as or1k maintainer.
2845 * symfile.c (set_objfile_default_section_offset): Use extra braces
2850 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2855 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2856 unittests/cli-utils-selftests.c
2857 * unittests/cli-utils-selftests.c: New file.
2861 * NEWS: Mention new commands. Mention change to 'thread apply'.
2865 * thread.c (thr_try_catch_cmd): New function.
2866 (thread_apply_all_command): Handle qcs flags.
2867 (thread_apply_command): Handle qcs flags.
2868 (taas_command): New function.
2869 (tfaas_command): New function.
2870 (_initialize_thread): Update to setup the new commands 'taas
2871 and 'tfaas'. Change doc string for 'thread apply'.
2875 * stack.c: (trailing_outermost_frame): New function, mostly
2876 extracted from backtrace_command_1.
2877 (leading_innermost_frame): New function.
2878 (backtrace_command_1): Update to call trailing_outermost_frame.
2879 (frame_apply_command_count): New function.
2880 (frame_apply_level_command): New function.
2881 (frame_apply_all_command): New function.
2882 (frame_apply_command): New function.
2883 (faas_command): New function.
2884 (frame_cmd_list): New variable.
2885 (_initialize_stack): Update to setup the new commands 'frame apply'
2890 * cli-utils.c (number_or_range_parser::get_number): Only handle
2891 numbers or convenience var as numbers.
2892 (parse_flags): New function.
2893 (parse_flags_qcs): New function.
2894 (number_or_range_parser::finished): Ensure parsing end is detected
2895 before end of string.
2896 * cli-utils.h (parse_flags): New function.
2897 (parse_flags_qcs): New function.
2898 (number_or_range_parser): Remove m_finished bool.
2899 (number_or_range_parser::skip_range): Set m_in_range to false.
2903 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2912 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2913 'unittests/parse-connection-spec-selftests.c'.
2914 (COMMON_SFILES): Add 'common/netstuff.c'.
2915 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2916 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2917 * common/netstuff.c: New file.
2918 * common/netstuff.h: New file.
2919 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2920 (wait_for_connect): Update comment. New parameter
2921 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2922 Use 'sock' directly instead of 'scb->fd'.
2923 (try_connect): New function, with code from 'net_open'.
2924 (net_open): Rewrite main loop to deal with multiple
2925 sockets/addresses. Handle IPv6-style hostnames; implement
2926 support for IPv6 connections.
2927 * unittests/parse-connection-spec-selftests.c: New file.
2932 * remote.c (remote_target::remote_detach_pid): Call
2933 set_current_process.
2937 * h8300-tdep.c (h8300_gdbarch_init): Remove
2938 set_gdbarch_ecoff_reg_to_regnum calls.
2943 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2944 offsets/sizes for static members of a class/struct.
2948 * target-descriptions.c (tdesc_register_bitsize): Rename.
2949 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2950 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2951 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2955 * breakpoint.c (moribund_locations): Now static and a
2957 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2958 (build_bpstat_chain, update_global_location_list)
2959 (breakpoint_retire_moribund): Update.
2960 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2965 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2966 (riscv_register_reggroup_p): Use new function, remove unneeded
2968 (riscv_push_dummy_call): Extend assert to compare against xlen or
2969 flen based on register type.
2973 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2977 * remote.c (show_hardware_watchpoint_limit): New function.
2978 (show_hardware_watchpoint_length_limit): New function.
2979 (show_hardware_breakpoint_limit): New function.
2980 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2981 where appropriate, update help text.
2985 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2986 (CLIBS): Don't mention NAT_CLIBS.
2990 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2991 (LIBGDB_OBS, clean mostlyclean): Update.
2992 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2996 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2997 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2998 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3002 * Makefile.in (ALLDEPFILES): Remove exec.c.
3003 (COMMON_OBS): Remove exec.o.
3004 (COMMON_SFILES): Add exec.c.
3008 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3012 * Makefile.in (clean mostlyclean): Remove stamp-version.
3013 (version.c): Depend on stamp-version.
3014 (stamp-version): New rule, from version.c rule.
3018 * Makefile.in (init.c): Depend on stamp-init.
3019 (stamp-init): New rule, from init.c rule.
3020 (clean mostlyclean): Remove stamp-init.
3024 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3025 SUBDIR_GCC_COMPILE_SRCS.
3029 * Makefile.in (init.c): Remove some unused sed rules.
3033 * Makefile.in (TSOBS): Remove.
3034 (INIT_FILES): Update.
3035 (LIBGDB_OBS): Update.
3036 (COMMON_SFILES): Add inflow.c.
3037 (SFILES): Remove inflow.c.
3041 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3045 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3046 get_saveloc_name, is_signal_frame_name, step_name,
3047 init_remote_name, create_addr_space_name,
3048 destroy_addr_space_name, search_unwind_table_name,
3049 find_dyn_list_name): Constify.
3053 * darwin-nat.c (darwin_pthread_kill): New function.
3054 (darwin_resume_thread): Use darwin_pthread_kill.
3058 * macroexp.c (macro_buffer) <operator=>: New member function.
3062 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3066 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3067 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3068 * maint.c: Likewise.
3073 * NEWS: Create a new section for the next release branch.
3074 Rename the section of the current branch, now that it has
3079 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3080 * version.in: Bump version to 8.2.50.DATE-git.
3085 * linux-nat.c (linux_init_ptrace): Rename to ...
3086 (linux_init_ptrace_procfs): ... this. Call
3087 linux_proc_init_warnings.
3088 (linux_nat_target::post_attach)
3089 (linux_nat_target::post_startup_inferior): Adjust.
3090 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3091 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3095 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3097 (read_comp_unit_head): ... here.
3101 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3102 (stop_tracing, tstatus_command)
3103 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3104 (print_one_static_tracepoint_marker): Update.
3105 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3107 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3109 (all_tracepoints, static_tracepoints_here): Return std::vector.
3113 * common/ptid.c (ptid_equal): Remove.
3114 * common/ptid.h (ptid_equal): Don't declare.
3115 * ada-tasks.c: Update.
3116 * breakpoint.c: Update.
3117 * common/agent.c: Update.
3118 * corelow.c: Update.
3119 * darwin-nat-info.c: Update.
3120 * darwin-nat.c: Update.
3122 * dtrace-probe.c: Update.
3123 * dummy-frame.c: Update.
3124 * fbsd-nat.c: Update.
3126 * gdbthread.h: Update.
3127 * gnu-nat.c: Update.
3128 * go32-nat.c: Update.
3129 * inf-loop.c: Update.
3130 * inf-ptrace.c: Update.
3131 * infcall.c: Update.
3135 * linux-fork.c: Update.
3136 * linux-nat.c: Update.
3137 * linux-thread-db.c: Update.
3138 * mi/mi-cmd-var.c: Update.
3139 * mi/mi-interp.c: Update.
3140 * mi/mi-main.c: Update.
3141 * nto-procfs.c: Update.
3142 * ppc-linux-tdep.c: Update.
3144 * python/py-inferior.c: Update.
3145 * python/py-record-btrace.c: Update.
3146 * python/py-record.c: Update.
3147 * ravenscar-thread.c: Update.
3148 * regcache.c: Update.
3149 * remote-sim.c: Update.
3151 * sol-thread.c: Update.
3154 * tui/tui-stack.c: Update.
3156 * windows-nat.c: Update.
3157 * windows-tdep.c: Update.
3161 * common/ptid.c (ptid_match): Remove.
3162 * common/ptid.h (ptid_match): Don't declare.
3163 * fbsd-nat.c: Update.
3166 * linux-nat.c: Update.
3167 * record-btrace.c: Update.
3168 * regcache.c: Update.
3173 * common/ptid.c (ptid_tid_p): Remove.
3174 * common/ptid.h (ptid_tid_p): Don't declare.
3175 * sol-thread.c: Update.
3179 * common/ptid.c (ptid_lwp_p): Remove.
3180 * common/ptid.h (ptid_lwp_p): Don't declare.
3181 * fbsd-nat.c: Update.
3182 * linux-nat.c: Update.
3183 * nat/linux-procfs.c: Update.
3184 * nat/x86-linux-dregs.c: Update.
3185 * sol-thread.c: Update.
3189 * common/ptid.c (ptid_is_pid): Remove.
3190 * common/ptid.h (ptid_is_pid): Don't declare.
3192 * linux-nat.c: Update.
3193 * mi/mi-interp.c: Update.
3199 * common/ptid.c (ptid_get_tid): Remove.
3200 * common/ptid.h (ptid_get_tid): Don't declare.
3201 * ada-tasks.c: Update.
3202 * aix-thread.c: Update.
3203 * bsd-uthread.c: Update.
3204 * darwin-nat.c: Update.
3205 * fbsd-nat.c: Update.
3206 * i386-darwin-nat.c: Update.
3208 * linux-tdep.c: Update.
3209 * nto-procfs.c: Update.
3210 * ppc-ravenscar-thread.c: Update.
3211 * python/py-infthread.c: Update.
3212 * ravenscar-thread.c: Update.
3213 * sol-thread.c: Update.
3214 * sparc-ravenscar-thread.c: Update.
3215 * windows-nat.c: Update.
3219 * common/ptid.c (ptid_get_lwp): Remove.
3220 * common/ptid.h (ptid_get_lwp): Don't declare.
3221 * aarch64-linux-nat.c: Update.
3222 * ada-tasks.c: Update.
3223 * aix-thread.c: Update.
3224 * amd64-linux-nat.c: Update.
3225 * arm-linux-nat.c: Update.
3226 * corelow.c: Update.
3227 * fbsd-nat.c: Update.
3228 * fbsd-tdep.c: Update.
3229 * gnu-nat.c: Update.
3230 * i386-cygwin-tdep.c: Update.
3231 * i386-gnu-nat.c: Update.
3232 * i386-linux-nat.c: Update.
3233 * ia64-linux-nat.c: Update.
3234 * inf-ptrace.c: Update.
3236 * linux-fork.c: Update.
3237 * linux-nat.c: Update.
3238 * linux-tdep.c: Update.
3239 * linux-thread-db.c: Update.
3240 * mips-linux-nat.c: Update.
3241 * nat/aarch64-linux-hw-point.c: Update.
3242 * nat/aarch64-linux.c: Update.
3243 * nat/linux-btrace.c: Update.
3244 * nat/linux-osdata.c: Update.
3245 * nat/linux-procfs.c: Update.
3246 * nat/x86-linux-dregs.c: Update.
3247 * obsd-nat.c: Update.
3248 * ppc-fbsd-nat.c: Update.
3249 * ppc-linux-nat.c: Update.
3251 * python/py-infthread.c: Update.
3252 * ravenscar-thread.c: Update.
3254 * s390-linux-nat.c: Update.
3255 * sol-thread.c: Update.
3256 * sol2-tdep.c: Update.
3257 * spu-linux-nat.c: Update.
3258 * x86-linux-nat.c: Update.
3259 * xtensa-linux-nat.c: Update.
3263 * common/ptid.c (ptid_get_pid): Remove.
3264 * common/ptid.h (ptid_get_pid): Don't declare.
3265 * aarch64-linux-nat.c: Update.
3266 * ada-lang.c: Update.
3267 * aix-thread.c: Update.
3268 * alpha-bsd-nat.c: Update.
3269 * amd64-fbsd-nat.c: Update.
3270 * amd64-linux-nat.c: Update.
3271 * arm-linux-nat.c: Update.
3272 * arm-nbsd-nat.c: Update.
3274 * break-catch-syscall.c: Update.
3275 * breakpoint.c: Update.
3276 * bsd-uthread.c: Update.
3277 * corelow.c: Update.
3279 * darwin-nat.c: Update.
3280 * fbsd-nat.c: Update.
3281 * fbsd-tdep.c: Update.
3283 * gnu-nat.c: Update.
3284 * hppa-nbsd-nat.c: Update.
3285 * hppa-obsd-nat.c: Update.
3286 * i386-fbsd-nat.c: Update.
3287 * ia64-linux-nat.c: Update.
3288 * inf-ptrace.c: Update.
3290 * inferior.c: Update.
3291 * inferior.h: Update.
3294 * linux-fork.c: Update.
3295 * linux-nat.c: Update.
3296 * linux-tdep.c: Update.
3297 * linux-thread-db.c: Update.
3298 * m68k-bsd-nat.c: Update.
3299 * mi/mi-interp.c: Update.
3300 * mi/mi-main.c: Update.
3301 * mips-linux-nat.c: Update.
3302 * mips-nbsd-nat.c: Update.
3303 * mips64-obsd-nat.c: Update.
3304 * nat/aarch64-linux-hw-point.c: Update.
3305 * nat/aarch64-linux.c: Update.
3306 * nat/linux-btrace.c: Update.
3307 * nat/linux-osdata.c: Update.
3308 * nat/linux-procfs.c: Update.
3309 * nat/x86-linux-dregs.c: Update.
3310 * nto-procfs.c: Update.
3311 * obsd-nat.c: Update.
3312 * ppc-linux-nat.c: Update.
3313 * ppc-nbsd-nat.c: Update.
3314 * ppc-obsd-nat.c: Update.
3315 * proc-service.c: Update.
3317 * python/py-inferior.c: Update.
3318 * python/py-infthread.c: Update.
3319 * ravenscar-thread.c: Update.
3321 * remote-sim.c: Update.
3323 * rs6000-nat.c: Update.
3324 * s390-linux-nat.c: Update.
3325 * sh-nbsd-nat.c: Update.
3326 * sol-thread.c: Update.
3327 * sparc-nat.c: Update.
3328 * sparc64-tdep.c: Update.
3329 * spu-linux-nat.c: Update.
3330 * spu-tdep.c: Update.
3331 * target-debug.h: Update.
3334 * tid-parse.c: Update.
3335 * tracefile-tfile.c: Update.
3336 * vax-bsd-nat.c: Update.
3337 * windows-nat.c: Update.
3338 * x86-linux-nat.c: Update.
3339 * x86-nat.c: Update.
3343 * common/ptid.c (pid_to_ptid): Remove.
3344 * common/ptid.h (pid_to_ptid): Don't declare.
3345 * aix-thread.c: Update.
3346 * arm-linux-nat.c: Update.
3347 * common/ptid.c: Update.
3348 * common/ptid.h: Update.
3349 * corelow.c: Update.
3351 * darwin-nat.c: Update.
3352 * fbsd-nat.c: Update.
3353 * fork-child.c: Update.
3354 * gnu-nat.c: Update.
3355 * go32-nat.c: Update.
3356 * inf-ptrace.c: Update.
3358 * inferior.c: Update.
3360 * linux-fork.c: Update.
3361 * linux-nat.c: Update.
3362 * nat/aarch64-linux-hw-point.c: Update.
3363 * nat/fork-inferior.c: Update.
3364 * nat/x86-linux-dregs.c: Update.
3365 * nto-procfs.c: Update.
3366 * obsd-nat.c: Update.
3368 * progspace.c: Update.
3370 * rs6000-nat.c: Update.
3371 * s390-linux-nat.c: Update.
3372 * sol-thread.c: Update.
3373 * spu-linux-nat.c: Update.
3376 * tracefile-tfile.c: Update.
3377 * windows-nat.c: Update.
3381 * common/ptid.h (ptid_build): Don't declare.
3382 * common/ptid.c (ptid_build): Remove.
3383 * aix-thread.c: Update.
3384 * bsd-kvm.c: Update.
3385 * bsd-uthread.c: Update.
3386 * common/agent.c: Update.
3387 * common/ptid.c: Update.
3388 * common/ptid.h: Update.
3389 * corelow.c: Update.
3390 * darwin-nat.c: Update.
3391 * fbsd-nat.c: Update.
3392 * gnu-nat.c: Update.
3393 * linux-fork.c: Update.
3394 * linux-nat.c: Update.
3395 * linux-thread-db.c: Update.
3396 * nat/linux-osdata.c: Update.
3397 * nat/linux-procfs.c: Update.
3398 * nto-procfs.c: Update.
3399 * obsd-nat.c: Update.
3400 * proc-service.c: Update.
3402 * ravenscar-thread.c: Update.
3403 * remote-sim.c: Update.
3405 * sol-thread.c: Update.
3407 * windows-nat.c: Update.
3411 * infrun.c (follow_exec): Use exit_inferior_silent.
3412 * inferior.c (exit_inferior_num_silent): Remove.
3413 * inferior.h (exit_inferior_num_silent): Don't declare.
3418 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3419 inferior_ptid on error.
3425 * disasm.h (gdb_disassembler): Add
3426 `m_disassembler_options_holder'. member
3427 * disasm.c (get_all_disassembler_options): New function.
3428 (gdb_disassembler::gdb_disassembler): Use it.
3429 (gdb_buffered_insn_length_init_dis): Likewise.
3430 (gdb_buffered_insn_length): Adjust accordingly.
3431 (set_disassembler_options): Handle options with arguments.
3432 (show_disassembler_options_sfunc): Likewise. Add a leading new
3433 line if showing options with descriptions.
3434 (disassembler_options_completer): Adapt to using the
3435 `disasm_options_and_args_t' structure.
3436 * mips-tdep.c (mips_disassembler_options): New variable.
3437 (mips_disassembler_options_o32): Likewise.
3438 (mips_disassembler_options_n32): Likewise.
3439 (mips_disassembler_options_n64): Likewise.
3440 (gdb_print_insn_mips): Don't set `disassembler_options'.
3441 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3443 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3444 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3445 `gdbarch_disassembler_options_implicit' and
3446 `gdbarch_valid_disassembler_options'.
3447 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3448 `disasm_options_and_args_t' structure.
3449 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3451 (valid_disassembler_options): Switch from `disasm_options_t' to
3452 the `disasm_options_and_args_t' structure.
3453 * NEWS: Document `set disassembler-options' support for the MIPS
3455 * gdbarch.h: Regenerate.
3456 * gdbarch.c: Regenerate.
3460 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3464 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3465 parameter in call to amd64_target_description.
3466 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3467 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3468 (amd64fbsd_init_abi): Likewise.
3469 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3470 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3471 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3472 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3476 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3477 "segments" parameter.
3478 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3479 (_initialize_amd64_tdep): Update call to
3480 amd64_create_target_description.
3481 (amd64_target_description): Add "segments" parameter. Adjust
3482 the implementation to use it.
3483 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3484 call to amd64_create_target_description.
3485 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3486 * gdb/arch/amd64.h (amd64_create_target_description): Add
3487 "segments" register.
3488 * gdb/arch/amd64.c (amd64_create_target_description): Add
3489 "segments" parameter. Call create_feature_i386_64bit_segments
3490 only if SEGMENTS is true.
3491 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3492 call to amd64_create_target_description.
3496 * thread.c (thread_target_id_str): New, factored out from ...
3497 (print_thread_info_1): ... here. Use it to compute the max
3498 "Target Id" column width.
3502 * remote.c (remote_target::extra_thread_info): Delete
3503 'display_buf' and 'n' locals. from the cache, regardless of
3504 packet mechanims is in use. Use cache for qThreadExtra and qP
3509 * blockframe.c (find_pc_sect_containing_function): New function.
3510 * breakpoint.c (print_breakpoint_location): Don't call
3511 find_pc_sect_function.
3512 * linespec.c (create_sals_line_offset): Record the location's
3514 * linespec.c (convert_address_location_to_sals): Fill in sal's
3515 symbol with find_pc_sect_containing_function.
3516 * symtab.c (find_function_start_sal): Rename to ...
3517 (find_function_start_sal_1): ... this.
3518 (find_function_start_sal): Reimplement as wrapper around
3519 find_function_start_sal_1, and use
3520 find_pc_sect_containing_function to fill in the sal's symbol.
3521 (find_function_start_sal(symbol*, bool)): Adjust.
3522 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3524 (find_pc_sect_containing_function): Declare.
3528 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3529 true if the the location has no symbol.
3533 * NEWS: Mention --enable-codesign.
3534 * silent-rules.mk (ECHO_SIGN): New variable.
3535 * configure.ac: Add --enable-codesign.
3536 * configure: Rebuild.
3537 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3538 (gdb$(EXEEXT)): Optionally invoke codesign.
3542 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3544 (switch_to_thread_no_regs): Adjust comment.
3545 * infcmd.c (stop_pc): Delete.
3546 (post_create_inferior, info_program_command): Replace references
3547 to stop_pc with references to thread_info->suspend.stop_pc.
3548 * inferior.h (stop_pc): Delete declaration.
3549 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3550 (handle_inferior_event_1, handle_signal_stop)
3551 (process_event_stop_test, keep_going_stepped_thread)
3552 (handle_step_into_function, handle_step_into_function_backward)
3553 (print_stop_location): Replace references to stop_pc with
3554 references to thread_info->suspend.stop_pc.
3555 (struct infcall_suspend_state) <stop_pc>: Delete field.
3556 (save_infcall_suspend_state, restore_infcall_suspend_state):
3557 Remove references to inf_stat->stop_pc.
3558 * linux-fork.c (fork_load_infrun_state): Likewise.
3559 * record-btrace.c (record_btrace_set_replay): Likewise.
3560 * record-full.c (record_full_goto_entry): Likewise.
3561 * remote.c (print_one_stopped_thread): Likewise.
3562 * target.c (target_resume): Extend comment.
3563 * thread.c (set_executing_thread): New.
3564 (set_executing): Use it.
3565 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3566 Remove references to stop_pc.
3570 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3571 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3575 * coffread.c (coff_symfile_finish): Update.
3576 * xcoffread.c (xcoff_symfile_finish): Update.
3577 * elfread.c (elf_symfile_finish): Update.
3578 * symfile.h (dwarf2_free_objfile): Don't declare.
3579 * dwarf2read.c (_initialize_dwarf2_read): Use
3580 register_objfile_data_with_cleanup.
3581 (dwarf2_free_objfile): Now static. Change signature.
3585 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3586 option "-o" to add-symbol-file-load to add an offset to each
3587 section's load address.
3588 * symfile.c (set_objfile_default_section_offset): New function.
3592 * symfile.c (add_symbol_file_command): Make sure that sections
3593 with the same name are sorted in the same order.
3597 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3598 require the second argument. If omitted, load sections at the
3599 addresses specified in the file.
3603 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3604 (_initialize_symfile): Add option "-o" to symbol-file to add an
3605 offset to each section of the symbol file.
3609 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3613 * stack.c (_initialize_stack): Update "func" help text.
3617 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3619 (unwind_infopy_str, pyuw_create_unwind_info)
3620 (unwind_infopy_add_saved_register, pyuw_sniffer)
3621 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3623 (struct saved_reg): Add constructor.
3624 <value>: Now a gdbpy_ref<>.
3628 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3632 * gdb-gdb.py.in: Format using autopep8.
3636 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3637 (type_lookup_function): Recognize CORE_ADDR values.
3641 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3646 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3651 * gdb-gdb.py: Move to...
3652 * gdb-gdb.py.in: ... here.
3653 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3654 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3656 (distclean): Remove gdb-gdb.py when cleaning.
3657 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3658 * configure: Re-generate.
3662 * proc-service.c (get_ps_regcache): New.
3663 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3664 (ps_lsetfpregs): Use it.
3669 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3670 (dwarf_decode_lines_1): Adjust.
3674 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3676 <info_proc>: Likewise.
3680 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3681 to windows_fetch_one_register, and only handle the case of
3682 fetching one register. Move the code that reloads the context
3683 and iterates over all registers if R is negative to...
3684 (windows_nat_target::fetch_registers): ... here.
3685 (do_windows_store_inferior_registers): Rename to
3686 windows_store_one_register, and only handle the case of storing
3687 one register. Move the code that handles the case where r is
3689 (windows_nat_target::store_registers) ... here.
3694 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3695 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3697 (rust_internal_print_type): Add podata parameter.
3698 (rust_print_type): Update.
3702 * typeprint.h (struct print_offset_data) <update, finish,
3703 maybe_print_hole>: New methods.
3704 <indentation>: New constant.
3705 * typeprint.c (print_offset_data::indentation): Define.
3706 (print_offset_data::maybe_print_hole, print_offset_data::update)
3707 (print_offset_data::finish): Move from c-typeprint.c and rename.
3708 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3709 (print_spaces_filtered_with_print_options): Update.
3710 (c_print_type_union_field_offset, maybe_print_hole)
3711 (c_print_type_struct_field_offset): Move to typeprint.c and
3713 (c_type_print_base_struct_union): Update.
3717 * gdbthread.h (thread_info_ref, delete_thread)
3718 (delete_thread_silent, first_thread_of_inferior)
3719 (any_thread_of_inferior, switch_to_thread)
3720 (enable_thread_stack_temporaries)
3721 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3722 (get_last_thread_stack_temporary)
3723 (value_in_thread_stack_temporaries, can_access_registers_thread):
3724 Spell out "struct thread_info" instead of just "thread_info".
3725 * inferior.h (notice_new_inferior): Likewise.
3729 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3730 pass thread_info pointer to delete_thread.
3731 (windows_nat_target::detach): Pass inferior pointer to
3733 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3735 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3736 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3737 and pass a thread_info pointer to delete_thread.
3738 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3739 pass thread_info pointer to delete_thread.
3740 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3741 delete_thread_silent call.
3742 * procfs.c (procfs_target::detach): Pass inferior pointer to
3744 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3745 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3746 delete_thread_silent call.
3747 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3748 pass thread_info pointer to delete_thread.
3749 (windows_nat_target::detach): Pass inferior pointer to
3754 * regcache.c (readable_regcache::read_part): Fix asserts.
3755 (reg_buffer::raw_collect_part): New function.
3756 (regcache::write_part): Fix asserts.
3757 (reg_buffer::raw_supply_part): New function.
3758 (regcache::transfer_regset_register): New helper function.
3759 (regcache::transfer_regset): Call new functions.
3760 (regcache_supply_regset): Use gdb_byte*.
3761 (regcache::supply_regset): Likewise.
3762 (regcache_collect_regset): Likewise.
3763 (regcache::collect_regset): Likewise.
3764 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3765 (reg_buffer::raw_supply_part): Likewise.
3766 (regcache::transfer_regset_register): Likewise.
3767 (regcache::transfer_regset): Use gdb_byte*.
3771 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3775 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3776 instead of a ptid_t. All callers adjusted.
3777 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3779 (print_ada_task_info, display_current_task_id, task_command_1):
3781 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3783 (breakpoint_kind): Adjust.
3784 (remove_breakpoints_pid): Rename to ...
3785 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3786 pointer. All callers adjusted.
3787 (bpstat_clear_actions): Use inferior_thread.
3788 (get_bpstat_thread): New.
3789 (bpstat_do_actions): Use it.
3790 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3791 to take a thread_info pointer. All callers adjusted.
3792 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3793 (breakpoint_re_set_thread): Use inferior_thread.
3794 * breakpoint.h (struct inferior): Forward declare.
3795 (bpstat_stop_status): Update.
3796 (remove_breakpoints_pid): Delete.
3797 (remove_breakpoints_inf): New.
3798 * bsd-uthread.c (bsd_uthread_target::wait)
3799 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3800 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3801 (maint_btrace_packet_history_cmd)
3802 (maint_btrace_clear_packet_history_cmd): Adjust.
3803 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3805 * cli/cli-interp.c: Include "inferior.h".
3806 * common/refcounted-object.h (struct
3807 refcounted_object_ref_policy): New.
3808 * compile/compile-object-load.c: Include gdbthread.h.
3809 (store_regs): Use inferior_thread.
3810 * corelow.c (core_target::close): Use current_inferior.
3811 (core_target_open): Adjust to use first_thread_of_inferior and use
3812 the current inferior.
3813 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3814 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3815 <thread>: ... this new field. All references adjusted.
3816 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3817 Take a thread_info pointer instead of a ptid_t.
3818 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3819 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3820 thread_info pointer instead of a ptid_t.
3821 * elfread.c: Include "inferior.h".
3822 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3823 Use inferior_thread.
3824 * eval.c (evaluate_subexp): Likewise.
3825 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3827 * gdb_proc_service.h (struct thread_info): Forward declare.
3828 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3829 <thread>: ... this new field. All references adjusted.
3830 * gdbarch.h, gdbarch.c: Regenerate.
3831 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3832 'thread' parameter. All implementations and callers adjusted.
3833 * gdbthread.h (thread_info) <set_running>: New method.
3834 (delete_thread, delete_thread_silent): Take a thread_info pointer
3836 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3837 (first_thread_of_process): Delete, replaced by ...
3838 (first_thread_of_inferior): ... this new function. All callers
3840 (any_live_thread_of_process): Delete, replaced by ...
3841 (any_live_thread_of_inferior): ... this new function. All callers
3843 (switch_to_thread, switch_to_no_thread): Declare.
3844 (is_executing): Delete.
3845 (enable_thread_stack_temporaries): Update comment.
3846 <enable_thread_stack_temporaries>: Take a thread_info pointer
3847 instead of a ptid_t. Incref the thread.
3848 <~enable_thread_stack_temporaries>: Decref the thread.
3851 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3852 (get_last_thread_stack_temporary)
3853 (value_in_thread_stack_temporaries, can_access_registers_thread):
3854 Take a thread_info pointer instead of a ptid_t. All callers
3856 * infcall.c (get_call_return_value): Use inferior_thread.
3857 (run_inferior_call): Work with thread pointers instead of ptid_t.
3858 (call_function_by_hand_dummy): Work with thread pointers instead
3859 of ptid_t. Use thread_info_ref.
3860 * infcmd.c (proceed_thread_callback): Access thread's state
3862 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3863 access thread's state directly.
3864 (continue_command): Use inferior_thread.
3865 (info_program_command): Use find_thread_ptid and access thread
3867 (proceed_after_attach_callback): Use thread state directly.
3868 (notice_new_inferior): Take a thread_info pointer instead of a
3869 ptid_t. All callers adjusted.
3870 (exit_inferior): Take an inferior pointer instead of a pid. All
3872 (exit_inferior_silent): New.
3873 (detach_inferior): Delete.
3874 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3875 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3876 (detach_inferior_command, kill_inferior_command): Use
3877 find_inferior_id instead of valid_gdb_inferior_id and
3878 gdb_inferior_id_to_pid.
3879 (inferior_command): Use inferior and thread pointers.
3880 * inferior.h (struct thread_info): Forward declare.
3881 (notice_new_inferior): Take a thread_info pointer instead of a
3882 ptid_t. All callers adjusted.
3883 (detach_inferior): Delete declaration.
3884 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3885 instead of a pid. All callers adjusted.
3886 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3887 (valid_gdb_inferior_id): Delete.
3888 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3889 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3890 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3892 <inf>: ... this new field.
3893 <step_ptid>: Delete, replaced by ...
3894 <step_thread>: ... this new field.
3895 (get_displaced_stepping_state): Take an inferior pointer instead
3896 of a pid. All callers adjusted.
3897 (displaced_step_in_progress_any_inferior): Adjust.
3898 (displaced_step_in_progress_thread): Take a thread pointer instead
3899 of a ptid_t. All callers adjusted.
3900 (displaced_step_in_progress, add_displaced_stepping_state): Take
3901 an inferior pointer instead of a pid. All callers adjusted.
3902 (get_displaced_step_closure_by_addr): Adjust.
3903 (remove_displaced_stepping_state): Take an inferior pointer
3904 instead of a pid. All callers adjusted.
3905 (displaced_step_prepare_throw, displaced_step_prepare)
3906 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3907 All callers adjusted.
3908 (start_step_over): Adjust.
3909 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3910 displaced step queue.
3911 (do_target_resume): Adjust.
3912 (fetch_inferior_event): Use inferior_thread.
3913 (context_switch, get_inferior_stop_soon): Take an
3914 execution_control_state pointer instead of a ptid_t. All callers
3916 (switch_to_thread_cleanup): Delete.
3917 (stop_all_threads): Use scoped_restore_current_thread.
3918 * inline-frame.c: Include "gdbthread.h".
3919 (inline_state) <inline_state>: Take a thread pointer instead of a
3920 ptid_t. All callers adjusted.
3921 <ptid>: Delete, replaced by ...
3922 <thread>: ... this new field.
3923 (find_inline_frame_state): Take a thread pointer instead of a
3924 ptid_t. All callers adjusted.
3925 (skip_inline_frames, step_into_inline_frame)
3926 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3927 pointer instead of a ptid_t. All callers adjusted.
3928 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3929 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3930 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3932 * linux-nat.c (get_detach_signal): Likewise.
3933 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3934 (thread_db_notice_clone): Adjust.
3935 (thread_db_find_new_threads_silently)
3936 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3937 a thread pointer instead of a ptid_t. All callers adjusted.
3938 * mi/mi-cmd-var.c: Include "inferior.h".
3939 (mi_cmd_var_update_iter): Update to use thread pointers.
3940 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3942 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3944 (mi_output_running): ... this new function.
3945 (mi_on_resume_1): Adjust to use it.
3946 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3947 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3949 (interrupt_thread_callback): : Adjust to use thread and inferior
3951 * proc-service.c: Include "gdbthread.h".
3952 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3953 * progspace-and-thread.c: Include "inferior.h".
3954 * progspace.c: Include "inferior.h".
3955 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3956 hold a reference to an inferior_object.
3957 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3959 * python/py-inferior.c (struct inferior_object): Give the type a
3960 tag name instead of a typedef.
3961 (python_on_normal_stop): No need to check if the current thread is
3963 (inferior_to_inferior_object): Change return type to
3964 inferior_object. All callers adjusted.
3965 (find_thread_object): Delete, bits factored out to ...
3966 (thread_to_thread_object): ... this new function.
3967 * python/py-infthread.c (create_thread_object): Use
3968 inferior_to_inferior_object.
3969 (thpy_is_stopped): Use thread pointer directly.
3970 (gdbpy_selected_thread): Use inferior_thread.
3971 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3972 field, replaced with ...
3973 <thread>: ... this new field. All users adjusted.
3974 (btpy_insn_or_gap_new): Drop const.
3975 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3977 * python/py-record.c: Include "gdbthread.h".
3978 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3979 a ptid_t. All callers adjusted.
3980 (gdbpy_current_recording): Use inferior_thread.
3981 * python/py-record.h (recpy_record_object) <ptid>: Delete
3982 field, replaced with ...
3983 <thread>: ... this new field. All users adjusted.
3984 (recpy_element_object) <ptid>: Delete
3985 field, replaced with ...
3986 <thread>: ... this new field. All users adjusted.
3987 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3988 a ptid_t. All callers adjusted.
3989 * python/py-threadevent.c: Include "gdbthread.h".
3990 (get_event_thread): Use thread_to_thread_object.
3991 * python/python-internal.h (struct inferior_object): Forward
3993 (find_thread_object, find_inferior_object): Delete declarations.
3994 (thread_to_thread_object, inferior_to_inferior_object): New
3996 * record-btrace.c: Include "inferior.h".
3997 (require_btrace_thread): Use inferior_thread.
3998 (record_btrace_frame_sniffer)
3999 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4000 (get_thread_current_frame): Use scoped_restore_current_thread and
4002 (get_thread_current_frame): Use thread pointer directly.
4003 (record_btrace_replay_at_breakpoint): Use thread's inferior
4005 * record-full.c: Include "inferior.h".
4006 * regcache.c: Include "gdbthread.h".
4007 (get_thread_arch_regcache): Use the inferior's address space
4009 (get_thread_regcache, registers_changed_thread): New.
4010 * regcache.h (get_thread_regcache(thread_info *thread)): New
4012 (registers_changed_thread): New.
4013 (remote_target) <remote_detach_1>: Swap order of parameters.
4014 (remote_add_thread): <remote_add_thread>: Return the new thread.
4015 (get_remote_thread_info(ptid_t)): New overload.
4016 (remote_target::remote_notice_new_inferior): Use thread pointers
4018 (remote_target::process_initial_stop_replies): Use
4019 thread_info::set_running.
4020 (remote_target::remote_detach_1, remote_target::detach)
4021 (extended_remote_target::detach): Adjust.
4022 * stack.c (frame_show_address): Use inferior_thread.
4023 * target-debug.h (target_debug_print_thread_info_pp): New.
4024 * target-delegates.c: Regenerate.
4025 * target.c (default_thread_address_space): Delete.
4026 (memory_xfer_partial_1): Use current_inferior.
4027 (target_detach): Use current_inferior.
4028 (target_thread_address_space): Delete.
4029 (generic_mourn_inferior): Use current_inferior.
4030 * target.h (struct target_ops) <thread_address_space>: Delete.
4031 (target_thread_address_space): Delete.
4032 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4034 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4035 thread pointer instead of a ptid_t. Adjust all callers.
4036 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4037 (first_thread_of_process): Delete, replaced by ...
4038 (first_thread_of_inferior): ... this new function. All callers
4040 (any_thread_of_process): Rename to ...
4041 (any_thread_of_inferior): ... this, and take an inferior pointer.
4042 (any_live_thread_of_process): Rename to ...
4043 (any_live_thread_of_inferior): ... this, and take an inferior
4045 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4046 (value_in_thread_stack_temporaries)
4047 (get_last_thread_stack_temporary): Take a thread pointer instead
4048 of a ptid_t. Adjust all callers.
4049 (thread_info::set_running): New.
4050 (validate_registers_access): Use inferior_thread.
4051 (can_access_registers_ptid): Rename to ...
4052 (can_access_registers_thread): ... this, and take a thread
4054 (print_thread_info_1): Adjust to compare thread pointers instead
4056 (switch_to_no_thread, switch_to_thread): Make extern.
4057 (scoped_restore_current_thread::~scoped_restore_current_thread):
4058 Use m_thread pointer directly.
4059 (scoped_restore_current_thread::scoped_restore_current_thread):
4060 Use inferior_thread.
4061 (thread_command): Use thread pointer directly.
4062 (thread_num_make_value_helper): Use inferior_thread.
4063 * top.c (execute_command): Use inferior_thread.
4064 * tui/tui-interp.c: Include "inferior.h".
4065 * varobj.c (varobj_create): Use inferior_thread.
4066 (value_of_root_1): Use find_thread_global_id instead of
4067 global_thread_id_to_ptid.
4071 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4073 (regcache::write_part): Likewise.
4074 (readable_regcache::cooked_read_part): Update comment.
4075 (readable_regcache::cooked_write_part): Likewise.
4076 * regcache.h: (readable_regcache::read_part): Likewise.
4077 (regcache::write_part): Likewise.
4082 * aarch64-linux-nat.c (post_attach): New.
4083 (aarch64_linux_nat_target::post_attach): Override post_attach to
4084 record the number of hardware debug registers.
4088 * python/py-param.c (add_setshow_generic): Make parameters const.
4089 (parmpy_init): Update.
4093 * regcache.h (regcache_cooked_read_ftype): Rename to...
4094 (register_read_ftype): ...this, change type to function_view.
4095 (class reg_buffer) <save>: Remove src parameter.
4096 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4097 parameter non-const in first overload. Remove src parameter in
4099 * regcache.c (do_cooked_read): Remove.
4100 (readonly_detached_regcache::readonly_detached_regcache): Make
4101 parameter non-const, adjust call to other constructor.
4102 (reg_buffer::save): Remove src parameter.
4103 * frame.c (do_frame_register_read): Remove.
4104 (frame_save_as_regcache): Use lambda function.
4105 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4106 parameter to ppu2spu_data *.
4107 (ppu2spu_sniffer): Use lambda function.
4111 * record-full.c (record_full_target::insert_breakpoint): Remove
4112 "struct" keyword, add const.
4116 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4117 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4118 * configure.ac: Remove AC_PREREQ, add missing quoting.
4119 * gnulib/configure.ac: Modernize usage of
4120 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4121 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4122 (AUTOMAKE_VERSION): Bump to 1.15.1.
4123 * configure: Re-generate.
4124 * config.in: Re-generate.
4125 * aclocal.m4: Re-generate.
4126 * gnulib/aclocal.m4: Re-generate.
4127 * gnulib/config.in: Re-generate.
4128 * gnulib/configure: Re-generate.
4129 * gnulib/import/Makefile.in: Re-generate.
4133 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4134 (lookup_minimal_symbol_by_pc_section): ... here with
4135 gdb_assert_not_reached added.
4139 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4140 parameter with a block parameter. Compare location's block symbol
4141 with the frame's block instead of addresses.
4142 (skip_inline_frames): Pass the current block instead of the
4143 frame's address. Break out as soon as we determine the frame
4144 should not be skipped.
4148 * solib-aix.c (solib_aix_get_section_offsets): Return
4150 (solib_aix_solib_create_inferior_hook): Update.
4154 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4158 * solib-frv.c (frv_relocate_main_executable): Use
4160 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4165 * objfiles.h (inhibit_section_map_updates): Update.
4166 (resume_section_map_updates, resume_section_map_updates_cleanup):
4168 * solib-svr4.c (svr4_handle_solib_event): Update.
4169 * objfiles.c (inhibit_section_map_updates): Return
4170 scoped_restore_tmpl<int>.
4171 (resume_section_map_updates, resume_section_map_updates_cleanup):
4176 * valprint.h (read_string): Update.
4177 * valprint.c (read_string): Change type of "buffer".
4178 (val_print_string): Update.
4179 * python/py-value.c (valpy_string): Update.
4180 * language.h (struct language_defn) <la_get_string>: Change
4182 (default_get_string, c_get_string): Update.
4183 * language.c (default_get_string): Change type of "buffer".
4184 * guile/scm-value.c (gdbscm_value_to_string): Update.
4185 * c-lang.c (c_get_string): Change type of "buffer".
4189 * ser-mingw.c (struct pipe_state_destroyer): New.
4190 (pipe_state_up): New typedef.
4191 (cleanup_pipe_state): Remove.
4192 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4196 * rust-lang.h (rust_yyerror): Don't declare.
4197 * rust-lang.c (rust_language_defn): Update.
4198 * rust-exp.y (yyerror): Now static.
4199 * parse.c (parse_exp_in_context_1): Update.
4200 * p-lang.h (p_yyerror): Don't declare.
4201 * p-lang.c (p_language_defn): Update.
4202 * p-exp.y (yyerror): Now static.
4203 * opencl-lang.c (opencl_language_defn): Update.
4204 * objc-lang.c (objc_language_defn): Update.
4205 * m2-lang.h (m2_yyerror): Don't declare.
4206 * m2-lang.c (m2_language_defn): Update.
4207 * m2-exp.y (yyerror): Now static.
4208 * language.h (struct language_defn) <la_error>: Remove.
4209 * language.c (unk_lang_error): Remove.
4210 (unknown_language_defn, auto_language_defn): Remove.
4211 * go-lang.h (go_yyerror): Don't declare.
4212 * go-lang.c (go_language_defn): Update.
4213 * go-exp.y (yyerror): Now static.
4214 * f-lang.h (f_yyerror): Don't declare.
4215 * f-lang.c (f_language_defn): Update.
4216 * f-exp.y (yyerror): Now static.
4217 * d-lang.h (d_yyerror): Don't declare.
4218 * d-lang.c (d_language_defn): Update.
4219 * d-exp.y (yyerror): Now static.
4220 * c-lang.h (c_yyerror): Don't declare.
4221 * c-lang.c (c_language_defn, cplus_language_defn)
4222 (asm_language_defn, minimal_language_defn): Update.
4223 * c-exp.y (yyerror): Now static.
4224 * ada-lang.h (ada_yyerror): Don't declare.
4225 * ada-lang.c (ada_language_defn): Update.
4226 * ada-exp.y (yyerror): Now static.
4230 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4231 (store_sveregs_to_thread): Likewise.
4232 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4233 (aarch64_linux_store_inferior_registers): Likewise.
4234 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4236 (aarch64_sve_regs_copy_to_regcache): Likewise.
4237 (aarch64_sve_regs_copy_from_regcache): Likewise.
4238 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4240 (aarch64_sve_regs_copy_to_regcache): Likewise.
4241 (aarch64_sve_regs_copy_from_regcache): Likewise.
4242 (sve_context): Structure from Linux headers.
4243 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4244 (SVE_SIG_ZREG_SIZE): Likewise.
4245 (SVE_SIG_PREG_SIZE): Likewise.
4246 (SVE_SIG_FFR_SIZE): Likewise.
4247 (SVE_SIG_REGS_OFFSET): Likewise.
4248 (SVE_SIG_ZREGS_OFFSET): Likewise.
4249 (SVE_SIG_ZREG_OFFSET): Likewise.
4250 (SVE_SIG_ZREGS_SIZE): Likewise.
4251 (SVE_SIG_PREGS_OFFSET): Likewise.
4252 (SVE_SIG_PREG_OFFSET): Likewise.
4253 (SVE_SIG_PREGS_SIZE): Likewise.
4254 (SVE_SIG_FFR_OFFSET): Likewise.
4255 (SVE_SIG_REGS_SIZE): Likewise.
4256 (SVE_SIG_CONTEXT_SIZE): Likewise.
4257 (SVE_PT_REGS_MASK): Likewise.
4258 (SVE_PT_REGS_FPSIMD): Likewise.
4259 (SVE_PT_REGS_SVE): Likewise.
4260 (SVE_PT_VL_INHERIT): Likewise.
4261 (SVE_PT_VL_ONEXEC): Likewise.
4262 (SVE_PT_REGS_OFFSET): Likewise.
4263 (SVE_PT_FPSIMD_OFFSET): Likewise.
4264 (SVE_PT_FPSIMD_SIZE): Likewise.
4265 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4266 (SVE_PT_SVE_PREG_SIZE): Likewise.
4267 (SVE_PT_SVE_FFR_SIZE): Likewise.
4268 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4269 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4270 (__SVE_SIG_TO_PT): Likewise.
4271 (SVE_PT_SVE_OFFSET): Likewise.
4272 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4273 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4274 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4275 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4276 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4277 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4278 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4279 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4280 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4281 (SVE_PT_SVE_SIZE): Likewise.
4282 (SVE_PT_SIZE): Likewise.
4283 (HAS_SVE_STATE): New define.
4287 * nat/aarch64-sve-linux-sigcontext.h: New file.
4288 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4290 (SVE_VQ_MIN): Likewise.
4291 (SVE_VQ_MAX): Likewise.
4292 (SVE_VL_MIN): Likewise.
4293 (SVE_VL_MAX): Likewise.
4294 (SVE_NUM_ZREGS): Likewise.
4295 (SVE_NUM_PREGS): Likewise.
4296 (sve_vl_valid): Likewise.
4297 (struct user_sve_header): Likewise.
4302 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4303 was requested by GDB.
4307 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4311 * gnulib/update-gnulib.sh: Print expected versions of
4316 * arch-utils.c (default_type_align): Use type_length_units.
4317 * gdbtypes.c (type_align): Use type_length_units.
4321 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4322 of 'define' command.
4327 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4328 get_no_prettyformat_print_options.
4332 * sparc-nat.h: Include target.h.
4333 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4334 <fetch_registers>: Remove this argument in function call.
4335 <store_registers>: Remove this argument in function call, remove
4337 <low_forget_process>: Call sparc64_forget_process instead of
4338 sparc_forget_process.
4342 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4343 (procfs_target::make_corefile_notes): Adjust to new
4344 target_read_alloc return type.
4350 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4351 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4352 Move should_notify_stop local into more inner scope.
4358 * infrun.c (resume_1): Add call to mark_async_event_handler.
4362 * infrun.c (do_target_wait): Change old version of $pc printed.
4366 * dwarf2read.c (read_index_from_section): Rename to...
4367 (read_gdb_index_from_section): ... this, update all callers.
4368 (dwarf2_read_index): Rename to...
4369 (dwarf2_read_gdb_index): ... this, update all callers.
4373 * gdb/hppa-linux-nat.c
4374 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4375 hppa_linux_nat_target::fetch_registers.
4379 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4380 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4381 (AARCH64_DWARF_SVE_FFR): Likewise.
4382 (AARCH64_DWARF_SVE_P0): Likewise.
4383 (AARCH64_DWARF_SVE_Z0): Likewise.
4387 * common/common-regcache.h (raw_compare): New function.
4388 * regcache.c (regcache::raw_compare): Likewise.
4389 * regcache.h (regcache::raw_compare): New declaration.
4393 * common/common-regcache.h (reg_buffer_common): New structure.
4394 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4395 (reg_buffer::raw_supply): Likewise.
4396 (reg_buffer::raw_supply_integer): Likewise.
4397 (reg_buffer::raw_supply_zeroed): Likewise.
4398 (reg_buffer::raw_collect): Likewise.
4399 (reg_buffer::raw_collect_integer): Likewise.
4400 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4401 (reg_buffer::raw_supply): Likewise.
4402 (reg_buffer::raw_supply_integer): Likewise.
4403 (reg_buffer::raw_supply_zeroed): Likewise.
4404 (reg_buffer::raw_collect): Likewise.
4405 (reg_buffer::raw_collect_integer): Likewise.
4409 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4410 (class remote_state) <stop_reply_queue>: Now std::vector.
4411 (remote_state::~remote_state)
4412 (remote_target::stop_reply_queue_length): Update.
4413 (struct queue_iter_param, remove_child_of_pending_fork)
4414 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4415 (check_pending_event_prevents_wildcard_vcont_callback)
4416 (remove_stop_reply_for_inferior)
4417 (remove_stop_reply_of_remote_state)
4418 (remote_notif_remove_once_on_match)
4419 (stop_reply_match_ptid_and_ws)
4420 (remote_kill_child_of_pending_fork): Remove.
4421 (remote_target::remove_new_fork_children)
4422 (remote_target::check_pending_events_prevent_wildcard_vcont)
4423 (remote_target::discard_pending_stop_replies)
4424 (remote_target::discard_pending_stop_replies_in_queue)
4425 (remote_target::remote_notif_remove_queued_reply)
4426 (remote_target::queued_stop_reply)
4427 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4428 (remote_target::wait, remote_target::kill_new_fork_children)
4429 (remote_target::async): Update.
4433 * record-full.c (record_full_arch_list_cleanups): Remove.
4434 (record_full_message): Use try/catch.
4435 (record_full_wait_cleanups): Remove.
4436 (record_full_wait_1): Use try/catch.
4437 (record_full_restore): Likewise.
4441 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4442 declare VEC. Add constructor.
4443 <in_target_beneath>: Now bool.
4444 (record_full_breakpoints): Now a std::vector, static.
4445 (record_full_sync_record_breakpoints)
4446 (record_full_init_record_breakpoints)
4447 (record_full_target::insert_breakpoint)
4448 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4452 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4453 * serial.c (serial_interface_lookup): Remove struct keyword.
4457 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4459 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4461 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4463 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4464 "beneath" as a method.
4465 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4466 Use "beneath" as a method.
4470 * tracefile.c (struct trace_file_writer_deleter): New.
4471 <operator()>: Rename from trace_file_writer_xfree.
4472 (trace_file_writer_up): New typedef.
4473 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4477 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4478 <m_registers, m_register_status>: Change type to
4480 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4485 * common/common-regcache.h (enum register_status): Add
4486 underlying type "signed char".
4487 * regcache.h (reg_buffer) <m_register_status>: Change type to
4489 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4490 register_status instead of signed char.
4491 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4492 (reg_buffer::get_register_status): Remove cast.
4493 (readable_regcache::raw_read): Remove cast.
4494 (readable_regcache::cooked_read): Remove cast.
4498 * source.c (reverse_search_command, forward_search_command): Use
4503 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4504 (serial_ops_list): Now static, std::vector.
4505 (serial_interface_lookup, serial_add_interface): Update.
4509 * dwarf2read.c (process_cu_includes): Update.
4510 (process_full_comp_unit): Update.
4511 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4518 * python/python.c (do_start_initialization):
4519 Avoid call to internal Python API.
4520 (init__gdb_module): New function.
4524 * linux-thread-db.c (valprint.h): New include.
4525 (struct check_thread_db_info): New structure.
4526 (check_thread_db_on_load, tdb_testinfo): New static globals.
4527 (check_thread_db, check_thread_db_callback): New functions.
4528 (try_thread_db_load_1): Run integrity checks if requested.
4529 (maintenance_check_libthread_db): New function.
4530 (_initialize_thread_db): Register "maint check libthread-db"
4531 and "maint set/show check-libthread-db".
4532 * NEWS: Mention the above new commands.
4536 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4541 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4545 * common/btrace-common.h (struct btrace_data): Add constructor,
4546 destructor, move assignment operator.
4547 <empty, clear, fini>: New methods.
4548 <format>: Initialize.
4549 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4550 (btrace_data_empty): Don't declare.
4551 * common/btrace-common.c (btrace_data_init): Remove.
4552 (btrace_data::fini): Rename from btrace_data_fini.
4553 (btrace_data::empty): Rename from btrace_data_empty.
4554 (btrace_data::clear): Rename from btrace_data_clear. Return
4556 * btrace.h (make_cleanup_btrace_data): Don't declare.
4557 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4558 (parse_xml_btrace): Update.
4559 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4560 (maint_btrace_clear_packet_history_cmd): Update.
4564 * target.h (target_ops) <beneath>: Now a method. All references
4566 (class target_stack): New.
4567 * target.c (g_target_stack): New.
4568 (g_current_top_target): Delete.
4569 (current_top_target): Get the top target out of g_target_stack.
4570 (target_stack::push, target_stack::unpush): New.
4571 (push_target, unpush_target): Reimplement.
4572 (target_is_pushed): Reimplement in terms of g_target_stack.
4573 (target_ops::beneath, target_stack::find_beneath): New.
4577 * target.h (find_target_beneath): Delete declaration.
4578 * target.c (find_target_beneath): Delete definition.
4579 * aix-thread.c: All callers of find_target_beneath adjusted to
4580 call target_ops::beneath instead.
4581 * bsd-uthread.c: Likewise.
4582 * linux-thread-db.c: Likewise.
4583 * ravenscar-thread.c: Likewise.
4584 * sol-thread.c: Likewise.
4585 * spu-multiarch.c: Likewise.
4589 * target.h (target_ops) <beneath>: Now a method. All references
4591 (target_ops) <m_beneath>: New.
4592 * target.c (target_ops::beneath): New.
4593 * corelow.c: Adjust all references to target_ops::beneath.
4594 * linux-thread-db.c: Likewise.
4595 * make-target-delegates: Likewise.
4596 * record-btrace.c: Likewise.
4597 * record-full.c: Likewise.
4598 * remote.c: Likewise.
4599 * target.c: Likewise.
4600 * target-delegates.c: Regenerate.
4604 * target.h (target_stack): Delete.
4605 (current_top_target): Declare function.
4606 * target.c (target_stack): Delete.
4607 (g_current_top_target): New.
4608 (current_top_target): New function.
4609 * auxv.c: Use current_top_target instead of target_stack
4611 * avr-tdep.c: Likewise.
4612 * breakpoint.c: Likewise.
4613 * corefile.c: Likewise.
4614 * elfread.c: Likewise.
4616 * exceptions.c: Likewise.
4617 * frame.c: Likewise.
4618 * gdbarch-selftests.c: Likewise.
4619 * gnu-v3-abi.c: Likewise.
4620 * ia64-tdep.c: Likewise.
4621 * ia64-vms-tdep.c: Likewise.
4622 * infcall.c: Likewise.
4623 * infcmd.c: Likewise.
4624 * infrun.c: Likewise.
4625 * linespec.c: Likewise.
4626 * linux-tdep.c: Likewise.
4627 * minsyms.c: Likewise.
4628 * ppc-linux-nat.c: Likewise.
4629 * ppc-linux-tdep.c: Likewise.
4630 * procfs.c: Likewise.
4631 * regcache.c: Likewise.
4632 * remote.c: Likewise.
4633 * rs6000-tdep.c: Likewise.
4634 * s390-linux-nat.c: Likewise.
4635 * s390-tdep.c: Likewise.
4636 * solib-aix.c: Likewise.
4637 * solib-darwin.c: Likewise.
4638 * solib-dsbt.c: Likewise.
4639 * solib-spu.c: Likewise.
4640 * solib-svr4.c: Likewise.
4641 * solib-target.c: Likewise.
4642 * sparc-tdep.c: Likewise.
4643 * sparc64-tdep.c: Likewise.
4644 * spu-tdep.c: Likewise.
4645 * symfile.c: Likewise.
4646 * symtab.c: Likewise.
4647 * target-descriptions.c: Likewise.
4648 * target-memory.c: Likewise.
4649 * target.c: Likewise.
4650 * target.h: Likewise.
4651 * tracefile-tfile.c: Likewise.
4652 * tracepoint.c: Likewise.
4653 * valops.c: Likewise.
4654 * valprint.c: Likewise.
4655 * value.c: Likewise.
4656 * windows-tdep.c: Likewise.
4657 * mi/mi-main.c: Likewise.
4661 * valprint.h (build_address_symbolic): Declare.
4662 * printcmd.c (print_address_symbolic): Update.
4663 (build_address_symbolic): Change "name" and "filename" to
4665 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4667 * defs.h (build_address_symbolic): Remove declaration.
4671 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4672 (aarch64_vnv_type): Add function.
4673 (aarch64_pseudo_register_name): Add V regs for SVE.
4674 (aarch64_pseudo_register_type): Likewise.
4675 (aarch64_pseudo_register_reggroup_p): Likewise.
4676 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4677 (aarch64_pseudo_read_value): Add V regs for SVE.
4678 (aarch64_pseudo_write_2): Use V0 offset for SVE
4679 (aarch64_pseudo_write): Add V regs for SVE.
4680 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4684 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4685 (sve_vl_from_vq): Likewise.
4689 * cli/cli-cmds.c (show_version): Update.
4690 * top.c (print_gdb_version): Add "interactive" parameter.
4692 * main.c (captured_main_1): Update.
4693 * top.h (print_gdb_version): Add "interactive" parameter and a
4698 * common/enum-flags.h: Add trailing semicolon to example in
4704 * NEWS: Add entry about pager.
4705 * utils.c (pagination_disabled_for_command): New global.
4706 (prompt_for_continue): Allow "c" response to prompt.
4707 (reinitialize_more_filter): Clear
4708 pagination_disabled_for_command.
4709 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4713 * ada-lang.h (ada_lookup_symbol_list): Update.
4714 * ada-lang.c (resolve_subexp): Update.
4715 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4717 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4718 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4719 results parameter to std::vector.
4720 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4722 * ada-exp.y (block_lookup): Update.
4723 (select_possible_type_sym): Change type of syms. Remove nsyms
4725 (write_var_or_type, write_name_assoc): Update.
4729 * windows-nat.c (windows_nat_target::xfer_partial): Return
4730 TARGET_XFER_E_IO if we need to delegate to the target beneath
4731 but BENEATH is NULL.
4735 * Makefile.in (config.status): Add configure.nat as a
4740 * cp-name-parser.y (cpname_state): Add method declarations.
4741 (HANDLE_QUAL): Update.
4742 (cpname_state::d_grab, cpname_state::fill_comp)
4743 (cpname_state::make_operator, cpname_state::make_dtor)
4744 (cpname_state::make_builtin_type, cpname_state::make_name)
4745 (cpname_state::d_qualify, cpname_state::d_int_type)
4746 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4747 (%union): Move earlier.
4751 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4755 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4756 (aarch64_pseudo_write_1): Likewise.
4757 (aarch64_pseudo_read_value): Use helper.
4758 (aarch64_pseudo_write): Likewise.
4762 * darwin-nat.c (darwin_ops): Delete.
4763 (darwin_attach_pid): Use get_native_target.
4767 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4768 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4772 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4773 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4774 (aarch64_gdbarch_init): Check for SVE.
4775 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4779 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4780 * aarch64-tdep.h (aarch64_read_description): Likewise.
4781 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4782 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4783 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4784 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4785 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4789 * value.c (value_fetch_lazy_bitfield): New.
4790 (value_fetch_lazy_memory): New.
4791 (value_fetch_lazy_register): New.
4792 (value_fetch_lazy): Factor out to smaller functions.
4796 * cp-name-parser.y (backslashable, represented): Now const.
4800 * cp-name-parser.y: Include parser-defs.h.
4801 (parser_fprintf): Remove declaration.
4805 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4807 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4808 (global_result): Remove globals.
4809 (struct cpname_state): New.
4810 (yyparse): Don't declare.
4811 (yylex, yyerror): Move declarations after %union.
4812 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4813 (make_name): Add state parameter.
4815 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4817 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4819 (yylex): Add lvalp, state parameters.
4820 (yyerror): Add state parameter.
4821 (cp_demangled_name_to_comp): Update.
4825 * cp-name-parser.y (parser_fprintf): Declare.
4826 (GDB_YY_REMAP_PREFIX): Define.
4827 Include yy-remap.h. Don't redefine yy* identifiers.
4831 * python/py-type.c (typy_legacy_template_argument): Update.
4832 * cp-support.h (cp_demangled_name_to_comp): Update.
4833 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4834 parameter to be a "std::string *".
4839 * ada-lex.l: Include "diagnostics.h" instead of
4840 "common/diagnostics.h".
4841 * unittests/environ-selftests.c: Likewise.
4842 * common/diagnostics.h: Moved to ../include.
4846 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4847 to language_mode_manual while calling breakpoint_re_set_one.
4851 * valops.c (value_cast_structs, destructor_name_p): Update.
4852 * symtab.c (gdb_mangle_name): Update.
4853 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4855 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4856 (pascal_object_print_value_fields, pascal_object_print_value):
4858 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4859 * linespec.c (find_methods): Update.
4860 * gdbtypes.h (type_name_no_tag): Remove.
4861 (type_name_or_error): Rename from type_name_no_tag_or_error.
4862 * gdbtypes.c (type_name_no_tag): Remove.
4863 (type_name_or_error): Rename from type_name_no_tag_or_error.
4864 (lookup_struct_elt_type, check_typedef): Update.
4865 * expprint.c (print_subexp_standard): Update.
4866 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4867 * d-namespace.c (d_lookup_nested_symbol): Update.
4868 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4869 (cp_print_class_member): Update.
4870 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4871 * completer.c (add_struct_fields): Update.
4872 * c-typeprint.c (cp_type_print_derivation_info)
4873 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4875 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4876 (ada_prefer_type, ada_is_exception_sym): Update.
4880 * valops.c (enum_constant_from_type, value_namespace_elt)
4881 (value_maybe_namespace_elt): Update.
4882 * valarith.c (find_size_for_pointer_math): Update.
4883 * target-descriptions.c (make_gdb_type): Update.
4884 * symmisc.c (print_symbol): Update.
4885 * stabsread.c (define_symbol, read_type)
4886 (complain_about_struct_wipeout, add_undefined_type)
4887 (cleanup_undefined_types_1): Update.
4888 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4889 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4890 (rust_internal_print_type, rust_composite_type)
4891 (rust_evaluate_funcall, rust_evaluate_subexp)
4892 (rust_inclusive_range_type_p): Update.
4893 * python/py-type.c (typy_get_tag): Update.
4894 * p-typeprint.c (pascal_type_print_base): Update.
4895 * mdebugread.c (parse_symbol, parse_type): Update.
4896 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4898 * guile/scm-type.c (gdbscm_type_tag): Update.
4899 * go-lang.c (sixg_string_p): Update.
4900 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4902 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4903 (TYPE_TAG_NAME): Remove.
4904 * gdbtypes.c (type_name_no_tag): Simplify.
4905 (check_typedef, check_types_equal, recursive_dump_type)
4906 (copy_type_recursive, arch_composite_type): Update.
4907 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4908 in summary mode when needed.
4909 * eval.c (evaluate_funcall): Update.
4910 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4911 (process_structure_scope, read_enumeration_type)
4912 (read_namespace_type, read_module_type, determine_prefix): Update.
4913 * cp-support.c (inspect_type): Update.
4914 * coffread.c (process_coff_symbol, decode_base_type): Update.
4915 * c-varobj.c (c_is_path_expr_parent): Update.
4916 * c-typeprint.c (c_type_print_base_struct_union): Update.
4917 (c_type_print_base_1): Update. Print struct/class/union/enum in
4918 summary when using C language.
4919 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4920 (gen_maybe_namespace_elt): Update.
4921 * ada-lang.c (ada_type_name): Simplify.
4922 (empty_record, ada_template_to_fixed_record_type_1)
4923 (template_to_static_fixed_type)
4924 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4928 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4930 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4931 (c_print_type): Update.
4932 (c_print_type): New overload.
4933 (c_type_print_varspec_prefix, c_type_print_args)
4934 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4935 (c_type_print_base_struct_union, c_type_print_base_1)
4936 (cp_type_print_method_args): Add "language" parameter.
4937 (c_type_print_base): Update.
4938 * c-lang.h (c_print_type): Add new overload.
4942 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4943 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4947 * aarch64-tdep.c (aarch64_sve_register_names): New const
4949 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4950 (AARCH64_SVE_Z_REGS_NUM): New define.
4951 (AARCH64_SVE_P_REGS_NUM): Likewise.
4952 (AARCH64_SVE_NUM_REGS): Likewise.
4956 * nat/linux-ptrace.h [__alpha__]
4957 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4962 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4963 the endianness selected.
4964 * NEWS: Document `set endian auto' mode operation update.
4968 * Makefile.in: Add new header.
4969 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4970 (sve_vl_from_vg): Likewise.
4971 (sve_vq_from_vl): Likewise.
4972 (sve_vl_from_vq): Likewise.
4973 (sve_vq_from_vg): Likewise.
4974 (sve_vg_from_vq): Likewise.
4975 * configure.nat: Add new c file.
4976 * nat/aarch64-sve-linux-ptrace.c: New file.
4977 * nat/aarch64-sve-linux-ptrace.h: New file.
4981 * aarch64-linux-nat.c (aarch64_linux_read_description):
4983 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4985 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4986 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4987 (aarch64_gdbarch_init): Add parmeter zero.
4988 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4989 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4990 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4992 * doc/gdb.texinfo: Describe SVE feature
4993 * features/aarch64-sve.c: New file.
4998 * gdbarch.sh (significant_addr_bit): Default to zero when
4999 not set by target architecture.
5000 * gdbarch.c: Re-generated.
5001 * utils.c (address_significant): Update.
5005 * stack.c (func_command): Remove trailing newline in call to error.
5009 * regcache.h (regcache_raw_collect): Remove, update callers to
5010 use regcache::raw_collect.
5011 * regcache.c (regcache_raw_collect): Remove.
5015 * regcache.h (regcache_raw_supply): Remove, update callers to
5016 use detached_regcache::raw_supply.
5017 * regcache.c (regcache_raw_supply): Remove.
5021 * regcache.h (regcache_cooked_write_part): Remove, update
5022 callers to use regcache::cooked_write_part.
5023 * regcache.c (regcache_cooked_write_part): Remove.
5027 * regcache.h (regcache_cooked_read_part): Remove, update callers
5028 to use readable_regcache::cooked_read_part.
5029 * regcache.c (regcache_cooked_read_part): Remove.
5033 * regcache.h (regcache_cooked_read_value): Remove, update
5034 callers to use readable_regcache::cooked_read_value.
5035 * regcache.c (regcache_cooked_read_value): Remove.
5039 * regcache.h (regcache_cooked_write): Remove, update callers to
5040 use regcache::cooked_write.
5041 * regcache.c (regcache_cooked_write): Remove.
5045 * regcache.h (regcache_invalidate): Remove, update callers to
5046 use detached_regcache::invalidate instead.
5047 * regcache.c (regcache_invalidate): Remove.
5051 * regcache.h (regcache_raw_write_part): Remove, update callers
5052 to use regcache::raw_write_part instead.
5053 * regcache.c (regcache_raw_write_part): Remove.
5057 * regcache.h (regcache_raw_read_part): Remove, update callers to
5058 use readable_regcache::raw_read_part instead.
5059 * regcache.c (regcache_raw_read_part): Remove.
5063 * regcache.h (regcache_cooked_read): Remove, update callers to
5064 use readable_regcache::cooked_read instead.
5065 * regcache.c (regcache_cooked_read): Remove.
5069 * regcache.h (regcache_raw_write): Remove, update callers to use
5070 regcache::raw_write instead.
5071 * regcache.c (regcache_raw_write): Remove.
5075 * regcache.h (regcache_raw_read): Remove, update callers to use
5076 readable_regcache::raw_read instead.
5077 * regcache.c (regcache_raw_read): Remove.
5081 * regcache.h (regcache_raw_update): Remove, update callers to
5082 use readable_regcache::raw_update instead.
5083 * regcache.c (regcache_raw_update): Remove.
5087 * regcache.h (regcache_register_status): Remove, update callers
5088 to use reg_buffer::get_register_status directly instead.
5089 * regcache.c (regcache_register_status): Remove.
5093 * regcache.h (regcache_get_ptid): Remove, update all callers to
5094 call regcache::ptid instead.
5095 * regcache.c (regcache_get_ptid): Remove.
5099 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5103 * common/common-exceptions.h (exception_rethrow): Use
5108 * breakpoint.c (print_solib_event, check_status_catch_solib):
5109 Remove struct keyword in range-based for loops.
5110 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5111 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5113 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5115 * symfile.c (addr_info_make_relative): Likewise.
5116 * thread.c (value_in_thread_stack_temporaries): Likewise.
5121 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5122 aggregate type to get its real type before accessing it.
5126 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5127 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5128 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5129 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5130 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5131 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5132 * printcmd.c (info_address_command): Likewise.
5136 * windows-nat.c (handle_exception): Update fall-through comment.
5140 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5141 (struct program_space) <added_solibs>: Now a std::vector.
5142 * breakpoint.c (print_solib_event): Update.
5143 (check_status_catch_solib): Update.
5144 * progspace.c (clear_program_space_solib_cache): Update.
5145 * solib.c (update_solib_list): Update.
5149 * python/py-type.c (typy_richcompare): Update.
5150 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5151 * gdbtypes.h (types_deeply_equal): Return bool.
5152 (types_equal): Likewise.
5153 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5155 (check_types_equal): Change worklist to std::vector. Return
5157 (struct type_equality_entry): Add constructor.
5158 (compare_maybe_null_strings): Return bool.
5159 (check_types_worklist): Return bool. Change worklist to
5161 (types_deeply_equal): Use std::vector.
5162 (types_equal): Return bool.
5163 (compare_maybe_null_strings): Simplify.
5167 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5171 * objc-lang.h: Don't include cp-support.h.
5172 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5177 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5181 * value.c (value::location): Initialize.
5185 * dbxread.c (init_bincl_list): Remove.
5186 (bincl_list): Now a std::vector.
5187 (bincls_allocated, next_bincl): Remove.
5188 (free_bincl_list, do_free_bincl_list_cleanup)
5189 (make_cleanup_free_bincl_list): Remove.
5190 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5192 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5193 (struct header_file_location): Add constructor.
5194 (add_bincl_to_list): Remove.
5198 * tui/tui.c (tui_enable): Update.
5199 * mi/mi-interp.c (mi_interp::init): Update.
5200 * interps.h (class interp) <name>: New method.
5201 <m_name>: Rename from name.
5202 (~scoped_restore_interp): Update.
5203 * interps.c (interp::interp): Update.
5204 (interp_add, interp_set, interp_lookup_existing)
5205 (current_interp_named_p): Update.
5209 * interps.c (interp_name): Remove.
5210 * mi/mi-interp.c (mi_interp::init): Update.
5211 * interps.h (interp_name): Remove.
5212 (~scoped_restore_interp): Update.
5213 * tui/tui.c (tui_enable): Update.
5217 * utils.c (fputs_maybe_filtered): Update.
5218 * linespec.c (decode_line_full): Update.
5219 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5220 (mi_print_breakpoint_for_event, mi_solib_loaded)
5221 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5222 (mi_user_selected_context_changed): Update.
5223 * mi/mi-main.c (mi_execute_command): Update.
5224 * cli/cli-script.c (execute_control_command): Update.
5225 * python/python.c (execute_gdb_command): Update.
5226 * solib.c (info_sharedlibrary_command): Update.
5227 * interps.c (interp_ui_out): Remove.
5228 * interps.h (interp_ui_out): Remove.
5232 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5233 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5234 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5238 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5239 * interps.c (interp_exec): Use scoped_restore.
5243 * remote.c (remote_target::remote_file_get): Use
5245 (remote_target::remote_file_put): Likewise.
5249 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5251 (get_pe_section_index, add_pe_exported_sym): Update.
5252 (read_pe_exported_syms): Use gdb::def_vector.
5256 * frame.c (remove_prev_frame): Remove.
5257 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5261 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5263 * mips-linux-nat.c (supply_fpregset): Always call
5264 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5265 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5266 `mips_fill_fpregset'.
5267 * mips-linux-tdep.c (mips_supply_fpregset)
5268 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5269 (mips_fill_fpregset_wrapper): Remove functions.
5270 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5271 (mips_linux_fpregset): Remove variable.
5272 (mips_linux_iterate_over_regset_sections): Use
5273 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5274 (mips_linux_o32_sigframe_init): Remove comment.
5278 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5279 (struct readahead_cache, struct packet_reg, struct
5280 remote_arch_state, class remote_state): Move higher up in the
5282 (remote_target::m_remote_state): Now an object instead of a pointer.
5283 (remote_target::get_remote_state): Adjust.
5287 * stack.c (select_and_print_frame): Delete.
5288 (struct function_bounds): Move struct within function.
5289 (func_command): Most content moved into new function
5290 find_frame_for_function, use new function, print result, add
5292 (find_frame_for_function): New function, now returns a result.
5296 * stack.c (iterate_over_block_arg_vars): Fix comment.
5297 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5303 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5305 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5307 * frame.h (class scoped_restore_selected_frame): New class.
5308 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5309 of any exception, use scoped_restore_selected_frame to restore the
5314 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5319 * complaints.c (struct complaints): Remove.
5320 (symfile_complaint_book): Remove.
5321 (series): New global.
5322 (complaint_internal): Update.
5323 (clear_complaints): Update.
5327 * complaints.c (counters): New global.
5328 (struct complain): Remove.
5329 (struct complaints) <root>: Remove.
5330 (complaint_sentinel): Remove.
5331 (symfile_complaint_book): Update.
5332 (find_complaint) Remove.
5333 (complaint_internal, clear_complaints): Update.
5337 * complaints.c (struct complain) <file, line>: Remove.
5338 (find_complaint): Remove file, line parameters.
5339 (complaint_internal): Update.
5343 * complaints.c (vcomplaint): Remove.
5344 (complaint_internal) Merge in contents of vcomplaint.
5348 * complaints.c (struct complaints) <explanation>: Remove.
5349 (symfile_explanations): Remove.
5350 (symfile_complaint_book): Update.
5351 (vcomplaint): Update.
5352 (struct explanation): Remove.
5356 * complaints.c (symfile_complaints): Remove.
5357 (complaint_internal): Remove "complaints" parameter.
5358 (clear_complaints, vcomplaint): Remove "c" parameter.
5359 (get_complaints): Remove.
5360 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5361 (dwarf2_debug_line_missing_file_complaint)
5362 (dwarf2_debug_line_missing_end_sequence_complaint)
5363 (dwarf2_complex_location_expr_complaint)
5364 (dwarf2_const_value_length_mismatch_complaint)
5365 (dwarf2_section_buffer_overflow_complaint)
5366 (dwarf2_macro_malformed_definition_complaint)
5367 (dwarf2_invalid_attrib_class_complaint)
5368 (create_addrmap_from_index, dw2_symtab_iter_next)
5369 (dw2_expand_marked_cus)
5370 (dw2_debug_names_iterator::find_vec_in_debug_names)
5371 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5372 (create_debug_type_hash_table, init_cutu_and_read_dies)
5373 (partial_die_parent_scope, add_partial_enumeration)
5374 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5375 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5376 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5377 (create_cus_hash_table, create_dwp_hash_table)
5378 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5379 (dwarf2_rnglists_process, dwarf2_ranges_process)
5380 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5381 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5382 (handle_struct_member_die, process_structure_scope)
5383 (read_array_type, read_common_block, read_module_type)
5384 (read_tag_pointer_type, read_typedef, read_base_type)
5385 (read_subrange_type, load_partial_dies, partial_die_info::read)
5386 (partial_die_info::read, partial_die_info::read)
5387 (partial_die_info::read, read_checked_initial_length_and_offset)
5388 (dwarf2_string_attr, read_formatted_entries)
5389 (dwarf_decode_line_header)
5390 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5391 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5392 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5393 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5394 (get_signatured_type, get_DW_AT_signature_type)
5395 (decode_locdesc, file_file_name, consume_improper_spaces)
5396 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5397 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5398 (dwarf2_symbol_mark_computed, set_die_type)
5399 (read_attribute_value): Update.
5400 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5402 * dbxread.c (unknown_symtype_complaint)
5403 (lbrac_mismatch_complaint, repeated_header_complaint)
5404 (set_namestring, function_outside_compilation_unit_complaint)
5405 (read_dbx_symtab, process_one_symbol): Update.
5406 * gdbtypes.c (stub_noname_complaint): Update.
5407 * windows-nat.c (handle_unload_dll): Update.
5408 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5409 (decode_base_type): Update.
5410 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5411 (eb_complaint, record_include_begin, record_include_end)
5412 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5413 (process_xcoff_symbol, read_symbol)
5414 (function_outside_compilation_unit_complaint)
5415 (scan_xcoff_symtab): Update.
5416 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5417 * buildsym.c (finish_block_internal, make_blockvector)
5418 (end_symtab_get_static_block, augment_type_symtab): Update.
5419 * dtrace-probe.c (dtrace_process_dof)
5420 (dtrace_static_probe_ops::get_probes): Update.
5421 * complaints.h (struct complaint): Don't declare.
5422 (symfile_complaints): Remove.
5423 (complaint_internal): Remove "complaints" parameter.
5424 (complaint): Likewise.
5425 (clear_complaints): Likewise.
5426 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5427 (reread_symbols): Update.
5428 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5429 (dwarf2_frame_cache, decode_frame_entry): Update.
5430 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5431 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5432 (info_selectors_command): Update.
5433 * macrotab.c (macro_include, check_for_redefinition)
5434 (macro_undef): Update.
5435 * objfiles.c (filter_overlapping_sections): Update.
5436 * stabsread.c (invalid_cpp_abbrev_complaint)
5437 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5438 (define_symbol, error_type, read_type, rs6000_builtin_type)
5439 (stabs_method_name_from_physname, read_member_functions)
5440 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5441 (attach_fields_to_type, complain_about_struct_wipeout)
5442 (read_range_type, read_args, common_block_start)
5443 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5445 * mdebugread.c (index_complaint, unknown_ext_complaint)
5446 (basic_type_complaint, bad_tag_guess_complaint)
5447 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5448 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5449 (parse_procedure, parse_lines)
5450 (function_outside_compilation_unit_complaint)
5451 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5452 (bad_tag_guess_complaint, reg_value_complaint): Update.
5453 * cp-support.c (demangled_name_complaint): Update.
5454 * macroscope.c (sal_macro_scope): Update.
5455 * dwarf-index-write.c (class debug_names): Update.
5459 * complaints.c (clear_complaints): Remove "noisy" parameter.
5460 * complaints.h (clear_complaints): Update.
5461 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5462 (reread_symbols): Update.
5466 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5468 (vcomplaint, clear_complaints): Update.
5469 (symfile_explanations): Remove some messages.
5473 * complaints.c (internal_complaint): Remove.
5474 * complaints.h (internal_complaint): Remove.
5478 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5482 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5483 (remote_fileio_badfd, remote_fileio_return_errno)
5484 (remote_fileio_return_success, remote_fileio_func_open)
5485 (remote_fileio_func_open, remote_fileio_func_close)
5486 (remote_fileio_func_read, remote_fileio_func_write)
5487 (remote_fileio_func_lseek, remote_fileio_func_rename)
5488 (remote_fileio_func_unlink, remote_fileio_func_stat)
5489 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5490 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5491 remote_target parameter.
5492 (remote_fio_func_map) <func>: Add remote_target parameter.
5493 (do_remote_fileio_request, remote_fileio_request):
5494 * remote-fileio.h (remote_fileio_request):
5495 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5496 remote_target parameter.
5497 (remote_notif_process, handle_notification): Adjust to pass down
5499 (remote_notif_state_allocate): Add remote_target parameter. Save
5501 * remote-notif.h (struct remote_target): Forward declare.
5502 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5503 remote_target parameter.
5504 (struct remote_notif_state) <remote>: New field.
5505 (remote_notif_ack, remote_notif_parse): Add remote_target
5507 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5508 remote_target parameter.
5509 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5510 (threads_listing_context, rmt_thread_action, protocol_feature)
5511 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5512 (packet_result, struct threads_listing_context, remote_state):
5513 Move definitions and declarations higher up.
5514 (remote_target) <~remote_target>: Declare.
5515 (remote_download_command_source, remote_file_put, remote_file_get)
5516 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5517 (remote_hostio_pread_vFile, remote_hostio_send_command)
5518 (remote_hostio_set_filesystem, remote_hostio_open)
5519 (remote_hostio_close, remote_hostio_unlink, remote_state)
5520 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5521 (get_memory_write_packet_size, get_memory_read_packet_size)
5522 (append_pending_thread_resumptions, remote_detach_1)
5523 (append_resumption, remote_resume_with_vcont)
5524 (add_current_inferior_and_thread, wait_ns, wait_as)
5525 (process_stop_reply, remote_notice_new_inferior)
5526 (process_initial_stop_replies, remote_add_thread)
5527 (btrace_sync_conf, remote_btrace_maybe_reopen)
5528 (remove_new_fork_children, kill_new_fork_children)
5529 (discard_pending_stop_replies, stop_reply_queue_length)
5530 (check_pending_events_prevent_wildcard_vcont)
5531 (discard_pending_stop_replies_in_queue, stop_reply)
5532 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5533 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5534 (remote_interrupt_as, remote_interrupt_ns)
5535 (remote_get_noisy_reply, remote_query_attached)
5536 (remote_add_inferior, remote_current_thread, get_current_thread)
5537 (set_thread, set_general_thread, set_continue_thread)
5538 (set_general_process, write_ptid)
5539 (remote_unpack_thread_info_response, remote_get_threadinfo)
5540 (parse_threadlist_response, remote_get_threadlist)
5541 (remote_threadlist_iterator, remote_get_threads_with_ql)
5542 (remote_get_threads_with_qxfer)
5543 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5544 (get_offsets, remote_check_symbols, remote_supported_packet)
5545 (remote_query_supported, remote_packet_size)
5546 (remote_serial_quit_handler, remote_detach_pid)
5547 (remote_vcont_probe, remote_resume_with_hc)
5548 (send_interrupt_sequence, interrupt_query)
5549 (remote_notif_get_pending_events, fetch_register_using_p)
5550 (send_g_packet, process_g_packet, fetch_registers_using_g)
5551 (store_register_using_P, store_registers_using_G)
5552 (set_remote_traceframe, check_binary_download)
5553 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5554 (remote_xfer_live_readonly_partial, remote_read_bytes)
5555 (remote_send_printf, remote_flash_write, readchar)
5556 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5557 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5558 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5559 (extended_remote_disable_randomization, extended_remote_run)
5560 (send_environment_packet, extended_remote_environment_support)
5561 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5562 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5563 (packet_command): Now methods of ...
5564 (remote_target): ... this class.
5565 (m_remote_state) <remote_target>: New field.
5566 (struct remote_state) <stop_reply_queue,
5567 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5569 (remote_state::remote_state): Allocate stop_reply_queue.
5570 (remote_state): Delete global.
5571 (get_remote_state_raw): Delete.
5572 (remote_target::get_remote_state): Allocate m_remote_state on
5574 (get_current_remote_target): New.
5575 (remote_ops, extended_remote_ops): Delete.
5576 (wait_forever_enabled_p, remote_async_inferior_event_token):
5577 Delete, moved to struct remote_state.
5578 (remote_target::close): Delete self. Destruction bits split to
5580 (remote_target::~remote_target): ... this.
5581 (show_memory_packet_size): Adjust to use
5582 get_current_remote_target.
5583 (struct protocol_feature) <func>: Add remote_target parameter.
5584 All callers adjusted.
5585 (curr_quit_handler_target): New.
5586 (remote_serial_quit_handler): Reimplement.
5587 (remote_target::open_1): Adjust to use get_current_remote_target.
5588 Heap-allocate remote_target/extended_remote_target instances.
5589 (vcont_builder::vcont_builder): Add remote_target parameter, and
5590 save it in m_remote. All callers adjusted.
5591 (vcont_builder::m_remote): New field.
5592 (vcont_builder::restart, vcont_builder::flush)
5593 (vcont_builder::push_action): Use it.
5594 (remote_target::commit_resume): Use it.
5595 (struct queue_iter_param) <remote>: New field.
5596 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5597 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5598 (check_pending_event_prevents_wildcard_vcont_callback)
5599 (remote_target::check_pending_events_prevent_wildcard_vcont)
5600 (remote_target::discard_pending_stop_replies)
5601 (remote_target::discard_pending_stop_replies_in_queue)
5602 (remote_target::remote_notif_remove_queued_reply): Fill in
5604 (remote_notif_get_pending_events): New.
5605 (remote_target::readchar, remote_target::remote_serial_write):
5606 Save/restore curr_quit_handler_target.
5608 (kill_new_fork_children): Fill in 'remote' field.
5609 (packet_command): Use get_current_remote_target, defer to
5610 remote_target method of same name.
5611 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5612 parameter, and save it in m_remote. All callers adjusted.
5613 (scoped_remote_fd::release): Use m_remote.
5614 (scoped_remote_fd::m_remote): New field.
5615 (remote_file_put, remote_file_get, remote_file_delete): Use
5616 get_current_remote_target, defer to remote_target method of same
5618 (remote_btrace_reset): Add remote_state paremeter. Update all
5620 (remote_async_inferior_event_handler). Pass down 'data'.
5621 (remote_new_objfile): Use get_current_remote_target.
5622 (remote_target::vcont_r_supported): New.
5623 (set_range_stepping): Use get_current_remote_target and
5624 remote_target::vcont_r_supported.
5625 (_initialize_remote): Don't allocate 'remote_state' and
5626 'stop_reply_queue' globals.
5627 * remote.h (struct remote_target): Forward declare.
5628 (getpkt, putpkt, remote_notif_get_pending_events): Add
5629 'remote_target' parameter.
5633 * remote.c (vcont_builder): Now a class. Make all data members
5635 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5637 (vcont_builder_restart): Rename to ...
5638 (vcont_builder::restart): ... this.
5639 (vcont_builder_flush): Rename to ...
5640 (vcont_builder::flush): ... this.
5641 (vcont_builder_push_action): Rename to ...
5642 (vcont_builder::push_action): ... this.
5643 (remote_target::commit_resume): Adjust.
5647 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5648 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5649 (get_fixed_memory_packet_size): New.
5650 (get_memory_packet_size): Use it.
5651 (set_memory_packet_size): Don't override the config size with
5652 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5653 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5654 Don't refer to get_memory_packet_size if not connected to a remote
5655 target. Show "(default)" if configured size is 0.
5659 * remote.c (remote_target::mourn_inferior): Move
5660 discard_pending_stop_replies call here from ...
5661 (_initialize_remote): ... here.
5665 * remote.c (compare_section_command): Remove set_general_process
5670 * remote.c (struct packet_reg, struct remote_arch_state):
5671 Move higher up in the file.
5672 (remote_state) <m_arch_states>: Store remote_arch_state values
5673 instead of remote_arch_state pointers.
5674 (remote_state::get_remote_arch_state): Adjust.
5678 * remote.c: Include <unordered_map>.
5679 (remote_state): Now a class.
5680 (remote_state) <get_remote_arch_state>: Declare method.
5681 <get_remote_arch_state>: New field.
5682 (remote_arch_state) <remote_arch_state>: Declare ctor.
5683 <regs>: Now a unique_ptr.
5684 (remote_gdbarch_data_handle): Delete.
5685 (get_remote_arch_state): Delete.
5686 (remote_state::get_remote_arch_state): New.
5687 (get_remote_state): Adjust to call remote_state's
5688 get_remote_arch_state method.
5689 (init_remote_state): Delete, bits factored out to ...
5690 (remote_arch_state::remote_arch_state): ... this new method.
5691 (get_remote_packet_size, get_memory_packet_size)
5692 (process_g_packet, remote_target::fetch_registers)
5693 (remote_target::prepare_to_store, store_registers_using_G)
5694 (remote_target::store_registers, remote_target::get_trace_status):
5695 Adjust to call remote_state's method.
5696 (_initialize_remote): Remove reference to
5697 remote_gdbarch_data_handle.
5701 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5702 pread>: New method declarations.
5703 (remote_target::open_1): Adjust.
5704 (readahead_cache_invalidate): Rename to ...
5705 (readahead_cache::invalidate): ... this, and adjust to be a class
5707 (readahead_cache_invalidate_fd): Rename to ...
5708 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5710 (remote_hostio_pwrite): Adjust.
5711 (remote_hostio_pread_from_cache): Rename to ...
5712 (readahead_cache::pread): ... this, and adjust to be a class
5714 (remote_hostio_close): Adjust.
5718 * remote.c (remote_hostio_close_cleanup): Delete.
5719 (class scoped_remote_fd): New.
5720 (remote_file_put, remote_file_get): Use it.
5724 (struct vCont_action_support): Use bool and initialize all fields.
5725 (struct readahead_cache): Initialize all fields.
5726 (remote_state): Use bool and initialize all fields.
5727 (remote_state::remote_state, remote_state::~remote_state): New.
5728 (new_remote_state): Delete.
5729 (_initialize_remote): Use new to allocate remote_state.
5735 * c-exp.y: Include "c-support.h".
5736 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5737 of tolower. Use c_ident_is_alpha to scan names.
5738 * c-lang.c: Include "c-support.h".
5739 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5740 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5741 * c-support.h: New file, with bits factored out from ...
5742 * cp-name-parser.y: ... this file.
5743 Include "c-support.h".
5744 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5745 c-support.h and renamed.
5746 (symbol_end, yylex): Adjust.
5750 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5751 parameter type to CORE_ADDR.
5752 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5753 parameter type in declaration to CORE_ADDR.
5754 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5755 target_auxv_search to get AT_HWCAP and use the result to get the
5757 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5758 to CORE_ADDR. Remove the cast of the return value to unsigned
5759 long. Fix error predicate of target_auxv_search.
5760 (ppc_linux_nat_target::read_description): Change the type of the
5761 hwcap variable to CORE_ADDR.
5765 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5766 if the size of fpscr is larger than 32 bits.
5770 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5771 (ppc32_linux_vsxregmap): New global.
5772 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5773 regcache_supply_regset, and regcache_collect_regset.
5774 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5775 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5776 (fetch_vsx_register, store_vsx_register): Remove.
5777 (fetch_vsx_registers): Add regno parameter. Get regset using
5778 ppc_linux_vsxregset. Use regset to supply registers.
5779 (store_vsx_registers): Add regno parameter. Get regset using
5780 ppc_linux_vsxregset. Use regset to collect registers.
5781 (fetch_register): Call fetch_vsx_registers instead of
5783 (store_register): Call store_vsx_registers instead of
5785 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5786 new regno parameter.
5787 (store_ppc_registers): Call store_vsx_registers with -1 for the
5788 new regno parameter.
5789 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5790 (ppc_collect_vsxregset): Remove.
5794 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5796 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5797 for vector register offset fields.
5798 (ppc64_fbsd_reg_offsets): Likewise.
5799 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5800 to vector register offset fields.
5801 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5802 to vector register offset fields.
5803 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5804 vector register offset fields.
5805 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5806 initializers for vector register offset fields.
5807 (rs6000_aix64_reg_offsets): Likewise.
5808 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5809 (ppc_supply_vrregset): Remove.
5810 (ppc_collect_vrregset): Remove.
5811 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5812 (ppc_linux_vrregset) : New function.
5813 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5814 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5815 (ppc32_linux_vrregset): Remove.
5816 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5817 and use result instead of ppc32_linux_vrregset.
5818 (ppc32_linux_reg_offsets): Remove initializers for vector register
5820 (ppc64_linux_reg_offsets): Likewise.
5821 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5822 * ppc-linux-nat.c: Include regset.h.
5823 (gdb_vrregset_t): Adjust comment to account for little-endian
5825 (supply_vrregset, fill_vrregset): Remove.
5826 (fetch_altivec_register, store_altivec_register): Remove.
5827 (fetch_altivec_registers): Add regno parameter. Get regset using
5828 ppc_linux_vrregset. Use regset to supply registers.
5829 (store_altivec_registers): Add regno parameter. Get regset using
5830 ppc_linux_vrregset. Use regset to collect registers.
5831 (fetch_register): Call fetch_altivec_registers instead of
5832 fetch_altivec_register.
5833 (store_register): Call store_altivec_registers instead of
5834 store_altivec_register.
5835 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5836 the new regno parameter.
5837 (store_ppc_registers): Call store_altivec_registers with -1 for
5838 the new regno parameter.
5842 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5843 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5844 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5845 (gdb_vrregset_t): Change array type size to
5846 PPC_LINUX_SIZEOF_VRREGSET.
5847 (gdb_vsxregset_t): Change array type size to
5848 PPC_LINUX_SIZEOF_VSXREGSET.
5849 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5850 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5851 PPC_LINUX_SIZEOF_VSXREGSET.
5855 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5856 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5858 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5859 ppc_linux_target_wordsize with tid.
5860 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5862 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5863 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5864 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5865 tid parameter. Remove static specifier.
5866 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5867 (ppc_linux_target_wordsize): New declaration.
5871 * arch/ppc-linux-common.c: New file.
5872 * arch/ppc-linux-common.h: New file.
5873 * arch/ppc-linux-tdesc.h: New file.
5874 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5875 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5876 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5877 arch/ppc-linux-tdesc.h.
5878 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5879 arch/ppc-linux-tdesc.h.
5880 (ppc_linux_nat_target::read_description): Remove target
5881 description matching code. Fill a ppc_linux_features struct and
5882 call ppc_linux_match_description with it. Move comment about ISA
5883 2.05 to ppc-linux-common.c.
5884 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5885 arch/ppc-linux-tdesc.h.
5886 (ppc_linux_core_read_description): Remove target description
5887 matching code. Fill a ppc_linux_features struct and call
5888 ppc_linux_match_description with it.
5889 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5890 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5891 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5892 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5893 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5894 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5895 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5896 (tdesc_powerpc_e500l): Remove.
5900 * ada-lang.c (catch_assert_command): Pass empty string instead
5901 of NULL for excep_string argument.
5905 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5906 the width of the requested register exceeds the width of the
5911 * printcmd.c (output_command): Remove.
5912 (output_command_const): Rename to output_command.
5913 * valprint.h (output_command): Rename from output_command_const.
5914 * tracepoint.c (trace_dump_actions): Call output_command.
5918 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5919 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5920 * ada-lang.h (create_ada_exception_catchpoint): Update.
5921 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5923 (create_excep_cond_exprs, ~ada_catchpoint)
5924 (should_stop_exception, print_one_exception)
5925 (print_mention_exception, print_recreate_exception): Update.
5926 (ada_get_next_arg): Remove.
5927 (catch_ada_exception_command_split): Use std::string. Change type
5928 of "excep_string", "cond_string".
5929 (catch_ada_exception_command): Update.
5930 (create_ada_exception_catchpoint): Change type of excep_string.
5931 (ada_exception_sal): Remove excep_string parameter.
5932 (~ada_catchpoint): Remove.
5936 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5941 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5942 Return unique_xmalloc_ptr.
5943 (print_it_exception): Update.
5947 * tracepoint.c (trace_dump_actions): Use std::string.
5951 * symfile.c (reread_symbols): Use std::string for original_name.
5955 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5956 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5961 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5963 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5964 * objfiles.c (get_objfile_bfd_data): Allocate
5965 objfile_per_bfd_storage with obstack_new when allocating on
5970 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5972 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5973 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5974 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5975 (add_pending): Likewise.
5976 (parse_symbol): Likewise.
5977 (parse_partial_symbols): Likewise.
5978 (psymtab_to_symtab_1): Likewise.
5979 (new_psymtab): Likewise.
5980 (elfmdebug_build_psymtabs): Likewise.
5981 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5982 * objfiles.c (get_objfile_bfd_data): Likewise.
5983 (objfile_register_static_link): Likewise.
5984 * psymtab.c (allocate_psymtab): Likewise.
5985 * stabsread.c (read_member_functions): Likewise.
5986 * xcoffread.c (xcoff_end_psymtab): Likewise.
5990 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5991 compiler supports std::is_trivially_constructible.
5992 * common/poison.h: Include obstack.h.
5993 (IsMallocable): Define to is_trivially_constructible if the
5994 compiler supports it, define to true_type otherwise.
5998 (XOBNEWVEC): Redefine.
5999 * gdb_obstack.h (obstack_zalloc): New.
6000 (OBSTACK_ZALLOC): Redefine.
6001 (obstack_calloc): New.
6002 (OBSTACK_CALLOC): Redefine.
6004 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6005 (gdbarch_obstack): New declaration in gdbarch.h, definition in
6007 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6008 obstack_calloc/obstack_zalloc.
6009 (gdbarch_obstack_zalloc): Remove.
6010 * target-descriptions.c (tdesc_data_init): Use obstack_new.
6014 * stack.c (backtrace_command_1): Remove useless variable int i.
6018 * stack.c (print_frame_info): Fix comment.
6022 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6023 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6024 (~dwarf2_per_objfile): Update
6025 (dwarf2_get_dwz_file): Use new.
6026 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6031 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6033 * dwarf2read.c (struct dwp_file): Add constructor and
6035 (open_and_init_dwp_file): Return a unique_ptr.
6036 (dwarf2_per_objfile, create_dwp_hash_table)
6037 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6038 (lookup_dwo_unit_in_dwp): Update.
6039 (open_and_init_dwp_file, get_dwp_file): Update.
6043 * dwarf2read.c (dwarf2_per_objfile): Update.
6044 (struct mapped_index): Add initializers.
6045 (dwarf2_read_index): Use new.
6046 (dw2_symtab_iter_init): Update.
6047 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6052 * dwarf2read.c (mapped_index) <total_size>: Remove.
6056 * unittests/format_pieces-selftests.c (test_format_specifier):
6061 * c-typeprint.c (maybe_print_hole): New function.
6062 (c_print_type_struct_field_offset): Update.
6063 (c_type_print_base_struct_union): Call maybe_print_hole.
6067 * breakpoint.c (build_bpstat_chain): New function, moved from
6069 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6070 If no stop chain is passed, call build_bpstat_chain to build it.
6071 * breakpoint.h (build_bpstat_chain): Declare.
6072 (bpstat_stop_status): Move documentation here from breakpoint.c.
6073 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6074 build the stop chain and pass it to skip_inline_frames.
6075 Pass this stop chain to bpstat_stop_status.
6076 * inline-frame.c: Include breakpoint.h.
6077 (stopped_by_user_bp_inline_frame): New function.
6078 (skip_inline_frames): Add parameter `stop_chain'.
6079 Move documention to inline-frame.h.
6080 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6081 whether the frame should be elided.
6082 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6083 Add moved documentation and update for new parameter.
6088 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6089 unittests/format_pieces-selftests.c.
6090 * common/format.h (format_piece) <operator==>: New.
6091 (format_pieces) <operator[]>: Remove.
6092 * common/format.c (format_pieces::format_pieces): Handle \e.
6093 * unittests/format_pieces-selftests.c: New.
6098 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6099 (dw2_instantiate_symtab): Add skip_partial parameter.
6100 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6101 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6102 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6103 (dw2_expand_symtabs_matching_one)
6104 (dw2_find_pc_sect_compunit_symtab)
6105 (dw2_debug_names_lookup_symbol)
6106 (dw2_debug_names_expand_symtabs_for_function): Update.
6107 (init_cutu_and_read_dies): Add skip_partial parameter.
6108 (process_psymtab_comp_unit, build_type_psymtabs_1)
6109 (process_skeletonless_type_unit, load_partial_comp_unit)
6110 (psymtab_to_symtab_1): Update.
6111 (load_full_comp_unit): Add skip_partial parameter.
6112 (process_imported_unit_die, dwarf2_read_addr_index)
6113 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6114 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6115 (read_signatured_type): Update.
6119 * value.c (release_value): Remove unused variable.
6120 (record_latest_value): Likewise.
6121 (access_value_history): Likewise.
6122 (preserve_values): Likewise.
6126 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6132 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6133 Also handle registers whose width is not a multiple of
6135 (linux_nat_trad_target::store_register): Likewise.
6139 * gdbcore.h (core_bfd): Redefine.
6140 * corelow.c (core_target::close): Update.
6141 (core_target_open): Update.
6142 * progspace.h (struct program_space) <cbfd>: Now a
6148 * symfile-add-flags.h (enum symfile_add_flags)
6149 <SYMFILE_NOT_FILENAME>: New constant.
6150 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6151 objfile name from BFD.
6152 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6153 * minidebug.c (find_separate_debug_file_in_section): Put
6154 ".gnu_debugdata" into BFD's file name.
6158 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6164 * aarch64-tdep.c (aarch64_analyze_prologue,
6165 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6166 Indicate not interested in errors.
6170 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6171 Supply the MIPS_ZERO_REGNUM register.
6175 * mips-tdep.c (mask_address_var): Make variable static.
6179 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6183 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6184 FXSAVE_ADDR for the mxcsr register.
6188 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6192 * corelow.c (core_target) <core_target>: No longer inline.
6193 Initialize m_core_gdbarch, m_core_vec and build the section table
6195 <~core_target>: New.
6196 <core_gdbarch, get_core_register_section>: New methods.
6197 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6198 factored out from ...
6199 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6201 (sniff_core_bfd): Add gdbarch parameter.
6202 (core_close): Delete, merged into ...
6203 (core_target::close): ... here. Delete self.
6204 (core_close_cleanup): Delete.
6205 (core_target_open): Allocate a core_target on the heap. Use a
6206 unique_ptr instead of a cleanup. Bits moved into the core_target
6207 ctor. Adjust to use core_target methods instead of globals.
6208 (get_core_register_section): Rename to ...
6209 (core_target::get_core_register_section): ... this and adjust.
6210 (struct get_core_registers_cb_data): New.
6211 (get_core_registers_cb): Use it. Use bool.
6212 (core_target::fetch_registers, core_target::files_info)
6213 (core_target::xfer_partial, core_target::read_description)
6214 (core_target::pid_to, core_target::thread_name): Adjust to
6215 reference class fields instead of globals.
6216 * target.h (struct target_ops_deleter, target_ops_up): New.
6220 * corefile.c (core_file_command): Move to corelow.c.
6221 * corelow.c (the_core_target): Delete.
6222 (core_file_command): Moved from corefile.c. Check exec_bfd
6223 instead of the_core_target. Use target_detach instead of calling
6224 into the_core_target directly.
6225 (maybe_say_no_core_file_now): New.
6226 (core_target::detach): Use it.
6227 (_initialize_corelow): Remove references to the_core_target.
6228 * gdbcore.h (the_core_target): Delete.
6233 * corefile.c (core_bfd): Remove.
6234 * gdbcore.h (core_bfd): Now a macro.
6235 * progspace.h (struct program_space) <cbfd>: New field.
6239 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6244 * configure: Rebuild.
6245 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6250 * regformats/regdat.sh: Adjust script, following the addition
6251 of the new expedite_regs parameter to init_target_desc.
6256 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6257 set_gdbarch_significant_addr_bit.
6258 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6259 set_gdbarch_significant_addr_bit.
6260 * utils.c (address_significant): Update to sign extend addr.
6264 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6265 (xtensa_linux_init_abi): Limit tdep->num_regs by
6266 tdep->num_nopriv_regs.
6267 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6268 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6273 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6277 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6278 (I387_MXCSR_INIT_VAL): New constant.
6279 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6280 buffer if it was supplied by the inferior.
6281 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6282 (i387_xsave_get_clear_bv): New function.
6283 (i387_supply_xsave): Only read x87 control registers from the
6284 xsave buffer if the feature is enabled, and the state will have
6285 been written, otherwise, provide a suitable default.
6286 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6287 including x87 control registers. Update control registers if they
6288 have changed from the default value, and mark features as enabled
6290 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6294 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6298 * configure: Rebuild.
6299 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6304 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6305 bit. Use correct value for VDIV.
6309 * configure: Rebuild.
6310 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6314 * linux-record.c (record_linux_system_call) <case
6315 RECORD_SYS_RECVFROM>: Add "break".
6319 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6320 Add missing "break".
6321 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6322 Add missing "break".
6326 * rs6000-tdep.c (ppc_process_record_op4)
6327 (ppc_process_record_op63): Add fall-through comment.
6331 * i386-tdep.c (i386_process_record): Add fall-through comment.
6335 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6340 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6341 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6342 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6344 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6346 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6351 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6355 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6356 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6357 * symfile.c (section_is_mapped): Fix fall-through comment.
6358 * stabsread.c (define_symbol, read_member_functions): Fix
6359 fall-through comment.
6360 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6362 * remote.c (remote_wait_as): Fix fall-through comment.
6363 * p-exp.y (yylex): Fix fall-through comment.
6364 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6366 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6367 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6368 * jv-exp.y (yylex): Fix fall-through comment.
6369 * go-exp.y (lex_one_token): Fix fall-through comment.
6370 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6371 fall-through comment.
6372 * f-exp.y (yylex): Fix fall-through comment.
6373 * dwarf2read.c (process_die): Fix fall-through comments.
6374 * dbxread.c (process_one_symbol): Fix fall-through comment.
6375 * d-exp.y (lex_one_token): Fix fall-through comment.
6376 * cp-name-parser.y (yylex): Fix fall-through comment.
6377 * coffread.c (coff_symtab_read): Fix fall-through comment.
6378 * c-exp.y (lex_one_token): Fix fall-through comment.
6379 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6381 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6387 * NEWS: Mention gdb.execute change.
6388 * gdbcmd.h (execute_control_command): Don't declare.
6389 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6390 execute_control_commands, execute_control_commands_to_string.
6391 * cli/cli-script.h (execute_control_commands)
6392 (execute_control_commands_to_string): Declare.
6393 (execute_control_command): Add from_tty parameter.
6394 * cli/cli-script.c (execute_control_commands)
6395 (execute_control_commands_to_string): New functions.
6396 (execute_user_command): Use execute_control_commands.
6397 (execute_control_command_1): Add "from_tty" parameter. Update.
6398 (execute_control_command): Likewise.
6403 * NEWS: Mention that breakpoint commands are writable.
6404 * python/py-breakpoint.c (bppy_set_commands): New function.
6405 (breakpoint_object_getset) <"commands">: Use it.
6409 * tracepoint.c (actions_command): Update.
6410 * mi/mi-cmd-break.c (mi_command_line_array)
6411 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6412 (mi_read_next_line): Remove.
6413 (mi_cmd_break_commands): Update.
6414 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6416 * cli/cli-script.c (get_command_line): Update.
6417 (process_next_line): Use function_view. Constify.
6418 (recurse_read_control_structure, read_command_lines)
6419 (read_command_lines_1): Change argument types to function_view.
6420 (do_define_command, document_command): Update.
6421 * breakpoint.h (check_tracepoint_command): Don't declare.
6422 * breakpoint.c (check_tracepoint_command): Remove.
6423 (commands_command_1, create_tracepoint_from_upload): Update.
6428 * cli/cli-script.h (enum command_control_type) <define_control>:
6430 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6431 (build_command_line, execute_control_command_1)
6432 (process_next_line): Likewise.
6433 (do_define_command): New function, extracted from define_command.
6434 (define_command): Use it.
6438 * tracepoint.c (actions_command): Update.
6439 * cli/cli-script.h (read_command_lines): Update.
6440 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6441 (MAX_TMPBUF): Remove define.
6442 (define_command): Use string_printf.
6443 (document_command): Likewise.
6444 * breakpoint.c (commands_command_1): Update.
6448 * top.c (execute_command): Update.
6449 * cli/cli-script.h (print_command_lines): Now varargs.
6450 * cli/cli-script.c (print_command_lines): Now varargs.
6451 (execute_control_command_1) <case while_control, case if_control>:
6456 * tracepoint.c (all_tracepoint_actions): Rename from
6457 all_tracepoint_actions_and_cleanup. Change return type.
6458 (actions_command, encode_actions_1, encode_actions)
6459 (trace_dump_actions, tdump_command): Update.
6460 * remote.c (remote_download_command_source): Update.
6461 * python/python.c (gdbpy_eval_from_control_command)
6462 (python_command, python_interactive_command): Update.
6463 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6464 * guile/guile.c (guile_command)
6465 (gdbscm_eval_from_control_command, guile_command): Update.
6466 * compile/compile.c (compile_code_command)
6467 (compile_print_command, compile_to_object): Update.
6468 * cli/cli-script.h (struct command_lines_deleter): New.
6469 (counted_command_line): New typedef.
6470 (struct command_line): Add constructor, destructor.
6471 <body_list>: Remove.
6472 <body_list_0, body_list_1>: New members.
6473 (command_line_up): Remove typedef.
6474 (read_command_lines, read_command_lines_1, get_command_line):
6476 (copy_command_lines): Don't declare.
6477 * cli/cli-script.c (build_command_line): Use "new".
6478 (get_command_line): Return counted_command_line.
6479 (print_command_lines, execute_user_command)
6480 (execute_control_command_1, while_command, if_command): Update.
6481 (realloc_body_list): Remove.
6482 (process_next_line, recurse_read_control_structure): Update.
6483 (read_command_lines, read_command_lines_1): Return counted_command_line.
6484 (free_command_lines): Use "delete".
6485 (copy_command_lines): Remove.
6486 (define_command, document_command, show_user_1): Update.
6487 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6488 a counted_command_line.
6489 * breakpoint.h (counted_command_line): Remove typedef.
6490 (breakpoint_set_commands): Update.
6491 * breakpoint.c (check_no_tracepoint_commands)
6492 (validate_commands_for_breakpoint): Update.
6493 (breakpoint_set_commands): Change commands to be a
6494 counted_command_line.
6495 (commands_command_1, update_dprintf_command_list)
6496 (create_tracepoint_from_upload): Update.
6500 * cli/cli-decode.h (cmd_list_element): New constructor.
6501 (~cmd_list_element): New destructor.
6502 (struct cmd_list_element): Add initializers.
6503 * cli/cli-decode.c (do_add_cmd): Use "new".
6504 (delete_cmd): Use "delete".
6509 PR breakpoints/19806 and support for PR external/20207.
6510 * NEWS: Mention Aarch64 watchpoint improvements.
6511 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6512 watchpoints and PR external/20207 watchpoints.
6513 * nat/aarch64-linux-hw-point.c
6514 (kernel_supports_any_contiguous_range): New.
6515 (aarch64_watchpoint_offset): New.
6516 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6517 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6518 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6519 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6520 next_addr_orig_p. Support PR external/20207 watchpoints.
6521 (aarch64_downgrade_regs): New.
6522 (aarch64_dr_state_insert_one_point): New parameters offset and
6524 (aarch64_dr_state_remove_one_point): Likewise.
6525 (aarch64_handle_breakpoint): Update caller.
6526 (aarch64_handle_aligned_watchpoint): Likewise.
6527 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6529 (aarch64_linux_set_debug_regs): Remove const from state. Call
6530 aarch64_downgrade_regs.
6531 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6532 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6533 (DR_CONTROL_MASK): ... this.
6534 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6535 (unsigned int aarch64_watchpoint_offset): New prototype.
6536 (aarch64_linux_set_debug_regs): Remove const from state.
6537 * utils.c (align_up, align_down): Move to ...
6538 * common/common-utils.c (align_up, align_down): ... here.
6539 * utils.h (align_up, align_down): Move to ...
6540 * common/common-utils.h (align_up, align_down): ... here.
6544 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6545 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6546 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6547 Re-implement to match the ABI as summarized in GCC's
6548 gcc/config/sparc/sparc.c. All callers updated.
6549 (sparc32_store_arguments): Remove assertion.
6553 * printcmd.c: Don't include tui.h.
6554 (decode_format): Use skip_spaces.
6559 * printcmd.c (last_count): New global.
6560 (x_command): Use saved count when repeating.
6564 * nto-procfs.c (do_closedir_cleanup): Remove.
6565 (procfs_pidlist): Use gdb_dir_up.
6566 * procfs.c (do_closedir_cleanup): Remove.
6567 (proc_update_threads): Use gdb_dir_up.
6568 * common/filestuff.h (struct gdb_dir_deleter): New.
6569 (gdb_dir_up): New typedef.
6573 * ada-lang.c (print_mention_exception): Use std::string.
6577 * ada-lang.c (create_excep_cond_exprs): Update.
6578 (ada_exception_catchpoint_cond_string): Use std::string.
6582 * ada-lang.c (xget_renaming_scope): Return std::string.
6583 (old_renaming_is_invisible): Update.
6587 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6588 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6592 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6596 * remote.c (remote_query_supported_append): Change type.
6597 (remote_check_symbols): Update.
6602 * configure.ac: Prepend libpython.
6603 * python/python-config.py: Likewise.
6604 * configure: Regenerate.
6608 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6613 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6614 override. Write 'true' instead of '1'.
6615 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6620 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6621 add_inf_child_target.
6622 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6623 add_inf_child_target.
6624 * aix-thread.c (aix_thread_target_info): New.
6625 (aix_thread_target) <shortname, longname, doc>: Delete.
6627 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6628 add_inf_child_target.
6629 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6630 add_inf_child_target.
6631 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6632 add_inf_child_target.
6633 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6634 add_inf_child_target.
6635 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6636 add_inf_child_target.
6637 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6638 add_inf_child_target.
6639 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6640 add_inf_child_target.
6641 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6642 add_inf_child_target.
6643 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6644 add_inf_child_target.
6645 * bfd-target.c (target_bfd_target_info): New.
6646 (target_bfd) <shortname, longname, doc>: Delete.
6648 * bsd-kvm.c (bsd_kvm_target_info): New.
6649 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6651 (bsd_kvm_target::open): Rename to ...
6652 (bsd_kvm_target_open): ... this. Adjust.
6653 * bsd-uthread.c (bsd_uthread_target_info): New.
6654 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6656 * corefile.c (core_file_command): Adjust.
6657 * corelow.c (core_target_info): New.
6658 (core_target) <shortname, longname, doc>: Delete.
6660 (core_target::open): Rename to ...
6661 (core_target_open): ... this. Adjust.
6662 * ctf.c (ctf_target_info): New.
6663 (ctf_target) <shortname, longname, doc>: Delete.
6665 (ctf_target::open): Rename to ...
6666 (ctf_target_open): ... this.
6667 (_initialize_ctf): Adjust.
6668 * exec.c (exec_target_info): New.
6669 (exec_target) <shortname, longname, doc>: Delete.
6671 (exec_target::open): Rename to ...
6672 (exec_target_open): ... this.
6673 * gdbcore.h (core_target_open): Declare.
6674 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6675 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6676 add_inf_child_target.
6677 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6678 add_inf_child_target.
6679 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6680 add_inf_child_target.
6681 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6682 add_inf_child_target.
6683 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6684 add_inf_child_target.
6685 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6686 add_inf_child_target.
6687 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6688 add_inf_child_target.
6689 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6690 add_inf_child_target.
6691 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6692 add_inf_child_target.
6693 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6694 add_inf_child_target.
6695 * inf-child.c (inf_child_target_info): New.
6696 (inf_child_target::info): New.
6697 (inf_child_open_target): Remove 'target' parameter. Use
6698 get_native_target instead.
6699 (inf_child_target::open): Delete.
6700 (add_inf_child_target): New.
6701 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6704 (add_inf_child_target): Declare.
6705 (inf_child_open_target): Declare.
6706 * linux-thread-db.c (thread_db_target_info): New.
6707 (thread_db_target) <shortname, longname, doc>: Delete.
6709 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6710 add_inf_child_target.
6711 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6712 add_inf_child_target.
6713 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6714 add_inf_child_target.
6715 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6716 add_inf_child_target.
6717 * make-target-delegates (print_class): Adjust.
6718 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6719 add_inf_child_target.
6720 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6721 add_inf_child_target.
6722 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6723 add_inf_child_target.
6724 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6725 add_inf_child_target.
6726 * nto-procfs.c (nto_native_target_info): New.
6727 (nto_procfs_target_native) <shortname, longname, doc>:
6730 (nto_procfs_target_info): New.
6731 (nto_procfs_target_procfs) <shortname, longname, doc>:
6734 (init_procfs_targets): Adjust.
6735 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6736 add_inf_child_target.
6737 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6738 add_inf_child_target.
6739 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6740 add_inf_child_target.
6741 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6742 add_inf_child_target.
6743 * ravenscar-thread.c (ravenscar_target_info): New.
6744 (ravenscar_thread_target) <shortname, longname, doc>:
6747 * record-btrace.c (record_btrace_target_info):
6748 (record_btrace_target) <shortname, longname, doc>: Delete.
6750 (record_btrace_target::open): Rename to ...
6751 (record_btrace_target_open): ... this. Adjust.
6752 * record-full.c (record_longname, record_doc): New.
6753 (record_full_base_target) <shortname, longname, doc>: Delete.
6755 (record_full_target_info): New.
6756 (record_full_target): <shortname>: Delete.
6758 (record_full_core_open_1, record_full_open_1): Update comments.
6759 (record_full_base_target::open): Rename to ...
6760 (record_full_open): ... this.
6761 (cmd_record_full_restore): Update.
6762 (_initialize_record_full): Update.
6763 * remote-sim.c (remote_sim_target_info): New.
6764 (gdbsim_target) <shortname, longname, doc>: Delete.
6766 (gdbsim_target::open): Rename to ...
6767 (gdbsim_target_open): ... this.
6768 (_initialize_remote_sim): Adjust.
6769 * remote.c (remote_doc): New.
6770 (remote_target_info): New.
6771 (remote_target) <shortname, longname, doc>: Delete.
6773 (extended_remote_target_info): New.
6774 (extended_remote_target) <shortname, longname, doc>: Delete.
6776 (remote_target::open_1): Make static. Adjust.
6777 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6778 * s390-linux-nat.c (_initialize_s390_nat): Use
6779 add_inf_child_target.
6780 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6781 add_inf_child_target.
6782 * sol-thread.c (thread_db_target_info): New.
6783 (sol_thread_target) <shortname, longname, doc>: Delete.
6785 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6786 add_inf_child_target.
6787 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6788 add_inf_child_target.
6789 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6790 add_inf_child_target.
6791 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6792 add_inf_child_target.
6793 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6794 add_inf_child_target.
6795 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6796 add_inf_child_target.
6797 * spu-linux-nat.c (_initialize_spu_nat): Use
6798 add_inf_child_target.
6799 * spu-multiarch.c (spu_multiarch_target_info): New.
6800 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6802 * target-delegates.c: Regenerate.
6803 * target.c: Include <unordered_map>.
6804 (target_ops_p): Delete.
6805 (DEF_VEC_P(target_ops_p)): Delete.
6806 (target_factories): New.
6807 (test_target_info): New.
6808 (test_target_ops::info): New.
6809 (open_target): Adjust to use target_factories.
6810 (add_target_with_completer): Rename to ...
6811 (add_target): ... this. Change prototype. Register target_info
6812 and open callback in target_factories. Register target_info in
6813 command context instead of target_ops.
6814 (add_target): Delete old implementation.
6815 (add_deprecated_target_alias): Change prototype. Adjust.
6816 (the_native_target): New.
6817 (set_native_target, get_native_target): New.
6818 (find_default_run_target): Use the_native_target.
6819 (find_attach_target, find_run_target): Simplify.
6820 (target_ops::open): Delete.
6821 (dummy_target_info): New.
6822 (dummy_target::shortname, dummy_target::longname)
6823 (dummy_target::doc): Delete.
6824 (dummy_target::info): New.
6825 (debug_target::shortname, debug_target::longname)
6826 (debug_target::doc): Delete.
6827 (debug_target::info): New.
6828 * target.h (struct target_info): New.
6829 (target_ops::~target_ops): Add comment.
6830 (target_ops::info): New.
6831 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6832 longer virtual. Implement in terms of target_info.
6833 (set_native_target, get_native_target): Declare.
6834 (target_open_ftype): New.
6835 (add_target, add_target_with_completer)
6836 (add_deprecated_target_alias): Change prototype.
6837 (test_target) <shortname, longname, doc>: Delete.
6839 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6840 add_inf_child_target.
6841 * tracefile-tfile.c (tfile_target_info): New.
6842 (tfile_target) <shortname, longname, doc>: Delete.
6844 (tfile_target::open): Rename to ...
6845 (tfile_target_open): ... this.
6846 (_initialize_tracefile_tfile): Adjust.
6847 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6848 add_inf_child_target.
6849 * windows-nat.c (_initialize_windows_nat): Use
6850 add_inf_child_target.
6851 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6852 add_inf_child_target.
6856 * linux-nat.h (linux_nat_target) <low_new_thread,
6857 low_delete_thread, low_new_fork, low_forget_process,
6858 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6859 New virtual methods.
6860 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6861 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6862 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6863 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6864 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6866 * linux-fork.c (delete_fork): Adjust to call low method.
6867 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6868 (linux_nat_new_fork, linux_nat_forget_process_hook)
6869 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6870 (linux_nat_status_is_event):
6871 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6872 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6874 (sigtrap_is_event): Rename to ...
6875 (linux_nat_target::low_status_is_event): ... this.
6876 (linux_nat_set_status_is_event): Delete.
6877 (save_stop_reason, linux_nat_wait_1)
6878 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6880 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6881 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6882 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6883 (linux_nat_set_prepare_to_resume): Delete.
6884 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6885 low virtual methods.
6886 * amd64-linux-nat.c: Likewise.
6887 * arm-linux-nat.c: Likewise.
6888 * i386-linux-nat.c: Likewise.
6889 * ia64-linux-nat.c: Likewise.
6890 * mips-linux-nat.c: Likewise.
6891 * ppc-linux-nat.c: Likewise.
6892 * s390-linux-nat.c: Likewise.
6893 * sparc64-linux-nat.c: Likewise.
6894 * x86-linux-nat.c: Likewise.
6895 * x86-linux-nat.h: Include "nat/x86-linux.h".
6896 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6897 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6902 * target.h (target_ops)
6903 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6904 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6905 stopped_by_watchpoint, have_continuable_watchpoint,
6906 stopped_data_address, watchpoint_addr_within_range,
6907 can_accel_watchpoint_condition, can_run, thread_alive,
6908 has_all_memory, has_memory, has_stack, has_registers,
6909 has_execution, can_async_p, is_async_p, supports_non_stop,
6910 always_non_stop_p, can_execute_reverse, supports_multi_process,
6911 supports_enable_disable_tracepoint,
6912 supports_disable_randomization, supports_string_tracing,
6913 supports_evaluation_of_breakpoint_conditions,
6914 can_run_breakpoint_commands, filesystem_is_local,
6915 can_download_tracepoint, get_trace_state_variable_value,
6916 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6917 record_is_replaying, record_will_replay,
6918 augmented_libraries_svr4_read>: Adjust to return bool.
6919 * aarch64-linux-nat.c: All implementations adjusted.
6920 * aix-thread.c: All implementations adjusted.
6921 * arm-linux-nat.c: All implementations adjusted.
6922 * breakpoint.c: All implementations adjusted.
6923 * bsd-kvm.c: All implementations adjusted.
6924 * bsd-uthread.c: All implementations adjusted.
6925 * corelow.c: All implementations adjusted.
6926 * ctf.c: All implementations adjusted.
6927 * darwin-nat.c: All implementations adjusted.
6928 * darwin-nat.h: All implementations adjusted.
6929 * exec.c: All implementations adjusted.
6930 * fbsd-nat.c: All implementations adjusted.
6931 * fbsd-nat.h: All implementations adjusted.
6932 * gnu-nat.c: All implementations adjusted.
6933 * gnu-nat.h: All implementations adjusted.
6934 * go32-nat.c: All implementations adjusted.
6935 * ia64-linux-nat.c: All implementations adjusted.
6936 * inf-child.c: All implementations adjusted.
6937 * inf-child.h: All implementations adjusted.
6938 * inf-ptrace.c: All implementations adjusted.
6939 * inf-ptrace.h: All implementations adjusted.
6940 * linux-nat.c: All implementations adjusted.
6941 * linux-nat.h: All implementations adjusted.
6942 * mips-linux-nat.c: All implementations adjusted.
6943 * nto-procfs.c: All implementations adjusted.
6944 * ppc-linux-nat.c: All implementations adjusted.
6945 * procfs.c: All implementations adjusted.
6946 * ravenscar-thread.c: All implementations adjusted.
6947 * record-btrace.c: All implementations adjusted.
6948 * record-full.c: All implementations adjusted.
6949 * remote-sim.c: All implementations adjusted.
6950 * remote.c: All implementations adjusted.
6951 * s390-linux-nat.c: All implementations adjusted.
6952 * sol-thread.c: All implementations adjusted.
6953 * spu-multiarch.c: All implementations adjusted.
6954 * target-delegates.c: All implementations adjusted.
6955 * target.c: All implementations adjusted.
6956 * target.h: All implementations adjusted.
6957 * tracefile-tfile.c: All implementations adjusted.
6958 * tracefile.c: All implementations adjusted.
6959 * tracefile.h: All implementations adjusted.
6960 * windows-nat.c: All implementations adjusted.
6961 * x86-linux-nat.h: All implementations adjusted.
6962 * x86-nat.h: All implementations adjusted.
6966 * make-target-delegates (scan_target_h): Don't trim lines here.
6967 Replace sequences of tabs and/or whitespace with a single
6969 (top level, parsing methods): Trim each line before processing it
6975 * target.h (enum strata) <debug_stratum>: New.
6976 (struct target_ops) <all delegation methods>: Replace by C++
6977 virtual methods, and drop "to_" prefix. All references updated
6979 <to_shortname, to_longname, to_doc, to_data,
6980 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6981 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6982 virtual methods. All references updated throughout.
6983 <can_attach, supports_terminal_ours, can_create_inferior,
6984 get_thread_control_capabilities, attach_no_wait>: New
6986 <insert_breakpoint, remove_breakpoint>: Now
6987 TARGET_DEFAULT_NORETURN methods.
6988 <info_proc>: Now returns bool.
6990 (OPS_MAGIC): Delete.
6991 (current_target): Delete. All references replaced by references
6993 (target_stack): ... this. New.
6994 (target_shortname, target_longname): Adjust.
6995 (target_can_run): Now a function declaration.
6996 (default_child_has_all_memory, default_child_has_memory)
6997 (default_child_has_stack, default_child_has_registers)
6998 (default_child_has_execution): Remove target_ops parameter.
6999 (complete_target_initialization): Delete.
7000 (memory_breakpoint_target): New template class.
7001 (test_target_ops): Refactor as a C++ class with virtual methods.
7002 * make-target-delegates (NAME_PART): Tighten.
7003 (POINTER_PART, CP_SYMBOL): New.
7004 (SIMPLE_RETURN_PART): Reimplement.
7005 (VEC_RETURN_PART): Expect less.
7006 (RETURN_PART, VIRTUAL_PART): New.
7007 (METHOD): Adjust to C++ virtual methods.
7008 (scan_target_h): Remove reference to C99.
7009 (dname): Output "target_ops::" prefix.
7010 (write_function_header): Adjust to output a C++ class method.
7011 (write_declaration): New.
7012 (write_delegator): Adjust to output a C++ class method.
7013 (tdname): Output "dummy_target::" prefix.
7014 (write_tdefault, write_debugmethod): Adjust to output a C++ class
7016 (tdefault_names, debug_names): Delete.
7017 (return_types, tdefaults, styles, argtypes_array): New.
7018 (top level): All methods are delegators.
7020 (top level): Print dummy_target and debug_target classes.
7021 * target-delegates.c: Regenerate.
7022 * target-debug.h (target_debug_print_enum_info_proc_what)
7023 (target_debug_print_thread_control_capabilities)
7024 (target_debug_print_thread_info_p): New.
7025 * target.c (dummy_target): Delete.
7026 (the_dummy_target, the_debug_target): New.
7027 (target_stack): Now extern.
7028 (set_targetdebug): Push/unpush debug target.
7029 (default_child_has_all_memory, default_child_has_memory)
7030 (default_child_has_stack, default_child_has_registers)
7031 (default_child_has_execution): Remove target_ops parameter.
7032 (complete_target_initialization): Delete.
7033 (add_target_with_completer): No longer call
7034 complete_target_initialization.
7035 (target_supports_terminal_ours): Use regular delegation.
7036 (update_current_target): Delete.
7037 (push_target): No longer check magic number. Don't call
7038 update_current_target.
7039 (unpush_target): Don't call update_current_target.
7040 (target_is_pushed): No longer check magic number.
7041 (target_require_runnable): Skip for all stratums over
7043 (target_ops::info_proc): New.
7044 (target_info_proc): Use find_target_at and
7045 find_default_run_target.
7046 (target_supports_disable_randomization): Use regular delegation.
7047 (target_get_osdata): Use find_target_at.
7048 (target_ops::open, target_ops::close, target_ops::can_attach)
7049 (target_ops::attach, target_ops::can_create_inferior)
7050 (target_ops::create_inferior, target_ops::can_run)
7051 (target_can_run): New.
7052 (default_fileio_target): Use regular delegation.
7053 (target_ops::fileio_open, target_ops::fileio_pwrite)
7054 (target_ops::fileio_pread, target_ops::fileio_fstat)
7055 (target_ops::fileio_close, target_ops::fileio_unlink)
7056 (target_ops::fileio_readlink): New.
7057 (target_fileio_open_1, target_fileio_unlink)
7058 (target_fileio_readlink): Always call the target method. Handle
7060 (return_zero, return_zero_has_execution): Delete.
7061 (init_dummy_target): Delete.
7062 (dummy_target::dummy_target, dummy_target::shortname)
7063 (dummy_target::longname, dummy_target::doc)
7064 (debug_target::debug_target, debug_target::shortname)
7065 (debug_target::longname, debug_target::doc): New.
7066 (target_supports_delete_record): Use regular delegation.
7067 (setup_target_debug): Delete.
7068 (maintenance_print_target_stack): Skip debug_stratum.
7069 (initialize_targets): Instantiate the_dummy_target and
7071 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7073 (target_auxv_search, fprint_target_auxv): Adjust.
7074 (info_auxv_command): Adjust to use target_stack.
7075 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7076 * exceptions.c (print_flush): Handle a NULL target_stack.
7077 * regcache.c (target_ops_no_register): Refactor as class with
7080 * exec.c (exec_target): New class.
7081 (exec_ops): Now an exec_target.
7082 (exec_open, exec_close_1, exec_get_section_table)
7083 (exec_xfer_partial, exec_files_info, exec_has_memory)
7084 (exec_make_note_section): Refactor as exec_target methods.
7085 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7087 (exec_target::find_memory_regions): New.
7088 (_initialize_exec): Don't call init_exec_ops.
7089 * gdbcore.h (exec_file_clear): Delete.
7091 * corefile.c (core_target): Delete.
7092 (core_file_command): Adjust.
7093 * corelow.c (core_target): New class.
7094 (the_core_target): New.
7095 (core_close): Remove target_ops parameter.
7096 (core_close_cleanup): Adjust.
7097 (core_target::close): New.
7098 (core_open, core_detach, get_core_registers, core_files_info)
7099 (core_xfer_partial, core_thread_alive, core_read_description)
7100 (core_pid_to_str, core_thread_name, core_has_memory)
7101 (core_has_stack, core_has_registers, core_info_proc): Rework as
7102 core_target methods.
7103 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7104 (_initialize_corelow): Initialize the_core_target.
7105 * gdbcore.h (core_target): Delete.
7106 (the_core_target): New.
7108 * ctf.c: (ctf_target): New class.
7109 (ctf_ops): Now a ctf_target.
7110 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7111 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7112 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7114 (init_ctf_ops): Delete.
7115 (_initialize_ctf): Don't call it.
7116 * tracefile-tfile.c (tfile_target): New class.
7117 (tfile_ops): Now a tfile_target.
7118 (tfile_open, tfile_close, tfile_files_info)
7119 (tfile_get_tracepoint_status, tfile_trace_find)
7120 (tfile_fetch_registers, tfile_xfer_partial)
7121 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7122 Refactor as tfile_target methods.
7123 (tfile_xfer_partial_features): Remove target_ops parameter.
7124 (init_tfile_ops): Delete.
7125 (_initialize_tracefile_tfile): Don't call it.
7126 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7127 (tracefile_has_stack, tracefile_has_registers)
7128 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7129 tracefile_target methods.
7130 (init_tracefile_ops): Delete.
7131 (tracefile_target::tracefile_target): New.
7132 * tracefile.h: Include "target.h".
7133 (tracefile_target): New class.
7134 (init_tracefile_ops): Delete.
7136 * spu-multiarch.c (spu_multiarch_target): New class.
7137 (spu_ops): Now a spu_multiarch_target.
7138 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7139 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7140 (spu_search_memory, spu_mourn_inferior): Refactor as
7141 spu_multiarch_target methods.
7142 (init_spu_ops): Delete.
7143 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7144 complete_target_initialization.
7146 * ravenscar-thread.c (ravenscar_thread_target): New class.
7147 (ravenscar_ops): Now a ravenscar_thread_target.
7148 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7149 (ravenscar_thread_alive, ravenscar_pid_to_str)
7150 (ravenscar_fetch_registers, ravenscar_store_registers)
7151 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7152 (ravenscar_stopped_by_hw_breakpoint)
7153 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7154 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7155 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7157 (init_ravenscar_thread_ops): Delete.
7158 (_initialize_ravenscar): Remove references to
7159 init_ravenscar_thread_ops and complete_target_initialization.
7161 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7162 (bsd_uthread_target): New class.
7163 (bsd_uthread_ops): Now a bsd_uthread_target.
7164 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7165 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7166 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7167 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7168 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7169 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7170 (bsd_uthread_target): Delete function.
7171 (_initialize_bsd_uthread): Remove reference to
7172 complete_target_initialization.
7174 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7175 (target_bfd): ... this new class.
7176 (target_bfd_xfer_partial, target_bfd_get_section_table)
7177 (target_bfd_close): Refactor as target_bfd methods.
7178 (target_bfd::~target_bfd): New.
7179 (target_bfd_reopen): Adjust.
7180 (target_bfd::close): New.
7182 * record-btrace.c (record_btrace_target): New class.
7183 (record_btrace_ops): Now a record_btrace_target.
7184 (record_btrace_open, record_btrace_stop_recording)
7185 (record_btrace_disconnect, record_btrace_close)
7186 (record_btrace_async, record_btrace_info)
7187 (record_btrace_insn_history, record_btrace_insn_history_range)
7188 (record_btrace_insn_history_from, record_btrace_call_history)
7189 (record_btrace_call_history_range)
7190 (record_btrace_call_history_from, record_btrace_record_method)
7191 (record_btrace_is_replaying, record_btrace_will_replay)
7192 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7193 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7194 (record_btrace_store_registers, record_btrace_prepare_to_store)
7195 (record_btrace_to_get_unwinder)
7196 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7197 (record_btrace_commit_resume, record_btrace_wait)
7198 (record_btrace_stop, record_btrace_can_execute_reverse)
7199 (record_btrace_stopped_by_sw_breakpoint)
7200 (record_btrace_supports_stopped_by_sw_breakpoint)
7201 (record_btrace_stopped_by_hw_breakpoint)
7202 (record_btrace_supports_stopped_by_hw_breakpoint)
7203 (record_btrace_update_thread_list, record_btrace_thread_alive)
7204 (record_btrace_goto_begin, record_btrace_goto_end)
7205 (record_btrace_goto, record_btrace_stop_replaying_all)
7206 (record_btrace_execution_direction)
7207 (record_btrace_prepare_to_generate_core)
7208 (record_btrace_done_generating_core): Refactor as
7209 record_btrace_target methods.
7210 (init_record_btrace_ops): Delete.
7211 (_initialize_record_btrace): Remove reference to
7212 init_record_btrace_ops.
7213 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7214 the execution_direction global.
7215 (record_full_base_target, record_full_target)
7216 (record_full_core_target): New classes.
7217 (record_full_ops): Now a record_full_target.
7218 (record_full_core_ops): Now a record_full_core_target.
7219 (record_full_target::detach, record_full_target::disconnect)
7220 (record_full_core_target::disconnect)
7221 (record_full_target::mourn_inferior, record_full_target::kill):
7223 (record_full_open, record_full_close, record_full_async): Refactor
7224 as methods of the record_full_base_target class.
7225 (record_full_resume, record_full_commit_resume): Refactor
7226 as methods of the record_full_target class.
7227 (record_full_wait, record_full_stopped_by_watchpoint)
7228 (record_full_stopped_data_address)
7229 (record_full_stopped_by_sw_breakpoint)
7230 (record_full_supports_stopped_by_sw_breakpoint)
7231 (record_full_stopped_by_hw_breakpoint)
7232 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7233 methods of the record_full_base_target class.
7234 (record_full_store_registers, record_full_xfer_partial)
7235 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7236 Refactor as methods of the record_full_target class.
7237 (record_full_can_execute_reverse, record_full_get_bookmark)
7238 (record_full_goto_bookmark, record_full_execution_direction)
7239 (record_full_record_method, record_full_info, record_full_delete)
7240 (record_full_is_replaying, record_full_will_replay)
7241 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7242 (record_full_stop_replaying): Refactor as methods of the
7243 record_full_base_target class.
7244 (record_full_core_resume, record_full_core_kill)
7245 (record_full_core_fetch_registers)
7246 (record_full_core_prepare_to_store)
7247 (record_full_core_store_registers, record_full_core_xfer_partial)
7248 (record_full_core_insert_breakpoint)
7249 (record_full_core_remove_breakpoint)
7250 (record_full_core_has_execution): Refactor
7251 as methods of the record_full_core_target class.
7252 (record_full_base_target::supports_delete_record): New.
7253 (init_record_full_ops): Delete.
7254 (init_record_full_core_ops): Delete.
7255 (record_full_save): Refactor as method of the
7256 record_full_base_target class.
7257 (_initialize_record_full): Remove references to
7258 init_record_full_ops and init_record_full_core_ops.
7260 * remote.c (remote_target, extended_remote_target): New classes.
7261 (remote_ops): Now a remote_target.
7262 (extended_remote_ops): Now an extended_remote_target.
7263 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7264 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7265 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7266 (remote_pass_signals, remote_set_syscall_catchpoint)
7267 (remote_program_signals, )
7268 (remote_thread_always_alive): Remove target_ops parameter.
7269 (remote_thread_alive, remote_thread_name)
7270 (remote_update_thread_list, remote_threads_extra_info)
7271 (remote_static_tracepoint_marker_at)
7272 (remote_static_tracepoint_markers_by_strid)
7273 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7274 (remote_open): Refactor as methods of remote_target.
7275 (extended_remote_open, extended_remote_detach)
7276 (extended_remote_attach, extended_remote_post_attach):
7277 (extended_remote_supports_disable_randomization)
7278 (extended_remote_create_inferior): : Refactor as method of
7279 extended_remote_target.
7280 (remote_set_permissions, remote_open_1, remote_detach)
7281 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7282 (remote_resume, remote_commit_resume, remote_stop)
7283 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7284 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7285 (remote_prepare_to_store, remote_store_registers)
7286 (remote_flash_erase, remote_flash_done, remote_files_info)
7287 (remote_kill, remote_mourn, remote_insert_breakpoint)
7288 (remote_remove_breakpoint, remote_insert_watchpoint)
7289 (remote_watchpoint_addr_within_range)
7290 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7291 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7292 (remote_supports_stopped_by_sw_breakpoint)
7293 (remote_stopped_by_hw_breakpoint)
7294 (remote_supports_stopped_by_hw_breakpoint)
7295 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7296 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7297 (remote_verify_memory): Refactor as methods of remote_target.
7298 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7300 (remote_xfer_partial, remote_get_memory_xfer_limit)
7301 (remote_search_memory, remote_rcmd, remote_memory_map)
7302 (remote_pid_to_str, remote_get_thread_local_address)
7303 (remote_get_tib_address, remote_read_description): Refactor as
7304 methods of remote_target.
7305 (remote_target::fileio_open, remote_target::fileio_pwrite)
7306 (remote_target::fileio_pread, remote_target::fileio_close): New.
7307 (remote_hostio_readlink, remote_hostio_fstat)
7308 (remote_filesystem_is_local, remote_can_execute_reverse)
7309 (remote_supports_non_stop, remote_supports_disable_randomization)
7310 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7311 (remote_supports_enable_disable_tracepoint)
7312 (remote_supports_string_tracing)
7313 (remote_can_run_breakpoint_commands, remote_trace_init)
7314 (remote_download_tracepoint, remote_can_download_tracepoint)
7315 (remote_download_trace_state_variable, remote_enable_tracepoint)
7316 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7317 (remote_trace_start, remote_get_trace_status)
7318 (remote_get_tracepoint_status, remote_trace_stop)
7319 (remote_trace_find, remote_get_trace_state_variable_value)
7320 (remote_save_trace_data, remote_get_raw_trace_data)
7321 (remote_set_disconnected_tracing, remote_core_of_thread)
7322 (remote_set_circular_trace_buffer, remote_traceframe_info)
7323 (remote_get_min_fast_tracepoint_insn_len)
7324 (remote_set_trace_buffer_size, remote_set_trace_notes)
7325 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7326 (remote_disable_btrace, remote_teardown_btrace)
7327 (remote_read_btrace, remote_btrace_conf)
7328 (remote_augmented_libraries_svr4_read, remote_load)
7329 (remote_pid_to_exec_file, remote_can_do_single_step)
7330 (remote_execution_direction, remote_thread_handle_to_thread_info):
7331 Refactor as methods of remote_target.
7332 (init_remote_ops, init_extended_remote_ops): Delete.
7333 (remote_can_async_p, remote_is_async_p, remote_async)
7334 (remote_thread_events, remote_upload_tracepoints)
7335 (remote_upload_trace_state_variables): Refactor as methods of
7337 (_initialize_remote): Remove references to init_remote_ops and
7338 init_extended_remote_ops.
7340 * remote-sim.c (gdbsim_target): New class.
7341 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7342 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7343 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7344 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7345 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7346 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7347 Refactor as methods of gdbsim_target.
7348 (gdbsim_ops): Now a gdbsim_target.
7349 (init_gdbsim_ops): Delete.
7350 (gdbsim_cntrl_c): Adjust.
7351 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7353 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7354 (the_amd64_linux_nat_target): New.
7355 (amd64_linux_fetch_inferior_registers)
7356 (amd64_linux_store_inferior_registers): Refactor as methods of
7357 amd64_linux_nat_target.
7358 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7359 * i386-linux-nat.c: Don't include "linux-nat.h".
7360 (i386_linux_nat_target): New class.
7361 (the_i386_linux_nat_target): New.
7362 (i386_linux_fetch_inferior_registers)
7363 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7364 as methods of i386_linux_nat_target.
7365 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7366 * inf-child.c (inf_child_ops): Delete.
7367 (inf_child_fetch_inferior_registers)
7368 (inf_child_store_inferior_registers): Delete.
7369 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7370 methods of inf_child_target.
7371 (inf_child_target::supports_terminal_ours)
7372 (inf_child_target::terminal_init)
7373 (inf_child_target::terminal_inferior)
7374 (inf_child_target::terminal_ours_for_output)
7375 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7376 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7378 (inf_child_open, inf_child_disconnect, inf_child_close)
7379 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7380 (inf_child_post_startup_inferior, inf_child_can_run)
7381 (inf_child_pid_to_exec_file): Refactor as methods of
7383 (inf_child_follow_fork): Delete.
7384 (inf_child_target::can_create_inferior)
7385 (inf_child_target::can_attach): New.
7386 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7387 (inf_child_target::has_stack, inf_child_target::has_registers)
7388 (inf_child_target::has_execution): New.
7389 (inf_child_fileio_open, inf_child_fileio_pwrite)
7390 (inf_child_fileio_pread, inf_child_fileio_fstat)
7391 (inf_child_fileio_close, inf_child_fileio_unlink)
7392 (inf_child_fileio_readlink, inf_child_use_agent)
7393 (inf_child_can_use_agent): Refactor as methods of
7395 (return_zero, inf_child_target): Delete.
7396 (inf_child_target::inf_child_target): New.
7397 * inf-child.h: Include "target.h".
7398 (inf_child_target): Delete function prototype.
7399 (inf_child_target): New class.
7400 (inf_child_open_target, inf_child_mourn_inferior)
7401 (inf_child_maybe_unpush_target): Delete.
7402 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7403 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7404 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7405 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7406 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7407 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7408 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7409 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7410 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7411 methods of inf_ptrace_target.
7412 (inf_ptrace_target): Delete function.
7413 * inf-ptrace.h: Include "inf-child.h".
7414 (inf_ptrace_target): Delete function declaration.
7415 (inf_ptrace_target): New class.
7416 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7417 * linux-nat.c (linux_target): New.
7418 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7419 (linux_nat_target::~linux_nat_target): New.
7420 (linux_child_post_attach, linux_child_post_startup_inferior)
7421 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7422 (linux_child_remove_fork_catchpoint)
7423 (linux_child_insert_vfork_catchpoint)
7424 (linux_child_remove_vfork_catchpoint)
7425 (linux_child_insert_exec_catchpoint)
7426 (linux_child_remove_exec_catchpoint)
7427 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7428 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7429 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7430 (linux_nat_stopped_data_address)
7431 (linux_nat_stopped_by_sw_breakpoint)
7432 (linux_nat_supports_stopped_by_sw_breakpoint)
7433 (linux_nat_stopped_by_hw_breakpoint)
7434 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7435 (linux_nat_kill, linux_nat_mourn_inferior)
7436 (linux_nat_xfer_partial, linux_nat_thread_alive)
7437 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7438 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7439 (linux_child_static_tracepoint_markers_by_strid)
7440 (linux_nat_is_async_p, linux_nat_can_async_p)
7441 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7442 (linux_nat_supports_multi_process)
7443 (linux_nat_supports_disable_randomization, linux_nat_async)
7444 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7445 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7446 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7447 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7448 methods of linux_nat_target.
7449 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7450 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7452 (check_stopped_by_watchpoint): Adjust.
7453 (linux_xfer_partial): Delete.
7454 (linux_target_install_ops, linux_target, linux_nat_add_target):
7456 (linux_nat_target::linux_nat_target): New.
7457 * linux-nat.h: Include "inf-ptrace.h".
7458 (linux_nat_target): New.
7459 (linux_target, linux_target_install_ops, linux_nat_add_target):
7460 Delete function declarations.
7461 (linux_target): Declare global.
7462 * linux-thread-db.c (thread_db_target): New.
7463 (thread_db_target::thread_db_target): New.
7464 (thread_db_ops): Delete.
7465 (the_thread_db_target): New.
7466 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7467 (thread_db_update_thread_list, thread_db_pid_to_str)
7468 (thread_db_extra_thread_info)
7469 (thread_db_thread_handle_to_thread_info)
7470 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7471 (thread_db_resume): Refactor as methods of thread_db_target.
7472 (init_thread_db_ops): Delete.
7473 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7474 * x86-linux-nat.c: Don't include "linux-nat.h".
7475 (super_post_startup_inferior): Delete.
7476 (x86_linux_nat_target::~x86_linux_nat_target): New.
7477 (x86_linux_child_post_startup_inferior)
7478 (x86_linux_read_description, x86_linux_enable_btrace)
7479 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7480 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7481 methods of x86_linux_nat_target.
7482 (x86_linux_create_target): Delete. Bits folded ...
7483 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7485 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7486 (x86_linux_nat_target): New class.
7487 (x86_linux_create_target): Delete.
7488 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7489 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7490 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7491 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7492 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7493 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7495 (x86_use_watchpoints): Delete.
7496 * x86-nat.h: Include "breakpoint.h" and "target.h".
7497 (x86_use_watchpoints): Delete.
7498 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7499 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7500 (x86_insert_watchpoint, x86_remove_watchpoint)
7501 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7502 (x86_stopped_by_hw_breakpoint): New declarations.
7503 (x86_nat_target): New template class.
7505 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7506 (the_ppc_linux_nat_target): New.
7507 (ppc_linux_fetch_inferior_registers)
7508 (ppc_linux_can_use_hw_breakpoint)
7509 (ppc_linux_region_ok_for_hw_watchpoint)
7510 (ppc_linux_ranged_break_num_registers)
7511 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7512 (ppc_linux_insert_mask_watchpoint)
7513 (ppc_linux_remove_mask_watchpoint)
7514 (ppc_linux_can_accel_watchpoint_condition)
7515 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7516 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7517 (ppc_linux_watchpoint_addr_within_range)
7518 (ppc_linux_masked_watch_num_registers)
7519 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7520 (ppc_linux_read_description): Refactor as methods of
7521 ppc_linux_nat_target.
7522 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7524 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7525 (procfs_target): New class.
7526 (the_procfs_target): New.
7527 (procfs_target): Delete function.
7528 (procfs_auxv_parse, procfs_attach, procfs_detach)
7529 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7530 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7531 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7532 (procfs_create_inferior, procfs_update_thread_list)
7533 (procfs_thread_alive, procfs_pid_to_str)
7534 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7535 (procfs_stopped_data_address, procfs_insert_watchpoint)
7536 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7537 (proc_find_memory_regions, procfs_info_proc)
7538 (procfs_make_note_section): Refactor as methods of procfs_target.
7539 (_initialize_procfs): Adjust.
7540 * sol-thread.c (sol_thread_target): New class.
7541 (sol_thread_ops): Now a sol_thread_target.
7542 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7543 (sol_thread_fetch_registers, sol_thread_store_registers)
7544 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7545 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7546 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7547 (init_sol_thread_ops): Delete.
7548 (_initialize_sol_thread): Adjust. Remove references to
7549 init_sol_thread_ops and complete_target_initialization.
7551 * windows-nat.c (windows_nat_target): New class.
7552 (windows_fetch_inferior_registers)
7553 (windows_store_inferior_registers, windows_resume, windows_wait)
7554 (windows_attach, windows_detach, windows_pid_to_exec_file)
7555 (windows_files_info, windows_create_inferior)
7556 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7557 (windows_close, windows_pid_to_str, windows_xfer_partial)
7558 (windows_get_tib_address, windows_get_ada_task_ptid)
7559 (windows_thread_name, windows_thread_alive): Refactor as
7560 windows_nat_target methods.
7561 (do_initial_windows_stuff): Adjust.
7562 (windows_target): Delete function.
7563 (_initialize_windows_nat): Adjust.
7565 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7566 (darwin_mourn_inferior, darwin_kill_inferior)
7567 (darwin_create_inferior, darwin_attach, darwin_detach)
7568 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7569 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7570 (darwin_supports_multi_process): Refactor as darwin_nat_target
7572 (darwin_resume_to, darwin_files_info): Delete.
7573 (_initialize_darwin_inferior): Rename to ...
7574 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7575 * darwin-nat.h: Include "inf-child.h".
7576 (darwin_nat_target): New class.
7577 (darwin_complete_target): Delete.
7578 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7579 (darwin_target): New.
7580 (i386_darwin_fetch_inferior_registers)
7581 (i386_darwin_store_inferior_registers): Refactor as methods of
7583 (darwin_complete_target): Delete, with ...
7584 (_initialize_i386_darwin_nat): ... bits factored out here.
7586 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7587 (the_alpha_linux_nat_target): New.
7588 (alpha_linux_register_u_offset): Refactor as
7589 alpha_linux_nat_target method.
7590 (_initialize_alpha_linux_nat): Adjust.
7591 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7592 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7593 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7594 methods of linux_nat_trad_target.
7595 (linux_trad_target): Delete.
7596 * linux-nat-trad.h (linux_trad_target): Delete function.
7597 (linux_nat_trad_target): New class.
7598 * mips-linux-nat.c (mips_linux_nat_target): New class.
7599 (super_fetch_registers, super_store_registers, super_close):
7601 (the_mips_linux_nat_target): New.
7602 (mips64_linux_regsets_fetch_registers)
7603 (mips64_linux_regsets_store_registers)
7604 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7605 (mips_linux_register_u_offset, mips_linux_read_description)
7606 (mips_linux_can_use_hw_breakpoint)
7607 (mips_linux_stopped_by_watchpoint)
7608 (mips_linux_stopped_data_address)
7609 (mips_linux_region_ok_for_hw_watchpoint)
7610 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7611 (mips_linux_close): Refactor as methods of mips_linux_nat.
7612 (_initialize_mips_linux_nat): Adjust to C++ification.
7614 * aix-thread.c (aix_thread_target): New class.
7615 (aix_thread_ops): Now an aix_thread_target.
7616 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7617 (aix_thread_fetch_registers, aix_thread_store_registers)
7618 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7619 (aix_thread_thread_alive, aix_thread_pid_to_str)
7620 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7621 Refactor as methods of aix_thread_target.
7622 (init_aix_thread_ops): Delete.
7623 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7624 and complete_target_initialization.
7625 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7626 (rs6000_nat_target): New class.
7627 (the_rs6000_nat_target): New.
7628 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7629 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7630 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7631 (super_create_inferior): Delete.
7632 (_initialize_rs6000_nat): Adjust to C++ification.
7634 * arm-linux-nat.c (arm_linux_nat_target): New class.
7635 (the_arm_linux_nat_target): New.
7636 (arm_linux_fetch_inferior_registers)
7637 (arm_linux_store_inferior_registers, arm_linux_read_description)
7638 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7639 (arm_linux_remove_hw_breakpoint)
7640 (arm_linux_region_ok_for_hw_watchpoint)
7641 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7642 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7643 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7644 arm_linux_nat_target.
7645 (_initialize_arm_linux_nat): Adjust to C++ification.
7647 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7648 (the_aarch64_linux_nat_target): New.
7649 (aarch64_linux_fetch_inferior_registers)
7650 (aarch64_linux_store_inferior_registers)
7651 (aarch64_linux_child_post_startup_inferior)
7652 (aarch64_linux_read_description)
7653 (aarch64_linux_can_use_hw_breakpoint)
7654 (aarch64_linux_insert_hw_breakpoint)
7655 (aarch64_linux_remove_hw_breakpoint)
7656 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7657 (aarch64_linux_region_ok_for_hw_watchpoint)
7658 (aarch64_linux_stopped_data_address)
7659 (aarch64_linux_stopped_by_watchpoint)
7660 (aarch64_linux_watchpoint_addr_within_range)
7661 (aarch64_linux_can_do_single_step): Refactor as methods of
7662 aarch64_linux_nat_target.
7663 (super_post_startup_inferior): Delete.
7664 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7666 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7667 (the_hppa_linux_nat_target): New.
7668 (hppa_linux_fetch_inferior_registers)
7669 (hppa_linux_store_inferior_registers): Refactor as methods of
7670 hppa_linux_nat_target.
7671 (_initialize_hppa_linux_nat): Adjust to C++ification.
7673 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7674 (the_ia64_linux_nat_target): New.
7675 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7676 (ia64_linux_stopped_data_address)
7677 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7678 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7679 ia64_linux_nat_target methods.
7680 (super_xfer_partial): Delete.
7681 (_initialize_ia64_linux_nat): Adjust to C++ification.
7683 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7684 (the_m32r_linux_nat_target): New.
7685 (m32r_linux_fetch_inferior_registers)
7686 (m32r_linux_store_inferior_registers): Refactor as
7687 m32r_linux_nat_target methods.
7688 (_initialize_m32r_linux_nat): Adjust to C++ification.
7690 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7691 (the_m68k_linux_nat_target): New.
7692 (m68k_linux_fetch_inferior_registers)
7693 (m68k_linux_store_inferior_registers): Refactor as
7694 m68k_linux_nat_target methods.
7695 (_initialize_m68k_linux_nat): Adjust to C++ification.
7697 * s390-linux-nat.c (s390_linux_nat_target): New class.
7698 (the_s390_linux_nat_target): New.
7699 (s390_linux_fetch_inferior_registers)
7700 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7701 (s390_insert_watchpoint, s390_remove_watchpoint)
7702 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7703 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7704 (s390_auxv_parse, s390_read_description): Refactor as methods of
7705 s390_linux_nat_target.
7706 (_initialize_s390_nat): Adjust to C++ification.
7708 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7709 (the_sparc_linux_nat_target): New.
7710 (_initialize_sparc_linux_nat): Adjust to C++ification.
7711 * sparc-nat.c (sparc_fetch_inferior_registers)
7712 (sparc_store_inferior_registers): Remove target_ops parameter.
7713 * sparc-nat.h (sparc_fetch_inferior_registers)
7714 (sparc_store_inferior_registers): Remove target_ops parameter.
7715 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7716 (the_sparc64_linux_nat_target): New.
7717 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7719 * spu-linux-nat.c (spu_linux_nat_target): New class.
7720 (the_spu_linux_nat_target): New.
7721 (spu_child_post_startup_inferior, spu_child_post_attach)
7722 (spu_child_wait, spu_fetch_inferior_registers)
7723 (spu_store_inferior_registers, spu_xfer_partial)
7724 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7726 (_initialize_spu_nat): Adjust to C++ification.
7728 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7729 (the_tilegx_linux_nat_target): New.
7730 (fetch_inferior_registers, store_inferior_registers):
7731 Refactor as methods.
7732 (_initialize_tile_linux_nat): Adjust to C++ification.
7734 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7735 (the_xtensa_linux_nat_target): New.
7736 (xtensa_linux_fetch_inferior_registers)
7737 (xtensa_linux_store_inferior_registers): Refactor as
7738 xtensa_linux_nat_target methods.
7739 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7741 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7742 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7743 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7744 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7745 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7746 (fbsd_stopped_by_sw_breakpoint)
7747 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7748 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7749 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7750 (fbsd_post_startup_inferior, fbsd_post_attach)
7751 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7752 (fbsd_set_syscall_catchpoint)
7753 (super_xfer_partial, super_resume, super_wait)
7754 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7755 (fbsd_handle_debug_trap): Remove target_ops parameter.
7756 (fbsd_nat_add_target): Delete.
7757 * fbsd-nat.h: Include "inf-ptrace.h".
7758 (fbsd_nat_add_target): Delete.
7759 (USE_SIGTRAP_SIGINFO): Define.
7760 (fbsd_nat_target): New class.
7762 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7763 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7764 (amd64bsd_target): Delete.
7765 * amd64-bsd-nat.h: New file.
7766 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7768 (amd64_fbsd_nat_target): New class.
7769 (the_amd64_fbsd_nat_target): New.
7770 (amd64fbsd_read_description): Refactor as method of
7771 amd64_fbsd_nat_target.
7772 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7773 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7774 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7775 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7776 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7777 (i386bsd_target): Delete.
7778 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7779 (i386bsd_fetch_inferior_registers)
7780 (i386bsd_store_inferior_registers): Declare.
7781 (i386_bsd_nat_target): New class.
7782 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7783 (the_i386_fbsd_nat_target): New.
7784 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7785 i386_fbsd_nat_target methods.
7786 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7787 (_initialize_i386fbsd_nat): Adjust to C++ification.
7788 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7789 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7790 (_initialize_x86_bsd_nat): Adjust to C++ification.
7791 * x86-bsd-nat.h: Include "x86-nat.h".
7792 (x86bsd_target): Delete declaration.
7793 (x86bsd_nat_target): New class.
7795 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7796 (the_aarch64_fbsd_nat_target): New.
7797 (aarch64_fbsd_fetch_inferior_registers)
7798 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7799 aarch64_fbsd_nat_target.
7800 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7801 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7802 (the_alpha_bsd_nat_target): New.
7803 (alphabsd_fetch_inferior_registers)
7804 (alphabsd_store_inferior_registers): Refactor as
7805 alpha_bsd_nat_target methods.
7806 (_initialize_alphabsd_nat): Refactor as methods of
7807 alpha_bsd_nat_target.
7808 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7809 (the_amd64_nbsd_nat_target): New.
7810 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7811 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7812 (the_amd64_obsd_nat_target): New.
7813 (_initialize_amd64obsd_nat): Adjust to C++ification.
7814 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7815 (the_arm_fbsd_nat_target): New.
7816 (arm_fbsd_fetch_inferior_registers)
7817 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7818 (_initialize_arm_fbsd_nat): Refactor as methods of
7819 arm_fbsd_nat_target.
7820 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7821 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7822 (the_arm_netbsd_nat_target): New.
7823 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7824 arm_netbsd_nat_target.
7825 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7826 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7827 (the_hppa_nbsd_nat_target): New.
7828 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7829 hppa_nbsd_nat_target methods.
7830 (_initialize_hppanbsd_nat): Adjust to C++ification.
7831 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7832 (the_hppa_obsd_nat_target): New.
7833 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7834 methods of hppa_obsd_nat_target.
7835 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7837 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7838 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7840 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7841 (_initialize_i386obsd_nat): Use add_target.
7842 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7843 (the_m68k_bsd_nat_target): New.
7844 (m68kbsd_fetch_inferior_registers)
7845 (m68kbsd_store_inferior_registers): Refactor as methods of
7846 m68k_bsd_nat_target.
7847 (_initialize_m68kbsd_nat): Adjust to C++ification.
7848 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7849 (the_mips_fbsd_nat_target): New.
7850 (mips_fbsd_fetch_inferior_registers)
7851 (mips_fbsd_store_inferior_registers): Refactor as methods of
7852 mips_fbsd_nat_target.
7853 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7855 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7856 (the_mips_nbsd_nat_target): New.
7857 (mipsnbsd_fetch_inferior_registers)
7858 (mipsnbsd_store_inferior_registers): Refactor as methods of
7859 mips_nbsd_nat_target.
7860 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7861 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7862 (the_mips64_obsd_nat_target): New.
7863 (mips64obsd_fetch_inferior_registers)
7864 (mips64obsd_store_inferior_registers): Refactor as methods of
7865 mips64_obsd_nat_target.
7866 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7868 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7870 * nbsd-nat.h: Include "inf-ptrace.h".
7871 (nbsd_nat_target): New class.
7872 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7873 (obsd_wait): Refactor as methods of obsd_nat_target.
7874 (obsd_add_target): Delete.
7875 * obsd-nat.h: Include "inf-ptrace.h".
7876 (obsd_nat_target): New class.
7877 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7878 (the_ppc_fbsd_nat_target): New.
7879 (ppcfbsd_fetch_inferior_registers)
7880 (ppcfbsd_store_inferior_registers): Refactor as methods of
7881 ppc_fbsd_nat_target.
7882 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7884 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7885 (the_ppc_nbsd_nat_target): New.
7886 (ppcnbsd_fetch_inferior_registers)
7887 (ppcnbsd_store_inferior_registers): Refactor as methods of
7888 ppc_nbsd_nat_target.
7889 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7890 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7891 (the_ppc_obsd_nat_target): New.
7892 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7893 methods of ppc_obsd_nat_target.
7894 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7896 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7897 (the_sh_nbsd_nat_target): New.
7898 (shnbsd_fetch_inferior_registers)
7899 (shnbsd_store_inferior_registers): Refactor as methods of
7901 (_initialize_shnbsd_nat): Adjust to C++ification.
7902 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7903 (inf_ptrace_xfer_partial): Delete.
7904 (sparc_xfer_partial, sparc_target): Delete.
7905 * sparc-nat.h (sparc_fetch_inferior_registers)
7906 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7907 (sparc_target): Delete function declaration.
7908 (sparc_target): New template class.
7909 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7910 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7911 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7912 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7914 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7915 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7916 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7917 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7919 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7920 (the_vax_bsd_nat_target): New.
7921 (vaxbsd_fetch_inferior_registers)
7922 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7924 (_initialize_vaxbsd_nat): Adjust to C++ification.
7926 * bsd-kvm.c (bsd_kvm_target): New class.
7927 (bsd_kvm_ops): Now a bsd_kvm_target.
7928 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7929 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7930 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7932 (bsd_kvm_return_one): Delete.
7933 (bsd_kvm_add_target): Adjust to C++ification.
7935 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7936 (nto_procfs_target_procfs): New classes.
7937 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7938 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7939 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7940 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7941 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7942 (procfs_remove_hw_breakpoint, procfs_resume)
7943 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7944 (procfs_kill_inferior, procfs_store_registers)
7945 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7946 as methods of nto_procfs_target.
7947 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7948 (nto_native_ops): Delete.
7949 (procfs_open, procfs_native_open): Delete.
7950 (nto_native_ops): Now an nto_procfs_target_native.
7951 (init_procfs_targets): Adjust to C++ification.
7952 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7953 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7954 Refactor as methods of nto_procfs_target.
7956 * go32-nat.c (go32_nat_target): New class.
7957 (the_go32_nat_target): New.
7958 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7959 (go32_store_registers, go32_xfer_partial, go32_files_info)
7960 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7961 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7962 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7963 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7964 (go32_target): Delete.
7965 (_initialize_go32_nat): Adjust to C++ification.
7967 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7968 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7969 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7970 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7972 (gnu_target): Delete.
7973 * gnu-nat.h (gnu_target): Delete.
7974 (gnu_nat_target): New class.
7975 * i386-gnu-nat.c (gnu_base_target): New.
7976 (i386_gnu_nat_target): New class.
7977 (the_i386_gnu_nat_target): New.
7978 (_initialize_i386gnu_nat): Adjust to C++ification.
7982 * bfd-target.c (target_bfd_xclose): Rename to ...
7983 (target_bfd_close): ... this.
7984 (target_bfd_reopen): Adjust.
7985 * target.c (target_close): Remove references to to_xclose.
7986 * target.h (target_ops::to_xclose): Delete.
7987 (target_ops::to_close): Update comments.
7991 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7993 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7994 * inf-ptrace.c (inf_ptrace_register_u_offset)
7995 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7996 (inf_ptrace_store_register, inf_ptrace_store_registers)
7997 (inf_ptrace_trad_target): Move to ...
7998 * linux-nat-trad.c: ... this new file.
7999 * linux-nat-trad.h: New file.
8000 * linux-nat.c (linux_target_install_ops): Make extern.
8001 (linux_trad_target): Delete.
8002 * linux-nat.h (linux_trad_target): Delete declaration.
8003 (linux_target_install_ops): Declare.
8004 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8009 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8010 procfs_target/add_target here.
8011 * procfs.c (procfs_target): Make static.
8012 (_initialize_procfs): Call add_target here.
8013 * procfs.h (struct target_ops): Remove forward declaration.
8014 (procfs_target): Remove declaration.
8015 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8019 * procfs.c (procfs_stopped_by_watchpoint)
8020 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8021 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8023 (procfs_use_watchpoints): Delete, move contents...
8024 (procfs_target): ... here.
8025 * procfs.h (procfs_use_watchpoints): Delete declaration.
8026 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8027 procfs_use_watchpoints.
8028 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8029 procfs_use_watchpoints.
8034 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8035 and var_zuinteger_unlimited.
8036 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8037 and PARAM_ZUINTEGER_UNLIMITED.
8038 (set_parameter_value): Handle var_zuinteger and
8039 var_zuinteger_unlimited.
8040 (add_setshow_generic): Likewise.
8041 (parmpy_init): Likewise.
8046 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8047 pointer is not null before dereferencing it.
8051 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8056 * breakpoint.c (mention): Remove use of is_mi_like_p.
8057 (print_mention_ranged_breakpoint): Likewise.
8058 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8063 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8067 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8068 (info_spu_event_command): Remove some uses of is_mi_like_p.
8072 * python/py-framefilter.c (py_print_single_arg)
8073 (enumerate_locals, py_print_args, py_print_frame): Remove some
8074 uses of is_mi_like_p.
8079 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8080 * ui-out.h (ui_out::is_mi_like_p): Now const.
8081 (ui_out::do_is_mi_like_p): Now const.
8082 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8086 * varobj.c (varobj_set_visualizer): Use new_reference.
8087 * python/python.c (gdbpy_decode_line): Use new_reference.
8088 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8093 * varobj.c (install_new_value): Use new_reference.
8094 * value.h (value_incref): Return void. Swap intro comment with
8096 * value.c (set_value_parent): Use new_reference.
8097 (value_incref): Return void. Update intro comment.
8098 (release_value): Use new_reference.
8099 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8103 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8104 * gdb_bfd.h (new_bfd_ref): Remove.
8105 (gdb_bfd_open): Update comment.
8106 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8107 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8108 (gdb_bfd_fdopenr): Use new_reference.
8109 * exec.c (exec_file_attach): Use new_reference.
8113 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8118 * jit.c (jit_read_code_entry): Use type_align.
8119 * i386-tdep.c (i386_gdbarch_init): Don't call
8120 set_gdbarch_long_long_align_bit.
8121 * gdbarch.sh: Remove long_long_align_bit.
8122 * gdbarch.c, gdbarch.h: Rebuild.
8123 * arc-tdep.c (arc_type_align): New function.
8124 (arc_gdbarch_init): Use arc_type_align. Don't call
8125 set_gdbarch_long_long_align_bit.
8129 * rust-lang.c (rust_type_alignment): Remove.
8130 (rust_composite_type): Use type_align.
8134 * NEWS: Mention Type.align.
8135 * python/py-type.c (typy_get_alignof): New function.
8136 (type_object_getset): Add "alignof".
8142 * std-operator.def (UNOP_ALIGNOF): New operator.
8143 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8145 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8146 * c-lang.c (c_op_print_tab): Add alignof.
8147 * c-exp.y (ALIGNOF): New token.
8148 (exp): Add "ALIGNOF" production.
8149 (ident_tokens): Add _Alignof and alignof.
8153 * i386-tdep.c (i386_type_align): New function.
8154 (i386_gdbarch_init): Update.
8155 * gdbarch.sh (type_align): New method.
8156 * gdbarch.c, gdbarch.h: Rebuild.
8157 * arch-utils.h (default_type_align): Declare.
8158 * arch-utils.c (default_type_align): New function.
8159 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8160 (struct type) <align_log2>: New field.
8161 <instance_flags>: Now a bitfield.
8162 (TYPE_RAW_ALIGN): New macro.
8163 (type_align, type_raw_align, set_type_align): Declare.
8164 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8166 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8167 (get_alignment, maybe_set_alignment): New functions.
8168 (read_structure_type, read_enumeration_type, read_array_type)
8169 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8170 (read_subrange_type, read_base_type): Set type alignment.
8174 * dwarf2read.c (read_index_from_section): Use bool.
8179 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8185 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8186 last step, and do it atomically.
8190 * compile/compile-c-types.c (convert_int, convert_float):
8196 * rust-lang.c (rust_inclusive_range_type_p): New function.
8197 (rust_range): Handle inclusive ranges.
8198 (rust_compute_range): Likewise.
8199 * rust-exp.y (struct rust_op) <inclusive>: New field.
8200 (DOTDOTEQ): New constant.
8201 (range_expr): Add "..=" productions.
8202 (operator_tokens): Add "..=" token.
8203 (ast_range): Add "inclusive" parameter.
8204 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8206 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8208 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8209 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8211 * expprint.c (print_subexp_standard): Handle new bounds values.
8212 (dump_subexp_body_standard): Likewise.
8216 * configure: Rebuild.
8217 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8218 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8220 (class symbol_needs_eval_context): Likewise.
8221 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8222 (mock_mapped_index::symbol_name_at): Use "override". Remove
8224 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8226 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8227 * aarch64-tdep.c (instruction_reader::read): Use "override".
8228 (instruction_reader_test::read): Likewise.
8229 * arm-tdep.c (instruction_reader::read): Use "override".
8230 (instruction_reader_thumb::read): Likewise.
8235 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8236 instead of remote_send.
8237 (remote_send): Remove.
8241 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8242 find_function_start_sal instead of find_pc_line.
8246 * breakpoint.c (set_breakpoint_location_function): Handle
8248 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8249 * elfread.c (elf_symtab_read): Give data symbols with
8250 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8251 (elf_rel_plt_read): Update comment.
8252 * linespec.c (convert_linespec_to_sals): Handle
8254 (minsym_found): Handle mst_data_gnu_ifunc.
8255 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8256 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8257 * parse.c (find_minsym_type_and_address): Handle
8259 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8260 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8261 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8263 <mst_data_gnu_ifunc>: New enumerator.
8267 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8268 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8269 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8271 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8272 (lookup_minimal_symbol_by_pc): Adjust.
8273 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8274 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8275 * minsyms.h (lookup_msym_prefer): New enum.
8276 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8277 parameter by a lookup_msym_prefer parameter.
8281 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8282 ends in "@plt" instead of looking at the symbol's section.
8286 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8288 (find_pc_partial_function_gnu_ifunc): Rename to ...
8289 (find_pc_partial_function): ... this, and remove references to
8291 (find_pc_partial_function): Delete old implementation.
8292 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8296 * linespec.c (struct bound_minimal_symbol_search_key): New.
8297 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8298 skip first line if we found a GNU ifunc minimal symbol by name.
8299 (compare_msymbols): Change parameters to work with a destructured
8301 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8306 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8307 ifunc targets here. Instead, if we have an ifunc minsym, use its
8309 (add_location_to_breakpoint): Store the minsym and the objfile in
8310 the breakpoint location.
8311 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8312 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8313 Record the minsym in the sal.
8314 * symtab.h (symtab_and_line) <msymbol>: New field.
8318 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8319 unless we actually resolved the ifunc.
8323 * c-exp.y (variable production): Prefer ifunc minsyms over
8324 regular function symbols.
8325 * symtab.c (find_gnu_ifunc): New function.
8326 * minsyms.h (lookup_msym_prefer): New enum.
8327 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8328 parameter by a lookup_msym_prefer parameter.
8329 * symtab.h (find_gnu_ifunc): New declaration.
8333 * blockframe.c (find_gnu_ifunc_target_type): New function.
8334 (find_function_type): New.
8335 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8336 return a value with a memory address.
8337 (eval_call): For calls to GNU ifunc functions, try to find the
8338 type of the target function from the type that the resolver
8340 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8342 * infcall.c (find_function_return_type): Delete.
8343 (find_function_addr): Add 'function_type' parameter. For calls to
8344 GNU ifunc functions, try to find the type of the target function
8345 from the type that the resolver returns, and return it via
8347 (call_function_by_hand_dummy): Adjust to use the function type
8348 returned by find_function_addr.
8349 (find_function_addr): Add 'function_type' parameter and move
8351 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8356 * c-exp.y (variable production): Skip finding an alias for ifunc
8361 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8365 * infcmd.c (kill_command): Print the pid as string, not the whole
8366 thread's ptid. Add comment. s/has been killed/killed/ in output
8368 * remote.c (remote_detach_1): Print the pid as string, not the
8369 whole thread's ptid.
8375 * infcmd.c (kill_command): Print message when inferior has
8377 * inferior.c (print_inferior_events): Remove 'static'. Set as
8379 (add_inferior): Improve message printed when
8380 'print_inferior_events' is on.
8381 (exit_inferior): Remove message printed when
8382 'print_inferior_events' is on.
8383 (detach_inferior): Improve message printed when
8384 'print_inferior_events' is on.
8385 (initialize_inferiors): Use 'add_inferior_silent' to set
8386 'current_inferior_'.
8387 * inferior.h (print_inferior_events): Declare here as
8389 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8390 '[Detaching...]' messages when 'print_inferior_events' is on.
8391 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8392 as prefix/suffix for messages. Remove periods. Fix erroneous
8393 'Detaching after fork from child...', replace it by '... from
8395 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8396 prefix/suffix when printing 'Detaching...' messages. Print
8397 them when 'print_inferior_events' is on.
8398 * remote.c (remote_detach_1): Print message when detaching
8399 from inferior and '!is_fork_parent'.
8403 * cli-out.h: Reindent.
8407 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8408 (cli_ui_out::do_field_string): Use fputs_filtered.
8409 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8413 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8414 gdb::unique_xmalloc_ptr.
8418 * configure: Rebuild.
8423 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8424 prepare_for_testing. Set normal_bp to r_debug_state if target
8430 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8431 * remote.c (extended_remote_attach): In all-stop mode, mark the
8432 thread as executing.
8436 * thread.c (thread_apply_all_command): Fix comment.
8437 (thread_command): Fix comment.
8441 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8443 * features/aarch64-core.c (create_feature_aarch64_core):
8445 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8447 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8449 * features/i386/32bit-avx512.c
8450 (create_feature_i386_32bit_avx512): Likewise.
8451 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8453 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8455 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8457 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8459 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8461 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8463 * features/i386/64bit-avx512.c
8464 (create_feature_i386_64bit_avx512): Likewise.
8465 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8467 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8469 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8471 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8473 * features/i386/64bit-segments.c
8474 (create_feature_i386_64bit_segments): Likewise.
8475 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8477 * features/i386/x32-core.c
8478 (create_feature_i386_x32_core): Likewise.
8479 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8480 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8481 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8482 * target-descriptions.c: In generated code, don't pass xml
8487 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8488 (print_xml_feature::visit_post): Likewise.
8489 (print_xml_feature::visit): Likewise.
8490 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8491 (print_xml_feature): Add new class.
8492 * regformats/regdat.sh: Null xmltarget on feature targets.
8493 * target-descriptions.c (struct target_desc): Add xmltarget.
8494 (maintenance_check_tdesc_xml_convert): Add unittest function.
8495 (tdesc_get_features_xml): Add function to get xml.
8496 (maintenance_check_xml_descriptions): Test xml generation.
8497 * xml-tdesc.c (string_read_description_xml): Add function.
8498 * xml-tdesc.h (string_read_description_xml): Add declaration.
8502 * features/Makefile: Add feature marker to targets with new style
8503 target descriptions.
8504 * regformats/aarch64.dat: Regenerate.
8505 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8506 * regformats/i386/amd64-avx-linux.dat: Likewise.
8507 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8508 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8509 * regformats/i386/amd64-linux.dat: Likewise.
8510 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8511 * regformats/i386/amd64.dat: Likewise.
8512 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8513 * regformats/i386/i386-avx-linux.dat: Likewise.
8514 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8515 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8516 * regformats/i386/i386-linux.dat: Likewise.
8517 * regformats/i386/i386-mmx-linux.dat: Likewise.
8518 * regformats/i386/i386-mpx-linux.dat: Likewise.
8519 * regformats/i386/i386.dat: Likewise.
8520 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8521 * regformats/i386/x32-avx-linux.dat: Likewise.
8522 * regformats/i386/x32-linux.dat: Likewise.
8523 * regformats/tic6x-c62x-linux.dat: Likewise.
8524 * regformats/tic6x-c64x-linux.dat: Likewise.
8525 * regformats/tic6x-c64xp-linux.dat: Likewise.
8526 * regformats/regdat.sh: Parse feature marker.
8530 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8531 (tdesc_osabi_name): Likewise.
8532 * target-descriptions.c (tdesc_architecture_name): Add new
8534 (tdesc_osabi_name): Likewise.
8538 * common/tdesc.c (tdesc_predefined_type): Move to here.
8539 (tdesc_named_type): Likewise.
8540 (tdesc_create_vector): Likewise.
8541 (tdesc_create_struct): Likewise.
8542 (tdesc_set_struct_size): Likewise.
8543 (tdesc_create_union): Likewise.
8544 (tdesc_create_flags): Likewise.
8545 (tdesc_create_enum): Likewise.
8546 (tdesc_add_field): Likewise.
8547 (tdesc_add_typed_bitfield): Likewise.
8548 (tdesc_add_bitfield): Likewise.
8549 (tdesc_add_flag): Likewise.
8550 (tdesc_add_enum_value): Likewise.
8551 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8552 (struct tdesc_type_vector): Likewise.
8553 (struct tdesc_type_field): Likewise.
8554 (struct tdesc_type_with_fields): Likewise.
8555 (tdesc_create_enum): Add declaration.
8556 (tdesc_add_typed_bitfield): Likewise.
8557 (tdesc_add_enum_value): Likewise.
8558 * target-descriptions.c (tdesc_type_field): Move from here.
8559 (tdesc_type_builtin): Likewise.
8560 (tdesc_type_vector): Likewise.
8561 (tdesc_type_with_fields): Likewise.
8562 (tdesc_predefined_types): Likewise.
8563 (tdesc_named_type): Likewise.
8564 (tdesc_create_vector): Likewise.
8565 (tdesc_create_struct): Likewise.
8566 (tdesc_set_struct_size): Likewise.
8567 (tdesc_create_union): Likewise.
8568 (tdesc_create_flags): Likewise.
8569 (tdesc_create_enum): Likewise.
8570 (tdesc_add_field): Likewise.
8571 (tdesc_add_typed_bitfield): Likewise.
8572 (tdesc_add_bitfield): Likewise.
8573 (tdesc_add_flag): Likewise.
8574 (tdesc_add_enum_value): Likewise.
8575 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8576 (tdesc_add_typed_bitfield): Likewise.
8577 (tdesc_add_enum_value): Likewise.
8581 * common/tdesc.c (tdesc_feature::accept): Move to here.
8582 (tdesc_feature::operator==): Likewise.
8583 (tdesc_create_reg): Likewise.
8584 * common/tdesc.h (tdesc_type_kind): Likewise.
8585 (struct tdesc_type): Likewise.
8586 (struct tdesc_feature): Likewise.
8587 * regformats/regdat.sh: Create a feature.
8588 * target-descriptions.c (tdesc_type_kind): Move from here.
8589 (tdesc_type): Likewise.
8590 (tdesc_type_up): Likewise.
8591 (tdesc_feature): Likewise.
8592 (tdesc_create_reg): Likewise.
8596 * Makefile.in: Add arch/tdesc.c
8597 * common/tdesc.c: New file.
8598 * common/tdesc.h (tdesc_element_visitor): Move to here.
8599 (tdesc_element): Likewise.
8600 (tdesc_reg): Likewise.
8601 (tdesc_reg_up): Likewise.
8602 * regformats/regdef.h (reg): Add offset to constructors.
8603 * target-descriptions.c (tdesc_element_visitor): Move from here.
8604 (tdesc_element): Likewise.
8605 (tdesc_reg): Likewise.
8606 (tdesc_reg_up): Likewise.
8610 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8615 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8619 * symtab.c (print_symbol_info): Skip printing filename and line
8620 number when `last' is NULL.
8621 (symtab_symbol_info): Use empty string instead of NULL for first
8622 invocation of print_symbol_info.
8623 (rbreak_command): Pass NULL to `last' parameter of
8628 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8633 * MAINTAINERS (sh): Remove.
8634 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8635 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8636 (ALLDEPFILES): Remove sh64-tdep.c.
8637 * NEWS: Mentions that support for SH-5/SH64 is removed.
8638 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8639 (sh*-*-openbsd*): Ditto.
8640 (sh64-*-elf*): Remove.
8642 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8643 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8644 * sh-tdep.c: No longer include "sh64-tdep.h".
8645 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8646 * sh64-tdep.c, sh64-tdep.h: Remove files.
8650 * MAINTAINERS: Remove m88k.
8651 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8652 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8653 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8654 * NEWS: Mention that support for m88k was removed.
8655 * configure.host (m88*-*-*): Remove support.
8656 * configure.nat (m88k-*-*): Remove support.
8657 * configure.tgt (m88*-*-openbsd*): Remove.
8658 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8662 * configure.tgt (x86_tobjs): New variable.
8663 (amd64_tobjs, i386_tobjs): Use it.
8667 * symtab.c (print_symbol_info): Precede the symbol definition by
8668 the line number when available.
8669 * NEWS: Advertise this enhancement.
8673 * NEWS (New options): announce set/show record btrace cpu.
8674 * btrace.c: Include record-btrace.h.
8675 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8676 the vendor is unknown.
8677 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8678 Maybe overwrite the btrace configuration's cpu.
8679 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8680 (btrace_fetch): Add cpu parameter. Update callers.
8681 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8682 Maybe overwrite the btrace configuration's cpu. Skip enabling
8683 errata workarounds if the vendor is unknown.
8684 * python/py-record-btrace.c: Include record-btrace.h.
8685 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8686 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8687 * record-btrace.c (record_btrace_cpu_state_kind): New.
8688 (record_btrace_cpu): New.
8689 (set_record_btrace_cpu_cmdlist): New.
8690 (record_btrace_get_cpu): New.
8691 (require_btrace_thread, record_btrace_info)
8692 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8693 (cmd_set_record_btrace_cpu_none): New.
8694 (cmd_set_record_btrace_cpu_auto): New.
8695 (cmd_set_record_btrace_cpu): New.
8696 (cmd_show_record_btrace_cpu): New.
8697 (_initialize_record_btrace): Initialize set/show record btrace cpu
8699 * record-btrace.h (record_btrace_get_cpu): New.
8703 * record.c (set_record_command): Fix typo in message.
8707 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8711 * infrun.c (process_event_stop_test): Call
8712 gdbarch_in_indirect_branch_thunk.
8713 * gdbarch.sh (in_indirect_branch_thunk): New.
8714 * gdbarch.c: Regenerated.
8715 * gdbarch.h: Regenerated.
8718 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8719 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8720 (ALLDEPFILES): Add x86-tdep.c.
8721 * arch-utils.h (default_in_indirect_branch_thunk): New.
8722 * arch-utils.c (default_in_indirect_branch_thunk): New.
8723 * i386-tdep: Include x86-tdep.h.
8724 (i386_in_indirect_branch_thunk): New.
8725 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8727 * amd64-tdep: Include x86-tdep.h.
8728 (amd64_in_indirect_branch_thunk): New.
8729 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8734 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8735 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8736 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8741 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8742 (rust_evaluate_subexp): Likewise.
8746 * procfs.c (procfs_detach): Make forward declaration's prototype
8747 match definition's protototype.
8748 (proc_get_LDT_entry): Remove stale do_cleanups call.
8752 * target.h (target_ops::to_has_exited): Delete.
8753 (target_has_exited): Delete.
8754 * target-delegates.c: Regenerate.
8758 * target.c (fileio_fh_t::t): Add comment.
8759 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8760 (target_fileio_close): Handle a NULL target.
8761 (invalidate_fileio_fh): New.
8762 (target_close): Call it.
8763 * remote.c (remote_hostio_send_command): No longer check whether
8764 remote_desc is open.
8768 * target.c (fileio_fh_t): Make it a named struct instead of a
8770 (fileio_fh_t::is_closed): New method.
8771 (DEF_VEC_O (fileio_fh_t)): Remove.
8772 (fileio_fhandles): Now a std::vector.
8773 (is_closed_fileio_fh): Delete.
8774 (acquire_fileio_fd): Adjust. Rename parameters.
8775 (release_fileio_fd): Adjust.
8776 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8777 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8778 (target_fileio_close): Adjust.
8782 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8787 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8788 (scoped_finish_thread_state): New class.
8789 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8791 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8792 (fetch_inferior_event, normal_stop): Likewise.
8793 * thread.c (finish_thread_state_cleanup): Delete.
8798 * value.c: Include "selftest.h" and "common/array-view.h".
8799 (struct range) <operator ==>: New.
8800 (test_ranges_contain): New.
8801 (check_ranges_vector): New.
8802 (test_insert_into_bit_range_vector): New.
8803 (_initialize_values): Register selftests.
8804 * common/array-view.h (operator==, operator!=): New.
8808 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8810 * inline-frame.c: Include <algorithm>.
8811 (struct inline_state): Add constructor.
8812 (inline_state_s): Remove.
8813 (DEF_VEC_O(inline_state_s)): Remove.
8814 (inline_states): Change type to std::vector.
8815 (find_inline_frame_state): Adjust to std::vector.
8816 (allocate_inline_frame_state): Remove.
8817 (clear_inline_frame_state): Adjust to std::vector.
8818 (skip_inline_frames): Adjust to std::vector.
8822 * tracepoint.h (struct trace_state_variable): Add constructor.
8823 <name>: Change type to std::string.
8824 * tracepoint.c (tsv_s): Remove.
8825 (DEF_VEC_O(tsv_s)): Remove.
8826 (tvariables): Change to std::vector.
8827 (create_trace_state_variable): Adjust to std::vector.
8828 (find_trace_state_variable): Likewise.
8829 (find_trace_state_variable_by_number): Likewise.
8830 (delete_trace_state_variable): Likewise.
8831 (trace_variable_command): Adjust to std::string.
8832 (delete_trace_variable_command): Likewise.
8833 (tvariables_info_1): Adjust to std::vector.
8834 (save_trace_state_variables): Likewise.
8835 (start_tracing): Likewise.
8836 (merge_uploaded_trace_state_variables): Adjust to std::vector
8838 * target.h (struct target_ops)
8839 <to_download_trace_state_variable>: Pass reference to
8840 trace_state_variable.
8841 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8842 * target-delegates.c: Re-generate.
8843 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8844 (mi_tsv_deleted): Likewise.
8845 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8846 * remote.c (remote_download_trace_state_variable): Change
8847 pointer to reference and adjust.
8848 * make-target-delegates (parse_argtypes): Handle references.
8849 (write_function_header): Likewise.
8850 (munge_type): Likewise.
8854 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8855 string_view-selftests.c.
8856 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8858 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8859 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8860 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8861 * unittests/basic_string_view/element_access/char/1.cc:
8863 * unittests/basic_string_view/element_access/char/empty.cc:
8865 * unittests/basic_string_view/element_access/char/front_back.cc:
8867 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8868 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8870 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8872 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8874 * unittests/basic_string_view/operations/compare/char/1.cc:
8876 * unittests/basic_string_view/operations/compare/char/13650.cc:
8878 * unittests/basic_string_view/operations/copy/char/1.cc:
8880 * unittests/basic_string_view/operations/data/char/1.cc:
8882 * unittests/basic_string_view/operations/find/char/1.cc:
8884 * unittests/basic_string_view/operations/find/char/2.cc:
8886 * unittests/basic_string_view/operations/find/char/3.cc:
8888 * unittests/basic_string_view/operations/find/char/4.cc:
8890 * unittests/basic_string_view/operations/rfind/char/1.cc:
8892 * unittests/basic_string_view/operations/rfind/char/2.cc:
8894 * unittests/basic_string_view/operations/rfind/char/3.cc:
8896 * unittests/basic_string_view/operations/substr/char/1.cc:
8898 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8899 * unittests/string_view-selftests.c: New file.
8903 * unittests/basic_string_view/capacity/1.cc: New file.
8904 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8905 * unittests/basic_string_view/cons/char/1.cc: New file.
8906 * unittests/basic_string_view/cons/char/2.cc: New file.
8907 * unittests/basic_string_view/cons/char/3.cc: New file.
8908 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8909 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8910 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8911 * unittests/basic_string_view/element_access/char/1.cc: New file.
8912 * unittests/basic_string_view/element_access/char/2.cc: New file.
8913 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8914 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8915 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8916 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8917 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8918 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8919 * unittests/basic_string_view/include.cc: New file.
8920 * unittests/basic_string_view/inserters/char/1.cc: New file.
8921 * unittests/basic_string_view/inserters/char/2.cc: New file.
8922 * unittests/basic_string_view/inserters/char/3.cc: New file.
8923 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8924 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8925 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8926 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8927 * unittests/basic_string_view/literals/types.cc: New file.
8928 * unittests/basic_string_view/literals/values.cc: New file.
8929 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8930 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8931 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8932 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8933 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8934 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8935 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8936 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8937 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8938 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8939 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8940 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8941 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8942 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8943 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8944 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8945 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8946 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8947 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8948 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8949 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8950 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8951 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8952 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8953 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8954 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8955 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8956 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8957 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8958 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8959 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8960 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8961 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8962 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8963 * unittests/basic_string_view/operators/char/2.cc: New file.
8964 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8965 * unittests/basic_string_view/range_access/char/1.cc: New file.
8966 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8967 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8968 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8969 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8970 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8971 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8972 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8973 * unittests/basic_string_view/typedefs.cc: New file.
8974 * unittests/basic_string_view/types/1.cc: New file.
8978 * common/gdb_string_view.h: Remove libstdc++ implementation
8979 details, adjust to gdb reality.
8980 * common/gdb_string_view.tcc: Likewise.
8981 * cli/cli-script.c (struct string_view): Remove.
8982 (user_args) <m_args>: Change element type to gdb::string_view.
8983 (user_args::insert_args): Adjust.
8987 * common/gdb_string_view.h: New file.
8988 * common/gdb_string_view.tcc: New file.
8992 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8993 * configure: Re-generate.
8997 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8998 (set_target_gdbarch): Call
8999 gdb::observers::architecture_changed.notify instead of
9000 observer_notify_architecture_changed.
9004 * tracepoint.c (struct current_traceframe_cleanup): Remove.
9005 (do_restore_current_traceframe_cleanup): Remove.
9006 (restore_current_traceframe_cleanup_dtor): Remove.
9007 (make_cleanup_restore_current_traceframe): Remove.
9008 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9010 * tracepoint.h (struct scoped_restore_current_traceframe): New.
9011 * infrun.c (fetch_inferior_event): Use
9012 scoped_restore_current_traceframe.
9016 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9018 <n_allocated_type_units>: Remove.
9019 <all_type_units>: Change to std::vector.
9020 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9021 to std::vector change.
9022 (dwarf2_per_objfile::get_cutu): Likewise.
9023 (dwarf2_per_objfile::get_tu): Likewise.
9024 (create_signatured_type_table_from_index): Likewise.
9025 (create_signatured_type_table_from_debug_names): Likewise.
9026 (dw2_symtab_iter_next): Likewise.
9027 (dw2_print_stats): Likewise.
9028 (dw2_expand_all_symtabs): Likewise.
9029 (dw2_expand_marked_cus): Likewise.
9030 (dw2_debug_names_iterator::next): Likewise.
9031 (dwarf2_initialize_objfile): Likewise.
9032 (add_signatured_type_cu_to_table): Likewise.
9033 (create_all_type_units): Likewise.
9034 (add_type_unit): Likewise.
9035 (struct tu_abbrev_offset): Add constructor.
9036 (build_type_psymtabs_1): Adjust to std::vector change.
9037 (print_tu_stats): Likewise.
9038 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9039 (write_debug_names): Likewise.
9043 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9044 Make an std::vector.
9045 <n_comp_units>: Remove.
9046 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9047 to std::vector change.
9048 (dwarf2_per_objfile::get_cutu): Likewise.
9049 (dwarf2_per_objfile::get_cu): Likewise.
9050 (create_cus_from_index): Likewise.
9051 (create_addrmap_from_index): Likewise.
9052 (create_addrmap_from_aranges): Likewise.
9053 (dwarf2_read_index): Likewise.
9054 (dw2_find_last_source_symtab): Likewise.
9055 (dw2_map_symtabs_matching_filename): Likewise.
9056 (dw2_symtab_iter_next): Likewise.
9057 (dw2_print_stats): Likewise.
9058 (dw2_expand_all_symtabs): Likewise.
9059 (dw2_expand_symtabs_with_fullname): Likewise.
9060 (dw2_expand_marked_cus): Likewise.
9061 (dw2_map_symbol_filenames): Likewise.
9062 (create_cus_from_debug_names): Likewise.
9063 (dwarf2_read_debug_names): Likewise.
9064 (dw2_debug_names_iterator::next): Likewise.
9065 (dwarf2_initialize_objfile): Likewise.
9066 (set_partial_user): Likewise.
9067 (dwarf2_build_psymtabs_hard): Likewise.
9068 (read_comp_units_from_section): Remove arguments, adjust to
9070 (create_all_comp_units): Adjust to std::vector and
9071 read_comp_units_from_section changes.
9072 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9074 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9075 (psyms_seen_size): Likewise.
9076 (write_gdbindex): Likewise.
9077 (write_debug_names): Likewise.
9081 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9082 with dwarf2_per_objfile.
9083 (create_cus_from_index): Likewise.
9084 (create_signatured_type_table_from_index): Likewise.
9085 (dwarf2_read_index): Likewise.
9086 (dwarf2_initialize_objfile): Likewise.
9087 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9088 per_cu rather than get_dwarf2_per_objfile.
9092 * dwarf2read.h (struct signatured_type): Forward declare.
9093 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9095 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9096 (dw2_get_cutu): ...this.
9097 (dwarf2_per_objfile::get_cu): Rename from...
9098 (dw2_get_cu): ...this.
9099 (dwarf2_per_objfile::get_tu): New.
9100 (create_addrmap_from_index): Adjust.
9101 (create_addrmap_from_aranges): Adjust.
9102 (dw2_find_last_source_symtab): Adjust.
9103 (dw2_map_symtabs_matching_filename): Adjust.
9104 (dw2_symtab_iter_next): Adjust.
9105 (dw2_print_stats): Adjust.
9106 (dw2_expand_all_symtabs): Adjust.
9107 (dw2_expand_symtabs_with_fullname): Adjust.
9108 (dw2_expand_marked_cus): Adjust.
9109 (dw_expand_symtabs_matching_file_matcher): Adjust.
9110 (dw2_map_symbol_filenames): Adjust.
9111 (dw2_debug_names_iterator::next): Adjust.
9112 (dwarf2_initialize_objfile): Adjust.
9113 (set_partial_user): Adjust.
9114 (dwarf2_build_psymtabs_hard): Adjust.
9118 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9119 Remove unused variables.
9120 (dw2_map_symtabs_matching_filename): Likewise.
9121 (dwarf2_record_block_ranges): Likewise.
9122 (dwarf2_read_addr_index): Likewise.
9123 (follow_die_offset): Likewise.
9127 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9128 to symbol_file_add_main.
9133 * mi/mi-console.c (do_fputc_async_safe): New.
9134 (mi_console_file::write_async_safe): New.
9135 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9136 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9138 * ui-file.c (ui_file::putstrn): Adjust call to
9139 fputstrn_unfiltered.
9140 * utils.c (printchar): Replace do_fputs and do_fprintf
9141 parameters by do_fputc.
9142 (fputstr_filtered): Adjust call to printchar.
9143 (fputstr_unfiltered): Likewise.
9144 (fputstrn_filtered): Likewise.
9145 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9147 * utils.h (do_fputc_ftype): New typedef.
9148 (fputstrn_unfiltered): Add do_fputc parameter.
9152 * regformats/i386/i386-avx.dat: Remove.
9157 * amd64-tdep.c (amd64_none_init_abi): New function.
9158 (amd64_x32_none_init_abi): New function.
9159 (_initialize_amd64_tdep): Register handlers for x86-64 and
9160 x64_32 with GDB_OSABI_NONE.
9161 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9162 GDB_OSABI_NONE osabi.
9167 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9169 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9170 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9174 * common/byte-vector.h (char_vector): New type.
9175 * target.h (target_read_alloc): Return
9176 gdb::optional<byte_vector>.
9177 (target_read_stralloc): Return gdb::optional<char_vector>.
9178 (target_get_osdata): Return gdb::optional<char_vector>.
9179 * target.c (target_read_alloc_1): Templatize. Replacement
9180 manual memory management with vector.
9181 (target_read_alloc): Change return type, adjust.
9182 (target_read_stralloc): Change return type, adjust.
9183 (target_get_osdata): Change return type, adjust.
9184 * auxv.c (struct auxv_info) <length>: Remove.
9185 <data>: Change type to gdb::optional<byte_vector>.
9186 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9187 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9188 (target_auxv_search): Adjust.
9189 (fprint_target_auxv): Adjust.
9190 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9191 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9192 (linux_make_corefile_notes): Adjust.
9193 * osdata.c (get_osdata): Adjust.
9194 * remote.c (remote_get_threads_with_qxfer): Adjust.
9195 (remote_memory_map): Adjust.
9196 (remote_traceframe_info): Adjust.
9197 (btrace_read_config): Adjust.
9198 (remote_read_btrace): Adjust.
9199 (remote_pid_to_exec_file): Adjust.
9200 * solib-aix.c (solib_aix_get_library_list): Adjust.
9201 * solib-dsbt.c (decode_loadmap): Don't free buf.
9202 (dsbt_get_initial_loadmaps): Adjust.
9203 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9204 * solib-target.c (solib_target_current_sos): Adjust.
9205 * tracepoint.c (sdata_make_value): Adjust.
9206 * xml-support.c (xinclude_start_include): Adjust.
9207 (xml_fetch_content_from_file): Adjust.
9208 * xml-support.h (xml_fetch_another): Change return type.
9209 (xml_fetch_content_from_file): Change return type.
9210 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9211 * xml-tdesc.c (file_read_description_xml): Adjust.
9212 (fetch_available_features_from_target): Change return type.
9213 (target_fetch_description_xml): Adjust.
9214 (target_read_description_xml): Adjust.
9218 * value.c (~value): Update.
9219 (struct value) <contents>: Now unique_xmalloc_ptr.
9220 (value_contents_bits_eq, allocate_value_contents)
9221 (value_contents_raw, value_contents_all_raw)
9222 (value_contents_for_printing, value_contents_for_printing_const)
9223 (set_value_enclosing_type): Update.
9227 * value.c (range_s): Remove typedef, VEC.
9228 (struct range): Add operator<.
9229 (range_lessthan): Remove.
9230 (ranges_contain): Change type.
9232 (struct value) <unavailable, optimized_out>: Now std::vector.
9233 (value_entirely_available)
9234 (value_entirely_covered_by_range_vector)
9235 (value_entirely_unavailable, value_entirely_optimized_out):
9237 (insert_into_bit_range_vector): Change argument type.
9238 (find_first_range_overlap): Likewise.
9239 (struct ranges_and_idx, value_contents_bits_eq)
9240 (require_not_optimized_out, require_available): Update.
9241 (ranges_copy_adjusted): Change argument types.
9242 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9246 * value.c (~value): Update.
9247 (struct value) <parent>: Now a value_ref_ptr.
9248 (value_parent, set_value_parent, value_address, value_copy):
9253 * value.c (struct value): Add constructor, destructor, and member
9255 (allocate_value_lazy, value_decref): Update.
9259 * value.c (struct value) <released, next>: Remove.
9260 (all_values): Now a std::vector.
9261 (allocate_value_lazy): Update.
9262 (value_next): Remove.
9263 (value_mark, value_free_to_mark, release_value)
9264 (value_release_to_mark): Update.
9268 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9269 (free_value_chain): Remove.
9270 * value.c (free_value_chain): Remove.
9271 (value_release_to_mark): Return a std::vector.
9272 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9274 (check_condition): Update.
9275 * eval.c (fetch_subexp_value): Change "val_chain" to a
9277 * breakpoint.c (update_watchpoint): Update.
9278 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9282 * value.h (free_all_values): Remove.
9283 * value.c (free_all_values): Remove.
9287 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9288 (value_history_chain, value_history_count): Remove.
9289 (value_history): New global.
9290 (record_latest_value, access_value_history, show_values)
9291 (preserve_values): Update.
9295 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9296 * varobj.c (varobj_set_display_format, varobj_set_value)
9297 (install_default_visualizer, construct_visualizer)
9298 (install_new_value, ~varobj, varobj_get_value_type)
9299 (my_value_of_variable, varobj_editable_p): Update.
9300 * c-varobj.c (c_describe_child, c_value_of_variable)
9301 (cplus_number_of_children, cplus_describe_child): Update.
9302 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9303 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9304 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9308 * printcmd.c (last_examine_address): Change type to
9310 (do_examine, x_command): Update.
9314 * value.c (release_value): Update.
9315 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9316 (struct bpstats) <val>: Now a value_ref_ptr.
9317 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9318 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9319 (~watchpoint, print_it_watchpoint, watch_command_1)
9320 (invalidate_bp_value_on_memory_change): Update.
9324 * varobj.c (varobj_clear_saved_item)
9325 (update_dynamic_varobj_children, install_new_value, ~varobj):
9327 * value.h (value_incref): Move declaration earlier.
9328 (value_decref): Rename from value_free.
9329 (struct value_ref_policy): New.
9330 (value_ref_ptr): New typedef.
9331 (struct value_deleter): Remove.
9332 (gdb_value_up): Remove typedef.
9333 (release_value): Change return type.
9334 (release_value_or_incref): Remove.
9335 * value.c (set_value_parent): Update.
9336 (value_incref): Change return type.
9337 (value_decref): Rename from value_free.
9338 (value_free_to_mark, free_all_values, free_value_chain): Update.
9339 (release_value): Return value_ref_ptr.
9340 (release_value_or_incref): Remove.
9341 (record_latest_value, set_internalvar, clear_internalvar):
9343 * stack.c (info_frame_command): Don't call value_free.
9344 * python/py-value.c (valpy_dealloc, valpy_new)
9345 (value_to_value_object): Update.
9346 * printcmd.c (do_examine): Update.
9347 * opencl-lang.c (lval_func_free_closure): Update.
9348 * mi/mi-main.c (register_changed_p): Don't call value_free.
9349 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9350 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9351 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9353 * guile/scm-value.c (vlscm_free_value_smob)
9354 (vlscm_scm_from_value): Update.
9355 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9356 (frame_unwind_register_unsigned, get_frame_register_bytes)
9357 (put_frame_register_bytes): Don't call value_free.
9358 * findvar.c (address_from_register): Don't call value_free.
9359 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9360 * dwarf2loc.c (entry_data_value_free_closure)
9361 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9362 (dwarf2_evaluate_loc_desc_full): Update.
9363 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9364 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9365 (~watchpoint, watch_command_1)
9366 (invalidate_bp_value_on_memory_change): Update.
9367 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9372 * warning.m4: Add -Wno-error=deprecated-register.
9373 * configure: Re-generate.
9377 * linespec.h: Remove include of "vec.h".
9381 * linespec.c (typep): Remove typedef.
9382 (find_methods, find_superclass_methods): Take a std::vector.
9383 (find_method): Use std::vector.
9387 * utils.c (compare_strings): Remove.
9388 * utils.h (compare_strings): Remove.
9389 * objc-lang.h (find_imps): Update.
9390 * objc-lang.c (find_methods): Take a std::vector.
9391 (uniquify_strings, find_imps): Likewise.
9392 * linespec.c (find_methods): Take a std::vector.
9393 (decode_objc): Use std::vector.
9394 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9396 (find_method, find_function_symbols): Use std::vector.
9400 * completer.c (completion_tracker::completion_tracker): Remove
9402 (completion_tracker::discard_completions): Likewise.
9403 * breakpoint.c (ambiguous_names_p): Remove cast.
9404 * ada-lang.c (_initialize_ada_language): Remove cast.
9405 * utils.h (streq): Update.
9406 (streq_hash): Add new declaration.
9407 * utils.c (streq): Return bool.
9408 (streq_hash): New function.
9412 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9413 Remove a string copy.
9417 * linespec.c (filter_results): Use std::vector.
9418 (decode_line_2, decode_line_full): Update.
9422 * linespec.c (canonical_to_fullform): Return std::string.
9423 (filter_results): Update.
9424 (struct decode_line_2_item): Add constructor.
9425 <fullform, displayform>: Now std::string.
9426 (decode_line_2_compare_items): Now a std::sort comparator.
9427 (decode_line_2): Update.
9431 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9432 (unexpected_linespec_error): Update.
9433 (linespec_parse_basic, parse_linespec): Update.
9437 * linespec.c (linespec_parse_basic): Reindent.
9441 * minsyms.h (iterate_over_minimal_symbols): Update.
9442 * minsyms.c (iterate_over_minimal_symbols): Take a
9444 * linespec.c (struct collect_minsyms): Remove.
9445 (compare_msyms): Now a std::sort comparator.
9446 (add_minsym): Add parameters.
9447 (search_minsyms_for_name): Update. Use std::vector.
9451 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9456 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9461 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9462 printing static type.
9466 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9467 (rs6000_xfer_shared_libraries): Update.
9471 * common/gdb_vecs.h (char_ptr): Remove.
9472 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9476 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9478 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9482 * tracepoint.h (struct uploaded_tp): Initialize fields.
9483 <actions, step_actions, cmd_strings>: Change type to
9484 std::vector<char *>.
9485 * tracepoint.c (get_uploaded_tp): Allocate with new.
9486 (free_uploaded_tps): Free with delete.
9487 (parse_tracepoint_definition): Adjust to std::vector change.
9488 * breakpoint.c (read_uploaded_action): Likewise.
9489 (create_tracepoint_from_upload): Likewise.
9490 * ctf.c (ctf_write_uploaded_tp): Likewise.
9491 (SET_ARRAY_FIELD): Likewise.
9492 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9496 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9498 (svr4_keep_data_in_core): Update.
9499 (svr4_read_so_list): Update.
9503 * windows-nat.c (handle_output_debug_string, handle_exception):
9505 * target.h (target_read_string): Update.
9506 * target.c (target_read_string): Change "string" to
9508 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9510 * solib-frv.c (frv_current_sos): Update.
9511 * solib-dsbt.c (dsbt_current_sos): Update.
9512 * solib-darwin.c (darwin_current_sos): Update.
9513 * linux-thread-db.c (inferior_has_bug): Update.
9514 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9515 Update. Remove alloca.
9516 * ada-lang.c (ada_main_name): Update.
9520 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9521 (struct dwo_file_deleter): New.
9522 (dwo_file_up): New typedef.
9523 (open_and_init_dwo_file): Use dwo_file_up.
9524 (free_dwo_file_cleanup): Remove.
9528 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9529 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9533 * dwarf2read.c (class free_cached_comp_units): New class.
9534 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9535 (free_cached_comp_units): Remove function.
9539 * utils.h (make_cleanup_unpush_target): Remove.
9540 * inf-ptrace.c (struct target_unpusher): New.
9541 (target_unpush_up) New typedef.
9542 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9544 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9548 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9553 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9554 destructor. Now a class.
9555 (gdb_readline_wrapper_cleanup): Remove function.
9556 (gdb_readline_wrapper): Remove cleanups.
9560 * typeprint.h (struct type_print_options) <local_typedefs,
9561 global_typedefs>: Remove "struct" keyword.
9562 (class typedef_hash_table): New class.
9563 (recursively_update_typedef_hash, add_template_parameters)
9564 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9565 (find_typedef_in_hash): Don't declare.
9566 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9567 (typedef_hash_table::recursively_update): Rename from
9568 recursively_update_typedef_hash. Now a member.
9569 (typedef_hash_table::add_template_parameters): Rename from
9570 add_template_parameters. Now a member.
9571 (typedef_hash_table::typedef_hash_table): Now a constructor;
9572 rename from create_typedef_hash.
9573 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9574 rename from free_typedef_hash.
9575 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9576 (do_free_global_table): Remove.
9577 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9578 from copy_type_recursive.
9579 (create_global_typedef_table): Remove.
9580 (typedef_hash_table::find_global_typedef): Now a member of
9582 (typedef_hash_table::find_typedef): Rename from
9583 find_typedef_in_hash; now a member.
9584 (whatis_exp): Update.
9585 * extension.h (struct ext_lang_type_printers): Add constructor and
9587 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9589 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9590 Now a constructor; rename from start_ext_lang_type_printers.
9591 (ext_lang_type_printers): Now a destructor; rename from
9592 free_ext_lang_type_printers.
9593 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9595 (c_type_print_base_struct_union): Update. Remove cleanups.
9599 * dwarf-index-write.c: Include <cmath>.
9603 * NEWS: Add entry describing new "set|show varsize-limit" command.
9604 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9606 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9611 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9613 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9614 * dwarf-index-common.c: New file.
9615 * dwarf-index-common.h: New file.
9616 * dwarf-index-write.c: New file.
9617 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9618 (struct dwarf2_section_info): Move from here.
9619 (dwarf2_section_info_def): Likewise.
9620 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9621 (offset_type): Likewise.
9622 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9623 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9624 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9625 (byte_swap): Likewise.
9626 (MAYBE_SWAP): Likewise.
9627 (dwarf2_per_cu_ptr): Likewise.
9628 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9629 (struct tu_stats): Likewise.
9630 (struct dwarf2_per_objfile): Likewise.
9631 (struct dwarf2_per_cu_data): Likewise.
9632 (struct signatured_type): Likewise.
9633 (sig_type_ptr): Likewise.
9634 (DEF_VEC_P (sig_type_ptr)): Likewise.
9635 (INDEX4_SUFFIX): Likewise.
9636 (INDEX5_SUFFIX): Likewise.
9637 (DEBUG_STR_SUFFIX): Likewise.
9638 (dwarf2_read_section): Make non-static.
9639 (mapped_index_string_hash): Move from here.
9640 (dwarf5_djb_hash): Likewise.
9641 (file_write): Likewise.
9642 (class data_buf): Likewise.
9643 (struct symtab_index_entry): Likewise.
9644 (struct mapped_symtab): Likewise.
9645 (find_slot): Likewise.
9646 (hash_expand): Likewise.
9647 (add_index_entry): Likewise.
9648 (uniquify_cu_indices): Likewise.
9649 (class c_str_view): Likewise.
9650 (class c_str_view_hasher): Likewise.
9651 (class vector_hasher): Likewise.
9652 (write_hash_table): Likewise.
9653 (psym_index_map): Likewise.
9654 (struct addrmap_index_data): Likewise.
9655 (add_address_entry): Likewise.
9656 (add_address_entry_worker): Likewise.
9657 (write_address_map): Likewise.
9658 (symbol_kind): Likewise.
9659 (write_psymbols): Likewise.
9660 (struct signatured_type_index_data): Likewise.
9661 (write_one_signatured_type): Likewise.
9662 (recursively_count_psymbols): Likewise.
9663 (recursively_write_psymbols): Likewise.
9664 (class debug_names): Likewise.
9665 (check_dwarf64_offsets): Likewise.
9666 (psyms_seen_size): Likewise.
9667 (write_gdbindex): Likewise.
9668 (write_debug_names): Likewise.
9669 (assert_file_size): Likewise.
9670 (write_psymtabs_to_index): Likewise.
9671 (save_gdb_index_command): Likewise.
9672 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9674 * dwarf2read.h: New file.
9679 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9680 symbol name if the CU's language stores symbol names in linkage
9682 * language.h (struct language_defn)
9683 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9684 all instances of this struct.
9688 * stack.c (backtrace_command_1): Remove verbose code.
9692 * python/py-framefilter.c (py_print_type): Don't catch
9693 exceptions. Return void.
9694 (py_print_value): Likewise.
9695 (py_print_single_arg): Likewise.
9696 (enumerate_args): Don't catch exceptions.
9697 (py_print_args): Likewise.
9698 (py_print_frame): Likewise.
9699 (gdbpy_apply_frame_filter): Catch exceptions here.
9703 * stack.c (_initialize_stack): Remove trailing newlines from help
9704 text. Add "Usage" line to "backtrace" help.
9709 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9713 * python/py-framefilter.c (py_print_single_arg): Return
9714 EXT_LANG_BT_ERROR from catch.
9719 * stack.c (backtrace_command_1): Move some code into no-filters
9724 * python/py-framefilter.c (throw_quit_or_print_exception): New
9726 (gdbpy_apply_frame_filter): Use it.
9731 * python/py-framefilter.c (py_print_type, py_print_value)
9732 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9737 * python/py-framefilter.c (enumerate_args): Use
9738 gdb::unique_xmalloc_ptr.
9742 * python/py-framefilter.c (py_print_frame): Return
9744 (gdbpy_apply_frame_filter): Update comment.
9745 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9747 <EXT_LANG_BT_NO_FILTERS>: Change value.
9752 * stack.c (backtrace_command): Parse "hide" argument.
9753 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9754 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9759 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9761 (backtrace_command): Remove "fulltrace", add "flags".
9765 * stack.c (backtrace_command): Rewrite command line parsing.
9769 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9773 * filename-seen-cache.h: Add include guard.
9777 * symfile.c (place_section): Remove "struct" from section_addr_info
9779 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9780 "struct" keyword from section_addr_info.
9784 * regformats/regdef.h (reg): Add constructors.
9788 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9789 if then/else bodies in var_func_name extraction.
9793 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9794 lookup_minimal_symbol() to find symbol entry.
9795 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9800 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9801 nested type definitions for C++, too.
9805 * machoread.c (struct oso_el): Add a constructor. Don't define as
9807 (macho_register_oso): Remove.
9808 (macho_symtab_read): Take a std::vector.
9809 (oso_el_compare_name): Now a std::sort comparator.
9810 (macho_symfile_read_all_oso): Take a std::vector.
9811 (macho_symfile_read): Use std::vector. Remove cleanups.
9815 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9816 (record_full_goto_bookmark): Use std::string.
9821 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9826 * rs6000-tdep.c (store_insn_p): New function.
9827 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9828 and cr_reg to their unshifted values. Use store_insn_p to
9829 match LR saves using either R1 or fdata->alloca_reg. Use
9830 store_insn_p to match CR saves. Set alloca_reg_offset
9831 when alloca_reg and framep are set. Remove lr_reg shift
9832 when assigning to fdata->lr_register.
9836 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9837 command line args instead of emitting a warning.
9841 * tracepoint.h (struct static_tracepoint_marker): Initialize
9842 fields, define default constructor, move constructor and move
9843 assignment, disable the rest.
9844 <str_id, extra>: Make std::string.
9845 (release_static_tracepoint_marker): Remove.
9846 (free_current_marker): Remove.
9847 * tracepoint.c (free_current_marker): Remove.
9848 (parse_static_tracepoint_marker_definition): Adjust to
9849 std::string, use new hex2str overload.
9850 (release_static_tracepoint_marker): Remove.
9851 (print_one_static_tracepoint_marker): Get marker by reference
9852 and adjust to std::string.
9853 (info_static_tracepoint_markers_command): Adjust to std::vector
9855 * target.h (static_tracepoint_marker_p): Remove typedef.
9856 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9857 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9859 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9861 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9862 (target_debug_print_std_vector_static_tracepoint_marker): New.
9863 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9865 (target_debug_print_static_tracepoint_marker_p): ... this.
9866 * target-delegates.c: Re-generate.
9867 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9869 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9870 (decode_static_tracepoint_spec): Adjust to std::vector.
9871 (tracepoint_print_one_detail): Adjust to std::string.
9872 (strace_marker_decode_location): Adjust to std::string.
9873 (update_static_tracepoint): Adjust to std::string, remove call
9874 to release_static_tracepoint_marker.
9875 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9876 Adjust to std::vector.
9877 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9878 (remote_static_tracepoint_markers_by_strid): Adjust to
9880 * common/rsp-low.h (hex2str): New overload with explicit count
9882 * common/rsp-low.c (hex2str): New overload with explicit count
9884 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9885 (_initialize_rsp_low_selftests): Add test_hex2str test.
9886 * unittests/tracepoint-selftests.c
9887 (test_parse_static_tracepoint_marker_definition): Adjust to
9892 * tracepoint.c (parse_static_tracepoint_marker_definition):
9893 Consider case where the definition is followed by more
9895 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9896 tracepoint-selftests.c.
9897 * unittests/tracepoint-selftests.c: New.
9901 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9906 * symtab.c (find_pc_sect_line): fixed indentation.
9910 * symtab.c (find_pc_sect_line): now uses binary search.
9914 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9920 * unittests/observable-selftests.c: New file.
9921 * common/observable.h: New file.
9922 * observable.h: New file.
9923 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9924 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9925 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9926 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9927 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9928 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9929 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9930 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9931 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9932 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9933 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9934 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9935 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9936 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9937 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9938 tui/tui-interp.c, valops.c: Update all users.
9939 * tui/tui-hooks.c (tui_bp_created_observer)
9940 (tui_bp_deleted_observer, tui_bp_modified_observer)
9941 (tui_inferior_exit_observer, tui_before_prompt_observer)
9942 (tui_normal_stop_observer, tui_register_changed_observer):
9944 (tui_observers_token): New global.
9945 (attach_or_detach, tui_attach_detach_observers): New functions.
9946 (tui_install_hooks, tui_remove_hooks): Use
9947 tui_attach_detach_observers.
9948 * record-btrace.c (record_btrace_thread_observer): Remove.
9949 (record_btrace_thread_observer_token): New global.
9950 * observer.sh: Remove.
9951 * observer.c: Rename to observable.c.
9952 * observable.c (namespace gdb_observers): Define new objects.
9953 (observer_debug): Move into gdb_observers namespace.
9954 (struct observer, struct observer_list, xalloc_observer_list_node)
9955 (xfree_observer_list_node, generic_observer_attach)
9956 (generic_observer_detach, generic_observer_notify): Remove.
9957 (_initialize_observer): Update.
9958 Don't include observer.inc.
9959 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9960 (clean mostlyclean): Likewise.
9961 (observer.h, observer.inc): Remove targets.
9962 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9963 (COMMON_SFILES): Use observable.c, not observer.c.
9964 * .gitignore: Remove observer.h.
9968 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9970 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9974 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9978 * target.c (class scoped_target_fd): New.
9979 (target_fileio_close_cleanup): Remove.
9980 (target_fileio_read_alloc_1): Use scoped_target_fd.
9984 * silent-rules.mk: New.
9985 * Makefile.in: Include silent-rules.mk
9986 (srcdir, VPATH, top_srcdir): Move up.
9987 (COMPILE): Add ECHO_CXX.
9988 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9989 (init.c): Add ECHO_INIT_C.
9990 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9991 (version.c): Add ECHO_GEN.
9992 (printcmd.o): Add ECHO_CXX.
9993 (target-float.o): Add ECHO_CXX.
9994 (ada-exp.o): Add ECHO_CXX.
9995 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9996 (insight$(EXEEXT)): Add ECHO_CXXLD.
9997 * gnulib/configure.ac: Add AM_SILENT_RULES.
9998 * gnulib/aclocal.m4: Re-generate.
9999 * gnulib/configure: Re-generate.
10000 * gnulib/import/Makefile.in: Re-generate.
10004 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10005 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10006 * utils.c (do_free_section_addr_info)
10007 (make_cleanup_free_section_addr_info): Remove.
10008 * symfile.h (struct other_sections): Add constructor.
10009 (struct section_addr_info): Remove.
10010 (section_addr_info): New typedef.
10011 (struct sym_fns) <sym_offsets>: Change type of parameter.
10012 (build_section_addr_info_from_objfile)
10013 (relative_addr_info_to_section_offsets, addr_info_make_relative)
10014 (default_symfile_offsets, symbol_file_add)
10015 (symbol_file_add_from_bfd)
10016 (build_section_addr_info_from_section_table): Update.
10017 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10018 * symfile.c (alloc_section_addr_info): Remove.
10019 (build_section_addr_info_from_section_table): Change return type.
10021 (build_section_addr_info_from_bfd)
10022 (build_section_addr_info_from_objfile): Likewise.
10023 (free_section_addr_info): Remove.
10024 (relative_addr_info_to_section_offsets): Change type of "addrs".
10025 (addrs_section_compar): Now a std::sort comparator.
10026 (addrs_section_sort): Change return type.
10027 (addr_info_make_relative): Change type of "addrs". Update.
10028 (default_symfile_offsets, syms_from_objfile_1)
10029 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10030 (symbol_file_add_separate): Update.
10031 (symbol_file_add): Change type of "addrs". Update.
10032 (add_symbol_file_command): Update. Remove cleanups.
10033 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10035 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10036 * solib.c (solib_read_symbols): Update.
10037 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10038 * machoread.c (macho_symfile_offsets): Update.
10039 * jit.c (jit_bfd_try_read_symtab): Update.
10043 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10044 unittests/utils-selftests.c.
10045 * unittests/utils-selftests.c: New file.
10050 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10056 * printcmd.c (printf_pointer): Allow "-" in format.
10060 * printcmd.c (_initialize_printcmd): Add usage to printf.
10064 * MAINTAINERS: Update my email address.
10068 * machoread.c (macho_check_dsym): Change filenamep to a
10070 (macho_symfile_read): Update.
10071 * symfile.c (load_command): Use std::string.
10075 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10076 to error message string.
10077 (riscv_register_name): Use xsnprintf instead of sprintf.
10078 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10080 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10082 (riscv_push_dummy_call): Likewise.
10086 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10087 Use gdb::byte_vector.
10088 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10092 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10093 parameter type to readable_regcache.
10094 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10099 * dwarf2read.c (struct nextfield): Add initializers.
10100 (struct nextfnfield): Remove.
10101 (struct fnfieldlist): Add initializers. Remove "length" and
10102 "head", use std::vector.
10103 (struct decl_field_list): Remove.
10104 (struct field_info): Add initializers.
10105 <fields, baseclasses>: Now std::vector.
10106 <nbaseclasses, nfnfields, typedef_field_list_count,
10107 nested_types_list_count>: Remove.
10108 (dwarf2_add_field, dwarf2_add_type_defn)
10109 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10110 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10111 (process_structure_scope): Update.
10115 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10116 for use by std::sort.
10117 (build_type_psymtabs_1): Use std::vector.
10121 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10122 and LIBMPFR in the printed configuration.
10126 * source.c (get_filename_and_charpos): Use scoped_fd.
10127 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10128 (procfs_pidlist): Likewise.
10129 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10130 (iterate_over_mappings): Likewise.
10134 * infcall.c (struct call_return_meta_info)
10135 <stack_temporaries_enabled>: Remove.
10136 (get_call_return_value, call_function_by_hand_dummy): Update.
10137 * thread.c (disable_thread_stack_temporaries): Remove.
10138 (enable_thread_stack_temporaries): Remove.
10139 (thread_stack_temporaries_enabled_p): Return bool.
10140 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10141 (get_last_thread_stack_temporary): Update.
10142 * eval.c (evaluate_subexp): Update.
10143 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10144 class, not a function.
10145 (value_ptr, value_vec): Remove typedefs.
10146 (class thread_info) <stack_temporaries_enabled>: Now bool.
10147 <stack_temporaries>: Now a std::vector.
10148 (thread_stack_temporaries_enabled_p)
10149 (value_in_thread_stack_temporaries): Return bool.
10153 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10154 (getpkt_or_notif_sane_1): Likewise.
10158 * build-id.c (build_id_to_debug_bfd): Use std::string.
10162 * build-id.c (find_separate_debug_file_by_buildid): Return
10164 * build-id.h (find_separate_debug_file_by_buildid): Return
10166 * coffread.c (coff_symfile_read): Adjust to std::string.
10167 * elfread.c (elf_symfile_read): Adjust to std::string.
10168 * symfile.c (separate_debug_file_exists): Change parameter to
10170 (find_separate_debug_file): Return std::string.
10171 (find_separate_debug_file_by_debuglink): Return std::string.
10172 * symfile.h (find_separate_debug_file_by_debuglink): Return
10177 * common/xml-utils.c (xml_escape_text): Move code to...
10178 (xml_escape_text_append): ... this new function.
10179 * common/xml-utils.h (xml_escape_text_append): New declaration.
10180 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10182 (_initialize_xml_utils): register test_xml_escape_text_append as
10187 * defs.h: Remove MAX_REGISTER_SIZE.
10188 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10190 * python/py-unwind.c (pyuw_sniffer): Likewise.
10194 * linux-tdep.c (linux_info_proc): Update.
10195 * target.h (struct target_ops) <to_fileio_readlink>: Return
10197 (target_fileio_readlink): Return optional<string>.
10198 * remote.c (remote_hostio_readlink): Return optional<string>.
10199 * inf-child.c (inf_child_fileio_readlink): Return
10201 * target.c (target_fileio_readlink): Return optional<string>.
10205 * regcache.c (cooked_read_test): Add riscv to the list of
10206 architectures that have a save_reggroup.
10210 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10211 value is not a dynamic class object.
10215 * rust-exp.y: Formatting fixes.
10219 * riscv-tdep.c (riscv_register_name): Remove target description
10221 (riscv_gdbarch_init): Remove target description check.
10225 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10227 * riscv-tdep.h: Likewise.
10231 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10232 (riscv_pseudo_register_write): Delete.
10233 (riscv_gdbarch_init): Remove all use of pseudo registers.
10237 * record-btrace.c (btrace_print_lines): Replace cleanup
10238 parameter with RAII equivalents.
10239 (btrace_insn_history): Replace cleanup with RAII equivalents.
10240 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10241 make_cleanup_ui_out_tuple_begin_end): Remove.
10242 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10243 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10244 make_cleanup_ui_out_list_begin_end): Remove.
10248 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10249 parameter types to std::vector. Use bool.
10250 (record_btrace_wait): Replace VEC(tp_t) with
10251 std::vector<thread_info *>.
10252 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10256 * record-btrace.c (record_btrace_disable_callback): Remove.
10257 (struct scoped_btrace_disable): New.
10258 (record_btrace_open): Use scoped_btrace_disable.
10262 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10263 reading values from registers.
10267 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10272 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10273 change parameter type. Use GDB's print functions, and use
10274 core_addr_to_string where appropriate.
10275 (riscv_push_dummy_call): Use core_addr_to_string where
10276 appropriate, update call to riscv_print_arg_location, and reindent
10278 (riscv_return_value): Update call to riscv_print_arg_location.
10285 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10286 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10287 (ALLDEPFILES): Add riscv-tdep.c
10288 * configure.tgt: Add riscv support.
10289 * riscv-tdep.c: New file.
10290 * riscv-tdep.h: New file.
10291 * NEWS: Mention new target.
10292 * MAINTAINERS: Add entry for riscv.
10296 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10297 fields within aggregates.
10301 * record-btrace.c (btrace_print_lines): Change type of flags to
10302 gdb_disassembly_flags.
10306 * fbsd-nat.c: Include "inf-ptrace.h".
10307 (USE_SIGTRAP_SIGINFO): Conditionally define.
10308 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10309 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10310 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10312 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10314 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10316 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10317 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10318 "supports_stopped_by_hw_breakpoint" target methods.
10322 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10323 * fbsd-nat.c (debug_fbsd_nat): New variable.
10324 (show_fbsd_nat_debug): New function.
10325 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10326 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10330 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10331 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10333 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10334 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10339 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10340 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10344 * charset.c (struct charset_vector): New.
10345 (charsets): Change type to charset_vector.
10346 (find_charset_names): Adjust.
10348 (_initialize_charset): Adjust.
10352 * progspace.h (struct program_space) <deleted_solibs>: Change
10353 type to std::vector<std::string>.
10354 * progspace.c (clear_program_space_solib_cache): Adjust.
10355 * breakpoint.c (print_solib_event): Adjust.
10356 (check_status_catch_solib): Adjust.
10357 * solib.c (update_solib_list): Adjust.
10358 * ui-out.h (class ui_out) <field_string>: New overload.
10359 * ui-out.c (ui_out::field_string): New overload.
10363 * progspace.h (struct program_space): Add constructor and
10364 destructor, initialize fields.
10365 (add_program_space): Remove.
10366 * progspace.c (add_program_space): Rename to...
10367 (program_space::program_space): ... this.
10368 (release_program_space): Rename to...
10369 (program_space::~program_space): ... this.
10370 (delete_program_space): Use delete to delete program_space.
10371 (initialize_progspace): Use new to allocate program_space.
10372 * inferior.c (add_inferior_with_spaces): Likewise.
10373 (clone_inferior_command): Likewise.
10374 * infrun.c (follow_fork_inferior): Likewise.
10375 (handle_vfork_child_exec_or_exit): Likewise.
10379 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10380 (delim_string_to_char_ptr_vec): Return std::vector of
10381 gdb::unique_xmalloc_ptr.
10382 (dirnames_to_char_ptr_vec_append): Take std::vector of
10383 gdb::unique_xmalloc_ptr.
10384 (dirnames_to_char_ptr_vec): Return std::vector of
10385 gdb::unique_xmalloc_ptr.
10386 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10387 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10388 (delim_string_to_char_ptr_vec): Return an std::vector of
10389 gdb::unique_xmalloc_ptr, adjust the code.
10390 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10391 gdb::unique_xmalloc_ptr, adjust the code.
10392 (dirnames_to_char_ptr_vec): Return an std::vector of
10393 gdb::unique_xmalloc_ptr, adjust the code.
10394 * auto-load.c (auto_load_safe_path_vec): Change type to
10395 std::vector of gdb::unique_xmalloc_ptr.
10396 (auto_load_expand_dir_vars): Return an std::vector of
10397 gdb::unique_xmalloc_ptr, adjust the code.
10398 (auto_load_safe_path_vec_update): Adjust.
10399 (filename_is_in_auto_load_safe_path_vec): Adjust.
10400 (auto_load_objfile_script_1): Adjust.
10401 * build-id.c (build_id_to_debug_bfd): Adjust.
10402 * linux-thread-db.c (thread_db_load_search): Adjust.
10403 * source.c (add_path): Adjust.
10405 * symfile.c (find_separate_debug_file): Adjust.
10406 * utils.c (do_free_char_ptr_vec): Remove.
10407 (make_cleanup_free_char_ptr_vec): Remove.
10412 * common/pathstuff.c: Conditionally include "<windows.h>".
10417 * gcore.in: Quote variables and switch interpreter to bash.
10421 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10422 assertion. Add assertion for discriminant_index.
10423 (quirk_rust_enum): Use correct base type name in univariant case.
10427 * record.c (get_call_history_modifiers): Return a
10428 record_print_flags.
10429 (cmd_record_call_history): Adjust.
10430 * record-btrace.c (record_btrace_call_history): Adjust.
10431 (record_btrace_call_history_range): Adjust.
10432 (record_btrace_call_history_from): Adjust.
10433 * target-debug.h (target_debug_print_record_print_flags): New.
10434 * target-delegates.c: Re-generate.
10435 * target.c (target_call_history): Change flags type.
10436 (target_call_history_from): Likewise.
10437 (target_call_history_range): Likewise.
10438 * target.h (struct target_ops) <target_call_history>: Likewise.
10439 (target_call_history_from): Likewise.
10440 (target_call_history_range): Likewise.
10445 * common/common-utils.c: Include "sys/stat.h".
10446 (is_regular_file): Move here from "source.c"; change return
10448 * common/common-utils.h (is_regular_file): New prototype.
10449 * common/pathstuff.c (contains_dir_separator): New function.
10450 * common/pathstuff.h (contains_dir_separator): New prototype.
10451 * source.c: Don't include "sys/stat.h".
10452 (is_regular_file): Move to "common/common-utils.c".
10456 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10457 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10458 * auto-load.c: Include "common/pathstuff.h".
10459 * common/common-def.h (current_directory): Move here.
10460 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10462 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10464 * common/pathstuff.c: New file.
10465 * common/pathstuff.h: New file.
10466 * compile/compile.c: Include "common/pathstuff.h".
10467 * defs.h (current_directory): Move to "common/common-defs.h".
10468 * dwarf2read.c: Include "common/pathstuff.h".
10469 * exec.c: Likewise.
10470 * guile/scm-safe-call.c: Likewise.
10471 * linux-thread-db.c: Likewise.
10472 * main.c: Likewise.
10473 * nto-tdep.c: Likewise.
10474 * objfiles.c: Likewise.
10475 * source.c: Likewise.
10476 * symtab.c: Likewise.
10477 * utils.c: Include "common/pathstuff.h".
10478 (gdb_realpath): Move to "common/pathstuff.c".
10479 (gdb_realpath_keepfile): Likewise.
10480 (gdb_abspath): Likewise.
10481 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10482 (gdb_realpath_keepfile): Likewise.
10483 (gdb_abspath): Likewise.
10487 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10488 wildcard process pid for super_resume for kernels with a
10493 * compile/compile.c (get_args): Add additional comments
10494 explaining function.
10499 * target.h (memory_write_request_s): Remove typedef. Don't define
10501 (target_write_memory_blocks): Change argument to std::vector.
10502 (struct memory_write_request): Add constructor.
10503 * target-memory.c (compare_block_starting_address): Return bool.
10504 Change argument types.
10505 (claim_memory): Change arguments to use std::vector.
10506 (split_regular_and_flash_blocks, blocks_to_erase)
10507 (compute_garbled_blocks): Likewise.
10508 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10509 (target_write_memory_blocks): Change argument to std::vector.
10510 * symfile.c (struct load_section_data): Add constructor and
10511 destructor. Use std::vector for "requests".
10512 (struct load_progress_data): Add initializers.
10513 (load_section_callback): Update. Use "new".
10514 (clear_memory_write_data): Remove.
10515 (generic_load): Update.
10519 * arch/aarch64.h: Use common/tdesc.h.
10523 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10524 architecture with a 64-bit ABI.
10528 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10529 ahead of target description loading.
10533 * stack.c (backtrace_command_1): Update.
10534 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10536 * python/py-framefilter.c (py_print_frame)
10537 (gdbpy_apply_frame_filter): Change type of "flags".
10538 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10540 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10541 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10542 * extension.h (enum frame_filter_flag): Rename from
10543 frame_filter_flags.
10544 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10545 (apply_ext_lang_frame_filter): Change type of "flags".
10546 * extension.c (apply_ext_lang_frame_filter): Change type of
10548 * extension-priv.h (struct extension_language_ops)
10549 <apply_frame_filter>: Change type of "flags".
10554 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10555 off-by-one in py_end computation.
10556 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10558 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10563 * dwarf2read.c (struct variant_field): New.
10564 (struct nextfield) <variant>: New field.
10565 (dwarf2_add_field): Handle DW_TAG_variant_part.
10566 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10567 discriminated union.
10568 (read_structure_type): Handle DW_TAG_variant_part.
10569 (handle_struct_member_die): New function, extracted from
10570 process_structure_scope. Handle DW_TAG_variant.
10571 (process_structure_scope): Handle discriminated unions. Call
10572 handle_struct_member_die.
10576 * rust-lang.h (rust_last_path_segment): Declare.
10577 * rust-lang.c (rust_last_path_segment): Now public. Change
10579 (struct disr_info): Remove.
10580 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10581 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10582 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10583 (rust_enum_p, rust_enum_variant): New function.
10584 (rust_underscore_fields): Remove "offset" parameter.
10585 (rust_print_enum): New function.
10586 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10587 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10588 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10590 (rust_internal_print_type): New function, from rust_print_type.
10592 (rust_print_type): Call rust_internal_print_type.
10593 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10594 Update enum handling.
10595 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10596 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10597 (rust_union_quirks): New functions.
10598 (process_full_comp_unit, process_full_type_unit): Call
10600 (process_structure_scope): Update rust_unions if necessary.
10604 * value.h (value_union_variant): Declare.
10605 * valops.c (value_union_variant): New function.
10606 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10607 (struct discriminant_info): New.
10608 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10610 (struct main_type) <flag_discriminated_union>: New field.
10614 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10615 unittests/unpack-selftests.c.
10616 * unittests/unpack-selftests.c: New file.
10617 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10621 * dwarf2read.c (struct partial_die_info) <read>: New method.
10622 (read_partial_die): Remove the declaration.
10623 (load_partial_dies): Update.
10624 (partial_die_info::partial_die_info):
10625 (read_partial_die): Change it to partial_die_info::read.
10629 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10630 (fixup_partial_die): Remove declaration.
10631 (scan_partial_symbols): Update.
10632 (partial_die_parent_scope): Likewise.
10633 (partial_die_full_name): Likewise.
10634 (fixup_partial_die): Change it to partial_die_info::fixup.
10638 * dwarf2read.c (read_partial_die): Update the declaration.
10639 (load_partial_dies): Caller update.
10640 (read_partial_die): Remove one argument abbrev_len.
10644 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10645 assignment operator.
10646 (load_partial_dies): Use ctor and copy ctor.
10647 (read_partial_die): Update.
10648 (dwarf2_cu::find_partial_die): Use ctor.
10652 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10653 (find_partial_die_in_comp_unit): Change it to
10654 dwarf2_cu::find_partial_die.
10655 (find_partial_die): Update.
10659 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10664 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10668 * arch/amd64.h: Use common/tdesc.h.
10669 * arch/i386.c: Likewise.
10670 * arch/i386.h: Likewise.
10671 * arch/tic6x.c: Likewise.
10672 * arch/tdesc.h: Move file from here...
10673 * common/tdesc.h: ...to here.
10674 * features/aarch64-core.c: Regenerate.
10675 * features/aarch64-fpu.c: Regenerate.
10676 * features/i386/32bit-avx.c: Regenerate.
10677 * features/i386/32bit-avx512.c: Regenerate.
10678 * features/i386/32bit-core.c: Regenerate.
10679 * features/i386/32bit-linux.c: Regenerate.
10680 * features/i386/32bit-mpx.c: Regenerate.
10681 * features/i386/32bit-pkeys.c: Regenerate.
10682 * features/i386/32bit-sse.c: Regenerate.
10683 * features/i386/64bit-avx.c: Regenerate.
10684 * features/i386/64bit-avx512.c: Regenerate.
10685 * features/i386/64bit-core.c: Regenerate.
10686 * features/i386/64bit-linux.c: Regenerate.
10687 * features/i386/64bit-mpx.c: Regenerate.
10688 * features/i386/64bit-pkeys.c: Regenerate.
10689 * features/i386/64bit-segments.c: Regenerate.
10690 * features/i386/64bit-sse.c: Regenerate.
10691 * features/i386/x32-core.c: Regenerate.
10692 * features/tic6x-c6xp.c: Regenerate.
10693 * features/tic6x-core.c: Regenerate.
10694 * features/tic6x-gp.c: Regenerate.
10695 * target-descriptions.c: Use common/tdesc.h.
10696 * target-descriptions.h: Likewise.
10700 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10701 (try_thread_db_load_from_dir, thread_db_load_search): Use
10703 (info_auto_load_libthread_db_compare): Return bool. Change
10705 (info_auto_load_libthread_db): Use std::vector, std::string.
10710 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10712 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10714 * gdbarch.c: Rebuild.
10715 * gdbarch.h: Rebuild.
10716 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10717 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10718 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10723 * gdbtypes.h (sect_offset): Change type to uint64_t.
10724 (sect_offset_str): New function.
10725 * dwarf2read.c (create_addrmap_from_aranges): Use
10727 (error_check_comp_unit_head): Likewise.
10728 (create_debug_type_hash_table): Likewise.
10729 (read_cutu_die_from_dwo): Likewise.
10730 (init_cutu_and_read_dies): Likewise.
10731 (init_cutu_and_read_dies_no_follow): Likewise.
10732 (process_psymtab_comp_unit_reader): Likewise.
10733 (partial_die_parent_scope): Likewise.
10734 (peek_die_abbrev): Likewise.
10735 (process_queue): Likewise.
10736 (dwarf2_physname): Likewise.
10737 (read_namespace_alias): Likewise.
10738 (read_import_statement): Likewise.
10739 (create_dwo_cu_reader): Likewise.
10740 (create_cus_hash_table): Likewise.
10741 (lookup_dwo_cutu): Likewise.
10742 (inherit_abstract_dies): Likewise.
10743 (read_func_scope): Likewise.
10744 (read_call_site_scope): Likewise.
10745 (dwarf2_add_member_fn): Likewise.
10746 (read_common_block): Likewise.
10747 (read_module_type): Likewise.
10748 (read_typedef): Likewise.
10749 (read_subrange_type): Likewise.
10750 (load_partial_dies): Likewise.
10751 (read_partial_die): Likewise.
10752 (find_partial_die): Likewise.
10753 (read_str_index): Likewise.
10754 (dwarf2_string_attr): Likewise.
10755 (build_error_marker_type): Likewise.
10756 (lookup_die_type): Likewise.
10757 (dump_die_shallow): Likewise.
10758 (follow_die_ref): Likewise.
10759 (dwarf2_fetch_die_loc_sect_off): Likewise.
10760 (dwarf2_fetch_constant_bytes): Likewise.
10761 (follow_die_sig): Likewise.
10762 (get_signatured_type): Likewise.
10763 (get_DW_AT_signature_type): Likewise.
10764 (dwarf2_find_containing_comp_unit): Likewise.
10765 (set_die_type): Likewise.
10769 * arch/aarch64.c: Include "common-defs.h".
10770 * arch/amd64.c: Likewise.
10771 * arch/i386.c: Likewise.
10775 * value.h: (extract_field_op): Update.
10776 * eval.c (extract_field_op): Return a const char *.
10777 * expression.h (parse_expression_for_completion): Update.
10778 * completer.c (complete_expression): Update.
10779 (add_struct_fields): Make fieldname const.
10780 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10781 (mark_completion_tag, parse_exp_in_context_1): Update.
10782 (parse_expression_for_completion): Change "name" to
10783 unique_xmalloc_ptr*.
10787 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10791 * avr-tdep.c (avr_read_pc): Change parameter type to
10793 * gdbarch.sh (read_pc): Likewise.
10794 * gdbarch.c: Re-generated.
10795 * gdbarch.h: Re-generated.
10796 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10798 * ia64-tdep.c (ia64_read_pc): Likewise.
10799 * mips-tdep.c (mips_read_pc): Likewise.
10800 * spu-tdep.c (spu_read_pc): Likewise.
10804 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10805 * regcache-dump.c: New file.
10806 * regcache.c: Move register_dump to regcache-dump.c.
10807 (maintenance_print_registers): Likewise.
10808 (maintenance_print_raw_registers): Likewise.
10809 (maintenance_print_cooked_registers): Likewise.
10810 (maintenance_print_register_groups): Likewise.
10811 (maintenance_print_remote_registers): Likewise.
10812 (_initialize_regcache): Likewise.
10813 * regcache.h (register_dump): Moved from regcache.c.
10817 * regcache.c (regcache::regcache): Update.
10818 (regcache::invalidate): Move it to detached_regcache::invalidate.
10819 (get_thread_arch_aspace_regcache): Update.
10820 (regcache::raw_update): Update.
10821 (regcache::cooked_read): Remove some code.
10822 (regcache::cooked_read_value): Likewise.
10823 (regcache::raw_write): Remove assert on m_readonly_p.
10824 (regcache::raw_supply_integer): Move it to
10825 detached_regcache::raw_supply_integer.
10826 (regcache::raw_supply_zeroed): Likewise.
10827 * regcache.h (detached_regcache) <raw_supply_integer>: New
10829 <raw_supply_zeroed, invalidate>: Likewise.
10830 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10831 <invalidate>: Likewise.
10832 <m_readonly_p>: Removed.
10836 * infcmd.c (get_return_value): Let stop_regs point to
10837 get_current_regcache.
10838 * regcache.c (regcache::regcache): Remove.
10839 (register_dump_reg_buffer): New class.
10840 (regcache_print): Adjust.
10841 * regcache.h (regcache): Remove constructors.
10845 * regcache.c (class register_dump): New class.
10846 (register_dump_regcache, register_dump_none): New class.
10847 (register_dump_remote, register_dump_groups): New class.
10848 (regcache_print): Update.
10849 * regcache.h (regcache_dump_what): Move it to regcache.c.
10850 (regcache) <dump>: Remove.
10854 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10856 (jit_unwind_reg_set_impl): Call raw_supply.
10857 (jit_frame_sniffer): Use reg_buffer_rw.
10858 * record-full.c (record_full_core_regbuf): Change its type.
10859 (record_full_core_open_1): Use reg_buffer_rw.
10860 (record_full_close): Likewise.
10861 (record_full_core_fetch_registers): Use regcache->raw_supply.
10862 (record_full_core_store_registers): Likewise.
10863 * regcache.c (regcache::get_register_status): Move it to
10865 (regcache_raw_set_cached_value): Remove.
10866 (regcache::raw_set_cached_value): Remove.
10867 (regcache::raw_write): Call raw_supply.
10868 (regcache::raw_supply): Move it to reg_buffer_rw.
10869 * regcache.h (regcache_raw_set_cached_value): Remove.
10870 (reg_buffer_rw): New class.
10874 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10875 readonly_detached_regcache.
10876 (dummy_frame_prev_register): Use regcache->cooked_read.
10877 * frame.c (frame_save_as_regcache): Change return type.
10878 (frame_pop): Update.
10879 * frame.h (frame_save_as_regcache): Update declaration.
10880 * inferior.h (get_infcall_suspend_state_regcache): Update
10882 * infrun.c (infcall_suspend_state) <registers>: use
10883 readonly_detached_regcache.
10884 (save_infcall_suspend_state): Don't use regcache_dup.
10885 (get_infcall_suspend_state_regcache): Change return type.
10886 * linux-fork.c (struct fork_info) <savedregs>: Change to
10887 readonly_detached_regcache.
10889 (fork_save_infrun_state): Don't use regcache_dup.
10890 (info_checkpoints_command): Adjust.
10891 * mi/mi-main.c (register_changed_p): Update declaration.
10892 (mi_cmd_data_list_changed_registers): Use
10893 readonly_detached_regcache.
10894 (register_changed_p): Change parameter type to
10895 readonly_detached_regcache.
10896 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10897 readonly_detached_regcache.
10898 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10899 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10901 (regcache::save): Move it to reg_buffer.
10902 (regcache::restore): Change parameter type.
10903 (regcache_dup): Remove.
10904 * regcache.h (reg_buffer) <save>: New method.
10905 (readonly_detached_regcache): New class.
10906 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10907 readonly_detached_regcache.
10908 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10912 * frame.c (frame_save_as_regcache): Use regcache method save.
10913 (frame_pop): Use regcache method restore.
10914 * infrun.c (restore_infcall_suspend_state): Likewise.
10915 * linux-fork.c (fork_load_infrun_state): Likewise.
10916 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10918 * regcache.c (regcache_save): Remove.
10919 (regcache::restore): More asserts.
10920 (regcache_cpy): Remove.
10921 * regcache.h (regcache_save): Remove the declaration.
10922 (regcache::restore): Move from private to public.
10923 Remove the friend declaration of regcache_cpy.
10924 (regcache_cpy): Remove declaration.
10928 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10929 parameter type to 'readable_regcache *'.
10930 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10931 * arm-tdep.c (arm_neon_quad_read): Likewise.
10932 (arm_pseudo_read): Likewise.
10933 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10934 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10935 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10936 * gdbarch.c: Re-generated.
10937 * gdbarch.h: Re-generated.
10938 * gdbarch.sh (pseudo_register_read): Change parameter type to
10939 'readable_regcache *'.
10940 (pseudo_register_read_value): Likewise.
10941 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10942 (h8300_pseudo_register_read): Likewise.
10943 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10944 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10945 (i386_pseudo_register_read_into_value): Likewise.
10946 (i386_pseudo_register_read_value): Likewise.
10947 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10949 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10950 * m32c-tdep.c (m32c_raw_read): Likewise.
10951 (m32c_read_flg): Likewise.
10952 (m32c_banked_register): Likewise.
10953 (m32c_banked_read): Likewise.
10954 (m32c_sb_read): Likewise.
10955 (m32c_part_read): Likewise.
10956 (m32c_cat_read): Likewise.
10957 (m32c_r3r2r1r0_read): Likewise.
10958 (m32c_pseudo_register_read): Likewise.
10959 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10960 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10961 (mep_pseudo_cr64_read): Likewise.
10962 (mep_pseudo_register_read): Likewise.
10963 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10964 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10965 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10966 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10967 (regcache::cooked_read): Likewise.
10968 (regcache::cooked_read_value): Likewise.
10969 (regcache_cooked_read_signed):
10970 (regcache::cooked_read): Likewise.
10971 * regcache.h (readable_regcache): New class.
10972 (regcache): Inherit readable_regcache. Move some methods to
10974 * rl78-tdep.c (rl78_pseudo_register_read): Change
10975 parameter type to 'readable_regcache *'.
10976 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10977 (e500_pseudo_register_read): Change parameter type to
10978 'readable_regcache *'.
10979 (dfp_pseudo_register_read): Likewise.
10980 (vsx_pseudo_register_read): Likewise.
10981 (efpr_pseudo_register_read): Likewise.
10982 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10983 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10984 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10985 (sh64_pseudo_register_read): Likewise.
10986 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10987 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10988 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10989 (spu_pseudo_register_read): Likewise.
10990 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10991 (xtensa_pseudo_register_read): Likewise.
10995 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10996 (regcache::arch): Move it to reg_buffer::arch.
10997 (regcache::register_buffer): Likewise.
10998 (regcache::assert_regnum): Likewise.
10999 (regcache::num_raw_registers): Likewise.
11000 * regcache.h (reg_buffer): New class.
11001 (regcache): Inherit reg_buffer.
11005 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11006 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11010 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11014 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11015 (SFILES): Remove common/*.c files.
11016 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11017 * common/common.host: Add common reference.
11018 * configure.ac: Likewise.
11019 * configure: Regenerate.
11023 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11024 (block_initialize_namespace): Use new.
11025 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11026 (dwarf2_free_objfile): Use delete.
11027 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11028 (copy_type_recursive): Use new.
11029 * gdb_obstack.h (allocate_on_obstack): New.
11034 * inferior.c (exit_inferior_1): Reset inf->control.
11038 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11043 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11044 frame_cleanup_after_sniffer on exception.
11048 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11050 (solib_bfd_open): Make pathname const.
11051 * solib.c (solib_bfd_open): Make pathname const.
11052 * solib-spu.c (spu_bfd_fopen): Make name const.
11053 (spu_bfd_open): Make pathname const.
11054 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11055 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11059 * symfile.c (symfile_bfd_open): Update.
11060 * source.h (openp, source_full_path_of, find_and_open_source):
11061 Change argument type to unique_xmalloc_ptr.
11062 * source.c (openp): Take a unique_xmalloc_ptr.
11063 (source_full_path_of, find_and_open_source): Likewise.
11064 (open_source_file, symtab_to_fullname): Update.
11065 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11066 unique_xmalloc_ptr.
11067 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11068 (exec_file_find): Update.
11069 * psymtab.c (psymtab_to_fullname): Update.
11070 * nto-tdep.h (nto_find_and_open_solib): Update.
11071 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11072 unique_xmalloc_ptr.
11073 * exec.c (exec_file_attach): Update.
11074 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11075 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11079 * solib.c: Include source.h.
11080 * nto-tdep.c: Include source.h.
11081 * mi/mi-cmd-env.c: Include source.h.
11082 * infcmd.c: Include source.h.
11083 * exec.c: Include source.h.
11084 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11085 (add_path, directory_switch, source_path, init_source_path): Move
11087 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11088 (add_path, directory_switch, source_path, init_source_path):
11093 * solist.h (exec_file_find, solib_find): Return
11094 unique_xmalloc_ptr.
11095 (solib_bfd_fopen): Take a const char *.
11096 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11097 (exec_file_find, solib_find): Likewise.
11098 (solib_bfd_fopen): Do not take ownership of "pathname".
11099 (solib_bfd_open): Use unique_xmalloc_ptr.
11100 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11101 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11102 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11103 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11107 * ada-lang.c (name_match_type_from_name): Remove reference to
11108 ada_name_for_lookup in function's documentation.
11109 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11113 * defs.h (enum openp_flags): New enum.
11114 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11115 Move to enum openp_flags.
11116 (openp_flags): New enum flags.
11117 (openp): Change parameter type to openp_flags.
11118 * source.c (openp): Change parameter type to openp_flags.
11119 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11120 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11124 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11129 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11131 (class dwarf2_queue_guard): ...the destructor of this new class.
11132 (dw2_do_instantiate_symtab): Create instance of the new class
11133 dwarf2_queue_guard, remove cleanup.
11137 * source.c (find_source_lines): Don't reference past the end of
11142 * remote.c (remote_btrace_maybe_reopen): Change error message.
11143 * btrace.c (btrace_enable): Likewise.
11144 (parse_xml_btrace): Likewise.
11145 (parse_xml_btrace_conf): Likewise.
11149 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11150 (linux_enable_pt, linux_enable_bts): Call
11151 diagnose_perf_event_open_fail.
11155 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11156 Remove parameter and change return type. Update callers. Move it.
11157 (linux_enable_bts, linux_enable_pt): Improve error message.
11158 (linux_enable_pt): Remove zero buffer size check.
11159 (linux_enable_btrace): Improve error messages. Remove NULL return
11164 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11165 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11166 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11167 (linux_supports_pt, linux_supports_btrace): Remove.
11168 (linux_enable_bts): Call cpu_supports_bts.
11169 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11170 * remote.c (remote_supports_btrace): Remove.
11171 (init_remote_ops): Remove remote_supports_btrace.
11172 * target-delegates.c: Regenerated.
11173 * target.c (target_supports_btrace): Remove.
11174 * target.h (target_ops) <to_supports_btrace>: Remove
11175 (target_supports_btrace): Remove.
11176 * x86-linux-nat.c (x86_linux_create_target): Remove
11177 linux_supports_btrace.
11181 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11183 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11184 exception and use message in own exception.
11188 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11189 (perf_event_pt_event_type): Use gdb_file_up.
11190 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11191 scoped_fd, and scoped_mmap.
11195 * common/scoped_mmap.h: New.
11196 * unittests/scoped_mmap-selftest.c: New.
11197 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11198 unittests/scoped_mmap-selftest.c.
11202 * common/scoped_fd.h: New.
11203 * unittests/scoped_fd-selftest.c: New.
11204 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11205 unittests/scoped_fd-selftest.c.
11209 * auto-load.c (auto_load_section_scripts): Use
11210 gdb::unique_xmalloc_ptr.
11214 * auto-load.c (execute_script_contents): Use std::string.
11218 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11219 Python function, rather than a new command.
11223 * solib.c (solib_find_1): Use std::string.
11224 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11228 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11232 * source.c (find_source_lines): Use gdb::def_vector.
11236 * macrocmd.c (struct temporary_macro_definition): New.
11237 (macro_define_command): Use temporary_macro_definition. Remove
11239 (free_macro_definition_ptr): Remove.
11243 * macroexp.c (maybe_expand): Use std::string.
11247 * macroexp.c (struct macro_buffer): Add initializers for some
11249 (init_buffer, init_shared_buffer, free_buffer)
11250 (free_buffer_return_text): Remove.
11251 (macro_buffer): New constructors.
11252 (~macro_buffer): New destructor.
11253 (macro_buffer::set_shared): New method.
11254 (macro_buffer::resize_buffer, macro_buffer::appendc)
11255 (macro_buffer::appendmem): Now methods, not free functions.
11256 (set_token, append_tokens_without_splicing, stringify)
11257 (macro_stringify): Update.
11258 (gather_arguments): Change return type. Remove argc_p argument,
11259 add args_ptr argument. Use std::vector.
11260 (substitute_args): Remove argc argument. Accept std::vector.
11261 (expand): Update. Use std::vector.
11262 (scan, macro_expand, macro_expand_next): Update.
11266 * symtab.c (default_collect_symbol_completion_matches_break_on):
11267 Use unique_xmalloc_ptr.
11268 * macroscope.h: (sal_macro_scope, user_macro_scope)
11269 (default_macro_scope): Return unique_xmalloc_ptr.
11270 * macroscope.c (sal_macro_scope, user_macro_scope)
11271 (default_macro_scope): Return unique_xmalloc_ptr.
11272 * macroexp.h (macro_expand, macro_expand_once): Return
11273 unique_xmalloc_ptr.
11274 * macroexp.c (macro_expand, macro_expand_once): Return
11275 unique_xmalloc_ptr.
11276 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11277 (info_macro_command, info_macros_command): Use
11278 unique_xmalloc_ptr.
11279 * compile/compile-c-support.c (write_macro_definitions): Use
11280 unique_xmalloc_ptr.
11281 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11285 * value.c (value_static_field): Assign field type instead of
11286 containing type when returning an optimized out value.
11290 * ft32-tdep.c (ft32_read_pc): Remove.
11291 (ft32_write_pc): Remove.
11292 (ft32_gdbarch_init): Update.
11293 * m32r-tdep.c (m32r_read_pc): Remove.
11294 (m32r_gdbarch_init): Update.
11295 * mep-tdep.c (mep_read_pc): Remove.
11296 (mep_gdbarch_init): Update.
11297 * microblaze-tdep.c (microblaze_write_pc): Remove.
11298 (microblaze_gdbarch_init): Update.
11299 * mn10300-tdep.c (mn10300_read_pc): Remove.
11300 (mn10300_write_pc): Remove.
11301 (mn10300_gdbarch_init): Update.
11302 * moxie-tdep.c (moxie_read_pc): Remove.
11303 (moxie_write_pc): Remove.
11304 (moxie_gdbarch_init): Update.
11308 * expprint.c (print_subexp_standard): Handle
11309 OP_F77_UNDETERMINED_ARGLIST.
11310 (dump_subexp_body_standard): Likewise.
11314 * target-descriptions.c (tdesc_element_visitor) Add empty
11316 (tdesc_type): Move make_gdb_type from here.
11317 (tdesc_type_builtin): Likewise.
11318 (tdesc_type_vector): Likewise.
11319 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11320 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11321 (make_gdb_type_union): Likewise.
11322 (make_gdb_type_flags): Likewise.
11323 (make_gdb_type_enum): Likewise.
11324 (make_gdb_type): New function.
11325 (tdesc_register_type): Use static make_gdb_type.
11329 * infcmd.c (default_print_one_register_info): Align natural-format
11330 column values consistently one under another.
11331 (pad_to_column): New function.
11335 * dwarf2read.c (dwarf2_physname): Move commment.
11339 * varobj.c (varobj_formatted_print_options): Allow recursive
11340 pretty printing if pretty printing is enabled.
11344 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11345 names after a structop as a filename.
11349 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11350 (arm_record_coproc_data_proc): Likewise.
11354 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11358 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11359 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11363 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11364 * inflow.c (child_terminal_save_inferior): Wrap reference to
11365 tcgetpgrp in HAVE_TERMIOS_H.
11366 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11368 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11369 always iterate over all inferiors.
11370 (gdbsim_cntrl_c): Adjust.
11371 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11375 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11376 index type is objfile-owned if the element type is as well.
11384 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11385 "features/s390x-linux64.c".
11386 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11387 s390_linux32 and s390x_linux64.
11388 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11390 * s390-tdep.c: Include "features/s390-linux32.c" and
11391 "features/s390x-linux64.c".
11392 (s390_tdesc_valid): Add check for tdesc_has_registers.
11393 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11394 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11395 tdesc_s390x_linux64.
11396 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11397 tdesc_s390x_linux64 to...
11398 * s390-tdep.h: ...here.
11403 * config.in, configure: Regenerate.
11404 * configure.ac: Check for getpgid.
11405 * go32-nat.c (go32_pass_ctrlc): New.
11406 (go32_target): Install it.
11407 * inf-child.c (inf_child_target): Install
11408 child_terminal_save_inferior, child_pass_ctrlc and
11410 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11411 (inf_ptrace_target): No longer install it.
11412 * infcmd.c (interrupt_target_1): Adjust.
11413 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11414 (child_interrupt): Declare.
11415 (inferior::terminal_state): New.
11416 * inflow.c (struct terminal_info): Update comments.
11417 (inferior_process_group): Delete.
11418 (terminal_is_ours): Delete.
11419 (gdb_tty_state): New.
11420 (child_terminal_init): Adjust.
11421 (is_gdb_terminal, sharing_input_terminal_1)
11422 (sharing_input_terminal): New functions.
11423 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11424 Set the process's actual process group in the foreground if
11425 possible. Handle is_ours_for_output/is_ours distinction. Don't
11426 mark terminal as the inferior's if not sharing GDB's terminal.
11427 Don't check attach_flag.
11428 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11429 pass down a target_terminal_state.
11430 (child_terminal_save_inferior): New, factored out from ...
11431 (child_terminal_ours_1): ... this. Handle
11432 target_terminal_state::is_ours_for_output.
11433 (child_interrupt, child_pass_ctrlc): New.
11434 (inflow_inferior_exit): Clear the inferior's terminal_state.
11435 (copy_terminal_info): Copy the inferior's terminal state.
11436 (_initialize_inflow): Remove reference to terminal_is_ours.
11437 * inflow.h (inferior_process_group): Delete.
11438 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11439 * procfs.c (procfs_target): Don't install procfs_interrupt.
11440 (procfs_interrupt): Delete.
11441 * remote.c (remote_serial_quit_handler): Adjust.
11442 (remote_interrupt): Remove ptid parameter. Adjust.
11443 * target-delegates.c: Regenerate.
11444 * target.c: Include "terminal.h".
11445 (target_terminal::terminal_state): Rename to ...
11446 (target_terminal::m_terminal_state): ... this.
11447 (target_terminal::init): Adjust.
11448 (target_terminal::inferior): Adjust to per-inferior
11450 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11451 (target_terminal::ours, target_terminal::ours_for_output): Use
11452 target_terminal_is_ours_kind.
11453 (target_interrupt): Remove ptid parameter. Adjust.
11454 (default_target_pass_ctrlc): Adjust.
11455 * target.h (target_ops::to_terminal_save_inferior): New field.
11456 (target_ops::to_interrupt): Remove ptid_t parameter.
11457 (target_interrupt): Remove ptid_t parameter. Update comment.
11458 (target_pass_ctrlc): Update comment.
11459 * target/target.h (target_terminal_state): New scoped enum,
11460 factored out of ...
11461 (target_terminal::terminal_state): ... here.
11462 (target_terminal::inferior): Update comments.
11463 (target_terminal::restore_inferior): New.
11464 (target_terminal::is_inferior, target_terminal::is_ours)
11465 (target_terminal::is_ours_for_output): Adjust.
11466 (target_terminal::scoped_restore_terminal_state): Adjust to
11467 rename, and call restore_inferior() instead of inferior().
11468 (target_terminal::scoped_restore_terminal_state::m_state): Change
11470 (target_terminal::terminal_state): Rename to ...
11471 (target_terminal::m_terminal_state): ... this and change type.
11475 * linux-nat.c (wait_for_signal): New function.
11476 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11478 (async_terminal_is_ours)
11479 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11480 (linux_nat_add_target): Don't override
11481 to_terminal_inferior/to_terminal_ours.
11485 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11489 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11490 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11491 dwarf2_per_objfile_free here.
11492 (dwarf2_per_objfile_free): Remove.
11493 (_initialize_dwarf2_read): Don't register
11494 dwarf2_per_objfile_free as a registry cleanup.
11498 Avoid compilation errors in MinGW native builds
11500 The error is triggered by including python-internal.h, and the
11503 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11504 from build-gnulib/import/math.h:27,
11505 from d:/usr/Python26/include/pyport.h:235,
11506 from d:/usr/Python26/include/Python.h:58,
11507 from python/python-internal.h:94,
11508 from python/py-arch.c:24:
11509 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11513 This happens because Python headers define 'hypot' to expand t
11514 '_hypot' in the Windows builds.
11515 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11516 'hypoth'. This avoids a compilation error.
11520 * MAINTAINERS (Write After Approval): Fix ordering.
11524 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11528 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11529 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11530 Remove nop. Make const. Comment.
11531 (powerpc32_plt_stub_so_2): New.
11532 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11533 Correct count. Update uses.
11534 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11535 Move common code reading PLT entry word. Correct
11536 powerpc32_plt_stub PLT address calculation.
11537 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11538 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11539 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11540 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11541 (ppc64_standard_linkage8): Likewise.
11542 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11543 Correct insns description.
11544 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11548 GCC PR libstdc++/83906
11549 * gdbtypes.c (operator==(const dynamic_prop &,
11550 const dynamic_prop &)): New.
11551 (operator==(const range_bounds &, const range_bounds &)): New.
11552 (check_types_equal): Use them instead of memcmp.
11553 * gdbtypes.h (operator==(const dynamic_prop &,
11554 const dynamic_prop &)): Declare.
11555 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11556 (operator==(const range_bounds &, const range_bounds &)): Declare.
11557 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11561 * s390-linux-tdep.c (s390_record_address_mask)
11562 (s390_record_calc_disp_common, s390_record_calc_disp)
11563 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11564 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11565 (s390_process_record): Move to s390-tdep.c.
11566 (s390_linux_init_abi_any): Adjust.
11567 * s390-tdep.c (s390_record_address_mask)
11568 (s390_record_calc_disp_common, s390_record_calc_disp)
11569 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11570 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11571 (s390_process_record): Moved from s390-linux-tdep.c
11572 (s390_gdbarch_init): Adjust.
11576 * s390-linux-nat.c (s390-tdep.h): New include.
11577 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11578 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11579 (ALLDEPFILES): Add s390-tdep.c.
11580 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11581 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11582 * s390-tdep.h: ...this. New file.
11583 * s390-linux-tdep.c (s390-tdep.h): New include.
11584 (_initialize_s390_tdep): Rename to...
11585 (_initialize_s390_linux_tdep): ...this and adjust.
11586 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11587 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11589 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11590 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11591 (s390_is_partial_instruction, s390_software_single_step)
11592 (is_non_branch_ril, s390_displaced_step_copy_insn)
11593 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11594 (s390_prologue_data, s390_addr, s390_store, s390_load)
11595 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11596 (s390_register_call_saved, s390_guess_tracepoint_registers)
11597 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11598 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11599 (s390_pseudo_register_name, s390_pseudo_register_type)
11600 (s390_pseudo_register_read, s390_pseudo_register_write)
11601 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11602 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11603 (s390_addr_bits_remove, s390_address_class_type_flags)
11604 (s390_address_class_type_flags_to_name)
11605 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11606 (s390_function_arg_float, s390_function_arg_vector)
11607 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11608 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11609 (s390_frame_align, s390_register_return_value, s390_return_value)
11610 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11611 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11612 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11613 (s390_trad_frame_prev_register, s390_unwind_cache)
11614 (s390_prologue_frame_unwind_cache)
11615 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11616 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11617 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11618 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11619 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11620 (s390_frame_base_address, s390_local_base_address)
11621 (s390_frame_base, s390_gcc_target_options)
11622 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11623 (s390_validate_reg_range, s390_tdesc_valid)
11624 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11625 * s390-tdep.c: ...this. New file.
11629 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11630 (s390_process_record, s390_gdbarch_tdep_alloc)
11631 (s390_linux_init_abi_any): Use/set new hook.
11635 * s390-linux-tdep.c (osabi.h): New include.
11636 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11637 (s390_linux_init_abi_any): New functions.
11638 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11642 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11643 tdesc_has_registers check
11647 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11648 (s390_validate_reg_range): New macro.
11649 (s390_gdbarch_init): Adjust.
11653 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11654 (s390_gdbarch_tdep_alloc): Adjust.
11655 (s390_gdbarch_init): Adjust.
11659 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11660 <have_tdb>: Change type to bool.
11661 (s390_gdbarch_tdep_alloc): Adjust.
11662 (s390_gdbarch_init): Adjust.
11666 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11667 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11668 (s390_gdbarch_tdep_alloc): New function.
11669 (s390_gdbarch_init): Allocate tdep at start and use its fields
11670 instead of separate variables.
11674 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11675 when looking for cached gdbarch and add comment for remaining.
11680 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11685 * MAINTAINERS: Update my company e-mail address.
11689 * regcache.c (cooked_write_test): New function.
11690 (_initialize_regcache): Register the test.
11694 * ia64-tdep.c (ia64_pseudo_register_read): Call
11695 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11696 * m32c-tdep.c (m32c_cat_read): Likewise.
11697 (m32c_r3r2r1r0_read): Likewise.
11698 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11699 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11703 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11704 method raw_read instead of regcache_raw_read.
11705 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11706 * arm-tdep.c (arm_neon_quad_read): Likewise.
11707 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11708 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11709 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11710 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11711 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11712 (i386_pseudo_register_read_into_value): Likewise.
11713 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11714 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11715 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11716 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11717 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11718 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11719 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11720 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11721 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11725 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11726 * configure.tgt: Remove target mt.
11727 * mt-tdep.c: Remove.
11728 * regcache.c (cooked_read_test): Remove the check for mt.
11732 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11733 instead of gdbarch_pseudo_register_read_value.
11737 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11742 * linespec.c (create_sals_line_offset): Remove code that preserved
11743 the symtab_and_line's line number.
11747 * varobj.c (varobj_create): Don't set valid_block when creating a
11752 * varobj.c (varobj_create): Remove out of date comment.
11757 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11758 updating innermost block.
11759 * parse.c (innermost_block_tracker::update): Take extra type
11760 parameter, and check types match before updating innermost block.
11761 (write_dollar_variable): Update innermost block for registers.
11762 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11763 (innermost_block_tracker::innermost_block_tracker): Initialise
11765 (innermost_block_tracker::reset): Take type parameter.
11766 (innermost_block_tracker::update): Take type parameter, and pass
11767 type through as needed.
11768 (innermost_block_tracker::m_types): New member.
11769 * varobj.c (varobj_create): Pass type when reseting innermost
11774 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11775 * ada-lang.c (resolve_subexp): Likewise.
11776 * breakpoint.c (set_breakpoint_condition) Likewise.
11777 (watch_command_1) Likewise.
11778 * c-exp.y (variable): Likewise.
11779 * d-exp.y (PrimaryExpression): Likewise.
11780 * f-exp.y (variable): Likewise.
11781 * go-exp.y (variable): Likewise.
11782 * m2-exp.y (variable): Likewise.
11783 * objfiles.c (objfile::~objfile): Likewise.
11784 * p-exp.y (variable): Likewise.
11785 * parse.c (innermost_block): Change type.
11786 * parser-defs.h (class innermost_block_tracker): New.
11787 (innermost_block): Change to innermost_block_tracker.
11788 * printcmd.c (display_command): Switch to innermost_block API.
11789 (do_one_display): Likewise.
11790 * rust-exp.y (do_one_display): Likewise.
11791 * symfile.c (clear_symtab_users): Likewise.
11792 * varobj.c (varobj_create): Switch to innermost_block API, replace
11793 use of innermost_block with block stored on varobj object.
11797 * expression.h (innermost_block): Remove declaration.
11798 * varobj.c: Add 'parser-defs.h' include.
11802 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11803 symbols in the static and global blocks.
11807 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11808 gdb_ptrace.h, and move including gdb_wait.h ...
11809 * nat/linux-ptrace.h: ... to here.
11813 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11814 inf_ptrace_detach_success.
11815 (inf_ptrace_detach_success): Add inferior parameter, use it
11816 instead of inferior_ptid, pass it to detach_inferior.
11817 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11819 * inferior.c (detach_inferior): Add overload that takes an
11821 * inferior.h (detach_inferior): Likewise.
11822 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11823 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11824 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11828 * target.h (struct target_ops) <to_detach>: Add inferior
11830 (target_detach): Likewise.
11831 * target.c (dispose_inferior): Pass inferior down.
11832 (target_detach): Pass inferior down. Assert that it is equal to
11833 the current inferior.
11834 * aix-thread.c (aix_thread_detach): Pass inferior down.
11835 * corefile.c (core_file_command): Pass current_inferior() down.
11836 * corelow.c (core_detach): Add inferior parameter.
11837 * darwin-nat.c (darwin_detach): Likewise.
11838 * gnu-nat.c (gnu_detach): Likewise.
11839 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11840 * infcmd.c (detach_command): Pass current_inferior() down to
11842 * infrun.c (follow_fork_inferior): Pass parent_inf to
11844 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11846 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11847 * linux-thread-db.c (thread_db_detach): Likewise.
11848 * nto-procfs.c (procfs_detach): Likewise.
11849 * procfs.c (procfs_detach): Likewise.
11850 * record.c (record_detach): Likewise.
11851 * record.h (struct inferior): Forward-declare.
11852 (record_detach): Add inferior parameter.
11853 * remote-sim.c (gdbsim_detach): Likewise.
11854 * remote.c (remote_detach_1): Likewise.
11855 (remote_detach): Likewise.
11856 (extended_remote_detach): Likewise.
11857 * sol-thread.c (sol_thread_detach): Likewise.
11858 * target-debug.h (target_debug_print_inferior_p): New macro.
11859 * target-delegates.c: Re-generate.
11860 * top.c (kill_or_detach): Pass inferior down to target_detach.
11861 * windows-nat.c (windows_detach): Add inferior parameter.
11865 * target.h (struct target_ops) <to_detach>: Remove args
11867 (target_detach): Likewise.
11868 * target.c (dispose_inferior): Adjust.
11869 (target_detach): Remove args parameter, adjust.
11870 * aix-thread.c (aix_thread_detach): Adjust.
11871 * corefile.c (core_file_command): Adjust.
11872 * corelow.c (core_detach): Adjust.
11873 * darwin-nat.c (darwin_detach): Adjust.
11874 * gnu-nat.c (gnu_detach): Adjust.
11875 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11876 * infcmd.c (detach_command): Adjust
11877 * infrun.c (follow_fork_inferior): Adjust.
11878 (handle_vfork_child_exec_or_exit): Adjust.
11879 * linux-fork.c (linux_fork_detach): Remove args parameter.
11880 * linux-fork.h (linux_fork_detach): Likewise.
11881 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11882 * linux-thread-db.c (thread_db_detach): Likewise.
11883 * nto-procfs.c (procfs_detach): Likewise.
11884 * procfs.c (procfs_detach): Likewise.
11885 (do_detach): Remove signo parameter.
11886 * record.c (record_detach): Remove args parameter.
11887 * record.h (record_detach): Likewise.
11888 * remote-sim.c (gdbsim_detach): Likewise.
11889 * remote.c (remote_detach_1): Likewise.
11890 (remote_detach): Likewise.
11891 (extended_remote_detach): Likewise.
11892 * sol-thread.c (sol_thread_detach): Likewise.
11893 * target-delegates.c: Re-generate.
11894 * top.c (struct qt_args) <args>: Remove field.
11895 (kill_or_detach): Don't pass args.
11896 (quit_force): Don't set args.
11897 * windows-nat.c (windows_detach): Remove args parameter.
11901 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11902 (arm_linux_init_abi): Install it.
11906 * osabi.c (gdb_osabi_names): Extend the regexp for
11907 arm-linux-gnueabihf.
11911 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11913 (abbrev_table::add_abbrev): Update.
11914 (abbrev_table::lookup_abbrev): Update.
11918 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11922 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11927 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11931 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11932 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11933 (create_array_type_with_stride): Update.
11934 * dwarf2read.c (set_die_type): Update.
11938 * dwarf2read.c (delayed_method_info): Remove typedef.
11939 (dwarf2_cu::method_info): Now a std::vector.
11940 (add_to_method_list): Update.
11941 (free_delayed_list): Remove.
11942 (compute_delayed_physnames): Update.
11943 (process_full_comp_unit, process_full_type_unit): Clear the method
11944 list. Remove cleanups.
11945 (psymtab_include_file_name): Add name_holder parameter. Use
11946 unique_xmalloc_ptr.
11947 (dwarf_decode_lines): Update.
11952 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11953 (dwarf2_per_objfile::free_cached_comp_units)
11954 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11955 (init_cutu_and_read_dies_no_follow): Update.
11956 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11957 (dwarf2_cu::~dwarf2_cu): New.
11958 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11959 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11964 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11965 (struct die_reader_specs) <abbrev_table>: New member.
11966 (struct abbrev_table): Add constructor.
11967 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11968 <abbrev_obstack>: Now an auto_obstack.
11969 (abbrev_table_up): New typedef.
11970 (init_cu_die_reader): Add abbrev_table parameter.
11971 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11972 Add result_dwo_abbrev_table.
11973 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11974 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11976 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11978 (skip_children): Update.
11979 (abbrev_table::alloc_abbrev): Rename from
11980 abbrev_table_alloc_abbrev.
11981 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11982 (abbrev_table::lookup_abbrev): Rename from
11983 abbrev_table_lookup_abbrev.
11984 (abbrev_table_read_table): Return abbrev_table_up.
11985 (abbrev_table_free, abbrev_table_free_cleanup)
11986 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11987 (load_partial_dies): Update.
11991 * dwarf2read.c (dwarf2_compute_name): Update comment.
11992 (read_func_scope, read_variable): Update.
11993 (new_symbol): Remove.
11994 (new_symbol_full): Rename to new_symbol.
11999 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12000 a warning instead of throwing an error, set section size to 0 and return
12002 * gdb_bfd.h (gdb_bfd_map_section): Update description.
12006 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12008 (linux_ptrace_attach_fail_reason_string): Likewise.
12009 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12011 (linux_ptrace_attach_fail_reason_string): Likewise.
12012 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12016 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12021 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12022 checking for fs_base/gs_base fields in struct user_regs_struct.
12023 * configure: Regenerate.
12027 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12029 (aarch64_linux_init_abi): Install it to gdbarch hook
12030 gcc_target_options.
12034 * common/signals-state-save-restore.c
12035 (save_original_signals_state): Fix typos.
12040 * Makefile.in (install-only): Install gdb-add-index.
12044 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12048 * infrun.c (keep_going_pass_signal): Clear step-over info when
12049 insert_breakpoints fails.
12054 * infrun.c (resume): Rename to ...
12055 (resume_1): ... this.
12056 (resume): Reimplement as wrapper around resume_1.
12061 * remote.c (remote_parse_stop_reply): Default to the last-set
12062 general thread instead of to 'magic_null_ptid'.
12066 * language.h (language_get_symbol_name_matcher): Rename ...
12067 (get_symbol_name_matcher): ... this.
12068 * language.c (language_get_symbol_name_matcher): Ditto.
12069 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12076 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12077 Adjust to use language_get_symbol_name_matcher instead of
12078 language_defn::la_get_symbol_name_matcher.
12079 * language.c (language_get_symbol_name_matcher): If in Ada mode
12080 and the lookup name is a verbatim match, return Ada's matcher.
12081 * language.h (language_get_symbol_name_matcher): Adjust comment.
12082 (ada_lookup_name_info::verbatim_p):: New method.
12087 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12088 minsym's language is language_auto or language_cplus, pass down
12089 language_ada instead.
12090 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12095 * minsyms.c (linkage_name_str): New function.
12096 (iterate_over_minimal_symbols): Use it.
12100 * NEWS: Document that 'info proc' now works on FreeBSD.
12104 * configure.ac: Check for kinfo_getfile in libutil.
12105 * configure: Regenerate.
12106 * config.in: Regenerate.
12107 * fbsd-nat.c: Include "fbsd-tdep.h".
12108 (fbsd_fetch_cmdline): New.
12109 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12110 rather than calling error.
12111 (fbsd_info_proc): New.
12112 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12113 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12114 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12118 * fbsd-nat.c (struct free_deleter): Remove.
12119 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12123 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12124 NULL for an empty pathname.
12128 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12129 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12130 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12131 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12132 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12133 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12134 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12135 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12136 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12137 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12138 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12139 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12140 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12141 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12142 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12146 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12147 (gnu_xfer_auxv): New function.
12148 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12149 TARGET_OBJECT_AUXV.
12154 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12156 (COMMON_OBS): Remove selftest.o.
12157 * configure.ac: Append selftest-arch.c and common/selftest.c to
12158 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12159 * configure: Re-generated.
12160 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12162 (maintenance_info_selftests): Likewise.
12166 * ada-valprint.c (val_print_packed_array_elements): Use
12167 proper number of elements when printing an array indexed
12168 by an enumeration type.
12172 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12173 (dw2_get_file_names_reader): Adjust.
12174 (lookup_dwo_signatured_type): Adjust.
12175 (lookup_dwp_signatured_type): Adjust.
12176 (lookup_signatured_type): Adjust.
12177 (create_type_unit_group): Adjust.
12178 (get_type_unit_group): Adjust.
12179 (process_psymtab_comp_unit_reader): Adjust.
12180 (build_type_psymtabs_reader): Adjust.
12181 (scan_partial_symbols): Adjust.
12182 (add_partial_symbol): Adjust.
12183 (add_partial_subprogram): Adjust.
12184 (peek_die_abbrev): Adjust.
12185 (fixup_go_packaging): Adjust.
12186 (process_imported_unit_die): Adjust.
12187 (dwarf2_compute_name): Adjust.
12188 (dwarf2_physname): Adjust.
12189 (read_import_statement): Adjust.
12190 (handle_DW_AT_stmt_list): Adjust.
12191 (read_file_scope): Adjust.
12192 (read_func_scope): Adjust.
12193 (read_lexical_block_scope): Adjust.
12194 (read_call_site_scope): Adjust.
12195 (read_variable): Adjust.
12196 (dwarf2_rnglists_process): Adjust.
12197 (dwarf2_ranges_process): Adjust.
12198 (dwarf2_ranges_read): Adjust.
12199 (dwarf2_get_pc_bounds): Adjust.
12200 (dwarf2_record_block_ranges): Adjust.
12201 (dwarf2_add_field): Adjust.
12202 (dwarf2_add_member_fn): Adjust.
12203 (read_structure_type): Adjust.
12204 (process_structure_scope): Adjust.
12205 (read_enumeration_type): Adjust.
12206 (read_array_type): Adjust.
12207 (mark_common_block_symbol_computed): Adjust.
12208 (read_common_block): Adjust.
12209 (read_namespace_type): Adjust.
12210 (read_namespace): Adjust.
12211 (read_module_type): Adjust.
12212 (read_tag_pointer_type): Adjust.
12213 (read_tag_ptr_to_member_type): Adjust.
12214 (read_tag_string_type): Adjust.
12215 (read_subroutine_type): Adjust.
12216 (read_typedef): Adjust.
12217 (read_base_type): Adjust.
12218 (attr_to_dynamic_prop): Adjust.
12219 (read_subrange_type): Adjust.
12220 (read_unspecified_type): Adjust.
12221 (dwarf2_read_abbrevs): Adjust.
12222 (load_partial_dies): Adjust.
12223 (read_partial_die): Adjust.
12224 (find_partial_die): Adjust.
12225 (guess_partial_die_structure_name): Adjust.
12226 (fixup_partial_die): Adjust.
12227 (read_attribute_value): Adjust.
12228 (read_addr_index): Adjust.
12229 (read_addr_index_from_leb128): Adjust.
12230 (read_str_index): Adjust.
12231 (dwarf2_string_attr): Adjust.
12232 (get_debug_line_section): Adjust.
12233 (dwarf_decode_line_header): Adjust.
12234 (lnp_state_machine::check_line_address): Adjust.
12235 (dwarf_decode_lines_1): Adjust.
12236 (dwarf_decode_lines): Adjust.
12237 (dwarf2_start_symtab): Adjust.
12238 (var_decode_location): Adjust.
12239 (new_symbol_full): Adjust.
12240 (dwarf2_const_value_data): Adjust.
12241 (dwarf2_const_value_attr): Adjust.
12242 (dwarf2_const_value): Adjust.
12243 (die_type): Adjust.
12244 (die_containing_type): Adjust.
12245 (build_error_marker_type): Adjust.
12246 (lookup_die_type): Adjust.
12247 (guess_full_die_structure_name): Adjust.
12248 (anonymous_struct_prefix): Adjust.
12249 (determine_prefix): Adjust.
12250 (dwarf2_name): Adjust.
12251 (follow_die_ref_or_sig): Adjust.
12252 (follow_die_offset): Adjust.
12253 (follow_die_ref): Adjust.
12254 (follow_die_sig_1): Adjust.
12255 (follow_die_sig): Adjust.
12256 (get_signatured_type): Adjust.
12257 (get_DW_AT_signature_type): Adjust.
12258 (decode_locdesc): Adjust.
12259 (dwarf_decode_macros): Adjust.
12260 (cu_debug_loc_section): Adjust.
12261 (fill_in_loclist_baton): Adjust.
12262 (dwarf2_symbol_mark_computed): Adjust.
12263 (init_one_comp_unit): Don't assign
12264 dwarf2_cu::dwarf2_per_objfile.
12265 (set_die_type): Adjust.
12269 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12270 <dwarf2_per_objfile>: New field.
12271 (dwarf2_per_objfile): Remove global.
12272 (get_dwarf2_per_objfile): New function.
12273 (set_dwarf2_per_objfile): New function.
12274 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12275 dwarf2_per_objfile.
12276 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12277 (read_abbrev_offset): Likewise.
12278 (read_indirect_string): Likewise.
12279 (read_indirect_line_string): Likewise.
12280 (read_indirect_string_at_offset): Likewise.
12281 (read_indirect_string_from_dwz): Likewise.
12282 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12283 dwarf2_per_objfile.
12284 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12285 (create_all_comp_units): Change objfile parameter to
12286 dwarf2_per_objfile.
12287 (create_all_type_units): Likewise.
12288 (process_queue): Add dwarf2_per_objfile parameter.
12289 (read_and_check_comp_unit_head): Likewise.
12290 (lookup_dwo_unit_in_dwp): Likewise.
12291 (get_dwp_file): Likewise.
12292 (process_cu_includes): Likewise.
12293 (struct free_dwo_file_cleanup_data): New struct.
12294 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12295 set_dwarf2_per_objfile.
12296 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12297 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12298 context, adjust calls.
12299 (dw2_instantiate_symtab): Likewise.
12300 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12301 (dw2_get_cu): Likewise.
12302 (create_cu_from_index_list): Change objfile parameter to
12303 dwarf2_per_objfile.
12304 (create_cus_from_index_list): Get dwarf2_per_objfile from
12305 context, adjust calls.
12306 (create_cus_from_index): Likewise.
12307 (create_signatured_type_table_from_index): Change objfile
12308 parameter to dwarf2_per_objfile.
12309 (create_signatured_type_table_from_debug_names): Change objfile
12310 parameter to dwarf2_per_objfile.
12311 (create_addrmap_from_index): Likewise.
12312 (create_addrmap_from_aranges): Likewise.
12313 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12314 (dw2_setup): Remove.
12315 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12317 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12318 get_dwarf2_per_objfile.
12319 (dw2_forget_cached_source_info): Likewise.
12320 (dw2_map_symtabs_matching_filename): Likewise.
12321 (struct dw2_symtab_iterator) <index>: Remove.
12322 <dwarf2_per_objfile>: New field.
12323 (dw2_symtab_iter_init): Replace index parameter with
12324 dwarf2_per_objfile.
12325 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12326 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12327 (dw2_print_stats): Likewise.
12328 (dw2_dump): Likewise.
12329 (dw2_expand_symtabs_for_function): Likewise.
12330 (dw2_expand_all_symtabs): Likewise.
12331 (dw2_expand_symtabs_with_fullname): Likewise.
12332 (dw2_expand_marked_cus): Replace index and objfile parameters
12333 with dwarf2_per_objfile.
12334 (dw_expand_symtabs_matching_file_matcher): Add
12335 dwarf2_per_objfile parameter and adjust calls.
12336 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12338 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12339 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12341 (create_cus_from_debug_names_list): Replace objfile parameter
12342 with dwarf2_per_objfile and adjust calls.
12343 (create_cus_from_debug_names): Likewise.
12344 (dwarf2_read_debug_names): Likewise.
12345 (mapped_debug_names::namei_to_name): Adjust call.
12346 (dw2_debug_names_iterator::next): Likewise.
12347 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12348 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12349 (dw2_debug_names_dump): Likewise.
12350 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12351 (dw2_debug_names_expand_symtabs_matching): Likewise.
12352 (dwarf2_initialize_objfile): Likewise.
12353 (dwarf2_build_psymtabs): Likewise.
12354 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12356 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12357 (read_and_check_comp_unit_head): Likewise.
12358 (read_abbrev_offset): Likewise.
12359 (create_debug_type_hash_table): Likewise.
12360 (create_debug_types_hash_table): Likewise.
12361 (create_all_type_units): Replace objfile parameter with
12362 dwarf2_per_objfile.
12363 (add_type_unit): Add dwarf2_per_objfile parameter.
12364 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12365 with dwarf2_per_objfile.
12366 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12367 (lookup_dwp_signatured_type): Likewise.
12368 (lookup_signatured_type): Likewise.
12369 (read_cutu_die_from_dwo): Likewise.
12370 (init_tu_and_read_dwo_dies): Likewise.
12371 (init_cutu_and_read_dies): Likewise.
12372 (init_cutu_and_read_dies_no_follow): Likewise.
12373 (allocate_type_unit_groups_table): Add objfile parameter.
12374 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12375 (get_type_unit_group): Likewise.
12376 (process_psymtab_comp_unit): Update call.
12377 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12378 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12379 (print_tu_stats): Likewise.
12380 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12381 in void* parameter.
12382 (build_type_psymtabs): Change objfile parameter to
12383 dwarf2_per_objfile.
12384 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12385 passed in void* parameter.
12386 (process_skeletonless_type_units): Change objfile parameter to
12387 dwarf2_per_objfile.
12388 (set_partial_user): Likewise.
12389 (dwarf2_build_psymtabs_hard): Likewise.
12390 (read_comp_units_from_section): Likewise.
12391 (create_all_comp_units): Likewise.
12392 (scan_partial_symbols): Update calls.
12393 (add_partial_symbol): Likewise.
12394 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12395 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12396 (process_queue): Add dwarf2_per_objfile parameter.
12397 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12398 (compute_compunit_symtab_includes): Likewise.
12399 (process_cu_includes): Add dwarf2_per_objfile parameter.
12400 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12401 (process_full_type_unit): Likewise.
12402 (process_imported_unit_die): Update call.
12403 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12404 (read_file_scope): Likewise.
12405 (allocate_dwo_file_hash_table): Add objfile parameter.
12406 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12407 (create_cus_hash_table): Likewise.
12408 (create_dwp_hash_table): Likewise.
12409 (create_dwo_unit_in_dwp_v1): Likewise.
12410 (create_dwp_v2_section): Likewise.
12411 (create_dwo_unit_in_dwp_v2): Likewise.
12412 (lookup_dwo_unit_in_dwp): Likewise.
12413 (try_open_dwop_file): Likewise.
12414 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12415 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12416 cleanup to include a reference to dwarf2_per_objfile.
12417 (open_dwp_file): Add dwarf2_per_objfile parameter.
12418 (open_and_init_dwp_file): Likewise.
12419 (get_dwp_file): Likewise.
12420 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12421 (queue_and_load_all_dwo_tus): Update call.
12422 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12424 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12425 (dwarf2_ranges_process): Likewise.
12426 (dwarf2_get_pc_bounds): Likewise.
12427 (mark_common_block_symbol_computed): Likewise.
12428 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12429 (dwarf2_read_abbrevs): Update call.
12430 (read_partial_die): Use dwarf2_per_objfile from cu.
12431 (find_partial_die): Likewise.
12432 (fixup_partial_die): Likewise.
12433 (read_attribute_value): Likewise.
12434 (read_indirect_string_at_offset_from): Add objfile parameter.
12435 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12437 (read_indirect_string_from_dwz): Add objfile parameter.
12438 (read_indirect_string): Add objfile parameter.
12439 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12440 (read_addr_index): Use dwarf2_per_objfile from cu.
12441 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12443 (read_str_index): Use dwarf2_per_objfile from cu.
12444 (get_debug_line_section): Likewise.
12445 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12446 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12447 (new_symbol_full): Use dwarf2_per_objfile from cu.
12448 (build_error_marker_type): Likewise.
12449 (lookup_die_type): Likewise.
12450 (determine_prefix): Likewise.
12451 (follow_die_offset): Likewise.
12452 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12453 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12454 (dwarf2_fetch_die_type_sect_off): Likewise.
12455 (dwarf2_get_die_type): Likewise.
12456 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12457 (get_signatured_type): Likewise.
12458 (get_DW_AT_signature_type): Likewise.
12459 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12460 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12461 (cu_debug_loc_section): Likewise.
12462 (fill_in_loclist_baton): Likewise.
12463 (dwarf2_symbol_mark_computed): Likewise.
12464 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12465 dwarf2_per_objfile.
12466 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12468 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12469 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12470 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12471 (set_die_type): Use dwarf2_free_objfile from cu.
12472 (get_die_type_at_offset): Likewise.
12473 (dwarf2_per_objfile_free): Don't assign global variable.
12474 (debug_names) <constructor>: Add dwarf2_per_objfile
12475 parameter, update m_debugstrlookup construction.
12476 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12478 <m_dwarf2_per_objfile>: New field.
12479 <lookup>: Use m_dwarf2_per_objfile.
12480 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12481 (psyms_seen_size): Likewise.
12482 (write_gdbindex): Replace objfile parameter with
12483 dwarf2_per_objfile.
12484 (write_debug_names): Likewise.
12485 (write_psymtabs_to_index): Likewise.
12486 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12491 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12492 <dwarf2_per_objfile>: New field.
12493 (struct dwarf2_per_cu_data) <objfile>: Remove.
12494 <dwarf2_per_objfile>: New field.
12495 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12497 (create_signatured_type_table_from_index): Likewise.
12498 (create_debug_type_hash_table): Likewise.
12499 (fill_in_sig_entry_from_dwo_entry): Likewise.
12500 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12501 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12503 (create_partial_symtab): Access objfile through
12504 dwarf2_per_objfile.
12505 (process_psymtab_comp_unit_reader): Likewise.
12506 (read_comp_units_from_section): Likewise.
12507 (scan_partial_symbols): Likewise.
12508 (add_partial_symbol): Likewise.
12509 (add_partial_subprogram): Likewise.
12510 (peek_die_abbrev): Likewise.
12511 (fixup_go_packaging): Likewise.
12512 (process_full_comp_unit): Likewise.
12513 (process_full_type_unit): Likewise.
12514 (process_imported_unit_die): Likewise.
12515 (dwarf2_compute_name): Likewise.
12516 (dwarf2_physname): Likewise.
12517 (read_import_statement): Likewise.
12518 (create_cus_hash_table): Assign dwarf2_physname instead of
12520 (read_func_scope): Access objfile through dwarf2_per_objfile.
12521 (read_lexical_block_scope): Likewise.
12522 (read_call_site_scope): Likewise.
12523 (read_variable): Likewise.
12524 (dwarf2_rnglists_process): Likewise.
12525 (dwarf2_ranges_process): Likewise.
12526 (dwarf2_ranges_read): Likewise.
12527 (dwarf2_record_block_ranges): Likewise.
12528 (dwarf2_add_field): Likewise.
12529 (dwarf2_add_member_fn): Likewise.
12530 (read_structure_type): Likewise.
12531 (process_structure_scope): Likewise.
12532 (read_enumeration_type): Likewise.
12533 (read_array_type): Likewise.
12534 (read_common_block): Likewise.
12535 (read_namespace_type): Likewise.
12536 (read_namespace): Likewise.
12537 (read_module_type): Likewise.
12538 (read_tag_pointer_type): Likewise.
12539 (read_tag_ptr_to_member_type): Likewise.
12540 (read_tag_string_type): Likewise.
12541 (read_subroutine_type): Likewise.
12542 (read_typedef): Likewise.
12543 (read_base_type): Likewise.
12544 (attr_to_dynamic_prop): Likewise.
12545 (read_subrange_type): Likewise.
12546 (read_unspecified_type): Likewise.
12547 (load_partial_dies): Likewise.
12548 (read_partial_die): Likewise.
12549 (find_partial_die): Likewise.
12550 (guess_partial_die_structure_name): Likewise.
12551 (fixup_partial_die): Likewise.
12552 (read_attribute_value): Likewise.
12553 (read_addr_index_from_leb128): Likewise.
12554 (dwarf2_read_addr_index): Likewise.
12555 (dwarf2_string_attr): Likewise.
12556 (lnp_state_machine::check_line_address): Likewise.
12557 (dwarf_decode_lines_1): Likewise.
12558 (dwarf_decode_lines): Likewise.
12559 (dwarf2_start_symtab): Likewise.
12560 (var_decode_location): Likewise.
12561 (new_symbol_full): Likewise.
12562 (dwarf2_const_value_data): Likewise.
12563 (dwarf2_const_value_attr): Likewise.
12564 (dwarf2_const_value): Likewise.
12565 (die_type): Likewise.
12566 (die_containing_type): Likewise.
12567 (lookup_die_type): Likewise.
12568 (guess_full_die_structure_name): Likewise.
12569 (anonymous_struct_prefix): Likewise.
12570 (dwarf2_name): Likewise.
12571 (follow_die_ref_or_sig): Likewise.
12572 (follow_die_offset): Likewise.
12573 (follow_die_ref): Likewise.
12574 (dwarf2_fetch_die_loc_sect_off): Likewise.
12575 (dwarf2_fetch_constant_bytes): Likewise.
12576 (dwarf2_fetch_die_type_sect_off): Likewise.
12577 (dwarf2_get_die_type): Likewise.
12578 (follow_die_sig): Likewise.
12579 (decode_locdesc): Likewise.
12580 (dwarf2_per_cu_objfile): Likewise.
12581 (dwarf2_per_cu_text_offset): Likewise.
12582 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12584 (set_die_type): Access objfile through
12585 dwarf2_per_objfile.
12589 * valprint.c (converted_character_d): Remove typedef.
12590 (DEF_VEC_O (converted_character_d)): Remove.
12591 (count_next_character): Use std::vector.
12592 (print_converted_chars_to_obstack): Likewise.
12593 (generic_printstr): Likewise.
12597 * xml-support.h (struct gdb_xml_value): Add constructor.
12598 <value>: Change type to unique_xmalloc_ptr.
12599 (gdb_xml_value_s): Remove typedef.
12600 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12601 (gdb_xml_element_start_handler): Change parameter type to
12603 (xml_find_attribute): Likewise.
12604 * xml-support.c (xml_find_attribute): Change parameter type to
12605 std::vector and adjust.
12606 (gdb_xml_values_cleanup): Remove.
12607 (gdb_xml_parser::start_element): Adjust to std::vector.
12608 (xinclude_start_include): Change paraeter type to std::vector
12610 * btrace.c (check_xml_btrace_version): Likewise.
12611 (parse_xml_btrace_block): Likewise.
12612 (parse_xml_btrace_pt_config_cpu): Likewise.
12613 (parse_xml_btrace_pt): Likewise.
12614 (parse_xml_btrace_conf_bts): Likewise.
12615 (parse_xml_btrace_conf_pt): Likewise.
12616 * memory-map.c (memory_map_start_memory): Likewise.
12617 (memory_map_start_property): Likewise.
12618 * osdata.c (osdata_start_osdata): Likewise.
12619 (osdata_start_item): Likewise.
12620 (osdata_start_column): Likewise.
12621 * remote.c (start_thread): Likewise.
12622 * solib-aix.c (library_list_start_library): Likewise.
12623 (library_list_start_list): Likewise.
12624 * solib-svr4.c (library_list_start_library): Likewise.
12625 (svr4_library_list_start_list): Likewise.
12626 * solib-target.c (library_list_start_segment): Likewise.
12627 (library_list_start_section): Likewise.
12628 (library_list_start_library): Likewise.
12629 (library_list_start_list): Likewise.
12630 * tracepoint.c (traceframe_info_start_memory): Likewise.
12631 (traceframe_info_start_tvar): Likewise.
12632 * xml-syscall.c (syscall_start_syscall): Likewise.
12633 * xml-tdesc.c (tdesc_start_target): Likewise.
12634 (tdesc_start_feature): Likewise.
12635 (tdesc_start_reg): Likewise.
12636 (tdesc_start_union): Likewise.
12637 (tdesc_start_struct): Likewise.
12638 (tdesc_start_flags): Likewise.
12639 (tdesc_start_enum): Likewise.
12640 (tdesc_start_field): Likewise.
12641 (tdesc_start_enum_value): Likewise.
12642 (tdesc_start_vector): Likewise.
12646 * extension.h (struct xmethod_worker) <clone>: Remove.
12647 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12649 (python_xmethod_worker::clone): Remove.
12650 * valops.c (find_overload_match): Use std::move instead of
12655 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12656 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12657 <free_xmethod_worker_data>: Remove.
12658 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12659 <get_xmethod_arg_types>: Remove.
12660 <get_xmethod_result_type>: Remove.
12661 <invoke_xmethod>: Remove.
12662 * extension.c (new_xmethod_worker): Remove.
12663 (clone_xmethod_worker): Remove.
12664 (get_matching_xmethod_workers): Return void, pass std::vector by
12666 (get_xmethod_arg_types): Rename to...
12667 (xmethod_worker::get_arg_types): ... this, and adjust.
12668 (get_xmethod_result_type): Rename to...
12669 (xmethod_worker::get_result_type): ... this, and adjust.
12670 (invoke_xmethod): Remove.
12671 (free_xmethod_worker): Remove.
12672 (free_xmethod_worker_vec): Remove.
12673 * extension.h (enum ext_lang_rc): Move here from
12675 (struct xmethod_worker): Add constructor and destructor.
12678 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12679 virtual pure methods.
12680 <get_arg_types, get_result_type>: New methods.
12681 (xmethod_worker_ptr): Remove typedef.
12682 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12683 (xmethod_worker_vec): Remove typedef.
12684 (xmethod_worker_up): New typedef.
12685 (invoke_xmethod): Remove.
12686 (clone_xmethod_worker): Remove.
12687 (free_xmethod_worker): Remove.
12688 (free_xmethod_worker_vec): Remove.
12689 (get_xmethod_arg_types): Remove.
12690 (get_xmethod_result_type): Remove.
12691 * valops.c (find_method_list): Use std::vector, don't use
12692 intermediate vector.
12693 (value_find_oload_method_list): Use std::vector.
12694 (find_overload_match): Use std::vector.
12695 (find_oload_champ): Use std::vector.
12696 * value.c (value_free): Use operator delete.
12697 (value_of_xmethod): Rename to...
12698 (value_from_xmethod): ... this. Don't assign
12699 xmethod_worker::value, take rvalue-reference.
12700 (result_type_of_xmethod): Adjust.
12701 (call_xmethod): Adjust.
12702 * value.h: Include extension.h.
12703 (struct xmethod_worker): Don't forward-declare.
12704 (value_of_xmethod): Rename to...
12705 (value_from_xmethod): ... this, take rvalue-reference.
12706 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12707 (struct python_xmethod_worker): ... this, add constructor and
12709 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12710 (gdbpy_free_xmethod_worker_data): Rename to...
12711 (python_xmethod_worker::~python_xmethod_worker): ... this and
12713 (gdbpy_clone_xmethod_worker_data): Rename to...
12714 (python_xmethod_worker::clone): ... this and adjust.
12715 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12717 (gdbpy_get_xmethod_arg_types): Rename to...
12718 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12719 (gdbpy_get_xmethod_result_type): Rename to...
12720 (python_xmethod_worker::do_get_result_type): ... this and
12722 (gdbpy_invoke_xmethod): Rename to...
12723 (python_xmethod_worker::invoke): ... this and adjust.
12724 (new_python_xmethod_worker): Rename to...
12725 (python_xmethod_worker::python_xmethod_worker): ... this and
12727 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12729 (gdbpy_free_xmethod_worker_data): Remove.
12730 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12731 (gdbpy_get_xmethod_arg_types): Remove.
12732 (gdbpy_get_xmethod_result_type): Remove.
12733 (gdbpy_invoke_xmethod): Remove.
12734 * python/python.c (python_extension_ops): Remove obsolete
12740 * common/signals-state-save-restore.c
12741 (save_original_signals_state): New parameter 'quiet'. Warn if we
12742 find a custom handler preinstalled, instead of internal erroring.
12743 But only warn if !quiet.
12744 * common/signals-state-save-restore.h
12745 (save_original_signals_state): New parameter 'quiet'.
12746 * main.c (captured_main_1): Move save_original_signals_state call
12747 after option handling, and pass QUIET.
12751 * spu-tdep.c (spu_catch_start): Pass
12752 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12757 * ada-lang.c (literal_symbol_name_matcher): New function.
12758 (ada_get_symbol_name_matcher): Use it for
12759 symbol_name_match_type::SEARCH_NAME.
12760 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12761 it down instead of assuming symbol_name_match_type::FULL.
12762 * block.h (block_lookup_symbol): New parameter 'match_type'.
12763 * c-valprint.c (print_unpacked_pointer): Use
12764 lookup_symbol_search_name instead of lookup_symbol.
12765 * compile/compile-object-load.c (get_out_value_type): Pass down
12766 symbol_name_match_type::SEARCH_NAME.
12767 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12768 symbol_name_match_type::FULL.
12769 * cp-support.c (cp_get_symbol_name_matcher): Handle
12770 symbol_name_match_type::SEARCH_NAME.
12771 * infrun.c (insert_exception_resume_breakpoint): Use
12772 lookup_symbol_search_name.
12773 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12774 * psymtab.c (maintenance_check_psymtabs): Use
12775 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12776 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12777 SYMBOL_SEARCH_NAME.
12778 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12779 if symbol_name_match_type::SEARCH_NAME.
12780 (lookup_symbol_in_language): Pass down
12781 symbol_name_match_type::FULL.
12782 (lookup_symbol_search_name): New.
12783 (lookup_language_this): Pass down
12784 symbol_name_match_type::SEARCH_NAME.
12785 (lookup_symbol_aux, lookup_local_symbol): New parameter
12786 'match_type'. Pass it down.
12787 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12788 (lookup_symbol_search_name): New declaration.
12789 (lookup_symbol_in_block): New 'match_type' parameter.
12794 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12796 (ada_lookup_symbol): Reimplement in terms of
12797 ada_lookup_symbol_list, bits factored out from
12798 ada_lookup_encoded_symbol.
12802 * ada-exp.y (write_object_renaming): When subscripting an array
12803 using a symbol as the index, pass the block in call to
12804 ada_lookup_encoded_symbol when looking that symbol up.
12808 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12813 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12814 the case where VALUE_LVAL (val0) is not lval_memory.
12818 * ada-valprint.c (print_optional_low_bound): Handle
12819 character-indexed array printing like boolean-indexed array
12824 * NEWS: Create a new section for the next release branch.
12825 Rename the section of the current branch, now that it has
12830 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12831 * version.in: Bump version to 8.1.50.DATE-git.
12835 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12837 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12839 (default_exception_support_info) <catch_handlers_sym>: Add field.
12840 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12841 (ada_exception_name_addr_1): Add "catch handlers" handling.
12842 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12843 Update all callers.
12844 (create_excep_cond_exprs) <ex>: Add parameter.
12845 (re_set_exception): Update create_excep_cond_exprs call.
12846 (print_it_exception, print_one_exception, print_mention_exception)
12847 (print_recreate_exception): Add "catch handler" handling.
12848 (allocate_location_catch_handlers, re_set_catch_handlers)
12849 (check_status_catch_handlers, print_it_catch_handlers)
12850 (print_one_catch_handlers, print_mention_catch_handlers)
12851 (print_recreate_catch_handlers): New function.
12852 (catch_handlers_breakpoint_ops): New variable.
12853 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12854 Add parameter. Add "catch handler" handling.
12855 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12856 Add "catch handler" handling.
12857 (ada_exception_catchpoint_cond_string): Add "catch handler"
12859 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12861 (catch_ada_handlers_command): New function.
12862 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12863 operations structure.
12864 (_initialize_ada_language): Add "catch handlers" command entry.
12865 * NEWS: Document "catch handlers" feature.
12869 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12870 account when creating the array type of the slice.
12871 (ada_value_slice): Likewise.
12875 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12877 (create_array_type_with_stride): Add byte_stride_prop parameter.
12878 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12879 New parameter. Update all callers in this file.
12880 (array_type_has_dynamic_stride): New function.
12881 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12882 of arrays with dynamic byte strides.
12883 * dwarf2read.c (read_array_type): Add support for dynamic
12884 DW_AT_byte_stride attributes.
12888 * dwarf2read.c (read_unspecified_type): Treat
12889 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12893 Update copyright year range in all GDB files.
12897 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12898 and gdb/testsuite/gdb.base/step-line.c.
12902 * copyright.py (main): Dump the contents of
12903 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12904 even if BY_HAND is empty.
12908 * top.c (print_gdb_version): Update Copyright year in version
12913 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12915 For older changes see ChangeLog-2017.
12921 version-control: never