Make read_program_header return a gdb::byte_vector
[external/binutils.git] / gdb / ChangeLog
1 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * solib-svr4.c (read_program_header): Return
4         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5         (find_program_interpreter): Return
6         gdb::optional<gdb::byte_vector>.
7         (scan_dyntag_auxv): Adjust.
8         (enable_break): Adjust.
9         (svr4_exec_displacement): Adjust.
10
11 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
12
13         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
14         * inf-child.c (inf_child_target::terminal_save_inferior): New.
15
16 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
17
18         * guile/scm-string.c (gdbscm_scm_from_printf): Use
19         string_vprintf.
20         * guile/scm-utils.c (gdbscm_printf): Likewise.
21         * serial.c (serial_printf): Likewise.
22         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
23
24 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
25
26         * stack.c (print_frame): Print frame architecture when printing on
27         an MI output.
28         * NEWS: Mention new "arch" attribute in frame output.
29
30 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
31
32         * arch/aarch64.h (aarch64_regnum): Update comment.
33
34 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
35
36         * NEWS: Add SVE to 8.2 section.
37
38 2018-08-21  Pedro Alves  <palves@redhat.com>
39
40         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
41         out from gdbscm_parse_function_args.
42         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
43         gdbscm_parse_function_args_1.
44
45 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
46
47         PR gdb/17816
48         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
49         operator.
50
51 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
52
53         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
54
55 2018-08-19  Michael Spang  <spang@google.com>
56
57         PR gdb/11786
58         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
59         for PT_TLS segments.
60
61 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
62
63         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
64         dwarf_variable_value.
65         * dwarf2-frame.c (class dwarf_expr_executor):
66         Add override for dwarf_variable_value.
67         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
68         (class symbol_needs_eval_context): Likewise.
69         (indirect_synthetic_pointer): Add forward declaration.
70         (sect_variable_value): New function.
71         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
72         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
73         for DW_OP_GNU_variable_value.
74
75 2018-08-16  Tom Tromey  <tom@tromey.com>
76
77         * top.c (read_command_file): Update.
78         (command_line_input): Remove "repeat" argument.
79         * ada-lang.c (get_selections): Update.
80         * linespec.c (decode_line_2): Update.
81         * defs.h (command_line_input): Remove argument.
82         * cli/cli-script.c (read_next_line): Update.
83         * python/py-gdb-readline.c: Update.
84
85 2018-08-17  Tom Tromey  <tom@tromey.com>
86
87         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
88         command_line_input.
89
90 2018-08-15  Tom Tromey  <tom@tromey.com>
91
92         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
93
94 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
95
96         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
97         If used, use find_pc_partial_function to find address range
98         to disassemble.
99         * mi/mi-main.c (mi_cmd_list_features): Report
100         "data-disassemble-a-option" feature.
101         * NEWS: Mention new -data-disassemble option -a.
102
103 2018-08-13  Tom Tromey  <tom@tromey.com>
104
105         * common/common-defs.h (_FORTIFY_SOURCE): Define.
106
107 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
108
109         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
110         (aarch64_linux_collect_sve_regset): Likewise.
111         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
112         * regcache.h (regcache_map_entry_size): New function.
113
114 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
115
116         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
117         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
118         (SVE_HEADER_VL_LENGTH): Likewise.
119         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
120         (SVE_HEADER_FLAGS_LENGTH): Likewise.
121         (SVE_HEADER_RESERVED_LENGTH): Likewise.
122         (SVE_HEADER_SIZE_OFFSET): Likewise.
123         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
124         (SVE_HEADER_VL_OFFSET): Likewise.
125         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
126         (SVE_HEADER_FLAGS_OFFSET): Likewise.
127         (SVE_HEADER_RESERVED_OFFSET): Likewise.
128         (SVE_HEADER_SIZE): Likewise.
129         (aarch64_linux_core_read_vq): Add function.
130         (aarch64_linux_core_read_description): Check for SVE section.
131
132 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
133
134         * aarch64-fbsd-tdep.c
135         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
136         collect_size.
137         * aarch64-linux-tdep.c
138         (aarch64_linux_iterate_over_regset_sections): Likewise.
139         * alpha-linux-tdep.c
140         (alpha_linux_iterate_over_regset_sections):
141         * alpha-nbsd-tdep.c
142         (alphanbsd_iterate_over_regset_sections): Likewise.
143         * amd64-fbsd-tdep.c
144         (amd64fbsd_iterate_over_regset_sections): Likewise.
145         * amd64-linux-tdep.c
146         (amd64_linux_iterate_over_regset_sections): Likewise.
147         * arm-bsd-tdep.c
148         (armbsd_iterate_over_regset_sections): Likewise.
149         * arm-fbsd-tdep.c
150         (arm_fbsd_iterate_over_regset_sections): Likewise.
151         * arm-linux-tdep.c
152         (arm_linux_iterate_over_regset_sections): Likewise.
153         * corelow.c (get_core_registers_cb): Likewise.
154         (core_target::fetch_registers): Likewise.
155         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
156         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
157         * gdbarch.h (void): Regenerate.
158         * gdbarch.sh: Add supply_size and collect_size.
159         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
160         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
161         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
162         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
163         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
164         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
165         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
166         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
167         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
168         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
169         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
170         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
171         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
172         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
173         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
174         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
175         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
176         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
177         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
178         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
179         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
180         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
181         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
182         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
183         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
184         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
185         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
186         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
187         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
188         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
189
190 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
191
192         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
193         with string_printf.
194
195 2018-08-10  Keith Seitz  <keiths@redhat.com>
196
197         * compile/compile-c-support.c (add_code_header, add_code_footer):
198         Move into policy class.
199         (c_push_user_expression, pop_user_expression_nop)
200         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
201         (compile_program): New host class.
202         (c_compile_program): New typedef.
203         (c_compute_porgram): Use c_compile_program.
204
205 2018-08-10  Keith Seitz  <keiths@redhat.com>
206
207         * compile/compile-internal.h (compile_instance::~compile_instance):
208         Remove calls to htab_delete.
209         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
210         * compile.c (compile_instance::compile_instance): Initialize
211         htab unique pointers.
212         (compile_instance::get_cached_type, compile_instance::insert_type)
213         (compile_instance::error_symbol_once): Update for unique_ptr.
214
215 2018-08-10  Keith Seitz  <keiths@redhat.com>
216
217         * compile/compile-c-symbols.c (struct symbol_error)
218         (hash_symbol_error, eq_symbol_error, del_symbol_error)
219         (compile_instance::insert_symbol_error)
220         (compile_instance::error_symbol_once): Move to ...
221         * compile/compile.c: ... here.
222
223 2018-08-10  Keith Seitz  <keiths@redhat.com>
224
225         * compile/compile-c-support.c (c_get_compile_context): Use `new'
226         instead of `new_compile_instance'.
227         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
228         Update description.
229         If the symbol error map is not initialized, create it.
230         (generate_c_for_for_one_symbol): Do not check/initialize
231         the symbol error map.
232         * compile/compile-c-types.c (compile_c_instance): Make a class.
233         Update all callers.
234         (compile_instance::compile_instance): Initialize the type cache.
235         (get_cached_type): New function.
236         (insert_type): Update description.
237         (compile_c_instance::m_default_cflags): Define.
238         (convert_type): Update description.  Use get_cached_type.
239         (delete_instance): Moved to destructor.
240         (new_compile_instance): Moved to constructor.
241         * compile/compile-c.h (compile_c_instance): Make class inheriting
242         from compile_instance.
243         <base>: Remove field.
244         <type_map, symbol_err_map>: Move to base class.
245         <c_plugin>: Rename to `m_plugin' and remove pointer type.
246         * compile/compile-internal.h (compile_instance): Make class.
247         <type_map_t, symbol_err_map_t>: Define.
248         <fe>: Rename to `m_gcc_fe'.
249         <scope, block, gcc_target_options>: Add `m_' prefix.
250         <m_type_map, m_symbol_err_map>: New fields, moved from
251         compile_c_instance.
252         <destroy>: Remove.
253         (convert_type, new_compile_instance): Remove.
254         * compile/compile.c (cleanup_compile_instance): Remove.
255         (compile_to_object): Use unique_ptr to eliminate cleanups.
256         (compile_instance::set_print_callback, compile_instance::version)
257         (compile_instance::set_verbose)
258         (compile_instance::set_driver_filename)
259         (compile_instance::set_triplet_regexp)
260         (compile_instance::set_arguments)
261         (compile_instance::set_source_file)
262         (compile_instance::compile): Define.
263
264 2018-08-10  Keith Seitz  <keiths@redhat.com>
265
266         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
267         * compile/compile-c-types.c: Define GCC_METHODN macros and include
268         gcc-c-fe.def to define C plugin.
269         (delete_instance): Delete `c_plugin'.
270         (new_compile_instance): Initialize `c_plugin'.
271         * compile/compile-c.h: Include gcc_c_plugin.h.
272         (struct compile_c_instance) <c_plugin>: New member.
273         * gcc-c-plugin.h: New file.
274         Update all callers with API change.
275
276 2018-08-10  Keith Seitz  <keiths@redhat.com>
277
278         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
279         (HFILES_NO_SRCDIR): ... to here.
280         Add compile-internal.h and compile-c.h.
281         * compile/compile-c-support.c: Include compile-c.h.
282         * compile/compile-c-symbols.c: Include compile-c.h.
283         (generate_c_for_variable_locations): Update comment.
284         * compile/compile-c-types.c: Include compile-c.h.
285         * compile/compile-c.h: New file -- moved C language declarations
286         from other files here.
287         * compile/compile-internal.h: Do not include hashtab.h or
288         common/enum-flags.h.
289         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
290         (gcc_convert_symbol, gcc_symbol_address)
291         (generate_c_for_variable_locations, c_get_mode_for_size)
292         (c_get_range_decl_name): Definitions moved to compile-c.h.
293         * compile/compile-loc2c.c: Include compile-c.h.
294
295 2018-08-10  Keith Seitz  <keiths@redhat.com>
296
297         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
298         (c_symbol_substitution_name): ... this.
299         Update all callers.
300
301 2018-08-10  Keith Seitz  <keiths@redhat.com>
302
303         * compile/compile-c-support.c (c_compute_program): Use
304         unique_xmalloc_ptr to eliminate cleanup.
305         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
306         Return a unique_xmalloc_ptr and eliminate cleanup.
307         * compile/compile-internal.h (generate_c_for_variable_locations):
308         Return unique_xmalloc_ptr and update description.
309
310 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
311
312         * corelow.c (core_target::get_core_register_section): Rename
313         min_size to section_min_size.
314
315 2018-08-09  Jim Wilson  <jimw@sifive.com>
316
317         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
318         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
319         * NEWS: Mention new GNU/Linux RISC-V target.
320         * configure.host: Add riscv*-*-linux*.
321         * configure.nat: Add riscv*.
322         * configure.tgt: Add riscv*-*-linux*.
323         * riscv-linux-nat.c: New file.
324         * riscv-linux-tdep.c: New file.
325
326 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
327
328         * infrun.c (resume): Make static, add forward declaration.
329         (proceed): Update header comment.
330         * infrun.h (resume): Delete declaration.
331
332 2018-08-09  Tom Tromey  <tom@tromey.com>
333
334         * riscv-tdep.h: Minor formatting fixes.
335
336 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
337
338         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
339         * dwarf-index-cache.c (create_dir_and_check): Likewise.
340         (test_mkdir_recursive): Likewise.
341         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
342
343 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
344
345         * valarith.c (value_subscripted_rvalue): If an array is not in
346         memory, and we don't know the upper bound, then we can't know that
347         the requested element exists or not.
348
349 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
350
351         * target.c (str_comma_list_concat_elem): Fix typo in comment.
352         (target_options_to_string): Add comment.
353
354 2018-08-08  Tom Tromey  <tom@tromey.com>
355
356         * unittests/scoped_mmap-selftests.c: Check result of "write".
357
358 2018-08-08  Jim Wilson  <jimw@sifive.com>
359
360         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
361         (decode_register_index_short): New.
362         (decode_j_type_insn, decode_cj_type_insn): New.
363         (decode_b_type_insn, decode_cb_type_insn): New.
364         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
365         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
366         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
367         is_c_sw_insn instead of is_sw_insn.
368         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
369         (riscv_software_single_step): New.
370         * riscv-tdep.h (riscv_software_single_step): Declare.
371
372         * riscv-tdep.c (riscv_isa_xlen): Drop static.
373         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
374
375 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
376
377         PR gdb/18050:
378         * target.c (dispose_inferior): Don't dispose of inferiors that are
379         already killed.
380
381 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
382
383         * remote.c (remote_target::download_tracepoint): Change char* to
384         const char*.
385
386 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
387
388         * target.h (target_options_to_string): Return an std::string.
389         * target.c (str_comma_list_concat_elem): Return void, use
390         std::string.
391         (do_option): Likewise.
392         (target_options_to_string): Return an std::string.
393         * linux-nat.c (linux_nat_target::wait): Adjust.
394         * target-debug.h (target_debug_print_options): Adjust.
395
396 2018-08-07  Tom Tromey  <tom@tromey.com>
397
398         * Makefile.in (CPPFLAGS): New variable.
399         (INTERNAL_CPPFLAGS): Use it.
400
401 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
402
403         * NEWS: Mention the index cache.
404
405 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
406
407         * common/pathstuff.h (get_standard_cache_dir): New.
408         * common/pathstuff.c (get_standard_cache_dir): New.
409         * build-id.h (build_id_to_string): New.
410         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
411         DEBUG_STR_SUFFIX): Move to here.
412         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
413         DEBUG_STR_SUFFIX): Move from there.
414         (write_psymtabs_to_index): Make non-static, add basename
415         parameter.  Write to temporary files, rename when done.
416         (save_gdb_index_command): Adjust call to
417         write_psymtabs_to_index.
418         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
419         field.
420         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
421         (get_gdb_index_contents_from_cache): New.
422         (get_gdb_index_contents_from_cache_dwz): New.
423         (dwarf2_initialize_objfile): Read index from cache.
424         (dwarf2_build_psymtabs): Save to index.
425         * dwarf-index-cache.h: New file.
426         * dwarf-index-cache.c: New file.
427         * dwarf-index-write.h: New file.
428
429 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
430
431         * gnulib/aclocal.m4: Re-generate.
432         * gnulib/config.in: Re-generate.
433         * gnulib/configure: Re-generate.
434         * gnulib/import/Makefile.am: Re-generate.
435         * gnulib/import/Makefile.in: Re-generate.
436         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
437         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
438         * gnulib/import/m4/mkdir.m4: New file.
439         * gnulib/import/mkdir.c: New file.
440         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
441         module.
442
443 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
444
445         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
446         * common/scoped_mmap.c: New file.
447         * common/scoped_mmap.h (destroy): New method.
448         (~scoped_mmap, reset): Use destroy.
449         (scoped_mmap): New move constructor.
450         (mmap_file): New declaration.
451         * unittests/scoped_mmap-selftests.c (test_normal,
452         test_invalid_filename, run_tests): New functions.
453         (_initialize_scoped_mmap_selftests): Register selftest.
454
455 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
456
457         * dwarf2read.c (read_gdb_index_from_section): Rename to...
458         (read_gdb_index_from_buffer): ... this.  Remove section
459         parameter, add buffer parameter.
460         (get_gdb_index_contents_ftype,
461         get_gdb_index_contents_dwz_ftype): New typedefs.
462         (dwarf2_read_gdb_index): Add callback parameters to get the
463         index contents.
464         (get_gdb_index_contents_from_section): New.
465         (dwarf2_initialize_objfile): Update call to
466         dwarf2_read_gdb_index.
467
468 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
469
470         * common/filestuff.h (gdb_fopen_cloexec): New overload.
471         (gdb_open_cloexec): Likewise.
472         * nat/linux-osdata.c (command_from_pid): Use string_printf.
473         (commandline_from_pid): Likewise.
474         (linux_xfer_osdata_threads): Likewise.
475         (linux_xfer_osdata_fds): Likewise.
476         * ada-lang.c (is_package_name): Likewise.
477         * auxv.c (procfs_xfer_auxv): Likewise.
478         * breakpoint.c (print_one_breakpoint_location): Use
479         uiout::field_fmt.
480         (print_one_catch_solib): Use string_printf.
481         * coff-pe-read.c (add_pe_exported_sym): Likewise.
482         (add_pe_forwarded_sym): Likewise.
483         * dwarf2read.c (create_type_unit_group): Likewise.
484         (build_error_marker_type): Likewise.
485         * infcall.c (get_function_name): Likewise.
486         * valprint.c (print_converted_chars_to_obstack): Likewise.
487         * xtensa-tdep.c (xtensa_register_type): Likewise.
488
489 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
490
491         * remote.c (remote_target::download_tracepoint): Fix format
492         string errors.
493
494 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
495
496         * tracefile.c: Include common/byte-vector.h.
497         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
498         with trace_regblock_size if needed.  Update uses of buf.
499
500 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
501
502         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
503         std::vector<unsigned char>.
504         * tracepoint.c (collection_list::collection_list): Remove
505         m_regs_mask initializer from initializer list.  Resize
506         m_regs_mask using the largest remote register number.
507         (collection_list::add_remote_register): Remove size check on
508         m_regs_mask.  Use at to access element.
509         (collection_list::stringify): Change type of temp_buf to
510         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
511         stringify the register mask.  Use pack_hex_byte for the register
512         mask.
513
514 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
515
516         * tracepoint.h (class collection_list) <add_register>: Remove.
517         <add_remote_register, add_ax_registers, add_local_register>:
518         Declare.
519         <add_memrange>: Add scope parameter.
520         * tracepoint.c (encode_actions_1): Likewise.
521         (collection_list::add_register): Rename to ...
522         (collection_list::add_remote_register): ... this.  Update
523         comment.
524         (collection_list::add_ax_registers, add_local_register): New
525         methods.
526         (collection_list::add_memrange): Add scope parameter.  Call
527         add_local_register instead of add_register.
528         (finalize_tracepoint_aexpr): New function.
529         (collection_list::collect_symbol): Update calls to add_memrange.
530         Call add_local_register instead of add_register.  Call
531         add_ax_registers.  Call finalize_tracepoint_aexpr.
532         (encode_actions_1): Get remote regnos for $reg action.  Call
533         add_remote_register, add_ax_registers, and add_local_register.
534         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
535         (validate_actionline): Call finalize_tracepoint_aexpr.
536
537 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
538
539         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
540         Replace array buf with gdb::char_vector buf, of size
541         get_remote_packet_size ().  Replace references to buf and
542         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
543         and xsnprintf with snprintf.  Raise errors if the buffer is too
544         small.
545
546 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
547
548         * remote.c (remote_target::download_tracepoint): Fix the has_more
549         predicate in the QTDP action list iteration.
550
551 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
552
553         * remote.c (remote_target::download_tracepoint): Fix indentation
554         in for block.
555
556 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
557
558         * proc-api.c (_initialize_proc_api): Remove c, unused.
559         * procfs.c (procfs_init_inferior): Remove signals, unused.
560         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
561         unused.
562
563 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
564             Andrew Burgess  <andrew.burgess@embecosm.com>
565
566         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
567         'W_STOPCODE (0)' as this could be ambiguous.
568
569 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
570
571         * ser-tcp.c (net_open): Fix thinko when deciding whether to
572         disable TCP's Nagle algorithm (use "ai_protocol" instead of
573         "ai_socktype").
574
575 2018-08-02  Tom Tromey  <tom@tromey.com>
576
577         PR symtab/16842.
578         * dwarf2read.c (read_func_scope): Set symtab on template parameter
579         symbols.
580         (process_structure_scope): Likewise.
581
582 2018-08-02  Xavier Roirand  <roirand@adacore.com>
583
584         PR gdb/22629:
585         * darwin-nat.c (darwin_kill_inferior): Fix handling of
586         kill inferior.
587
588 2018-08-02  Tom Tromey  <tom@tromey.com>
589
590         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
591         (darwin_suspend_inferior, darwin_resume_inferior)
592         (darwin_decode_notify_message, darwin_resume_inferior_threads)
593         (darwin_check_new_threads): Check result of get_darwin_inferior.
594
595 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
596
597         GDB 8.1.1 released.
598
599 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
600
601         * varobj.c (varobj_get_path_expr_parent): Report an error if
602         parent is a dynamic varobj.
603
604 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
605
606         * gnulib/aclocal.m4: Re-generate.
607         * gnulib/config.in: Re-generate.
608         * gnulib/configure: Re-generate.
609         * gnulib/import/Makefile.in: Re-generate.
610         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
611         * gnulib/import/m4/onceonly.m4: Re-generate.
612
613 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
614
615         * target-descriptions.c (struct xml_test_tdesc): New.
616         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
617         (record_xml_tdesc): Update.
618         (maintenance_check_xml_descriptions): Update.
619         * target-descriptions.h (record_xml_tdesc): Update comment.
620
621 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
622
623         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
624         checking array bounds are defined.
625
626 2018-07-30  Tom Tromey  <tom@tromey.com>
627
628         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
629         irreflexivity violation.
630
631 2018-07-30  Tom Tromey  <tom@tromey.com>
632
633         * cli/cli-decode.c (lookup_cmd): Remove lint code.
634         * value.c (unpack_long): Remove lint code.
635         * valops.c (value_ind): Remove lint code.
636         * valarith.c (value_x_binop, value_x_unop, value_equal)
637         (value_pos): Remove lint code.
638
639 2018-07-28  Tom de Vries  <tdevries@suse.de>
640
641         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
642         with undefined upper bound as <optimized out>.
643
644 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
645
646         * gcore.in: Rename variable "name" to "prefix".  Expand
647         "usage" text.
648
649 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
650
651         * windows-nat.c (windows_nat_target::create_inferior): Update to
652         call close() in global namespace.
653
654 2018-07-26  Tom Tromey  <tom@tromey.com>
655
656         * dwarf-index-write.c (add_address_entry): Don't add objfile
657         offsets.
658         * dbxread.c (find_stab_function): Rename from
659         find_stab_function_addr.  Return a bound_minimal_symbol.
660         (read_dbx_symtab): Use raw_text_low, raw_text_high.
661         Don't add objfile offsets.
662         (end_psymtab): Use raw_text_low, raw_text_high,
663         MSYMBOL_VALUE_RAW_ADDRESS.
664         (read_ofile_symtab): Update.
665         (process_one_symbol): Update.
666         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
667         offsets.
668         (dw2_relocate): Remove.
669         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
670         searching addrmap.
671         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
672         Update.
673         (process_psymtab_comp_unit_reader, add_partial_symbol)
674         (add_partial_subprogram, dwarf2_ranges_read): Update.
675         (load_partial_dies): Update.
676         (add_address_entry): Don't add objfile offsets.
677         (dwarf2_build_include_psymtabs): Update.
678         (create_addrmap_from_aranges): Don't add objfile offsets.
679         (dw2_find_pc_sect_compunit_symtab): Update.
680         * mdebugread.c (parse_symbol): Don't add objfile offsets.
681         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
682         Update.
683         (parse_partial_symbols): Don't add objfile offsets.  Use
684         raw_text_low, raw_text_high.  Update.
685         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
686         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
687         or call 'relocate' quick function.  Clear psymbol_map.
688         * psympriv.h (struct partial_symbol) <address>: Add section
689         offset.
690         <set_unrelocated_address>: Rename from set_address.
691         <raw_text_low, raw_text_high>: New methods.
692         <text_low, text_high>: Add objfile parameter.
693         (add_psymbol_to_bcache): Add 'section' parameter.  Call
694         set_unrelocated_address.
695         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
696         (find_pc_psymbol): Update.
697         (fixup_psymbol_section, relocate_psymtabs): Remove.
698         (dump_psymtab, psym_functions): Update.
699         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
700         parameter.
701         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
702         (start_psymtab_common): Update.
703         * symfile-debug.c (debug_qf_relocate): Remove.
704         (debug_sym_quick_functions): Update.
705         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
706         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
707         Update.
708
709 2018-07-26  Tom Tromey  <tromey@redhat.com>
710
711         * dbxread.c (end_psymtab): Use text_high_valid and
712         text_low_valid.
713         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
714         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
715         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
716         Update comment.
717         <text_low_valid, text_high_valid>: New fields.
718         <set_text_low, set_text_high>: Update.
719         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
720
721 2018-07-26  Tom Tromey  <tom@tromey.com>
722
723         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
724         Update.
725         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
726         textlow and texthigh fields.
727         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
728         Update.
729         * mdebugread.c (parse_lines, parse_partial_symbols)
730         (psymtab_to_symtab_1): Update.
731         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
732         Rename fields.  Update comment.  Now private.
733         <text_low, text_high, set_text_low, set_text_high>: New methods.
734         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
735         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
736         (start_psymtab_common, maintenance_info_psymtabs)
737         (maintenance_check_psymtabs): Update.
738         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
739         texthigh fields.
740         (scan_xcoff_symtab): Update.
741
742 2018-07-26  Tom Tromey  <tromey@redhat.com>
743
744         * psympriv.h (struct partial_symbol) <unrelocated_address,
745         address, set_address>: New methods.
746         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
747         (fixup_psymbol_section, relocate_psymtabs): Update.
748         (print_partial_symbols): Add 'objfile' parameter.  Update.
749         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
750         Update.
751
752 2018-07-26  Tom Tromey  <tom@tromey.com>
753
754         * dwarf-index-write.c (write_psymbols, debug_names::insert)
755         (debug_names::write_psymbols): Update.
756         * psympriv.h (struct partial_symbol): Derive from
757         general_symbol_info.
758         <obj_section>: New method.
759         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
760         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
761         (find_pc_sect_psymbol, fixup_psymbol_section)
762         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
763         (print_partial_symbols, recursively_search_psymtabs)
764         (compare_psymbols, psymbol_hash, psymbol_compare)
765         (add_psymbol_to_bcache, maintenance_check_psymtabs)
766         (psymbol_name_matches, psym_fill_psymbol_map): Update.
767
768 2018-07-26  Tom Tromey  <tromey@redhat.com>
769
770         * dbxread.c (end_psymtab): Remove dead code.
771
772 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
773
774         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
775         DWARF unwinders are disabled.
776         * dwarf2-frame.c: Add dwarf2read.h include.
777         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
778         disabled.
779         (dwarf2_frame_unwinders_enabled_p): Define.
780         (show_dwarf_unwinders_enabled_p): New function.
781         (_initialize_dwarf2_frame): Register switch to control DWARF
782         unwinder use.
783         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
784         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
785         (show_dwarf_cmdlist): Remove static keyword.
786         * dwarf2read.h (set_dwarf_cmdlist): Declare.
787         (show_dwarf_cmdlist): Declare.
788         * NEWS: Document new feature.
789
790 2018-07-26  Tom de Vries  <tdevries@suse.de>
791
792         PR breakpoints/23366
793         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
794
795 2018-07-26  Tom de Vries  <tdevries@suse.de>
796
797         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
798         DW_AT_count can't be translated to a dynamic prop.
799
800 2018-07-25  Tom de Vries  <tdevries@suse.de>
801
802         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
803         try/catch.
804
805 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
806
807         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
808
809 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
810
811         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
812
813 2018-07-24  Keith Seitz  <keiths@redhat.comt
814
815         PR symtab/23010
816         * dwarf2read.c (dw2_add_symbol_to_list): New function.
817         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
818         instead of add_symbol_to_list.
819         (read_file_scope): Call prepare_one_comp_unit before reading
820         any other DIEs.
821
822 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
823
824         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
825
826 2018-07-24  Tom Tromey  <tom@tromey.com>
827
828         * utils.c (malloc, realloc, free): Don't declare.
829         * configure, config.in: Rebuild.
830         * configure.ac: Don't check for declarations of free, malloc, or
831         realloc.
832
833 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
834
835         * aarch64-linux-nat.c
836         (aarch64_linux_nat_target::stopped_data_address): Remove unused
837         variable.
838         * arm-linux-nat.c (fetch_regs): Likewise.
839         (store_regs): Likewise.
840         (fetch_vfp_regs): Likewise.
841         (store_vfp_regs): Likewise.
842         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
843         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
844         (arm_linux_nat_target::insert_watchpoint): Likewise.
845         (arm_linux_nat_target::remove_watchpoint): Likewise.
846         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
847         Likewise.
848         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
849         Likewise.
850         * ppc-linux-nat.c (fetch_register): Likewise.
851         (fetch_all_gp_regs): Likewise.
852         (fetch_ppc_registers): Likewise.
853         (store_all_gp_regs): Likewise.
854         (store_ppc_registers): Likewise.
855         (hwdebug_insert_point): Likewise.
856         (can_use_watchpoint_cond_accel): Likewise.
857         * remote-sim.c (gdb_os_write_stdout): Likewise.
858
859 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
860             Tom Tromey  <tom@tromey.com>
861
862         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
863         test for it.
864         * configure: Rebuild.
865
866 2018-07-22  Tom Tromey  <tom@tromey.com>
867
868         * regformats/regdat.sh: Define xmltarget_${name} inside
869         #ifndef IN_PROCESS_AGENT.
870
871 2018-07-22  Tom Tromey  <tom@tromey.com>
872
873         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
874
875 2018-07-22  Tom Tromey  <tom@tromey.com>
876
877         * symfile.c (reread_symbols): Notify iter, not objfile.
878
879 2018-07-22  Tom Tromey  <tom@tromey.com>
880
881         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
882         Use arch_ops.
883         (ravenscar_thread_target::prepare_to_store): Likewise.
884
885 2018-07-22  Tom Tromey  <tom@tromey.com>
886
887         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
888         unused variable.  Call value_fetch_lazy when needed.
889         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
890         Remove unused variable.  Call value_fetch_lazy when needed.
891
892 2018-07-22  Tom Tromey  <tom@tromey.com>
893
894         * m32c-tdep.c (mark_dma): Return void.
895         (make_regs): Remove unused declarations.
896
897 2018-07-22  Tom Tromey  <tom@tromey.com>
898
899         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
900         cmdscm_get_valid_command_smob_arg_unsafe for effect.
901         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
902         bkscm_get_valid_block_smob_arg_unsafe for effect.
903
904 2018-07-22  Tom Tromey  <tom@tromey.com>
905
906         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
907         value_type.
908
909 2018-07-22  Tom Tromey  <tom@tromey.com>
910
911         * windows-nat.c (saved_context): Conditionally define.
912         * remote.c (remote_target::remote_btrace_maybe_reopen):
913         Conditionally declare "warned".
914         * inflow.c (sigquit_ours): Conditionally define.
915         (new_tty): Move "tty" declaration inside #if.
916         * guile/guile.c (guile_datadir): Conditionally define.
917         * charset.c (set_be_le_names): Move some declarations inside #if.
918         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
919         #if.
920         (parse_xml_btrace_conf): Likewise.
921
922 2018-07-22  Tom Tromey  <tom@tromey.com>
923
924         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
925
926 2018-07-22  Tom Tromey  <tom@tromey.com>
927
928         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
929         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
930         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
931         * buildsym-legacy.c (get_macro_table): Remove unused variable.
932         * stack.c (frame_apply_level_command): Remove unused variable.
933         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
934         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
935         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
936         unused variable.
937         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
938         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
939         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
940         variable.
941         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
942         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
943         variable.
944         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
945         Remove unused variable.
946         * cli/cli-script.c (recurse_read_control_structure): Remove unused
947         variable.
948         * common/tdesc.c (print_xml_feature::visit): Remove unused
949         variable.
950         * compile/compile-object-load.c (store_regs): Remove unused
951         variables.
952         * complaints.c (clear_complaints): Remove unused variable.
953         * corelow.c (core_target_open): Remove unused variable.
954         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
955         variable.
956         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
957         variable.
958         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
959         variable.
960         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
961         variable.
962         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
963         variable.
964         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
965         variable.
966         * ia64-tdep.c (examine_prologue): Remove unused variable.
967         * infcall.c (run_inferior_call): Remove unused variable.
968         * inferior.c (exit_inferior): Remove unused variable.
969         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
970         * linespec.c (decode_line_2): Remove unused variable.
971         * linux-nat.c (super_close): Remove.
972         * linux-tdep.c (linux_info_proc): Remove unused variable.
973         * mi/mi-main.c (mi_execute_command): Remove unused variable.
974         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
975         Remove unused variable.
976         * parse.c (find_minsym_type_and_address): Remove unused variable.
977         * printcmd.c (info_symbol_command, printf_floating): Remove unused
978         variable.
979         * python/py-breakpoint.c (bppy_set_commands): Remove unused
980         variable.
981         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
982         variables.
983         * record-btrace.c (record_btrace_target::store_registers): Remove
984         unused variable.
985         (cmd_show_record_btrace_cpu): Remove unused variable.
986         * riscv-tdep.c (riscv_register_reggroup_p)
987         (riscv_push_dummy_call, riscv_return_value): Remove unused
988         variable.
989         * rust-exp.y (literal): Remove unused variable.
990         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
991         unused variable.
992         <STRUCTOP_ANONYMOUS>: Likewise.
993         * s390-linux-tdep.c (s390_linux_init_abi_31)
994         (s390_linux_init_abi_64): Remove unused variable.
995         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
996         (file_select_thread, net_windows_open, _initialize_ser_windows):
997         Remove unused variables.
998         * symtab.c (find_pc_sect_line): Remove unused variable.
999         * target-memory.c (compute_garbled_blocks): Remove unused
1000         variable.
1001         (target_write_memory_blocks): Remove unused variable.
1002         * target.c (target_stack::unpush): Remove unused variables.
1003         * tracepoint.c (start_tracing, all_tracepoint_actions)
1004         (merge_uploaded_trace_state_variables)
1005         (print_one_static_tracepoint_marker): Remove unused variable.
1006         * unittests/basic_string_view/element_access/char/1.cc (test01):
1007         Remove unused variable.
1008         * windows-nat.c (windows_continue, windows_add_all_dlls)
1009         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1010         Remove unused variables.
1011
1012 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1013
1014         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1015         attr_profile in HAVE_ELF.
1016         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1017         HAVE_ELF.
1018
1019 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1020
1021         * frame.c (frame_register_unwind): Change parameter name.
1022         (frame_unwind_register): Likewise.
1023         (frame_unwind_register_value): Likewise.
1024         (frame_unwind_register_signed): Likewise.
1025         (frame_unwind_register_unsigned): Likewise.
1026         * frame.h (frame_register_unwind): Likewise.
1027         (frame_unwind_register): Likewise.
1028         (frame_unwind_register_value): Likewise.
1029         (frame_unwind_register_signed): Likewise.
1030         (frame_unwind_register_unsigned): Likewise.
1031         (frame_unwind_arch): Likewise.
1032
1033 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1034
1035         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1036         ISA maintenance.
1037
1038 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1039
1040         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1041         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1042         hand.
1043
1044 2018-07-20  Keith Seitz  <keiths@redhat.com>
1045
1046         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1047         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1048         m_compunit_symtab, m_language>: Add "m_" prefix.
1049         Update all uses.
1050         * buildsym.c: Update all uses.
1051
1052 2018-07-20  Tom Tromey  <tom@tromey.com>
1053
1054         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1055         * buildsym.h (record_line_ftype): Remove typedef.
1056
1057 2018-07-20  Tom Tromey  <tom@tromey.com>
1058
1059         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1060         (end_expandable_symtab): Likewise.
1061         (end_symtab_get_static_block): Likewise.
1062         (end_symtab_from_static_block): Likewise.
1063         * buildsym-legacy.c (augment_type_symtab): Remove.
1064         (end_expandable_symtab): Remove.
1065         (end_symtab_get_static_block): Remove.
1066         (end_symtab_from_static_block): Remove.
1067
1068 2018-07-20  Tom Tromey  <tom@tromey.com>
1069
1070         * dwarf2read.c: Include buildsym.h.
1071         (struct dwarf2_cu) <builder>: New method.
1072         (fixup_go_packaging): Update.
1073         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1074         use scoped_free_pendings.
1075         (using_directives): Add "cu" parameter, remove "language".
1076         (read_import_statement, setup_type_unit_groups, )
1077         (read_func_scope, read_lexical_block_scope)
1078         (dwarf2_record_block_ranges, read_namespace): Update.
1079         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1080         (lnp_state_machine::handle_end_sequence): Update.
1081         (class lnp_state_machine) <m_cu>: New member.
1082         <m_record_line_callback>: Remove.
1083         <m_currently_recording_lines>: New member.
1084         (lnp_state_machine::handle_set_file): Update.
1085         (noop_record_line): Remove.
1086         (dwarf_record_line_p): Add cu parameter.
1087         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1088         (lnp_state_machine::record_line)
1089         (lnp_state_machine::lnp_state_machine)
1090         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1091         (dwarf_decode_lines): Update.
1092         (dwarf2_start_subfile): Add cu parameter.
1093         (dwarf2_start_symtab, new_symbol): Update.
1094         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1095         Remove dwarf2_per_objfile parameter.
1096         (dwarf_decode_macros): Update.
1097
1098 2018-07-20  Tom Tromey  <tom@tromey.com>
1099
1100         * stabsread.c (define_symbol): Update.
1101         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1102         * dwarf2read.c (new_symbol): Update.
1103         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1104         * cp-namespace.c: Include buildsym.h.
1105         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1106         * buildsym-legacy.c (get_buildsym_compunit): New function.
1107
1108 2018-07-20  Tom Tromey  <tom@tromey.com>
1109
1110         * xcoffread.c: Include buildsym-legacy.h.
1111         * windows-nat.c: Include buildsym-legacy.h.
1112         * stabsread.c: Include buildsym-legacy.h.
1113         * mdebugread.c: Include buildsym-legacy.h.
1114         * buildsym-legacy.h: New file.
1115         * buildsym-legacy.c: New file, from buildsym.c.
1116         * go32-nat.c: Include buildsym-legacy.h.
1117         * dwarf2read.c: Include buildsym-legacy.h.
1118         * dbxread.c: Include buildsym-legacy.h.
1119         * cp-namespace.c: Include buildsym-legacy.h.
1120         * coffread.c: Include buildsym-legacy.h.
1121         * buildsym.h: Move some contents to buildsym-legacy.h.
1122         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1123         buildsym-legacy.c.
1124         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1125
1126 2018-07-20  Tom Tromey  <tom@tromey.com>
1127
1128         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1129         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1130         (buildsym_compunit::buildsym_compunit)
1131         (buildsym_compunit::~buildsym_compunit)
1132         (buildsym_compunit::get_macro_table): Define.
1133
1134 2018-07-20  Tom Tromey  <tom@tromey.com>
1135
1136         * buildsym.c (reset_symtab_globals): Remove.
1137         (buildsym_compunit::end_symtab_from_static_block): Update.
1138         (buildsym_compunit::augment_type_symtab): Update.
1139         (end_symtab_from_static_block): Call free_buildsym_compunit.
1140         (augment_type_symtab, end_symtab, end_expandable_symtab):
1141         Likewise.
1142
1143 2018-07-20  Tom Tromey  <tom@tromey.com>
1144
1145         * arch-utils.c: Do not include buildsym.h.
1146         * mipsread.c: Do not include buildsym.h.
1147         * machoread.c: Do not include buildsym.h.
1148         * elfread.c: Do not include buildsym.h.
1149
1150 2018-07-20  Tom Tromey  <tom@tromey.com>
1151
1152         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1153         initialization.
1154         (buildsym_compunit): Add new constructor.
1155         (struct buildsym_compunit) <get_last_source_file, finish_block,
1156         record_block_range, start_subfile, patch_subfile_names,
1157         push_subfile, pop_subfile, record_line, get_compunit_symtab,
1158         set_last_source_start_addr, get_last_source_start_addr,
1159         get_local_using_directives, set_local_using_directives,
1160         get_global_using_directives, outermost_context_p,
1161         get_current_context_stack, get_context_stack_depth,
1162         get_current_subfile, get_local_symbols, get_file_symbols,
1163         get_global_symbols, record_debugformat, record_producer,
1164         push_context, pop_context, end_symtab_get_static_block,
1165         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1166         New public methods.
1167         <record_pending_block, finish_block_internal, make_blockvector,
1168         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1169         private methods.
1170         Update all users.
1171
1172 2018-05-22  Tom Tromey  <tom@tromey.com>
1173
1174         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1175         parameter.
1176         (finish_block_internal): Update.
1177
1178 2018-07-20  Tom Tromey  <tom@tromey.com>
1179
1180         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1181         parameter.
1182         (finish_block_internal): Update.
1183
1184 2018-07-20  Tom Tromey  <tom@tromey.com>
1185
1186         * buildsym.h (EXTERN): Don't define or undef.
1187         * buildsym.c (EXTERN): Don't define.
1188
1189 2018-07-20  Tom Tromey  <tom@tromey.com>
1190
1191         * buildsym.c: Remove TODO comment.
1192
1193 2018-07-20  Tom Tromey  <tom@tromey.com>
1194
1195         * coffread.c (coff_symtab_read): Update.
1196         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1197         (xcoff_new_init): Update.
1198         * mipsread.c (mipscoff_new_init): Update.
1199         * mdebugread.c (mdebug_build_psymtabs): Update.
1200         * elfread.c (elf_new_init): Update.
1201         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1202         Update.
1203         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1204         (coffstab_build_psymtabs, elfstab_build_psymtabs)
1205         (stabsect_build_psymtabs): Update.
1206         * buildsym.h (buildsym_init): Don't declare.
1207         * buildsym.c: Update comment.
1208         (prepare_for_building): Remove.
1209         (start_symtab, restart_symtab): Update.
1210         (reset_symtab_globals): Update comment.
1211         (buildsym_init): Remove.
1212
1213 2018-07-20  Tom Tromey  <tom@tromey.com>
1214
1215         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1216         * stabsread.c (patch_block_stabs, define_symbol, read_type)
1217         (read_enum_type, common_block_start, common_block_end)
1218         (cleanup_undefined_types_1, finish_global_stabs): Update.
1219         * mdebugread.c (psymtab_to_symtab_1): Update.
1220         * dwarf2read.c (fixup_go_packaging, read_func_scope)
1221         (read_lexical_block_scope, new_symbol): Update.
1222         * dbxread.c (process_one_symbol): Update.
1223         * coffread.c (coff_symtab_read, process_coff_symbol)
1224         (coff_read_enum_type): Update.
1225         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1226         declare.
1227         (get_local_symbols, get_file_symbols, get_global_symbols): New
1228         functions.
1229         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1230         m_global_symbols.
1231         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1232         (~scoped_free_pendings): Update.
1233         (finish_block, prepare_for_building, reset_symtab_globals)
1234         (end_symtab_get_static_block, end_symtab_with_blockvector)
1235         (augment_type_symtab, push_context): Update.
1236         (get_local_symbols, get_file_symbols, get_global_symbols): New
1237         functions.
1238         (buildsym_init): Update.
1239
1240 2018-07-20  Tom Tromey  <tom@tromey.com>
1241
1242         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1243         (process_full_type_unit): Likewise.
1244         (dwarf2_start_symtab): Set list_in_scope.
1245
1246 2018-07-20  Tom Tromey  <tom@tromey.com>
1247
1248         * dwarf2read.c (process_psymtab_comp_unit_reader)
1249         (build_type_psymtabs_reader): Do not set list_in_scope.
1250
1251 2018-07-20  Tom Tromey  <tom@tromey.com>
1252
1253         * buildsym.c (free_pendings): Remove.
1254         (add_symbol_to_list, scoped_free_pendings)
1255         (finish_block_internal, buildsym_init): Update.
1256
1257 2018-07-20  Tom Tromey  <tom@tromey.com>
1258
1259         * xcoffread.c (read_xcoff_symtab): Update.
1260         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1261         Update.
1262         * dbxread.c (process_one_symbol): Update.
1263         * coffread.c (coff_symtab_read): Update.
1264         * buildsym.h (finish_block): Update.
1265         * buildsym.c (finish_block): Remove "listhead" argument.
1266         (end_symtab_get_static_block): Update.
1267
1268 2018-07-20  Tom Tromey  <tom@tromey.com>
1269
1270         * buildsym.h (class scoped_free_pendings): Remove constructor.
1271         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1272         method.
1273         <m_pending_block_obstack, m_pending_blocks>: New members.
1274         (pending_block_obstack, pending_blocks): Remove.
1275         (scoped_free_pendings::scoped_free_pendings): Default.
1276         (~scoped_free_pendings): Update.
1277         (free_pending_blocks): Remove.
1278         (finish_block_internal, record_pending_block, make_blockvector)
1279         (end_symtab_get_static_block, augment_type_symtab, push_context)
1280         (buildsym_init): Update.
1281
1282 2018-07-20  Tom Tromey  <tom@tromey.com>
1283
1284         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1285         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1286         members.
1287         (pending_addrmap, pending_addrmap_obstack)
1288         (pending_addrmap_interesting): Remove.
1289         (scoped_free_pendings, record_block_range, make_blockvector)
1290         (prepare_for_building, reset_symtab_globals, buildsym_init):
1291         Update.
1292
1293 2018-07-20  Tom Tromey  <tom@tromey.com>
1294
1295         * xcoffread.c (process_linenos): Update.
1296         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1297         * mdebugread.c (psymtab_to_symtab_1): Update.
1298         * dwarf2read.c (setup_type_unit_groups)
1299         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1300         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1301         * dbxread.c (process_one_symbol): Update.
1302         * coffread.c (coff_symtab_read, enter_linenos)
1303         (process_coff_symbol): Update.
1304         * buildsym.h (current_subfile): Don't declare.
1305         (get_current_subfile): Declare.
1306         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1307         member.
1308         (start_subfile, free_buildsym_compunit, push_subfile)
1309         (prepare_for_building, start_symtab): Update.
1310         (get_current_subfile): New function.
1311
1312 2018-07-20  Tom Tromey  <tom@tromey.com>
1313
1314         * coffread.c (coff_symtab_read): Update.
1315         * xcoffread.c (read_xcoff_symtab): Update.
1316         * dwarf2read.c (new_symbol): Update.
1317         (read_func_scope, read_lexical_block_scope): Update.
1318         * dbxread.c (process_one_symbol): Update.
1319         * buildsym.h (context_stack, context_stack_depth): Don't declare.
1320         (outermost_context_p): Remove macro.
1321         (outermost_context_p, get_current_context_stack)
1322         (get_context_stack_depth): Declare.
1323         (pop_context): Return struct context_stack.
1324         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1325         member.
1326         (context_stack_size): Remove.
1327         (INITIAL_CONTEXT_STACK_SIZE): Remove.
1328         (prepare_for_building, end_symtab_get_static_block)
1329         (augment_type_symtab, push_context): Update.
1330         (pop_context): Return struct context_stack.
1331         (outermost_context_p, get_current_context_stack)
1332         (get_context_stack_depth): New functions.
1333         (buildsym_init): Update.
1334
1335 2018-07-20  Tom Tromey  <tom@tromey.com>
1336
1337         * rust-exp.y: Now a pure parser.  Update all rules.
1338         (%union): Move earlier.
1339         (current_parser, work_obstack): Remove globals.
1340         (rust_parser, ~rust_parser): Update.
1341         (class rust_parser) <copy_name, concat3, crate_name, super_name,
1342         lex_character, lex_number, lex_string, lex_identifier,
1343         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1344         convert_name, convert_params_to_expression,
1345         convert_ast_to_expression, ast_basic_type, ast_operation,
1346         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1347         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1348         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1349         ast_array_type, ast_slice_type, ast_reference_type,
1350         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1351         (rust_parse): Update.
1352         (rustyyerror, rustyylex): Add parser parameter.
1353         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1354         (rust_lex_stringish_test, rust_lex_test_sequence)
1355         (rust_lex_test_trailing_dot, rust_lex_test_completion)
1356         (rust_lex_test_push_back, rust_lex_tests): Update.
1357
1358 2018-07-19  Pedro Alves  <palves@redhat.com>
1359
1360         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1361         gdb::unique_xmalloc_ptr.
1362         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1363         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1364         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1365         copy-initialization.
1366         * guile/scm-pretty-print.c (ppscm_print_children): Use
1367         gdb::unique_xmalloc_ptr instead of cleanups.
1368         (gdbscm_apply_val_pretty_printer): Remove cleanups.
1369         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1370         gdb::unique_xmalloc_ptr.
1371         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1372         Adjust to use gdb::unique_xmalloc_ptr.
1373         * guile/scm-utils.c (extract_arg): Adjust.
1374         * guile/scm-value.c (gdbscm_value_field): Adjust to use
1375         gdb::unique_xmalloc_ptr instead of a cleanup.
1376
1377 2018-07-19  Tom Tromey  <tom@tromey.com>
1378
1379         * utils.c (do_value_free_to_mark)
1380         (make_cleanup_value_free_to_mark): Remove.
1381         * utils.h (make_cleanup_value_free_to_mark): Remove.
1382
1383 2018-07-19  Pedro Alves  <palves@redhat.com>
1384
1385         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1386         forwarding reference.
1387
1388 2018-07-18  Pedro Alves  <palves@redhat.com>
1389
1390         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1391         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
1392         cleanup.
1393
1394 2018-07-18  Pedro Alves  <palves@redhat.com>
1395
1396         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1397         exceptions.
1398         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1399         (gdbscm_wrap): New.
1400         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1401         directly instead of a cleanup.
1402         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1403         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
1404         (vlscm_binop_gdbthrow): New, factored out from ...
1405         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
1406         (vlscm_rich_compare): Use gdbscm_wrap.
1407         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1408         instead of a cleanup.
1409         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1410         cleanup.
1411         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1412         Use xfree directly instead of a cleanup.
1413         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1414         Adjust to use gdbscm_wrap and scoped_value_mark.
1415         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1416         (gdbscm_value_address, gdbscm_value_dereference)
1417         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1418         scoped_value_mark.
1419         (gdbscm_value_dynamic_type): Use scoped_value_mark.
1420         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1421         scoped_value_mark.
1422         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1423         gdbscm_wrap and scoped_value_mark.
1424         (gdbscm_value_to_string): Use xfree directly instead of a
1425         cleanup.  Move 'buffer' unique_ptr to TRY scope.
1426         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1427         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
1428         scoped_value_mark.
1429         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1430         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1431         scoped_value_mark.
1432         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1433         gdbscm_wrap.
1434
1435 2018-07-18  Tom de Vries  <tdevries@suse.de>
1436
1437         * findvar.c (default_read_var_value): Also resolve dynamic type for
1438         LOC_OPTIMIZED_OUT vars.
1439
1440 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
1441
1442         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1443         decoding.
1444
1445 2018-07-17  Tom Tromey  <tom@tromey.com>
1446
1447         * guile/scm-param.c (pascm_set_func, pascm_show_func)
1448         (compute_enum_list, pascm_set_param_value_x)
1449         (gdbscm_parameter_value): Update.
1450         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1451         (gdbscm_scm_to_host_string): Update.
1452         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1453         Update.
1454         * guile/scm-cmd.c (cmdscm_add_completion): Update.
1455         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1456         * guile/scm-string.c (gdbscm_scm_to_string): Return
1457         unique_xmalloc_ptr.
1458         (gdbscm_scm_to_host_string): Likewise.
1459
1460 2018-07-17  Tom Tromey  <tom@tromey.com>
1461
1462         * guile/guile.c (gdbscm_eval_from_control_command): Update.
1463         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1464         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1465         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1466         unique_xmalloc_ptr.
1467
1468 2018-07-17  Tom Tromey  <tom@tromey.com>
1469
1470         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1471         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1472         Update.
1473         * guile/scm-cmd.c (cmdscm_function): Update.
1474         * guile/scm-pretty-print.c
1475         (ppscm_print_exception_unless_memory_error): Update.
1476         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1477         Return unique_xmalloc_ptr.
1478
1479 2018-07-17  Tom Tromey  <tom@tromey.com>
1480
1481         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1482         Use string_printf.
1483
1484 2018-07-17  Jim Wilson  <jimw@sifive.com>
1485
1486         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1487         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1488         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1489         unecessary braces after EF_RISCV_RVC test.  Delete call to
1490         set_gdbarch_decr_pc_after_break.
1491
1492         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1493         RISCV_LAST_FP_REGNUM + 1.
1494         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1495
1496 2018-07-17  Tom Tromey  <tom@tromey.com>
1497
1498         * configure.ac: Remove --disable-gdbcli.
1499         * configure: Rebuild.
1500         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1501         (SUBDIR_CLI_CFLAGS): Remove.
1502         (SFILES): Use SUBDIR_CLI_SRCS.
1503         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1504
1505 2018-07-17  Tom Tromey  <tom@tromey.com>
1506
1507         PR gdb/18624:
1508         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1509
1510 2018-07-16  Jim Wilson  <jimw@sifive.com>
1511
1512         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1513
1514 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1515
1516         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1517         variable.
1518         (libunwind_frame_sniffer): Likewise.
1519         (libunwind_frame_prev_register): Likewise.
1520         (libunwind_sigtramp_frame_sniffer): Likewise.
1521         * ia64-tdep.c (ia64_access_reg): Likewise.
1522         (ia64_access_rse_reg): Likewise.
1523         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1524         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1525
1526 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1527
1528         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1529
1530 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1531
1532         * remote-sim.c (gdbsim_target::close,
1533         gdbsim_target::mourn_inferior): Remove unused variables.
1534
1535 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
1536
1537         * ia64-tdep.c (ktab_buf): New global.
1538         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1539         (get_kernel_table): Adjust.
1540
1541 2018-07-16  Tom Tromey  <tom@tromey.com>
1542
1543         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1544         * dwarf2read.c (using_directives, new_symbol): Use
1545         outermost_context_p.
1546         * dbxread.c (process_one_symbol): Use outermost_context_p.
1547         * coffread.c (coff_symtab_read): Use outermost_context_p.
1548
1549 2018-07-16  Tom Tromey  <tom@tromey.com>
1550
1551         * dwarf2read.c (using_directives, read_func_scope)
1552         (read_lexical_block_scope): Update.
1553         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1554         * buildsym.h (local_using_directives, global_using_directives):
1555         Don't declare.
1556         (get_local_using_directives, set_local_using_directives)
1557         (get_global_using_directives): Declare.
1558         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1559         m_global_using_directives>: New members.
1560         (finish_block_internal, prepare_for_building)
1561         (reset_symtab_globals, end_symtab_get_static_block)
1562         (push_context): Update.
1563         (get_local_using_directives, set_local_using_directives)
1564         (get_global_using_directives): New functions.
1565         (buildsym_init): Update.
1566
1567 2018-07-16  Tom Tromey  <tom@tromey.com>
1568
1569         * xcoffread.c (xcoff_initial_scan): Don't call
1570         free_pending_blocks.
1571         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1572         * buildsym.h (class scoped_free_pendings): Add constructor.
1573         (free_pending_blocks): Don't declare.
1574         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1575         (free_pending_blocks): Now static.
1576
1577 2018-07-16  Tom Tromey  <tom@tromey.com>
1578
1579         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1580         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1581         member.
1582         (struct subfile_stack): Remove.
1583         (subfile_stack): Remove.
1584         (push_subfile, pop_subfile, buildsym_init): Update.
1585
1586 2018-07-16  Tom Tromey  <tom@tromey.com>
1587
1588         * buildsym.c (push_subfile): Use gdb_assert.
1589         (pop_subfile): Use gdb_assert.
1590
1591 2018-07-16  Tom Tromey  <tom@tromey.com>
1592
1593         * buildsym.h (merge_symbol_lists): Remove.
1594         * buildsym.c (merge_symbol_lists): Remove.
1595
1596 2018-07-16  Tom Tromey  <tom@tromey.com>
1597
1598         * stabsread.c (scan_file_globals): Update comment.
1599         * stabsread.h (scan_file_globals): Move from buildsym.h.
1600         * buildsym.h (scan_file_globals): Move to stabsread.h.
1601
1602 2018-07-16  Tom Tromey  <tom@tromey.com>
1603
1604         * xcoffread.c (xcoff_new_init): Update.
1605         * mipsread.c (mipscoff_new_init): Update.
1606         * mdebugread.c (mdebug_build_psymtabs): Update.
1607         * elfread.c (elf_new_init): Update.
1608         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1609         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1610         * buildsym.h (buildsym_new_init): Don't declare.
1611         * buildsym.c (buildsym_new_init): Remove.
1612
1613 2018-07-16  Tom Tromey  <tom@tromey.com>
1614
1615         * stabsread.h (within_function): Move from buildsym.h.
1616         * stabsread.c (start_stabs): Clear within_function.
1617         * coffread.c (coff_start_symtab): Clear within_function.
1618         * buildsym.h (within_function): Move to stabsread.h.
1619         * buildsym.c (prepare_for_building): Update.
1620
1621 2018-07-16  Tom Tromey  <tom@tromey.com>
1622
1623         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1624         * dwarf2read.c (dwarf2_start_symtab): Don't set
1625         processing_gcc_compilation.
1626         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1627
1628 2018-07-16  Tom Tromey  <tom@tromey.com>
1629
1630         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1631         (next_symbol_text_func): Move from buildsym.h.
1632         * stabsread.c (hashname): Move from buildsym.c.
1633         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1634         (next_symbol_text_func, hashname): Move to stabsread.h.
1635         * buildsym.c: Don't include bcache.h
1636         (hashname): Move to stasbread.c.
1637
1638 2018-07-16  Tom Tromey  <tom@tromey.com>
1639
1640         * buildsym.h (context_stack_size): Don't declare.
1641         * buildsym.c (context_stack_size): New global.
1642
1643 2018-07-16  Tom Tromey  <tom@tromey.com>
1644
1645         * dbxread.c (processing_acc_compilation): New global.
1646         * buildsym.h (processing_acc_compilation): Don't declare.
1647
1648 2018-07-16  Tom Tromey  <tom@tromey.com>
1649
1650         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1651         * dbxread.c (read_ofile_symtab): Update.
1652         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1653         * buildsym.h (last_source_start_addr): Remove.
1654         (set_last_source_start_addr, get_last_source_start_addr):
1655         Declare.
1656         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1657         parameter.
1658         (struct buildsym_compunit) <m_last_source_start_addr>: New
1659         member.
1660         (prepare_for_building): Remove start_addr parameter.
1661         (start_symtab, restart_symtab, end_symtab_get_static_block)
1662         (end_symtab_with_blockvector): Update.
1663         (set_last_source_start_addr, get_last_source_start_addr): New
1664         functions.
1665
1666 2018-07-16  Tom Tromey  <tom@tromey.com>
1667
1668         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1669         member.
1670         (have_line_numbers): Remove.
1671         (record_line, prepare_for_building, end_symtab_get_static_block)
1672         (augment_type_symtab): Update.
1673
1674 2018-07-16  Tom Tromey  <tom@tromey.com>
1675
1676         * buildsym.c (~buildsym_compunit): Free the macro table.
1677         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1678         methods.
1679         <m_pending_macros>: New member.
1680         (pending_macros): Remove.
1681         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1682         (reset_symtab_globals, end_symtab_get_static_block)
1683         (end_symtab_with_blockvector, augment_type_symtab)
1684         (buildsym_init): Update.
1685
1686 2018-07-16  Tom Tromey  <tom@tromey.com>
1687
1688         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1689         parameter.
1690         (buildsym_compunit::set_last_source_file): New method.
1691         <m_last_source_file>: New member.
1692         (prepare_for_building): Remove "name" parameter.
1693         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1694         (last_source_file): Remove.
1695         (set_last_source_file, get_last_source_file): Update.
1696
1697 2018-07-16  Tom Tromey  <tom@tromey.com>
1698
1699         * buildsym.c (prepare_for_building): Add assert.
1700
1701 2018-07-16  Tom Tromey  <tom@tromey.com>
1702
1703         * buildsym.c (~buildsym_compunit): Update.
1704         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1705         (start_subfile, patch_subfile_names)
1706         (end_symtab_with_blockvector): Update.
1707
1708 2018-07-16  Tom Tromey  <tom@tromey.com>
1709
1710         * buildsym.c (struct buildsym_compunit): Add constructor,
1711         destructor, initializers.
1712         (start_buildsym_compunit): Remove.
1713         (free_buildsym_compunit): Use "delete".
1714         (start_symtab, restart_symtab): Use "new".
1715
1716 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1717
1718         * symfile.c (set_objfile_default_section_offset): Remove struct
1719         keyword.
1720
1721 2018-07-14  Stafford Horne  <shorne@gmail.com>
1722
1723         * (Responsible Maintainers): Add myself as or1k maintainer.
1724
1725 2018-07-13  Tom Tromey  <tom@tromey.com>
1726
1727         * symfile.c (set_objfile_default_section_offset): Use extra braces
1728         around initializer.
1729
1730 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1731
1732         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1733         non-branching basr.
1734
1735 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1736
1737         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1738         unittests/cli-utils-selftests.c
1739         * unittests/cli-utils-selftests.c: New file.
1740
1741 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1742
1743         * NEWS: Mention new commands. Mention change to 'thread apply'.
1744
1745 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1746
1747         * thread.c (thr_try_catch_cmd): New function.
1748         (thread_apply_all_command): Handle qcs flags.
1749         (thread_apply_command): Handle qcs flags.
1750         (taas_command): New function.
1751         (tfaas_command): New function.
1752         (_initialize_thread): Update to setup the new commands 'taas
1753         and 'tfaas'. Change doc string for 'thread apply'.
1754
1755 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1756
1757         * stack.c: (trailing_outermost_frame): New function, mostly
1758         extracted from backtrace_command_1.
1759         (leading_innermost_frame): New function.
1760         (backtrace_command_1): Update to call trailing_outermost_frame.
1761         (frame_apply_command_count): New function.
1762         (frame_apply_level_command): New function.
1763         (frame_apply_all_command): New function.
1764         (frame_apply_command): New function.
1765         (faas_command): New function.
1766         (frame_cmd_list): New variable.
1767         (_initialize_stack): Update to setup the new commands 'frame apply'
1768         and 'faas'.
1769
1770 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1771
1772         * cli-utils.c (number_or_range_parser::get_number): Only handle
1773         numbers or convenience var as numbers.
1774         (parse_flags): New function.
1775         (parse_flags_qcs): New function.
1776         (number_or_range_parser::finished): Ensure parsing end is detected
1777         before end of string.
1778         * cli-utils.h (parse_flags): New function.
1779         (parse_flags_qcs): New function.
1780         (number_or_range_parser): Remove m_finished bool.
1781         (number_or_range_parser::skip_range): Set m_in_range to false.
1782
1783 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1784
1785         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1786         on Windows.
1787
1788 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1789             Jan Kratochvil  <jan.kratochvil@redhat.com>
1790             Paul Fertser  <fercerpav@gmail.com>
1791             Tsutomu Seki  <sekiriki@gmail.com>
1792             Pedro Alves  <palves@redhat.com>
1793
1794         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1795         'unittests/parse-connection-spec-selftests.c'.
1796         (COMMON_SFILES): Add 'common/netstuff.c'.
1797         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1798         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1799         * common/netstuff.c: New file.
1800         * common/netstuff.h: New file.
1801         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1802         (wait_for_connect): Update comment.  New parameter
1803         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1804         Use 'sock' directly instead of 'scb->fd'.
1805         (try_connect): New function, with code from 'net_open'.
1806         (net_open): Rewrite main loop to deal with multiple
1807         sockets/addresses.  Handle IPv6-style hostnames; implement
1808         support for IPv6 connections.
1809         * unittests/parse-connection-spec-selftests.c: New file.
1810
1811 2018-07-11  Pedro Alves  <palves@redhat.com>
1812
1813         PR gdb/23377
1814         * remote.c (remote_target::remote_detach_pid): Call
1815         set_current_process.
1816
1817 2018-07-11  Pedro Alves  <palves@redhat.com>
1818
1819         * h8300-tdep.c (h8300_gdbarch_init): Remove
1820         set_gdbarch_ecoff_reg_to_regnum calls.
1821
1822 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1823
1824         PR c++/23373
1825         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1826         offsets/sizes for static members of a class/struct.
1827
1828 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1829
1830         * target-descriptions.c (tdesc_register_bitsize): Rename.
1831         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1832         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1833         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1834
1835 2018-07-10  Tom Tromey  <tom@tromey.com>
1836
1837         * breakpoint.c (moribund_locations): Now static and a
1838         std::vector.
1839         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1840         (build_bpstat_chain, update_global_location_list)
1841         (breakpoint_retire_moribund): Update.
1842         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1843         VEC.
1844
1845 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1846
1847         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1848         (riscv_register_reggroup_p): Use new function, remove unneeded
1849         parenthesis.
1850         (riscv_push_dummy_call): Extend assert to compare against xlen or
1851         flen based on register type.
1852
1853 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1854
1855         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1856
1857 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1858
1859         * remote.c (show_hardware_watchpoint_limit): New function.
1860         (show_hardware_watchpoint_length_limit): New function.
1861         (show_hardware_breakpoint_limit): New function.
1862         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1863         where appropriate, update help text.
1864
1865 2018-07-09  Tom Tromey  <tom@tromey.com>
1866
1867         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1868         (CLIBS): Don't mention NAT_CLIBS.
1869
1870 2018-07-09  Tom Tromey  <tom@tromey.com>
1871
1872         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1873         (LIBGDB_OBS, clean mostlyclean): Update.
1874         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1875
1876 2018-07-09  Tom Tromey  <tom@tromey.com>
1877
1878         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1879         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1880         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1881
1882 2018-07-09  Tom Tromey  <tom@tromey.com>
1883
1884         * Makefile.in (ALLDEPFILES): Remove exec.c.
1885         (COMMON_OBS): Remove exec.o.
1886         (COMMON_SFILES): Add exec.c.
1887
1888 2018-07-09  Tom Tromey  <tom@tromey.com>
1889
1890         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1891
1892 2018-07-09  Tom Tromey  <tom@tromey.com>
1893
1894         * Makefile.in (clean mostlyclean): Remove stamp-version.
1895         (version.c): Depend on stamp-version.
1896         (stamp-version): New rule, from version.c rule.
1897
1898 2018-07-09  Tom Tromey  <tom@tromey.com>
1899
1900         * Makefile.in (init.c): Depend on stamp-init.
1901         (stamp-init): New rule, from init.c rule.
1902         (clean mostlyclean): Remove stamp-init.
1903
1904 2018-07-09  Tom Tromey  <tom@tromey.com>
1905
1906         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1907         SUBDIR_GCC_COMPILE_SRCS.
1908
1909 2018-07-09  Tom Tromey  <tom@tromey.com>
1910
1911         * Makefile.in (init.c): Remove some unused sed rules.
1912
1913 2018-07-09  Tom Tromey  <tom@tromey.com>
1914
1915         * Makefile.in (TSOBS): Remove.
1916         (INIT_FILES): Update.
1917         (LIBGDB_OBS): Update.
1918         (COMMON_SFILES): Add inflow.c.
1919         (SFILES): Remove inflow.c.
1920
1921 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1922
1923         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1924
1925 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1926
1927         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1928         get_saveloc_name, is_signal_frame_name, step_name,
1929         init_remote_name, create_addr_space_name,
1930         destroy_addr_space_name, search_unwind_table_name,
1931         find_dyn_list_name): Constify.
1932
1933 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1934
1935         * darwin-nat.c (darwin_pthread_kill): New function.
1936         (darwin_resume_thread): Use darwin_pthread_kill.
1937
1938 2018-07-05  Tom de Vries  <tdevries@suse.de>
1939
1940         * macroexp.c (macro_buffer) <operator=>: New member function.
1941
1942 2018-07-04  Tom Tromey  <tom@tromey.com>
1943
1944         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1945
1946 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1947
1948         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1949         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1950         * maint.c: Likewise.
1951         * top.c: Likewise.
1952
1953 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1954
1955         * NEWS: Create a new section for the next release branch.
1956         Rename the section of the current branch, now that it has
1957         been cut.
1958
1959 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1960
1961         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1962         * version.in: Bump version to 8.2.50.DATE-git.
1963
1964 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1965             Pedro Alves  <palves@redhat.com>
1966
1967         * linux-nat.c (linux_init_ptrace): Rename to ...
1968         (linux_init_ptrace_procfs): ... this.  Call
1969         linux_proc_init_warnings.
1970         (linux_nat_target::post_attach)
1971         (linux_nat_target::post_startup_inferior): Adjust.
1972         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1973         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1974
1975 2018-07-04  Tom de Vries  <tdevries@suse.de>
1976
1977         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1978         check ...
1979         (read_comp_unit_head): ... here.
1980
1981 2018-07-03  Tom Tromey  <tom@tromey.com>
1982
1983         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1984         (stop_tracing, tstatus_command)
1985         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1986         (print_one_static_tracepoint_marker): Update.
1987         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1988         std::vector.
1989         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1990         VEC.
1991         (all_tracepoints, static_tracepoints_here): Return std::vector.
1992
1993 2018-07-03  Tom Tromey  <tom@tromey.com>
1994
1995         * common/ptid.c (ptid_equal): Remove.
1996         * common/ptid.h (ptid_equal): Don't declare.
1997         * ada-tasks.c: Update.
1998         * breakpoint.c: Update.
1999         * common/agent.c: Update.
2000         * corelow.c: Update.
2001         * darwin-nat-info.c: Update.
2002         * darwin-nat.c: Update.
2003         * dcache.c: Update.
2004         * dtrace-probe.c: Update.
2005         * dummy-frame.c: Update.
2006         * fbsd-nat.c: Update.
2007         * frame.c: Update.
2008         * gdbthread.h: Update.
2009         * gnu-nat.c: Update.
2010         * go32-nat.c: Update.
2011         * inf-loop.c: Update.
2012         * inf-ptrace.c: Update.
2013         * infcall.c: Update.
2014         * infcmd.c: Update.
2015         * inflow.c: Update.
2016         * infrun.c: Update.
2017         * linux-fork.c: Update.
2018         * linux-nat.c: Update.
2019         * linux-thread-db.c: Update.
2020         * mi/mi-cmd-var.c: Update.
2021         * mi/mi-interp.c: Update.
2022         * mi/mi-main.c: Update.
2023         * nto-procfs.c: Update.
2024         * ppc-linux-tdep.c: Update.
2025         * procfs.c: Update.
2026         * python/py-inferior.c: Update.
2027         * python/py-record-btrace.c: Update.
2028         * python/py-record.c: Update.
2029         * ravenscar-thread.c: Update.
2030         * regcache.c: Update.
2031         * remote-sim.c: Update.
2032         * remote.c: Update.
2033         * sol-thread.c: Update.
2034         * solib.c: Update.
2035         * target.c: Update.
2036         * tui/tui-stack.c: Update.
2037         * varobj.c: Update.
2038         * windows-nat.c: Update.
2039         * windows-tdep.c: Update.
2040
2041 2018-07-03  Tom Tromey  <tom@tromey.com>
2042
2043         * common/ptid.c (ptid_match): Remove.
2044         * common/ptid.h (ptid_match): Don't declare.
2045         * fbsd-nat.c: Update.
2046         * infcmd.c: Update.
2047         * infrun.c: Update.
2048         * linux-nat.c: Update.
2049         * record-btrace.c: Update.
2050         * regcache.c: Update.
2051         * remote.c: Update.
2052
2053 2018-07-03  Tom Tromey  <tom@tromey.com>
2054
2055         * common/ptid.c (ptid_tid_p): Remove.
2056         * common/ptid.h (ptid_tid_p): Don't declare.
2057         * sol-thread.c: Update.
2058
2059 2018-07-03  Tom Tromey  <tom@tromey.com>
2060
2061         * common/ptid.c (ptid_lwp_p): Remove.
2062         * common/ptid.h (ptid_lwp_p): Don't declare.
2063         * fbsd-nat.c: Update.
2064         * linux-nat.c: Update.
2065         * nat/linux-procfs.c: Update.
2066         * nat/x86-linux-dregs.c: Update.
2067         * sol-thread.c: Update.
2068
2069 2018-07-03  Tom Tromey  <tom@tromey.com>
2070
2071         * common/ptid.c (ptid_is_pid): Remove.
2072         * common/ptid.h (ptid_is_pid): Don't declare.
2073         * infrun.c: Update.
2074         * linux-nat.c: Update.
2075         * mi/mi-interp.c: Update.
2076         * remote.c: Update.
2077         * thread.c: Update.
2078
2079 2018-07-03  Tom Tromey  <tom@tromey.com>
2080
2081         * common/ptid.c (ptid_get_tid): Remove.
2082         * common/ptid.h (ptid_get_tid): Don't declare.
2083         * ada-tasks.c: Update.
2084         * aix-thread.c: Update.
2085         * bsd-uthread.c: Update.
2086         * darwin-nat.c: Update.
2087         * fbsd-nat.c: Update.
2088         * i386-darwin-nat.c: Update.
2089         * infrun.c: Update.
2090         * linux-tdep.c: Update.
2091         * nto-procfs.c: Update.
2092         * ppc-ravenscar-thread.c: Update.
2093         * python/py-infthread.c: Update.
2094         * ravenscar-thread.c: Update.
2095         * sol-thread.c: Update.
2096         * sparc-ravenscar-thread.c: Update.
2097         * windows-nat.c: Update.
2098
2099 2018-07-03  Tom Tromey  <tom@tromey.com>
2100
2101         * common/ptid.c (ptid_get_lwp): Remove.
2102         * common/ptid.h (ptid_get_lwp): Don't declare.
2103         * aarch64-linux-nat.c: Update.
2104         * ada-tasks.c: Update.
2105         * aix-thread.c: Update.
2106         * amd64-linux-nat.c: Update.
2107         * arm-linux-nat.c: Update.
2108         * corelow.c: Update.
2109         * fbsd-nat.c: Update.
2110         * fbsd-tdep.c: Update.
2111         * gnu-nat.c: Update.
2112         * i386-cygwin-tdep.c: Update.
2113         * i386-gnu-nat.c: Update.
2114         * i386-linux-nat.c: Update.
2115         * ia64-linux-nat.c: Update.
2116         * inf-ptrace.c: Update.
2117         * infrun.c: Update.
2118         * linux-fork.c: Update.
2119         * linux-nat.c: Update.
2120         * linux-tdep.c: Update.
2121         * linux-thread-db.c: Update.
2122         * mips-linux-nat.c: Update.
2123         * nat/aarch64-linux-hw-point.c: Update.
2124         * nat/aarch64-linux.c: Update.
2125         * nat/linux-btrace.c: Update.
2126         * nat/linux-osdata.c: Update.
2127         * nat/linux-procfs.c: Update.
2128         * nat/x86-linux-dregs.c: Update.
2129         * obsd-nat.c: Update.
2130         * ppc-fbsd-nat.c: Update.
2131         * ppc-linux-nat.c: Update.
2132         * procfs.c: Update.
2133         * python/py-infthread.c: Update.
2134         * ravenscar-thread.c: Update.
2135         * remote.c: Update.
2136         * s390-linux-nat.c: Update.
2137         * sol-thread.c: Update.
2138         * sol2-tdep.c: Update.
2139         * spu-linux-nat.c: Update.
2140         * x86-linux-nat.c: Update.
2141         * xtensa-linux-nat.c: Update.
2142
2143 2018-07-03  Tom Tromey  <tom@tromey.com>
2144
2145         * common/ptid.c (ptid_get_pid): Remove.
2146         * common/ptid.h (ptid_get_pid): Don't declare.
2147         * aarch64-linux-nat.c: Update.
2148         * ada-lang.c: Update.
2149         * aix-thread.c: Update.
2150         * alpha-bsd-nat.c: Update.
2151         * amd64-fbsd-nat.c: Update.
2152         * amd64-linux-nat.c: Update.
2153         * arm-linux-nat.c: Update.
2154         * arm-nbsd-nat.c: Update.
2155         * auxv.c: Update.
2156         * break-catch-syscall.c: Update.
2157         * breakpoint.c: Update.
2158         * bsd-uthread.c: Update.
2159         * corelow.c: Update.
2160         * ctf.c: Update.
2161         * darwin-nat.c: Update.
2162         * fbsd-nat.c: Update.
2163         * fbsd-tdep.c: Update.
2164         * gcore.c: Update.
2165         * gnu-nat.c: Update.
2166         * hppa-nbsd-nat.c: Update.
2167         * hppa-obsd-nat.c: Update.
2168         * i386-fbsd-nat.c: Update.
2169         * ia64-linux-nat.c: Update.
2170         * inf-ptrace.c: Update.
2171         * infcmd.c: Update.
2172         * inferior.c: Update.
2173         * inferior.h: Update.
2174         * inflow.c: Update.
2175         * infrun.c: Update.
2176         * linux-fork.c: Update.
2177         * linux-nat.c: Update.
2178         * linux-tdep.c: Update.
2179         * linux-thread-db.c: Update.
2180         * m68k-bsd-nat.c: Update.
2181         * mi/mi-interp.c: Update.
2182         * mi/mi-main.c: Update.
2183         * mips-linux-nat.c: Update.
2184         * mips-nbsd-nat.c: Update.
2185         * mips64-obsd-nat.c: Update.
2186         * nat/aarch64-linux-hw-point.c: Update.
2187         * nat/aarch64-linux.c: Update.
2188         * nat/linux-btrace.c: Update.
2189         * nat/linux-osdata.c: Update.
2190         * nat/linux-procfs.c: Update.
2191         * nat/x86-linux-dregs.c: Update.
2192         * nto-procfs.c: Update.
2193         * obsd-nat.c: Update.
2194         * ppc-linux-nat.c: Update.
2195         * ppc-nbsd-nat.c: Update.
2196         * ppc-obsd-nat.c: Update.
2197         * proc-service.c: Update.
2198         * procfs.c: Update.
2199         * python/py-inferior.c: Update.
2200         * python/py-infthread.c: Update.
2201         * ravenscar-thread.c: Update.
2202         * record.c: Update.
2203         * remote-sim.c: Update.
2204         * remote.c: Update.
2205         * rs6000-nat.c: Update.
2206         * s390-linux-nat.c: Update.
2207         * sh-nbsd-nat.c: Update.
2208         * sol-thread.c: Update.
2209         * sparc-nat.c: Update.
2210         * sparc64-tdep.c: Update.
2211         * spu-linux-nat.c: Update.
2212         * spu-tdep.c: Update.
2213         * target-debug.h: Update.
2214         * target.c: Update.
2215         * thread.c: Update.
2216         * tid-parse.c: Update.
2217         * tracefile-tfile.c: Update.
2218         * vax-bsd-nat.c: Update.
2219         * windows-nat.c: Update.
2220         * x86-linux-nat.c: Update.
2221         * x86-nat.c: Update.
2222
2223 2018-07-03  Tom Tromey  <tom@tromey.com>
2224
2225         * common/ptid.c (pid_to_ptid): Remove.
2226         * common/ptid.h (pid_to_ptid): Don't declare.
2227         * aix-thread.c: Update.
2228         * arm-linux-nat.c: Update.
2229         * common/ptid.c: Update.
2230         * common/ptid.h: Update.
2231         * corelow.c: Update.
2232         * ctf.c: Update.
2233         * darwin-nat.c: Update.
2234         * fbsd-nat.c: Update.
2235         * fork-child.c: Update.
2236         * gnu-nat.c: Update.
2237         * go32-nat.c: Update.
2238         * inf-ptrace.c: Update.
2239         * infcmd.c: Update.
2240         * inferior.c: Update.
2241         * infrun.c: Update.
2242         * linux-fork.c: Update.
2243         * linux-nat.c: Update.
2244         * nat/aarch64-linux-hw-point.c: Update.
2245         * nat/fork-inferior.c: Update.
2246         * nat/x86-linux-dregs.c: Update.
2247         * nto-procfs.c: Update.
2248         * obsd-nat.c: Update.
2249         * procfs.c: Update.
2250         * progspace.c: Update.
2251         * remote.c: Update.
2252         * rs6000-nat.c: Update.
2253         * s390-linux-nat.c: Update.
2254         * sol-thread.c: Update.
2255         * spu-linux-nat.c: Update.
2256         * target.c: Update.
2257         * top.c: Update.
2258         * tracefile-tfile.c: Update.
2259         * windows-nat.c: Update.
2260
2261 2018-07-03  Tom Tromey  <tom@tromey.com>
2262
2263         * common/ptid.h (ptid_build): Don't declare.
2264         * common/ptid.c (ptid_build): Remove.
2265         * aix-thread.c: Update.
2266         * bsd-kvm.c: Update.
2267         * bsd-uthread.c: Update.
2268         * common/agent.c: Update.
2269         * common/ptid.c: Update.
2270         * common/ptid.h: Update.
2271         * corelow.c: Update.
2272         * darwin-nat.c: Update.
2273         * fbsd-nat.c: Update.
2274         * gnu-nat.c: Update.
2275         * linux-fork.c: Update.
2276         * linux-nat.c: Update.
2277         * linux-thread-db.c: Update.
2278         * nat/linux-osdata.c: Update.
2279         * nat/linux-procfs.c: Update.
2280         * nto-procfs.c: Update.
2281         * obsd-nat.c: Update.
2282         * proc-service.c: Update.
2283         * procfs.c: Update.
2284         * ravenscar-thread.c: Update.
2285         * remote-sim.c: Update.
2286         * remote.c: Update.
2287         * sol-thread.c: Update.
2288         * target.c: Update.
2289         * windows-nat.c: Update.
2290
2291 2018-07-03  Tom Tromey  <tom@tromey.com>
2292
2293         * infrun.c (follow_exec): Use exit_inferior_silent.
2294         * inferior.c (exit_inferior_num_silent): Remove.
2295         * inferior.h (exit_inferior_num_silent): Don't declare.
2296
2297 2018-07-03  Tom Tromey  <tom@tromey.com>
2298
2299         PR cli/23340:
2300         * darwin-nat.c (darwin_attach_pid): Reset inferior and
2301         inferior_ptid on error.
2302
2303 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
2304             Simon Marchi  <simon.marchi@polymtl.ca>
2305
2306         PR tdep/8282
2307         * disasm.h (gdb_disassembler): Add
2308         `m_disassembler_options_holder'. member
2309         * disasm.c (get_all_disassembler_options): New function.
2310         (gdb_disassembler::gdb_disassembler): Use it.
2311         (gdb_buffered_insn_length_init_dis): Likewise.
2312         (gdb_buffered_insn_length): Adjust accordingly.
2313         (set_disassembler_options): Handle options with arguments.
2314         (show_disassembler_options_sfunc): Likewise.  Add a leading new
2315         line if showing options with descriptions.
2316         (disassembler_options_completer): Adapt to using the
2317         `disasm_options_and_args_t' structure.
2318         * mips-tdep.c (mips_disassembler_options): New variable.
2319         (mips_disassembler_options_o32): Likewise.
2320         (mips_disassembler_options_n32): Likewise.
2321         (mips_disassembler_options_n64): Likewise.
2322         (gdb_print_insn_mips): Don't set `disassembler_options'.
2323         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2324         functions.
2325         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2326         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
2327         `gdbarch_disassembler_options_implicit' and
2328         `gdbarch_valid_disassembler_options'.
2329         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2330         `disasm_options_and_args_t' structure.
2331         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2332         method.
2333         (valid_disassembler_options): Switch from `disasm_options_t' to
2334         the `disasm_options_and_args_t' structure.
2335         * NEWS: Document `set disassembler-options' support for the MIPS
2336         target.
2337         * gdbarch.h: Regenerate.
2338         * gdbarch.c: Regenerate.
2339
2340 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2341
2342         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2343
2344 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
2345
2346         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2347         parameter in call to amd64_target_description.
2348         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2349         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2350         (amd64fbsd_init_abi): Likewise.
2351         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2352         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2353         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2354         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2355
2356 2018-06-29  Pedro Alves  <palves@redhat.com>
2357
2358         * gdb/amd64-tdep.h (amd64_create_target_description): Add
2359         "segments" parameter.
2360         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2361         (_initialize_amd64_tdep): Update call to
2362         amd64_create_target_description.
2363         (amd64_target_description): Add "segments" parameter.  Adjust
2364         the implementation to use it.
2365         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2366         call to amd64_create_target_description.
2367         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2368         * gdb/arch/amd64.h (amd64_create_target_description): Add
2369         "segments" register.
2370         * gdb/arch/amd64.c (amd64_create_target_description): Add
2371         "segments" parameter.  Call create_feature_i386_64bit_segments
2372         only if SEGMENTS is true.
2373         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2374         call to amd64_create_target_description.
2375
2376 2018-06-29  Pedro Alves  <palves@redhat.com>
2377
2378         * thread.c (thread_target_id_str): New, factored out from ...
2379         (print_thread_info_1): ... here.  Use it to compute the max
2380         "Target Id" column width.
2381
2382 2018-06-29  Pedro Alves  <palves@redhat.com>
2383
2384         * remote.c (remote_target::extra_thread_info): Delete
2385         'display_buf' and 'n' locals.  from the cache, regardless of
2386         packet mechanims is in use.  Use cache for qThreadExtra and qP
2387         methods too.
2388
2389 2018-06-29  Pedro Alves  <palves@redhat.com>
2390
2391         * blockframe.c (find_pc_sect_containing_function): New function.
2392         * breakpoint.c (print_breakpoint_location): Don't call
2393         find_pc_sect_function.
2394         * linespec.c (create_sals_line_offset): Record the location's
2395         symbol in the sal.
2396         * linespec.c (convert_address_location_to_sals): Fill in sal's
2397         symbol with find_pc_sect_containing_function.
2398         * symtab.c (find_function_start_sal): Rename to ...
2399         (find_function_start_sal_1): ... this.
2400         (find_function_start_sal): Reimplement as wrapper around
2401         find_function_start_sal_1, and use
2402         find_pc_sect_containing_function to fill in the sal's symbol.
2403         (find_function_start_sal(symbol*, bool)): Adjust.
2404         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2405         comments.
2406         (find_pc_sect_containing_function): Declare.
2407
2408 2018-06-29  Pedro Alves  <palves@redhat.com>
2409
2410         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2411         true if the the location has no symbol.
2412
2413 2018-06-28  Tom Tromey  <tom@tromey.com>
2414
2415         * NEWS: Mention --enable-codesign.
2416         * silent-rules.mk (ECHO_SIGN): New variable.
2417         * configure.ac: Add --enable-codesign.
2418         * configure: Rebuild.
2419         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2420         (gdb$(EXEEXT)): Optionally invoke codesign.
2421
2422 2018-06-28  Pedro Alves  <palves@redhat.com>
2423
2424         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2425         comments.
2426         (switch_to_thread_no_regs): Adjust comment.
2427         * infcmd.c (stop_pc): Delete.
2428         (post_create_inferior, info_program_command): Replace references
2429         to stop_pc with references to thread_info->suspend.stop_pc.
2430         * inferior.h (stop_pc): Delete declaration.
2431         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2432         (handle_inferior_event_1, handle_signal_stop)
2433         (process_event_stop_test, keep_going_stepped_thread)
2434         (handle_step_into_function, handle_step_into_function_backward)
2435         (print_stop_location): Replace references to stop_pc with
2436         references to thread_info->suspend.stop_pc.
2437         (struct infcall_suspend_state) <stop_pc>: Delete field.
2438         (save_infcall_suspend_state, restore_infcall_suspend_state):
2439         Remove references to inf_stat->stop_pc.
2440         * linux-fork.c (fork_load_infrun_state): Likewise.
2441         * record-btrace.c (record_btrace_set_replay): Likewise.
2442         * record-full.c (record_full_goto_entry): Likewise.
2443         * remote.c (print_one_stopped_thread): Likewise.
2444         * target.c (target_resume): Extend comment.
2445         * thread.c (set_executing_thread): New.
2446         (set_executing): Use it.
2447         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2448         Remove references to stop_pc.
2449
2450 2018-06-28  Pedro Alves  <palves@redhat.com>
2451
2452         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2453         Moving fetching stop_pc until after ecs->event_thread is refreshed.
2454
2455 2018-06-28  Tom Tromey  <tom@tromey.com>
2456
2457         * coffread.c (coff_symfile_finish): Update.
2458         * xcoffread.c (xcoff_symfile_finish): Update.
2459         * elfread.c (elf_symfile_finish): Update.
2460         * symfile.h (dwarf2_free_objfile): Don't declare.
2461         * dwarf2read.c (_initialize_dwarf2_read): Use
2462         register_objfile_data_with_cleanup.
2463         (dwarf2_free_objfile): Now static.  Change signature.
2464
2465 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2466
2467         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2468         option "-o" to add-symbol-file-load to add an offset to each
2469         section's load address.
2470         * symfile.c (set_objfile_default_section_offset): New function.
2471
2472 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2473
2474         * symfile.c (add_symbol_file_command): Make sure that sections
2475         with the same name are sorted in the same order.
2476
2477 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2478
2479         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2480         require the second argument.  If omitted, load sections at the
2481         addresses specified in the file.
2482
2483 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2484
2485         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2486         (_initialize_symfile): Add option "-o" to symbol-file to add an
2487         offset to each section of the symbol file.
2488
2489 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2490
2491         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2492
2493 2018-06-27  Tom Tromey  <tom@tromey.com>
2494
2495         * stack.c (_initialize_stack): Update "func" help text.
2496
2497 2018-06-27  Tom Tromey  <tom@tromey.com>
2498
2499         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2500         std::vector.
2501         (unwind_infopy_str, pyuw_create_unwind_info)
2502         (unwind_infopy_add_saved_register, pyuw_sniffer)
2503         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2504         Update.
2505         (struct saved_reg): Add constructor.
2506         <value>: Now a gdbpy_ref<>.
2507
2508 2018-06-27  Tom Tromey  <tom@tromey.com>
2509
2510         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2511
2512 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2513
2514         * gdb-gdb.py.in: Format using autopep8.
2515
2516 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2517
2518         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2519         (type_lookup_function): Recognize CORE_ADDR values.
2520
2521 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2522
2523         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2524         print tag_name.
2525
2526 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2527
2528         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2529         <__lt__>: Add.
2530
2531 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2532
2533         * gdb-gdb.py: Move to...
2534         * gdb-gdb.py.in: ... here.
2535         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2536         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2537         dependencies.
2538         (distclean): Remove gdb-gdb.py when cleaning.
2539         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2540         * configure: Re-generate.
2541
2542 2018-06-27  Pedro Alves  <palves@redhat.com>
2543
2544         * proc-service.c (get_ps_regcache): New.
2545         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2546         (ps_lsetfpregs): Use it.
2547
2548 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2549
2550         PR gdb/21695
2551         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2552         (dwarf_decode_lines_1): Adjust.
2553
2554 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2555
2556         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2557         override.
2558         <info_proc>: Likewise.
2559
2560 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2561
2562         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2563         to windows_fetch_one_register, and only handle the case of
2564         fetching one register.  Move the code that reloads the context
2565         and iterates over all registers if R is negative to...
2566         (windows_nat_target::fetch_registers): ... here.
2567         (do_windows_store_inferior_registers): Rename to
2568         windows_store_one_register, and only handle the case of storing
2569         one register.  Move the code that handles the case where r is
2570         negative to...
2571         (windows_nat_target::store_registers) ... here.
2572
2573 2018-06-26  Tom Tromey  <tom@tromey.com>
2574
2575         PR rust/22574:
2576         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2577         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2578         Update.
2579         (rust_internal_print_type): Add podata parameter.
2580         (rust_print_type): Update.
2581
2582 2018-06-26  Tom Tromey  <tom@tromey.com>
2583
2584         * typeprint.h (struct print_offset_data) <update, finish,
2585         maybe_print_hole>: New methods.
2586         <indentation>: New constant.
2587         * typeprint.c (print_offset_data::indentation): Define.
2588         (print_offset_data::maybe_print_hole, print_offset_data::update)
2589         (print_offset_data::finish): Move from c-typeprint.c and rename.
2590         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2591         (print_spaces_filtered_with_print_options): Update.
2592         (c_print_type_union_field_offset, maybe_print_hole)
2593         (c_print_type_struct_field_offset): Move to typeprint.c and
2594         rename.
2595         (c_type_print_base_struct_union): Update.
2596
2597 2018-06-25  Pedro Alves  <palves@redhat.com>
2598
2599         * gdbthread.h (thread_info_ref, delete_thread)
2600         (delete_thread_silent, first_thread_of_inferior)
2601         (any_thread_of_inferior, switch_to_thread)
2602         (enable_thread_stack_temporaries)
2603         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2604         (get_last_thread_stack_temporary)
2605         (value_in_thread_stack_temporaries, can_access_registers_thread):
2606         Spell out "struct thread_info" instead of just "thread_info".
2607         * inferior.h (notice_new_inferior): Likewise.
2608
2609 2018-06-25  Pedro Alves  <palves@redhat.com>
2610
2611         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2612         pass thread_info pointer to delete_thread.
2613         (windows_nat_target::detach): Pass inferior pointer to
2614         detach_inferior.
2615         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2616         delete_thread.
2617         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2618         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2619         and pass a thread_info pointer to delete_thread.
2620         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2621         pass thread_info pointer to delete_thread.
2622         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2623         delete_thread_silent call.
2624         * procfs.c (procfs_target::detach): Pass inferior pointer to
2625         detach_inferior.
2626         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2627         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2628         delete_thread_silent call.
2629         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2630         pass thread_info pointer to delete_thread.
2631         (windows_nat_target::detach): Pass inferior pointer to
2632         delete_inferior.
2633
2634 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2635
2636         * regcache.c (readable_regcache::read_part): Fix asserts.
2637         (reg_buffer::raw_collect_part): New function.
2638         (regcache::write_part): Fix asserts.
2639         (reg_buffer::raw_supply_part): New function.
2640         (regcache::transfer_regset_register): New helper function.
2641         (regcache::transfer_regset): Call new functions.
2642         (regcache_supply_regset): Use gdb_byte*.
2643         (regcache::supply_regset): Likewise.
2644         (regcache_collect_regset): Likewise.
2645         (regcache::collect_regset): Likewise.
2646         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2647         (reg_buffer::raw_supply_part): Likewise.
2648         (regcache::transfer_regset_register): Likewise.
2649         (regcache::transfer_regset): Use gdb_byte*.
2650
2651 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2652
2653         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2654
2655 2018-06-21  Pedro Alves  <palves@redhat.com>
2656
2657         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2658         instead of a ptid_t.  All callers adjusted.
2659         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2660         adjusted.
2661         (print_ada_task_info, display_current_task_id, task_command_1):
2662         Adjust.
2663         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2664         inferior_thread.
2665         (breakpoint_kind): Adjust.
2666         (remove_breakpoints_pid): Rename to ...
2667         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2668         pointer.  All callers adjusted.
2669         (bpstat_clear_actions): Use inferior_thread.
2670         (get_bpstat_thread): New.
2671         (bpstat_do_actions): Use it.
2672         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2673         to take a thread_info pointer.  All callers adjusted.
2674         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2675         (breakpoint_re_set_thread): Use inferior_thread.
2676         * breakpoint.h (struct inferior): Forward declare.
2677         (bpstat_stop_status): Update.
2678         (remove_breakpoints_pid): Delete.
2679         (remove_breakpoints_inf): New.
2680         * bsd-uthread.c (bsd_uthread_target::wait)
2681         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2682         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2683         (maint_btrace_packet_history_cmd)
2684         (maint_btrace_clear_packet_history_cmd): Adjust.
2685         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2686         inferior_thread.
2687         * cli/cli-interp.c: Include "inferior.h".
2688         * common/refcounted-object.h (struct
2689         refcounted_object_ref_policy): New.
2690         * compile/compile-object-load.c: Include gdbthread.h.
2691         (store_regs): Use inferior_thread.
2692         * corelow.c (core_target::close): Use current_inferior.
2693         (core_target_open): Adjust to use first_thread_of_inferior and use
2694         the current inferior.
2695         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2696         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2697         <thread>: ... this new field.  All references adjusted.
2698         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2699         Take a thread_info pointer instead of a ptid_t.
2700         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2701         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2702         thread_info pointer instead of a ptid_t.
2703         * elfread.c: Include "inferior.h".
2704         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2705         Use inferior_thread.
2706         * eval.c (evaluate_subexp): Likewise.
2707         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2708         inferior_thread.
2709         * gdb_proc_service.h (struct thread_info): Forward declare.
2710         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2711         <thread>: ... this new field.  All references adjusted.
2712         * gdbarch.h, gdbarch.c: Regenerate.
2713         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2714         'thread' parameter.  All implementations and callers adjusted.
2715         * gdbthread.h (thread_info) <set_running>: New method.
2716         (delete_thread, delete_thread_silent): Take a thread_info pointer
2717         instead of a ptid.
2718         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2719         (first_thread_of_process): Delete, replaced by ...
2720         (first_thread_of_inferior): ... this new function.  All callers
2721         adjusted.
2722         (any_live_thread_of_process): Delete, replaced by ...
2723         (any_live_thread_of_inferior): ... this new function.  All callers
2724         adjusted.
2725         (switch_to_thread, switch_to_no_thread): Declare.
2726         (is_executing): Delete.
2727         (enable_thread_stack_temporaries): Update comment.
2728         <enable_thread_stack_temporaries>: Take a thread_info pointer
2729         instead of a ptid_t.  Incref the thread.
2730         <~enable_thread_stack_temporaries>: Decref the thread.
2731         <m_ptid>: Delete
2732         <m_thr>: New.
2733         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2734         (get_last_thread_stack_temporary)
2735         (value_in_thread_stack_temporaries, can_access_registers_thread):
2736         Take a thread_info pointer instead of a ptid_t.  All callers
2737         adjusted.
2738         * infcall.c (get_call_return_value): Use inferior_thread.
2739         (run_inferior_call): Work with thread pointers instead of ptid_t.
2740         (call_function_by_hand_dummy): Work with thread pointers instead
2741         of ptid_t.  Use thread_info_ref.
2742         * infcmd.c (proceed_thread_callback): Access thread's state
2743         directly.
2744         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2745         access thread's state directly.
2746         (continue_command): Use inferior_thread.
2747         (info_program_command): Use find_thread_ptid and access thread
2748         state directly.
2749         (proceed_after_attach_callback): Use thread state directly.
2750         (notice_new_inferior): Take a thread_info pointer instead of a
2751         ptid_t.  All callers adjusted.
2752         (exit_inferior): Take an inferior pointer instead of a pid.  All
2753         callers adjusted.
2754         (exit_inferior_silent): New.
2755         (detach_inferior): Delete.
2756         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2757         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2758         (detach_inferior_command, kill_inferior_command): Use
2759         find_inferior_id instead of valid_gdb_inferior_id and
2760         gdb_inferior_id_to_pid.
2761         (inferior_command): Use inferior and thread pointers.
2762         * inferior.h (struct thread_info): Forward declare.
2763         (notice_new_inferior): Take a thread_info pointer instead of a
2764         ptid_t.  All callers adjusted.
2765         (detach_inferior): Delete declaration.
2766         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2767         instead of a pid.  All callers adjusted.
2768         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2769         (valid_gdb_inferior_id): Delete.
2770         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2771         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2772         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2773         ...
2774         <inf>: ... this new field.
2775         <step_ptid>: Delete, replaced by ...
2776         <step_thread>: ... this new field.
2777         (get_displaced_stepping_state): Take an inferior pointer instead
2778         of a pid.  All callers adjusted.
2779         (displaced_step_in_progress_any_inferior): Adjust.
2780         (displaced_step_in_progress_thread): Take a thread pointer instead
2781         of a ptid_t.  All callers adjusted.
2782         (displaced_step_in_progress, add_displaced_stepping_state): Take
2783         an inferior pointer instead of a pid.  All callers adjusted.
2784         (get_displaced_step_closure_by_addr): Adjust.
2785         (remove_displaced_stepping_state): Take an inferior pointer
2786         instead of a pid.  All callers adjusted.
2787         (displaced_step_prepare_throw, displaced_step_prepare)
2788         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2789         All callers adjusted.
2790         (start_step_over): Adjust.
2791         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2792         displaced step queue.
2793         (do_target_resume): Adjust.
2794         (fetch_inferior_event): Use inferior_thread.
2795         (context_switch, get_inferior_stop_soon): Take an
2796         execution_control_state pointer instead of a ptid_t.  All callers
2797         adjusted.
2798         (switch_to_thread_cleanup): Delete.
2799         (stop_all_threads): Use scoped_restore_current_thread.
2800         * inline-frame.c: Include "gdbthread.h".
2801         (inline_state) <inline_state>: Take a thread pointer instead of a
2802         ptid_t.  All callers adjusted.
2803         <ptid>: Delete, replaced by ...
2804         <thread>: ... this new field.
2805         (find_inline_frame_state): Take a thread pointer instead of a
2806         ptid_t.  All callers adjusted.
2807         (skip_inline_frames, step_into_inline_frame)
2808         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2809         pointer instead of a ptid_t.  All callers adjusted.
2810         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2811         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2812         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2813         pointers directly.
2814         * linux-nat.c (get_detach_signal): Likewise.
2815         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2816         (thread_db_notice_clone): Adjust.
2817         (thread_db_find_new_threads_silently)
2818         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2819         a thread pointer instead of a ptid_t.  All callers adjusted.
2820         * mi/mi-cmd-var.c: Include "inferior.h".
2821         (mi_cmd_var_update_iter): Update to use thread pointers.
2822         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2823         inferior directly.
2824         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2825         out to ...
2826         (mi_output_running): ... this new function.
2827         (mi_on_resume_1): Adjust to use it.
2828         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2829         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2830         directly.
2831         (interrupt_thread_callback): : Adjust to use thread and inferior
2832         pointers.
2833         * proc-service.c: Include "gdbthread.h".
2834         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2835         * progspace-and-thread.c: Include "inferior.h".
2836         * progspace.c: Include "inferior.h".
2837         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2838         hold a reference to an inferior_object.
2839         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2840         inferior_thread.
2841         * python/py-inferior.c (struct inferior_object): Give the type a
2842         tag name instead of a typedef.
2843         (python_on_normal_stop): No need to check if the current thread is
2844         listed.
2845         (inferior_to_inferior_object): Change return type to
2846         inferior_object.  All callers adjusted.
2847         (find_thread_object): Delete, bits factored out to ...
2848         (thread_to_thread_object): ... this new function.
2849         * python/py-infthread.c (create_thread_object): Use
2850         inferior_to_inferior_object.
2851         (thpy_is_stopped): Use thread pointer directly.
2852         (gdbpy_selected_thread): Use inferior_thread.
2853         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2854         field, replaced with ...
2855         <thread>: ... this new field.  All users adjusted.
2856         (btpy_insn_or_gap_new): Drop const.
2857         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2858         callers adjusted.
2859         * python/py-record.c: Include "gdbthread.h".
2860         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2861         a ptid_t.  All callers adjusted.
2862         (gdbpy_current_recording): Use inferior_thread.
2863         * python/py-record.h (recpy_record_object) <ptid>: Delete
2864         field, replaced with ...
2865         <thread>: ... this new field.  All users adjusted.
2866         (recpy_element_object) <ptid>: Delete
2867         field, replaced with ...
2868         <thread>: ... this new field.  All users adjusted.
2869         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2870         a ptid_t.  All callers adjusted.
2871         * python/py-threadevent.c: Include "gdbthread.h".
2872         (get_event_thread): Use thread_to_thread_object.
2873         * python/python-internal.h (struct inferior_object): Forward
2874         declare.
2875         (find_thread_object, find_inferior_object): Delete declarations.
2876         (thread_to_thread_object, inferior_to_inferior_object): New
2877         declarations.
2878         * record-btrace.c: Include "inferior.h".
2879         (require_btrace_thread): Use inferior_thread.
2880         (record_btrace_frame_sniffer)
2881         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2882         (get_thread_current_frame): Use scoped_restore_current_thread and
2883         switch_to_thread.
2884         (get_thread_current_frame): Use thread pointer directly.
2885         (record_btrace_replay_at_breakpoint): Use thread's inferior
2886         pointer directly.
2887         * record-full.c: Include "inferior.h".
2888         * regcache.c: Include "gdbthread.h".
2889         (get_thread_arch_regcache): Use the inferior's address space
2890         directly.
2891         (get_thread_regcache, registers_changed_thread): New.
2892         * regcache.h (get_thread_regcache(thread_info *thread)): New
2893         overload.
2894         (registers_changed_thread): New.
2895         (remote_target) <remote_detach_1>: Swap order of parameters.
2896         (remote_add_thread): <remote_add_thread>: Return the new thread.
2897         (get_remote_thread_info(ptid_t)): New overload.
2898         (remote_target::remote_notice_new_inferior): Use thread pointers
2899         directly.
2900         (remote_target::process_initial_stop_replies): Use
2901         thread_info::set_running.
2902         (remote_target::remote_detach_1, remote_target::detach)
2903         (extended_remote_target::detach): Adjust.
2904         * stack.c (frame_show_address): Use inferior_thread.
2905         * target-debug.h (target_debug_print_thread_info_pp): New.
2906         * target-delegates.c: Regenerate.
2907         * target.c (default_thread_address_space): Delete.
2908         (memory_xfer_partial_1): Use current_inferior.
2909         (target_detach): Use current_inferior.
2910         (target_thread_address_space): Delete.
2911         (generic_mourn_inferior): Use current_inferior.
2912         * target.h (struct target_ops) <thread_address_space>: Delete.
2913         (target_thread_address_space): Delete.
2914         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2915         pointers directly.
2916         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2917         thread pointer instead of a ptid_t.  Adjust all callers.
2918         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2919         (first_thread_of_process): Delete, replaced by ...
2920         (first_thread_of_inferior): ... this new function.  All callers
2921         adjusted.
2922         (any_thread_of_process): Rename to ...
2923         (any_thread_of_inferior): ... this, and take an inferior pointer.
2924         (any_live_thread_of_process): Rename to ...
2925         (any_live_thread_of_inferior): ... this, and take an inferior
2926         pointer.
2927         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2928         (value_in_thread_stack_temporaries)
2929         (get_last_thread_stack_temporary): Take a thread pointer instead
2930         of a ptid_t.  Adjust all callers.
2931         (thread_info::set_running): New.
2932         (validate_registers_access): Use inferior_thread.
2933         (can_access_registers_ptid): Rename to ...
2934         (can_access_registers_thread): ... this, and take a thread
2935         pointer.
2936         (print_thread_info_1): Adjust to compare thread pointers instead
2937         of ptids.
2938         (switch_to_no_thread, switch_to_thread): Make extern.
2939         (scoped_restore_current_thread::~scoped_restore_current_thread):
2940         Use m_thread pointer directly.
2941         (scoped_restore_current_thread::scoped_restore_current_thread):
2942         Use inferior_thread.
2943         (thread_command): Use thread pointer directly.
2944         (thread_num_make_value_helper): Use inferior_thread.
2945         * top.c (execute_command): Use inferior_thread.
2946         * tui/tui-interp.c: Include "inferior.h".
2947         * varobj.c (varobj_create): Use inferior_thread.
2948         (value_of_root_1): Use find_thread_global_id instead of
2949         global_thread_id_to_ptid.
2950
2951 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2952
2953         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2954         possible.
2955         (regcache::write_part): Likewise.
2956         (readable_regcache::cooked_read_part): Update comment.
2957         (readable_regcache::cooked_write_part): Likewise.
2958         * regcache.h: (readable_regcache::read_part): Likewise.
2959         (regcache::write_part): Likewise.
2960
2961 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2962             Dirk Schubert  <dirk.schubert@arm.com>
2963
2964         * aarch64-linux-nat.c (post_attach): New.
2965         (aarch64_linux_nat_target::post_attach): Override post_attach to
2966         record the number of hardware debug registers.
2967
2968 2018-06-20  Tom Tromey  <tom@tromey.com>
2969
2970         * python/py-param.c (add_setshow_generic): Make parameters const.
2971         (parmpy_init): Update.
2972
2973 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2974
2975         * regcache.h (regcache_cooked_read_ftype): Rename to...
2976         (register_read_ftype): ...this, change type to function_view.
2977         (class reg_buffer) <save>: Remove src parameter.
2978         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2979         parameter non-const in first overload.  Remove src parameter in
2980         second overload.
2981         * regcache.c (do_cooked_read): Remove.
2982         (readonly_detached_regcache::readonly_detached_regcache): Make
2983         parameter non-const, adjust call to other constructor.
2984         (reg_buffer::save): Remove src parameter.
2985         * frame.c (do_frame_register_read): Remove.
2986         (frame_save_as_regcache): Use lambda function.
2987         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2988         parameter to ppu2spu_data *.
2989         (ppu2spu_sniffer): Use lambda function.
2990
2991 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2992
2993         * record-full.c (record_full_target::insert_breakpoint): Remove
2994         "struct" keyword, add const.
2995
2996 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2997
2998         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2999         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3000         * configure.ac: Remove AC_PREREQ, add missing quoting.
3001         * gnulib/configure.ac: Modernize usage of
3002         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3003         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3004         (AUTOMAKE_VERSION): Bump to 1.15.1.
3005         * configure: Re-generate.
3006         * config.in: Re-generate.
3007         * aclocal.m4: Re-generate.
3008         * gnulib/aclocal.m4: Re-generate.
3009         * gnulib/config.in: Re-generate.
3010         * gnulib/configure: Re-generate.
3011         * gnulib/import/Makefile.in: Re-generate.
3012
3013 2018-06-19  Pedro Alves  <palves@redhat.com>
3014
3015         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3016         (lookup_minimal_symbol_by_pc_section): ... here with
3017         gdb_assert_not_reached added.
3018
3019 2018-06-19  Pedro Alves  <palves@redhat.com>
3020
3021         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3022         parameter with a block parameter.  Compare location's block symbol
3023         with the frame's block instead of addresses.
3024         (skip_inline_frames): Pass the current block instead of the
3025         frame's address.  Break out as soon as we determine the frame
3026         should not be skipped.
3027
3028 2018-06-18  Tom Tromey  <tom@tromey.com>
3029
3030         * solib-aix.c (solib_aix_get_section_offsets): Return
3031         unique_xmalloc_ptr.
3032         (solib_aix_solib_create_inferior_hook): Update.
3033
3034 2018-06-18  Tom Tromey  <tom@tromey.com>
3035
3036         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3037
3038 2018-06-18  Tom Tromey  <tom@tromey.com>
3039
3040         * solib-frv.c (frv_relocate_main_executable): Use
3041         unique_xmalloc_ptr.
3042         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3043         unique_xmalloc_ptr.
3044
3045 2018-06-18  Tom Tromey  <tom@tromey.com>
3046
3047         * objfiles.h (inhibit_section_map_updates): Update.
3048         (resume_section_map_updates, resume_section_map_updates_cleanup):
3049         Remove.
3050         * solib-svr4.c (svr4_handle_solib_event): Update.
3051         * objfiles.c (inhibit_section_map_updates): Return
3052         scoped_restore_tmpl<int>.
3053         (resume_section_map_updates, resume_section_map_updates_cleanup):
3054         Remove.
3055
3056 2018-06-18  Tom Tromey  <tom@tromey.com>
3057
3058         * valprint.h (read_string): Update.
3059         * valprint.c (read_string): Change type of "buffer".
3060         (val_print_string): Update.
3061         * python/py-value.c (valpy_string): Update.
3062         * language.h (struct language_defn) <la_get_string>: Change
3063         type of "buffer".
3064         (default_get_string, c_get_string): Update.
3065         * language.c (default_get_string): Change type of "buffer".
3066         * guile/scm-value.c (gdbscm_value_to_string): Update.
3067         * c-lang.c (c_get_string): Change type of "buffer".
3068
3069 2018-06-18  Tom Tromey  <tom@tromey.com>
3070
3071         * ser-mingw.c (struct pipe_state_destroyer): New.
3072         (pipe_state_up): New typedef.
3073         (cleanup_pipe_state): Remove.
3074         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3075
3076 2018-06-18  Tom Tromey  <tom@tromey.com>
3077
3078         * rust-lang.h (rust_yyerror): Don't declare.
3079         * rust-lang.c (rust_language_defn): Update.
3080         * rust-exp.y (yyerror): Now static.
3081         * parse.c (parse_exp_in_context_1): Update.
3082         * p-lang.h (p_yyerror): Don't declare.
3083         * p-lang.c (p_language_defn): Update.
3084         * p-exp.y (yyerror): Now static.
3085         * opencl-lang.c (opencl_language_defn): Update.
3086         * objc-lang.c (objc_language_defn): Update.
3087         * m2-lang.h (m2_yyerror): Don't declare.
3088         * m2-lang.c (m2_language_defn): Update.
3089         * m2-exp.y (yyerror): Now static.
3090         * language.h (struct language_defn) <la_error>: Remove.
3091         * language.c (unk_lang_error): Remove.
3092         (unknown_language_defn, auto_language_defn): Remove.
3093         * go-lang.h (go_yyerror): Don't declare.
3094         * go-lang.c (go_language_defn): Update.
3095         * go-exp.y (yyerror): Now static.
3096         * f-lang.h (f_yyerror): Don't declare.
3097         * f-lang.c (f_language_defn): Update.
3098         * f-exp.y (yyerror): Now static.
3099         * d-lang.h (d_yyerror): Don't declare.
3100         * d-lang.c (d_language_defn): Update.
3101         * d-exp.y (yyerror): Now static.
3102         * c-lang.h (c_yyerror): Don't declare.
3103         * c-lang.c (c_language_defn, cplus_language_defn)
3104         (asm_language_defn, minimal_language_defn): Update.
3105         * c-exp.y (yyerror): Now static.
3106         * ada-lang.h (ada_yyerror): Don't declare.
3107         * ada-lang.c (ada_language_defn): Update.
3108         * ada-exp.y (yyerror): Now static.
3109
3110 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3111
3112         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3113         (store_sveregs_to_thread): Likewise.
3114         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3115         (aarch64_linux_store_inferior_registers): Likewise.
3116         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3117         function.
3118         (aarch64_sve_regs_copy_to_regcache): Likewise.
3119         (aarch64_sve_regs_copy_from_regcache): Likewise.
3120         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3121         declaration.
3122         (aarch64_sve_regs_copy_to_regcache): Likewise.
3123         (aarch64_sve_regs_copy_from_regcache): Likewise.
3124         (sve_context): Structure from Linux headers.
3125         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3126         (SVE_SIG_ZREG_SIZE): Likewise.
3127         (SVE_SIG_PREG_SIZE): Likewise.
3128         (SVE_SIG_FFR_SIZE): Likewise.
3129         (SVE_SIG_REGS_OFFSET): Likewise.
3130         (SVE_SIG_ZREGS_OFFSET): Likewise.
3131         (SVE_SIG_ZREG_OFFSET): Likewise.
3132         (SVE_SIG_ZREGS_SIZE): Likewise.
3133         (SVE_SIG_PREGS_OFFSET): Likewise.
3134         (SVE_SIG_PREG_OFFSET): Likewise.
3135         (SVE_SIG_PREGS_SIZE): Likewise.
3136         (SVE_SIG_FFR_OFFSET): Likewise.
3137         (SVE_SIG_REGS_SIZE): Likewise.
3138         (SVE_SIG_CONTEXT_SIZE): Likewise.
3139         (SVE_PT_REGS_MASK): Likewise.
3140         (SVE_PT_REGS_FPSIMD): Likewise.
3141         (SVE_PT_REGS_SVE): Likewise.
3142         (SVE_PT_VL_INHERIT): Likewise.
3143         (SVE_PT_VL_ONEXEC): Likewise.
3144         (SVE_PT_REGS_OFFSET): Likewise.
3145         (SVE_PT_FPSIMD_OFFSET): Likewise.
3146         (SVE_PT_FPSIMD_SIZE): Likewise.
3147         (SVE_PT_SVE_ZREG_SIZE): Likewise.
3148         (SVE_PT_SVE_PREG_SIZE): Likewise.
3149         (SVE_PT_SVE_FFR_SIZE): Likewise.
3150         (SVE_PT_SVE_FPSR_SIZE): Likewise.
3151         (SVE_PT_SVE_FPCR_SIZE): Likewise.
3152         (__SVE_SIG_TO_PT): Likewise.
3153         (SVE_PT_SVE_OFFSET): Likewise.
3154         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3155         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3156         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3157         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3158         (SVE_PT_SVE_PREG_OFFSET): Likewise.
3159         (SVE_PT_SVE_PREGS_SIZE): Likewise.
3160         (SVE_PT_SVE_FFR_OFFSET): Likewise.
3161         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3162         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3163         (SVE_PT_SVE_SIZE): Likewise.
3164         (SVE_PT_SIZE): Likewise.
3165         (HAS_SVE_STATE): New define.
3166
3167 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3168
3169         * nat/aarch64-sve-linux-sigcontext.h: New file.
3170         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3171         new files.
3172         (SVE_VQ_MIN): Likewise.
3173         (SVE_VQ_MAX): Likewise.
3174         (SVE_VL_MIN): Likewise.
3175         (SVE_VL_MAX): Likewise.
3176         (SVE_NUM_ZREGS): Likewise.
3177         (SVE_NUM_PREGS): Likewise.
3178         (sve_vl_valid): Likewise.
3179         (struct user_sve_header): Likewise.
3180
3181 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
3182             Richard Bunt <Richard.Bunt@arm.com>
3183
3184         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3185         was requested by GDB.
3186
3187 2018-06-15  Tom de Vries  <tdevries@suse.de>
3188
3189         * MAINTAINERS (Write After Approval): Add Tom de Vries.
3190
3191 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
3192
3193         * gnulib/update-gnulib.sh: Print expected versions of
3194         autoconf/aclocal.
3195
3196 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
3197
3198         * arch-utils.c (default_type_align): Use type_length_units.
3199         * gdbtypes.c (type_align): Use type_length_units.
3200
3201 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3202
3203         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3204         of 'define' command.
3205
3206 2018-06-14  Tom de Vries  <tdevries@suse.de>
3207
3208         PR cli/22573
3209         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3210         get_no_prettyformat_print_options.
3211
3212 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3213
3214         * sparc-nat.h: Include target.h.
3215         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3216         <fetch_registers>: Remove this argument in function call.
3217         <store_registers>: Remove this argument in function call, remove
3218         extra semicolon.
3219         <low_forget_process>: Call sparc64_forget_process instead of
3220         sparc_forget_process.
3221
3222 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3223
3224         * procfs.c (_initialize_procfs): Use add_inf_child_target.
3225         (procfs_target::make_corefile_notes): Adjust to new
3226         target_read_alloc return type.
3227
3228 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3229             Stephen Roberts  <stephen.roberts@arm.com>
3230
3231         PR gdb/22882
3232         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3233         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3234         Move should_notify_stop local into more inner scope.
3235
3236 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3237             Stephen Roberts  <stephen.roberts@arm.com>
3238
3239         PR gdb/22882
3240         * infrun.c (resume_1): Add call to mark_async_event_handler.
3241
3242 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3243
3244         * infrun.c (do_target_wait): Change old version of $pc printed.
3245
3246 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
3247
3248         * dwarf2read.c (read_index_from_section): Rename to...
3249         (read_gdb_index_from_section): ... this, update all callers.
3250         (dwarf2_read_index): Rename to...
3251         (dwarf2_read_gdb_index): ... this, update all callers.
3252
3253 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
3254
3255         * gdb/hppa-linux-nat.c
3256         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3257         hppa_linux_nat_target::fetch_registers.
3258
3259 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3260
3261         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3262         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3263         (AARCH64_DWARF_SVE_FFR): Likewise.
3264         (AARCH64_DWARF_SVE_P0): Likewise.
3265         (AARCH64_DWARF_SVE_Z0): Likewise.
3266
3267 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3268
3269         * common/common-regcache.h (raw_compare): New function.
3270         * regcache.c (regcache::raw_compare): Likewise.
3271         * regcache.h (regcache::raw_compare): New declaration.
3272
3273 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3274
3275         * common/common-regcache.h (reg_buffer_common): New structure.
3276         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3277         (reg_buffer::raw_supply): Likewise.
3278         (reg_buffer::raw_supply_integer): Likewise.
3279         (reg_buffer::raw_supply_zeroed): Likewise.
3280         (reg_buffer::raw_collect): Likewise.
3281         (reg_buffer::raw_collect_integer): Likewise.
3282         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3283         (reg_buffer::raw_supply): Likewise.
3284         (reg_buffer::raw_supply_integer): Likewise.
3285         (reg_buffer::raw_supply_zeroed): Likewise.
3286         (reg_buffer::raw_collect): Likewise.
3287         (reg_buffer::raw_collect_integer): Likewise.
3288
3289 2018-06-10  Tom Tromey  <tom@tromey.com>
3290
3291         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
3292         (class remote_state) <stop_reply_queue>: Now std::vector.
3293         (remote_state::~remote_state)
3294         (remote_target::stop_reply_queue_length): Update.
3295         (struct queue_iter_param, remove_child_of_pending_fork)
3296         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3297         (check_pending_event_prevents_wildcard_vcont_callback)
3298         (remove_stop_reply_for_inferior)
3299         (remove_stop_reply_of_remote_state)
3300         (remote_notif_remove_once_on_match)
3301         (stop_reply_match_ptid_and_ws)
3302         (remote_kill_child_of_pending_fork): Remove.
3303         (remote_target::remove_new_fork_children)
3304         (remote_target::check_pending_events_prevent_wildcard_vcont)
3305         (remote_target::discard_pending_stop_replies)
3306         (remote_target::discard_pending_stop_replies_in_queue)
3307         (remote_target::remote_notif_remove_queued_reply)
3308         (remote_target::queued_stop_reply)
3309         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3310         (remote_target::wait, remote_target::kill_new_fork_children)
3311         (remote_target::async): Update.
3312
3313 2018-06-10  Tom Tromey  <tom@tromey.com>
3314
3315         * record-full.c (record_full_arch_list_cleanups): Remove.
3316         (record_full_message): Use try/catch.
3317         (record_full_wait_cleanups): Remove.
3318         (record_full_wait_1): Use try/catch.
3319         (record_full_restore): Likewise.
3320
3321 2018-06-10  Tom Tromey  <tom@tromey.com>
3322
3323         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
3324         declare VEC.  Add constructor.
3325         <in_target_beneath>: Now bool.
3326         (record_full_breakpoints): Now a std::vector, static.
3327         (record_full_sync_record_breakpoints)
3328         (record_full_init_record_breakpoints)
3329         (record_full_target::insert_breakpoint)
3330         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
3331
3332 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
3333
3334         * dwarf2read.c (process_cu_includes): Remove struct keyword.
3335         * serial.c (serial_interface_lookup): Remove struct keyword.
3336
3337 2018-06-10  Tom Tromey  <tom@tromey.com>
3338
3339         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3340         method.
3341         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3342         a method.
3343         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3344         method.
3345         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3346         "beneath" as a method.
3347         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3348         Use "beneath" as a method.
3349
3350 2018-06-10  Tom Tromey  <tom@tromey.com>
3351
3352         * tracefile.c (struct trace_file_writer_deleter): New.
3353         <operator()>: Rename from trace_file_writer_xfree.
3354         (trace_file_writer_up): New typedef.
3355         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3356
3357 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3358
3359         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3360         <m_registers, m_register_status>: Change type to
3361         std::unique_ptr.
3362         * regcache.c (reg_buffer::reg_buffer): Use new instead of
3363         XCNEWVEC.
3364
3365 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3366
3367         * common/common-regcache.h (enum register_status): Add
3368         underlying type "signed char".
3369         * regcache.h (reg_buffer) <m_register_status>: Change type to
3370         register_status *.
3371         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3372         register_status instead of signed char.
3373         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3374         (reg_buffer::get_register_status): Remove cast.
3375         (readable_regcache::raw_read): Remove cast.
3376         (readable_regcache::cooked_read): Remove cast.
3377
3378 2018-06-09  Tom Tromey  <tom@tromey.com>
3379
3380         * source.c (reverse_search_command, forward_search_command): Use
3381         scoped_fd.
3382
3383 2018-06-09  Tom Tromey  <tom@tromey.com>
3384
3385         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
3386         (serial_ops_list): Now static, std::vector.
3387         (serial_interface_lookup, serial_add_interface): Update.
3388
3389 2018-06-09  Tom Tromey  <tom@tromey.com>
3390
3391         * dwarf2read.c (process_cu_includes): Update.
3392         (process_full_comp_unit): Update.
3393         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3394         std::vector.
3395
3396 2018-06-08  Paul Koning  <paul_koning@dell.com>
3397
3398         PR gdb/23252
3399
3400         * python/python.c (do_start_initialization):
3401         Avoid call to internal Python API.
3402         (init__gdb_module): New function.
3403
3404 2018-06-08  Gary Benson <gbenson@redhat.com>
3405
3406         * linux-thread-db.c (valprint.h): New include.
3407         (struct check_thread_db_info): New structure.
3408         (check_thread_db_on_load, tdb_testinfo): New static globals.
3409         (check_thread_db, check_thread_db_callback): New functions.
3410         (try_thread_db_load_1): Run integrity checks if requested.
3411         (maintenance_check_libthread_db): New function.
3412         (_initialize_thread_db): Register "maint check libthread-db"
3413         and "maint set/show check-libthread-db".
3414         * NEWS: Mention the above new commands.
3415
3416 2018-06-08  Tom Tromey  <tom@tromey.com>
3417
3418         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3419         now a method.
3420
3421 2018-06-08  Tom Tromey  <tom@tromey.com>
3422
3423         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3424
3425 2018-06-08  Tom Tromey  <tom@tromey.com>
3426
3427         * common/btrace-common.h (struct btrace_data): Add constructor,
3428         destructor, move assignment operator.
3429         <empty, clear, fini>: New methods.
3430         <format>: Initialize.
3431         (btrace_data_init, btrace_data_fini, btrace_data_clear)
3432         (btrace_data_empty): Don't declare.
3433         * common/btrace-common.c (btrace_data_init): Remove.
3434         (btrace_data::fini): Rename from btrace_data_fini.
3435         (btrace_data::empty): Rename from btrace_data_empty.
3436         (btrace_data::clear): Rename from btrace_data_clear.  Return
3437         bool.
3438         * btrace.h (make_cleanup_btrace_data): Don't declare.
3439         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3440         (parse_xml_btrace): Update.
3441         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3442         (maint_btrace_clear_packet_history_cmd): Update.
3443
3444 2018-06-07  Pedro Alves  <palves@redhat.com>
3445
3446         * target.h (target_ops) <beneath>: Now a method.  All references
3447         updated.
3448         (class target_stack): New.
3449         * target.c (g_target_stack): New.
3450         (g_current_top_target): Delete.
3451         (current_top_target): Get the top target out of g_target_stack.
3452         (target_stack::push, target_stack::unpush): New.
3453         (push_target, unpush_target): Reimplement.
3454         (target_is_pushed): Reimplement in terms of g_target_stack.
3455         (target_ops::beneath, target_stack::find_beneath): New.
3456
3457 2018-06-07  Pedro Alves  <palves@redhat.com>
3458
3459         * target.h (find_target_beneath): Delete declaration.
3460         * target.c (find_target_beneath): Delete definition.
3461         * aix-thread.c: All callers of find_target_beneath adjusted to
3462         call target_ops::beneath instead.
3463         * bsd-uthread.c: Likewise.
3464         * linux-thread-db.c: Likewise.
3465         * ravenscar-thread.c: Likewise.
3466         * sol-thread.c: Likewise.
3467         * spu-multiarch.c: Likewise.
3468
3469 2018-06-07  Pedro Alves  <palves@redhat.com>
3470
3471         * target.h (target_ops) <beneath>: Now a method.  All references
3472         updated.
3473         (target_ops) <m_beneath>: New.
3474         * target.c (target_ops::beneath): New.
3475         * corelow.c: Adjust all references to target_ops::beneath.
3476         * linux-thread-db.c: Likewise.
3477         * make-target-delegates: Likewise.
3478         * record-btrace.c: Likewise.
3479         * record-full.c: Likewise.
3480         * remote.c: Likewise.
3481         * target.c: Likewise.
3482         * target-delegates.c: Regenerate.
3483
3484 2018-06-07  Pedro Alves  <palves@redhat.com>
3485
3486         * target.h (target_stack): Delete.
3487         (current_top_target): Declare function.
3488         * target.c (target_stack): Delete.
3489         (g_current_top_target): New.
3490         (current_top_target): New function.
3491         * auxv.c: Use current_top_target instead of target_stack
3492         throughout.
3493         * avr-tdep.c: Likewise.
3494         * breakpoint.c: Likewise.
3495         * corefile.c: Likewise.
3496         * elfread.c: Likewise.
3497         * eval.c: Likewise.
3498         * exceptions.c: Likewise.
3499         * frame.c: Likewise.
3500         * gdbarch-selftests.c: Likewise.
3501         * gnu-v3-abi.c: Likewise.
3502         * ia64-tdep.c: Likewise.
3503         * ia64-vms-tdep.c: Likewise.
3504         * infcall.c: Likewise.
3505         * infcmd.c: Likewise.
3506         * infrun.c: Likewise.
3507         * linespec.c: Likewise.
3508         * linux-tdep.c: Likewise.
3509         * minsyms.c: Likewise.
3510         * ppc-linux-nat.c: Likewise.
3511         * ppc-linux-tdep.c: Likewise.
3512         * procfs.c: Likewise.
3513         * regcache.c: Likewise.
3514         * remote.c: Likewise.
3515         * rs6000-tdep.c: Likewise.
3516         * s390-linux-nat.c: Likewise.
3517         * s390-tdep.c: Likewise.
3518         * solib-aix.c: Likewise.
3519         * solib-darwin.c: Likewise.
3520         * solib-dsbt.c: Likewise.
3521         * solib-spu.c: Likewise.
3522         * solib-svr4.c: Likewise.
3523         * solib-target.c: Likewise.
3524         * sparc-tdep.c: Likewise.
3525         * sparc64-tdep.c: Likewise.
3526         * spu-tdep.c: Likewise.
3527         * symfile.c: Likewise.
3528         * symtab.c: Likewise.
3529         * target-descriptions.c: Likewise.
3530         * target-memory.c: Likewise.
3531         * target.c: Likewise.
3532         * target.h: Likewise.
3533         * tracefile-tfile.c: Likewise.
3534         * tracepoint.c: Likewise.
3535         * valops.c: Likewise.
3536         * valprint.c: Likewise.
3537         * value.c: Likewise.
3538         * windows-tdep.c: Likewise.
3539         * mi/mi-main.c: Likewise.
3540
3541 2018-06-07  Tom Tromey  <tom@tromey.com>
3542
3543         * valprint.h (build_address_symbolic): Declare.
3544         * printcmd.c (print_address_symbolic): Update.
3545         (build_address_symbolic): Change "name" and "filename" to
3546         std::string.
3547         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3548         Update.
3549         * defs.h (build_address_symbolic): Remove declaration.
3550
3551 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3552
3553         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3554         (aarch64_vnv_type): Add function.
3555         (aarch64_pseudo_register_name): Add V regs for SVE.
3556         (aarch64_pseudo_register_type): Likewise.
3557         (aarch64_pseudo_register_reggroup_p): Likewise.
3558         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3559         (aarch64_pseudo_read_value): Add V regs for SVE.
3560         (aarch64_pseudo_write_2): Use V0 offset for SVE
3561         (aarch64_pseudo_write): Add V regs for SVE.
3562         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3563
3564 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3565
3566         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3567         (sve_vl_from_vq): Likewise.
3568
3569 2018-06-05  Tom Tromey  <tom@tromey.com>
3570
3571         * cli/cli-cmds.c (show_version): Update.
3572         * top.c (print_gdb_version): Add "interactive" parameter.
3573         Update.
3574         * main.c (captured_main_1): Update.
3575         * top.h (print_gdb_version): Add "interactive" parameter and a
3576         comment.
3577
3578 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3579
3580         * common/enum-flags.h: Add trailing semicolon to example in
3581         comment.
3582
3583 2018-06-05  Tom Tromey  <tom@tromey.com>
3584
3585         PR cli/12326:
3586         * NEWS: Add entry about pager.
3587         * utils.c (pagination_disabled_for_command): New global.
3588         (prompt_for_continue): Allow "c" response to prompt.
3589         (reinitialize_more_filter): Clear
3590         pagination_disabled_for_command.
3591         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3592
3593 2018-06-04  Tom Tromey  <tom@tromey.com>
3594
3595         * ada-lang.h (ada_lookup_symbol_list): Update.
3596         * ada-lang.c (resolve_subexp): Update.
3597         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3598         parameter.
3599         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3600         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3601         results parameter to std::vector.
3602         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3603         Update.
3604         * ada-exp.y (block_lookup): Update.
3605         (select_possible_type_sym): Change type of syms.  Remove nsyms
3606         parameter.
3607         (write_var_or_type, write_name_assoc): Update.
3608
3609 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3610
3611         * windows-nat.c (windows_nat_target::xfer_partial): Return
3612         TARGET_XFER_E_IO if we need to delegate to the target beneath
3613         but BENEATH is NULL.
3614
3615 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3616
3617         * Makefile.in (config.status): Add configure.nat as a
3618         dependency.
3619
3620 2018-06-04  Tom Tromey  <tom@tromey.com>
3621
3622         * cp-name-parser.y (cpname_state): Add method declarations.
3623         (HANDLE_QUAL): Update.
3624         (cpname_state::d_grab, cpname_state::fill_comp)
3625         (cpname_state::make_operator, cpname_state::make_dtor)
3626         (cpname_state::make_builtin_type, cpname_state::make_name)
3627         (cpname_state::d_qualify, cpname_state::d_int_type)
3628         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3629         (%union): Move earlier.
3630
3631 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3632
3633         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3634
3635 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3636
3637         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3638         (aarch64_pseudo_write_1): Likewise.
3639         (aarch64_pseudo_read_value): Use helper.
3640         (aarch64_pseudo_write): Likewise.
3641
3642 2018-06-04  Pedro Alves  <palves@redhat.com>
3643
3644         * darwin-nat.c (darwin_ops): Delete.
3645         (darwin_attach_pid): Use get_native_target.
3646
3647 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3648
3649         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3650         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3651
3652 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3653
3654         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3655         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3656         (aarch64_gdbarch_init): Check for SVE.
3657         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3658
3659 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3660
3661         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3662         * aarch64-tdep.h (aarch64_read_description): Likewise.
3663         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3664         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3665         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3666         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3667         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3668
3669 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3670
3671         * value.c (value_fetch_lazy_bitfield): New.
3672         (value_fetch_lazy_memory): New.
3673         (value_fetch_lazy_register): New.
3674         (value_fetch_lazy): Factor out to smaller functions.
3675
3676 2018-06-01  Tom Tromey  <tom@tromey.com>
3677
3678         * cp-name-parser.y (backslashable, represented): Now const.
3679
3680 2018-06-01  Tom Tromey  <tom@tromey.com>
3681
3682         * cp-name-parser.y: Include parser-defs.h.
3683         (parser_fprintf): Remove declaration.
3684
3685 2018-06-01  Tom Tromey  <tom@tromey.com>
3686
3687         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3688         %parse-param.
3689         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3690         (global_result): Remove globals.
3691         (struct cpname_state): New.
3692         (yyparse): Don't declare.
3693         (yylex, yyerror): Move declarations after %union.
3694         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3695         (make_name): Add state parameter.
3696         Update all callers.
3697         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3698         parameter.
3699         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3700         Update.
3701         (yylex): Add lvalp, state parameters.
3702         (yyerror): Add state parameter.
3703         (cp_demangled_name_to_comp): Update.
3704
3705 2018-06-01  Tom Tromey  <tom@tromey.com>
3706
3707         * cp-name-parser.y (parser_fprintf): Declare.
3708         (GDB_YY_REMAP_PREFIX): Define.
3709         Include yy-remap.h.  Don't redefine yy* identifiers.
3710
3711 2018-06-01  Tom Tromey  <tom@tromey.com>
3712
3713         * python/py-type.c (typy_legacy_template_argument): Update.
3714         * cp-support.h (cp_demangled_name_to_comp): Update.
3715         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3716         parameter to be a "std::string *".
3717         (main): Update.
3718
3719 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3720
3721         * ada-lex.l: Include "diagnostics.h" instead of
3722         "common/diagnostics.h".
3723         * unittests/environ-selftests.c: Likewise.
3724         * common/diagnostics.h: Moved to ../include.
3725
3726 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3727
3728         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3729         to language_mode_manual while calling breakpoint_re_set_one.
3730
3731 2018-06-01  Tom Tromey  <tom@tromey.com>
3732
3733         * valops.c (value_cast_structs, destructor_name_p): Update.
3734         * symtab.c (gdb_mangle_name): Update.
3735         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3736         Update.
3737         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3738         (pascal_object_print_value_fields, pascal_object_print_value):
3739         Update.
3740         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3741         * linespec.c (find_methods): Update.
3742         * gdbtypes.h (type_name_no_tag): Remove.
3743         (type_name_or_error): Rename from type_name_no_tag_or_error.
3744         * gdbtypes.c (type_name_no_tag): Remove.
3745         (type_name_or_error): Rename from type_name_no_tag_or_error.
3746         (lookup_struct_elt_type, check_typedef): Update.
3747         * expprint.c (print_subexp_standard): Update.
3748         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3749         * d-namespace.c (d_lookup_nested_symbol): Update.
3750         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3751         (cp_print_class_member): Update.
3752         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3753         * completer.c (add_struct_fields): Update.
3754         * c-typeprint.c (cp_type_print_derivation_info)
3755         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3756         Update.
3757         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3758         (ada_prefer_type, ada_is_exception_sym): Update.
3759
3760 2018-06-01  Tom Tromey  <tom@tromey.com>
3761
3762         * valops.c (enum_constant_from_type, value_namespace_elt)
3763         (value_maybe_namespace_elt): Update.
3764         * valarith.c (find_size_for_pointer_math): Update.
3765         * target-descriptions.c (make_gdb_type): Update.
3766         * symmisc.c (print_symbol): Update.
3767         * stabsread.c (define_symbol, read_type)
3768         (complain_about_struct_wipeout, add_undefined_type)
3769         (cleanup_undefined_types_1): Update.
3770         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3771         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3772         (rust_internal_print_type, rust_composite_type)
3773         (rust_evaluate_funcall, rust_evaluate_subexp)
3774         (rust_inclusive_range_type_p): Update.
3775         * python/py-type.c (typy_get_tag): Update.
3776         * p-typeprint.c (pascal_type_print_base): Update.
3777         * mdebugread.c (parse_symbol, parse_type): Update.
3778         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3779         Update.
3780         * guile/scm-type.c (gdbscm_type_tag): Update.
3781         * go-lang.c (sixg_string_p): Update.
3782         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3783         Update.
3784         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3785         (TYPE_TAG_NAME): Remove.
3786         * gdbtypes.c (type_name_no_tag): Simplify.
3787         (check_typedef, check_types_equal, recursive_dump_type)
3788         (copy_type_recursive, arch_composite_type): Update.
3789         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3790         in summary mode when needed.
3791         * eval.c (evaluate_funcall): Update.
3792         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3793         (process_structure_scope, read_enumeration_type)
3794         (read_namespace_type, read_module_type, determine_prefix): Update.
3795         * cp-support.c (inspect_type): Update.
3796         * coffread.c (process_coff_symbol, decode_base_type): Update.
3797         * c-varobj.c (c_is_path_expr_parent): Update.
3798         * c-typeprint.c (c_type_print_base_struct_union): Update.
3799         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3800         summary when using C language.
3801         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3802         (gen_maybe_namespace_elt): Update.
3803         * ada-lang.c (ada_type_name): Simplify.
3804         (empty_record, ada_template_to_fixed_record_type_1)
3805         (template_to_static_fixed_type)
3806         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3807
3808 2018-06-01  Tom Tromey  <tom@tromey.com>
3809
3810         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3811         c_print_type.
3812         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3813         (c_print_type): Update.
3814         (c_print_type): New overload.
3815         (c_type_print_varspec_prefix, c_type_print_args)
3816         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3817         (c_type_print_base_struct_union, c_type_print_base_1)
3818         (cp_type_print_method_args): Add "language" parameter.
3819         (c_type_print_base): Update.
3820         * c-lang.h (c_print_type): Add new overload.
3821
3822 2018-06-01  Tom Tromey  <tom@tromey.com>
3823
3824         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3825         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3826
3827 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3828
3829         * aarch64-tdep.c (aarch64_sve_register_names): New const
3830         var.
3831         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3832         (AARCH64_SVE_Z_REGS_NUM): New define.
3833         (AARCH64_SVE_P_REGS_NUM): Likewise.
3834         (AARCH64_SVE_NUM_REGS): Likewise.
3835
3836 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3837
3838         * nat/linux-ptrace.h [__alpha__]
3839         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3840         definitions.
3841
3842 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3843
3844         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3845         the endianness selected.
3846         * NEWS: Document `set endian auto' mode operation update.
3847
3848 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3849
3850         * Makefile.in: Add new header.
3851         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3852         (sve_vl_from_vg): Likewise.
3853         (sve_vq_from_vl): Likewise.
3854         (sve_vl_from_vq): Likewise.
3855         (sve_vq_from_vg): Likewise.
3856         (sve_vg_from_vq): Likewise.
3857         * configure.nat: Add new c file.
3858         * nat/aarch64-sve-linux-ptrace.c: New file.
3859         * nat/aarch64-sve-linux-ptrace.h: New file.
3860
3861 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3862
3863         * aarch64-linux-nat.c (aarch64_linux_read_description):
3864         Add parmeter zero.
3865         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3866         Likewise.
3867         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3868         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3869         (aarch64_gdbarch_init): Add parmeter zero.
3870         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3871         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3872         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3873         parmeter.
3874         * doc/gdb.texinfo: Describe SVE feature
3875         * features/aarch64-sve.c: New file.
3876
3877 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3878
3879         PR gdb/23210
3880         * gdbarch.sh (significant_addr_bit): Default to zero when
3881         not set by target architecture.
3882         * gdbarch.c: Re-generated.
3883         * utils.c (address_significant): Update.
3884
3885 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3886
3887         * stack.c (func_command): Remove trailing newline in call to error.
3888
3889 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3890
3891         * regcache.h (regcache_raw_collect): Remove, update callers to
3892         use regcache::raw_collect.
3893         * regcache.c (regcache_raw_collect): Remove.
3894
3895 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3896
3897         * regcache.h (regcache_raw_supply): Remove, update callers to
3898         use detached_regcache::raw_supply.
3899         * regcache.c (regcache_raw_supply): Remove.
3900
3901 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3902
3903         * regcache.h (regcache_cooked_write_part): Remove, update
3904         callers to use regcache::cooked_write_part.
3905         * regcache.c (regcache_cooked_write_part): Remove.
3906
3907 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3908
3909         * regcache.h (regcache_cooked_read_part): Remove, update callers
3910         to use readable_regcache::cooked_read_part.
3911         * regcache.c (regcache_cooked_read_part): Remove.
3912
3913 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3914
3915         * regcache.h (regcache_cooked_read_value): Remove, update
3916         callers to use readable_regcache::cooked_read_value.
3917         * regcache.c (regcache_cooked_read_value): Remove.
3918
3919 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3920
3921         * regcache.h (regcache_cooked_write): Remove, update callers to
3922         use regcache::cooked_write.
3923         * regcache.c (regcache_cooked_write): Remove.
3924
3925 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3926
3927         * regcache.h (regcache_invalidate): Remove, update callers to
3928         use detached_regcache::invalidate instead.
3929         * regcache.c (regcache_invalidate): Remove.
3930
3931 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3932
3933         * regcache.h (regcache_raw_write_part): Remove, update callers
3934         to use regcache::raw_write_part instead.
3935         * regcache.c (regcache_raw_write_part): Remove.
3936
3937 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3938
3939         * regcache.h (regcache_raw_read_part): Remove, update callers to
3940         use readable_regcache::raw_read_part instead.
3941         * regcache.c (regcache_raw_read_part): Remove.
3942
3943 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3944
3945         * regcache.h (regcache_cooked_read): Remove, update callers to
3946         use readable_regcache::cooked_read instead.
3947         * regcache.c (regcache_cooked_read): Remove.
3948
3949 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3950
3951         * regcache.h (regcache_raw_write): Remove, update callers to use
3952         regcache::raw_write instead.
3953         * regcache.c (regcache_raw_write): Remove.
3954
3955 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3956
3957         * regcache.h (regcache_raw_read): Remove, update callers to use
3958         readable_regcache::raw_read instead.
3959         * regcache.c (regcache_raw_read): Remove.
3960
3961 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3962
3963         * regcache.h (regcache_raw_update): Remove, update callers to
3964         use readable_regcache::raw_update instead.
3965         * regcache.c (regcache_raw_update): Remove.
3966
3967 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3968
3969         * regcache.h (regcache_register_status): Remove, update callers
3970         to use reg_buffer::get_register_status directly instead.
3971         * regcache.c (regcache_register_status): Remove.
3972
3973 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3974
3975         * regcache.h (regcache_get_ptid): Remove, update all callers to
3976         call regcache::ptid instead.
3977         * regcache.c (regcache_get_ptid): Remove.
3978
3979 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3980
3981         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3982
3983 2018-05-30  Pedro Alves  <palves@redhat.com>
3984
3985         * common/common-exceptions.h (exception_rethrow): Use
3986         ATTRIBUTE_NORETURN.
3987
3988 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3989
3990         * breakpoint.c (print_solib_event, check_status_catch_solib):
3991         Remove struct keyword in range-based for loops.
3992         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3993         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3994         Likewise.
3995         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3996         Likewise.
3997         * symfile.c (addr_info_make_relative): Likewise.
3998         * thread.c (value_in_thread_stack_temporaries): Likewise.
3999
4000 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4001
4002         PR gdb/16841
4003         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4004         aggregate type to get its real type before accessing it.
4005
4006 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4007
4008         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4009         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4010         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4011         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4012         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4013         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4014         * printcmd.c (info_address_command): Likewise.
4015
4016 2018-05-29  Tom Tromey  <tom@tromey.com>
4017
4018         * windows-nat.c (handle_exception): Update fall-through comment.
4019
4020 2018-05-29  Tom Tromey  <tom@tromey.com>
4021
4022         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4023         (struct program_space) <added_solibs>: Now a std::vector.
4024         * breakpoint.c (print_solib_event): Update.
4025         (check_status_catch_solib): Update.
4026         * progspace.c (clear_program_space_solib_cache): Update.
4027         * solib.c (update_solib_list): Update.
4028
4029 2018-05-29  Tom Tromey  <tom@tromey.com>
4030
4031         * python/py-type.c (typy_richcompare): Update.
4032         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4033         * gdbtypes.h (types_deeply_equal): Return bool.
4034         (types_equal): Likewise.
4035         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4036         declare VEC.
4037         (check_types_equal): Change worklist to std::vector.  Return
4038         bool.
4039         (struct type_equality_entry): Add constructor.
4040         (compare_maybe_null_strings): Return bool.
4041         (check_types_worklist): Return bool.  Change worklist to
4042         std::vector.
4043         (types_deeply_equal): Use std::vector.
4044         (types_equal): Return bool.
4045         (compare_maybe_null_strings): Simplify.
4046
4047 2018-05-29  Tom Tromey  <tom@tromey.com>
4048
4049         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4050
4051 2018-05-29  Tom Tromey  <tom@tromey.com>
4052
4053         * objc-lang.h: Don't include cp-support.h.
4054         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4055         declare VEC.
4056
4057 2018-05-27  Tom Tromey  <tom@tromey.com>
4058
4059         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4060
4061 2018-05-25  Tom Tromey  <tom@tromey.com>
4062
4063         * value.c (value::location): Initialize.
4064
4065 2018-05-25  Tom Tromey  <tom@tromey.com>
4066
4067         * dbxread.c (init_bincl_list): Remove.
4068         (bincl_list): Now a std::vector.
4069         (bincls_allocated, next_bincl): Remove.
4070         (free_bincl_list, do_free_bincl_list_cleanup)
4071         (make_cleanup_free_bincl_list): Remove.
4072         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4073         unique_xmalloc_ptr.
4074         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4075         (struct header_file_location): Add constructor.
4076         (add_bincl_to_list): Remove.
4077
4078 2018-05-25  Tom Tromey  <tom@tromey.com>
4079
4080         * tui/tui.c (tui_enable): Update.
4081         * mi/mi-interp.c (mi_interp::init): Update.
4082         * interps.h (class interp) <name>: New method.
4083         <m_name>: Rename from name.
4084         (~scoped_restore_interp): Update.
4085         * interps.c (interp::interp): Update.
4086         (interp_add, interp_set, interp_lookup_existing)
4087         (current_interp_named_p): Update.
4088
4089 2018-05-25  Tom Tromey  <tom@tromey.com>
4090
4091         * interps.c (interp_name): Remove.
4092         * mi/mi-interp.c (mi_interp::init): Update.
4093         * interps.h (interp_name): Remove.
4094         (~scoped_restore_interp): Update.
4095         * tui/tui.c (tui_enable): Update.
4096
4097 2018-05-25  Tom Tromey  <tom@tromey.com>
4098
4099         * utils.c (fputs_maybe_filtered): Update.
4100         * linespec.c (decode_line_full): Update.
4101         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4102         (mi_print_breakpoint_for_event, mi_solib_loaded)
4103         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4104         (mi_user_selected_context_changed): Update.
4105         * mi/mi-main.c (mi_execute_command): Update.
4106         * cli/cli-script.c (execute_control_command): Update.
4107         * python/python.c (execute_gdb_command): Update.
4108         * solib.c (info_sharedlibrary_command): Update.
4109         * interps.c (interp_ui_out): Remove.
4110         * interps.h (interp_ui_out): Remove.
4111
4112 2018-05-25  Tom Tromey  <tom@tromey.com>
4113
4114         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4115         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4116         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4117
4118 2018-05-25  Tom Tromey  <tom@tromey.com>
4119
4120         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4121         * interps.c (interp_exec): Use scoped_restore.
4122
4123 2018-05-25  Tom Tromey  <tom@tromey.com>
4124
4125         * remote.c (remote_target::remote_file_get): Use
4126         gdb::byte_vector.
4127         (remote_target::remote_file_put): Likewise.
4128
4129 2018-05-25  Tom Tromey  <tom@tromey.com>
4130
4131         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4132         a std::string.
4133         (get_pe_section_index, add_pe_exported_sym): Update.
4134         (read_pe_exported_syms): Use gdb::def_vector.
4135
4136 2018-05-25  Tom Tromey  <tom@tromey.com>
4137
4138         * frame.c (remove_prev_frame): Remove.
4139         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4140
4141 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
4142
4143         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4144         Remove prototypes.
4145         * mips-linux-nat.c (supply_fpregset): Always call
4146         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4147         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4148         `mips_fill_fpregset'.
4149         * mips-linux-tdep.c (mips_supply_fpregset)
4150         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4151         (mips_fill_fpregset_wrapper): Remove functions.
4152         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4153         (mips_linux_fpregset): Remove variable.
4154         (mips_linux_iterate_over_regset_sections): Use
4155         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4156         (mips_linux_o32_sigframe_init): Remove comment.
4157
4158 2018-05-25  Pedro Alves  <palves@redhat.com>
4159
4160         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4161         (struct readahead_cache, struct packet_reg, struct
4162         remote_arch_state, class remote_state): Move higher up in the
4163         file.
4164         (remote_target::m_remote_state): Now an object instead of a pointer.
4165         (remote_target::get_remote_state): Adjust.
4166
4167 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4168
4169         * stack.c (select_and_print_frame): Delete.
4170         (struct function_bounds): Move struct within function.
4171         (func_command): Most content moved into new function
4172         find_frame_for_function, use new function, print result, add
4173         function comment.
4174         (find_frame_for_function): New function, now returns a result.
4175
4176 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4177
4178         * stack.c (iterate_over_block_arg_vars): Fix comment.
4179         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4180
4181 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4182
4183         PR gdb/23203
4184         * frame.c
4185         (scoped_restore_selected_frame::scoped_restore_selected_frame):
4186         Define.
4187         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4188         Define.
4189         * frame.h (class scoped_restore_selected_frame): New class.
4190         * stack.c (print_frame_local_vars): Remove catching and rethrowing
4191         of any exception, use scoped_restore_selected_frame to restore the
4192         frame instead.
4193
4194 2018-05-24  Pedro Alves  <palves@redhat.com>
4195
4196         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4197         override.
4198
4199 2018-05-23  Tom Tromey  <tom@tromey.com>
4200
4201         * complaints.c (struct complaints): Remove.
4202         (symfile_complaint_book): Remove.
4203         (series): New global.
4204         (complaint_internal): Update.
4205         (clear_complaints): Update.
4206
4207 2018-05-23  Tom Tromey  <tom@tromey.com>
4208
4209         * complaints.c (counters): New global.
4210         (struct complain): Remove.
4211         (struct complaints) <root>: Remove.
4212         (complaint_sentinel): Remove.
4213         (symfile_complaint_book): Update.
4214         (find_complaint) Remove.
4215         (complaint_internal, clear_complaints): Update.
4216
4217 2018-05-23  Tom Tromey  <tom@tromey.com>
4218
4219         * complaints.c (struct complain) <file, line>: Remove.
4220         (find_complaint): Remove file, line parameters.
4221         (complaint_internal): Update.
4222
4223 2018-05-23  Tom Tromey  <tom@tromey.com>
4224
4225         * complaints.c (vcomplaint): Remove.
4226         (complaint_internal) Merge in contents of vcomplaint.
4227
4228 2018-05-23  Tom Tromey  <tom@tromey.com>
4229
4230         * complaints.c (struct complaints) <explanation>: Remove.
4231         (symfile_explanations): Remove.
4232         (symfile_complaint_book): Update.
4233         (vcomplaint): Update.
4234         (struct explanation): Remove.
4235
4236 2018-05-23  Tom Tromey  <tom@tromey.com>
4237
4238         * complaints.c (symfile_complaints): Remove.
4239         (complaint_internal): Remove "complaints" parameter.
4240         (clear_complaints, vcomplaint): Remove "c" parameter.
4241         (get_complaints): Remove.
4242         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4243         (dwarf2_debug_line_missing_file_complaint)
4244         (dwarf2_debug_line_missing_end_sequence_complaint)
4245         (dwarf2_complex_location_expr_complaint)
4246         (dwarf2_const_value_length_mismatch_complaint)
4247         (dwarf2_section_buffer_overflow_complaint)
4248         (dwarf2_macro_malformed_definition_complaint)
4249         (dwarf2_invalid_attrib_class_complaint)
4250         (create_addrmap_from_index, dw2_symtab_iter_next)
4251         (dw2_expand_marked_cus)
4252         (dw2_debug_names_iterator::find_vec_in_debug_names)
4253         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4254         (create_debug_type_hash_table, init_cutu_and_read_dies)
4255         (partial_die_parent_scope, add_partial_enumeration)
4256         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4257         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4258         (read_import_statement, read_file_scope, create_dwo_cu_reader)
4259         (create_cus_hash_table, create_dwp_hash_table)
4260         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4261         (dwarf2_rnglists_process, dwarf2_ranges_process)
4262         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4263         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4264         (handle_struct_member_die, process_structure_scope)
4265         (read_array_type, read_common_block, read_module_type)
4266         (read_tag_pointer_type, read_typedef, read_base_type)
4267         (read_subrange_type, load_partial_dies, partial_die_info::read)
4268         (partial_die_info::read, partial_die_info::read)
4269         (partial_die_info::read, read_checked_initial_length_and_offset)
4270         (dwarf2_string_attr, read_formatted_entries)
4271         (dwarf_decode_line_header)
4272         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4273         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4274         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4275         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4276         (get_signatured_type, get_DW_AT_signature_type)
4277         (decode_locdesc, file_file_name, consume_improper_spaces)
4278         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4279         (dwarf_decode_macro_bytes, dwarf_decode_macros)
4280         (dwarf2_symbol_mark_computed, set_die_type)
4281         (read_attribute_value): Update.
4282         * stap-probe.c (handle_stap_probe, get_stap_base_address):
4283         Update.
4284         * dbxread.c (unknown_symtype_complaint)
4285         (lbrac_mismatch_complaint, repeated_header_complaint)
4286         (set_namestring, function_outside_compilation_unit_complaint)
4287         (read_dbx_symtab, process_one_symbol): Update.
4288         * gdbtypes.c (stub_noname_complaint): Update.
4289         * windows-nat.c (handle_unload_dll): Update.
4290         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4291         (decode_base_type): Update.
4292         * xcoffread.c (bf_notfound_complaint, ef_complaint)
4293         (eb_complaint, record_include_begin, record_include_end)
4294         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4295         (process_xcoff_symbol, read_symbol)
4296         (function_outside_compilation_unit_complaint)
4297         (scan_xcoff_symtab): Update.
4298         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4299         * buildsym.c (finish_block_internal, make_blockvector)
4300         (end_symtab_get_static_block, augment_type_symtab): Update.
4301         * dtrace-probe.c (dtrace_process_dof)
4302         (dtrace_static_probe_ops::get_probes): Update.
4303         * complaints.h (struct complaint): Don't declare.
4304         (symfile_complaints): Remove.
4305         (complaint_internal): Remove "complaints" parameter.
4306         (complaint): Likewise.
4307         (clear_complaints): Likewise.
4308         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4309         (reread_symbols): Update.
4310         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4311         (dwarf2_frame_cache, decode_frame_entry): Update.
4312         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4313         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4314         (info_selectors_command): Update.
4315         * macrotab.c (macro_include, check_for_redefinition)
4316         (macro_undef): Update.
4317         * objfiles.c (filter_overlapping_sections): Update.
4318         * stabsread.c (invalid_cpp_abbrev_complaint)
4319         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4320         (define_symbol, error_type, read_type, rs6000_builtin_type)
4321         (stabs_method_name_from_physname, read_member_functions)
4322         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4323         (attach_fields_to_type, complain_about_struct_wipeout)
4324         (read_range_type, read_args, common_block_start)
4325         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4326         Update.
4327         * mdebugread.c (index_complaint, unknown_ext_complaint)
4328         (basic_type_complaint, bad_tag_guess_complaint)
4329         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4330         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4331         (parse_procedure, parse_lines)
4332         (function_outside_compilation_unit_complaint)
4333         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4334         (bad_tag_guess_complaint, reg_value_complaint): Update.
4335         * cp-support.c (demangled_name_complaint): Update.
4336         * macroscope.c (sal_macro_scope): Update.
4337         * dwarf-index-write.c (class debug_names): Update.
4338
4339 2018-05-23  Tom Tromey  <tom@tromey.com>
4340
4341         * complaints.c (clear_complaints): Remove "noisy" parameter.
4342         * complaints.h (clear_complaints): Update.
4343         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4344         (reread_symbols): Update.
4345
4346 2018-05-23  Tom Tromey  <tom@tromey.com>
4347
4348         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4349         SUBSEQUENT_MESSAGE.
4350         (vcomplaint, clear_complaints): Update.
4351         (symfile_explanations): Remove some messages.
4352
4353 2018-05-23  Tom Tromey  <tom@tromey.com>
4354
4355         * complaints.c (internal_complaint): Remove.
4356         * complaints.h (internal_complaint): Remove.
4357
4358 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4359
4360         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4361
4362 2018-05-22  Pedro Alves  <palves@redhat.com>
4363
4364         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4365         (remote_fileio_badfd, remote_fileio_return_errno)
4366         (remote_fileio_return_success, remote_fileio_func_open)
4367         (remote_fileio_func_open, remote_fileio_func_close)
4368         (remote_fileio_func_read, remote_fileio_func_write)
4369         (remote_fileio_func_lseek, remote_fileio_func_rename)
4370         (remote_fileio_func_unlink, remote_fileio_func_stat)
4371         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4372         (remote_fileio_func_isatty, remote_fileio_func_system): Add
4373         remote_target parameter.
4374         (remote_fio_func_map) <func>: Add remote_target parameter.
4375         (do_remote_fileio_request, remote_fileio_request):
4376         * remote-fileio.h (remote_fileio_request):
4377         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4378         remote_target parameter.
4379         (remote_notif_process, handle_notification): Adjust to pass down
4380         the remote.
4381         (remote_notif_state_allocate): Add remote_target parameter.  Save
4382         it.
4383         * remote-notif.h (struct remote_target): Forward declare.
4384         (struct notif_client) <parse, ack, can_get_pending_events>: Add
4385         remote_target parameter.
4386         (struct remote_notif_state) <remote>: New field.
4387         (remote_notif_ack, remote_notif_parse): Add remote_target
4388         parameter.
4389         (remote_notif_state_allocate, remote_notif_state_allocate): Add
4390         remote_target parameter.
4391         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4392         (threads_listing_context, rmt_thread_action, protocol_feature)
4393         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4394         (packet_result, struct threads_listing_context, remote_state):
4395         Move definitions and declarations higher up.
4396         (remote_target) <~remote_target>: Declare.
4397         (remote_download_command_source, remote_file_put, remote_file_get)
4398         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4399         (remote_hostio_pread_vFile, remote_hostio_send_command)
4400         (remote_hostio_set_filesystem, remote_hostio_open)
4401         (remote_hostio_close, remote_hostio_unlink, remote_state)
4402         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4403         (get_memory_write_packet_size, get_memory_read_packet_size)
4404         (append_pending_thread_resumptions, remote_detach_1)
4405         (append_resumption, remote_resume_with_vcont)
4406         (add_current_inferior_and_thread, wait_ns, wait_as)
4407         (process_stop_reply, remote_notice_new_inferior)
4408         (process_initial_stop_replies, remote_add_thread)
4409         (btrace_sync_conf, remote_btrace_maybe_reopen)
4410         (remove_new_fork_children, kill_new_fork_children)
4411         (discard_pending_stop_replies, stop_reply_queue_length)
4412         (check_pending_events_prevent_wildcard_vcont)
4413         (discard_pending_stop_replies_in_queue, stop_reply)
4414         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4415         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4416         (remote_interrupt_as, remote_interrupt_ns)
4417         (remote_get_noisy_reply, remote_query_attached)
4418         (remote_add_inferior, remote_current_thread, get_current_thread)
4419         (set_thread, set_general_thread, set_continue_thread)
4420         (set_general_process, write_ptid)
4421         (remote_unpack_thread_info_response, remote_get_threadinfo)
4422         (parse_threadlist_response, remote_get_threadlist)
4423         (remote_threadlist_iterator, remote_get_threads_with_ql)
4424         (remote_get_threads_with_qxfer)
4425         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4426         (get_offsets, remote_check_symbols, remote_supported_packet)
4427         (remote_query_supported, remote_packet_size)
4428         (remote_serial_quit_handler, remote_detach_pid)
4429         (remote_vcont_probe, remote_resume_with_hc)
4430         (send_interrupt_sequence, interrupt_query)
4431         (remote_notif_get_pending_events, fetch_register_using_p)
4432         (send_g_packet, process_g_packet, fetch_registers_using_g)
4433         (store_register_using_P, store_registers_using_G)
4434         (set_remote_traceframe, check_binary_download)
4435         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4436         (remote_xfer_live_readonly_partial, remote_read_bytes)
4437         (remote_send_printf, remote_flash_write, readchar)
4438         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4439         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4440         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4441         (extended_remote_disable_randomization, extended_remote_run)
4442         (send_environment_packet, extended_remote_environment_support)
4443         (extended_remote_set_inferior_cwd, remote_write_qxfer)
4444         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4445         (packet_command): Now methods of ...
4446         (remote_target): ... this class.
4447         (m_remote_state) <remote_target>: New field.
4448         (struct remote_state) <stop_reply_queue,
4449         remote_async_inferior_event_token, wait_forever_enabled_p>: New
4450         fields.
4451         (remote_state::remote_state): Allocate stop_reply_queue.
4452         (remote_state): Delete global.
4453         (get_remote_state_raw): Delete.
4454         (remote_target::get_remote_state): Allocate m_remote_state on
4455         demand.
4456         (get_current_remote_target): New.
4457         (remote_ops, extended_remote_ops): Delete.
4458         (wait_forever_enabled_p, remote_async_inferior_event_token):
4459         Delete, moved to struct remote_state.
4460         (remote_target::close): Delete self.  Destruction bits split to
4461         ...
4462         (remote_target::~remote_target): ... this.
4463         (show_memory_packet_size): Adjust to use
4464         get_current_remote_target.
4465         (struct protocol_feature) <func>: Add remote_target parameter.
4466         All callers adjusted.
4467         (curr_quit_handler_target): New.
4468         (remote_serial_quit_handler): Reimplement.
4469         (remote_target::open_1): Adjust to use get_current_remote_target.
4470         Heap-allocate remote_target/extended_remote_target instances.
4471         (vcont_builder::vcont_builder): Add remote_target parameter, and
4472         save it in m_remote.  All callers adjusted.
4473         (vcont_builder::m_remote): New field.
4474         (vcont_builder::restart, vcont_builder::flush)
4475         (vcont_builder::push_action): Use it.
4476         (remote_target::commit_resume): Use it.
4477         (struct queue_iter_param) <remote>: New field.
4478         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4479         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4480         (check_pending_event_prevents_wildcard_vcont_callback)
4481         (remote_target::check_pending_events_prevent_wildcard_vcont)
4482         (remote_target::discard_pending_stop_replies)
4483         (remote_target::discard_pending_stop_replies_in_queue)
4484         (remote_target::remote_notif_remove_queued_reply): Fill in
4485         'remote' field.
4486         (remote_notif_get_pending_events): New.
4487         (remote_target::readchar, remote_target::remote_serial_write):
4488         Save/restore curr_quit_handler_target.
4489         (putpkt): New.
4490         (kill_new_fork_children): Fill in 'remote' field.
4491         (packet_command): Use get_current_remote_target, defer to
4492         remote_target method of same name.
4493         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4494         parameter, and save it in m_remote.  All callers adjusted.
4495         (scoped_remote_fd::release): Use m_remote.
4496         (scoped_remote_fd::m_remote): New field.
4497         (remote_file_put, remote_file_get, remote_file_delete): Use
4498         get_current_remote_target, defer to remote_target method of same
4499         name.
4500         (remote_btrace_reset): Add remote_state paremeter.  Update all
4501         callers.
4502         (remote_async_inferior_event_handler). Pass down 'data'.
4503         (remote_new_objfile): Use get_current_remote_target.
4504         (remote_target::vcont_r_supported): New.
4505         (set_range_stepping): Use get_current_remote_target and
4506         remote_target::vcont_r_supported.
4507         (_initialize_remote): Don't allocate 'remote_state' and
4508         'stop_reply_queue' globals.
4509         * remote.h (struct remote_target): Forward declare.
4510         (getpkt, putpkt, remote_notif_get_pending_events): Add
4511         'remote_target' parameter.
4512
4513 2018-05-22  Pedro Alves  <palves@redhat.com>
4514
4515         * remote.c (vcont_builder): Now a class.  Make all data members
4516         private.
4517         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4518         Declare methods.
4519         (vcont_builder_restart): Rename to ...
4520         (vcont_builder::restart): ... this.
4521         (vcont_builder_flush): Rename to ...
4522         (vcont_builder::flush): ... this.
4523         (vcont_builder_push_action): Rename to ...
4524         (vcont_builder::push_action): ... this.
4525         (remote_target::commit_resume): Adjust.
4526
4527 2018-05-22  Pedro Alves  <palves@redhat.com>
4528
4529         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4530         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4531         (get_fixed_memory_packet_size): New.
4532         (get_memory_packet_size): Use it.
4533         (set_memory_packet_size): Don't override the config size with
4534         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4535         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4536         Don't refer to get_memory_packet_size if not connected to a remote
4537         target.  Show "(default)" if configured size is 0.
4538
4539 2018-05-22  Pedro Alves  <palves@redhat.com>
4540
4541         * remote.c (remote_target::mourn_inferior): Move
4542         discard_pending_stop_replies call here from ...
4543         (_initialize_remote): ... here.
4544
4545 2018-05-22  Pedro Alves  <palves@redhat.com>
4546
4547         * remote.c (compare_section_command): Remove set_general_process
4548         call.
4549
4550 2018-05-22  Pedro Alves  <palves@redhat.com>
4551
4552         * remote.c (struct packet_reg, struct remote_arch_state):
4553         Move higher up in the file.
4554         (remote_state) <m_arch_states>: Store remote_arch_state values
4555         instead of remote_arch_state pointers.
4556         (remote_state::get_remote_arch_state): Adjust.
4557
4558 2018-05-22  Pedro Alves  <palves@redhat.com>
4559
4560         * remote.c: Include <unordered_map>.
4561         (remote_state): Now a class.
4562         (remote_state) <get_remote_arch_state>: Declare method.
4563         <get_remote_arch_state>: New field.
4564         (remote_arch_state) <remote_arch_state>: Declare ctor.
4565         <regs>: Now a unique_ptr.
4566         (remote_gdbarch_data_handle): Delete.
4567         (get_remote_arch_state): Delete.
4568         (remote_state::get_remote_arch_state): New.
4569         (get_remote_state): Adjust to call remote_state's
4570         get_remote_arch_state method.
4571         (init_remote_state): Delete, bits factored out to ...
4572         (remote_arch_state::remote_arch_state): ... this new method.
4573         (get_remote_packet_size, get_memory_packet_size)
4574         (process_g_packet, remote_target::fetch_registers)
4575         (remote_target::prepare_to_store, store_registers_using_G)
4576         (remote_target::store_registers, remote_target::get_trace_status):
4577         Adjust to call remote_state's method.
4578         (_initialize_remote): Remove reference to
4579         remote_gdbarch_data_handle.
4580
4581 2018-05-22  Pedro Alves  <palves@redhat.com>
4582
4583         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4584         pread>: New method declarations.
4585         (remote_target::open_1): Adjust.
4586         (readahead_cache_invalidate): Rename to ...
4587         (readahead_cache::invalidate): ... this, and adjust to be a class
4588         method.
4589         (readahead_cache_invalidate_fd): Rename to ...
4590         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4591         class method.
4592         (remote_hostio_pwrite): Adjust.
4593         (remote_hostio_pread_from_cache): Rename to ...
4594         (readahead_cache::pread): ... this, and adjust to be a class
4595         method.
4596         (remote_hostio_close): Adjust.
4597
4598 2018-05-22  Pedro Alves  <palves@redhat.com>
4599
4600         * remote.c (remote_hostio_close_cleanup): Delete.
4601         (class scoped_remote_fd): New.
4602         (remote_file_put, remote_file_get): Use it.
4603
4604 2018-05-22  Pedro Alves  <palves@redhat.com>
4605
4606         (struct vCont_action_support): Use bool and initialize all fields.
4607         (struct readahead_cache): Initialize all fields.
4608         (remote_state): Use bool and initialize all fields.
4609         (remote_state::remote_state, remote_state::~remote_state): New.
4610         (new_remote_state): Delete.
4611         (_initialize_remote): Use new to allocate remote_state.
4612
4613 2018-05-22  Pedro Alves  <palves@redhat.com>
4614             張俊芝  <zjz@zjz.name>
4615
4616         PR gdb/22973
4617         * c-exp.y: Include "c-support.h".
4618         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4619         of tolower.  Use c_ident_is_alpha to scan names.
4620         * c-lang.c: Include "c-support.h".
4621         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4622         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4623         * c-support.h: New file, with bits factored out from ...
4624         * cp-name-parser.y: ... this file.
4625         Include "c-support.h".
4626         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4627         c-support.h and renamed.
4628         (symbol_end, yylex): Adjust.
4629
4630 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4631
4632         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4633         parameter type to CORE_ADDR.
4634         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4635         parameter type in declaration to CORE_ADDR.
4636         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4637         target_auxv_search to get AT_HWCAP and use the result to get the
4638         target description.
4639         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4640         to CORE_ADDR. Remove the cast of the return value to unsigned
4641         long. Fix error predicate of target_auxv_search.
4642         (ppc_linux_nat_target::read_description): Change the type of the
4643         hwcap variable to CORE_ADDR.
4644
4645 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4646
4647         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4648         if the size of fpscr is larger than 32 bits.
4649
4650 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4651
4652         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4653         (ppc32_linux_vsxregmap): New global.
4654         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4655         regcache_supply_regset, and regcache_collect_regset.
4656         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4657         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4658         (fetch_vsx_register, store_vsx_register): Remove.
4659         (fetch_vsx_registers): Add regno parameter. Get regset using
4660         ppc_linux_vsxregset. Use regset to supply registers.
4661         (store_vsx_registers): Add regno parameter. Get regset using
4662         ppc_linux_vsxregset. Use regset to collect registers.
4663         (fetch_register): Call fetch_vsx_registers instead of
4664         fetch_vsx_register.
4665         (store_register): Call store_vsx_registers instead of
4666         store_vsx_register.
4667         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4668         new regno parameter.
4669         (store_ppc_registers): Call store_vsx_registers with -1 for the
4670         new regno parameter.
4671         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4672         (ppc_collect_vsxregset): Remove.
4673
4674 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4675
4676         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4677         offset fields.
4678         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4679         for vector register offset fields.
4680         (ppc64_fbsd_reg_offsets): Likewise.
4681         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4682         to vector register offset fields.
4683         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4684         to vector register offset fields.
4685         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4686         vector register offset fields.
4687         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4688         initializers for vector register offset fields.
4689         (rs6000_aix64_reg_offsets): Likewise.
4690         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4691         (ppc_supply_vrregset): Remove.
4692         (ppc_collect_vrregset): Remove.
4693         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4694         (ppc_linux_vrregset) : New function.
4695         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4696         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4697         (ppc32_linux_vrregset): Remove.
4698         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4699         and use result instead of ppc32_linux_vrregset.
4700         (ppc32_linux_reg_offsets): Remove initializers for vector register
4701         offset fields.
4702         (ppc64_linux_reg_offsets): Likewise.
4703         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4704         * ppc-linux-nat.c: Include regset.h.
4705         (gdb_vrregset_t): Adjust comment to account for little-endian
4706         mode.
4707         (supply_vrregset, fill_vrregset): Remove.
4708         (fetch_altivec_register, store_altivec_register): Remove.
4709         (fetch_altivec_registers): Add regno parameter. Get regset using
4710         ppc_linux_vrregset. Use regset to supply registers.
4711         (store_altivec_registers): Add regno parameter. Get regset using
4712         ppc_linux_vrregset. Use regset to collect registers.
4713         (fetch_register): Call fetch_altivec_registers instead of
4714         fetch_altivec_register.
4715         (store_register): Call store_altivec_registers instead of
4716         store_altivec_register.
4717         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4718         the new regno parameter.
4719         (store_ppc_registers): Call store_altivec_registers with -1 for
4720         the new regno parameter.
4721
4722 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4723
4724         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4725         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4726         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4727         (gdb_vrregset_t): Change array type size to
4728         PPC_LINUX_SIZEOF_VRREGSET.
4729         (gdb_vsxregset_t): Change array type size to
4730         PPC_LINUX_SIZEOF_VSXREGSET.
4731         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4732         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4733         PPC_LINUX_SIZEOF_VSXREGSET.
4734
4735 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4736
4737         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4738         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4739         nat/ppc-linux.c.
4740         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4741         ppc_linux_target_wordsize with tid.
4742         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4743         wordsize with tid.
4744         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4745         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4746         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4747         tid parameter. Remove static specifier.
4748         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4749         (ppc_linux_target_wordsize): New declaration.
4750
4751 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4752
4753         * arch/ppc-linux-common.c: New file.
4754         * arch/ppc-linux-common.h: New file.
4755         * arch/ppc-linux-tdesc.h: New file.
4756         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4757         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4758         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4759         arch/ppc-linux-tdesc.h.
4760         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4761         arch/ppc-linux-tdesc.h.
4762         (ppc_linux_nat_target::read_description): Remove target
4763         description matching code. Fill a ppc_linux_features struct and
4764         call ppc_linux_match_description with it. Move comment about ISA
4765         2.05 to ppc-linux-common.c.
4766         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4767         arch/ppc-linux-tdesc.h.
4768         (ppc_linux_core_read_description): Remove target description
4769         matching code. Fill a ppc_linux_features struct and call
4770         ppc_linux_match_description with it.
4771         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4772         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4773         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4774         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4775         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4776         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4777         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4778         (tdesc_powerpc_e500l): Remove.
4779
4780 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4781
4782         * ada-lang.c (catch_assert_command): Pass empty string instead
4783         of NULL for excep_string argument.
4784
4785 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4786
4787         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4788         the width of the requested register exceeds the width of the
4789         `ptrace' data type.
4790
4791 2018-05-21  Tom Tromey  <tom@tromey.com>
4792
4793         * printcmd.c (output_command): Remove.
4794         (output_command_const): Rename to output_command.
4795         * valprint.h (output_command): Rename from output_command_const.
4796         * tracepoint.c (trace_dump_actions): Call output_command.
4797
4798 2018-05-21  Tom Tromey  <tom@tromey.com>
4799
4800         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4801         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4802         * ada-lang.h (create_ada_exception_catchpoint): Update.
4803         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4804         std::string.
4805         (create_excep_cond_exprs, ~ada_catchpoint)
4806         (should_stop_exception, print_one_exception)
4807         (print_mention_exception, print_recreate_exception): Update.
4808         (ada_get_next_arg): Remove.
4809         (catch_ada_exception_command_split): Use std::string.  Change type
4810         of "excep_string", "cond_string".
4811         (catch_ada_exception_command): Update.
4812         (create_ada_exception_catchpoint): Change type of excep_string.
4813         (ada_exception_sal): Remove excep_string parameter.
4814         (~ada_catchpoint): Remove.
4815
4816 2018-05-21  Tom Tromey  <tom@tromey.com>
4817
4818         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4819         cleanup.
4820
4821 2018-05-21  Tom Tromey  <tom@tromey.com>
4822
4823         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4824         Return unique_xmalloc_ptr.
4825         (print_it_exception): Update.
4826
4827 2018-05-21  Tom Tromey  <tom@tromey.com>
4828
4829         * tracepoint.c (trace_dump_actions): Use std::string.
4830
4831 2018-05-21  Tom Tromey  <tom@tromey.com>
4832
4833         * symfile.c (reread_symbols): Use std::string for original_name.
4834
4835 2018-05-21  Tom Tromey  <tom@tromey.com>
4836
4837         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4838         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4839         constructor.
4840
4841 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4842
4843         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4844         instance to...
4845         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4846         * objfiles.c (get_objfile_bfd_data): Allocate
4847         objfile_per_bfd_storage with obstack_new when allocating on
4848         obstack.
4849
4850 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4851
4852         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4853         OBSTACK_ZALLOC.
4854         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4855         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4856         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4857         (add_pending): Likewise.
4858         (parse_symbol): Likewise.
4859         (parse_partial_symbols): Likewise.
4860         (psymtab_to_symtab_1): Likewise.
4861         (new_psymtab): Likewise.
4862         (elfmdebug_build_psymtabs): Likewise.
4863         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4864         * objfiles.c (get_objfile_bfd_data): Likewise.
4865         (objfile_register_static_link): Likewise.
4866         * psymtab.c (allocate_psymtab): Likewise.
4867         * stabsread.c (read_member_functions): Likewise.
4868         * xcoffread.c (xcoff_end_psymtab): Likewise.
4869
4870 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4871
4872         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4873         compiler supports std::is_trivially_constructible.
4874         * common/poison.h: Include obstack.h.
4875         (IsMallocable): Define to is_trivially_constructible if the
4876         compiler supports it, define to true_type otherwise.
4877         (xobnew): New.
4878         (XOBNEW): Redefine.
4879         (xobnewvec): New.
4880         (XOBNEWVEC): Redefine.
4881         * gdb_obstack.h (obstack_zalloc): New.
4882         (OBSTACK_ZALLOC): Redefine.
4883         (obstack_calloc): New.
4884         (OBSTACK_CALLOC): Redefine.
4885         (obstack_new): New.
4886         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4887         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4888         gdbarch.c.
4889         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4890         obstack_calloc/obstack_zalloc.
4891         (gdbarch_obstack_zalloc): Remove.
4892         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4893
4894 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4895
4896         * stack.c (backtrace_command_1): Remove useless variable int i.
4897
4898 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4899
4900         * stack.c (print_frame_info): Fix comment.
4901
4902 2018-05-18  Tom Tromey  <tom@tromey.com>
4903
4904         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4905         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4906         (~dwarf2_per_objfile): Update
4907         (dwarf2_get_dwz_file): Use new.
4908         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4909         unique_ptr.
4910
4911 2018-05-18  Tom Tromey  <tom@tromey.com>
4912
4913         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4914         unique_ptr.
4915         * dwarf2read.c (struct dwp_file): Add constructor and
4916         initializers.
4917         (open_and_init_dwp_file): Return a unique_ptr.
4918         (dwarf2_per_objfile, create_dwp_hash_table)
4919         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4920         (lookup_dwo_unit_in_dwp): Update.
4921         (open_and_init_dwp_file, get_dwp_file): Update.
4922
4923 2018-05-18  Tom Tromey  <tom@tromey.com>
4924
4925         * dwarf2read.c (dwarf2_per_objfile): Update.
4926         (struct mapped_index): Add initializers.
4927         (dwarf2_read_index): Use new.
4928         (dw2_symtab_iter_init): Update.
4929         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4930         unique_ptr.
4931
4932 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4933
4934         * dwarf2read.c (mapped_index) <total_size>: Remove.
4935
4936 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4937
4938         * unittests/format_pieces-selftests.c (test_format_specifier):
4939         Add ARI comments.
4940
4941 2018-05-18  Tom Tromey  <tom@tromey.com>
4942
4943         * c-typeprint.c (maybe_print_hole): New function.
4944         (c_print_type_struct_field_offset): Update.
4945         (c_type_print_base_struct_union): Call maybe_print_hole.
4946
4947 2018-05-17  Keith Seitz  <keiths@redhat.com>
4948
4949         * breakpoint.c (build_bpstat_chain): New function, moved from
4950         bpstat_stop_status.
4951         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4952         If no stop chain is passed, call build_bpstat_chain to build it.
4953         * breakpoint.h (build_bpstat_chain): Declare.
4954         (bpstat_stop_status): Move documentation here from breakpoint.c.
4955         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4956         build the stop chain and pass it to skip_inline_frames.
4957         Pass this stop chain to bpstat_stop_status.
4958         * inline-frame.c: Include breakpoint.h.
4959         (stopped_by_user_bp_inline_frame): New function.
4960         (skip_inline_frames): Add parameter `stop_chain'.
4961         Move documention to inline-frame.h.
4962         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4963         whether the frame should be elided.
4964         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4965         Add moved documentation and update for new parameter.
4966
4967 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4968
4969         PR cli/14975
4970         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4971         unittests/format_pieces-selftests.c.
4972         * common/format.h (format_piece) <operator==>: New.
4973         (format_pieces) <operator[]>: Remove.
4974         * common/format.c (format_pieces::format_pieces): Handle \e.
4975         * unittests/format_pieces-selftests.c: New.
4976
4977 2018-05-17  Tom Tromey  <tom@tromey.com>
4978
4979         PR symtab/23010:
4980         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4981         (dw2_instantiate_symtab): Add skip_partial parameter.
4982         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4983         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4984         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4985         (dw2_expand_symtabs_matching_one)
4986         (dw2_find_pc_sect_compunit_symtab)
4987         (dw2_debug_names_lookup_symbol)
4988         (dw2_debug_names_expand_symtabs_for_function): Update.
4989         (init_cutu_and_read_dies): Add skip_partial parameter.
4990         (process_psymtab_comp_unit, build_type_psymtabs_1)
4991         (process_skeletonless_type_unit, load_partial_comp_unit)
4992         (psymtab_to_symtab_1): Update.
4993         (load_full_comp_unit): Add skip_partial parameter.
4994         (process_imported_unit_die, dwarf2_read_addr_index)
4995         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4996         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4997         (read_signatured_type): Update.
4998
4999 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5000
5001         * value.c (release_value): Remove unused variable.
5002         (record_latest_value): Likewise.
5003         (access_value_history): Likewise.
5004         (preserve_values): Likewise.
5005
5006 2018-05-17  Tom Tromey  <tom@tromey.com>
5007
5008         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5009         Initialize.
5010
5011 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5012
5013         PR gdb/22286
5014         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5015         Also handle registers whose width is not a multiple of
5016         PTRACE_TYPE_RET.
5017         (linux_nat_trad_target::store_register): Likewise.
5018
5019 2018-05-16  Tom Tromey  <tom@tromey.com>
5020
5021         * gdbcore.h (core_bfd): Redefine.
5022         * corelow.c (core_target::close): Update.
5023         (core_target_open): Update.
5024         * progspace.h (struct program_space) <cbfd>: Now a
5025         gdb_bfd_ref_ptr.
5026
5027 2018-05-16  Tom Tromey  <tom@tromey.com>
5028
5029         PR cli/19551:
5030         * symfile-add-flags.h (enum symfile_add_flags)
5031         <SYMFILE_NOT_FILENAME>: New constant.
5032         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5033         objfile name from BFD.
5034         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5035         * minidebug.c (find_separate_debug_file_in_section): Put
5036         ".gnu_debugdata" into BFD's file name.
5037
5038 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5039
5040         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5041         Remove.
5042
5043 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5044
5045         PR binutils/21446
5046         * aarch64-tdep.c (aarch64_analyze_prologue,
5047         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5048         Indicate not interested in errors.
5049
5050 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5051
5052         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5053         Supply the MIPS_ZERO_REGNUM register.
5054
5055 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5056
5057         * mips-tdep.c (mask_address_var): Make variable static.
5058
5059 2018-05-14  Tom Tromey  <tom@tromey.com>
5060
5061         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5062
5063 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5064
5065         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5066         FXSAVE_ADDR for the mxcsr register.
5067
5068 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5069
5070         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5071
5072 2018-05-11  Pedro Alves  <palves@redhat.com>
5073
5074         * corelow.c (core_target) <core_target>: No longer inline.
5075         Initialize m_core_gdbarch, m_core_vec and build the section table
5076         here.
5077         <~core_target>: New.
5078         <core_gdbarch, get_core_register_section>: New methods.
5079         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5080         factored out from ...
5081         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5082         (core_ops): Delete.
5083         (sniff_core_bfd): Add gdbarch parameter.
5084         (core_close): Delete, merged into ...
5085         (core_target::close): ... here.  Delete self.
5086         (core_close_cleanup): Delete.
5087         (core_target_open): Allocate a core_target on the heap.  Use a
5088         unique_ptr instead of a cleanup.  Bits moved into the core_target
5089         ctor.  Adjust to use core_target methods instead of globals.
5090         (get_core_register_section): Rename to ...
5091         (core_target::get_core_register_section): ... this and adjust.
5092         (struct get_core_registers_cb_data): New.
5093         (get_core_registers_cb): Use it.  Use bool.
5094         (core_target::fetch_registers, core_target::files_info)
5095         (core_target::xfer_partial, core_target::read_description)
5096         (core_target::pid_to, core_target::thread_name): Adjust to
5097         reference class fields instead of globals.
5098         * target.h (struct target_ops_deleter, target_ops_up): New.
5099
5100 2018-05-11  Pedro Alves  <palves@redhat.com>
5101
5102         * corefile.c (core_file_command): Move to corelow.c.
5103         * corelow.c (the_core_target): Delete.
5104         (core_file_command): Moved from corefile.c.  Check exec_bfd
5105         instead of the_core_target.  Use target_detach instead of calling
5106         into the_core_target directly.
5107         (maybe_say_no_core_file_now): New.
5108         (core_target::detach): Use it.
5109         (_initialize_corelow): Remove references to the_core_target.
5110         * gdbcore.h (the_core_target): Delete.
5111
5112 2018-05-11  Tom Tromey  <tromey@redhat.com>
5113             Pedro Alves  <palves@redhat.com>
5114
5115         * corefile.c (core_bfd): Remove.
5116         * gdbcore.h (core_bfd): Now a macro.
5117         * progspace.h (struct program_space) <cbfd>: New field.
5118
5119 2018-05-11  Tom Tromey  <tom@tromey.com>
5120
5121         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5122         gdb::def_vector.
5123
5124 2018-05-10  Tom Tromey  <tom@tromey.com>
5125
5126         * configure: Rebuild.
5127         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5128
5129 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5130
5131         PR server/23158:
5132         * regformats/regdat.sh: Adjust script, following the addition
5133         of the new expedite_regs parameter to init_target_desc.
5134
5135 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5136     
5137         PR gdb/23127
5138         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5139         set_gdbarch_significant_addr_bit.
5140         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5141         set_gdbarch_significant_addr_bit.
5142         * utils.c (address_significant): Update to sign extend addr.
5143
5144 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
5145
5146         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5147         (xtensa_linux_init_abi): Limit tdep->num_regs by
5148         tdep->num_nopriv_regs.
5149         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5150         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5151         not initialized.
5152
5153 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
5154
5155         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5156
5157 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5158
5159         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5160         (I387_MXCSR_INIT_VAL): New constant.
5161         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5162         buffer if it was supplied by the inferior.
5163         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5164         (i387_xsave_get_clear_bv): New function.
5165         (i387_supply_xsave): Only read x87 control registers from the
5166         xsave buffer if the feature is enabled, and the state will have
5167         been written, otherwise, provide a suitable default.
5168         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5169         including x87 control registers.  Update control registers if they
5170         have changed from the default value, and mark features as enabled
5171         as required.
5172         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5173
5174 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
5175
5176         * spu-tdep.c (info_spu_event_command): Fix output formatting.
5177
5178 2018-05-07  Tom Tromey  <tom@tromey.com>
5179
5180         * configure: Rebuild.
5181         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5182
5183 2018-05-07  Tom Tromey  <tom@tromey.com>
5184
5185         PR tdep/20362:
5186         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5187         bit.  Use correct value for VDIV.
5188
5189 2018-05-04  Tom Tromey  <tom@tromey.com>
5190
5191         * configure: Rebuild.
5192         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5193
5194 2018-05-04  Tom Tromey  <tom@tromey.com>
5195
5196         * linux-record.c (record_linux_system_call) <case
5197         RECORD_SYS_RECVFROM>: Add "break".
5198
5199 2018-05-04  Tom Tromey  <tom@tromey.com>
5200
5201         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5202         Add missing "break".
5203         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5204         Add missing "break".
5205
5206 2018-05-04  Tom Tromey  <tom@tromey.com>
5207
5208         * rs6000-tdep.c (ppc_process_record_op4)
5209         (ppc_process_record_op63): Add fall-through comment.
5210
5211 2018-05-04  Tom Tromey  <tom@tromey.com>
5212
5213         * i386-tdep.c (i386_process_record): Add fall-through comment.
5214
5215 2018-05-04  Tom Tromey  <tom@tromey.com>
5216
5217         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5218         comment.
5219
5220 2018-05-04  Tom Tromey  <tom@tromey.com>
5221
5222         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5223         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5224         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5225         comment.
5226         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5227         comment.
5228         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5229         comment.
5230
5231 2018-05-04  Tom Tromey  <tom@tromey.com>
5232
5233         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5234
5235 2018-05-04  Tom Tromey  <tom@tromey.com>
5236
5237         * s390-tdep.c (s390_process_record): Fix fall-through comments.
5238         * xcoffread.c (scan_xcoff_symtab): Move comment later.
5239         * symfile.c (section_is_mapped): Fix fall-through comment.
5240         * stabsread.c (define_symbol, read_member_functions): Fix
5241         fall-through comment.
5242         * s390-linux-tdep.c (s390_process_record): Fix fall-through
5243         comment.
5244         * remote.c (remote_wait_as): Fix fall-through comment.
5245         * p-exp.y (yylex): Fix fall-through comment.
5246         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5247         comment.
5248         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5249         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5250         * jv-exp.y (yylex): Fix fall-through comment.
5251         * go-exp.y (lex_one_token): Fix fall-through comment.
5252         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5253         fall-through comment.
5254         * f-exp.y (yylex): Fix fall-through comment.
5255         * dwarf2read.c (process_die): Fix fall-through comments.
5256         * dbxread.c (process_one_symbol): Fix fall-through comment.
5257         * d-exp.y (lex_one_token): Fix fall-through comment.
5258         * cp-name-parser.y (yylex): Fix fall-through comment.
5259         * coffread.c (coff_symtab_read): Fix fall-through comment.
5260         * c-exp.y (lex_one_token): Fix fall-through comment.
5261         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5262         comment.
5263         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5264         comment.
5265
5266 2018-05-04  Tom Tromey  <tom@tromey.com>
5267
5268         PR python/22730:
5269         * NEWS: Mention gdb.execute change.
5270         * gdbcmd.h (execute_control_command): Don't declare.
5271         * python/python.c (execute_gdb_command): Use read_command_lines_1,
5272         execute_control_commands, execute_control_commands_to_string.
5273         * cli/cli-script.h (execute_control_commands)
5274         (execute_control_commands_to_string): Declare.
5275         (execute_control_command): Add from_tty parameter.
5276         * cli/cli-script.c (execute_control_commands)
5277         (execute_control_commands_to_string): New functions.
5278         (execute_user_command): Use execute_control_commands.
5279         (execute_control_command_1): Add "from_tty" parameter.  Update.
5280         (execute_control_command): Likewise.
5281
5282 2018-05-04  Tom Tromey  <tom@tromey.com>
5283
5284         PR python/22731:
5285         * NEWS: Mention that breakpoint commands are writable.
5286         * python/py-breakpoint.c (bppy_set_commands): New function.
5287         (breakpoint_object_getset) <"commands">: Use it.
5288
5289 2018-05-04  Tom Tromey  <tom@tromey.com>
5290
5291         * tracepoint.c (actions_command): Update.
5292         * mi/mi-cmd-break.c (mi_command_line_array)
5293         (mi_command_line_array_cnt, mi_command_line_array_ptr)
5294         (mi_read_next_line): Remove.
5295         (mi_cmd_break_commands): Update.
5296         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5297         function_view.
5298         * cli/cli-script.c (get_command_line): Update.
5299         (process_next_line): Use function_view.  Constify.
5300         (recurse_read_control_structure, read_command_lines)
5301         (read_command_lines_1): Change argument types to function_view.
5302         (do_define_command, document_command): Update.
5303         * breakpoint.h (check_tracepoint_command): Don't declare.
5304         * breakpoint.c (check_tracepoint_command): Remove.
5305         (commands_command_1, create_tracepoint_from_upload): Update.
5306
5307 2018-05-04  Tom Tromey  <tom@tromey.com>
5308
5309         PR gdb/11750:
5310         * cli/cli-script.h (enum command_control_type) <define_control>:
5311         New constant.
5312         * cli/cli-script.c (multi_line_command_p): Handle define_control.
5313         (build_command_line, execute_control_command_1)
5314         (process_next_line): Likewise.
5315         (do_define_command): New function, extracted from define_command.
5316         (define_command): Use it.
5317
5318 2018-05-04  Tom Tromey  <tom@tromey.com>
5319
5320         * tracepoint.c (actions_command): Update.
5321         * cli/cli-script.h (read_command_lines): Update.
5322         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5323         (MAX_TMPBUF): Remove define.
5324         (define_command): Use string_printf.
5325         (document_command): Likewise.
5326         * breakpoint.c (commands_command_1): Update.
5327
5328 2018-05-04  Tom Tromey  <tom@tromey.com>
5329
5330         * top.c (execute_command): Update.
5331         * cli/cli-script.h (print_command_lines): Now varargs.
5332         * cli/cli-script.c (print_command_lines): Now varargs.
5333         (execute_control_command_1) <case while_control, case if_control>:
5334         Update.
5335
5336 2018-05-04  Tom Tromey  <tom@tromey.com>
5337
5338         * tracepoint.c (all_tracepoint_actions): Rename from
5339         all_tracepoint_actions_and_cleanup.  Change return type.
5340         (actions_command, encode_actions_1, encode_actions)
5341         (trace_dump_actions, tdump_command): Update.
5342         * remote.c (remote_download_command_source): Update.
5343         * python/python.c (gdbpy_eval_from_control_command)
5344         (python_command, python_interactive_command): Update.
5345         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5346         * guile/guile.c (guile_command)
5347         (gdbscm_eval_from_control_command, guile_command): Update.
5348         * compile/compile.c (compile_code_command)
5349         (compile_print_command, compile_to_object): Update.
5350         * cli/cli-script.h (struct command_lines_deleter): New.
5351         (counted_command_line): New typedef.
5352         (struct command_line): Add constructor, destructor.
5353         <body_list>: Remove.
5354         <body_list_0, body_list_1>: New members.
5355         (command_line_up): Remove typedef.
5356         (read_command_lines, read_command_lines_1, get_command_line):
5357         Update.
5358         (copy_command_lines): Don't declare.
5359         * cli/cli-script.c (build_command_line): Use "new".
5360         (get_command_line): Return counted_command_line.
5361         (print_command_lines, execute_user_command)
5362         (execute_control_command_1, while_command, if_command): Update.
5363         (realloc_body_list): Remove.
5364         (process_next_line, recurse_read_control_structure): Update.
5365         (read_command_lines, read_command_lines_1): Return counted_command_line.
5366         (free_command_lines): Use "delete".
5367         (copy_command_lines): Remove.
5368         (define_command, document_command, show_user_1): Update.
5369         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5370         a counted_command_line.
5371         * breakpoint.h (counted_command_line): Remove typedef.
5372         (breakpoint_set_commands): Update.
5373         * breakpoint.c (check_no_tracepoint_commands)
5374         (validate_commands_for_breakpoint): Update.
5375         (breakpoint_set_commands): Change commands to be a
5376         counted_command_line.
5377         (commands_command_1, update_dprintf_command_list)
5378         (create_tracepoint_from_upload): Update.
5379
5380 2018-05-04  Tom Tromey  <tom@tromey.com>
5381
5382         * cli/cli-decode.h (cmd_list_element): New constructor.
5383         (~cmd_list_element): New destructor.
5384         (struct cmd_list_element): Add initializers.
5385         * cli/cli-decode.c (do_add_cmd): Use "new".
5386         (delete_cmd): Use "delete".
5387
5388 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
5389             Pedro Alves <palves@redhat.com>
5390
5391         PR breakpoints/19806 and support for PR external/20207.
5392         * NEWS: Mention Aarch64 watchpoint improvements.
5393         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5394         watchpoints and PR external/20207 watchpoints.
5395         * nat/aarch64-linux-hw-point.c
5396         (kernel_supports_any_contiguous_range): New.
5397         (aarch64_watchpoint_offset): New.
5398         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5399         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5400         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5401         (aarch64_align_watchpoint): New parameters aligned_offset_p and
5402         next_addr_orig_p.  Support PR external/20207 watchpoints.
5403         (aarch64_downgrade_regs): New.
5404         (aarch64_dr_state_insert_one_point): New parameters offset and
5405         addr_orig.
5406         (aarch64_dr_state_remove_one_point): Likewise.
5407         (aarch64_handle_breakpoint): Update caller.
5408         (aarch64_handle_aligned_watchpoint): Likewise.
5409         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5410         aligned_offset.
5411         (aarch64_linux_set_debug_regs): Remove const from state.  Call
5412         aarch64_downgrade_regs.
5413         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5414         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5415         (DR_CONTROL_MASK): ... this.
5416         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5417         (unsigned int aarch64_watchpoint_offset): New prototype.
5418         (aarch64_linux_set_debug_regs): Remove const from state.
5419         * utils.c (align_up, align_down): Move to ...
5420         * common/common-utils.c (align_up, align_down): ... here.
5421         * utils.h (align_up, align_down): Move to ...
5422         * common/common-utils.h (align_up, align_down): ... here.
5423
5424 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
5425
5426         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5427         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5428         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5429         Re-implement to match the ABI as summarized in GCC's
5430         gcc/config/sparc/sparc.c.  All callers updated.
5431         (sparc32_store_arguments): Remove assertion.
5432
5433 2018-05-04  Tom Tromey  <tom@tromey.com>
5434
5435         * printcmd.c: Don't include tui.h.
5436         (decode_format): Use skip_spaces.
5437
5438 2018-05-04  Tom Tromey  <tom@tromey.com>
5439
5440         PR gdb/22619:
5441         * printcmd.c (last_count): New global.
5442         (x_command): Use saved count when repeating.
5443
5444 2018-05-04  Tom Tromey  <tom@tromey.com>
5445
5446         * nto-procfs.c (do_closedir_cleanup): Remove.
5447         (procfs_pidlist): Use gdb_dir_up.
5448         * procfs.c (do_closedir_cleanup): Remove.
5449         (proc_update_threads): Use gdb_dir_up.
5450         * common/filestuff.h (struct gdb_dir_deleter): New.
5451         (gdb_dir_up): New typedef.
5452
5453 2018-05-04  Tom Tromey  <tom@tromey.com>
5454
5455         * ada-lang.c (print_mention_exception): Use std::string.
5456
5457 2018-05-04  Tom Tromey  <tom@tromey.com>
5458
5459         * ada-lang.c (create_excep_cond_exprs): Update.
5460         (ada_exception_catchpoint_cond_string): Use std::string.
5461
5462 2018-05-04  Tom Tromey  <tom@tromey.com>
5463
5464         * ada-lang.c (xget_renaming_scope): Return std::string.
5465         (old_renaming_is_invisible): Update.
5466
5467 2018-05-04  Tom Tromey  <tom@tromey.com>
5468
5469         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5470         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5471
5472 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
5473
5474         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5475
5476 2018-05-04  Tom Tromey  <tom@tromey.com>
5477
5478         * remote.c (remote_query_supported_append): Change type.
5479         (remote_check_symbols): Update.
5480
5481 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
5482
5483         PR gdb/11420
5484         * configure.ac: Prepend libpython.
5485         * python/python-config.py: Likewise.
5486         * configure: Regenerate.
5487
5488 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5489
5490         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5491
5492 2018-05-03  Pedro Alves  <palves@redhat.com>
5493
5494         * s390-linux-nat.c
5495         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5496         override.  Write 'true' instead of '1'.
5497         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5498         declaration.
5499
5500 2018-05-02  Pedro Alves  <palves@redhat.com>
5501
5502         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5503         add_inf_child_target.
5504         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5505         add_inf_child_target.
5506         * aix-thread.c (aix_thread_target_info): New.
5507         (aix_thread_target) <shortname, longname, doc>: Delete.
5508         <info>: New.
5509         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5510         add_inf_child_target.
5511         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5512         add_inf_child_target.
5513         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5514         add_inf_child_target.
5515         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5516         add_inf_child_target.
5517         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5518         add_inf_child_target.
5519         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5520         add_inf_child_target.
5521         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5522         add_inf_child_target.
5523         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5524         add_inf_child_target.
5525         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5526         add_inf_child_target.
5527         * bfd-target.c (target_bfd_target_info): New.
5528         (target_bfd) <shortname, longname, doc>: Delete.
5529         <info>: New.
5530         * bsd-kvm.c (bsd_kvm_target_info): New.
5531         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5532         <info>: New.
5533         (bsd_kvm_target::open): Rename to ...
5534         (bsd_kvm_target_open): ... this.  Adjust.
5535         * bsd-uthread.c (bsd_uthread_target_info): New.
5536         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5537         <info>: New.
5538         * corefile.c (core_file_command): Adjust.
5539         * corelow.c (core_target_info): New.
5540         (core_target) <shortname, longname, doc>: Delete.
5541         <info>: New.
5542         (core_target::open): Rename to ...
5543         (core_target_open): ... this.  Adjust.
5544         * ctf.c (ctf_target_info): New.
5545         (ctf_target) <shortname, longname, doc>: Delete.
5546         <info>: New.
5547         (ctf_target::open): Rename to ...
5548         (ctf_target_open): ... this.
5549         (_initialize_ctf): Adjust.
5550         * exec.c (exec_target_info): New.
5551         (exec_target) <shortname, longname, doc>: Delete.
5552         <info>: New.
5553         (exec_target::open): Rename to ...
5554         (exec_target_open): ... this.
5555         * gdbcore.h (core_target_open): Declare.
5556         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5557         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5558         add_inf_child_target.
5559         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5560         add_inf_child_target.
5561         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5562         add_inf_child_target.
5563         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5564         add_inf_child_target.
5565         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5566         add_inf_child_target.
5567         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5568         add_inf_child_target.
5569         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5570         add_inf_child_target.
5571         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5572         add_inf_child_target.
5573         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5574         add_inf_child_target.
5575         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5576         add_inf_child_target.
5577         * inf-child.c (inf_child_target_info): New.
5578         (inf_child_target::info): New.
5579         (inf_child_open_target): Remove 'target' parameter.  Use
5580         get_native_target instead.
5581         (inf_child_target::open): Delete.
5582         (add_inf_child_target): New.
5583         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5584         Delete.
5585         <info>: New.
5586         (add_inf_child_target): Declare.
5587         (inf_child_open_target): Declare.
5588         * linux-thread-db.c (thread_db_target_info): New.
5589         (thread_db_target) <shortname, longname, doc>: Delete.
5590         <info>: New.
5591         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5592         add_inf_child_target.
5593         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5594         add_inf_child_target.
5595         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5596         add_inf_child_target.
5597         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5598         add_inf_child_target.
5599         * make-target-delegates (print_class): Adjust.
5600         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5601         add_inf_child_target.
5602         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5603         add_inf_child_target.
5604         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5605         add_inf_child_target.
5606         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5607         add_inf_child_target.
5608         * nto-procfs.c (nto_native_target_info): New.
5609         (nto_procfs_target_native) <shortname, longname, doc>:
5610         Delete.
5611         <info>: New.
5612         (nto_procfs_target_info): New.
5613         (nto_procfs_target_procfs) <shortname, longname, doc>:
5614         Delete.
5615         <info>: New.
5616         (init_procfs_targets): Adjust.
5617         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5618         add_inf_child_target.
5619         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5620         add_inf_child_target.
5621         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5622         add_inf_child_target.
5623         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5624         add_inf_child_target.
5625         * ravenscar-thread.c (ravenscar_target_info): New.
5626         (ravenscar_thread_target) <shortname, longname, doc>:
5627         Delete.
5628         <info>: New.
5629         * record-btrace.c (record_btrace_target_info):
5630         (record_btrace_target) <shortname, longname, doc>: Delete.
5631         <info>: New.
5632         (record_btrace_target::open): Rename to ...
5633         (record_btrace_target_open): ... this.  Adjust.
5634         * record-full.c (record_longname, record_doc): New.
5635         (record_full_base_target) <shortname, longname, doc>: Delete.
5636         <info>: New.
5637         (record_full_target_info): New.
5638         (record_full_target): <shortname>: Delete.
5639         <info>: New.
5640         (record_full_core_open_1, record_full_open_1): Update comments.
5641         (record_full_base_target::open): Rename to ...
5642         (record_full_open): ... this.
5643         (cmd_record_full_restore): Update.
5644         (_initialize_record_full): Update.
5645         * remote-sim.c (remote_sim_target_info): New.
5646         (gdbsim_target) <shortname, longname, doc>: Delete.
5647         <info>: New.
5648         (gdbsim_target::open): Rename to ...
5649         (gdbsim_target_open): ... this.
5650         (_initialize_remote_sim): Adjust.
5651         * remote.c (remote_doc): New.
5652         (remote_target_info): New.
5653         (remote_target) <shortname, longname, doc>: Delete.
5654         <info>: New.
5655         (extended_remote_target_info): New.
5656         (extended_remote_target) <shortname, longname, doc>: Delete.
5657         <info>: New.
5658         (remote_target::open_1): Make static.  Adjust.
5659         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5660         * s390-linux-nat.c (_initialize_s390_nat): Use
5661         add_inf_child_target.
5662         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5663         add_inf_child_target.
5664         * sol-thread.c (thread_db_target_info): New.
5665         (sol_thread_target) <shortname, longname, doc>: Delete.
5666         <info>: New.
5667         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5668         add_inf_child_target.
5669         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5670         add_inf_child_target.
5671         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5672         add_inf_child_target.
5673         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5674         add_inf_child_target.
5675         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5676         add_inf_child_target.
5677         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5678         add_inf_child_target.
5679         * spu-linux-nat.c (_initialize_spu_nat): Use
5680         add_inf_child_target.
5681         * spu-multiarch.c (spu_multiarch_target_info): New.
5682         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5683         <info>: New.
5684         * target-delegates.c: Regenerate.
5685         * target.c: Include <unordered_map>.
5686         (target_ops_p): Delete.
5687         (DEF_VEC_P(target_ops_p)): Delete.
5688         (target_factories): New.
5689         (test_target_info): New.
5690         (test_target_ops::info): New.
5691         (open_target): Adjust to use target_factories.
5692         (add_target_with_completer): Rename to ...
5693         (add_target): ... this.  Change prototype.  Register target_info
5694         and open callback in target_factories.  Register target_info in
5695         command context instead of target_ops.
5696         (add_target): Delete old implementation.
5697         (add_deprecated_target_alias): Change prototype.  Adjust.
5698         (the_native_target): New.
5699         (set_native_target, get_native_target): New.
5700         (find_default_run_target): Use the_native_target.
5701         (find_attach_target, find_run_target): Simplify.
5702         (target_ops::open): Delete.
5703         (dummy_target_info): New.
5704         (dummy_target::shortname, dummy_target::longname)
5705         (dummy_target::doc): Delete.
5706         (dummy_target::info): New.
5707         (debug_target::shortname, debug_target::longname)
5708         (debug_target::doc): Delete.
5709         (debug_target::info): New.
5710         * target.h (struct target_info): New.
5711         (target_ops::~target_ops): Add comment.
5712         (target_ops::info): New.
5713         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5714         longer virtual.  Implement in terms of target_info.
5715         (set_native_target, get_native_target): Declare.
5716         (target_open_ftype): New.
5717         (add_target, add_target_with_completer)
5718         (add_deprecated_target_alias): Change prototype.
5719         (test_target) <shortname, longname, doc>: Delete.
5720         <info>: New.
5721         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5722         add_inf_child_target.
5723         * tracefile-tfile.c (tfile_target_info): New.
5724         (tfile_target) <shortname, longname, doc>: Delete.
5725         <info>: New.
5726         (tfile_target::open): Rename to ...
5727         (tfile_target_open): ... this.
5728         (_initialize_tracefile_tfile): Adjust.
5729         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5730         add_inf_child_target.
5731         * windows-nat.c (_initialize_windows_nat): Use
5732         add_inf_child_target.
5733         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5734         add_inf_child_target.
5735
5736 2018-05-02  Pedro Alves  <palves@redhat.com>
5737
5738         * linux-nat.h (linux_nat_target) <low_new_thread,
5739         low_delete_thread, low_new_fork, low_forget_process,
5740         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5741         New virtual methods.
5742         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5743         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5744         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5745         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5746         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5747         Delete.
5748         * linux-fork.c (delete_fork): Adjust to call low method.
5749         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5750         (linux_nat_new_fork, linux_nat_forget_process_hook)
5751         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5752         (linux_nat_status_is_event):
5753         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5754         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5755         to call low method.
5756         (sigtrap_is_event): Rename to ...
5757         (linux_nat_target::low_status_is_event): ... this.
5758         (linux_nat_set_status_is_event): Delete.
5759         (save_stop_reason, linux_nat_wait_1)
5760         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5761         low methods.
5762         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5763         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5764         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5765         (linux_nat_set_prepare_to_resume): Delete.
5766         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5767         low virtual methods.
5768         * amd64-linux-nat.c: Likewise.
5769         * arm-linux-nat.c: Likewise.
5770         * i386-linux-nat.c: Likewise.
5771         * ia64-linux-nat.c: Likewise.
5772         * mips-linux-nat.c: Likewise.
5773         * ppc-linux-nat.c: Likewise.
5774         * s390-linux-nat.c: Likewise.
5775         * sparc64-linux-nat.c: Likewise.
5776         * x86-linux-nat.c: Likewise.
5777         * x86-linux-nat.h: Include "nat/x86-linux.h".
5778         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5779         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5780         Override methods.
5781
5782 2018-05-02  Pedro Alves  <palves@redhat.com>
5783
5784         * target.h (target_ops)
5785         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5786         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5787         stopped_by_watchpoint, have_continuable_watchpoint,
5788         stopped_data_address, watchpoint_addr_within_range,
5789         can_accel_watchpoint_condition, can_run, thread_alive,
5790         has_all_memory, has_memory, has_stack, has_registers,
5791         has_execution, can_async_p, is_async_p, supports_non_stop,
5792         always_non_stop_p, can_execute_reverse, supports_multi_process,
5793         supports_enable_disable_tracepoint,
5794         supports_disable_randomization, supports_string_tracing,
5795         supports_evaluation_of_breakpoint_conditions,
5796         can_run_breakpoint_commands, filesystem_is_local,
5797         can_download_tracepoint, get_trace_state_variable_value,
5798         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5799         record_is_replaying, record_will_replay,
5800         augmented_libraries_svr4_read>: Adjust to return bool.
5801         * aarch64-linux-nat.c: All implementations adjusted.
5802         * aix-thread.c: All implementations adjusted.
5803         * arm-linux-nat.c: All implementations adjusted.
5804         * breakpoint.c: All implementations adjusted.
5805         * bsd-kvm.c: All implementations adjusted.
5806         * bsd-uthread.c: All implementations adjusted.
5807         * corelow.c: All implementations adjusted.
5808         * ctf.c: All implementations adjusted.
5809         * darwin-nat.c: All implementations adjusted.
5810         * darwin-nat.h: All implementations adjusted.
5811         * exec.c: All implementations adjusted.
5812         * fbsd-nat.c: All implementations adjusted.
5813         * fbsd-nat.h: All implementations adjusted.
5814         * gnu-nat.c: All implementations adjusted.
5815         * gnu-nat.h: All implementations adjusted.
5816         * go32-nat.c: All implementations adjusted.
5817         * ia64-linux-nat.c: All implementations adjusted.
5818         * inf-child.c: All implementations adjusted.
5819         * inf-child.h: All implementations adjusted.
5820         * inf-ptrace.c: All implementations adjusted.
5821         * inf-ptrace.h: All implementations adjusted.
5822         * linux-nat.c: All implementations adjusted.
5823         * linux-nat.h: All implementations adjusted.
5824         * mips-linux-nat.c: All implementations adjusted.
5825         * nto-procfs.c: All implementations adjusted.
5826         * ppc-linux-nat.c: All implementations adjusted.
5827         * procfs.c: All implementations adjusted.
5828         * ravenscar-thread.c: All implementations adjusted.
5829         * record-btrace.c: All implementations adjusted.
5830         * record-full.c: All implementations adjusted.
5831         * remote-sim.c: All implementations adjusted.
5832         * remote.c: All implementations adjusted.
5833         * s390-linux-nat.c: All implementations adjusted.
5834         * sol-thread.c: All implementations adjusted.
5835         * spu-multiarch.c: All implementations adjusted.
5836         * target-delegates.c: All implementations adjusted.
5837         * target.c: All implementations adjusted.
5838         * target.h: All implementations adjusted.
5839         * tracefile-tfile.c: All implementations adjusted.
5840         * tracefile.c: All implementations adjusted.
5841         * tracefile.h: All implementations adjusted.
5842         * windows-nat.c: All implementations adjusted.
5843         * x86-linux-nat.h: All implementations adjusted.
5844         * x86-nat.h: All implementations adjusted.
5845
5846 2018-05-02  Pedro Alves  <palves@redhat.com>
5847
5848         * make-target-delegates (scan_target_h): Don't trim lines here.
5849         Replace sequences of tabs and/or whitespace with a single
5850         whitespace.
5851         (top level, parsing methods): Trim each line before processing it
5852         here.
5853
5854 2018-05-02  Pedro Alves  <palves@redhat.com>
5855             John Baldwin  <jhb@freebsd.org>
5856
5857         * target.h (enum strata) <debug_stratum>: New.
5858         (struct target_ops) <all delegation methods>: Replace by C++
5859         virtual methods, and drop "to_" prefix.  All references updated
5860         throughout.
5861         <to_shortname, to_longname, to_doc, to_data,
5862         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5863         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5864         virtual methods.  All references updated throughout.
5865         <can_attach, supports_terminal_ours, can_create_inferior,
5866         get_thread_control_capabilities, attach_no_wait>: New
5867         virtual methods.
5868         <insert_breakpoint, remove_breakpoint>: Now
5869         TARGET_DEFAULT_NORETURN methods.
5870         <info_proc>: Now returns bool.
5871         <to_magic>: Delete.
5872         (OPS_MAGIC): Delete.
5873         (current_target): Delete.  All references replaced by references
5874         to ...
5875         (target_stack): ... this.  New.
5876         (target_shortname, target_longname): Adjust.
5877         (target_can_run): Now a function declaration.
5878         (default_child_has_all_memory, default_child_has_memory)
5879         (default_child_has_stack, default_child_has_registers)
5880         (default_child_has_execution): Remove target_ops parameter.
5881         (complete_target_initialization): Delete.
5882         (memory_breakpoint_target): New template class.
5883         (test_target_ops): Refactor as a C++ class with virtual methods.
5884         * make-target-delegates (NAME_PART): Tighten.
5885         (POINTER_PART, CP_SYMBOL): New.
5886         (SIMPLE_RETURN_PART): Reimplement.
5887         (VEC_RETURN_PART): Expect less.
5888         (RETURN_PART, VIRTUAL_PART): New.
5889         (METHOD): Adjust to C++ virtual methods.
5890         (scan_target_h): Remove reference to C99.
5891         (dname): Output "target_ops::" prefix.
5892         (write_function_header): Adjust to output a C++ class method.
5893         (write_declaration): New.
5894         (write_delegator): Adjust to output a C++ class method.
5895         (tdname): Output "dummy_target::" prefix.
5896         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5897         method.
5898         (tdefault_names, debug_names): Delete.
5899         (return_types, tdefaults, styles, argtypes_array): New.
5900         (top level): All methods are delegators.
5901         (print_class): New.
5902         (top level): Print dummy_target and debug_target classes.
5903         * target-delegates.c: Regenerate.
5904         * target-debug.h (target_debug_print_enum_info_proc_what)
5905         (target_debug_print_thread_control_capabilities)
5906         (target_debug_print_thread_info_p): New.
5907         * target.c (dummy_target): Delete.
5908         (the_dummy_target, the_debug_target): New.
5909         (target_stack): Now extern.
5910         (set_targetdebug): Push/unpush debug target.
5911         (default_child_has_all_memory, default_child_has_memory)
5912         (default_child_has_stack, default_child_has_registers)
5913         (default_child_has_execution): Remove target_ops parameter.
5914         (complete_target_initialization): Delete.
5915         (add_target_with_completer): No longer call
5916         complete_target_initialization.
5917         (target_supports_terminal_ours): Use regular delegation.
5918         (update_current_target): Delete.
5919         (push_target): No longer check magic number.  Don't call
5920         update_current_target.
5921         (unpush_target): Don't call update_current_target.
5922         (target_is_pushed): No longer check magic number.
5923         (target_require_runnable): Skip for all stratums over
5924         process_stratum.
5925         (target_ops::info_proc): New.
5926         (target_info_proc): Use find_target_at and
5927         find_default_run_target.
5928         (target_supports_disable_randomization): Use regular delegation.
5929         (target_get_osdata): Use find_target_at.
5930         (target_ops::open, target_ops::close, target_ops::can_attach)
5931         (target_ops::attach, target_ops::can_create_inferior)
5932         (target_ops::create_inferior, target_ops::can_run)
5933         (target_can_run): New.
5934         (default_fileio_target): Use regular delegation.
5935         (target_ops::fileio_open, target_ops::fileio_pwrite)
5936         (target_ops::fileio_pread, target_ops::fileio_fstat)
5937         (target_ops::fileio_close, target_ops::fileio_unlink)
5938         (target_ops::fileio_readlink): New.
5939         (target_fileio_open_1, target_fileio_unlink)
5940         (target_fileio_readlink): Always call the target method.  Handle
5941         FILEIO_ENOSYS.
5942         (return_zero, return_zero_has_execution): Delete.
5943         (init_dummy_target): Delete.
5944         (dummy_target::dummy_target, dummy_target::shortname)
5945         (dummy_target::longname, dummy_target::doc)
5946         (debug_target::debug_target, debug_target::shortname)
5947         (debug_target::longname, debug_target::doc): New.
5948         (target_supports_delete_record): Use regular delegation.
5949         (setup_target_debug): Delete.
5950         (maintenance_print_target_stack): Skip debug_stratum.
5951         (initialize_targets): Instantiate the_dummy_target and
5952         the_debug_target.
5953         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5954         use target_stack.
5955         (target_auxv_search, fprint_target_auxv): Adjust.
5956         (info_auxv_command): Adjust to use target_stack.
5957         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5958         * exceptions.c (print_flush): Handle a NULL target_stack.
5959         * regcache.c (target_ops_no_register): Refactor as class with
5960         virtual methods.
5961
5962         * exec.c (exec_target): New class.
5963         (exec_ops): Now an exec_target.
5964         (exec_open, exec_close_1, exec_get_section_table)
5965         (exec_xfer_partial, exec_files_info, exec_has_memory)
5966         (exec_make_note_section): Refactor as exec_target methods.
5967         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5968         Delete.
5969         (exec_target::find_memory_regions): New.
5970         (_initialize_exec): Don't call init_exec_ops.
5971         * gdbcore.h (exec_file_clear): Delete.
5972
5973         * corefile.c (core_target): Delete.
5974         (core_file_command): Adjust.
5975         * corelow.c (core_target): New class.
5976         (the_core_target): New.
5977         (core_close): Remove target_ops parameter.
5978         (core_close_cleanup): Adjust.
5979         (core_target::close): New.
5980         (core_open, core_detach, get_core_registers, core_files_info)
5981         (core_xfer_partial, core_thread_alive, core_read_description)
5982         (core_pid_to_str, core_thread_name, core_has_memory)
5983         (core_has_stack, core_has_registers, core_info_proc): Rework as
5984         core_target methods.
5985         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5986         (_initialize_corelow): Initialize the_core_target.
5987         * gdbcore.h (core_target): Delete.
5988         (the_core_target): New.
5989
5990         * ctf.c: (ctf_target): New class.
5991         (ctf_ops): Now a ctf_target.
5992         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5993         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5994         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5995         methods.
5996         (init_ctf_ops): Delete.
5997         (_initialize_ctf): Don't call it.
5998         * tracefile-tfile.c (tfile_target): New class.
5999         (tfile_ops): Now a tfile_target.
6000         (tfile_open, tfile_close, tfile_files_info)
6001         (tfile_get_tracepoint_status, tfile_trace_find)
6002         (tfile_fetch_registers, tfile_xfer_partial)
6003         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6004         Refactor as tfile_target methods.
6005         (tfile_xfer_partial_features): Remove target_ops parameter.
6006         (init_tfile_ops): Delete.
6007         (_initialize_tracefile_tfile): Don't call it.
6008         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6009         (tracefile_has_stack, tracefile_has_registers)
6010         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6011         tracefile_target methods.
6012         (init_tracefile_ops): Delete.
6013         (tracefile_target::tracefile_target): New.
6014         * tracefile.h: Include "target.h".
6015         (tracefile_target): New class.
6016         (init_tracefile_ops): Delete.
6017
6018         * spu-multiarch.c (spu_multiarch_target): New class.
6019         (spu_ops): Now a spu_multiarch_target.
6020         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6021         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6022         (spu_search_memory, spu_mourn_inferior): Refactor as
6023         spu_multiarch_target methods.
6024         (init_spu_ops): Delete.
6025         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6026         complete_target_initialization.
6027
6028         * ravenscar-thread.c (ravenscar_thread_target): New class.
6029         (ravenscar_ops): Now a ravenscar_thread_target.
6030         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6031         (ravenscar_thread_alive, ravenscar_pid_to_str)
6032         (ravenscar_fetch_registers, ravenscar_store_registers)
6033         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6034         (ravenscar_stopped_by_hw_breakpoint)
6035         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6036         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6037         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6038         methods.
6039         (init_ravenscar_thread_ops): Delete.
6040         (_initialize_ravenscar): Remove references to
6041         init_ravenscar_thread_ops and complete_target_initialization.
6042
6043         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6044         (bsd_uthread_target): New class.
6045         (bsd_uthread_ops): Now a bsd_uthread_target.
6046         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6047         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6048         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6049         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6050         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6051         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6052         (bsd_uthread_target): Delete function.
6053         (_initialize_bsd_uthread): Remove reference to
6054         complete_target_initialization.
6055
6056         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6057         (target_bfd): ... this new class.
6058         (target_bfd_xfer_partial, target_bfd_get_section_table)
6059         (target_bfd_close): Refactor as target_bfd methods.
6060         (target_bfd::~target_bfd): New.
6061         (target_bfd_reopen): Adjust.
6062         (target_bfd::close): New.
6063
6064         * record-btrace.c (record_btrace_target): New class.
6065         (record_btrace_ops): Now a record_btrace_target.
6066         (record_btrace_open, record_btrace_stop_recording)
6067         (record_btrace_disconnect, record_btrace_close)
6068         (record_btrace_async, record_btrace_info)
6069         (record_btrace_insn_history, record_btrace_insn_history_range)
6070         (record_btrace_insn_history_from, record_btrace_call_history)
6071         (record_btrace_call_history_range)
6072         (record_btrace_call_history_from, record_btrace_record_method)
6073         (record_btrace_is_replaying, record_btrace_will_replay)
6074         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6075         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6076         (record_btrace_store_registers, record_btrace_prepare_to_store)
6077         (record_btrace_to_get_unwinder)
6078         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6079         (record_btrace_commit_resume, record_btrace_wait)
6080         (record_btrace_stop, record_btrace_can_execute_reverse)
6081         (record_btrace_stopped_by_sw_breakpoint)
6082         (record_btrace_supports_stopped_by_sw_breakpoint)
6083         (record_btrace_stopped_by_hw_breakpoint)
6084         (record_btrace_supports_stopped_by_hw_breakpoint)
6085         (record_btrace_update_thread_list, record_btrace_thread_alive)
6086         (record_btrace_goto_begin, record_btrace_goto_end)
6087         (record_btrace_goto, record_btrace_stop_replaying_all)
6088         (record_btrace_execution_direction)
6089         (record_btrace_prepare_to_generate_core)
6090         (record_btrace_done_generating_core): Refactor as
6091         record_btrace_target methods.
6092         (init_record_btrace_ops): Delete.
6093         (_initialize_record_btrace): Remove reference to
6094         init_record_btrace_ops.
6095         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6096         the execution_direction global.
6097         (record_full_base_target, record_full_target)
6098         (record_full_core_target): New classes.
6099         (record_full_ops): Now a record_full_target.
6100         (record_full_core_ops): Now a record_full_core_target.
6101         (record_full_target::detach, record_full_target::disconnect)
6102         (record_full_core_target::disconnect)
6103         (record_full_target::mourn_inferior, record_full_target::kill):
6104         New.
6105         (record_full_open, record_full_close, record_full_async): Refactor
6106         as methods of the record_full_base_target class.
6107         (record_full_resume, record_full_commit_resume): Refactor
6108         as methods of the record_full_target class.
6109         (record_full_wait, record_full_stopped_by_watchpoint)
6110         (record_full_stopped_data_address)
6111         (record_full_stopped_by_sw_breakpoint)
6112         (record_full_supports_stopped_by_sw_breakpoint)
6113         (record_full_stopped_by_hw_breakpoint)
6114         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6115         methods of the record_full_base_target class.
6116         (record_full_store_registers, record_full_xfer_partial)
6117         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6118         Refactor as methods of the record_full_target class.
6119         (record_full_can_execute_reverse, record_full_get_bookmark)
6120         (record_full_goto_bookmark, record_full_execution_direction)
6121         (record_full_record_method, record_full_info, record_full_delete)
6122         (record_full_is_replaying, record_full_will_replay)
6123         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6124         (record_full_stop_replaying): Refactor as methods of the
6125         record_full_base_target class.
6126         (record_full_core_resume, record_full_core_kill)
6127         (record_full_core_fetch_registers)
6128         (record_full_core_prepare_to_store)
6129         (record_full_core_store_registers, record_full_core_xfer_partial)
6130         (record_full_core_insert_breakpoint)
6131         (record_full_core_remove_breakpoint)
6132         (record_full_core_has_execution): Refactor
6133         as methods of the record_full_core_target class.
6134         (record_full_base_target::supports_delete_record): New.
6135         (init_record_full_ops): Delete.
6136         (init_record_full_core_ops): Delete.
6137         (record_full_save): Refactor as method of the
6138         record_full_base_target class.
6139         (_initialize_record_full): Remove references to
6140         init_record_full_ops and init_record_full_core_ops.
6141
6142         * remote.c (remote_target, extended_remote_target): New classes.
6143         (remote_ops): Now a remote_target.
6144         (extended_remote_ops): Now an extended_remote_target.
6145         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6146         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6147         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6148         (remote_pass_signals, remote_set_syscall_catchpoint)
6149         (remote_program_signals, )
6150         (remote_thread_always_alive): Remove target_ops parameter.
6151         (remote_thread_alive, remote_thread_name)
6152         (remote_update_thread_list, remote_threads_extra_info)
6153         (remote_static_tracepoint_marker_at)
6154         (remote_static_tracepoint_markers_by_strid)
6155         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6156         (remote_open): Refactor as methods of remote_target.
6157         (extended_remote_open, extended_remote_detach)
6158         (extended_remote_attach, extended_remote_post_attach):
6159         (extended_remote_supports_disable_randomization)
6160         (extended_remote_create_inferior): : Refactor as method of
6161         extended_remote_target.
6162         (remote_set_permissions, remote_open_1, remote_detach)
6163         (remote_follow_fork, remote_follow_exec, remote_disconnect)
6164         (remote_resume, remote_commit_resume, remote_stop)
6165         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6166         (remote_terminal_ours, remote_wait, remote_fetch_registers)
6167         (remote_prepare_to_store, remote_store_registers)
6168         (remote_flash_erase, remote_flash_done, remote_files_info)
6169         (remote_kill, remote_mourn, remote_insert_breakpoint)
6170         (remote_remove_breakpoint, remote_insert_watchpoint)
6171         (remote_watchpoint_addr_within_range)
6172         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6173         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6174         (remote_supports_stopped_by_sw_breakpoint)
6175         (remote_stopped_by_hw_breakpoint)
6176         (remote_supports_stopped_by_hw_breakpoint)
6177         (remote_stopped_by_watchpoint, remote_stopped_data_address)
6178         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6179         (remote_verify_memory): Refactor as methods of remote_target.
6180         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6181         parameter.
6182         (remote_xfer_partial, remote_get_memory_xfer_limit)
6183         (remote_search_memory, remote_rcmd, remote_memory_map)
6184         (remote_pid_to_str, remote_get_thread_local_address)
6185         (remote_get_tib_address, remote_read_description): Refactor as
6186         methods of remote_target.
6187         (remote_target::fileio_open, remote_target::fileio_pwrite)
6188         (remote_target::fileio_pread, remote_target::fileio_close): New.
6189         (remote_hostio_readlink, remote_hostio_fstat)
6190         (remote_filesystem_is_local, remote_can_execute_reverse)
6191         (remote_supports_non_stop, remote_supports_disable_randomization)
6192         (remote_supports_multi_process, remote_supports_cond_breakpoints)
6193         (remote_supports_enable_disable_tracepoint)
6194         (remote_supports_string_tracing)
6195         (remote_can_run_breakpoint_commands, remote_trace_init)
6196         (remote_download_tracepoint, remote_can_download_tracepoint)
6197         (remote_download_trace_state_variable, remote_enable_tracepoint)
6198         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6199         (remote_trace_start, remote_get_trace_status)
6200         (remote_get_tracepoint_status, remote_trace_stop)
6201         (remote_trace_find, remote_get_trace_state_variable_value)
6202         (remote_save_trace_data, remote_get_raw_trace_data)
6203         (remote_set_disconnected_tracing, remote_core_of_thread)
6204         (remote_set_circular_trace_buffer, remote_traceframe_info)
6205         (remote_get_min_fast_tracepoint_insn_len)
6206         (remote_set_trace_buffer_size, remote_set_trace_notes)
6207         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6208         (remote_disable_btrace, remote_teardown_btrace)
6209         (remote_read_btrace, remote_btrace_conf)
6210         (remote_augmented_libraries_svr4_read, remote_load)
6211         (remote_pid_to_exec_file, remote_can_do_single_step)
6212         (remote_execution_direction, remote_thread_handle_to_thread_info):
6213         Refactor as methods of remote_target.
6214         (init_remote_ops, init_extended_remote_ops): Delete.
6215         (remote_can_async_p, remote_is_async_p, remote_async)
6216         (remote_thread_events, remote_upload_tracepoints)
6217         (remote_upload_trace_state_variables): Refactor as methods of
6218         remote_target.
6219         (_initialize_remote): Remove references to init_remote_ops and
6220         init_extended_remote_ops.
6221
6222         * remote-sim.c (gdbsim_target): New class.
6223         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6224         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6225         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6226         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6227         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6228         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6229         Refactor as methods of gdbsim_target.
6230         (gdbsim_ops): Now a gdbsim_target.
6231         (init_gdbsim_ops): Delete.
6232         (gdbsim_cntrl_c): Adjust.
6233         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6234
6235         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6236         (the_amd64_linux_nat_target): New.
6237         (amd64_linux_fetch_inferior_registers)
6238         (amd64_linux_store_inferior_registers): Refactor as methods of
6239         amd64_linux_nat_target.
6240         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
6241         * i386-linux-nat.c: Don't include "linux-nat.h".
6242         (i386_linux_nat_target): New class.
6243         (the_i386_linux_nat_target): New.
6244         (i386_linux_fetch_inferior_registers)
6245         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6246         as methods of i386_linux_nat_target.
6247         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
6248         * inf-child.c (inf_child_ops): Delete.
6249         (inf_child_fetch_inferior_registers)
6250         (inf_child_store_inferior_registers): Delete.
6251         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6252         methods of inf_child_target.
6253         (inf_child_target::supports_terminal_ours)
6254         (inf_child_target::terminal_init)
6255         (inf_child_target::terminal_inferior)
6256         (inf_child_target::terminal_ours_for_output)
6257         (inf_child_target::terminal_ours, inf_child_target::interrupt)
6258         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6259         New.
6260         (inf_child_open, inf_child_disconnect, inf_child_close)
6261         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6262         (inf_child_post_startup_inferior, inf_child_can_run)
6263         (inf_child_pid_to_exec_file): Refactor as methods of
6264         inf_child_target.
6265         (inf_child_follow_fork): Delete.
6266         (inf_child_target::can_create_inferior)
6267         (inf_child_target::can_attach): New.
6268         (inf_child_target::has_all_memory, inf_child_target::has_memory)
6269         (inf_child_target::has_stack, inf_child_target::has_registers)
6270         (inf_child_target::has_execution): New.
6271         (inf_child_fileio_open, inf_child_fileio_pwrite)
6272         (inf_child_fileio_pread, inf_child_fileio_fstat)
6273         (inf_child_fileio_close, inf_child_fileio_unlink)
6274         (inf_child_fileio_readlink, inf_child_use_agent)
6275         (inf_child_can_use_agent): Refactor as methods of
6276         inf_child_target.
6277         (return_zero, inf_child_target): Delete.
6278         (inf_child_target::inf_child_target): New.
6279         * inf-child.h: Include "target.h".
6280         (inf_child_target): Delete function prototype.
6281         (inf_child_target): New class.
6282         (inf_child_open_target, inf_child_mourn_inferior)
6283         (inf_child_maybe_unpush_target): Delete.
6284         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6285         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6286         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6287         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6288         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6289         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6290         (inf_ptrace_wait, inf_ptrace_xfer_partial)
6291         (inf_ptrace_thread_alive, inf_ptrace_files_info)
6292         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6293         methods of inf_ptrace_target.
6294         (inf_ptrace_target): Delete function.
6295         * inf-ptrace.h: Include "inf-child.h".
6296         (inf_ptrace_target): Delete function declaration.
6297         (inf_ptrace_target): New class.
6298         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6299         * linux-nat.c (linux_target): New.
6300         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6301         (linux_nat_target::~linux_nat_target): New.
6302         (linux_child_post_attach, linux_child_post_startup_inferior)
6303         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6304         (linux_child_remove_fork_catchpoint)
6305         (linux_child_insert_vfork_catchpoint)
6306         (linux_child_remove_vfork_catchpoint)
6307         (linux_child_insert_exec_catchpoint)
6308         (linux_child_remove_exec_catchpoint)
6309         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6310         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6311         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6312         (linux_nat_stopped_data_address)
6313         (linux_nat_stopped_by_sw_breakpoint)
6314         (linux_nat_supports_stopped_by_sw_breakpoint)
6315         (linux_nat_stopped_by_hw_breakpoint)
6316         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6317         (linux_nat_kill, linux_nat_mourn_inferior)
6318         (linux_nat_xfer_partial, linux_nat_thread_alive)
6319         (linux_nat_update_thread_list, linux_nat_pid_to_str)
6320         (linux_nat_thread_name, linux_child_pid_to_exec_file)
6321         (linux_child_static_tracepoint_markers_by_strid)
6322         (linux_nat_is_async_p, linux_nat_can_async_p)
6323         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6324         (linux_nat_supports_multi_process)
6325         (linux_nat_supports_disable_randomization, linux_nat_async)
6326         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6327         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6328         (linux_nat_fileio_open, linux_nat_fileio_readlink)
6329         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6330         methods of linux_nat_target.
6331         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6332         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6333         parameter.
6334         (check_stopped_by_watchpoint): Adjust.
6335         (linux_xfer_partial): Delete.
6336         (linux_target_install_ops, linux_target, linux_nat_add_target):
6337         Delete.
6338         (linux_nat_target::linux_nat_target): New.
6339         * linux-nat.h: Include "inf-ptrace.h".
6340         (linux_nat_target): New.
6341         (linux_target, linux_target_install_ops, linux_nat_add_target):
6342         Delete function declarations.
6343         (linux_target): Declare global.
6344         * linux-thread-db.c (thread_db_target): New.
6345         (thread_db_target::thread_db_target): New.
6346         (thread_db_ops): Delete.
6347         (the_thread_db_target): New.
6348         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6349         (thread_db_update_thread_list, thread_db_pid_to_str)
6350         (thread_db_extra_thread_info)
6351         (thread_db_thread_handle_to_thread_info)
6352         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6353         (thread_db_resume): Refactor as methods of thread_db_target.
6354         (init_thread_db_ops): Delete.
6355         (_initialize_thread_db): Remove reference to init_thread_db_ops.
6356         * x86-linux-nat.c: Don't include "linux-nat.h".
6357         (super_post_startup_inferior): Delete.
6358         (x86_linux_nat_target::~x86_linux_nat_target): New.
6359         (x86_linux_child_post_startup_inferior)
6360         (x86_linux_read_description, x86_linux_enable_btrace)
6361         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6362         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6363         methods of x86_linux_nat_target.
6364         (x86_linux_create_target): Delete.  Bits folded ...
6365         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
6366         pointer.
6367         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6368         (x86_linux_nat_target): New class.
6369         (x86_linux_create_target): Delete.
6370         (x86_linux_add_target): Now takes a linux_nat_target pointer.
6371         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6372         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6373         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6374         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6375         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6376         make extern.
6377         (x86_use_watchpoints): Delete.
6378         * x86-nat.h: Include "breakpoint.h" and "target.h".
6379         (x86_use_watchpoints): Delete.
6380         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6381         (x86_stopped_by_watchpoint, x86_stopped_data_address)
6382         (x86_insert_watchpoint, x86_remove_watchpoint)
6383         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6384         (x86_stopped_by_hw_breakpoint): New declarations.
6385         (x86_nat_target): New template class.
6386
6387         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6388         (the_ppc_linux_nat_target): New.
6389         (ppc_linux_fetch_inferior_registers)
6390         (ppc_linux_can_use_hw_breakpoint)
6391         (ppc_linux_region_ok_for_hw_watchpoint)
6392         (ppc_linux_ranged_break_num_registers)
6393         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6394         (ppc_linux_insert_mask_watchpoint)
6395         (ppc_linux_remove_mask_watchpoint)
6396         (ppc_linux_can_accel_watchpoint_condition)
6397         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6398         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6399         (ppc_linux_watchpoint_addr_within_range)
6400         (ppc_linux_masked_watch_num_registers)
6401         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6402         (ppc_linux_read_description): Refactor as methods of
6403         ppc_linux_nat_target.
6404         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
6405
6406         * procfs.c (procfs_xfer_partial): Delete forward declaration.
6407         (procfs_target): New class.
6408         (the_procfs_target): New.
6409         (procfs_target): Delete function.
6410         (procfs_auxv_parse, procfs_attach, procfs_detach)
6411         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6412         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6413         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6414         (procfs_create_inferior, procfs_update_thread_list)
6415         (procfs_thread_alive, procfs_pid_to_str)
6416         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6417         (procfs_stopped_data_address, procfs_insert_watchpoint)
6418         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6419         (proc_find_memory_regions, procfs_info_proc)
6420         (procfs_make_note_section): Refactor as methods of procfs_target.
6421         (_initialize_procfs): Adjust.
6422         * sol-thread.c (sol_thread_target): New class.
6423         (sol_thread_ops): Now a sol_thread_target.
6424         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6425         (sol_thread_fetch_registers, sol_thread_store_registers)
6426         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6427         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6428         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6429         (init_sol_thread_ops): Delete.
6430         (_initialize_sol_thread): Adjust.  Remove references to
6431         init_sol_thread_ops and complete_target_initialization.
6432
6433         * windows-nat.c (windows_nat_target): New class.
6434         (windows_fetch_inferior_registers)
6435         (windows_store_inferior_registers, windows_resume, windows_wait)
6436         (windows_attach, windows_detach, windows_pid_to_exec_file)
6437         (windows_files_info, windows_create_inferior)
6438         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6439         (windows_close, windows_pid_to_str, windows_xfer_partial)
6440         (windows_get_tib_address, windows_get_ada_task_ptid)
6441         (windows_thread_name, windows_thread_alive): Refactor as
6442         windows_nat_target methods.
6443         (do_initial_windows_stuff): Adjust.
6444         (windows_target): Delete function.
6445         (_initialize_windows_nat): Adjust.
6446
6447         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6448         (darwin_mourn_inferior, darwin_kill_inferior)
6449         (darwin_create_inferior, darwin_attach, darwin_detach)
6450         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6451         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6452         (darwin_supports_multi_process): Refactor as darwin_nat_target
6453         methods.
6454         (darwin_resume_to, darwin_files_info): Delete.
6455         (_initialize_darwin_inferior): Rename to ...
6456         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
6457         * darwin-nat.h: Include "inf-child.h".
6458         (darwin_nat_target): New class.
6459         (darwin_complete_target): Delete.
6460         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6461         (darwin_target): New.
6462         (i386_darwin_fetch_inferior_registers)
6463         (i386_darwin_store_inferior_registers): Refactor as methods of
6464         darwin_nat_target.
6465         (darwin_complete_target): Delete, with ...
6466         (_initialize_i386_darwin_nat): ... bits factored out here.
6467
6468         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6469         (the_alpha_linux_nat_target): New.
6470         (alpha_linux_register_u_offset): Refactor as
6471         alpha_linux_nat_target method.
6472         (_initialize_alpha_linux_nat): Adjust.
6473         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6474         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6475         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6476         methods of linux_nat_trad_target.
6477         (linux_trad_target): Delete.
6478         * linux-nat-trad.h (linux_trad_target): Delete function.
6479         (linux_nat_trad_target): New class.
6480         * mips-linux-nat.c (mips_linux_nat_target): New class.
6481         (super_fetch_registers, super_store_registers, super_close):
6482         Delete.
6483         (the_mips_linux_nat_target): New.
6484         (mips64_linux_regsets_fetch_registers)
6485         (mips64_linux_regsets_store_registers)
6486         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6487         (mips_linux_register_u_offset, mips_linux_read_description)
6488         (mips_linux_can_use_hw_breakpoint)
6489         (mips_linux_stopped_by_watchpoint)
6490         (mips_linux_stopped_data_address)
6491         (mips_linux_region_ok_for_hw_watchpoint)
6492         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6493         (mips_linux_close): Refactor as methods of mips_linux_nat.
6494         (_initialize_mips_linux_nat): Adjust to C++ification.
6495
6496         * aix-thread.c (aix_thread_target): New class.
6497         (aix_thread_ops): Now an aix_thread_target.
6498         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6499         (aix_thread_fetch_registers, aix_thread_store_registers)
6500         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6501         (aix_thread_thread_alive, aix_thread_pid_to_str)
6502         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6503         Refactor as methods of aix_thread_target.
6504         (init_aix_thread_ops): Delete.
6505         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6506         and complete_target_initialization.
6507         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6508         (rs6000_nat_target): New class.
6509         (the_rs6000_nat_target): New.
6510         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6511         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6512         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6513         (super_create_inferior): Delete.
6514         (_initialize_rs6000_nat): Adjust to C++ification.
6515
6516         * arm-linux-nat.c (arm_linux_nat_target): New class.
6517         (the_arm_linux_nat_target): New.
6518         (arm_linux_fetch_inferior_registers)
6519         (arm_linux_store_inferior_registers, arm_linux_read_description)
6520         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6521         (arm_linux_remove_hw_breakpoint)
6522         (arm_linux_region_ok_for_hw_watchpoint)
6523         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6524         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6525         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6526         arm_linux_nat_target.
6527         (_initialize_arm_linux_nat): Adjust to C++ification.
6528
6529         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6530         (the_aarch64_linux_nat_target): New.
6531         (aarch64_linux_fetch_inferior_registers)
6532         (aarch64_linux_store_inferior_registers)
6533         (aarch64_linux_child_post_startup_inferior)
6534         (aarch64_linux_read_description)
6535         (aarch64_linux_can_use_hw_breakpoint)
6536         (aarch64_linux_insert_hw_breakpoint)
6537         (aarch64_linux_remove_hw_breakpoint)
6538         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6539         (aarch64_linux_region_ok_for_hw_watchpoint)
6540         (aarch64_linux_stopped_data_address)
6541         (aarch64_linux_stopped_by_watchpoint)
6542         (aarch64_linux_watchpoint_addr_within_range)
6543         (aarch64_linux_can_do_single_step): Refactor as methods of
6544         aarch64_linux_nat_target.
6545         (super_post_startup_inferior): Delete.
6546         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6547
6548         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6549         (the_hppa_linux_nat_target): New.
6550         (hppa_linux_fetch_inferior_registers)
6551         (hppa_linux_store_inferior_registers): Refactor as methods of
6552         hppa_linux_nat_target.
6553         (_initialize_hppa_linux_nat): Adjust to C++ification.
6554
6555         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6556         (the_ia64_linux_nat_target): New.
6557         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6558         (ia64_linux_stopped_data_address)
6559         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6560         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6561         ia64_linux_nat_target methods.
6562         (super_xfer_partial): Delete.
6563         (_initialize_ia64_linux_nat): Adjust to C++ification.
6564
6565         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6566         (the_m32r_linux_nat_target): New.
6567         (m32r_linux_fetch_inferior_registers)
6568         (m32r_linux_store_inferior_registers): Refactor as
6569         m32r_linux_nat_target methods.
6570         (_initialize_m32r_linux_nat): Adjust to C++ification.
6571
6572         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6573         (the_m68k_linux_nat_target): New.
6574         (m68k_linux_fetch_inferior_registers)
6575         (m68k_linux_store_inferior_registers): Refactor as
6576         m68k_linux_nat_target methods.
6577         (_initialize_m68k_linux_nat): Adjust to C++ification.
6578
6579         * s390-linux-nat.c (s390_linux_nat_target): New class.
6580         (the_s390_linux_nat_target): New.
6581         (s390_linux_fetch_inferior_registers)
6582         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6583         (s390_insert_watchpoint, s390_remove_watchpoint)
6584         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6585         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6586         (s390_auxv_parse, s390_read_description): Refactor as methods of
6587         s390_linux_nat_target.
6588         (_initialize_s390_nat): Adjust to C++ification.
6589
6590         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6591         (the_sparc_linux_nat_target): New.
6592         (_initialize_sparc_linux_nat): Adjust to C++ification.
6593         * sparc-nat.c (sparc_fetch_inferior_registers)
6594         (sparc_store_inferior_registers): Remove target_ops parameter.
6595         * sparc-nat.h (sparc_fetch_inferior_registers)
6596         (sparc_store_inferior_registers): Remove target_ops parameter.
6597         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6598         (the_sparc64_linux_nat_target): New.
6599         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6600
6601         * spu-linux-nat.c (spu_linux_nat_target): New class.
6602         (the_spu_linux_nat_target): New.
6603         (spu_child_post_startup_inferior, spu_child_post_attach)
6604         (spu_child_wait, spu_fetch_inferior_registers)
6605         (spu_store_inferior_registers, spu_xfer_partial)
6606         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6607         methods.
6608         (_initialize_spu_nat): Adjust to C++ification.
6609
6610         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6611         (the_tilegx_linux_nat_target): New.
6612         (fetch_inferior_registers, store_inferior_registers):
6613         Refactor as methods.
6614         (_initialize_tile_linux_nat): Adjust to C++ification.
6615
6616         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6617         (the_xtensa_linux_nat_target): New.
6618         (xtensa_linux_fetch_inferior_registers)
6619         (xtensa_linux_store_inferior_registers): Refactor as
6620         xtensa_linux_nat_target methods.
6621         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6622
6623         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6624         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6625         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6626         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6627         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6628         (fbsd_stopped_by_sw_breakpoint)
6629         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6630         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6631         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6632         (fbsd_post_startup_inferior, fbsd_post_attach)
6633         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6634         (fbsd_set_syscall_catchpoint)
6635         (super_xfer_partial, super_resume, super_wait)
6636         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6637         (fbsd_handle_debug_trap): Remove target_ops parameter.
6638         (fbsd_nat_add_target): Delete.
6639         * fbsd-nat.h: Include "inf-ptrace.h".
6640         (fbsd_nat_add_target): Delete.
6641         (USE_SIGTRAP_SIGINFO): Define.
6642         (fbsd_nat_target): New class.
6643
6644         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6645         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6646         (amd64bsd_target): Delete.
6647         * amd64-bsd-nat.h: New file.
6648         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6649         "x86-bsd-nat.h".
6650         (amd64_fbsd_nat_target): New class.
6651         (the_amd64_fbsd_nat_target): New.
6652         (amd64fbsd_read_description): Refactor as method of
6653         amd64_fbsd_nat_target.
6654         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6655         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6656         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6657         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6658         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6659         (i386bsd_target): Delete.
6660         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6661         (i386bsd_fetch_inferior_registers)
6662         (i386bsd_store_inferior_registers): Declare.
6663         (i386_bsd_nat_target): New class.
6664         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6665         (the_i386_fbsd_nat_target): New.
6666         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6667         i386_fbsd_nat_target methods.
6668         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6669         (_initialize_i386fbsd_nat): Adjust to C++ification.
6670         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6671         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6672         (_initialize_x86_bsd_nat): Adjust to C++ification.
6673         * x86-bsd-nat.h: Include "x86-nat.h".
6674         (x86bsd_target): Delete declaration.
6675         (x86bsd_nat_target): New class.
6676
6677         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6678         (the_aarch64_fbsd_nat_target): New.
6679         (aarch64_fbsd_fetch_inferior_registers)
6680         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6681         aarch64_fbsd_nat_target.
6682         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6683         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6684         (the_alpha_bsd_nat_target): New.
6685         (alphabsd_fetch_inferior_registers)
6686         (alphabsd_store_inferior_registers): Refactor as
6687         alpha_bsd_nat_target methods.
6688         (_initialize_alphabsd_nat): Refactor as methods of
6689         alpha_bsd_nat_target.
6690         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6691         (the_amd64_nbsd_nat_target): New.
6692         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6693         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6694         (the_amd64_obsd_nat_target): New.
6695         (_initialize_amd64obsd_nat): Adjust to C++ification.
6696         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6697         (the_arm_fbsd_nat_target): New.
6698         (arm_fbsd_fetch_inferior_registers)
6699         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6700         (_initialize_arm_fbsd_nat): Refactor as methods of
6701         arm_fbsd_nat_target.
6702         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6703         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6704         (the_arm_netbsd_nat_target): New.
6705         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6706         arm_netbsd_nat_target.
6707         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6708         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6709         (the_hppa_nbsd_nat_target): New.
6710         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6711         hppa_nbsd_nat_target methods.
6712         (_initialize_hppanbsd_nat): Adjust to C++ification.
6713         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6714         (the_hppa_obsd_nat_target): New.
6715         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6716         methods of hppa_obsd_nat_target.
6717         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6718         add_target.
6719         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6720         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6721         add_target.
6722         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6723         (_initialize_i386obsd_nat): Use add_target.
6724         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6725         (the_m68k_bsd_nat_target): New.
6726         (m68kbsd_fetch_inferior_registers)
6727         (m68kbsd_store_inferior_registers): Refactor as methods of
6728         m68k_bsd_nat_target.
6729         (_initialize_m68kbsd_nat): Adjust to C++ification.
6730         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6731         (the_mips_fbsd_nat_target): New.
6732         (mips_fbsd_fetch_inferior_registers)
6733         (mips_fbsd_store_inferior_registers): Refactor as methods of
6734         mips_fbsd_nat_target.
6735         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6736         add_target.
6737         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6738         (the_mips_nbsd_nat_target): New.
6739         (mipsnbsd_fetch_inferior_registers)
6740         (mipsnbsd_store_inferior_registers): Refactor as methods of
6741         mips_nbsd_nat_target.
6742         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6743         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6744         (the_mips64_obsd_nat_target): New.
6745         (mips64obsd_fetch_inferior_registers)
6746         (mips64obsd_store_inferior_registers): Refactor as methods of
6747         mips64_obsd_nat_target.
6748         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6749         add_target.
6750         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6751         nbsd_nat_target.
6752         * nbsd-nat.h: Include "inf-ptrace.h".
6753         (nbsd_nat_target): New class.
6754         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6755         (obsd_wait): Refactor as methods of obsd_nat_target.
6756         (obsd_add_target): Delete.
6757         * obsd-nat.h: Include "inf-ptrace.h".
6758         (obsd_nat_target): New class.
6759         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6760         (the_ppc_fbsd_nat_target): New.
6761         (ppcfbsd_fetch_inferior_registers)
6762         (ppcfbsd_store_inferior_registers): Refactor as methods of
6763         ppc_fbsd_nat_target.
6764         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6765         add_target.
6766         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6767         (the_ppc_nbsd_nat_target): New.
6768         (ppcnbsd_fetch_inferior_registers)
6769         (ppcnbsd_store_inferior_registers): Refactor as methods of
6770         ppc_nbsd_nat_target.
6771         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6772         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6773         (the_ppc_obsd_nat_target): New.
6774         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6775         methods of ppc_obsd_nat_target.
6776         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6777         add_target.
6778         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6779         (the_sh_nbsd_nat_target): New.
6780         (shnbsd_fetch_inferior_registers)
6781         (shnbsd_store_inferior_registers): Refactor as methods of
6782         sh_nbsd_nat_target.
6783         (_initialize_shnbsd_nat): Adjust to C++ification.
6784         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6785         (inf_ptrace_xfer_partial): Delete.
6786         (sparc_xfer_partial, sparc_target): Delete.
6787         * sparc-nat.h (sparc_fetch_inferior_registers)
6788         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6789         (sparc_target): Delete function declaration.
6790         (sparc_target): New template class.
6791         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6792         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6793         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6794         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6795         add_target.
6796         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6797         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6798         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6799         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6800         add_target.
6801         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6802         (the_vax_bsd_nat_target): New.
6803         (vaxbsd_fetch_inferior_registers)
6804         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6805         methods.
6806         (_initialize_vaxbsd_nat): Adjust to C++ification.
6807
6808         * bsd-kvm.c (bsd_kvm_target): New class.
6809         (bsd_kvm_ops): Now a bsd_kvm_target.
6810         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6811         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6812         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6813         bsd_kvm_target.
6814         (bsd_kvm_return_one): Delete.
6815         (bsd_kvm_add_target): Adjust to C++ification.
6816
6817         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6818         (nto_procfs_target_procfs): New classes.
6819         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6820         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6821         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6822         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6823         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6824         (procfs_remove_hw_breakpoint, procfs_resume)
6825         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6826         (procfs_kill_inferior, procfs_store_registers)
6827         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6828         as methods of nto_procfs_target.
6829         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6830         (nto_native_ops): Delete.
6831         (procfs_open, procfs_native_open): Delete.
6832         (nto_native_ops): Now an nto_procfs_target_native.
6833         (init_procfs_targets): Adjust to C++ification.
6834         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6835         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6836         Refactor as methods of nto_procfs_target.
6837
6838         * go32-nat.c (go32_nat_target): New class.
6839         (the_go32_nat_target): New.
6840         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6841         (go32_store_registers, go32_xfer_partial, go32_files_info)
6842         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6843         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6844         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6845         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6846         (go32_target): Delete.
6847         (_initialize_go32_nat): Adjust to C++ification.
6848
6849         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6850         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6851         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6852         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6853         gnu_nat_target.
6854         (gnu_target): Delete.
6855         * gnu-nat.h (gnu_target): Delete.
6856         (gnu_nat_target): New class.
6857         * i386-gnu-nat.c (gnu_base_target): New.
6858         (i386_gnu_nat_target): New class.
6859         (the_i386_gnu_nat_target): New.
6860         (_initialize_i386gnu_nat): Adjust to C++ification.
6861
6862 2018-05-02  Pedro Alves  <palves@redhat.com>
6863
6864         * bfd-target.c (target_bfd_xclose): Rename to ...
6865         (target_bfd_close): ... this.
6866         (target_bfd_reopen): Adjust.
6867         * target.c (target_close): Remove references to to_xclose.
6868         * target.h (target_ops::to_xclose): Delete.
6869         (target_ops::to_close): Update comments.
6870
6871 2018-05-02  Pedro Alves  <palves@redhat.com>
6872
6873         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6874         "linux-nat.h".
6875         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6876         * inf-ptrace.c (inf_ptrace_register_u_offset)
6877         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6878         (inf_ptrace_store_register, inf_ptrace_store_registers)
6879         (inf_ptrace_trad_target): Move to ...
6880         * linux-nat-trad.c: ... this new file.
6881         * linux-nat-trad.h: New file.
6882         * linux-nat.c (linux_target_install_ops): Make extern.
6883         (linux_trad_target): Delete.
6884         * linux-nat.h (linux_trad_target): Delete declaration.
6885         (linux_target_install_ops): Declare.
6886         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6887         "linux-nat.h".
6888
6889 2018-05-02  Pedro Alves  <palves@redhat.com>
6890
6891         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6892         procfs_target/add_target here.
6893         * procfs.c (procfs_target): Make static.
6894         (_initialize_procfs): Call add_target here.
6895         * procfs.h (struct target_ops): Remove forward declaration.
6896         (procfs_target): Remove declaration.
6897         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6898
6899 2018-05-02  Pedro Alves  <palves@redhat.com>
6900
6901         * procfs.c (procfs_stopped_by_watchpoint)
6902         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6903         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6904         Forward declare.
6905         (procfs_use_watchpoints): Delete, move contents...
6906         (procfs_target): ... here.
6907         * procfs.h (procfs_use_watchpoints): Delete declaration.
6908         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6909         procfs_use_watchpoints.
6910         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6911         procfs_use_watchpoints.
6912
6913 2018-05-02  Tom Tromey  <tom@tromey.com>
6914
6915         PR python/20084:
6916         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6917         and var_zuinteger_unlimited.
6918         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6919         and PARAM_ZUINTEGER_UNLIMITED.
6920         (set_parameter_value): Handle var_zuinteger and
6921         var_zuinteger_unlimited.
6922         (add_setshow_generic): Likewise.
6923         (parmpy_init): Likewise.
6924
6925 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6926
6927         PR rust/23124
6928         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6929         pointer is not null before dereferencing it.
6930
6931 2018-04-30  Tom Tromey  <tom@tromey.com>
6932
6933         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6934         is_mi_like_p.
6935
6936 2018-04-30  Tom Tromey  <tom@tromey.com>
6937
6938         * breakpoint.c (mention): Remove use of is_mi_like_p.
6939         (print_mention_ranged_breakpoint): Likewise.
6940         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6941         of is_mi_like_p.
6942
6943 2018-04-30  Tom Tromey  <tom@tromey.com>
6944
6945         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6946
6947 2018-04-30  Tom Tromey  <tom@tromey.com>
6948
6949         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6950         (info_spu_event_command): Remove some uses of is_mi_like_p.
6951
6952 2018-04-30  Tom Tromey  <tom@tromey.com>
6953
6954         * python/py-framefilter.c (py_print_single_arg)
6955         (enumerate_locals, py_print_args, py_print_frame): Remove some
6956         uses of is_mi_like_p.
6957
6958 2018-04-30  Tom Tromey  <tom@tromey.com>
6959
6960         * ui-out.c: Update.
6961         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6962         * ui-out.h (ui_out::is_mi_like_p): Now const.
6963         (ui_out::do_is_mi_like_p): Now const.
6964         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6965
6966 2018-04-30  Tom Tromey  <tom@tromey.com>
6967
6968         * varobj.c (varobj_set_visualizer): Use new_reference.
6969         * python/python.c (gdbpy_decode_line): Use new_reference.
6970         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6971         new_reference.
6972
6973 2018-04-30  Tom Tromey  <tom@tromey.com>
6974
6975         * varobj.c (install_new_value): Use new_reference.
6976         * value.h (value_incref): Return void.  Swap intro comment with
6977         value_decref.
6978         * value.c (set_value_parent): Use new_reference.
6979         (value_incref): Return void.  Update intro comment.
6980         (release_value): Use new_reference.
6981         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6982
6983 2018-04-30  Tom Tromey  <tom@tromey.com>
6984
6985         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6986         * gdb_bfd.h (new_bfd_ref): Remove.
6987         (gdb_bfd_open): Update comment.
6988         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6989         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6990         (gdb_bfd_fdopenr): Use new_reference.
6991         * exec.c (exec_file_attach): Use new_reference.
6992
6993 2018-04-30  Tom Tromey  <tom@tromey.com>
6994
6995         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6996         method.
6997
6998 2018-04-30  Tom Tromey  <tom@tromey.com>
6999
7000         * jit.c (jit_read_code_entry): Use type_align.
7001         * i386-tdep.c (i386_gdbarch_init): Don't call
7002         set_gdbarch_long_long_align_bit.
7003         * gdbarch.sh: Remove long_long_align_bit.
7004         * gdbarch.c, gdbarch.h: Rebuild.
7005         * arc-tdep.c (arc_type_align): New function.
7006         (arc_gdbarch_init): Use arc_type_align.  Don't call
7007         set_gdbarch_long_long_align_bit.
7008
7009 2018-04-30  Tom Tromey  <tom@tromey.com>
7010
7011         * rust-lang.c (rust_type_alignment): Remove.
7012         (rust_composite_type): Use type_align.
7013
7014 2018-04-30  Tom Tromey  <tom@tromey.com>
7015
7016         * NEWS: Mention Type.align.
7017         * python/py-type.c (typy_get_alignof): New function.
7018         (type_object_getset): Add "alignof".
7019
7020 2018-04-30  Tom Tromey  <tom@tromey.com>
7021
7022         PR exp/17095:
7023         * NEWS: Update.
7024         * std-operator.def (UNOP_ALIGNOF): New operator.
7025         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7026         New.
7027         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7028         * c-lang.c (c_op_print_tab): Add alignof.
7029         * c-exp.y (ALIGNOF): New token.
7030         (exp): Add "ALIGNOF" production.
7031         (ident_tokens): Add _Alignof and alignof.
7032
7033 2018-04-30  Tom Tromey  <tom@tromey.com>
7034
7035         * i386-tdep.c (i386_type_align): New function.
7036         (i386_gdbarch_init): Update.
7037         * gdbarch.sh (type_align): New method.
7038         * gdbarch.c, gdbarch.h: Rebuild.
7039         * arch-utils.h (default_type_align): Declare.
7040         * arch-utils.c (default_type_align): New function.
7041         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7042         (struct type) <align_log2>: New field.
7043         <instance_flags>: Now a bitfield.
7044         (TYPE_RAW_ALIGN): New macro.
7045         (type_align, type_raw_align, set_type_align): Declare.
7046         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7047         functions.
7048         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7049         (get_alignment, maybe_set_alignment): New functions.
7050         (read_structure_type, read_enumeration_type, read_array_type)
7051         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7052         (read_subrange_type, read_base_type): Set type alignment.
7053
7054 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7055
7056         * dwarf2read.c (read_index_from_section): Use bool.
7057
7058 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7059
7060         PR gdb/22950
7061         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7062         with #ifdef.
7063
7064 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7065
7066         PR build/22873
7067         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7068         last step, and do it atomically.
7069
7070 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7071
7072         * compile/compile-c-types.c (convert_int, convert_float):
7073         Update for C FE v1.
7074
7075 2018-04-27  Tom Tromey  <tom@tromey.com>
7076
7077         PR rust/22545:
7078         * rust-lang.c (rust_inclusive_range_type_p): New function.
7079         (rust_range): Handle inclusive ranges.
7080         (rust_compute_range): Likewise.
7081         * rust-exp.y (struct rust_op) <inclusive>: New field.
7082         (DOTDOTEQ): New constant.
7083         (range_expr): Add "..=" productions.
7084         (operator_tokens): Add "..=" token.
7085         (ast_range): Add "inclusive" parameter.
7086         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7087         ranges.
7088         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7089         bounds values.
7090         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7091         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7092         Update comments.
7093         * expprint.c (print_subexp_standard): Handle new bounds values.
7094         (dump_subexp_body_standard): Likewise.
7095
7096 2018-04-27  Tom Tromey  <tom@tromey.com>
7097
7098         * configure: Rebuild.
7099         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7100         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7101         "OVERRIDE".
7102         (class symbol_needs_eval_context): Likewise.
7103         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7104         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7105         "virtual".
7106         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7107         "override".
7108         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7109         * aarch64-tdep.c (instruction_reader::read): Use "override".
7110         (instruction_reader_test::read): Likewise.
7111         * arm-tdep.c (instruction_reader::read): Use "override".
7112         (instruction_reader_thumb::read): Likewise.
7113
7114 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7115
7116         PR remote/9665
7117         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7118         instead of remote_send.
7119         (remote_send): Remove.
7120
7121 2018-04-26  Pedro Alves  <palves@redhat.com>
7122
7123         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7124         find_function_start_sal instead of find_pc_line.
7125
7126 2018-04-26  Pedro Alves  <palves@redhat.com>
7127
7128         * breakpoint.c (set_breakpoint_location_function): Handle
7129         mst_data_gnu_ifunc.
7130         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7131         * elfread.c (elf_symtab_read): Give data symbols with
7132         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7133         (elf_rel_plt_read): Update comment.
7134         * linespec.c (convert_linespec_to_sals): Handle
7135         mst_data_gnu_ifunc.
7136         (minsym_found): Handle mst_data_gnu_ifunc.
7137         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7138         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7139         * parse.c (find_minsym_type_and_address): Handle
7140         mst_data_gnu_ifunc.
7141         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7142         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7143         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7144         comment.
7145         <mst_data_gnu_ifunc>: New enumerator.
7146
7147 2018-04-26  Pedro Alves  <palves@redhat.com>
7148
7149         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7150         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
7151         'want_trampoline' parameter by a lookup_msym_prefer parameter.
7152         Handle it.
7153         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7154         (lookup_minimal_symbol_by_pc): Adjust.
7155         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7156         (lookup_solib_trampoline_symbol_by_pc): Adjust.
7157         * minsyms.h (lookup_msym_prefer): New enum.
7158         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7159         parameter by a lookup_msym_prefer parameter.
7160
7161 2018-04-26  Pedro Alves  <palves@redhat.com>
7162
7163         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7164         ends in "@plt" instead of looking at the symbol's section.
7165
7166 2018-04-26  Pedro Alves  <palves@redhat.com>
7167
7168         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
7169         all references.
7170         (find_pc_partial_function_gnu_ifunc): Rename to ...
7171         (find_pc_partial_function): ... this, and remove references to
7172         'is_gnu_ifunc_p'.
7173         (find_pc_partial_function): Delete old implementation.
7174         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7175
7176 2018-04-26  Pedro Alves  <palves@redhat.com>
7177
7178         * linespec.c (struct bound_minimal_symbol_search_key): New.
7179         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
7180         skip first line if we found a GNU ifunc minimal symbol by name.
7181         (compare_msymbols): Change parameters to work with a destructured
7182         lhs minsym.
7183         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7184         functions.
7185
7186 2018-04-26  Pedro Alves  <palves@redhat.com>
7187
7188         * breakpoint.c (set_breakpoint_location_function): Don't resolve
7189         ifunc targets here.  Instead, if we have an ifunc minsym, use its
7190         address/name.
7191         (add_location_to_breakpoint): Store the minsym and the objfile in
7192         the breakpoint location.
7193         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7194         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7195         Record the minsym in the sal.
7196         * symtab.h (symtab_and_line) <msymbol>: New field.
7197
7198 2018-04-26  Pedro Alves  <palves@redhat.com>
7199
7200         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7201         unless we actually resolved the ifunc.
7202
7203 2018-04-26  Pedro Alves  <palves@redhat.com>
7204
7205         * c-exp.y (variable production): Prefer ifunc minsyms over
7206         regular function symbols.
7207         * symtab.c (find_gnu_ifunc): New function.
7208         * minsyms.h (lookup_msym_prefer): New enum.
7209         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7210         parameter by a lookup_msym_prefer parameter.
7211         * symtab.h (find_gnu_ifunc): New declaration.
7212
7213 2018-04-26  Pedro Alves  <palves@redhat.com>
7214
7215         * blockframe.c (find_gnu_ifunc_target_type): New function.
7216         (find_function_type): New.
7217         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7218         return a value with a memory address.
7219         (eval_call): For calls to GNU ifunc functions, try to find the
7220         type of the target function from the type that the resolver
7221         returns.
7222         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7223         symbols.
7224         * infcall.c (find_function_return_type): Delete.
7225         (find_function_addr): Add 'function_type' parameter.  For calls to
7226         GNU ifunc functions, try to find the type of the target function
7227         from the type that the resolver returns, and return it via
7228         FUNCTION_TYPE.
7229         (call_function_by_hand_dummy): Adjust to use the function type
7230         returned by find_function_addr.
7231         (find_function_addr): Add 'function_type' parameter and move
7232         description here.
7233         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7234         declarations.
7235
7236 2018-04-26  Pedro Alves  <palves@redhat.com>
7237
7238         * c-exp.y (variable production): Skip finding an alias for ifunc
7239         symbols.
7240
7241 2018-04-26  Pedro Alves  <palves@redhat.com>
7242
7243         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7244
7245 2018-04-25  Pedro Alves  <palves@redhat.com>
7246
7247         * infcmd.c (kill_command): Print the pid as string, not the whole
7248         thread's ptid.  Add comment.  s/has been killed/killed/ in output
7249         message.
7250         * remote.c (remote_detach_1): Print the pid as string, not the
7251         whole thread's ptid.
7252
7253 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7254             Sergio Durigan Junior  <sergiodj@redhat.com>
7255             Pedro Alves  <palves@redhat.com>
7256
7257         * infcmd.c (kill_command): Print message when inferior has
7258         been killed.
7259         * inferior.c (print_inferior_events): Remove 'static'.  Set as
7260         '1'.
7261         (add_inferior): Improve message printed when
7262         'print_inferior_events' is on.
7263         (exit_inferior): Remove message printed when
7264         'print_inferior_events' is on.
7265         (detach_inferior): Improve message printed when
7266         'print_inferior_events' is on.
7267         (initialize_inferiors): Use 'add_inferior_silent' to set
7268         'current_inferior_'.
7269         * inferior.h (print_inferior_events): Declare here as
7270         'extern'.
7271         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7272         '[Detaching...]' messages when 'print_inferior_events' is on.
7273         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
7274         as prefix/suffix for messages.  Remove periods.  Fix erroneous
7275         'Detaching after fork from child...', replace it by '... from
7276         parent...'.
7277         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7278         prefix/suffix when printing 'Detaching...' messages.  Print
7279         them when 'print_inferior_events' is on.
7280         * remote.c (remote_detach_1): Print message when detaching
7281         from inferior and '!is_fork_parent'.
7282
7283 2018-04-24  Tom Tromey  <tom@tromey.com>
7284
7285         * cli-out.h: Reindent.
7286
7287 2018-04-24  Tom Tromey  <tom@tromey.com>
7288
7289         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7290         (cli_ui_out::do_field_string): Use fputs_filtered.
7291         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7292
7293 2018-04-23  Tom Tromey  <tom@tromey.com>
7294
7295         * guile/scm-frame.c (gdbscm_frame_read_var): Use
7296         gdb::unique_xmalloc_ptr.
7297
7298 2018-04-23  Tom Tromey  <tom@tromey.com>
7299
7300         * configure: Rebuild.
7301
7302 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
7303
7304         PR gdb/23095
7305         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7306         prepare_for_testing.  Set normal_bp to r_debug_state if target
7307         is bsd.
7308
7309 2018-04-21  Pedro Alves  <palves@redhat.com>
7310             Rajendra SY  <rajendra.sy@gmail.com>
7311
7312         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7313         * remote.c (extended_remote_attach): In all-stop mode, mark the
7314         thread as executing.
7315
7316 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7317
7318         * thread.c (thread_apply_all_command): Fix comment.
7319         (thread_command): Fix comment.
7320
7321 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
7322
7323         * common/tdesc.h (tdesc_create_feature): Remove xml filename
7324         parameter.
7325         * features/aarch64-core.c (create_feature_aarch64_core):
7326         Regenerate.
7327         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7328         Likewise.
7329         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7330         Likewise.
7331         * features/i386/32bit-avx512.c
7332         (create_feature_i386_32bit_avx512): Likewise.
7333         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7334         Likewise.
7335         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7336         Likewise.
7337         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7338         Likewise.
7339         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7340         Likewise.
7341         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7342         Likewise.
7343         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7344         Likewise.
7345         * features/i386/64bit-avx512.c
7346         (create_feature_i386_64bit_avx512): Likewise.
7347         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7348         Likewise.
7349         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7350         Likewise.
7351         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7352         Likewise.
7353         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7354         Likewise.
7355         * features/i386/64bit-segments.c
7356         (create_feature_i386_64bit_segments): Likewise.
7357         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7358         Likewise.
7359         * features/i386/x32-core.c
7360         (create_feature_i386_x32_core): Likewise.
7361         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7362         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7363         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7364         * target-descriptions.c: In generated code, don't pass xml
7365         filename.
7366
7367 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7368
7369         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7370         (print_xml_feature::visit_post): Likewise.
7371         (print_xml_feature::visit): Likewise.
7372         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7373         (print_xml_feature): Add new class.
7374         * regformats/regdat.sh: Null xmltarget on feature targets.
7375         * target-descriptions.c (struct target_desc): Add xmltarget.
7376         (maintenance_check_tdesc_xml_convert): Add unittest function.
7377         (tdesc_get_features_xml): Add function to get xml.
7378         (maintenance_check_xml_descriptions): Test xml generation.
7379         * xml-tdesc.c (string_read_description_xml): Add function.
7380         * xml-tdesc.h (string_read_description_xml): Add declaration.
7381
7382 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7383
7384         * features/Makefile: Add feature marker to targets with new style
7385         target descriptions.
7386         * regformats/aarch64.dat: Regenerate.
7387         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7388         * regformats/i386/amd64-avx-linux.dat: Likewise.
7389         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7390         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7391         * regformats/i386/amd64-linux.dat: Likewise.
7392         * regformats/i386/amd64-mpx-linux.dat: Likewise.
7393         * regformats/i386/amd64.dat: Likewise.
7394         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7395         * regformats/i386/i386-avx-linux.dat: Likewise.
7396         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7397         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7398         * regformats/i386/i386-linux.dat: Likewise.
7399         * regformats/i386/i386-mmx-linux.dat: Likewise.
7400         * regformats/i386/i386-mpx-linux.dat: Likewise.
7401         * regformats/i386/i386.dat: Likewise.
7402         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7403         * regformats/i386/x32-avx-linux.dat: Likewise.
7404         * regformats/i386/x32-linux.dat: Likewise.
7405         * regformats/tic6x-c62x-linux.dat: Likewise.
7406         * regformats/tic6x-c64x-linux.dat: Likewise.
7407         * regformats/tic6x-c64xp-linux.dat: Likewise.
7408         * regformats/regdat.sh: Parse feature marker.
7409
7410 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7411
7412         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7413         (tdesc_osabi_name): Likewise.
7414         * target-descriptions.c (tdesc_architecture_name): Add new
7415         function.
7416         (tdesc_osabi_name): Likewise.
7417
7418 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7419
7420         * common/tdesc.c (tdesc_predefined_type): Move to here.
7421         (tdesc_named_type): Likewise.
7422         (tdesc_create_vector): Likewise.
7423         (tdesc_create_struct): Likewise.
7424         (tdesc_set_struct_size): Likewise.
7425         (tdesc_create_union): Likewise.
7426         (tdesc_create_flags): Likewise.
7427         (tdesc_create_enum): Likewise.
7428         (tdesc_add_field): Likewise.
7429         (tdesc_add_typed_bitfield): Likewise.
7430         (tdesc_add_bitfield): Likewise.
7431         (tdesc_add_flag): Likewise.
7432         (tdesc_add_enum_value): Likewise.
7433         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7434         (struct tdesc_type_vector): Likewise.
7435         (struct tdesc_type_field): Likewise.
7436         (struct tdesc_type_with_fields): Likewise.
7437         (tdesc_create_enum): Add declaration.
7438         (tdesc_add_typed_bitfield): Likewise.
7439         (tdesc_add_enum_value): Likewise.
7440         * target-descriptions.c (tdesc_type_field): Move from here.
7441         (tdesc_type_builtin): Likewise.
7442         (tdesc_type_vector): Likewise.
7443         (tdesc_type_with_fields): Likewise.
7444         (tdesc_predefined_types): Likewise.
7445         (tdesc_named_type): Likewise.
7446         (tdesc_create_vector): Likewise.
7447         (tdesc_create_struct): Likewise.
7448         (tdesc_set_struct_size): Likewise.
7449         (tdesc_create_union): Likewise.
7450         (tdesc_create_flags): Likewise.
7451         (tdesc_create_enum): Likewise.
7452         (tdesc_add_field): Likewise.
7453         (tdesc_add_typed_bitfield): Likewise.
7454         (tdesc_add_bitfield): Likewise.
7455         (tdesc_add_flag): Likewise.
7456         (tdesc_add_enum_value): Likewise.
7457         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7458         (tdesc_add_typed_bitfield): Likewise.
7459         (tdesc_add_enum_value): Likewise.
7460
7461 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7462
7463         * common/tdesc.c (tdesc_feature::accept): Move to here.
7464         (tdesc_feature::operator==): Likewise.
7465         (tdesc_create_reg): Likewise.
7466         * common/tdesc.h (tdesc_type_kind): Likewise.
7467         (struct tdesc_type): Likewise.
7468         (struct tdesc_feature): Likewise.
7469         * regformats/regdat.sh: Create a feature.
7470         * target-descriptions.c (tdesc_type_kind): Move from here.
7471         (tdesc_type): Likewise.
7472         (tdesc_type_up): Likewise.
7473         (tdesc_feature): Likewise.
7474         (tdesc_create_reg): Likewise.
7475
7476 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7477
7478         * Makefile.in: Add arch/tdesc.c
7479         * common/tdesc.c: New file.
7480         * common/tdesc.h (tdesc_element_visitor): Move to here.
7481         (tdesc_element): Likewise.
7482         (tdesc_reg): Likewise.
7483         (tdesc_reg_up): Likewise.
7484         * regformats/regdef.h (reg): Add offset to constructors.
7485         * target-descriptions.c (tdesc_element_visitor): Move from here.
7486         (tdesc_element): Likewise.
7487         (tdesc_reg): Likewise.
7488         (tdesc_reg_up): Likewise.
7489
7490 2018-04-17  Tom Tromey  <tom@tromey.com>
7491
7492         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7493         discriminant field.
7494
7495 2018-04-17  Tom Tromey  <tom@tromey.com>
7496
7497         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7498
7499 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7500
7501         * symtab.c (print_symbol_info): Skip printing filename and line
7502         number when `last' is NULL.
7503         (symtab_symbol_info): Use empty string instead of NULL for first
7504         invocation of print_symbol_info.
7505         (rbreak_command): Pass NULL to `last' parameter of
7506         print_symbol_info.
7507
7508 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
7509
7510         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7511         instead of nullptr.
7512
7513 2018-04-16  Pedro Alves  <palves@redhat.com>
7514
7515         * MAINTAINERS (sh): Remove.
7516         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7517         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7518         (ALLDEPFILES): Remove sh64-tdep.c.
7519         * NEWS: Mentions that support for SH-5/SH64 is removed.
7520         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7521         (sh*-*-openbsd*): Ditto.
7522         (sh64-*-elf*): Remove.
7523         (sh*): Remove.
7524         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7525         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7526         * sh-tdep.c: No longer include "sh64-tdep.h".
7527         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7528         * sh64-tdep.c, sh64-tdep.h: Remove files.
7529
7530 2018-04-16  Pedro Alves  <palves@redhat.com>
7531
7532         * MAINTAINERS: Remove m88k.
7533         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7534         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7535         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7536         * NEWS: Mention that support for m88k was removed.
7537         * configure.host (m88*-*-*): Remove support.
7538         * configure.nat (m88k-*-*): Remove support.
7539         * configure.tgt (m88*-*-openbsd*): Remove.
7540         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7541
7542 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
7543
7544         * configure.tgt (x86_tobjs): New variable.
7545         (amd64_tobjs, i386_tobjs): Use it.
7546
7547 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7548
7549         * symtab.c (print_symbol_info): Precede the symbol definition by
7550         the line number when available.
7551         * NEWS: Advertise this enhancement.
7552
7553 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7554
7555         * NEWS (New options): announce set/show record btrace cpu.
7556         * btrace.c: Include record-btrace.h.
7557         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7558         the vendor is unknown.
7559         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7560         Maybe overwrite the btrace configuration's cpu.
7561         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7562         (btrace_fetch): Add cpu parameter.  Update callers.
7563         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7564         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7565         errata workarounds if the vendor is unknown.
7566         * python/py-record-btrace.c: Include record-btrace.h.
7567         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7568         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7569         * record-btrace.c (record_btrace_cpu_state_kind): New.
7570         (record_btrace_cpu): New.
7571         (set_record_btrace_cpu_cmdlist): New.
7572         (record_btrace_get_cpu): New.
7573         (require_btrace_thread, record_btrace_info)
7574         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7575         (cmd_set_record_btrace_cpu_none): New.
7576         (cmd_set_record_btrace_cpu_auto): New.
7577         (cmd_set_record_btrace_cpu): New.
7578         (cmd_show_record_btrace_cpu): New.
7579         (_initialize_record_btrace): Initialize set/show record btrace cpu
7580         commands.
7581         * record-btrace.h (record_btrace_get_cpu): New.
7582
7583 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7584
7585         * record.c (set_record_command): Fix typo in message.
7586
7587 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7588
7589         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7590
7591 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7592
7593         * infrun.c (process_event_stop_test): Call
7594         gdbarch_in_indirect_branch_thunk.
7595         * gdbarch.sh (in_indirect_branch_thunk): New.
7596         * gdbarch.c: Regenerated.
7597         * gdbarch.h: Regenerated.
7598         * x86-tdep.h: New.
7599         * x86-tdep.c: New.
7600         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7601         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7602         (ALLDEPFILES): Add x86-tdep.c.
7603         * arch-utils.h (default_in_indirect_branch_thunk): New.
7604         * arch-utils.c (default_in_indirect_branch_thunk): New.
7605         * i386-tdep: Include x86-tdep.h.
7606         (i386_in_indirect_branch_thunk): New.
7607         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7608         function.
7609         * amd64-tdep: Include x86-tdep.h.
7610         (amd64_in_indirect_branch_thunk): New.
7611         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7612
7613 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7614
7615         PR gdb/23053
7616         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7617         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7618         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7619         regression.
7620
7621 2018-04-12  Tom Tromey  <tom@tromey.com>
7622
7623         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7624         (rust_evaluate_subexp): Likewise.
7625
7626 2018-04-12  Pedro Alves  <palves@redhat.com>
7627
7628         * procfs.c (procfs_detach): Make forward declaration's prototype
7629         match definition's protototype.
7630         (proc_get_LDT_entry): Remove stale do_cleanups call.
7631
7632 2018-04-12  Pedro Alves  <palves@redhat.com>
7633
7634         * target.h (target_ops::to_has_exited): Delete.
7635         (target_has_exited): Delete.
7636         * target-delegates.c: Regenerate.
7637
7638 2018-04-11  Pedro Alves  <palves@redhat.com>
7639
7640         * target.c (fileio_fh_t::t): Add comment.
7641         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7642         (target_fileio_close): Handle a NULL target.
7643         (invalidate_fileio_fh): New.
7644         (target_close): Call it.
7645         * remote.c (remote_hostio_send_command): No longer check whether
7646         remote_desc is open.
7647
7648 2018-04-11  Pedro Alves  <palves@redhat.com>
7649
7650         * target.c (fileio_fh_t): Make it a named struct instead of a
7651         typedef.
7652         (fileio_fh_t::is_closed): New method.
7653         (DEF_VEC_O (fileio_fh_t)): Remove.
7654         (fileio_fhandles): Now a std::vector.
7655         (is_closed_fileio_fh): Delete.
7656         (acquire_fileio_fd): Adjust.  Rename parameters.
7657         (release_fileio_fd): Adjust.
7658         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7659         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7660         (target_fileio_close): Adjust.
7661
7662 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7663
7664         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7665         index.
7666
7667 2018-04-10  Pedro Alves  <palves@redhat.com>
7668
7669         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7670         (scoped_finish_thread_state): New class.
7671         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7672         cleanup.
7673         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7674         (fetch_inferior_event, normal_stop): Likewise.
7675         * thread.c (finish_thread_state_cleanup): Delete.
7676
7677 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7678             Pedro Alves  <palves@redhat.com>
7679
7680         * value.c: Include "selftest.h" and "common/array-view.h".
7681         (struct range) <operator ==>: New.
7682         (test_ranges_contain): New.
7683         (check_ranges_vector): New.
7684         (test_insert_into_bit_range_vector): New.
7685         (_initialize_values): Register selftests.
7686         * common/array-view.h (operator==, operator!=): New.
7687
7688 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7689
7690         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7691         an iterator.
7692         * inline-frame.c: Include <algorithm>.
7693         (struct inline_state): Add constructor.
7694         (inline_state_s): Remove.
7695         (DEF_VEC_O(inline_state_s)): Remove.
7696         (inline_states): Change type to std::vector.
7697         (find_inline_frame_state): Adjust to std::vector.
7698         (allocate_inline_frame_state): Remove.
7699         (clear_inline_frame_state): Adjust to std::vector.
7700         (skip_inline_frames): Adjust to std::vector.
7701
7702 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7703
7704         * tracepoint.h (struct trace_state_variable): Add constructor.
7705         <name>: Change type to std::string.
7706         * tracepoint.c (tsv_s): Remove.
7707         (DEF_VEC_O(tsv_s)): Remove.
7708         (tvariables): Change to std::vector.
7709         (create_trace_state_variable): Adjust to std::vector.
7710         (find_trace_state_variable): Likewise.
7711         (find_trace_state_variable_by_number): Likewise.
7712         (delete_trace_state_variable): Likewise.
7713         (trace_variable_command): Adjust to std::string.
7714         (delete_trace_variable_command): Likewise.
7715         (tvariables_info_1): Adjust to std::vector.
7716         (save_trace_state_variables): Likewise.
7717         (start_tracing): Likewise.
7718         (merge_uploaded_trace_state_variables): Adjust to std::vector
7719         and std::string.
7720         * target.h (struct target_ops)
7721         <to_download_trace_state_variable>: Pass reference to
7722         trace_state_variable.
7723         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7724         * target-delegates.c: Re-generate.
7725         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7726         (mi_tsv_deleted): Likewise.
7727         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7728         * remote.c (remote_download_trace_state_variable): Change
7729         pointer to reference and adjust.
7730         * make-target-delegates (parse_argtypes): Handle references.
7731         (write_function_header): Likewise.
7732         (munge_type): Likewise.
7733
7734 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7735
7736         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7737         string_view-selftests.c.
7738         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7739         testsuite.
7740         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7741         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7742         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7743         * unittests/basic_string_view/element_access/char/1.cc:
7744         Likewise.
7745         * unittests/basic_string_view/element_access/char/empty.cc:
7746         Likewise.
7747         * unittests/basic_string_view/element_access/char/front_back.cc:
7748         Likewise.
7749         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7750         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7751         Likewise.
7752         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7753         Likewise.
7754         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7755         Likewise.
7756         * unittests/basic_string_view/operations/compare/char/1.cc:
7757         Likewise.
7758         * unittests/basic_string_view/operations/compare/char/13650.cc:
7759         Likewise.
7760         * unittests/basic_string_view/operations/copy/char/1.cc:
7761         Likewise.
7762         * unittests/basic_string_view/operations/data/char/1.cc:
7763         Likewise.
7764         * unittests/basic_string_view/operations/find/char/1.cc:
7765         Likewise.
7766         * unittests/basic_string_view/operations/find/char/2.cc:
7767         Likewise.
7768         * unittests/basic_string_view/operations/find/char/3.cc:
7769         Likewise.
7770         * unittests/basic_string_view/operations/find/char/4.cc:
7771         Likewise.
7772         * unittests/basic_string_view/operations/rfind/char/1.cc:
7773         Likewise.
7774         * unittests/basic_string_view/operations/rfind/char/2.cc:
7775         Likewise.
7776         * unittests/basic_string_view/operations/rfind/char/3.cc:
7777         Likewise.
7778         * unittests/basic_string_view/operations/substr/char/1.cc:
7779         Likewise.
7780         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7781         * unittests/string_view-selftests.c: New file.
7782
7783 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7784
7785         * unittests/basic_string_view/capacity/1.cc: New file.
7786         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7787         * unittests/basic_string_view/cons/char/1.cc: New file.
7788         * unittests/basic_string_view/cons/char/2.cc: New file.
7789         * unittests/basic_string_view/cons/char/3.cc: New file.
7790         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7791         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7792         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7793         * unittests/basic_string_view/element_access/char/1.cc: New file.
7794         * unittests/basic_string_view/element_access/char/2.cc: New file.
7795         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7796         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7797         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7798         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7799         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7800         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7801         * unittests/basic_string_view/include.cc: New file.
7802         * unittests/basic_string_view/inserters/char/1.cc: New file.
7803         * unittests/basic_string_view/inserters/char/2.cc: New file.
7804         * unittests/basic_string_view/inserters/char/3.cc: New file.
7805         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7806         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7807         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7808         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7809         * unittests/basic_string_view/literals/types.cc: New file.
7810         * unittests/basic_string_view/literals/values.cc: New file.
7811         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7812         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7813         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7814         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7815         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7816         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7817         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7818         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7819         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7820         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7821         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7822         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7823         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7824         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7825         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7826         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7827         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7828         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7829         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7830         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7831         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7832         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7833         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7834         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7835         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7836         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7837         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7838         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7839         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7840         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7841         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7842         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7843         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7844         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7845         * unittests/basic_string_view/operators/char/2.cc: New file.
7846         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7847         * unittests/basic_string_view/range_access/char/1.cc: New file.
7848         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7849         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7850         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7851         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7852         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7853         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7854         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7855         * unittests/basic_string_view/typedefs.cc: New file.
7856         * unittests/basic_string_view/types/1.cc: New file.
7857
7858 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7859
7860         * common/gdb_string_view.h: Remove libstdc++ implementation
7861         details, adjust to gdb reality.
7862         * common/gdb_string_view.tcc: Likewise.
7863         * cli/cli-script.c (struct string_view): Remove.
7864         (user_args) <m_args>: Change element type to gdb::string_view.
7865         (user_args::insert_args): Adjust.
7866
7867 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7868
7869         * common/gdb_string_view.h: New file.
7870         * common/gdb_string_view.tcc: New file.
7871
7872 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7873
7874         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7875         * configure: Re-generate.
7876
7877 2018-04-09  Pedro Alves  <palves@redhat.com>
7878
7879         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7880         (set_target_gdbarch): Call
7881         gdb::observers::architecture_changed.notify instead of
7882         observer_notify_architecture_changed.
7883
7884 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7885
7886         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7887         (do_restore_current_traceframe_cleanup): Remove.
7888         (restore_current_traceframe_cleanup_dtor): Remove.
7889         (make_cleanup_restore_current_traceframe): Remove.
7890         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7891         New.
7892         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7893         * infrun.c (fetch_inferior_event): Use
7894         scoped_restore_current_traceframe.
7895
7896 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7897
7898         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7899         Remove.
7900         <n_allocated_type_units>: Remove.
7901         <all_type_units>: Change to std::vector.
7902         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7903         to std::vector change.
7904         (dwarf2_per_objfile::get_cutu): Likewise.
7905         (dwarf2_per_objfile::get_tu): Likewise.
7906         (create_signatured_type_table_from_index): Likewise.
7907         (create_signatured_type_table_from_debug_names): Likewise.
7908         (dw2_symtab_iter_next): Likewise.
7909         (dw2_print_stats): Likewise.
7910         (dw2_expand_all_symtabs): Likewise.
7911         (dw2_expand_marked_cus): Likewise.
7912         (dw2_debug_names_iterator::next): Likewise.
7913         (dwarf2_initialize_objfile): Likewise.
7914         (add_signatured_type_cu_to_table): Likewise.
7915         (create_all_type_units): Likewise.
7916         (add_type_unit): Likewise.
7917         (struct tu_abbrev_offset): Add constructor.
7918         (build_type_psymtabs_1): Adjust to std::vector change.
7919         (print_tu_stats): Likewise.
7920         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7921         (write_debug_names): Likewise.
7922
7923 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7924
7925         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7926         Make an std::vector.
7927         <n_comp_units>: Remove.
7928         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7929         to std::vector change.
7930         (dwarf2_per_objfile::get_cutu): Likewise.
7931         (dwarf2_per_objfile::get_cu): Likewise.
7932         (create_cus_from_index): Likewise.
7933         (create_addrmap_from_index): Likewise.
7934         (create_addrmap_from_aranges): Likewise.
7935         (dwarf2_read_index): Likewise.
7936         (dw2_find_last_source_symtab): Likewise.
7937         (dw2_map_symtabs_matching_filename): Likewise.
7938         (dw2_symtab_iter_next): Likewise.
7939         (dw2_print_stats): Likewise.
7940         (dw2_expand_all_symtabs): Likewise.
7941         (dw2_expand_symtabs_with_fullname): Likewise.
7942         (dw2_expand_marked_cus): Likewise.
7943         (dw2_map_symbol_filenames): Likewise.
7944         (create_cus_from_debug_names): Likewise.
7945         (dwarf2_read_debug_names): Likewise.
7946         (dw2_debug_names_iterator::next): Likewise.
7947         (dwarf2_initialize_objfile): Likewise.
7948         (set_partial_user): Likewise.
7949         (dwarf2_build_psymtabs_hard): Likewise.
7950         (read_comp_units_from_section): Remove arguments, adjust to
7951         std::vector change.
7952         (create_all_comp_units): Adjust to std::vector and
7953         read_comp_units_from_section changes.
7954         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7955         change.
7956         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7957         (psyms_seen_size): Likewise.
7958         (write_gdbindex): Likewise.
7959         (write_debug_names): Likewise.
7960
7961 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7962
7963         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7964         with dwarf2_per_objfile.
7965         (create_cus_from_index): Likewise.
7966         (create_signatured_type_table_from_index): Likewise.
7967         (dwarf2_read_index): Likewise.
7968         (dwarf2_initialize_objfile): Likewise.
7969         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7970         per_cu rather than get_dwarf2_per_objfile.
7971
7972 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7973
7974         * dwarf2read.h (struct signatured_type): Forward declare.
7975         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7976         New methods.
7977         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7978         (dw2_get_cutu): ...this.
7979         (dwarf2_per_objfile::get_cu): Rename from...
7980         (dw2_get_cu): ...this.
7981         (dwarf2_per_objfile::get_tu): New.
7982         (create_addrmap_from_index): Adjust.
7983         (create_addrmap_from_aranges): Adjust.
7984         (dw2_find_last_source_symtab): Adjust.
7985         (dw2_map_symtabs_matching_filename): Adjust.
7986         (dw2_symtab_iter_next): Adjust.
7987         (dw2_print_stats): Adjust.
7988         (dw2_expand_all_symtabs): Adjust.
7989         (dw2_expand_symtabs_with_fullname): Adjust.
7990         (dw2_expand_marked_cus): Adjust.
7991         (dw_expand_symtabs_matching_file_matcher): Adjust.
7992         (dw2_map_symbol_filenames): Adjust.
7993         (dw2_debug_names_iterator::next): Adjust.
7994         (dwarf2_initialize_objfile): Adjust.
7995         (set_partial_user): Adjust.
7996         (dwarf2_build_psymtabs_hard): Adjust.
7997
7998 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7999
8000         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8001         Remove unused variables.
8002         (dw2_map_symtabs_matching_filename): Likewise.
8003         (dwarf2_record_block_ranges): Likewise.
8004         (dwarf2_read_addr_index): Likewise.
8005         (follow_die_offset): Likewise.
8006
8007 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8008
8009         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8010         to symbol_file_add_main.
8011
8012 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8013
8014         PR mi/22299
8015         * mi/mi-console.c (do_fputc_async_safe): New.
8016         (mi_console_file::write_async_safe): New.
8017         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8018         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8019         New.
8020         * ui-file.c (ui_file::putstrn): Adjust call to
8021         fputstrn_unfiltered.
8022         * utils.c (printchar): Replace do_fputs and do_fprintf
8023         parameters by do_fputc.
8024         (fputstr_filtered): Adjust call to printchar.
8025         (fputstr_unfiltered): Likewise.
8026         (fputstrn_filtered): Likewise.
8027         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8028         printchar.
8029         * utils.h (do_fputc_ftype): New typedef.
8030         (fputstrn_unfiltered): Add do_fputc parameter.
8031
8032 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8033
8034         * regformats/i386/i386-avx.dat: Remove.
8035
8036 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8037
8038         PR gdb/22979
8039         * amd64-tdep.c (amd64_none_init_abi): New function.
8040         (amd64_x32_none_init_abi): New function.
8041         (_initialize_amd64_tdep): Register handlers for x86-64 and
8042         x64_32 with GDB_OSABI_NONE.
8043         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8044         GDB_OSABI_NONE osabi.
8045
8046 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8047
8048         PR gdb/22980
8049         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8050         GDB_OSABI_NONE.
8051         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8052         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8053
8054 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8055
8056         * common/byte-vector.h (char_vector): New type.
8057         * target.h (target_read_alloc): Return
8058         gdb::optional<byte_vector>.
8059         (target_read_stralloc): Return gdb::optional<char_vector>.
8060         (target_get_osdata): Return gdb::optional<char_vector>.
8061         * target.c (target_read_alloc_1): Templatize.  Replacement
8062         manual memory management with vector.
8063         (target_read_alloc): Change return type, adjust.
8064         (target_read_stralloc): Change return type, adjust.
8065         (target_get_osdata): Change return type, adjust.
8066         * auxv.c (struct auxv_info) <length>: Remove.
8067         <data>: Change type to gdb::optional<byte_vector>.
8068         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8069         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8070         (target_auxv_search): Adjust.
8071         (fprint_target_auxv): Adjust.
8072         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8073         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8074         (linux_make_corefile_notes): Adjust.
8075         * osdata.c (get_osdata): Adjust.
8076         * remote.c (remote_get_threads_with_qxfer): Adjust.
8077         (remote_memory_map): Adjust.
8078         (remote_traceframe_info): Adjust.
8079         (btrace_read_config): Adjust.
8080         (remote_read_btrace): Adjust.
8081         (remote_pid_to_exec_file): Adjust.
8082         * solib-aix.c (solib_aix_get_library_list): Adjust.
8083         * solib-dsbt.c (decode_loadmap): Don't free buf.
8084         (dsbt_get_initial_loadmaps): Adjust.
8085         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8086         * solib-target.c (solib_target_current_sos): Adjust.
8087         * tracepoint.c (sdata_make_value): Adjust.
8088         * xml-support.c (xinclude_start_include): Adjust.
8089         (xml_fetch_content_from_file): Adjust.
8090         * xml-support.h (xml_fetch_another): Change return type.
8091         (xml_fetch_content_from_file): Change return type.
8092         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8093         * xml-tdesc.c (file_read_description_xml): Adjust.
8094         (fetch_available_features_from_target): Change return type.
8095         (target_fetch_description_xml): Adjust.
8096         (target_read_description_xml): Adjust.
8097
8098 2018-04-06  Tom Tromey  <tom@tromey.com>
8099
8100         * value.c (~value): Update.
8101         (struct value) <contents>: Now unique_xmalloc_ptr.
8102         (value_contents_bits_eq, allocate_value_contents)
8103         (value_contents_raw, value_contents_all_raw)
8104         (value_contents_for_printing, value_contents_for_printing_const)
8105         (set_value_enclosing_type): Update.
8106
8107 2018-04-06  Tom Tromey  <tom@tromey.com>
8108
8109         * value.c (range_s): Remove typedef, VEC.
8110         (struct range): Add operator<.
8111         (range_lessthan): Remove.
8112         (ranges_contain): Change type.
8113         (~value): Update.
8114         (struct value) <unavailable, optimized_out>: Now std::vector.
8115         (value_entirely_available)
8116         (value_entirely_covered_by_range_vector)
8117         (value_entirely_unavailable, value_entirely_optimized_out):
8118         Update.
8119         (insert_into_bit_range_vector): Change argument type.
8120         (find_first_range_overlap): Likewise.
8121         (struct ranges_and_idx, value_contents_bits_eq)
8122         (require_not_optimized_out, require_available): Update.
8123         (ranges_copy_adjusted): Change argument types.
8124         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8125
8126 2018-04-06  Tom Tromey  <tom@tromey.com>
8127
8128         * value.c (~value): Update.
8129         (struct value) <parent>: Now a value_ref_ptr.
8130         (value_parent, set_value_parent, value_address, value_copy):
8131         Update.
8132
8133 2018-04-06  Tom Tromey  <tom@tromey.com>
8134
8135         * value.c (struct value): Add constructor, destructor, and member
8136         initializers.
8137         (allocate_value_lazy, value_decref): Update.
8138
8139 2018-04-06  Tom Tromey  <tom@tromey.com>
8140
8141         * value.c (struct value) <released, next>: Remove.
8142         (all_values): Now a std::vector.
8143         (allocate_value_lazy): Update.
8144         (value_next): Remove.
8145         (value_mark, value_free_to_mark, release_value)
8146         (value_release_to_mark): Update.
8147
8148 2018-04-06  Tom Tromey  <tom@tromey.com>
8149
8150         * value.h (fetch_subexp_value, value_release_to_mark): Update.
8151         (free_value_chain): Remove.
8152         * value.c (free_value_chain): Remove.
8153         (value_release_to_mark): Return a std::vector.
8154         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8155         std::vector.
8156         (check_condition): Update.
8157         * eval.c (fetch_subexp_value): Change "val_chain" to a
8158         std::vector.
8159         * breakpoint.c (update_watchpoint): Update.
8160         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8161
8162 2018-04-06  Tom Tromey  <tom@tromey.com>
8163
8164         * value.h (free_all_values): Remove.
8165         * value.c (free_all_values): Remove.
8166
8167 2018-04-06  Tom Tromey  <tom@tromey.com>
8168
8169         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8170         (value_history_chain, value_history_count): Remove.
8171         (value_history): New global.
8172         (record_latest_value, access_value_history, show_values)
8173         (preserve_values): Update.
8174
8175 2018-04-06  Tom Tromey  <tom@tromey.com>
8176
8177         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8178         * varobj.c (varobj_set_display_format, varobj_set_value)
8179         (install_default_visualizer, construct_visualizer)
8180         (install_new_value, ~varobj, varobj_get_value_type)
8181         (my_value_of_variable, varobj_editable_p): Update.
8182         * c-varobj.c (c_describe_child, c_value_of_variable)
8183         (cplus_number_of_children, cplus_describe_child): Update.
8184         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8185         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8186         (ada_value_of_variable, ada_value_is_changeable_p): Update.
8187
8188 2018-04-06  Tom Tromey  <tom@tromey.com>
8189
8190         * printcmd.c (last_examine_address): Change type to
8191         value_ref_ptr.
8192         (do_examine, x_command): Update.
8193
8194 2018-04-06  Tom Tromey  <tom@tromey.com>
8195
8196         * value.c (release_value): Update.
8197         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8198         (struct bpstats) <val>: Now a value_ref_ptr.
8199         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8200         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8201         (~watchpoint, print_it_watchpoint, watch_command_1)
8202         (invalidate_bp_value_on_memory_change): Update.
8203
8204 2018-04-06  Tom Tromey  <tom@tromey.com>
8205
8206         * varobj.c (varobj_clear_saved_item)
8207         (update_dynamic_varobj_children, install_new_value, ~varobj):
8208         Update.
8209         * value.h (value_incref): Move declaration earlier.
8210         (value_decref): Rename from value_free.
8211         (struct value_ref_policy): New.
8212         (value_ref_ptr): New typedef.
8213         (struct value_deleter): Remove.
8214         (gdb_value_up): Remove typedef.
8215         (release_value): Change return type.
8216         (release_value_or_incref): Remove.
8217         * value.c (set_value_parent): Update.
8218         (value_incref): Change return type.
8219         (value_decref): Rename from value_free.
8220         (value_free_to_mark, free_all_values, free_value_chain): Update.
8221         (release_value): Return value_ref_ptr.
8222         (release_value_or_incref): Remove.
8223         (record_latest_value, set_internalvar, clear_internalvar):
8224         Update.
8225         * stack.c (info_frame_command): Don't call value_free.
8226         * python/py-value.c (valpy_dealloc, valpy_new)
8227         (value_to_value_object): Update.
8228         * printcmd.c (do_examine): Update.
8229         * opencl-lang.c (lval_func_free_closure): Update.
8230         * mi/mi-main.c (register_changed_p): Don't call value_free.
8231         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8232         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8233         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8234         value_free.
8235         * guile/scm-value.c (vlscm_free_value_smob)
8236         (vlscm_scm_from_value): Update.
8237         * frame.c (frame_register_unwind, frame_unwind_register_signed)
8238         (frame_unwind_register_unsigned, get_frame_register_bytes)
8239         (put_frame_register_bytes): Don't call value_free.
8240         * findvar.c (address_from_register): Don't call value_free.
8241         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8242         * dwarf2loc.c (entry_data_value_free_closure)
8243         (value_of_dwarf_reg_entry, free_pieced_value_closure)
8244         (dwarf2_evaluate_loc_desc_full): Update.
8245         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8246         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8247         (~watchpoint, watch_command_1)
8248         (invalidate_bp_value_on_memory_change): Update.
8249         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8250
8251 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
8252
8253         PR gdb/23022
8254         * warning.m4: Add -Wno-error=deprecated-register.
8255         * configure: Re-generate.
8256
8257 2018-04-05  Tom Tromey  <tom@tromey.com>
8258
8259         * linespec.h: Remove include of "vec.h".
8260
8261 2018-04-05  Tom Tromey  <tom@tromey.com>
8262
8263         * linespec.c (typep): Remove typedef.
8264         (find_methods, find_superclass_methods): Take a std::vector.
8265         (find_method): Use std::vector.
8266
8267 2018-04-05  Tom Tromey  <tom@tromey.com>
8268
8269         * utils.c (compare_strings): Remove.
8270         * utils.h (compare_strings): Remove.
8271         * objc-lang.h (find_imps): Update.
8272         * objc-lang.c (find_methods): Take a std::vector.
8273         (uniquify_strings, find_imps): Likewise.
8274         * linespec.c (find_methods): Take a std::vector.
8275         (decode_objc): Use std::vector.
8276         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8277         a std::vector.
8278         (find_method, find_function_symbols): Use std::vector.
8279
8280 2018-04-05  Tom Tromey  <tom@tromey.com>
8281
8282         * completer.c (completion_tracker::completion_tracker): Remove
8283         cast.
8284         (completion_tracker::discard_completions): Likewise.
8285         * breakpoint.c (ambiguous_names_p): Remove cast.
8286         * ada-lang.c (_initialize_ada_language): Remove cast.
8287         * utils.h (streq): Update.
8288         (streq_hash): Add new declaration.
8289         * utils.c (streq): Return bool.
8290         (streq_hash): New function.
8291
8292 2018-04-05  Tom Tromey  <tom@tromey.com>
8293
8294         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8295         Remove a string copy.
8296
8297 2018-04-05  Tom Tromey  <tom@tromey.com>
8298
8299         * linespec.c (filter_results): Use std::vector.
8300         (decode_line_2, decode_line_full): Update.
8301
8302 2018-04-05  Tom Tromey  <tom@tromey.com>
8303
8304         * linespec.c (canonical_to_fullform): Return std::string.
8305         (filter_results): Update.
8306         (struct decode_line_2_item): Add constructor.
8307         <fullform, displayform>: Now std::string.
8308         (decode_line_2_compare_items): Now a std::sort comparator.
8309         (decode_line_2): Update.
8310
8311 2018-04-05  Tom Tromey  <tom@tromey.com>
8312
8313         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8314         (unexpected_linespec_error): Update.
8315         (linespec_parse_basic, parse_linespec): Update.
8316
8317 2018-04-05  Tom Tromey  <tom@tromey.com>
8318
8319         * linespec.c (linespec_parse_basic): Reindent.
8320
8321 2018-04-05  Tom Tromey  <tom@tromey.com>
8322
8323         * minsyms.h (iterate_over_minimal_symbols): Update.
8324         * minsyms.c (iterate_over_minimal_symbols): Take a
8325         gdb::function_view.
8326         * linespec.c (struct collect_minsyms): Remove.
8327         (compare_msyms): Now a std::sort comparator.
8328         (add_minsym): Add parameters.
8329         (search_minsyms_for_name): Update.  Use std::vector.
8330
8331 2018-04-03  Tom Tromey  <tom@tromey.com>
8332
8333         * mipsread.c (read_alphacoff_dynamic_symtab): Use
8334         gdb::byte_vector.
8335
8336 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8337
8338         * MAINTAINERS (Write After Approval): Add Weimin Pan.
8339
8340 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8341
8342         PR gdb/16959
8343         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
8344         printing static type.
8345
8346 2018-04-01  Tom Tromey  <tom@tromey.com>
8347
8348         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8349         (rs6000_xfer_shared_libraries): Update.
8350
8351 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
8352
8353         * common/gdb_vecs.h (char_ptr): Remove.
8354         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8355
8356 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8357
8358         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8359         with std::vector.
8360         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8361
8362 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8363
8364         * tracepoint.h (struct uploaded_tp): Initialize fields.
8365         <actions, step_actions, cmd_strings>: Change type to
8366         std::vector<char *>.
8367         * tracepoint.c (get_uploaded_tp): Allocate with new.
8368         (free_uploaded_tps): Free with delete.
8369         (parse_tracepoint_definition): Adjust to std::vector change.
8370         * breakpoint.c (read_uploaded_action): Likewise.
8371         (create_tracepoint_from_upload): Likewise.
8372         * ctf.c (ctf_write_uploaded_tp): Likewise.
8373         (SET_ARRAY_FIELD): Likewise.
8374         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8375
8376 2018-03-30  Tom Tromey  <tom@tromey.com>
8377
8378         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
8379         std::unique_ptr.
8380         (svr4_keep_data_in_core): Update.
8381         (svr4_read_so_list): Update.
8382
8383 2018-03-30  Tom Tromey  <tom@tromey.com>
8384
8385         * windows-nat.c (handle_output_debug_string, handle_exception):
8386         Update.
8387         * target.h (target_read_string): Update.
8388         * target.c (target_read_string): Change "string" to
8389         unique_xmalloc_ptr.
8390         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8391         Update.
8392         * solib-frv.c (frv_current_sos): Update.
8393         * solib-dsbt.c (dsbt_current_sos): Update.
8394         * solib-darwin.c (darwin_current_sos): Update.
8395         * linux-thread-db.c (inferior_has_bug): Update.
8396         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8397         Update.  Remove alloca.
8398         * ada-lang.c (ada_main_name): Update.
8399
8400 2018-03-30  Tom Tromey  <tom@tromey.com>
8401
8402         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8403         (struct dwo_file_deleter): New.
8404         (dwo_file_up): New typedef.
8405         (open_and_init_dwo_file): Use dwo_file_up.
8406         (free_dwo_file_cleanup): Remove.
8407
8408 2018-03-30  Tom Tromey  <tom@tromey.com>
8409
8410         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8411         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8412
8413 2018-03-30  Tom Tromey  <tom@tromey.com>
8414
8415         * dwarf2read.c (class free_cached_comp_units): New class.
8416         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8417         (free_cached_comp_units): Remove function.
8418
8419 2018-03-30  Tom Tromey  <tom@tromey.com>
8420
8421         * utils.h (make_cleanup_unpush_target): Remove.
8422         * inf-ptrace.c (struct target_unpusher): New.
8423         (target_unpush_up) New typedef.
8424         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8425         target_unpush_up.
8426         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8427
8428 2018-03-27  Tom Tromey  <tom@tromey.com>
8429
8430         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8431
8432 2018-03-27  Pedro Alves  <palves@redhat.com>
8433             Tom Tromey  <tom@tromey.com>
8434
8435         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8436         destructor.  Now a class.
8437         (gdb_readline_wrapper_cleanup): Remove function.
8438         (gdb_readline_wrapper): Remove cleanups.
8439
8440 2018-03-27  Tom Tromey  <tom@tromey.com>
8441
8442         * typeprint.h (struct type_print_options) <local_typedefs,
8443         global_typedefs>: Remove "struct" keyword.
8444         (class typedef_hash_table): New class.
8445         (recursively_update_typedef_hash, add_template_parameters)
8446         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8447         (find_typedef_in_hash): Don't declare.
8448         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8449         (typedef_hash_table::recursively_update): Rename from
8450         recursively_update_typedef_hash.  Now a member.
8451         (typedef_hash_table::add_template_parameters): Rename from
8452         add_template_parameters.  Now a member.
8453         (typedef_hash_table::typedef_hash_table): Now a constructor;
8454         rename from create_typedef_hash.
8455         (typedef_hash_table::~typedef_hash_table): Now a destructor;
8456         rename from free_typedef_hash.
8457         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8458         (do_free_global_table): Remove.
8459         (typedef_hash_table::typedef_hash_table): New constructor; renamed
8460         from copy_type_recursive.
8461         (create_global_typedef_table): Remove.
8462         (typedef_hash_table::find_global_typedef): Now a member of
8463         typedef_hash_table.
8464         (typedef_hash_table::find_typedef): Rename from
8465         find_typedef_in_hash; now a member.
8466         (whatis_exp): Update.
8467         * extension.h (struct ext_lang_type_printers): Add constructor and
8468         destructor.
8469         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8470         declare.
8471         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8472         Now a constructor; rename from start_ext_lang_type_printers.
8473         (ext_lang_type_printers): Now a destructor; rename from
8474         free_ext_lang_type_printers.
8475         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8476         Update.
8477         (c_type_print_base_struct_union): Update.  Remove cleanups.
8478
8479 2018-03-27  Tom Tromey  <tom@tromey.com>
8480
8481         * dwarf-index-write.c: Include <cmath>.
8482
8483 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8484
8485         * NEWS: Add entry describing new "set|show varsize-limit" command.
8486         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8487         command.
8488         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8489         "set variable".
8490
8491 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
8492
8493         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8494         dwarf-index-write.c
8495         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8496         * dwarf-index-common.c: New file.
8497         * dwarf-index-common.h: New file.
8498         * dwarf-index-write.c: New file.
8499         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8500         (struct dwarf2_section_info): Move from here.
8501         (dwarf2_section_info_def): Likewise.
8502         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8503         (offset_type): Likewise.
8504         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8505         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8506         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8507         (byte_swap): Likewise.
8508         (MAYBE_SWAP): Likewise.
8509         (dwarf2_per_cu_ptr): Likewise.
8510         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8511         (struct tu_stats): Likewise.
8512         (struct dwarf2_per_objfile): Likewise.
8513         (struct dwarf2_per_cu_data): Likewise.
8514         (struct signatured_type): Likewise.
8515         (sig_type_ptr): Likewise.
8516         (DEF_VEC_P (sig_type_ptr)): Likewise.
8517         (INDEX4_SUFFIX): Likewise.
8518         (INDEX5_SUFFIX): Likewise.
8519         (DEBUG_STR_SUFFIX): Likewise.
8520         (dwarf2_read_section): Make non-static.
8521         (mapped_index_string_hash): Move from here.
8522         (dwarf5_djb_hash): Likewise.
8523         (file_write): Likewise.
8524         (class data_buf): Likewise.
8525         (struct symtab_index_entry): Likewise.
8526         (struct mapped_symtab): Likewise.
8527         (find_slot): Likewise.
8528         (hash_expand): Likewise.
8529         (add_index_entry): Likewise.
8530         (uniquify_cu_indices): Likewise.
8531         (class c_str_view): Likewise.
8532         (class c_str_view_hasher): Likewise.
8533         (class vector_hasher): Likewise.
8534         (write_hash_table): Likewise.
8535         (psym_index_map): Likewise.
8536         (struct addrmap_index_data): Likewise.
8537         (add_address_entry): Likewise.
8538         (add_address_entry_worker): Likewise.
8539         (write_address_map): Likewise.
8540         (symbol_kind): Likewise.
8541         (write_psymbols): Likewise.
8542         (struct signatured_type_index_data): Likewise.
8543         (write_one_signatured_type): Likewise.
8544         (recursively_count_psymbols): Likewise.
8545         (recursively_write_psymbols): Likewise.
8546         (class debug_names): Likewise.
8547         (check_dwarf64_offsets): Likewise.
8548         (psyms_seen_size): Likewise.
8549         (write_gdbindex): Likewise.
8550         (write_debug_names): Likewise.
8551         (assert_file_size): Likewise.
8552         (write_psymtabs_to_index): Likewise.
8553         (save_gdb_index_command): Likewise.
8554         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8555         command.
8556         * dwarf2read.h: New file.
8557
8558 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8559
8560         PR gdb/22670
8561         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8562         symbol name if the CU's language stores symbol names in linkage
8563         format.
8564         * language.h (struct language_defn)
8565         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8566         all instances of this struct.
8567
8568 2018-03-26  Tom Tromey  <tom@tromey.com>
8569
8570         * stack.c (backtrace_command_1): Remove verbose code.
8571
8572 2018-03-26  Tom Tromey  <tom@tromey.com>
8573
8574         * python/py-framefilter.c (py_print_type): Don't catch
8575         exceptions.  Return void.
8576         (py_print_value): Likewise.
8577         (py_print_single_arg): Likewise.
8578         (enumerate_args): Don't catch exceptions.
8579         (py_print_args): Likewise.
8580         (py_print_frame): Likewise.
8581         (gdbpy_apply_frame_filter): Catch exceptions here.
8582
8583 2018-03-26  Tom Tromey  <tom@tromey.com>
8584
8585         * stack.c (_initialize_stack): Remove trailing newlines from help
8586         text.  Add "Usage" line to "backtrace" help.
8587
8588 2018-03-26  Tom Tromey  <tom@tromey.com>
8589
8590         PR python/16486:
8591         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8592
8593 2018-03-26  Tom Tromey  <tom@tromey.com>
8594
8595         * python/py-framefilter.c (py_print_single_arg): Return
8596         EXT_LANG_BT_ERROR from catch.
8597
8598 2018-03-26  Tom Tromey  <tom@tromey.com>
8599
8600         PR backtrace/15584:
8601         * stack.c (backtrace_command_1): Move some code into no-filters
8602         "if".
8603
8604 2018-03-26  Tom Tromey  <tom@tromey.com>
8605
8606         * python/py-framefilter.c (throw_quit_or_print_exception): New
8607         function.
8608         (gdbpy_apply_frame_filter): Use it.
8609
8610 2018-03-26  Tom Tromey  <tom@tromey.com>
8611
8612         PR cli/17716:
8613         * python/py-framefilter.c (py_print_type, py_print_value)
8614         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8615         RETURN_MASK_ERROR.
8616
8617 2018-03-26  Tom Tromey  <tom@tromey.com>
8618
8619         * python/py-framefilter.c (enumerate_args): Use
8620         gdb::unique_xmalloc_ptr.
8621
8622 2018-03-26  Tom Tromey  <tom@tromey.com>
8623
8624         * python/py-framefilter.c (py_print_frame): Return
8625         EXT_LANG_BT_OK.
8626         (gdbpy_apply_frame_filter): Update comment.
8627         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8628         Remove.
8629         <EXT_LANG_BT_NO_FILTERS>: Change value.
8630
8631 2018-03-26  Tom Tromey  <tom@tromey.com>
8632
8633         PR backtrace/15582:
8634         * stack.c (backtrace_command): Parse "hide" argument.
8635         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8636         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8637         constant.
8638
8639 2018-03-26  Tom Tromey  <tom@tromey.com>
8640
8641         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8642         add "flags".
8643         (backtrace_command): Remove "fulltrace", add "flags".
8644
8645 2018-03-26  Tom Tromey  <tom@tromey.com>
8646
8647         * stack.c (backtrace_command): Rewrite command line parsing.
8648
8649 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8650
8651         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8652
8653 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8654
8655         * filename-seen-cache.h: Add include guard.
8656
8657 2018-03-26  Keith Seitz  <keiths@redhat.com>
8658
8659         * symfile.c (place_section): Remove "struct" from section_addr_info
8660         in comment.
8661         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8662         "struct" keyword from section_addr_info.
8663
8664 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8665
8666         * regformats/regdef.h (reg): Add constructors.
8667
8668 2018-03-25  Pedro Alves  <palves@redhat.com>
8669
8670         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8671         if then/else bodies in var_func_name extraction.
8672
8673 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8674
8675         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8676         lookup_minimal_symbol() to find symbol entry.
8677         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8678
8679 2018-03-23  Keith Seitz  <keiths@redhat.com>
8680
8681         PR c++/22968
8682         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8683         nested type definitions for C++, too.
8684
8685 2018-03-23  Tom Tromey  <tom@tromey.com>
8686
8687         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8688         a typedef.
8689         (macho_register_oso): Remove.
8690         (macho_symtab_read): Take a std::vector.
8691         (oso_el_compare_name): Now a std::sort comparator.
8692         (macho_symfile_read_all_oso): Take a std::vector.
8693         (macho_symfile_read): Use std::vector.  Remove cleanups.
8694
8695 2018-03-22  Tom Tromey  <tom@tromey.com>
8696
8697         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8698         (record_full_goto_bookmark): Use std::string.
8699
8700 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8701
8702         PR tdep/18295
8703         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8704         a single mask.
8705
8706 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8707
8708         * rs6000-tdep.c (store_insn_p): New function.
8709         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8710         and cr_reg to their unshifted values. Use store_insn_p to
8711         match LR saves using either R1 or fdata->alloca_reg. Use
8712         store_insn_p to match CR saves. Set alloca_reg_offset
8713         when alloca_reg and framep are set. Remove lr_reg shift
8714         when assigning to fdata->lr_register.
8715
8716 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8717
8718         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8719         command line args instead of emitting a warning.
8720
8721 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8722
8723         * tracepoint.h (struct static_tracepoint_marker): Initialize
8724         fields, define default constructor, move constructor and move
8725         assignment, disable the rest.
8726         <str_id, extra>: Make std::string.
8727         (release_static_tracepoint_marker): Remove.
8728         (free_current_marker): Remove.
8729         * tracepoint.c (free_current_marker): Remove.
8730         (parse_static_tracepoint_marker_definition): Adjust to
8731         std::string, use new hex2str overload.
8732         (release_static_tracepoint_marker): Remove.
8733         (print_one_static_tracepoint_marker): Get marker by reference
8734         and adjust to std::string.
8735         (info_static_tracepoint_markers_command): Adjust to std::vector
8736         changes
8737         * target.h (static_tracepoint_marker_p): Remove typedef.
8738         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8739         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8740         bool.
8741         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8742         * target-debug.h
8743         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8744         (target_debug_print_std_vector_static_tracepoint_marker): New.
8745         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8746         to...
8747         (target_debug_print_static_tracepoint_marker_p): ... this.
8748         * target-delegates.c: Re-generate.
8749         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8750         Make std::string.
8751         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8752         (decode_static_tracepoint_spec): Adjust to std::vector.
8753         (tracepoint_print_one_detail): Adjust to std::string.
8754         (strace_marker_decode_location): Adjust to std::string.
8755         (update_static_tracepoint): Adjust to std::string, remove call
8756         to release_static_tracepoint_marker.
8757         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8758         Adjust to std::vector.
8759         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8760         (remote_static_tracepoint_markers_by_strid): Adjust to
8761         std::vector.
8762         * common/rsp-low.h (hex2str): New overload with explicit count
8763         of bytes.
8764         * common/rsp-low.c (hex2str): New overload with explicit count
8765         of bytes.
8766         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8767         (_initialize_rsp_low_selftests): Add test_hex2str test.
8768         * unittests/tracepoint-selftests.c
8769         (test_parse_static_tracepoint_marker_definition): Adjust to
8770         std::string.
8771
8772 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8773
8774         * tracepoint.c (parse_static_tracepoint_marker_definition):
8775         Consider case where the definition is followed by more
8776         definitions.
8777         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8778         tracepoint-selftests.c.
8779         * unittests/tracepoint-selftests.c: New.
8780
8781 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8782
8783         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8784         Carvalho.
8785
8786 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8787
8788         * symtab.c (find_pc_sect_line): fixed indentation.
8789
8790 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8791
8792         * symtab.c (find_pc_sect_line): now uses binary search.
8793
8794 2018-03-19  Tom Tromey  <tom@tromey.com>
8795
8796         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8797         "IDENT" production.
8798
8799 2018-03-19  Pedro Alves  <palves@redhat.com>
8800             Tom Tromey  <tom@tromey.com>
8801
8802         * unittests/observable-selftests.c: New file.
8803         * common/observable.h: New file.
8804         * observable.h: New file.
8805         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8806         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8807         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8808         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8809         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8810         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8811         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8812         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8813         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8814         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8815         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8816         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8817         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8818         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8819         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8820         tui/tui-interp.c, valops.c: Update all users.
8821         * tui/tui-hooks.c (tui_bp_created_observer)
8822         (tui_bp_deleted_observer, tui_bp_modified_observer)
8823         (tui_inferior_exit_observer, tui_before_prompt_observer)
8824         (tui_normal_stop_observer, tui_register_changed_observer):
8825         Remove.
8826         (tui_observers_token): New global.
8827         (attach_or_detach, tui_attach_detach_observers): New functions.
8828         (tui_install_hooks, tui_remove_hooks): Use
8829         tui_attach_detach_observers.
8830         * record-btrace.c (record_btrace_thread_observer): Remove.
8831         (record_btrace_thread_observer_token): New global.
8832         * observer.sh: Remove.
8833         * observer.c: Rename to observable.c.
8834         * observable.c (namespace gdb_observers): Define new objects.
8835         (observer_debug): Move into gdb_observers namespace.
8836         (struct observer, struct observer_list, xalloc_observer_list_node)
8837         (xfree_observer_list_node, generic_observer_attach)
8838         (generic_observer_detach, generic_observer_notify): Remove.
8839         (_initialize_observer): Update.
8840         Don't include observer.inc.
8841         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8842         (clean mostlyclean): Likewise.
8843         (observer.h, observer.inc): Remove targets.
8844         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8845         (COMMON_SFILES): Use observable.c, not observer.c.
8846         * .gitignore: Remove observer.h.
8847
8848 2018-03-18  Tom Tromey  <tom@tromey.com>
8849
8850         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8851         gdb::def_vector.
8852         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8853
8854 2018-03-17  Tom Tromey  <tom@tromey.com>
8855
8856         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8857
8858 2018-03-17  Tom Tromey  <tom@tromey.com>
8859
8860         * target.c (class scoped_target_fd): New.
8861         (target_fileio_close_cleanup): Remove.
8862         (target_fileio_read_alloc_1): Use scoped_target_fd.
8863
8864 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8865
8866         * silent-rules.mk: New.
8867         * Makefile.in: Include silent-rules.mk
8868         (srcdir, VPATH, top_srcdir): Move up.
8869         (COMPILE): Add ECHO_CXX.
8870         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8871         (init.c): Add ECHO_INIT_C.
8872         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8873         (version.c): Add ECHO_GEN.
8874         (printcmd.o): Add ECHO_CXX.
8875         (target-float.o): Add ECHO_CXX.
8876         (ada-exp.o): Add ECHO_CXX.
8877         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8878         (insight$(EXEEXT)): Add ECHO_CXXLD.
8879         * gnulib/configure.ac: Add AM_SILENT_RULES.
8880         * gnulib/aclocal.m4: Re-generate.
8881         * gnulib/configure: Re-generate.
8882         * gnulib/import/Makefile.in: Re-generate.
8883
8884 2018-03-16  Tom Tromey  <tom@tromey.com>
8885
8886         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8887         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8888         * utils.c (do_free_section_addr_info)
8889         (make_cleanup_free_section_addr_info): Remove.
8890         * symfile.h (struct other_sections): Add constructor.
8891         (struct section_addr_info): Remove.
8892         (section_addr_info): New typedef.
8893         (struct sym_fns) <sym_offsets>: Change type of parameter.
8894         (build_section_addr_info_from_objfile)
8895         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8896         (default_symfile_offsets, symbol_file_add)
8897         (symbol_file_add_from_bfd)
8898         (build_section_addr_info_from_section_table): Update.
8899         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8900         * symfile.c (alloc_section_addr_info): Remove.
8901         (build_section_addr_info_from_section_table): Change return type.
8902         Update.
8903         (build_section_addr_info_from_bfd)
8904         (build_section_addr_info_from_objfile): Likewise.
8905         (free_section_addr_info): Remove.
8906         (relative_addr_info_to_section_offsets): Change type of "addrs".
8907         (addrs_section_compar): Now a std::sort comparator.
8908         (addrs_section_sort): Change return type.
8909         (addr_info_make_relative): Change type of "addrs".  Update.
8910         (default_symfile_offsets, syms_from_objfile_1)
8911         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8912         (symbol_file_add_separate): Update.
8913         (symbol_file_add): Change type of "addrs".  Update.
8914         (add_symbol_file_command): Update.  Remove cleanups.
8915         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8916         cleanups.
8917         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8918         * solib.c (solib_read_symbols): Update.
8919         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8920         * machoread.c (macho_symfile_offsets): Update.
8921         * jit.c (jit_bfd_try_read_symtab): Update.
8922
8923 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8924
8925         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8926         unittests/utils-selftests.c.
8927         * unittests/utils-selftests.c: New file.
8928
8929 2018-03-14  Tom Tromey  <tom@tromey.com>
8930
8931         PR cli/14977:
8932         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8933         for NULL.
8934
8935 2018-03-14  Tom Tromey  <tom@tromey.com>
8936
8937         PR cli/19918:
8938         * printcmd.c (printf_pointer): Allow "-" in format.
8939
8940 2018-03-14  Tom Tromey  <tom@tromey.com>
8941
8942         * printcmd.c (_initialize_printcmd): Add usage to printf.
8943
8944 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8945
8946         * MAINTAINERS: Update my email address.
8947
8948 2018-03-13  Tom Tromey  <tom@tromey.com>
8949
8950         * machoread.c (macho_check_dsym): Change filenamep to a
8951         std::string*.
8952         (macho_symfile_read): Update.
8953         * symfile.c (load_command): Use std::string.
8954
8955 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8956
8957         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8958         to error message string.
8959         (riscv_register_name): Use xsnprintf instead of sprintf.
8960         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8961         internal_error.
8962         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8963         error.
8964         (riscv_push_dummy_call): Likewise.
8965
8966 2018-03-12  Tom Tromey  <tom@tromey.com>
8967
8968         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8969         Use gdb::byte_vector.
8970         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8971
8972 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8973
8974         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8975         parameter type to readable_regcache.
8976         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8977         the declaration.
8978
8979 2018-03-11  Tom Tromey  <tom@tromey.com>
8980
8981         * dwarf2read.c (struct nextfield): Add initializers.
8982         (struct nextfnfield): Remove.
8983         (struct fnfieldlist): Add initializers.  Remove "length" and
8984         "head", use std::vector.
8985         (struct decl_field_list): Remove.
8986         (struct field_info): Add initializers.
8987         <fields, baseclasses>: Now std::vector.
8988         <nbaseclasses, nfnfields, typedef_field_list_count,
8989         nested_types_list_count>: Remove.
8990         (dwarf2_add_field, dwarf2_add_type_defn)
8991         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8992         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8993         (process_structure_scope): Update.
8994
8995 2018-03-11  Tom Tromey  <tom@tromey.com>
8996
8997         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8998         for use by std::sort.
8999         (build_type_psymtabs_1): Use std::vector.
9000
9001 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9002
9003         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9004         and LIBMPFR in the printed configuration.
9005
9006 2018-03-08  Tom Tromey  <tom@tromey.com>
9007
9008         * source.c (get_filename_and_charpos): Use scoped_fd.
9009         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9010         (procfs_pidlist): Likewise.
9011         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9012         (iterate_over_mappings): Likewise.
9013
9014 2018-03-08  Tom Tromey  <tom@tromey.com>
9015
9016         * infcall.c (struct call_return_meta_info)
9017         <stack_temporaries_enabled>: Remove.
9018         (get_call_return_value, call_function_by_hand_dummy): Update.
9019         * thread.c (disable_thread_stack_temporaries): Remove.
9020         (enable_thread_stack_temporaries): Remove.
9021         (thread_stack_temporaries_enabled_p): Return bool.
9022         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9023         (get_last_thread_stack_temporary): Update.
9024         * eval.c (evaluate_subexp): Update.
9025         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9026         class, not a function.
9027         (value_ptr, value_vec): Remove typedefs.
9028         (class thread_info) <stack_temporaries_enabled>: Now bool.
9029         <stack_temporaries>: Now a std::vector.
9030         (thread_stack_temporaries_enabled_p)
9031         (value_in_thread_stack_temporaries): Return bool.
9032
9033 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9034
9035         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9036         (getpkt_or_notif_sane_1): Likewise.
9037
9038 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9039
9040         * build-id.c (build_id_to_debug_bfd): Use std::string.
9041
9042 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9043
9044         * build-id.c (find_separate_debug_file_by_buildid): Return
9045         std::string.
9046         * build-id.h (find_separate_debug_file_by_buildid): Return
9047         std::string.
9048         * coffread.c (coff_symfile_read): Adjust to std::string.
9049         * elfread.c (elf_symfile_read): Adjust to std::string.
9050         * symfile.c (separate_debug_file_exists): Change parameter to
9051         std::string.
9052         (find_separate_debug_file): Return std::string.
9053         (find_separate_debug_file_by_debuglink): Return std::string.
9054         * symfile.h (find_separate_debug_file_by_debuglink): Return
9055         std::string.
9056
9057 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9058
9059         * common/xml-utils.c (xml_escape_text): Move code to...
9060         (xml_escape_text_append): ... this new function.
9061         * common/xml-utils.h (xml_escape_text_append): New declaration.
9062         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9063         New function.
9064         (_initialize_xml_utils): register test_xml_escape_text_append as
9065         a selftest.
9066
9067 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9068
9069         * defs.h: Remove MAX_REGISTER_SIZE.
9070         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9071         asserts.
9072         * python/py-unwind.c (pyuw_sniffer): Likewise.
9073
9074 2018-03-07  Tom Tromey  <tom@tromey.com>
9075
9076         * linux-tdep.c (linux_info_proc): Update.
9077         * target.h (struct target_ops) <to_fileio_readlink>: Return
9078         optional<string>.
9079         (target_fileio_readlink): Return optional<string>.
9080         * remote.c (remote_hostio_readlink): Return optional<string>.
9081         * inf-child.c (inf_child_fileio_readlink): Return
9082         optional<string>.
9083         * target.c (target_fileio_readlink): Return optional<string>.
9084
9085 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9086
9087         * regcache.c (cooked_read_test): Add riscv to the list of
9088         architectures that have a save_reggroup.
9089
9090 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9091
9092         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9093         value is not a dynamic class object.
9094
9095 2018-03-06  Tom Tromey  <tom@tromey.com>
9096
9097         * rust-exp.y: Formatting fixes.
9098
9099 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9100
9101         * riscv-tdep.c (riscv_register_name): Remove target description
9102         support.
9103         (riscv_gdbarch_init): Remove target description check.
9104
9105 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9106
9107         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9108         comment.
9109         * riscv-tdep.h: Likewise.
9110
9111 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9112
9113         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9114         (riscv_pseudo_register_write): Delete.
9115         (riscv_gdbarch_init): Remove all use of pseudo registers.
9116
9117 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9118
9119         * record-btrace.c (btrace_print_lines): Replace cleanup
9120         parameter with RAII equivalents.
9121         (btrace_insn_history): Replace cleanup with RAII equivalents.
9122         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9123         make_cleanup_ui_out_tuple_begin_end): Remove.
9124         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9125         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9126         make_cleanup_ui_out_list_begin_end): Remove.
9127
9128 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9129
9130         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9131         parameter types to std::vector.  Use bool.
9132         (record_btrace_wait): Replace VEC(tp_t) with
9133         std::vector<thread_info *>.
9134         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9135
9136 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9137
9138         * record-btrace.c (record_btrace_disable_callback): Remove.
9139         (struct scoped_btrace_disable): New.
9140         (record_btrace_open): Use scoped_btrace_disable.
9141
9142 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9143
9144         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9145         reading values from registers.
9146
9147 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9148
9149         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9150         where appropriate.
9151
9152 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9153
9154         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9155         change parameter type.  Use GDB's print functions, and use
9156         core_addr_to_string where appropriate.
9157         (riscv_push_dummy_call): Use core_addr_to_string where
9158         appropriate, update call to riscv_print_arg_location, and reindent
9159         a few lines.
9160         (riscv_return_value): Update call to riscv_print_arg_location.
9161
9162 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9163             Tim Newsome <tim@sifive.com>
9164             Albert Ou <a0u@eecs.berkeley.edu>
9165             Darius Rad <darius@bluespec.com>
9166
9167         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9168         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9169         (ALLDEPFILES): Add riscv-tdep.c
9170         * configure.tgt: Add riscv support.
9171         * riscv-tdep.c: New file.
9172         * riscv-tdep.h: New file.
9173         * NEWS: Mention new target.
9174         * MAINTAINERS: Add entry for riscv.
9175
9176 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9177
9178         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9179         fields within aggregates.
9180
9181 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
9182
9183         * record-btrace.c (btrace_print_lines): Change type of flags to
9184         gdb_disassembly_flags.
9185
9186 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9187
9188         * fbsd-nat.c: Include "inf-ptrace.h".
9189         (USE_SIGTRAP_SIGINFO): Conditionally define.
9190         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9191         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9192         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9193         function.
9194         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9195         Likewise.
9196         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9197         Likewise.
9198         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9199         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9200         "supports_stopped_by_hw_breakpoint" target methods.
9201
9202 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9203
9204         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9205         * fbsd-nat.c (debug_fbsd_nat): New variable.
9206         (show_fbsd_nat_debug): New function.
9207         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9208         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9209
9210 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9211
9212         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9213         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9214         prototype.
9215         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9216         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9217         method.
9218
9219 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9220
9221         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9222         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9223
9224 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9225
9226         * charset.c (struct charset_vector): New.
9227         (charsets): Change type to charset_vector.
9228         (find_charset_names): Adjust.
9229         (add_one): Adjust.
9230         (_initialize_charset): Adjust.
9231
9232 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9233
9234         * progspace.h (struct program_space) <deleted_solibs>: Change
9235         type to std::vector<std::string>.
9236         * progspace.c (clear_program_space_solib_cache): Adjust.
9237         * breakpoint.c (print_solib_event): Adjust.
9238         (check_status_catch_solib): Adjust.
9239         * solib.c (update_solib_list): Adjust.
9240         * ui-out.h (class ui_out) <field_string>: New overload.
9241         * ui-out.c (ui_out::field_string): New overload.
9242
9243 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9244
9245         * progspace.h (struct program_space): Add constructor and
9246         destructor, initialize fields.
9247         (add_program_space): Remove.
9248         * progspace.c (add_program_space): Rename to...
9249         (program_space::program_space): ... this.
9250         (release_program_space): Rename to...
9251         (program_space::~program_space): ... this.
9252         (delete_program_space): Use delete to delete program_space.
9253         (initialize_progspace): Use new to allocate program_space.
9254         * inferior.c (add_inferior_with_spaces): Likewise.
9255         (clone_inferior_command): Likewise.
9256         * infrun.c (follow_fork_inferior): Likewise.
9257         (handle_vfork_child_exec_or_exit): Likewise.
9258
9259 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9260
9261         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9262         (delim_string_to_char_ptr_vec): Return std::vector of
9263         gdb::unique_xmalloc_ptr.
9264         (dirnames_to_char_ptr_vec_append): Take std::vector of
9265         gdb::unique_xmalloc_ptr.
9266         (dirnames_to_char_ptr_vec): Return std::vector of
9267         gdb::unique_xmalloc_ptr.
9268         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9269         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9270         (delim_string_to_char_ptr_vec): Return an std::vector of
9271         gdb::unique_xmalloc_ptr, adjust the code.
9272         (dirnames_to_char_ptr_vec_append): Take an std::vector of
9273         gdb::unique_xmalloc_ptr, adjust the code.
9274         (dirnames_to_char_ptr_vec): Return an std::vector of
9275         gdb::unique_xmalloc_ptr, adjust the code.
9276         * auto-load.c (auto_load_safe_path_vec): Change type to
9277         std::vector of gdb::unique_xmalloc_ptr.
9278         (auto_load_expand_dir_vars): Return an std::vector of
9279         gdb::unique_xmalloc_ptr, adjust the code.
9280         (auto_load_safe_path_vec_update): Adjust.
9281         (filename_is_in_auto_load_safe_path_vec): Adjust.
9282         (auto_load_objfile_script_1): Adjust.
9283         * build-id.c (build_id_to_debug_bfd): Adjust.
9284         * linux-thread-db.c (thread_db_load_search): Adjust.
9285         * source.c (add_path): Adjust.
9286         (openp): Adjust.
9287         * symfile.c (find_separate_debug_file): Adjust.
9288         * utils.c (do_free_char_ptr_vec): Remove.
9289         (make_cleanup_free_char_ptr_vec): Remove.
9290
9291 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
9292
9293         PR gdb/22907
9294         * common/pathstuff.c: Conditionally include "<windows.h>".
9295
9296 2018-03-01  Georg Sauthoff  <mail@georg.so>
9297
9298         PR gdb/22888
9299         * gcore.in: Quote variables and switch interpreter to bash.
9300
9301 2018-03-01  Tom Tromey  <tom@tromey.com>
9302
9303         * dwarf2read.c (alloc_discriminant_info): Fix default_index
9304         assertion.  Add assertion for discriminant_index.
9305         (quirk_rust_enum): Use correct base type name in univariant case.
9306
9307 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
9308
9309         * record.c (get_call_history_modifiers): Return a
9310         record_print_flags.
9311         (cmd_record_call_history): Adjust.
9312         * record-btrace.c (record_btrace_call_history): Adjust.
9313         (record_btrace_call_history_range): Adjust.
9314         (record_btrace_call_history_from): Adjust.
9315         * target-debug.h (target_debug_print_record_print_flags): New.
9316         * target-delegates.c: Re-generate.
9317         * target.c (target_call_history): Change flags type.
9318         (target_call_history_from): Likewise.
9319         (target_call_history_range): Likewise.
9320         * target.h (struct target_ops) <target_call_history>: Likewise.
9321         (target_call_history_from): Likewise.
9322         (target_call_history_range): Likewise.
9323
9324 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9325             Simon Marchi  <simon.marchi@polymtl.ca>
9326
9327         * common/common-utils.c: Include "sys/stat.h".
9328         (is_regular_file): Move here from "source.c"; change return
9329         type to "bool".
9330         * common/common-utils.h (is_regular_file): New prototype.
9331         * common/pathstuff.c (contains_dir_separator): New function.
9332         * common/pathstuff.h (contains_dir_separator): New prototype.
9333         * source.c: Don't include "sys/stat.h".
9334         (is_regular_file): Move to "common/common-utils.c".
9335
9336 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9337
9338         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9339         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9340         * auto-load.c: Include "common/pathstuff.h".
9341         * common/common-def.h (current_directory): Move here.
9342         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9343         function.
9344         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9345         prototype.
9346         * common/pathstuff.c: New file.
9347         * common/pathstuff.h: New file.
9348         * compile/compile.c: Include "common/pathstuff.h".
9349         * defs.h (current_directory): Move to "common/common-defs.h".
9350         * dwarf2read.c: Include "common/pathstuff.h".
9351         * exec.c: Likewise.
9352         * guile/scm-safe-call.c: Likewise.
9353         * linux-thread-db.c: Likewise.
9354         * main.c: Likewise.
9355         * nto-tdep.c: Likewise.
9356         * objfiles.c: Likewise.
9357         * source.c: Likewise.
9358         * symtab.c: Likewise.
9359         * utils.c: Include "common/pathstuff.h".
9360         (gdb_realpath): Move to "common/pathstuff.c".
9361         (gdb_realpath_keepfile): Likewise.
9362         (gdb_abspath): Likewise.
9363         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9364         (gdb_realpath_keepfile): Likewise.
9365         (gdb_abspath): Likewise.
9366
9367 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
9368
9369         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9370         wildcard process pid for super_resume for kernels with a
9371         specific bug.
9372
9373 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
9374
9375         * compile/compile.c (get_args): Add additional comments
9376         explaining function.
9377
9378 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
9379             Tom Tromey  <tom@tromey.com>
9380
9381         * target.h (memory_write_request_s): Remove typedef.  Don't define
9382         VEC.
9383         (target_write_memory_blocks): Change argument to std::vector.
9384         (struct memory_write_request): Add constructor.
9385         * target-memory.c (compare_block_starting_address): Return bool.
9386         Change argument types.
9387         (claim_memory): Change arguments to use std::vector.
9388         (split_regular_and_flash_blocks, blocks_to_erase)
9389         (compute_garbled_blocks): Likewise.
9390         (cleanup_request_data, cleanup_write_requests_vector): Remove.
9391         (target_write_memory_blocks): Change argument to std::vector.
9392         * symfile.c (struct load_section_data): Add constructor and
9393         destructor.  Use std::vector for "requests".
9394         (struct load_progress_data): Add initializers.
9395         (load_section_callback): Update.  Use "new".
9396         (clear_memory_write_data): Remove.
9397         (generic_load): Update.
9398
9399 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
9400
9401         * arch/aarch64.h: Use common/tdesc.h.
9402
9403 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9404
9405         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9406         architecture with a 64-bit ABI.
9407
9408 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9409
9410         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9411         ahead of target description loading.
9412
9413 2018-02-26  Tom Tromey  <tom@tromey.com>
9414
9415         * stack.c (backtrace_command_1): Update.
9416         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9417         of "flags".
9418         * python/py-framefilter.c (py_print_frame)
9419         (gdbpy_apply_frame_filter): Change type of "flags".
9420         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9421         of "flags".
9422         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9423         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9424         * extension.h (enum frame_filter_flag): Rename from
9425         frame_filter_flags.
9426         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9427         (apply_ext_lang_frame_filter): Change type of "flags".
9428         * extension.c (apply_ext_lang_frame_filter): Change type of
9429         "flags".
9430         * extension-priv.h (struct extension_language_ops)
9431         <apply_frame_filter>: Change type of "flags".
9432
9433 2018-02-26  Tom Tromey  <tom@tromey.com>
9434
9435         PR python/16497:
9436         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
9437         off-by-one in py_end computation.
9438         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9439         PRINT_MORE_FRAMES.
9440         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9441         constant.
9442
9443 2018-02-26  Tom Tromey  <tom@tromey.com>
9444
9445         * dwarf2read.c (struct variant_field): New.
9446         (struct nextfield) <variant>: New field.
9447         (dwarf2_add_field): Handle DW_TAG_variant_part.
9448         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9449         discriminated union.
9450         (read_structure_type): Handle DW_TAG_variant_part.
9451         (handle_struct_member_die): New function, extracted from
9452         process_structure_scope.  Handle DW_TAG_variant.
9453         (process_structure_scope): Handle discriminated unions.  Call
9454         handle_struct_member_die.
9455
9456 2018-02-26  Tom Tromey  <tom@tromey.com>
9457
9458         * rust-lang.h (rust_last_path_segment): Declare.
9459         * rust-lang.c (rust_last_path_segment): Now public.  Change
9460         contract.
9461         (struct disr_info): Remove.
9462         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9463         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9464         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9465         (rust_enum_p, rust_enum_variant): New function.
9466         (rust_underscore_fields): Remove "offset" parameter.
9467         (rust_print_enum): New function.
9468         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9469         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9470         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9471         enums.
9472         (rust_internal_print_type): New function, from rust_print_type.
9473         Remove enum code.
9474         (rust_print_type): Call rust_internal_print_type.
9475         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9476         Update enum handling.
9477         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9478         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9479         (rust_union_quirks): New functions.
9480         (process_full_comp_unit, process_full_type_unit): Call
9481         rust_union_quirks.
9482         (process_structure_scope): Update rust_unions if necessary.
9483
9484 2018-02-26  Tom Tromey  <tom@tromey.com>
9485
9486         * value.h (value_union_variant): Declare.
9487         * valops.c (value_union_variant): New function.
9488         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9489         (struct discriminant_info): New.
9490         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9491         enumerator.
9492         (struct main_type) <flag_discriminated_union>: New field.
9493
9494 2018-02-26  Tom Tromey  <tom@tromey.com>
9495
9496         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9497         unittests/unpack-selftests.c.
9498         * unittests/unpack-selftests.c: New file.
9499         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9500
9501 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9502
9503         * dwarf2read.c (struct partial_die_info) <read>: New method.
9504         (read_partial_die): Remove the declaration.
9505         (load_partial_dies): Update.
9506         (partial_die_info::partial_die_info):
9507         (read_partial_die): Change it to partial_die_info::read.
9508
9509 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9510
9511         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9512         (fixup_partial_die): Remove declaration.
9513         (scan_partial_symbols): Update.
9514         (partial_die_parent_scope): Likewise.
9515         (partial_die_full_name): Likewise.
9516         (fixup_partial_die): Change it to partial_die_info::fixup.
9517
9518 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9519
9520         * dwarf2read.c (read_partial_die): Update the declaration.
9521         (load_partial_dies): Caller update.
9522         (read_partial_die): Remove one argument abbrev_len.
9523
9524 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9525
9526         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9527         assignment operator.
9528         (load_partial_dies): Use ctor and copy ctor.
9529         (read_partial_die): Update.
9530         (dwarf2_cu::find_partial_die): Use ctor.
9531
9532 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9533
9534         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9535         (find_partial_die_in_comp_unit): Change it to
9536         dwarf2_cu::find_partial_die.
9537         (find_partial_die): Update.
9538
9539 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9540
9541         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9542         is NULL.
9543
9544 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9545
9546         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9547
9548 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9549
9550         * arch/amd64.h: Use common/tdesc.h.
9551         * arch/i386.c: Likewise.
9552         * arch/i386.h: Likewise.
9553         * arch/tic6x.c: Likewise.
9554         * arch/tdesc.h: Move file from here...
9555         * common/tdesc.h: ...to here.
9556         * features/aarch64-core.c: Regenerate.
9557         * features/aarch64-fpu.c: Regenerate.
9558         * features/i386/32bit-avx.c: Regenerate.
9559         * features/i386/32bit-avx512.c: Regenerate.
9560         * features/i386/32bit-core.c: Regenerate.
9561         * features/i386/32bit-linux.c: Regenerate.
9562         * features/i386/32bit-mpx.c: Regenerate.
9563         * features/i386/32bit-pkeys.c: Regenerate.
9564         * features/i386/32bit-sse.c: Regenerate.
9565         * features/i386/64bit-avx.c: Regenerate.
9566         * features/i386/64bit-avx512.c: Regenerate.
9567         * features/i386/64bit-core.c: Regenerate.
9568         * features/i386/64bit-linux.c: Regenerate.
9569         * features/i386/64bit-mpx.c: Regenerate.
9570         * features/i386/64bit-pkeys.c: Regenerate.
9571         * features/i386/64bit-segments.c: Regenerate.
9572         * features/i386/64bit-sse.c: Regenerate.
9573         * features/i386/x32-core.c: Regenerate.
9574         * features/tic6x-c6xp.c: Regenerate.
9575         * features/tic6x-core.c: Regenerate.
9576         * features/tic6x-gp.c: Regenerate.
9577         * target-descriptions.c: Use common/tdesc.h.
9578         * target-descriptions.h: Likewise.
9579
9580 2018-02-24  Tom Tromey  <tom@tromey.com>
9581
9582         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9583         (try_thread_db_load_from_dir, thread_db_load_search): Use
9584         std::string.
9585         (info_auto_load_libthread_db_compare): Return bool.  Change
9586         argument types.
9587         (info_auto_load_libthread_db): Use std::vector, std::string.
9588         Remove cleanups.
9589
9590 2018-02-24  Tom Tromey  <tom@tromey.com>
9591
9592         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9593         std::string.
9594         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9595         std::string*.
9596         * gdbarch.c: Rebuild.
9597         * gdbarch.h: Rebuild.
9598         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9599         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9600         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9601         std::string*.
9602
9603 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9604
9605         * gdbtypes.h (sect_offset): Change type to uint64_t.
9606         (sect_offset_str): New function.
9607         * dwarf2read.c (create_addrmap_from_aranges): Use
9608         sect_offset_str.
9609         (error_check_comp_unit_head): Likewise.
9610         (create_debug_type_hash_table): Likewise.
9611         (read_cutu_die_from_dwo): Likewise.
9612         (init_cutu_and_read_dies): Likewise.
9613         (init_cutu_and_read_dies_no_follow): Likewise.
9614         (process_psymtab_comp_unit_reader): Likewise.
9615         (partial_die_parent_scope): Likewise.
9616         (peek_die_abbrev): Likewise.
9617         (process_queue): Likewise.
9618         (dwarf2_physname): Likewise.
9619         (read_namespace_alias): Likewise.
9620         (read_import_statement): Likewise.
9621         (create_dwo_cu_reader): Likewise.
9622         (create_cus_hash_table): Likewise.
9623         (lookup_dwo_cutu): Likewise.
9624         (inherit_abstract_dies): Likewise.
9625         (read_func_scope): Likewise.
9626         (read_call_site_scope): Likewise.
9627         (dwarf2_add_member_fn): Likewise.
9628         (read_common_block): Likewise.
9629         (read_module_type): Likewise.
9630         (read_typedef): Likewise.
9631         (read_subrange_type): Likewise.
9632         (load_partial_dies): Likewise.
9633         (read_partial_die): Likewise.
9634         (find_partial_die): Likewise.
9635         (read_str_index): Likewise.
9636         (dwarf2_string_attr): Likewise.
9637         (build_error_marker_type): Likewise.
9638         (lookup_die_type): Likewise.
9639         (dump_die_shallow): Likewise.
9640         (follow_die_ref): Likewise.
9641         (dwarf2_fetch_die_loc_sect_off): Likewise.
9642         (dwarf2_fetch_constant_bytes): Likewise.
9643         (follow_die_sig): Likewise.
9644         (get_signatured_type): Likewise.
9645         (get_DW_AT_signature_type): Likewise.
9646         (dwarf2_find_containing_comp_unit): Likewise.
9647         (set_die_type): Likewise.
9648
9649 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9650
9651         * arch/aarch64.c: Include "common-defs.h".
9652         * arch/amd64.c: Likewise.
9653         * arch/i386.c: Likewise.
9654
9655 2018-02-21  Tom Tromey  <tom@tromey.com>
9656
9657         * value.h: (extract_field_op): Update.
9658         * eval.c (extract_field_op): Return a const char *.
9659         * expression.h (parse_expression_for_completion): Update.
9660         * completer.c (complete_expression): Update.
9661         (add_struct_fields): Make fieldname const.
9662         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9663         (mark_completion_tag, parse_exp_in_context_1): Update.
9664         (parse_expression_for_completion): Change "name" to
9665         unique_xmalloc_ptr*.
9666
9667 2018-02-21  Tom Tromey  <tom@tromey.com>
9668
9669         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9670
9671 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9672
9673         * avr-tdep.c (avr_read_pc): Change parameter type to
9674         readable_regcache.
9675         * gdbarch.sh (read_pc): Likewise.
9676         * gdbarch.c: Re-generated.
9677         * gdbarch.h: Re-generated.
9678         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9679         readable_regcache.
9680         * ia64-tdep.c (ia64_read_pc): Likewise.
9681         * mips-tdep.c (mips_read_pc): Likewise.
9682         * spu-tdep.c (spu_read_pc): Likewise.
9683
9684 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9685
9686         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9687         * regcache-dump.c: New file.
9688         * regcache.c: Move register_dump to regcache-dump.c.
9689         (maintenance_print_registers): Likewise.
9690         (maintenance_print_raw_registers): Likewise.
9691         (maintenance_print_cooked_registers): Likewise.
9692         (maintenance_print_register_groups): Likewise.
9693         (maintenance_print_remote_registers): Likewise.
9694         (_initialize_regcache): Likewise.
9695         * regcache.h (register_dump): Moved from regcache.c.
9696
9697 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9698
9699         * regcache.c (regcache::regcache): Update.
9700         (regcache::invalidate): Move it to detached_regcache::invalidate.
9701         (get_thread_arch_aspace_regcache): Update.
9702         (regcache::raw_update): Update.
9703         (regcache::cooked_read): Remove some code.
9704         (regcache::cooked_read_value): Likewise.
9705         (regcache::raw_write): Remove assert on m_readonly_p.
9706         (regcache::raw_supply_integer): Move it to
9707         detached_regcache::raw_supply_integer.
9708         (regcache::raw_supply_zeroed): Likewise.
9709         * regcache.h (detached_regcache) <raw_supply_integer>: New
9710         declaration.
9711         <raw_supply_zeroed, invalidate>: Likewise.
9712         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9713         <invalidate>: Likewise.
9714         <m_readonly_p>: Removed.
9715
9716 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9717
9718         * infcmd.c (get_return_value): Let stop_regs point to
9719         get_current_regcache.
9720         * regcache.c (regcache::regcache): Remove.
9721         (register_dump_reg_buffer): New class.
9722         (regcache_print): Adjust.
9723         * regcache.h (regcache): Remove constructors.
9724
9725 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9726
9727         * regcache.c (class register_dump): New class.
9728         (register_dump_regcache, register_dump_none): New class.
9729         (register_dump_remote, register_dump_groups): New class.
9730         (regcache_print): Update.
9731         * regcache.h (regcache_dump_what): Move it to regcache.c.
9732         (regcache) <dump>: Remove.
9733
9734 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9735
9736         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9737          reg_buffer_rw *.
9738         (jit_unwind_reg_set_impl): Call raw_supply.
9739         (jit_frame_sniffer): Use reg_buffer_rw.
9740         * record-full.c (record_full_core_regbuf): Change its type.
9741         (record_full_core_open_1): Use reg_buffer_rw.
9742         (record_full_close): Likewise.
9743         (record_full_core_fetch_registers): Use regcache->raw_supply.
9744         (record_full_core_store_registers): Likewise.
9745         * regcache.c (regcache::get_register_status): Move it to
9746         reg_buffer.
9747         (regcache_raw_set_cached_value): Remove.
9748         (regcache::raw_set_cached_value): Remove.
9749         (regcache::raw_write): Call raw_supply.
9750         (regcache::raw_supply): Move it to reg_buffer_rw.
9751         * regcache.h (regcache_raw_set_cached_value): Remove.
9752         (reg_buffer_rw): New class.
9753
9754 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9755
9756         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9757         readonly_detached_regcache.
9758         (dummy_frame_prev_register): Use regcache->cooked_read.
9759         * frame.c (frame_save_as_regcache): Change return type.
9760         (frame_pop): Update.
9761         * frame.h (frame_save_as_regcache): Update declaration.
9762         * inferior.h (get_infcall_suspend_state_regcache): Update
9763         declaration.
9764         * infrun.c (infcall_suspend_state) <registers>: use
9765         readonly_detached_regcache.
9766         (save_infcall_suspend_state): Don't use regcache_dup.
9767         (get_infcall_suspend_state_regcache): Change return type.
9768         * linux-fork.c (struct fork_info) <savedregs>: Change to
9769         readonly_detached_regcache.
9770         <pc>: New field.
9771         (fork_save_infrun_state): Don't use regcache_dup.
9772         (info_checkpoints_command): Adjust.
9773         * mi/mi-main.c (register_changed_p): Update declaration.
9774         (mi_cmd_data_list_changed_registers): Use
9775         readonly_detached_regcache.
9776         (register_changed_p): Change parameter type to
9777         readonly_detached_regcache.
9778         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9779         readonly_detached_regcache.
9780         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9781         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9782         New.
9783         (regcache::save): Move it to reg_buffer.
9784         (regcache::restore): Change parameter type.
9785         (regcache_dup): Remove.
9786         * regcache.h (reg_buffer) <save>: New method.
9787         (readonly_detached_regcache): New class.
9788         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9789         readonly_detached_regcache.
9790         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9791
9792 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9793
9794         * frame.c (frame_save_as_regcache): Use regcache method save.
9795         (frame_pop): Use regcache method restore.
9796         * infrun.c (restore_infcall_suspend_state): Likewise.
9797         * linux-fork.c (fork_load_infrun_state): Likewise.
9798         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9799         save.
9800         * regcache.c (regcache_save): Remove.
9801         (regcache::restore): More asserts.
9802         (regcache_cpy): Remove.
9803         * regcache.h (regcache_save): Remove the declaration.
9804         (regcache::restore): Move from private to public.
9805         Remove the friend declaration of regcache_cpy.
9806         (regcache_cpy): Remove declaration.
9807
9808 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9809
9810         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9811         parameter type to 'readable_regcache *'.
9812         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9813         * arm-tdep.c (arm_neon_quad_read): Likewise.
9814         (arm_pseudo_read): Likewise.
9815         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9816         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9817         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9818         * gdbarch.c: Re-generated.
9819         * gdbarch.h: Re-generated.
9820         * gdbarch.sh (pseudo_register_read): Change parameter type to
9821         'readable_regcache *'.
9822         (pseudo_register_read_value): Likewise.
9823         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9824         (h8300_pseudo_register_read): Likewise.
9825         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9826         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9827         (i386_pseudo_register_read_into_value): Likewise.
9828         (i386_pseudo_register_read_value): Likewise.
9829         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9830         declaration.
9831         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9832         * m32c-tdep.c (m32c_raw_read): Likewise.
9833         (m32c_read_flg): Likewise.
9834         (m32c_banked_register): Likewise.
9835         (m32c_banked_read): Likewise.
9836         (m32c_sb_read): Likewise.
9837         (m32c_part_read): Likewise.
9838         (m32c_cat_read): Likewise.
9839         (m32c_r3r2r1r0_read): Likewise.
9840         (m32c_pseudo_register_read): Likewise.
9841         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9842         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9843         (mep_pseudo_cr64_read): Likewise.
9844         (mep_pseudo_register_read): Likewise.
9845         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9846         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9847         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9848         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9849         (regcache::cooked_read): Likewise.
9850         (regcache::cooked_read_value): Likewise.
9851         (regcache_cooked_read_signed):
9852         (regcache::cooked_read): Likewise.
9853         * regcache.h (readable_regcache): New class.
9854         (regcache): Inherit readable_regcache.  Move some methods to
9855         readable_regcache.
9856         * rl78-tdep.c (rl78_pseudo_register_read): Change
9857         parameter type to 'readable_regcache *'.
9858         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9859         (e500_pseudo_register_read): Change parameter type to
9860         'readable_regcache *'.
9861         (dfp_pseudo_register_read): Likewise.
9862         (vsx_pseudo_register_read): Likewise.
9863         (efpr_pseudo_register_read): Likewise.
9864         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9865         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9866         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9867         (sh64_pseudo_register_read): Likewise.
9868         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9869         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9870         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9871         (spu_pseudo_register_read): Likewise.
9872         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9873         (xtensa_pseudo_register_read): Likewise.
9874
9875 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9876
9877         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9878         (regcache::arch): Move it to reg_buffer::arch.
9879         (regcache::register_buffer): Likewise.
9880         (regcache::assert_regnum): Likewise.
9881         (regcache::num_raw_registers): Likewise.
9882         * regcache.h (reg_buffer): New class.
9883         (regcache): Inherit reg_buffer.
9884
9885 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9886
9887         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9888         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9889
9890 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9891
9892         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9893
9894 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9895
9896         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9897         (SFILES): Remove common/*.c files.
9898         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9899         * common/common.host: Add common reference.
9900         * configure.ac: Likewise.
9901         * configure: Regenerate.
9902
9903 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9904
9905         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9906         (block_initialize_namespace): Use new.
9907         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9908         (dwarf2_free_objfile): Use delete.
9909         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9910         (copy_type_recursive): Use new.
9911         * gdb_obstack.h (allocate_on_obstack): New.
9912
9913 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9914
9915         PR gdb/22849
9916         * inferior.c (exit_inferior_1): Reset inf->control.
9917
9918 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9919
9920         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9921         declaration.
9922
9923 2018-02-14  Pedro Alves  <palves@redhat.com>
9924
9925         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9926         frame_cleanup_after_sniffer on exception.
9927
9928 2018-02-14  Tom Tromey  <tom@tromey.com>
9929
9930         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9931         const.
9932         (solib_bfd_open): Make pathname const.
9933         * solib.c (solib_bfd_open): Make pathname const.
9934         * solib-spu.c (spu_bfd_fopen): Make name const.
9935         (spu_bfd_open): Make pathname const.
9936         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9937         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9938
9939 2018-02-14  Tom Tromey  <tom@tromey.com>
9940
9941         * symfile.c (symfile_bfd_open): Update.
9942         * source.h (openp, source_full_path_of, find_and_open_source):
9943         Change argument type to unique_xmalloc_ptr.
9944         * source.c (openp): Take a unique_xmalloc_ptr.
9945         (source_full_path_of, find_and_open_source): Likewise.
9946         (open_source_file, symtab_to_fullname): Update.
9947         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9948         unique_xmalloc_ptr.
9949         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9950         (exec_file_find): Update.
9951         * psymtab.c (psymtab_to_fullname): Update.
9952         * nto-tdep.h (nto_find_and_open_solib): Update.
9953         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9954         unique_xmalloc_ptr.
9955         * exec.c (exec_file_attach): Update.
9956         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9957         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9958
9959 2018-02-14  Tom Tromey  <tom@tromey.com>
9960
9961         * solib.c: Include source.h.
9962         * nto-tdep.c: Include source.h.
9963         * mi/mi-cmd-env.c: Include source.h.
9964         * infcmd.c: Include source.h.
9965         * exec.c: Include source.h.
9966         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9967         (add_path, directory_switch, source_path, init_source_path): Move
9968         declarations...
9969         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9970         (add_path, directory_switch, source_path, init_source_path):
9971         ...here.
9972
9973 2018-02-14  Tom Tromey  <tom@tromey.com>
9974
9975         * solist.h (exec_file_find, solib_find): Return
9976         unique_xmalloc_ptr.
9977         (solib_bfd_fopen): Take a const char *.
9978         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9979         (exec_file_find, solib_find): Likewise.
9980         (solib_bfd_fopen): Do not take ownership of "pathname".
9981         (solib_bfd_open): Use unique_xmalloc_ptr.
9982         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9983         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9984         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9985         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9986
9987 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9988
9989         * ada-lang.c (name_match_type_from_name): Remove reference to
9990         ada_name_for_lookup in function's documentation.
9991         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9992
9993 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9994
9995         * defs.h (enum openp_flags): New enum.
9996         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9997         Move to enum openp_flags.
9998         (openp_flags): New enum flags.
9999         (openp): Change parameter type to openp_flags.
10000         * source.c (openp): Change parameter type to openp_flags.
10001         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10002         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10003
10004 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10005
10006         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10007         per-command.
10008
10009 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10010
10011         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10012         into...
10013         (class dwarf2_queue_guard): ...the destructor of this new class.
10014         (dw2_do_instantiate_symtab): Create instance of the new class
10015         dwarf2_queue_guard, remove cleanup.
10016
10017 2018-02-09  Tom Tromey  <tom@tromey.com>
10018
10019         * source.c (find_source_lines): Don't reference past the end of
10020         the vector.
10021
10022 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10023
10024         * remote.c (remote_btrace_maybe_reopen): Change error message.
10025         * btrace.c (btrace_enable): Likewise.
10026         (parse_xml_btrace): Likewise.
10027         (parse_xml_btrace_conf): Likewise.
10028
10029 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10030
10031         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10032         (linux_enable_pt, linux_enable_bts): Call
10033         diagnose_perf_event_open_fail.
10034
10035 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10036
10037         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10038         Remove parameter and change return type.  Update callers.  Move it.
10039         (linux_enable_bts, linux_enable_pt): Improve error message.
10040         (linux_enable_pt): Remove zero buffer size check.
10041         (linux_enable_btrace): Improve error messages.  Remove NULL return
10042         check.
10043
10044 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10045
10046         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10047         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10048         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10049         (linux_supports_pt, linux_supports_btrace): Remove.
10050         (linux_enable_bts): Call cpu_supports_bts.
10051         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10052         * remote.c (remote_supports_btrace): Remove.
10053         (init_remote_ops): Remove remote_supports_btrace.
10054         * target-delegates.c: Regenerated.
10055         * target.c (target_supports_btrace): Remove.
10056         * target.h (target_ops) <to_supports_btrace>: Remove
10057         (target_supports_btrace): Remove.
10058         * x86-linux-nat.c (x86_linux_create_target): Remove
10059         linux_supports_btrace.
10060
10061 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10062
10063         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10064         btrace failed.
10065         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10066         exception and use message in own exception.
10067
10068 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10069
10070         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10071         (perf_event_pt_event_type): Use gdb_file_up.
10072         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10073         scoped_fd, and scoped_mmap.
10074
10075 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10076
10077         * common/scoped_mmap.h: New.
10078         * unittests/scoped_mmap-selftest.c: New.
10079         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10080         unittests/scoped_mmap-selftest.c.
10081
10082 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10083
10084         * common/scoped_fd.h: New.
10085         * unittests/scoped_fd-selftest.c: New.
10086         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10087         unittests/scoped_fd-selftest.c.
10088
10089 2018-02-09  Tom Tromey  <tom@tromey.com>
10090
10091         * auto-load.c (auto_load_section_scripts): Use
10092         gdb::unique_xmalloc_ptr.
10093
10094 2018-02-09  Tom Tromey  <tom@tromey.com>
10095
10096         * auto-load.c (execute_script_contents): Use std::string.
10097
10098 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10099
10100         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10101         Python function, rather than a new command.
10102
10103 2018-02-08  Tom Tromey  <tom@tromey.com>
10104
10105         * solib.c (solib_find_1): Use std::string.
10106         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10107
10108 2018-02-08  Tom Tromey  <tom@tromey.com>
10109
10110         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10111
10112 2018-02-08  Tom Tromey  <tom@tromey.com>
10113
10114         * source.c (find_source_lines): Use gdb::def_vector.
10115
10116 2018-02-08  Tom Tromey  <tom@tromey.com>
10117
10118         * macrocmd.c (struct temporary_macro_definition): New.
10119         (macro_define_command): Use temporary_macro_definition.  Remove
10120         cleanups.
10121         (free_macro_definition_ptr): Remove.
10122
10123 2018-02-08  Tom Tromey  <tom@tromey.com>
10124
10125         * macroexp.c (maybe_expand): Use std::string.
10126
10127 2018-02-08  Tom Tromey  <tom@tromey.com>
10128
10129         * macroexp.c (struct macro_buffer): Add initializers for some
10130         members.
10131         (init_buffer, init_shared_buffer, free_buffer)
10132         (free_buffer_return_text): Remove.
10133         (macro_buffer): New constructors.
10134         (~macro_buffer): New destructor.
10135         (macro_buffer::set_shared): New method.
10136         (macro_buffer::resize_buffer, macro_buffer::appendc)
10137         (macro_buffer::appendmem): Now methods, not free functions.
10138         (set_token, append_tokens_without_splicing, stringify)
10139         (macro_stringify): Update.
10140         (gather_arguments): Change return type.  Remove argc_p argument,
10141         add args_ptr argument.  Use std::vector.
10142         (substitute_args): Remove argc argument.  Accept std::vector.
10143         (expand): Update.  Use std::vector.
10144         (scan, macro_expand, macro_expand_next): Update.
10145
10146 2018-02-08  Tom Tromey  <tom@tromey.com>
10147
10148         * symtab.c (default_collect_symbol_completion_matches_break_on):
10149         Use unique_xmalloc_ptr.
10150         * macroscope.h: (sal_macro_scope, user_macro_scope)
10151         (default_macro_scope): Return unique_xmalloc_ptr.
10152         * macroscope.c (sal_macro_scope, user_macro_scope)
10153         (default_macro_scope): Return unique_xmalloc_ptr.
10154         * macroexp.h (macro_expand, macro_expand_once): Return
10155         unique_xmalloc_ptr.
10156         * macroexp.c (macro_expand, macro_expand_once): Return
10157         unique_xmalloc_ptr.
10158         * macrocmd.c (macro_expand_command, macro_expand_once_command)
10159         (info_macro_command, info_macros_command): Use
10160         unique_xmalloc_ptr.
10161         * compile/compile-c-support.c (write_macro_definitions): Use
10162         unique_xmalloc_ptr.
10163         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10164
10165 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
10166
10167         * value.c (value_static_field): Assign field type instead of
10168         containing type when returning an optimized out value.
10169
10170 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10171
10172         * ft32-tdep.c (ft32_read_pc): Remove.
10173         (ft32_write_pc): Remove.
10174         (ft32_gdbarch_init): Update.
10175         * m32r-tdep.c (m32r_read_pc): Remove.
10176         (m32r_gdbarch_init): Update.
10177         * mep-tdep.c (mep_read_pc): Remove.
10178         (mep_gdbarch_init): Update.
10179         * microblaze-tdep.c (microblaze_write_pc): Remove.
10180         (microblaze_gdbarch_init): Update.
10181         * mn10300-tdep.c (mn10300_read_pc): Remove.
10182         (mn10300_write_pc): Remove.
10183         (mn10300_gdbarch_init): Update.
10184         * moxie-tdep.c (moxie_read_pc): Remove.
10185         (moxie_write_pc): Remove.
10186         (moxie_gdbarch_init): Update.
10187
10188 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10189
10190         * expprint.c (print_subexp_standard): Handle
10191         OP_F77_UNDETERMINED_ARGLIST.
10192         (dump_subexp_body_standard): Likewise.
10193
10194 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
10195
10196         * target-descriptions.c (tdesc_element_visitor) Add empty
10197         implementations.
10198         (tdesc_type): Move make_gdb_type from here.
10199         (tdesc_type_builtin): Likewise.
10200         (tdesc_type_vector): Likewise.
10201         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10202         (make_gdb_type_struct): Move from tdesc_type_with_fields.
10203         (make_gdb_type_union): Likewise.
10204         (make_gdb_type_flags): Likewise.
10205         (make_gdb_type_enum): Likewise.
10206         (make_gdb_type): New function.
10207         (tdesc_register_type): Use static make_gdb_type.
10208
10209 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
10210
10211         * infcmd.c (default_print_one_register_info): Align natural-format
10212         column values consistently one under another.
10213         (pad_to_column): New function.
10214
10215 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
10216
10217         * dwarf2read.c (dwarf2_physname): Move commment.
10218
10219 2018-02-01  Leszek Swirski  <leszeks@google.com>
10220
10221         * varobj.c (varobj_formatted_print_options): Allow recursive
10222         pretty printing if pretty printing is enabled.
10223
10224 2018-02-01  Leszek Swirski  <leszeks@google.com>
10225
10226         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10227         names after a structop as a filename.
10228
10229 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10230
10231         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10232         (arm_record_coproc_data_proc): Likewise.
10233
10234 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10235
10236         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10237
10238 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
10239
10240         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10241         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10242
10243 2018-01-31  Pedro Alves  <palves@redhat.com>
10244
10245         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10246         * inflow.c (child_terminal_save_inferior): Wrap reference to
10247         tcgetpgrp in HAVE_TERMIOS_H.
10248         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10249         _WIN32.
10250         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10251         always iterate over all inferiors.
10252         (gdbsim_cntrl_c): Adjust.
10253         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10254
10255 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10256
10257         * gdbtypes.c (lookup_array_range_type): Make sure the array's
10258         index type is objfile-owned if the element type is as well.
10259
10260 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10261
10262         GDB 8.1 released.
10263
10264 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10265
10266         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10267         "features/s390x-linux64.c".
10268         (_initialize_s390_linux_tdep): Remove initialization of tdescs
10269         s390_linux32 and s390x_linux64.
10270         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10271         default tdesc.
10272         * s390-tdep.c: Include "features/s390-linux32.c" and
10273         "features/s390x-linux64.c".
10274         (s390_tdesc_valid): Add check for tdesc_has_registers.
10275         (s390_gdbarch_init): Make sure there is always a valid tdesc.
10276         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10277         tdesc_s390x_linux64.
10278         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10279         tdesc_s390x_linux64 to...
10280         * s390-tdep.h: ...here.
10281
10282 2018-01-30  Pedro Alves  <palves@redhat.com>
10283
10284         PR gdb/13211
10285         * config.in, configure: Regenerate.
10286         * configure.ac: Check for getpgid.
10287         * go32-nat.c (go32_pass_ctrlc): New.
10288         (go32_target): Install it.
10289         * inf-child.c (inf_child_target): Install
10290         child_terminal_save_inferior, child_pass_ctrlc and
10291         child_interrupt.
10292         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10293         (inf_ptrace_target): No longer install it.
10294         * infcmd.c (interrupt_target_1): Adjust.
10295         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10296         (child_interrupt): Declare.
10297         (inferior::terminal_state): New.
10298         * inflow.c (struct terminal_info): Update comments.
10299         (inferior_process_group): Delete.
10300         (terminal_is_ours): Delete.
10301         (gdb_tty_state): New.
10302         (child_terminal_init): Adjust.
10303         (is_gdb_terminal, sharing_input_terminal_1)
10304         (sharing_input_terminal): New functions.
10305         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
10306         Set the process's actual process group in the foreground if
10307         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
10308         mark terminal as the inferior's if not sharing GDB's terminal.
10309         Don't check attach_flag.
10310         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10311         pass down a target_terminal_state.
10312         (child_terminal_save_inferior): New, factored out from ...
10313         (child_terminal_ours_1): ... this.  Handle
10314         target_terminal_state::is_ours_for_output.
10315         (child_interrupt, child_pass_ctrlc): New.
10316         (inflow_inferior_exit): Clear the inferior's terminal_state.
10317         (copy_terminal_info): Copy the inferior's terminal state.
10318         (_initialize_inflow): Remove reference to terminal_is_ours.
10319         * inflow.h (inferior_process_group): Delete.
10320         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10321         * procfs.c (procfs_target): Don't install procfs_interrupt.
10322         (procfs_interrupt): Delete.
10323         * remote.c (remote_serial_quit_handler): Adjust.
10324         (remote_interrupt): Remove ptid parameter.  Adjust.
10325         * target-delegates.c: Regenerate.
10326         * target.c: Include "terminal.h".
10327         (target_terminal::terminal_state): Rename to ...
10328         (target_terminal::m_terminal_state): ... this.
10329         (target_terminal::init): Adjust.
10330         (target_terminal::inferior): Adjust to per-inferior
10331         terminal_state.
10332         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10333         (target_terminal::ours, target_terminal::ours_for_output): Use
10334         target_terminal_is_ours_kind.
10335         (target_interrupt): Remove ptid parameter.  Adjust.
10336         (default_target_pass_ctrlc): Adjust.
10337         * target.h (target_ops::to_terminal_save_inferior): New field.
10338         (target_ops::to_interrupt): Remove ptid_t parameter.
10339         (target_interrupt): Remove ptid_t parameter.  Update comment.
10340         (target_pass_ctrlc): Update comment.
10341         * target/target.h (target_terminal_state): New scoped enum,
10342         factored out of ...
10343         (target_terminal::terminal_state): ... here.
10344         (target_terminal::inferior): Update comments.
10345         (target_terminal::restore_inferior): New.
10346         (target_terminal::is_inferior, target_terminal::is_ours)
10347         (target_terminal::is_ours_for_output): Adjust.
10348         (target_terminal::scoped_restore_terminal_state): Adjust to
10349         rename, and call restore_inferior() instead of inferior().
10350         (target_terminal::scoped_restore_terminal_state::m_state): Change
10351         type.
10352         (target_terminal::terminal_state): Rename to ...
10353         (target_terminal::m_terminal_state): ... this and change type.
10354
10355 2018-01-30  Pedro Alves  <palves@redhat.com>
10356
10357         * linux-nat.c (wait_for_signal): New function.
10358         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10359         directly.
10360         (async_terminal_is_ours)
10361         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10362         (linux_nat_add_target): Don't override
10363         to_terminal_inferior/to_terminal_ours.
10364
10365 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
10366
10367         * remote.c (remote_follow_fork): Don't call "detach_inferior".
10368
10369 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
10370
10371         * dwarf2read.c (free_dwo_files): Add forward-declaration.
10372         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10373         dwarf2_per_objfile_free here.
10374         (dwarf2_per_objfile_free): Remove.
10375         (_initialize_dwarf2_read): Don't register
10376         dwarf2_per_objfile_free as a registry cleanup.
10377
10378 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
10379
10380         Avoid compilation errors in MinGW native builds
10381
10382         The error is triggered by including python-internal.h, and the
10383         error message is:
10384
10385              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10386                       from build-gnulib/import/math.h:27,
10387                       from d:/usr/Python26/include/pyport.h:235,
10388                       from d:/usr/Python26/include/Python.h:58,
10389                       from python/python-internal.h:94,
10390                       from python/py-arch.c:24:
10391              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10392         using ::hypot;
10393                 ^~~~~
10394
10395         This happens because Python headers define 'hypot' to expand t
10396         '_hypot' in the Windows builds.
10397         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10398         'hypoth'.  This avoids a compilation error.
10399
10400 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10401
10402         * MAINTAINERS (Write After Approval): Fix ordering.
10403
10404 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10405
10406         * MAINTAINERS (Write After Approval): Add Alan Hayward.
10407
10408 2018-01-26  Alan Modra  <amodra@gmail.com>
10409
10410         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10411         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10412         Remove nop.  Make const.  Comment.
10413         (powerpc32_plt_stub_so_2): New.
10414         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10415         Correct count.  Update uses.
10416         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10417         Move common code reading PLT entry word.  Correct
10418         powerpc32_plt_stub PLT address calculation.
10419         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10420         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10421         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10422         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10423         (ppc64_standard_linkage8): Likewise.
10424         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10425         Correct insns description.
10426         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10427
10428 2018-01-24  Pedro Alves  <palves@redhat.com>
10429
10430         GCC PR libstdc++/83906
10431         * gdbtypes.c (operator==(const dynamic_prop &,
10432         const dynamic_prop &)): New.
10433         (operator==(const range_bounds &, const range_bounds &)): New.
10434         (check_types_equal): Use them instead of memcmp.
10435         * gdbtypes.h (operator==(const dynamic_prop &,
10436         const dynamic_prop &)): Declare.
10437         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10438         (operator==(const range_bounds &, const range_bounds &)): Declare.
10439         (operator!=(const range_bounds &, const range_bounds &)): Declare.
10440
10441 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10442
10443         * s390-linux-tdep.c (s390_record_address_mask)
10444         (s390_record_calc_disp_common, s390_record_calc_disp)
10445         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10446         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10447         (s390_process_record): Move to s390-tdep.c.
10448         (s390_linux_init_abi_any): Adjust.
10449         * s390-tdep.c (s390_record_address_mask)
10450         (s390_record_calc_disp_common, s390_record_calc_disp)
10451         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10452         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10453         (s390_process_record): Moved from s390-linux-tdep.c
10454         (s390_gdbarch_init): Adjust.
10455
10456 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10457
10458         * s390-linux-nat.c (s390-tdep.h): New include.
10459         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10460         (HFILES_NO_SRCDIR): Add s390-tdep.h.
10461         (ALLDEPFILES): Add s390-tdep.c.
10462         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10463         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10464         * s390-tdep.h: ...this.  New file.
10465         * s390-linux-tdep.c (s390-tdep.h): New include.
10466         (_initialize_s390_tdep): Rename to...
10467         (_initialize_s390_linux_tdep): ...this and adjust.
10468         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10469         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10470         s390-tdep.h.
10471         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10472         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10473         (s390_is_partial_instruction, s390_software_single_step)
10474         (is_non_branch_ril, s390_displaced_step_copy_insn)
10475         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10476         (s390_prologue_data, s390_addr, s390_store, s390_load)
10477         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10478         (s390_register_call_saved, s390_guess_tracepoint_registers)
10479         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10480         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10481         (s390_pseudo_register_name, s390_pseudo_register_type)
10482         (s390_pseudo_register_read, s390_pseudo_register_write)
10483         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10484         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10485         (s390_addr_bits_remove, s390_address_class_type_flags)
10486         (s390_address_class_type_flags_to_name)
10487         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10488         (s390_function_arg_float, s390_function_arg_vector)
10489         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10490         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10491         (s390_frame_align, s390_register_return_value, s390_return_value)
10492         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10493         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10494         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10495         (s390_trad_frame_prev_register, s390_unwind_cache)
10496         (s390_prologue_frame_unwind_cache)
10497         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10498         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10499         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10500         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10501         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10502         (s390_frame_base_address, s390_local_base_address)
10503         (s390_frame_base, s390_gcc_target_options)
10504         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10505         (s390_validate_reg_range, s390_tdesc_valid)
10506         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10507         * s390-tdep.c: ...this.  New file.
10508
10509 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10510
10511         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10512         (s390_process_record, s390_gdbarch_tdep_alloc)
10513         (s390_linux_init_abi_any): Use/set new hook.
10514
10515 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10516
10517         * s390-linux-tdep.c (osabi.h): New include.
10518         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10519         (s390_linux_init_abi_any): New functions.
10520         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10521
10522 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10523
10524         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10525         tdesc_has_registers check
10526
10527 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10528
10529         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10530         (s390_validate_reg_range): New macro.
10531         (s390_gdbarch_init): Adjust.
10532
10533 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10534
10535         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10536         (s390_gdbarch_tdep_alloc): Adjust.
10537         (s390_gdbarch_init): Adjust.
10538
10539 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10540
10541         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10542         <have_tdb>: Change type to bool.
10543         (s390_gdbarch_tdep_alloc): Adjust.
10544         (s390_gdbarch_init): Adjust.
10545
10546 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10547
10548         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10549         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10550         (s390_gdbarch_tdep_alloc): New function.
10551         (s390_gdbarch_init): Allocate tdep at start and use its fields
10552         instead of separate variables.
10553
10554 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10555
10556         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10557         when looking for cached gdbarch and add comment for remaining.
10558
10559 2018-01-22  Pedro Alves  <palves@redhat.com>
10560             Sergio Durigan Junior  <sergiodj@redhat.com>
10561
10562         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10563         case.
10564
10565 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10566
10567         * MAINTAINERS: Update my company e-mail address.
10568
10569 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10570
10571         * regcache.c (cooked_write_test): New function.
10572         (_initialize_regcache): Register the test.
10573
10574 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10575
10576         * ia64-tdep.c (ia64_pseudo_register_read): Call
10577         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10578         * m32c-tdep.c (m32c_cat_read): Likewise.
10579         (m32c_r3r2r1r0_read): Likewise.
10580         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10581         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10582
10583 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10584
10585         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10586         method raw_read instead of regcache_raw_read.
10587         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10588         * arm-tdep.c (arm_neon_quad_read): Likewise.
10589         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10590         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10591         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10592         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10593         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10594         (i386_pseudo_register_read_into_value): Likewise.
10595         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10596         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10597         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10598         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10599         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10600         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10601         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10602         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10603         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10604
10605 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10606
10607         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10608         * configure.tgt: Remove target mt.
10609         * mt-tdep.c: Remove.
10610         * regcache.c (cooked_read_test): Remove the check for mt.
10611
10612 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10613
10614         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10615         instead of gdbarch_pseudo_register_read_value.
10616
10617 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10618
10619         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10620         language is Ada.
10621
10622 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10623
10624         * linespec.c (create_sals_line_offset): Remove code that preserved
10625         the symtab_and_line's line number.
10626
10627 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10628
10629         * varobj.c (varobj_create): Don't set valid_block when creating a
10630         floating varobj.
10631
10632 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10633
10634         * varobj.c (varobj_create): Remove out of date comment.
10635
10636 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10637
10638         PR mi/20395
10639         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10640         updating innermost block.
10641         * parse.c (innermost_block_tracker::update): Take extra type
10642         parameter, and check types match before updating innermost block.
10643         (write_dollar_variable): Update innermost block for registers.
10644         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10645         (innermost_block_tracker::innermost_block_tracker): Initialise
10646         m_types member.
10647         (innermost_block_tracker::reset): Take type parameter.
10648         (innermost_block_tracker::update): Take type parameter, and pass
10649         type through as needed.
10650         (innermost_block_tracker::m_types): New member.
10651         * varobj.c (varobj_create): Pass type when reseting innermost
10652         block.
10653
10654 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10655
10656         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10657         * ada-lang.c (resolve_subexp): Likewise.
10658         * breakpoint.c (set_breakpoint_condition) Likewise.
10659         (watch_command_1) Likewise.
10660         * c-exp.y (variable): Likewise.
10661         * d-exp.y (PrimaryExpression): Likewise.
10662         * f-exp.y (variable): Likewise.
10663         * go-exp.y (variable): Likewise.
10664         * m2-exp.y (variable): Likewise.
10665         * objfiles.c (objfile::~objfile): Likewise.
10666         * p-exp.y (variable): Likewise.
10667         * parse.c (innermost_block): Change type.
10668         * parser-defs.h (class innermost_block_tracker): New.
10669         (innermost_block): Change to innermost_block_tracker.
10670         * printcmd.c (display_command): Switch to innermost_block API.
10671         (do_one_display): Likewise.
10672         * rust-exp.y (do_one_display): Likewise.
10673         * symfile.c (clear_symtab_users): Likewise.
10674         * varobj.c (varobj_create): Switch to innermost_block API, replace
10675         use of innermost_block with block stored on varobj object.
10676
10677 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10678
10679         * expression.h (innermost_block): Remove declaration.
10680         * varobj.c: Add 'parser-defs.h' include.
10681
10682 2018-01-19  Tom Tromey  <tom@tromey.com>
10683
10684         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10685         symbols in the static and global blocks.
10686
10687 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10688
10689         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10690         gdb_ptrace.h, and move including gdb_wait.h ...
10691         * nat/linux-ptrace.h: ... to here.
10692
10693 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10694
10695         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10696         inf_ptrace_detach_success.
10697         (inf_ptrace_detach_success): Add inferior parameter, use it
10698         instead of inferior_ptid, pass it to detach_inferior.
10699         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10700         parameter.
10701         * inferior.c (detach_inferior): Add overload that takes an
10702         inferior object.
10703         * inferior.h (detach_inferior): Likewise.
10704         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10705         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10706         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10707
10708 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10709
10710         * target.h (struct target_ops) <to_detach>: Add inferior
10711         parameter.
10712         (target_detach): Likewise.
10713         * target.c (dispose_inferior): Pass inferior down.
10714         (target_detach): Pass inferior down.  Assert that it is equal to
10715         the current inferior.
10716         * aix-thread.c (aix_thread_detach): Pass inferior down.
10717         * corefile.c (core_file_command): Pass current_inferior() down.
10718         * corelow.c (core_detach): Add inferior parameter.
10719         * darwin-nat.c (darwin_detach): Likewise.
10720         * gnu-nat.c (gnu_detach): Likewise.
10721         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10722         * infcmd.c (detach_command): Pass current_inferior() down to
10723         target_detach.
10724         * infrun.c (follow_fork_inferior): Pass parent_inf to
10725         target_detach.
10726         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10727         target_detach.
10728         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10729         * linux-thread-db.c (thread_db_detach): Likewise.
10730         * nto-procfs.c (procfs_detach): Likewise.
10731         * procfs.c (procfs_detach): Likewise.
10732         * record.c (record_detach): Likewise.
10733         * record.h (struct inferior): Forward-declare.
10734         (record_detach): Add inferior parameter.
10735         * remote-sim.c (gdbsim_detach): Likewise.
10736         * remote.c (remote_detach_1): Likewise.
10737         (remote_detach): Likewise.
10738         (extended_remote_detach): Likewise.
10739         * sol-thread.c (sol_thread_detach): Likewise.
10740         * target-debug.h (target_debug_print_inferior_p): New macro.
10741         * target-delegates.c: Re-generate.
10742         * top.c (kill_or_detach): Pass inferior down to target_detach.
10743         * windows-nat.c (windows_detach): Add inferior parameter.
10744
10745 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10746
10747         * target.h (struct target_ops) <to_detach>: Remove args
10748         parameter.
10749         (target_detach): Likewise.
10750         * target.c (dispose_inferior): Adjust.
10751         (target_detach): Remove args parameter, adjust.
10752         * aix-thread.c (aix_thread_detach): Adjust.
10753         * corefile.c (core_file_command): Adjust.
10754         * corelow.c (core_detach): Adjust.
10755         * darwin-nat.c (darwin_detach): Adjust.
10756         * gnu-nat.c (gnu_detach): Adjust.
10757         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10758         * infcmd.c (detach_command): Adjust
10759         * infrun.c (follow_fork_inferior): Adjust.
10760         (handle_vfork_child_exec_or_exit): Adjust.
10761         * linux-fork.c (linux_fork_detach): Remove args parameter.
10762         * linux-fork.h (linux_fork_detach): Likewise.
10763         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10764         * linux-thread-db.c (thread_db_detach): Likewise.
10765         * nto-procfs.c (procfs_detach): Likewise.
10766         * procfs.c (procfs_detach): Likewise.
10767         (do_detach): Remove signo parameter.
10768         * record.c (record_detach): Remove args parameter.
10769         * record.h (record_detach): Likewise.
10770         * remote-sim.c (gdbsim_detach): Likewise.
10771         * remote.c (remote_detach_1): Likewise.
10772         (remote_detach): Likewise.
10773         (extended_remote_detach): Likewise.
10774         * sol-thread.c (sol_thread_detach): Likewise.
10775         * target-delegates.c: Re-generate.
10776         * top.c (struct qt_args) <args>: Remove field.
10777         (kill_or_detach): Don't pass args.
10778         (quit_force): Don't set args.
10779         * windows-nat.c (windows_detach): Remove args parameter.
10780
10781 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10782
10783         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10784         (arm_linux_init_abi): Install it.
10785
10786 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10787
10788         * osabi.c (gdb_osabi_names): Extend the regexp for
10789         arm-linux-gnueabihf.
10790
10791 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10792
10793         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10794         m_abbrevs.
10795         (abbrev_table::add_abbrev): Update.
10796         (abbrev_table::lookup_abbrev): Update.
10797
10798 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10799
10800         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10801
10802 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10803
10804         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10805         to "std::string".
10806
10807 2018-01-17  Tom Tromey  <tom@tromey.com>
10808
10809         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10810
10811 2018-01-17  Tom Tromey  <tom@tromey.com>
10812
10813         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10814         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10815         (create_array_type_with_stride): Update.
10816         * dwarf2read.c (set_die_type): Update.
10817
10818 2018-01-17  Tom Tromey  <tom@tromey.com>
10819
10820         * dwarf2read.c (delayed_method_info): Remove typedef.
10821         (dwarf2_cu::method_info): Now a std::vector.
10822         (add_to_method_list): Update.
10823         (free_delayed_list): Remove.
10824         (compute_delayed_physnames): Update.
10825         (process_full_comp_unit, process_full_type_unit): Clear the method
10826         list.  Remove cleanups.
10827         (psymtab_include_file_name): Add name_holder parameter.  Use
10828         unique_xmalloc_ptr.
10829         (dwarf_decode_lines): Update.
10830
10831 2018-01-17  Tom Tromey  <tom@tromey.com>
10832             Simon Marchi  <simon.marchi@ericsson.com>
10833
10834         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10835         (dwarf2_per_objfile::free_cached_comp_units)
10836         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10837         (init_cutu_and_read_dies_no_follow): Update.
10838         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10839         (dwarf2_cu::~dwarf2_cu): New.
10840         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10841         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10842
10843 2018-01-17  Tom Tromey  <tom@tromey.com>
10844             Simon Marchi  <simon.marchi@ericsson.com>
10845
10846         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10847         (struct die_reader_specs) <abbrev_table>: New member.
10848         (struct abbrev_table): Add constructor.
10849         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10850         <abbrev_obstack>: Now an auto_obstack.
10851         (abbrev_table_up): New typedef.
10852         (init_cu_die_reader): Add abbrev_table parameter.
10853         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10854         Add result_dwo_abbrev_table.
10855         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10856         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10857         Update.
10858         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10859         parameter.
10860         (skip_children): Update.
10861         (abbrev_table::alloc_abbrev): Rename from
10862         abbrev_table_alloc_abbrev.
10863         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10864         (abbrev_table::lookup_abbrev): Rename from
10865         abbrev_table_lookup_abbrev.
10866         (abbrev_table_read_table): Return abbrev_table_up.
10867         (abbrev_table_free, abbrev_table_free_cleanup)
10868         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10869         (load_partial_dies): Update.
10870
10871 2018-01-17  Tom Tromey  <tom@tromey.com>
10872
10873         * dwarf2read.c (dwarf2_compute_name): Update comment.
10874         (read_func_scope, read_variable): Update.
10875         (new_symbol): Remove.
10876         (new_symbol_full): Rename to new_symbol.
10877
10878 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10879
10880         PR gdb/16577
10881         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10882         a warning instead of throwing an error, set section size to 0 and return
10883         NULL.
10884         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10885
10886 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10887
10888         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10889         std::string.
10890         (linux_ptrace_attach_fail_reason_string): Likewise.
10891         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10892         Likewise.
10893         (linux_ptrace_attach_fail_reason_string): Likewise.
10894         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10895
10896 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10897
10898         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10899
10900 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10901
10902         PR gdb/21559
10903         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10904         checking for fs_base/gs_base fields in struct user_regs_struct.
10905         * configure: Regenerate.
10906
10907 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10908
10909         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10910         function.
10911         (aarch64_linux_init_abi): Install it to gdbarch hook
10912         gcc_target_options.
10913
10914 2018-01-15  Pedro Alves  <palves@redhat.com>
10915
10916         * common/signals-state-save-restore.c
10917         (save_original_signals_state): Fix typos.
10918
10919 2017-01-12  Tom Tromey  <tom@tromey.com>
10920             Sergio Durigan Junior  <sergiodj@redhat.com>
10921
10922         * Makefile.in (install-only): Install gdb-add-index.
10923
10924 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10925
10926         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10927
10928 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10929
10930         * infrun.c (keep_going_pass_signal): Clear step-over info when
10931         insert_breakpoints fails.
10932
10933 2018-01-11  Pedro Alves  <palves@redhat.com>
10934
10935         PR gdb/22583
10936         * infrun.c (resume): Rename to ...
10937         (resume_1): ... this.
10938         (resume): Reimplement as wrapper around resume_1.
10939
10940 2018-01-11  Pedro Alves  <palves@redhat.com>
10941
10942         PR remote/22597
10943         * remote.c (remote_parse_stop_reply): Default to the last-set
10944         general thread instead of to 'magic_null_ptid'.
10945
10946 2018-01-10  Pedro Alves  <palves@redhat.com>
10947
10948         * language.h (language_get_symbol_name_matcher): Rename ...
10949         (get_symbol_name_matcher): ... this.
10950         * language.c (language_get_symbol_name_matcher): Ditto.
10951         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10952         callers adjusted.
10953
10954 2018-01-10  Pedro Alves  <palves@redhat.com>
10955
10956         PR gdb/22670
10957         * dwarf2read.c
10958         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10959         Adjust to use language_get_symbol_name_matcher instead of
10960         language_defn::la_get_symbol_name_matcher.
10961         * language.c (language_get_symbol_name_matcher): If in Ada mode
10962         and the lookup name is a verbatim match, return Ada's matcher.
10963         * language.h (language_get_symbol_name_matcher): Adjust comment.
10964         (ada_lookup_name_info::verbatim_p):: New method.
10965
10966 2018-01-10  Pedro Alves  <palves@redhat.com>
10967
10968         PR gdb/22670
10969         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10970         minsym's language is language_auto or language_cplus, pass down
10971         language_ada instead.
10972         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10973
10974 2018-01-10  Pedro Alves  <palves@redhat.com>
10975
10976         PR gdb/22670
10977         * minsyms.c (linkage_name_str): New function.
10978         (iterate_over_minimal_symbols): Use it.
10979
10980 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10981
10982         * NEWS: Document that 'info proc' now works on FreeBSD.
10983
10984 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10985
10986         * configure.ac: Check for kinfo_getfile in libutil.
10987         * configure: Regenerate.
10988         * config.in: Regenerate.
10989         * fbsd-nat.c: Include "fbsd-tdep.h".
10990         (fbsd_fetch_cmdline): New.
10991         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10992         rather than calling error.
10993         (fbsd_info_proc): New.
10994         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10995         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10996         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10997
10998 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10999
11000         * fbsd-nat.c (struct free_deleter): Remove.
11001         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11002
11003 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11004
11005         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11006         NULL for an empty pathname.
11007
11008 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11009
11010         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11011         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11012         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11013         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11014         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11015         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11016         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11017         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11018         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11019         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11020         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11021         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11022         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11023         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11024         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11025
11026 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11027
11028         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11029         (gnu_xfer_auxv): New function.
11030         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11031         TARGET_OBJECT_AUXV.
11032
11033 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11034             Simon Marchi  <simon.marchi@ericsson.com>
11035
11036         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11037         common/selftest.c.
11038         (COMMON_OBS): Remove selftest.o.
11039         * configure.ac: Append selftest-arch.c and common/selftest.c to
11040         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11041         * configure: Re-generated.
11042         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11043         GDB_SELF_TEST.
11044         (maintenance_info_selftests): Likewise.
11045
11046 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11047
11048         * ada-valprint.c (val_print_packed_array_elements): Use
11049         proper number of elements when printing an array indexed
11050         by an enumeration type.
11051
11052 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11053
11054         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11055         (dw2_get_file_names_reader): Adjust.
11056         (lookup_dwo_signatured_type): Adjust.
11057         (lookup_dwp_signatured_type): Adjust.
11058         (lookup_signatured_type): Adjust.
11059         (create_type_unit_group): Adjust.
11060         (get_type_unit_group): Adjust.
11061         (process_psymtab_comp_unit_reader): Adjust.
11062         (build_type_psymtabs_reader): Adjust.
11063         (scan_partial_symbols): Adjust.
11064         (add_partial_symbol): Adjust.
11065         (add_partial_subprogram): Adjust.
11066         (peek_die_abbrev): Adjust.
11067         (fixup_go_packaging): Adjust.
11068         (process_imported_unit_die): Adjust.
11069         (dwarf2_compute_name): Adjust.
11070         (dwarf2_physname): Adjust.
11071         (read_import_statement): Adjust.
11072         (handle_DW_AT_stmt_list): Adjust.
11073         (read_file_scope): Adjust.
11074         (read_func_scope): Adjust.
11075         (read_lexical_block_scope): Adjust.
11076         (read_call_site_scope): Adjust.
11077         (read_variable): Adjust.
11078         (dwarf2_rnglists_process): Adjust.
11079         (dwarf2_ranges_process): Adjust.
11080         (dwarf2_ranges_read): Adjust.
11081         (dwarf2_get_pc_bounds): Adjust.
11082         (dwarf2_record_block_ranges): Adjust.
11083         (dwarf2_add_field): Adjust.
11084         (dwarf2_add_member_fn): Adjust.
11085         (read_structure_type): Adjust.
11086         (process_structure_scope): Adjust.
11087         (read_enumeration_type): Adjust.
11088         (read_array_type): Adjust.
11089         (mark_common_block_symbol_computed): Adjust.
11090         (read_common_block): Adjust.
11091         (read_namespace_type): Adjust.
11092         (read_namespace): Adjust.
11093         (read_module_type): Adjust.
11094         (read_tag_pointer_type): Adjust.
11095         (read_tag_ptr_to_member_type): Adjust.
11096         (read_tag_string_type): Adjust.
11097         (read_subroutine_type): Adjust.
11098         (read_typedef): Adjust.
11099         (read_base_type): Adjust.
11100         (attr_to_dynamic_prop): Adjust.
11101         (read_subrange_type): Adjust.
11102         (read_unspecified_type): Adjust.
11103         (dwarf2_read_abbrevs): Adjust.
11104         (load_partial_dies): Adjust.
11105         (read_partial_die): Adjust.
11106         (find_partial_die): Adjust.
11107         (guess_partial_die_structure_name): Adjust.
11108         (fixup_partial_die): Adjust.
11109         (read_attribute_value): Adjust.
11110         (read_addr_index): Adjust.
11111         (read_addr_index_from_leb128): Adjust.
11112         (read_str_index): Adjust.
11113         (dwarf2_string_attr): Adjust.
11114         (get_debug_line_section): Adjust.
11115         (dwarf_decode_line_header): Adjust.
11116         (lnp_state_machine::check_line_address): Adjust.
11117         (dwarf_decode_lines_1): Adjust.
11118         (dwarf_decode_lines): Adjust.
11119         (dwarf2_start_symtab): Adjust.
11120         (var_decode_location): Adjust.
11121         (new_symbol_full): Adjust.
11122         (dwarf2_const_value_data): Adjust.
11123         (dwarf2_const_value_attr): Adjust.
11124         (dwarf2_const_value): Adjust.
11125         (die_type): Adjust.
11126         (die_containing_type): Adjust.
11127         (build_error_marker_type): Adjust.
11128         (lookup_die_type): Adjust.
11129         (guess_full_die_structure_name): Adjust.
11130         (anonymous_struct_prefix): Adjust.
11131         (determine_prefix): Adjust.
11132         (dwarf2_name): Adjust.
11133         (follow_die_ref_or_sig): Adjust.
11134         (follow_die_offset): Adjust.
11135         (follow_die_ref): Adjust.
11136         (follow_die_sig_1): Adjust.
11137         (follow_die_sig): Adjust.
11138         (get_signatured_type): Adjust.
11139         (get_DW_AT_signature_type): Adjust.
11140         (decode_locdesc): Adjust.
11141         (dwarf_decode_macros): Adjust.
11142         (cu_debug_loc_section): Adjust.
11143         (fill_in_loclist_baton): Adjust.
11144         (dwarf2_symbol_mark_computed): Adjust.
11145         (init_one_comp_unit): Don't assign
11146         dwarf2_cu::dwarf2_per_objfile.
11147         (set_die_type): Adjust.
11148
11149 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11150
11151         * dwarf2read.c (struct mapped_debug_names): Add constructor.
11152         <dwarf2_per_objfile>: New field.
11153         (dwarf2_per_objfile): Remove global.
11154         (get_dwarf2_per_objfile): New function.
11155         (set_dwarf2_per_objfile): New function.
11156         (dwarf2_build_psymtabs_hard): Change objfile parameter to
11157         dwarf2_per_objfile.
11158         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11159         (read_abbrev_offset): Likewise.
11160         (read_indirect_string): Likewise.
11161         (read_indirect_line_string): Likewise.
11162         (read_indirect_string_at_offset): Likewise.
11163         (read_indirect_string_from_dwz): Likewise.
11164         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11165         dwarf2_per_objfile.
11166         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11167         (create_all_comp_units): Change objfile parameter to
11168         dwarf2_per_objfile.
11169         (create_all_type_units): Likewise.
11170         (process_queue): Add dwarf2_per_objfile parameter.
11171         (read_and_check_comp_unit_head): Likewise.
11172         (lookup_dwo_unit_in_dwp): Likewise.
11173         (get_dwp_file): Likewise.
11174         (process_cu_includes): Likewise.
11175         (struct free_dwo_file_cleanup_data): New struct.
11176         (dwarf2_has_info): Use get_dwarf2_per_objfile and
11177         set_dwarf2_per_objfile.
11178         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11179         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11180         context, adjust calls.
11181         (dw2_instantiate_symtab): Likewise.
11182         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11183         (dw2_get_cu): Likewise.
11184         (create_cu_from_index_list): Change objfile parameter to
11185         dwarf2_per_objfile.
11186         (create_cus_from_index_list): Get dwarf2_per_objfile from
11187         context, adjust calls.
11188         (create_cus_from_index): Likewise.
11189         (create_signatured_type_table_from_index): Change objfile
11190         parameter to dwarf2_per_objfile.
11191         (create_signatured_type_table_from_debug_names): Change objfile
11192         parameter to dwarf2_per_objfile.
11193         (create_addrmap_from_index): Likewise.
11194         (create_addrmap_from_aranges): Likewise.
11195         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11196         (dw2_setup): Remove.
11197         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11198         context.
11199         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11200         get_dwarf2_per_objfile.
11201         (dw2_forget_cached_source_info): Likewise.
11202         (dw2_map_symtabs_matching_filename): Likewise.
11203         (struct dw2_symtab_iterator) <index>: Remove.
11204         <dwarf2_per_objfile>: New field.
11205         (dw2_symtab_iter_init): Replace index parameter with
11206         dwarf2_per_objfile.
11207         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11208         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11209         (dw2_print_stats): Likewise.
11210         (dw2_dump): Likewise.
11211         (dw2_expand_symtabs_for_function): Likewise.
11212         (dw2_expand_all_symtabs): Likewise.
11213         (dw2_expand_symtabs_with_fullname): Likewise.
11214         (dw2_expand_marked_cus): Replace index and objfile parameters
11215         with dwarf2_per_objfile.
11216         (dw_expand_symtabs_matching_file_matcher): Add
11217         dwarf2_per_objfile parameter and adjust calls.
11218         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11219         adjust calls.
11220         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11221         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11222         adjust calls.
11223         (create_cus_from_debug_names_list): Replace objfile parameter
11224         with dwarf2_per_objfile and adjust calls.
11225         (create_cus_from_debug_names): Likewise.
11226         (dwarf2_read_debug_names): Likewise.
11227         (mapped_debug_names::namei_to_name): Adjust call.
11228         (dw2_debug_names_iterator::next): Likewise.
11229         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11230         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11231         (dw2_debug_names_dump): Likewise.
11232         (dw2_debug_names_expand_symtabs_for_function): Likewise.
11233         (dw2_debug_names_expand_symtabs_matching): Likewise.
11234         (dwarf2_initialize_objfile): Likewise.
11235         (dwarf2_build_psymtabs): Likewise.
11236         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11237         this_cu.
11238         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11239         (read_and_check_comp_unit_head): Likewise.
11240         (read_abbrev_offset): Likewise.
11241         (create_debug_type_hash_table): Likewise.
11242         (create_debug_types_hash_table): Likewise.
11243         (create_all_type_units): Replace objfile parameter with
11244         dwarf2_per_objfile.
11245         (add_type_unit): Add dwarf2_per_objfile parameter.
11246         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11247         with dwarf2_per_objfile.
11248         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11249         (lookup_dwp_signatured_type): Likewise.
11250         (lookup_signatured_type): Likewise.
11251         (read_cutu_die_from_dwo): Likewise.
11252         (init_tu_and_read_dwo_dies): Likewise.
11253         (init_cutu_and_read_dies): Likewise.
11254         (init_cutu_and_read_dies_no_follow): Likewise.
11255         (allocate_type_unit_groups_table): Add objfile parameter.
11256         (create_type_unit_group): Use dwarf2_per_objfile from cu.
11257         (get_type_unit_group): Likewise.
11258         (process_psymtab_comp_unit): Update call.
11259         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11260         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11261         (print_tu_stats): Likewise.
11262         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11263         in void* parameter.
11264         (build_type_psymtabs): Change objfile parameter to
11265         dwarf2_per_objfile.
11266         (process_skeletonless_type_unit): Use dwarf2_per_objfile
11267         passed in void* parameter.
11268         (process_skeletonless_type_units): Change objfile parameter to
11269         dwarf2_per_objfile.
11270         (set_partial_user): Likewise.
11271         (dwarf2_build_psymtabs_hard): Likewise.
11272         (read_comp_units_from_section): Likewise.
11273         (create_all_comp_units): Likewise.
11274         (scan_partial_symbols): Update calls.
11275         (add_partial_symbol): Likewise.
11276         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11277         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11278         (process_queue): Add dwarf2_per_objfile parameter.
11279         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11280         (compute_compunit_symtab_includes): Likewise.
11281         (process_cu_includes): Add dwarf2_per_objfile parameter.
11282         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11283         (process_full_type_unit): Likewise.
11284         (process_imported_unit_die): Update call.
11285         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11286         (read_file_scope): Likewise.
11287         (allocate_dwo_file_hash_table): Add objfile parameter.
11288         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11289         (create_cus_hash_table): Likewise.
11290         (create_dwp_hash_table): Likewise.
11291         (create_dwo_unit_in_dwp_v1): Likewise.
11292         (create_dwp_v2_section): Likewise.
11293         (create_dwo_unit_in_dwp_v2): Likewise.
11294         (lookup_dwo_unit_in_dwp): Likewise.
11295         (try_open_dwop_file): Likewise.
11296         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11297         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11298         cleanup to include a reference to dwarf2_per_objfile.
11299         (open_dwp_file): Add dwarf2_per_objfile parameter.
11300         (open_and_init_dwp_file): Likewise.
11301         (get_dwp_file): Likewise.
11302         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11303         (queue_and_load_all_dwo_tus): Update call.
11304         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11305         data.
11306         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11307         (dwarf2_ranges_process): Likewise.
11308         (dwarf2_get_pc_bounds): Likewise.
11309         (mark_common_block_symbol_computed): Likewise.
11310         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11311         (dwarf2_read_abbrevs): Update call.
11312         (read_partial_die): Use dwarf2_per_objfile from cu.
11313         (find_partial_die): Likewise.
11314         (fixup_partial_die): Likewise.
11315         (read_attribute_value): Likewise.
11316         (read_indirect_string_at_offset_from): Add objfile parameter.
11317         (read_indirect_string_at_offset): Add dwarf2_per_objfile
11318         parameter.
11319         (read_indirect_string_from_dwz): Add objfile parameter.
11320         (read_indirect_string): Add objfile parameter.
11321         (read_addr_index_1): Add dwarf2_per_objfile parameter.
11322         (read_addr_index): Use dwarf2_per_objfile from cu.
11323         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11324         call dw2_setup.
11325         (read_str_index): Use dwarf2_per_objfile from cu.
11326         (get_debug_line_section): Likewise.
11327         (read_formatted_entries): Add dwarf2_per_objfile parameter.
11328         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11329         (new_symbol_full): Use dwarf2_per_objfile from cu.
11330         (build_error_marker_type): Likewise.
11331         (lookup_die_type): Likewise.
11332         (determine_prefix): Likewise.
11333         (follow_die_offset): Likewise.
11334         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11335         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11336         (dwarf2_fetch_die_type_sect_off): Likewise.
11337         (dwarf2_get_die_type): Likewise.
11338         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11339         (get_signatured_type): Likewise.
11340         (get_DW_AT_signature_type): Likewise.
11341         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11342         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11343         (cu_debug_loc_section): Likewise.
11344         (fill_in_loclist_baton): Likewise.
11345         (dwarf2_symbol_mark_computed): Likewise.
11346         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11347         dwarf2_per_objfile.
11348         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11349         parameter.
11350         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11351         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11352         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11353         (set_die_type): Use dwarf2_free_objfile from cu.
11354         (get_die_type_at_offset): Likewise.
11355         (dwarf2_per_objfile_free): Don't assign global variable.
11356         (debug_names) <constructor>: Add dwarf2_per_objfile
11357         parameter, update m_debugstrlookup construction.
11358         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11359         parameter.
11360         <m_dwarf2_per_objfile>: New field.
11361         <lookup>: Use m_dwarf2_per_objfile.
11362         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11363         (psyms_seen_size): Likewise.
11364         (write_gdbindex): Replace objfile parameter with
11365         dwarf2_per_objfile.
11366         (write_debug_names): Likewise.
11367         (write_psymtabs_to_index): Likewise.
11368         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11369         calls.
11370
11371 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11372
11373         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11374         <dwarf2_per_objfile>: New field.
11375         (struct dwarf2_per_cu_data) <objfile>: Remove.
11376         <dwarf2_per_objfile>: New field.
11377         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11378         of objfile.
11379         (create_signatured_type_table_from_index): Likewise.
11380         (create_debug_type_hash_table): Likewise.
11381         (fill_in_sig_entry_from_dwo_entry): Likewise.
11382         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11383         (create_type_unit_group): Assign dwarf2_per_objfile instead of
11384         objfile.
11385         (create_partial_symtab): Access objfile through
11386         dwarf2_per_objfile.
11387         (process_psymtab_comp_unit_reader): Likewise.
11388         (read_comp_units_from_section): Likewise.
11389         (scan_partial_symbols): Likewise.
11390         (add_partial_symbol): Likewise.
11391         (add_partial_subprogram): Likewise.
11392         (peek_die_abbrev): Likewise.
11393         (fixup_go_packaging): Likewise.
11394         (process_full_comp_unit): Likewise.
11395         (process_full_type_unit): Likewise.
11396         (process_imported_unit_die): Likewise.
11397         (dwarf2_compute_name): Likewise.
11398         (dwarf2_physname): Likewise.
11399         (read_import_statement): Likewise.
11400         (create_cus_hash_table): Assign dwarf2_physname instead of
11401         objfile.
11402         (read_func_scope): Access objfile through dwarf2_per_objfile.
11403         (read_lexical_block_scope): Likewise.
11404         (read_call_site_scope): Likewise.
11405         (read_variable): Likewise.
11406         (dwarf2_rnglists_process): Likewise.
11407         (dwarf2_ranges_process): Likewise.
11408         (dwarf2_ranges_read): Likewise.
11409         (dwarf2_record_block_ranges): Likewise.
11410         (dwarf2_add_field): Likewise.
11411         (dwarf2_add_member_fn): Likewise.
11412         (read_structure_type): Likewise.
11413         (process_structure_scope): Likewise.
11414         (read_enumeration_type): Likewise.
11415         (read_array_type): Likewise.
11416         (read_common_block): Likewise.
11417         (read_namespace_type): Likewise.
11418         (read_namespace): Likewise.
11419         (read_module_type): Likewise.
11420         (read_tag_pointer_type): Likewise.
11421         (read_tag_ptr_to_member_type): Likewise.
11422         (read_tag_string_type): Likewise.
11423         (read_subroutine_type): Likewise.
11424         (read_typedef): Likewise.
11425         (read_base_type): Likewise.
11426         (attr_to_dynamic_prop): Likewise.
11427         (read_subrange_type): Likewise.
11428         (read_unspecified_type): Likewise.
11429         (load_partial_dies): Likewise.
11430         (read_partial_die): Likewise.
11431         (find_partial_die): Likewise.
11432         (guess_partial_die_structure_name): Likewise.
11433         (fixup_partial_die): Likewise.
11434         (read_attribute_value): Likewise.
11435         (read_addr_index_from_leb128): Likewise.
11436         (dwarf2_read_addr_index): Likewise.
11437         (dwarf2_string_attr): Likewise.
11438         (lnp_state_machine::check_line_address): Likewise.
11439         (dwarf_decode_lines_1): Likewise.
11440         (dwarf_decode_lines): Likewise.
11441         (dwarf2_start_symtab): Likewise.
11442         (var_decode_location): Likewise.
11443         (new_symbol_full): Likewise.
11444         (dwarf2_const_value_data): Likewise.
11445         (dwarf2_const_value_attr): Likewise.
11446         (dwarf2_const_value): Likewise.
11447         (die_type): Likewise.
11448         (die_containing_type): Likewise.
11449         (lookup_die_type): Likewise.
11450         (guess_full_die_structure_name): Likewise.
11451         (anonymous_struct_prefix): Likewise.
11452         (dwarf2_name): Likewise.
11453         (follow_die_ref_or_sig): Likewise.
11454         (follow_die_offset): Likewise.
11455         (follow_die_ref): Likewise.
11456         (dwarf2_fetch_die_loc_sect_off): Likewise.
11457         (dwarf2_fetch_constant_bytes): Likewise.
11458         (dwarf2_fetch_die_type_sect_off): Likewise.
11459         (dwarf2_get_die_type): Likewise.
11460         (follow_die_sig): Likewise.
11461         (decode_locdesc): Likewise.
11462         (dwarf2_per_cu_objfile): Likewise.
11463         (dwarf2_per_cu_text_offset): Likewise.
11464         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11465         objfile.
11466         (set_die_type): Access objfile through
11467         dwarf2_per_objfile.
11468
11469 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11470
11471         * valprint.c (converted_character_d): Remove typedef.
11472         (DEF_VEC_O (converted_character_d)): Remove.
11473         (count_next_character): Use std::vector.
11474         (print_converted_chars_to_obstack): Likewise.
11475         (generic_printstr): Likewise.
11476
11477 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11478
11479         * xml-support.h (struct gdb_xml_value): Add constructor.
11480         <value>: Change type to unique_xmalloc_ptr.
11481         (gdb_xml_value_s): Remove typedef.
11482         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11483         (gdb_xml_element_start_handler): Change parameter type to
11484         std::vector.
11485         (xml_find_attribute): Likewise.
11486         * xml-support.c (xml_find_attribute): Change parameter type to
11487         std::vector and adjust.
11488         (gdb_xml_values_cleanup): Remove.
11489         (gdb_xml_parser::start_element): Adjust to std::vector.
11490         (xinclude_start_include): Change paraeter type to std::vector
11491         and adjust.
11492         * btrace.c (check_xml_btrace_version): Likewise.
11493         (parse_xml_btrace_block): Likewise.
11494         (parse_xml_btrace_pt_config_cpu): Likewise.
11495         (parse_xml_btrace_pt): Likewise.
11496         (parse_xml_btrace_conf_bts): Likewise.
11497         (parse_xml_btrace_conf_pt): Likewise.
11498         * memory-map.c (memory_map_start_memory): Likewise.
11499         (memory_map_start_property): Likewise.
11500         * osdata.c (osdata_start_osdata): Likewise.
11501         (osdata_start_item): Likewise.
11502         (osdata_start_column): Likewise.
11503         * remote.c (start_thread): Likewise.
11504         * solib-aix.c (library_list_start_library): Likewise.
11505         (library_list_start_list): Likewise.
11506         * solib-svr4.c (library_list_start_library): Likewise.
11507         (svr4_library_list_start_list): Likewise.
11508         * solib-target.c (library_list_start_segment): Likewise.
11509         (library_list_start_section): Likewise.
11510         (library_list_start_library): Likewise.
11511         (library_list_start_list): Likewise.
11512         * tracepoint.c (traceframe_info_start_memory): Likewise.
11513         (traceframe_info_start_tvar): Likewise.
11514         * xml-syscall.c (syscall_start_syscall): Likewise.
11515         * xml-tdesc.c (tdesc_start_target): Likewise.
11516         (tdesc_start_feature): Likewise.
11517         (tdesc_start_reg): Likewise.
11518         (tdesc_start_union): Likewise.
11519         (tdesc_start_struct): Likewise.
11520         (tdesc_start_flags): Likewise.
11521         (tdesc_start_enum): Likewise.
11522         (tdesc_start_field): Likewise.
11523         (tdesc_start_enum_value): Likewise.
11524         (tdesc_start_vector): Likewise.
11525
11526 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11527
11528         * extension.h (struct xmethod_worker) <clone>: Remove.
11529         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11530         Remove.
11531         (python_xmethod_worker::clone): Remove.
11532         * valops.c (find_overload_match): Use std::move instead of
11533         clone.
11534
11535 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11536
11537         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11538         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11539         <free_xmethod_worker_data>: Remove.
11540         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11541         <get_xmethod_arg_types>: Remove.
11542         <get_xmethod_result_type>: Remove.
11543         <invoke_xmethod>: Remove.
11544         * extension.c (new_xmethod_worker): Remove.
11545         (clone_xmethod_worker): Remove.
11546         (get_matching_xmethod_workers): Return void, pass std::vector by
11547         pointer.
11548         (get_xmethod_arg_types): Rename to...
11549         (xmethod_worker::get_arg_types): ... this, and adjust.
11550         (get_xmethod_result_type): Rename to...
11551         (xmethod_worker::get_result_type): ... this, and adjust.
11552         (invoke_xmethod): Remove.
11553         (free_xmethod_worker): Remove.
11554         (free_xmethod_worker_vec): Remove.
11555         * extension.h (enum ext_lang_rc): Move here from
11556         extension-priv.h.
11557         (struct xmethod_worker): Add constructor and destructor.
11558         <data>: Remove.
11559         <value>: Remove.
11560         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11561         virtual pure methods.
11562         <get_arg_types, get_result_type>: New methods.
11563         (xmethod_worker_ptr): Remove typedef.
11564         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11565         (xmethod_worker_vec): Remove typedef.
11566         (xmethod_worker_up): New typedef.
11567         (invoke_xmethod): Remove.
11568         (clone_xmethod_worker): Remove.
11569         (free_xmethod_worker): Remove.
11570         (free_xmethod_worker_vec): Remove.
11571         (get_xmethod_arg_types): Remove.
11572         (get_xmethod_result_type): Remove.
11573         * valops.c (find_method_list): Use std::vector, don't use
11574         intermediate vector.
11575         (value_find_oload_method_list): Use std::vector.
11576         (find_overload_match): Use std::vector.
11577         (find_oload_champ): Use std::vector.
11578         * value.c (value_free): Use operator delete.
11579         (value_of_xmethod): Rename to...
11580         (value_from_xmethod): ... this.  Don't assign
11581         xmethod_worker::value, take rvalue-reference.
11582         (result_type_of_xmethod): Adjust.
11583         (call_xmethod): Adjust.
11584         * value.h: Include extension.h.
11585         (struct xmethod_worker): Don't forward-declare.
11586         (value_of_xmethod): Rename to...
11587         (value_from_xmethod): ... this, take rvalue-reference.
11588         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11589         (struct python_xmethod_worker): ... this, add constructor and
11590         destructor.
11591         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11592         (gdbpy_free_xmethod_worker_data): Rename to...
11593         (python_xmethod_worker::~python_xmethod_worker): ... this and
11594         adjust.
11595         (gdbpy_clone_xmethod_worker_data): Rename to...
11596         (python_xmethod_worker::clone): ... this and adjust.
11597         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11598         temporary vector.
11599         (gdbpy_get_xmethod_arg_types): Rename to...
11600         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11601         (gdbpy_get_xmethod_result_type): Rename to...
11602         (python_xmethod_worker::do_get_result_type): ... this and
11603         adjust.
11604         (gdbpy_invoke_xmethod): Rename to...
11605         (python_xmethod_worker::invoke): ... this and adjust.
11606         (new_python_xmethod_worker): Rename to...
11607         (python_xmethod_worker::python_xmethod_worker): ... this and
11608         adjust.
11609         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11610         Remove.
11611         (gdbpy_free_xmethod_worker_data): Remove.
11612         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11613         (gdbpy_get_xmethod_arg_types): Remove.
11614         (gdbpy_get_xmethod_result_type): Remove.
11615         (gdbpy_invoke_xmethod): Remove.
11616         * python/python.c (python_extension_ops): Remove obsolete
11617         callbacks.
11618
11619 2018-01-05  Pedro Alves  <palves@redhat.com>
11620
11621         PR gdb/18653
11622         * common/signals-state-save-restore.c
11623         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11624         find a custom handler preinstalled, instead of internal erroring.
11625         But only warn if !quiet.
11626         * common/signals-state-save-restore.h
11627         (save_original_signals_state): New parameter 'quiet'.
11628         * main.c (captured_main_1): Move save_original_signals_state call
11629         after option handling, and pass QUIET.
11630
11631 2018-01-05  Pedro Alves  <palves@redhat.com>
11632
11633         * spu-tdep.c (spu_catch_start): Pass
11634         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11635
11636 2018-01-05  Pedro Alves  <palves@redhat.com>
11637
11638         PR gdb/22670
11639         * ada-lang.c (literal_symbol_name_matcher): New function.
11640         (ada_get_symbol_name_matcher): Use it for
11641         symbol_name_match_type::SEARCH_NAME.
11642         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11643         it down instead of assuming symbol_name_match_type::FULL.
11644         * block.h (block_lookup_symbol): New parameter 'match_type'.
11645         * c-valprint.c (print_unpacked_pointer): Use
11646         lookup_symbol_search_name instead of lookup_symbol.
11647         * compile/compile-object-load.c (get_out_value_type): Pass down
11648         symbol_name_match_type::SEARCH_NAME.
11649         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11650         symbol_name_match_type::FULL.
11651         * cp-support.c (cp_get_symbol_name_matcher): Handle
11652         symbol_name_match_type::SEARCH_NAME.
11653         * infrun.c (insert_exception_resume_breakpoint): Use
11654         lookup_symbol_search_name.
11655         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11656         * psymtab.c (maintenance_check_psymtabs): Use
11657         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11658         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11659         SYMBOL_SEARCH_NAME.
11660         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11661         if symbol_name_match_type::SEARCH_NAME.
11662         (lookup_symbol_in_language): Pass down
11663         symbol_name_match_type::FULL.
11664         (lookup_symbol_search_name): New.
11665         (lookup_language_this): Pass down
11666         symbol_name_match_type::SEARCH_NAME.
11667         (lookup_symbol_aux, lookup_local_symbol): New parameter
11668         'match_type'.  Pass it down.
11669         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11670         (lookup_symbol_search_name): New declaration.
11671         (lookup_symbol_in_block): New 'match_type' parameter.
11672
11673 2018-01-05  Pedro Alves  <palves@redhat.com>
11674
11675         PR gdb/22670
11676         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11677         ada_lookup_symbol.
11678         (ada_lookup_symbol): Reimplement in terms of
11679         ada_lookup_symbol_list, bits factored out from
11680         ada_lookup_encoded_symbol.
11681
11682 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11683
11684         * ada-exp.y (write_object_renaming): When subscripting an array
11685         using a symbol as the index, pass the block in call to
11686         ada_lookup_encoded_symbol when looking that symbol up.
11687
11688 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11689
11690         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11691         TYPE_INDEX_TYPE.
11692
11693 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11694
11695         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11696         the case where VALUE_LVAL (val0) is not lval_memory.
11697
11698 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11699
11700         * ada-valprint.c (print_optional_low_bound): Handle
11701         character-indexed array printing like boolean-indexed array
11702         printing.
11703
11704 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11705
11706         * NEWS: Create a new section for the next release branch.
11707         Rename the section of the current branch, now that it has
11708         been cut.
11709
11710 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11711
11712         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11713         * version.in: Bump version to 8.1.50.DATE-git.
11714
11715 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11716
11717         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11718         Add field.
11719         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11720         Add field.
11721         (default_exception_support_info) <catch_handlers_sym>: Add field.
11722         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11723         (ada_exception_name_addr_1): Add "catch handlers" handling.
11724         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11725         Update all callers.
11726         (create_excep_cond_exprs) <ex>: Add parameter.
11727         (re_set_exception): Update create_excep_cond_exprs call.
11728         (print_it_exception, print_one_exception, print_mention_exception)
11729         (print_recreate_exception): Add "catch handler" handling.
11730         (allocate_location_catch_handlers, re_set_catch_handlers)
11731         (check_status_catch_handlers, print_it_catch_handlers)
11732         (print_one_catch_handlers, print_mention_catch_handlers)
11733         (print_recreate_catch_handlers): New function.
11734         (catch_handlers_breakpoint_ops): New variable.
11735         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11736         Add parameter.  Add "catch handler" handling.
11737         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11738         Add "catch handler" handling.
11739         (ada_exception_catchpoint_cond_string): Add "catch handler"
11740         handling.
11741         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11742         call.
11743         (catch_ada_handlers_command): New function.
11744         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11745         operations structure.
11746         (_initialize_ada_language): Add "catch handlers" command entry.
11747         * NEWS: Document "catch handlers" feature.
11748
11749 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11750
11751         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11752         account when creating the array type of the slice.
11753         (ada_value_slice): Likewise.
11754
11755 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11756
11757         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11758         New enum value.
11759         (create_array_type_with_stride): Add byte_stride_prop parameter.
11760         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11761         New parameter.  Update all callers in this file.
11762         (array_type_has_dynamic_stride): New function.
11763         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11764         of arrays with dynamic byte strides.
11765         * dwarf2read.c (read_array_type): Add support for dynamic
11766         DW_AT_byte_stride attributes.
11767
11768 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11769
11770         * dwarf2read.c (read_unspecified_type): Treat
11771         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11772
11773 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11774
11775         Update copyright year range in all GDB files.
11776
11777 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11778
11779         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11780         and gdb/testsuite/gdb.base/step-line.c.
11781
11782 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11783
11784         * copyright.py (main): Dump the contents of
11785         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11786         even if BY_HAND is empty.
11787
11788 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11789
11790         * top.c (print_gdb_version): Update Copyright year in version
11791         message.
11792
11793 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11794
11795         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11796
11797 For older changes see ChangeLog-2017.
11798 \f
11799 Local Variables:
11800 mode: change-log
11801 left-margin: 8
11802 fill-column: 74
11803 version-control: never
11804 coding: utf-8
11805 End: