Disassemble blocks with non-contiguous ranges
[external/binutils.git] / gdb / ChangeLog
1 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2
3         * block.h (blockrange, blockranges): New struct declarations.
4         (struct block): Add new field named `ranges'.
5         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
6         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
7         macros for accessing ranges in struct block.
8         (make_blockranges): New declaration.
9         block.c (make_blockranges): New function.
10         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
11         for block.
12         * symtab.h (find_pc_partial_function): Add new parameter `block'.
13         * blockframe.c (cache_pc_function_block): New static global.
14         (clear_pc_function_cache): Clear cache_pc_function_block.
15         (find_pc_partial_function): Move comment to symtab.h.  Add
16         support for non-contiguous blocks.
17         * cli/cli-cmds.c (block.h): Include.
18         (print_disassembly): Handle printing of non-contiguous blocks.
19         (disassemble_current_function): Likewise.
20         (disassemble_command): Likewise.
21
22 2018-08-23  Xavier Roirand  <roirand@adacore.com>
23
24         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
25         incrementation.
26
27 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
28
29         * solib-svr4.c (read_program_headers_from_bfd): Return
30         gdb::optional<gdb::byte_vector>.
31         (svr4_exec_displacement): Adjust.
32
33 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
34
35         * solib-svr4.c (read_program_header): Return
36         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
37         (find_program_interpreter): Return
38         gdb::optional<gdb::byte_vector>.
39         (scan_dyntag_auxv): Adjust.
40         (enable_break): Adjust.
41         (svr4_exec_displacement): Adjust.
42
43 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
44
45         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
46         * inf-child.c (inf_child_target::terminal_save_inferior): New.
47
48 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
49
50         * guile/scm-string.c (gdbscm_scm_from_printf): Use
51         string_vprintf.
52         * guile/scm-utils.c (gdbscm_printf): Likewise.
53         * serial.c (serial_printf): Likewise.
54         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
55
56 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
57
58         * stack.c (print_frame): Print frame architecture when printing on
59         an MI output.
60         * NEWS: Mention new "arch" attribute in frame output.
61
62 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
63
64         * arch/aarch64.h (aarch64_regnum): Update comment.
65
66 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
67
68         * NEWS: Add SVE to 8.2 section.
69
70 2018-08-21  Pedro Alves  <palves@redhat.com>
71
72         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
73         out from gdbscm_parse_function_args.
74         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
75         gdbscm_parse_function_args_1.
76
77 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
78
79         PR gdb/17816
80         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
81         operator.
82
83 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
84
85         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
86
87 2018-08-19  Michael Spang  <spang@google.com>
88
89         PR gdb/11786
90         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
91         for PT_TLS segments.
92
93 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
94
95         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
96         dwarf_variable_value.
97         * dwarf2-frame.c (class dwarf_expr_executor):
98         Add override for dwarf_variable_value.
99         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
100         (class symbol_needs_eval_context): Likewise.
101         (indirect_synthetic_pointer): Add forward declaration.
102         (sect_variable_value): New function.
103         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
104         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
105         for DW_OP_GNU_variable_value.
106
107 2018-08-16  Tom Tromey  <tom@tromey.com>
108
109         * top.c (read_command_file): Update.
110         (command_line_input): Remove "repeat" argument.
111         * ada-lang.c (get_selections): Update.
112         * linespec.c (decode_line_2): Update.
113         * defs.h (command_line_input): Remove argument.
114         * cli/cli-script.c (read_next_line): Update.
115         * python/py-gdb-readline.c: Update.
116
117 2018-08-17  Tom Tromey  <tom@tromey.com>
118
119         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
120         command_line_input.
121
122 2018-08-15  Tom Tromey  <tom@tromey.com>
123
124         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
125
126 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
127
128         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
129         If used, use find_pc_partial_function to find address range
130         to disassemble.
131         * mi/mi-main.c (mi_cmd_list_features): Report
132         "data-disassemble-a-option" feature.
133         * NEWS: Mention new -data-disassemble option -a.
134
135 2018-08-13  Tom Tromey  <tom@tromey.com>
136
137         * common/common-defs.h (_FORTIFY_SOURCE): Define.
138
139 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
140
141         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
142         (aarch64_linux_collect_sve_regset): Likewise.
143         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
144         * regcache.h (regcache_map_entry_size): New function.
145
146 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
147
148         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
149         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
150         (SVE_HEADER_VL_LENGTH): Likewise.
151         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
152         (SVE_HEADER_FLAGS_LENGTH): Likewise.
153         (SVE_HEADER_RESERVED_LENGTH): Likewise.
154         (SVE_HEADER_SIZE_OFFSET): Likewise.
155         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
156         (SVE_HEADER_VL_OFFSET): Likewise.
157         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
158         (SVE_HEADER_FLAGS_OFFSET): Likewise.
159         (SVE_HEADER_RESERVED_OFFSET): Likewise.
160         (SVE_HEADER_SIZE): Likewise.
161         (aarch64_linux_core_read_vq): Add function.
162         (aarch64_linux_core_read_description): Check for SVE section.
163
164 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
165
166         * aarch64-fbsd-tdep.c
167         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
168         collect_size.
169         * aarch64-linux-tdep.c
170         (aarch64_linux_iterate_over_regset_sections): Likewise.
171         * alpha-linux-tdep.c
172         (alpha_linux_iterate_over_regset_sections):
173         * alpha-nbsd-tdep.c
174         (alphanbsd_iterate_over_regset_sections): Likewise.
175         * amd64-fbsd-tdep.c
176         (amd64fbsd_iterate_over_regset_sections): Likewise.
177         * amd64-linux-tdep.c
178         (amd64_linux_iterate_over_regset_sections): Likewise.
179         * arm-bsd-tdep.c
180         (armbsd_iterate_over_regset_sections): Likewise.
181         * arm-fbsd-tdep.c
182         (arm_fbsd_iterate_over_regset_sections): Likewise.
183         * arm-linux-tdep.c
184         (arm_linux_iterate_over_regset_sections): Likewise.
185         * corelow.c (get_core_registers_cb): Likewise.
186         (core_target::fetch_registers): Likewise.
187         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
188         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
189         * gdbarch.h (void): Regenerate.
190         * gdbarch.sh: Add supply_size and collect_size.
191         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
192         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
193         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
194         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
195         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
196         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
197         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
198         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
199         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
200         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
201         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
202         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
203         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
204         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
205         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
206         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
207         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
208         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
209         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
210         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
211         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
212         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
213         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
214         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
215         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
216         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
217         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
218         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
219         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
220         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
221
222 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
223
224         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
225         with string_printf.
226
227 2018-08-10  Keith Seitz  <keiths@redhat.com>
228
229         * compile/compile-c-support.c (add_code_header, add_code_footer):
230         Move into policy class.
231         (c_push_user_expression, pop_user_expression_nop)
232         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
233         (compile_program): New host class.
234         (c_compile_program): New typedef.
235         (c_compute_porgram): Use c_compile_program.
236
237 2018-08-10  Keith Seitz  <keiths@redhat.com>
238
239         * compile/compile-internal.h (compile_instance::~compile_instance):
240         Remove calls to htab_delete.
241         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
242         * compile.c (compile_instance::compile_instance): Initialize
243         htab unique pointers.
244         (compile_instance::get_cached_type, compile_instance::insert_type)
245         (compile_instance::error_symbol_once): Update for unique_ptr.
246
247 2018-08-10  Keith Seitz  <keiths@redhat.com>
248
249         * compile/compile-c-symbols.c (struct symbol_error)
250         (hash_symbol_error, eq_symbol_error, del_symbol_error)
251         (compile_instance::insert_symbol_error)
252         (compile_instance::error_symbol_once): Move to ...
253         * compile/compile.c: ... here.
254
255 2018-08-10  Keith Seitz  <keiths@redhat.com>
256
257         * compile/compile-c-support.c (c_get_compile_context): Use `new'
258         instead of `new_compile_instance'.
259         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
260         Update description.
261         If the symbol error map is not initialized, create it.
262         (generate_c_for_for_one_symbol): Do not check/initialize
263         the symbol error map.
264         * compile/compile-c-types.c (compile_c_instance): Make a class.
265         Update all callers.
266         (compile_instance::compile_instance): Initialize the type cache.
267         (get_cached_type): New function.
268         (insert_type): Update description.
269         (compile_c_instance::m_default_cflags): Define.
270         (convert_type): Update description.  Use get_cached_type.
271         (delete_instance): Moved to destructor.
272         (new_compile_instance): Moved to constructor.
273         * compile/compile-c.h (compile_c_instance): Make class inheriting
274         from compile_instance.
275         <base>: Remove field.
276         <type_map, symbol_err_map>: Move to base class.
277         <c_plugin>: Rename to `m_plugin' and remove pointer type.
278         * compile/compile-internal.h (compile_instance): Make class.
279         <type_map_t, symbol_err_map_t>: Define.
280         <fe>: Rename to `m_gcc_fe'.
281         <scope, block, gcc_target_options>: Add `m_' prefix.
282         <m_type_map, m_symbol_err_map>: New fields, moved from
283         compile_c_instance.
284         <destroy>: Remove.
285         (convert_type, new_compile_instance): Remove.
286         * compile/compile.c (cleanup_compile_instance): Remove.
287         (compile_to_object): Use unique_ptr to eliminate cleanups.
288         (compile_instance::set_print_callback, compile_instance::version)
289         (compile_instance::set_verbose)
290         (compile_instance::set_driver_filename)
291         (compile_instance::set_triplet_regexp)
292         (compile_instance::set_arguments)
293         (compile_instance::set_source_file)
294         (compile_instance::compile): Define.
295
296 2018-08-10  Keith Seitz  <keiths@redhat.com>
297
298         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
299         * compile/compile-c-types.c: Define GCC_METHODN macros and include
300         gcc-c-fe.def to define C plugin.
301         (delete_instance): Delete `c_plugin'.
302         (new_compile_instance): Initialize `c_plugin'.
303         * compile/compile-c.h: Include gcc_c_plugin.h.
304         (struct compile_c_instance) <c_plugin>: New member.
305         * gcc-c-plugin.h: New file.
306         Update all callers with API change.
307
308 2018-08-10  Keith Seitz  <keiths@redhat.com>
309
310         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
311         (HFILES_NO_SRCDIR): ... to here.
312         Add compile-internal.h and compile-c.h.
313         * compile/compile-c-support.c: Include compile-c.h.
314         * compile/compile-c-symbols.c: Include compile-c.h.
315         (generate_c_for_variable_locations): Update comment.
316         * compile/compile-c-types.c: Include compile-c.h.
317         * compile/compile-c.h: New file -- moved C language declarations
318         from other files here.
319         * compile/compile-internal.h: Do not include hashtab.h or
320         common/enum-flags.h.
321         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
322         (gcc_convert_symbol, gcc_symbol_address)
323         (generate_c_for_variable_locations, c_get_mode_for_size)
324         (c_get_range_decl_name): Definitions moved to compile-c.h.
325         * compile/compile-loc2c.c: Include compile-c.h.
326
327 2018-08-10  Keith Seitz  <keiths@redhat.com>
328
329         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
330         (c_symbol_substitution_name): ... this.
331         Update all callers.
332
333 2018-08-10  Keith Seitz  <keiths@redhat.com>
334
335         * compile/compile-c-support.c (c_compute_program): Use
336         unique_xmalloc_ptr to eliminate cleanup.
337         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
338         Return a unique_xmalloc_ptr and eliminate cleanup.
339         * compile/compile-internal.h (generate_c_for_variable_locations):
340         Return unique_xmalloc_ptr and update description.
341
342 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
343
344         * corelow.c (core_target::get_core_register_section): Rename
345         min_size to section_min_size.
346
347 2018-08-09  Jim Wilson  <jimw@sifive.com>
348
349         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
350         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
351         * NEWS: Mention new GNU/Linux RISC-V target.
352         * configure.host: Add riscv*-*-linux*.
353         * configure.nat: Add riscv*.
354         * configure.tgt: Add riscv*-*-linux*.
355         * riscv-linux-nat.c: New file.
356         * riscv-linux-tdep.c: New file.
357
358 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
359
360         * infrun.c (resume): Make static, add forward declaration.
361         (proceed): Update header comment.
362         * infrun.h (resume): Delete declaration.
363
364 2018-08-09  Tom Tromey  <tom@tromey.com>
365
366         * riscv-tdep.h: Minor formatting fixes.
367
368 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
369
370         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
371         * dwarf-index-cache.c (create_dir_and_check): Likewise.
372         (test_mkdir_recursive): Likewise.
373         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
374
375 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
376
377         * valarith.c (value_subscripted_rvalue): If an array is not in
378         memory, and we don't know the upper bound, then we can't know that
379         the requested element exists or not.
380
381 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
382
383         * target.c (str_comma_list_concat_elem): Fix typo in comment.
384         (target_options_to_string): Add comment.
385
386 2018-08-08  Tom Tromey  <tom@tromey.com>
387
388         * unittests/scoped_mmap-selftests.c: Check result of "write".
389
390 2018-08-08  Jim Wilson  <jimw@sifive.com>
391
392         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
393         (decode_register_index_short): New.
394         (decode_j_type_insn, decode_cj_type_insn): New.
395         (decode_b_type_insn, decode_cb_type_insn): New.
396         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
397         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
398         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
399         is_c_sw_insn instead of is_sw_insn.
400         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
401         (riscv_software_single_step): New.
402         * riscv-tdep.h (riscv_software_single_step): Declare.
403
404         * riscv-tdep.c (riscv_isa_xlen): Drop static.
405         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
406
407 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
408
409         PR gdb/18050:
410         * target.c (dispose_inferior): Don't dispose of inferiors that are
411         already killed.
412
413 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
414
415         * remote.c (remote_target::download_tracepoint): Change char* to
416         const char*.
417
418 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
419
420         * target.h (target_options_to_string): Return an std::string.
421         * target.c (str_comma_list_concat_elem): Return void, use
422         std::string.
423         (do_option): Likewise.
424         (target_options_to_string): Return an std::string.
425         * linux-nat.c (linux_nat_target::wait): Adjust.
426         * target-debug.h (target_debug_print_options): Adjust.
427
428 2018-08-07  Tom Tromey  <tom@tromey.com>
429
430         * Makefile.in (CPPFLAGS): New variable.
431         (INTERNAL_CPPFLAGS): Use it.
432
433 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
434
435         * NEWS: Mention the index cache.
436
437 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
438
439         * common/pathstuff.h (get_standard_cache_dir): New.
440         * common/pathstuff.c (get_standard_cache_dir): New.
441         * build-id.h (build_id_to_string): New.
442         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
443         DEBUG_STR_SUFFIX): Move to here.
444         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
445         DEBUG_STR_SUFFIX): Move from there.
446         (write_psymtabs_to_index): Make non-static, add basename
447         parameter.  Write to temporary files, rename when done.
448         (save_gdb_index_command): Adjust call to
449         write_psymtabs_to_index.
450         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
451         field.
452         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
453         (get_gdb_index_contents_from_cache): New.
454         (get_gdb_index_contents_from_cache_dwz): New.
455         (dwarf2_initialize_objfile): Read index from cache.
456         (dwarf2_build_psymtabs): Save to index.
457         * dwarf-index-cache.h: New file.
458         * dwarf-index-cache.c: New file.
459         * dwarf-index-write.h: New file.
460
461 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
462
463         * gnulib/aclocal.m4: Re-generate.
464         * gnulib/config.in: Re-generate.
465         * gnulib/configure: Re-generate.
466         * gnulib/import/Makefile.am: Re-generate.
467         * gnulib/import/Makefile.in: Re-generate.
468         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
469         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
470         * gnulib/import/m4/mkdir.m4: New file.
471         * gnulib/import/mkdir.c: New file.
472         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
473         module.
474
475 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
476
477         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
478         * common/scoped_mmap.c: New file.
479         * common/scoped_mmap.h (destroy): New method.
480         (~scoped_mmap, reset): Use destroy.
481         (scoped_mmap): New move constructor.
482         (mmap_file): New declaration.
483         * unittests/scoped_mmap-selftests.c (test_normal,
484         test_invalid_filename, run_tests): New functions.
485         (_initialize_scoped_mmap_selftests): Register selftest.
486
487 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
488
489         * dwarf2read.c (read_gdb_index_from_section): Rename to...
490         (read_gdb_index_from_buffer): ... this.  Remove section
491         parameter, add buffer parameter.
492         (get_gdb_index_contents_ftype,
493         get_gdb_index_contents_dwz_ftype): New typedefs.
494         (dwarf2_read_gdb_index): Add callback parameters to get the
495         index contents.
496         (get_gdb_index_contents_from_section): New.
497         (dwarf2_initialize_objfile): Update call to
498         dwarf2_read_gdb_index.
499
500 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
501
502         * common/filestuff.h (gdb_fopen_cloexec): New overload.
503         (gdb_open_cloexec): Likewise.
504         * nat/linux-osdata.c (command_from_pid): Use string_printf.
505         (commandline_from_pid): Likewise.
506         (linux_xfer_osdata_threads): Likewise.
507         (linux_xfer_osdata_fds): Likewise.
508         * ada-lang.c (is_package_name): Likewise.
509         * auxv.c (procfs_xfer_auxv): Likewise.
510         * breakpoint.c (print_one_breakpoint_location): Use
511         uiout::field_fmt.
512         (print_one_catch_solib): Use string_printf.
513         * coff-pe-read.c (add_pe_exported_sym): Likewise.
514         (add_pe_forwarded_sym): Likewise.
515         * dwarf2read.c (create_type_unit_group): Likewise.
516         (build_error_marker_type): Likewise.
517         * infcall.c (get_function_name): Likewise.
518         * valprint.c (print_converted_chars_to_obstack): Likewise.
519         * xtensa-tdep.c (xtensa_register_type): Likewise.
520
521 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
522
523         * remote.c (remote_target::download_tracepoint): Fix format
524         string errors.
525
526 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
527
528         * tracefile.c: Include common/byte-vector.h.
529         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
530         with trace_regblock_size if needed.  Update uses of buf.
531
532 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
533
534         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
535         std::vector<unsigned char>.
536         * tracepoint.c (collection_list::collection_list): Remove
537         m_regs_mask initializer from initializer list.  Resize
538         m_regs_mask using the largest remote register number.
539         (collection_list::add_remote_register): Remove size check on
540         m_regs_mask.  Use at to access element.
541         (collection_list::stringify): Change type of temp_buf to
542         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
543         stringify the register mask.  Use pack_hex_byte for the register
544         mask.
545
546 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
547
548         * tracepoint.h (class collection_list) <add_register>: Remove.
549         <add_remote_register, add_ax_registers, add_local_register>:
550         Declare.
551         <add_memrange>: Add scope parameter.
552         * tracepoint.c (encode_actions_1): Likewise.
553         (collection_list::add_register): Rename to ...
554         (collection_list::add_remote_register): ... this.  Update
555         comment.
556         (collection_list::add_ax_registers, add_local_register): New
557         methods.
558         (collection_list::add_memrange): Add scope parameter.  Call
559         add_local_register instead of add_register.
560         (finalize_tracepoint_aexpr): New function.
561         (collection_list::collect_symbol): Update calls to add_memrange.
562         Call add_local_register instead of add_register.  Call
563         add_ax_registers.  Call finalize_tracepoint_aexpr.
564         (encode_actions_1): Get remote regnos for $reg action.  Call
565         add_remote_register, add_ax_registers, and add_local_register.
566         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
567         (validate_actionline): Call finalize_tracepoint_aexpr.
568
569 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
570
571         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
572         Replace array buf with gdb::char_vector buf, of size
573         get_remote_packet_size ().  Replace references to buf and
574         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
575         and xsnprintf with snprintf.  Raise errors if the buffer is too
576         small.
577
578 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
579
580         * remote.c (remote_target::download_tracepoint): Fix the has_more
581         predicate in the QTDP action list iteration.
582
583 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
584
585         * remote.c (remote_target::download_tracepoint): Fix indentation
586         in for block.
587
588 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
589
590         * proc-api.c (_initialize_proc_api): Remove c, unused.
591         * procfs.c (procfs_init_inferior): Remove signals, unused.
592         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
593         unused.
594
595 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
596             Andrew Burgess  <andrew.burgess@embecosm.com>
597
598         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
599         'W_STOPCODE (0)' as this could be ambiguous.
600
601 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
602
603         * ser-tcp.c (net_open): Fix thinko when deciding whether to
604         disable TCP's Nagle algorithm (use "ai_protocol" instead of
605         "ai_socktype").
606
607 2018-08-02  Tom Tromey  <tom@tromey.com>
608
609         PR symtab/16842.
610         * dwarf2read.c (read_func_scope): Set symtab on template parameter
611         symbols.
612         (process_structure_scope): Likewise.
613
614 2018-08-02  Xavier Roirand  <roirand@adacore.com>
615
616         PR gdb/22629:
617         * darwin-nat.c (darwin_kill_inferior): Fix handling of
618         kill inferior.
619
620 2018-08-02  Tom Tromey  <tom@tromey.com>
621
622         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
623         (darwin_suspend_inferior, darwin_resume_inferior)
624         (darwin_decode_notify_message, darwin_resume_inferior_threads)
625         (darwin_check_new_threads): Check result of get_darwin_inferior.
626
627 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
628
629         GDB 8.1.1 released.
630
631 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
632
633         * varobj.c (varobj_get_path_expr_parent): Report an error if
634         parent is a dynamic varobj.
635
636 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
637
638         * gnulib/aclocal.m4: Re-generate.
639         * gnulib/config.in: Re-generate.
640         * gnulib/configure: Re-generate.
641         * gnulib/import/Makefile.in: Re-generate.
642         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
643         * gnulib/import/m4/onceonly.m4: Re-generate.
644
645 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
646
647         * target-descriptions.c (struct xml_test_tdesc): New.
648         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
649         (record_xml_tdesc): Update.
650         (maintenance_check_xml_descriptions): Update.
651         * target-descriptions.h (record_xml_tdesc): Update comment.
652
653 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
654
655         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
656         checking array bounds are defined.
657
658 2018-07-30  Tom Tromey  <tom@tromey.com>
659
660         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
661         irreflexivity violation.
662
663 2018-07-30  Tom Tromey  <tom@tromey.com>
664
665         * cli/cli-decode.c (lookup_cmd): Remove lint code.
666         * value.c (unpack_long): Remove lint code.
667         * valops.c (value_ind): Remove lint code.
668         * valarith.c (value_x_binop, value_x_unop, value_equal)
669         (value_pos): Remove lint code.
670
671 2018-07-28  Tom de Vries  <tdevries@suse.de>
672
673         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
674         with undefined upper bound as <optimized out>.
675
676 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
677
678         * gcore.in: Rename variable "name" to "prefix".  Expand
679         "usage" text.
680
681 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
682
683         * windows-nat.c (windows_nat_target::create_inferior): Update to
684         call close() in global namespace.
685
686 2018-07-26  Tom Tromey  <tom@tromey.com>
687
688         * dwarf-index-write.c (add_address_entry): Don't add objfile
689         offsets.
690         * dbxread.c (find_stab_function): Rename from
691         find_stab_function_addr.  Return a bound_minimal_symbol.
692         (read_dbx_symtab): Use raw_text_low, raw_text_high.
693         Don't add objfile offsets.
694         (end_psymtab): Use raw_text_low, raw_text_high,
695         MSYMBOL_VALUE_RAW_ADDRESS.
696         (read_ofile_symtab): Update.
697         (process_one_symbol): Update.
698         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
699         offsets.
700         (dw2_relocate): Remove.
701         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
702         searching addrmap.
703         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
704         Update.
705         (process_psymtab_comp_unit_reader, add_partial_symbol)
706         (add_partial_subprogram, dwarf2_ranges_read): Update.
707         (load_partial_dies): Update.
708         (add_address_entry): Don't add objfile offsets.
709         (dwarf2_build_include_psymtabs): Update.
710         (create_addrmap_from_aranges): Don't add objfile offsets.
711         (dw2_find_pc_sect_compunit_symtab): Update.
712         * mdebugread.c (parse_symbol): Don't add objfile offsets.
713         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
714         Update.
715         (parse_partial_symbols): Don't add objfile offsets.  Use
716         raw_text_low, raw_text_high.  Update.
717         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
718         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
719         or call 'relocate' quick function.  Clear psymbol_map.
720         * psympriv.h (struct partial_symbol) <address>: Add section
721         offset.
722         <set_unrelocated_address>: Rename from set_address.
723         <raw_text_low, raw_text_high>: New methods.
724         <text_low, text_high>: Add objfile parameter.
725         (add_psymbol_to_bcache): Add 'section' parameter.  Call
726         set_unrelocated_address.
727         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
728         (find_pc_psymbol): Update.
729         (fixup_psymbol_section, relocate_psymtabs): Remove.
730         (dump_psymtab, psym_functions): Update.
731         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
732         parameter.
733         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
734         (start_psymtab_common): Update.
735         * symfile-debug.c (debug_qf_relocate): Remove.
736         (debug_sym_quick_functions): Update.
737         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
738         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
739         Update.
740
741 2018-07-26  Tom Tromey  <tromey@redhat.com>
742
743         * dbxread.c (end_psymtab): Use text_high_valid and
744         text_low_valid.
745         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
746         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
747         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
748         Update comment.
749         <text_low_valid, text_high_valid>: New fields.
750         <set_text_low, set_text_high>: Update.
751         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
752
753 2018-07-26  Tom Tromey  <tom@tromey.com>
754
755         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
756         Update.
757         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
758         textlow and texthigh fields.
759         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
760         Update.
761         * mdebugread.c (parse_lines, parse_partial_symbols)
762         (psymtab_to_symtab_1): Update.
763         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
764         Rename fields.  Update comment.  Now private.
765         <text_low, text_high, set_text_low, set_text_high>: New methods.
766         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
767         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
768         (start_psymtab_common, maintenance_info_psymtabs)
769         (maintenance_check_psymtabs): Update.
770         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
771         texthigh fields.
772         (scan_xcoff_symtab): Update.
773
774 2018-07-26  Tom Tromey  <tromey@redhat.com>
775
776         * psympriv.h (struct partial_symbol) <unrelocated_address,
777         address, set_address>: New methods.
778         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
779         (fixup_psymbol_section, relocate_psymtabs): Update.
780         (print_partial_symbols): Add 'objfile' parameter.  Update.
781         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
782         Update.
783
784 2018-07-26  Tom Tromey  <tom@tromey.com>
785
786         * dwarf-index-write.c (write_psymbols, debug_names::insert)
787         (debug_names::write_psymbols): Update.
788         * psympriv.h (struct partial_symbol): Derive from
789         general_symbol_info.
790         <obj_section>: New method.
791         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
792         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
793         (find_pc_sect_psymbol, fixup_psymbol_section)
794         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
795         (print_partial_symbols, recursively_search_psymtabs)
796         (compare_psymbols, psymbol_hash, psymbol_compare)
797         (add_psymbol_to_bcache, maintenance_check_psymtabs)
798         (psymbol_name_matches, psym_fill_psymbol_map): Update.
799
800 2018-07-26  Tom Tromey  <tromey@redhat.com>
801
802         * dbxread.c (end_psymtab): Remove dead code.
803
804 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
805
806         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
807         DWARF unwinders are disabled.
808         * dwarf2-frame.c: Add dwarf2read.h include.
809         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
810         disabled.
811         (dwarf2_frame_unwinders_enabled_p): Define.
812         (show_dwarf_unwinders_enabled_p): New function.
813         (_initialize_dwarf2_frame): Register switch to control DWARF
814         unwinder use.
815         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
816         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
817         (show_dwarf_cmdlist): Remove static keyword.
818         * dwarf2read.h (set_dwarf_cmdlist): Declare.
819         (show_dwarf_cmdlist): Declare.
820         * NEWS: Document new feature.
821
822 2018-07-26  Tom de Vries  <tdevries@suse.de>
823
824         PR breakpoints/23366
825         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
826
827 2018-07-26  Tom de Vries  <tdevries@suse.de>
828
829         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
830         DW_AT_count can't be translated to a dynamic prop.
831
832 2018-07-25  Tom de Vries  <tdevries@suse.de>
833
834         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
835         try/catch.
836
837 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
838
839         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
840
841 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
842
843         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
844
845 2018-07-24  Keith Seitz  <keiths@redhat.comt
846
847         PR symtab/23010
848         * dwarf2read.c (dw2_add_symbol_to_list): New function.
849         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
850         instead of add_symbol_to_list.
851         (read_file_scope): Call prepare_one_comp_unit before reading
852         any other DIEs.
853
854 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
855
856         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
857
858 2018-07-24  Tom Tromey  <tom@tromey.com>
859
860         * utils.c (malloc, realloc, free): Don't declare.
861         * configure, config.in: Rebuild.
862         * configure.ac: Don't check for declarations of free, malloc, or
863         realloc.
864
865 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
866
867         * aarch64-linux-nat.c
868         (aarch64_linux_nat_target::stopped_data_address): Remove unused
869         variable.
870         * arm-linux-nat.c (fetch_regs): Likewise.
871         (store_regs): Likewise.
872         (fetch_vfp_regs): Likewise.
873         (store_vfp_regs): Likewise.
874         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
875         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
876         (arm_linux_nat_target::insert_watchpoint): Likewise.
877         (arm_linux_nat_target::remove_watchpoint): Likewise.
878         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
879         Likewise.
880         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
881         Likewise.
882         * ppc-linux-nat.c (fetch_register): Likewise.
883         (fetch_all_gp_regs): Likewise.
884         (fetch_ppc_registers): Likewise.
885         (store_all_gp_regs): Likewise.
886         (store_ppc_registers): Likewise.
887         (hwdebug_insert_point): Likewise.
888         (can_use_watchpoint_cond_accel): Likewise.
889         * remote-sim.c (gdb_os_write_stdout): Likewise.
890
891 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
892             Tom Tromey  <tom@tromey.com>
893
894         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
895         test for it.
896         * configure: Rebuild.
897
898 2018-07-22  Tom Tromey  <tom@tromey.com>
899
900         * regformats/regdat.sh: Define xmltarget_${name} inside
901         #ifndef IN_PROCESS_AGENT.
902
903 2018-07-22  Tom Tromey  <tom@tromey.com>
904
905         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
906
907 2018-07-22  Tom Tromey  <tom@tromey.com>
908
909         * symfile.c (reread_symbols): Notify iter, not objfile.
910
911 2018-07-22  Tom Tromey  <tom@tromey.com>
912
913         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
914         Use arch_ops.
915         (ravenscar_thread_target::prepare_to_store): Likewise.
916
917 2018-07-22  Tom Tromey  <tom@tromey.com>
918
919         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
920         unused variable.  Call value_fetch_lazy when needed.
921         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
922         Remove unused variable.  Call value_fetch_lazy when needed.
923
924 2018-07-22  Tom Tromey  <tom@tromey.com>
925
926         * m32c-tdep.c (mark_dma): Return void.
927         (make_regs): Remove unused declarations.
928
929 2018-07-22  Tom Tromey  <tom@tromey.com>
930
931         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
932         cmdscm_get_valid_command_smob_arg_unsafe for effect.
933         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
934         bkscm_get_valid_block_smob_arg_unsafe for effect.
935
936 2018-07-22  Tom Tromey  <tom@tromey.com>
937
938         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
939         value_type.
940
941 2018-07-22  Tom Tromey  <tom@tromey.com>
942
943         * windows-nat.c (saved_context): Conditionally define.
944         * remote.c (remote_target::remote_btrace_maybe_reopen):
945         Conditionally declare "warned".
946         * inflow.c (sigquit_ours): Conditionally define.
947         (new_tty): Move "tty" declaration inside #if.
948         * guile/guile.c (guile_datadir): Conditionally define.
949         * charset.c (set_be_le_names): Move some declarations inside #if.
950         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
951         #if.
952         (parse_xml_btrace_conf): Likewise.
953
954 2018-07-22  Tom Tromey  <tom@tromey.com>
955
956         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
957
958 2018-07-22  Tom Tromey  <tom@tromey.com>
959
960         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
961         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
962         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
963         * buildsym-legacy.c (get_macro_table): Remove unused variable.
964         * stack.c (frame_apply_level_command): Remove unused variable.
965         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
966         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
967         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
968         unused variable.
969         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
970         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
971         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
972         variable.
973         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
974         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
975         variable.
976         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
977         Remove unused variable.
978         * cli/cli-script.c (recurse_read_control_structure): Remove unused
979         variable.
980         * common/tdesc.c (print_xml_feature::visit): Remove unused
981         variable.
982         * compile/compile-object-load.c (store_regs): Remove unused
983         variables.
984         * complaints.c (clear_complaints): Remove unused variable.
985         * corelow.c (core_target_open): Remove unused variable.
986         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
987         variable.
988         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
989         variable.
990         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
991         variable.
992         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
993         variable.
994         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
995         variable.
996         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
997         variable.
998         * ia64-tdep.c (examine_prologue): Remove unused variable.
999         * infcall.c (run_inferior_call): Remove unused variable.
1000         * inferior.c (exit_inferior): Remove unused variable.
1001         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1002         * linespec.c (decode_line_2): Remove unused variable.
1003         * linux-nat.c (super_close): Remove.
1004         * linux-tdep.c (linux_info_proc): Remove unused variable.
1005         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1006         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1007         Remove unused variable.
1008         * parse.c (find_minsym_type_and_address): Remove unused variable.
1009         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1010         variable.
1011         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1012         variable.
1013         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1014         variables.
1015         * record-btrace.c (record_btrace_target::store_registers): Remove
1016         unused variable.
1017         (cmd_show_record_btrace_cpu): Remove unused variable.
1018         * riscv-tdep.c (riscv_register_reggroup_p)
1019         (riscv_push_dummy_call, riscv_return_value): Remove unused
1020         variable.
1021         * rust-exp.y (literal): Remove unused variable.
1022         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1023         unused variable.
1024         <STRUCTOP_ANONYMOUS>: Likewise.
1025         * s390-linux-tdep.c (s390_linux_init_abi_31)
1026         (s390_linux_init_abi_64): Remove unused variable.
1027         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1028         (file_select_thread, net_windows_open, _initialize_ser_windows):
1029         Remove unused variables.
1030         * symtab.c (find_pc_sect_line): Remove unused variable.
1031         * target-memory.c (compute_garbled_blocks): Remove unused
1032         variable.
1033         (target_write_memory_blocks): Remove unused variable.
1034         * target.c (target_stack::unpush): Remove unused variables.
1035         * tracepoint.c (start_tracing, all_tracepoint_actions)
1036         (merge_uploaded_trace_state_variables)
1037         (print_one_static_tracepoint_marker): Remove unused variable.
1038         * unittests/basic_string_view/element_access/char/1.cc (test01):
1039         Remove unused variable.
1040         * windows-nat.c (windows_continue, windows_add_all_dlls)
1041         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1042         Remove unused variables.
1043
1044 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1045
1046         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1047         attr_profile in HAVE_ELF.
1048         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1049         HAVE_ELF.
1050
1051 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1052
1053         * frame.c (frame_register_unwind): Change parameter name.
1054         (frame_unwind_register): Likewise.
1055         (frame_unwind_register_value): Likewise.
1056         (frame_unwind_register_signed): Likewise.
1057         (frame_unwind_register_unsigned): Likewise.
1058         * frame.h (frame_register_unwind): Likewise.
1059         (frame_unwind_register): Likewise.
1060         (frame_unwind_register_value): Likewise.
1061         (frame_unwind_register_signed): Likewise.
1062         (frame_unwind_register_unsigned): Likewise.
1063         (frame_unwind_arch): Likewise.
1064
1065 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1066
1067         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1068         ISA maintenance.
1069
1070 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1071
1072         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1073         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1074         hand.
1075
1076 2018-07-20  Keith Seitz  <keiths@redhat.com>
1077
1078         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1079         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1080         m_compunit_symtab, m_language>: Add "m_" prefix.
1081         Update all uses.
1082         * buildsym.c: Update all uses.
1083
1084 2018-07-20  Tom Tromey  <tom@tromey.com>
1085
1086         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1087         * buildsym.h (record_line_ftype): Remove typedef.
1088
1089 2018-07-20  Tom Tromey  <tom@tromey.com>
1090
1091         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1092         (end_expandable_symtab): Likewise.
1093         (end_symtab_get_static_block): Likewise.
1094         (end_symtab_from_static_block): Likewise.
1095         * buildsym-legacy.c (augment_type_symtab): Remove.
1096         (end_expandable_symtab): Remove.
1097         (end_symtab_get_static_block): Remove.
1098         (end_symtab_from_static_block): Remove.
1099
1100 2018-07-20  Tom Tromey  <tom@tromey.com>
1101
1102         * dwarf2read.c: Include buildsym.h.
1103         (struct dwarf2_cu) <builder>: New method.
1104         (fixup_go_packaging): Update.
1105         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1106         use scoped_free_pendings.
1107         (using_directives): Add "cu" parameter, remove "language".
1108         (read_import_statement, setup_type_unit_groups, )
1109         (read_func_scope, read_lexical_block_scope)
1110         (dwarf2_record_block_ranges, read_namespace): Update.
1111         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1112         (lnp_state_machine::handle_end_sequence): Update.
1113         (class lnp_state_machine) <m_cu>: New member.
1114         <m_record_line_callback>: Remove.
1115         <m_currently_recording_lines>: New member.
1116         (lnp_state_machine::handle_set_file): Update.
1117         (noop_record_line): Remove.
1118         (dwarf_record_line_p): Add cu parameter.
1119         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1120         (lnp_state_machine::record_line)
1121         (lnp_state_machine::lnp_state_machine)
1122         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1123         (dwarf_decode_lines): Update.
1124         (dwarf2_start_subfile): Add cu parameter.
1125         (dwarf2_start_symtab, new_symbol): Update.
1126         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1127         Remove dwarf2_per_objfile parameter.
1128         (dwarf_decode_macros): Update.
1129
1130 2018-07-20  Tom Tromey  <tom@tromey.com>
1131
1132         * stabsread.c (define_symbol): Update.
1133         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1134         * dwarf2read.c (new_symbol): Update.
1135         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1136         * cp-namespace.c: Include buildsym.h.
1137         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1138         * buildsym-legacy.c (get_buildsym_compunit): New function.
1139
1140 2018-07-20  Tom Tromey  <tom@tromey.com>
1141
1142         * xcoffread.c: Include buildsym-legacy.h.
1143         * windows-nat.c: Include buildsym-legacy.h.
1144         * stabsread.c: Include buildsym-legacy.h.
1145         * mdebugread.c: Include buildsym-legacy.h.
1146         * buildsym-legacy.h: New file.
1147         * buildsym-legacy.c: New file, from buildsym.c.
1148         * go32-nat.c: Include buildsym-legacy.h.
1149         * dwarf2read.c: Include buildsym-legacy.h.
1150         * dbxread.c: Include buildsym-legacy.h.
1151         * cp-namespace.c: Include buildsym-legacy.h.
1152         * coffread.c: Include buildsym-legacy.h.
1153         * buildsym.h: Move some contents to buildsym-legacy.h.
1154         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1155         buildsym-legacy.c.
1156         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1157
1158 2018-07-20  Tom Tromey  <tom@tromey.com>
1159
1160         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1161         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1162         (buildsym_compunit::buildsym_compunit)
1163         (buildsym_compunit::~buildsym_compunit)
1164         (buildsym_compunit::get_macro_table): Define.
1165
1166 2018-07-20  Tom Tromey  <tom@tromey.com>
1167
1168         * buildsym.c (reset_symtab_globals): Remove.
1169         (buildsym_compunit::end_symtab_from_static_block): Update.
1170         (buildsym_compunit::augment_type_symtab): Update.
1171         (end_symtab_from_static_block): Call free_buildsym_compunit.
1172         (augment_type_symtab, end_symtab, end_expandable_symtab):
1173         Likewise.
1174
1175 2018-07-20  Tom Tromey  <tom@tromey.com>
1176
1177         * arch-utils.c: Do not include buildsym.h.
1178         * mipsread.c: Do not include buildsym.h.
1179         * machoread.c: Do not include buildsym.h.
1180         * elfread.c: Do not include buildsym.h.
1181
1182 2018-07-20  Tom Tromey  <tom@tromey.com>
1183
1184         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1185         initialization.
1186         (buildsym_compunit): Add new constructor.
1187         (struct buildsym_compunit) <get_last_source_file, finish_block,
1188         record_block_range, start_subfile, patch_subfile_names,
1189         push_subfile, pop_subfile, record_line, get_compunit_symtab,
1190         set_last_source_start_addr, get_last_source_start_addr,
1191         get_local_using_directives, set_local_using_directives,
1192         get_global_using_directives, outermost_context_p,
1193         get_current_context_stack, get_context_stack_depth,
1194         get_current_subfile, get_local_symbols, get_file_symbols,
1195         get_global_symbols, record_debugformat, record_producer,
1196         push_context, pop_context, end_symtab_get_static_block,
1197         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1198         New public methods.
1199         <record_pending_block, finish_block_internal, make_blockvector,
1200         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1201         private methods.
1202         Update all users.
1203
1204 2018-05-22  Tom Tromey  <tom@tromey.com>
1205
1206         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1207         parameter.
1208         (finish_block_internal): Update.
1209
1210 2018-07-20  Tom Tromey  <tom@tromey.com>
1211
1212         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1213         parameter.
1214         (finish_block_internal): Update.
1215
1216 2018-07-20  Tom Tromey  <tom@tromey.com>
1217
1218         * buildsym.h (EXTERN): Don't define or undef.
1219         * buildsym.c (EXTERN): Don't define.
1220
1221 2018-07-20  Tom Tromey  <tom@tromey.com>
1222
1223         * buildsym.c: Remove TODO comment.
1224
1225 2018-07-20  Tom Tromey  <tom@tromey.com>
1226
1227         * coffread.c (coff_symtab_read): Update.
1228         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1229         (xcoff_new_init): Update.
1230         * mipsread.c (mipscoff_new_init): Update.
1231         * mdebugread.c (mdebug_build_psymtabs): Update.
1232         * elfread.c (elf_new_init): Update.
1233         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1234         Update.
1235         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1236         (coffstab_build_psymtabs, elfstab_build_psymtabs)
1237         (stabsect_build_psymtabs): Update.
1238         * buildsym.h (buildsym_init): Don't declare.
1239         * buildsym.c: Update comment.
1240         (prepare_for_building): Remove.
1241         (start_symtab, restart_symtab): Update.
1242         (reset_symtab_globals): Update comment.
1243         (buildsym_init): Remove.
1244
1245 2018-07-20  Tom Tromey  <tom@tromey.com>
1246
1247         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1248         * stabsread.c (patch_block_stabs, define_symbol, read_type)
1249         (read_enum_type, common_block_start, common_block_end)
1250         (cleanup_undefined_types_1, finish_global_stabs): Update.
1251         * mdebugread.c (psymtab_to_symtab_1): Update.
1252         * dwarf2read.c (fixup_go_packaging, read_func_scope)
1253         (read_lexical_block_scope, new_symbol): Update.
1254         * dbxread.c (process_one_symbol): Update.
1255         * coffread.c (coff_symtab_read, process_coff_symbol)
1256         (coff_read_enum_type): Update.
1257         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1258         declare.
1259         (get_local_symbols, get_file_symbols, get_global_symbols): New
1260         functions.
1261         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1262         m_global_symbols.
1263         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1264         (~scoped_free_pendings): Update.
1265         (finish_block, prepare_for_building, reset_symtab_globals)
1266         (end_symtab_get_static_block, end_symtab_with_blockvector)
1267         (augment_type_symtab, push_context): Update.
1268         (get_local_symbols, get_file_symbols, get_global_symbols): New
1269         functions.
1270         (buildsym_init): Update.
1271
1272 2018-07-20  Tom Tromey  <tom@tromey.com>
1273
1274         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1275         (process_full_type_unit): Likewise.
1276         (dwarf2_start_symtab): Set list_in_scope.
1277
1278 2018-07-20  Tom Tromey  <tom@tromey.com>
1279
1280         * dwarf2read.c (process_psymtab_comp_unit_reader)
1281         (build_type_psymtabs_reader): Do not set list_in_scope.
1282
1283 2018-07-20  Tom Tromey  <tom@tromey.com>
1284
1285         * buildsym.c (free_pendings): Remove.
1286         (add_symbol_to_list, scoped_free_pendings)
1287         (finish_block_internal, buildsym_init): Update.
1288
1289 2018-07-20  Tom Tromey  <tom@tromey.com>
1290
1291         * xcoffread.c (read_xcoff_symtab): Update.
1292         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1293         Update.
1294         * dbxread.c (process_one_symbol): Update.
1295         * coffread.c (coff_symtab_read): Update.
1296         * buildsym.h (finish_block): Update.
1297         * buildsym.c (finish_block): Remove "listhead" argument.
1298         (end_symtab_get_static_block): Update.
1299
1300 2018-07-20  Tom Tromey  <tom@tromey.com>
1301
1302         * buildsym.h (class scoped_free_pendings): Remove constructor.
1303         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1304         method.
1305         <m_pending_block_obstack, m_pending_blocks>: New members.
1306         (pending_block_obstack, pending_blocks): Remove.
1307         (scoped_free_pendings::scoped_free_pendings): Default.
1308         (~scoped_free_pendings): Update.
1309         (free_pending_blocks): Remove.
1310         (finish_block_internal, record_pending_block, make_blockvector)
1311         (end_symtab_get_static_block, augment_type_symtab, push_context)
1312         (buildsym_init): Update.
1313
1314 2018-07-20  Tom Tromey  <tom@tromey.com>
1315
1316         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1317         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1318         members.
1319         (pending_addrmap, pending_addrmap_obstack)
1320         (pending_addrmap_interesting): Remove.
1321         (scoped_free_pendings, record_block_range, make_blockvector)
1322         (prepare_for_building, reset_symtab_globals, buildsym_init):
1323         Update.
1324
1325 2018-07-20  Tom Tromey  <tom@tromey.com>
1326
1327         * xcoffread.c (process_linenos): Update.
1328         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1329         * mdebugread.c (psymtab_to_symtab_1): Update.
1330         * dwarf2read.c (setup_type_unit_groups)
1331         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1332         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1333         * dbxread.c (process_one_symbol): Update.
1334         * coffread.c (coff_symtab_read, enter_linenos)
1335         (process_coff_symbol): Update.
1336         * buildsym.h (current_subfile): Don't declare.
1337         (get_current_subfile): Declare.
1338         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1339         member.
1340         (start_subfile, free_buildsym_compunit, push_subfile)
1341         (prepare_for_building, start_symtab): Update.
1342         (get_current_subfile): New function.
1343
1344 2018-07-20  Tom Tromey  <tom@tromey.com>
1345
1346         * coffread.c (coff_symtab_read): Update.
1347         * xcoffread.c (read_xcoff_symtab): Update.
1348         * dwarf2read.c (new_symbol): Update.
1349         (read_func_scope, read_lexical_block_scope): Update.
1350         * dbxread.c (process_one_symbol): Update.
1351         * buildsym.h (context_stack, context_stack_depth): Don't declare.
1352         (outermost_context_p): Remove macro.
1353         (outermost_context_p, get_current_context_stack)
1354         (get_context_stack_depth): Declare.
1355         (pop_context): Return struct context_stack.
1356         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1357         member.
1358         (context_stack_size): Remove.
1359         (INITIAL_CONTEXT_STACK_SIZE): Remove.
1360         (prepare_for_building, end_symtab_get_static_block)
1361         (augment_type_symtab, push_context): Update.
1362         (pop_context): Return struct context_stack.
1363         (outermost_context_p, get_current_context_stack)
1364         (get_context_stack_depth): New functions.
1365         (buildsym_init): Update.
1366
1367 2018-07-20  Tom Tromey  <tom@tromey.com>
1368
1369         * rust-exp.y: Now a pure parser.  Update all rules.
1370         (%union): Move earlier.
1371         (current_parser, work_obstack): Remove globals.
1372         (rust_parser, ~rust_parser): Update.
1373         (class rust_parser) <copy_name, concat3, crate_name, super_name,
1374         lex_character, lex_number, lex_string, lex_identifier,
1375         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1376         convert_name, convert_params_to_expression,
1377         convert_ast_to_expression, ast_basic_type, ast_operation,
1378         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1379         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1380         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1381         ast_array_type, ast_slice_type, ast_reference_type,
1382         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1383         (rust_parse): Update.
1384         (rustyyerror, rustyylex): Add parser parameter.
1385         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1386         (rust_lex_stringish_test, rust_lex_test_sequence)
1387         (rust_lex_test_trailing_dot, rust_lex_test_completion)
1388         (rust_lex_test_push_back, rust_lex_tests): Update.
1389
1390 2018-07-19  Pedro Alves  <palves@redhat.com>
1391
1392         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1393         gdb::unique_xmalloc_ptr.
1394         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1395         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1396         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1397         copy-initialization.
1398         * guile/scm-pretty-print.c (ppscm_print_children): Use
1399         gdb::unique_xmalloc_ptr instead of cleanups.
1400         (gdbscm_apply_val_pretty_printer): Remove cleanups.
1401         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1402         gdb::unique_xmalloc_ptr.
1403         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1404         Adjust to use gdb::unique_xmalloc_ptr.
1405         * guile/scm-utils.c (extract_arg): Adjust.
1406         * guile/scm-value.c (gdbscm_value_field): Adjust to use
1407         gdb::unique_xmalloc_ptr instead of a cleanup.
1408
1409 2018-07-19  Tom Tromey  <tom@tromey.com>
1410
1411         * utils.c (do_value_free_to_mark)
1412         (make_cleanup_value_free_to_mark): Remove.
1413         * utils.h (make_cleanup_value_free_to_mark): Remove.
1414
1415 2018-07-19  Pedro Alves  <palves@redhat.com>
1416
1417         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1418         forwarding reference.
1419
1420 2018-07-18  Pedro Alves  <palves@redhat.com>
1421
1422         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1423         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
1424         cleanup.
1425
1426 2018-07-18  Pedro Alves  <palves@redhat.com>
1427
1428         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1429         exceptions.
1430         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1431         (gdbscm_wrap): New.
1432         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1433         directly instead of a cleanup.
1434         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1435         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
1436         (vlscm_binop_gdbthrow): New, factored out from ...
1437         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
1438         (vlscm_rich_compare): Use gdbscm_wrap.
1439         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1440         instead of a cleanup.
1441         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1442         cleanup.
1443         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1444         Use xfree directly instead of a cleanup.
1445         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1446         Adjust to use gdbscm_wrap and scoped_value_mark.
1447         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1448         (gdbscm_value_address, gdbscm_value_dereference)
1449         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1450         scoped_value_mark.
1451         (gdbscm_value_dynamic_type): Use scoped_value_mark.
1452         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1453         scoped_value_mark.
1454         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1455         gdbscm_wrap and scoped_value_mark.
1456         (gdbscm_value_to_string): Use xfree directly instead of a
1457         cleanup.  Move 'buffer' unique_ptr to TRY scope.
1458         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1459         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
1460         scoped_value_mark.
1461         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1462         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1463         scoped_value_mark.
1464         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1465         gdbscm_wrap.
1466
1467 2018-07-18  Tom de Vries  <tdevries@suse.de>
1468
1469         * findvar.c (default_read_var_value): Also resolve dynamic type for
1470         LOC_OPTIMIZED_OUT vars.
1471
1472 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
1473
1474         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1475         decoding.
1476
1477 2018-07-17  Tom Tromey  <tom@tromey.com>
1478
1479         * guile/scm-param.c (pascm_set_func, pascm_show_func)
1480         (compute_enum_list, pascm_set_param_value_x)
1481         (gdbscm_parameter_value): Update.
1482         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1483         (gdbscm_scm_to_host_string): Update.
1484         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1485         Update.
1486         * guile/scm-cmd.c (cmdscm_add_completion): Update.
1487         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1488         * guile/scm-string.c (gdbscm_scm_to_string): Return
1489         unique_xmalloc_ptr.
1490         (gdbscm_scm_to_host_string): Likewise.
1491
1492 2018-07-17  Tom Tromey  <tom@tromey.com>
1493
1494         * guile/guile.c (gdbscm_eval_from_control_command): Update.
1495         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1496         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1497         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1498         unique_xmalloc_ptr.
1499
1500 2018-07-17  Tom Tromey  <tom@tromey.com>
1501
1502         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1503         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1504         Update.
1505         * guile/scm-cmd.c (cmdscm_function): Update.
1506         * guile/scm-pretty-print.c
1507         (ppscm_print_exception_unless_memory_error): Update.
1508         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1509         Return unique_xmalloc_ptr.
1510
1511 2018-07-17  Tom Tromey  <tom@tromey.com>
1512
1513         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1514         Use string_printf.
1515
1516 2018-07-17  Jim Wilson  <jimw@sifive.com>
1517
1518         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1519         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1520         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1521         unecessary braces after EF_RISCV_RVC test.  Delete call to
1522         set_gdbarch_decr_pc_after_break.
1523
1524         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1525         RISCV_LAST_FP_REGNUM + 1.
1526         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1527
1528 2018-07-17  Tom Tromey  <tom@tromey.com>
1529
1530         * configure.ac: Remove --disable-gdbcli.
1531         * configure: Rebuild.
1532         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1533         (SUBDIR_CLI_CFLAGS): Remove.
1534         (SFILES): Use SUBDIR_CLI_SRCS.
1535         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1536
1537 2018-07-17  Tom Tromey  <tom@tromey.com>
1538
1539         PR gdb/18624:
1540         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1541
1542 2018-07-16  Jim Wilson  <jimw@sifive.com>
1543
1544         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1545
1546 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1547
1548         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1549         variable.
1550         (libunwind_frame_sniffer): Likewise.
1551         (libunwind_frame_prev_register): Likewise.
1552         (libunwind_sigtramp_frame_sniffer): Likewise.
1553         * ia64-tdep.c (ia64_access_reg): Likewise.
1554         (ia64_access_rse_reg): Likewise.
1555         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1556         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1557
1558 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1559
1560         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1561
1562 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1563
1564         * remote-sim.c (gdbsim_target::close,
1565         gdbsim_target::mourn_inferior): Remove unused variables.
1566
1567 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
1568
1569         * ia64-tdep.c (ktab_buf): New global.
1570         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1571         (get_kernel_table): Adjust.
1572
1573 2018-07-16  Tom Tromey  <tom@tromey.com>
1574
1575         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1576         * dwarf2read.c (using_directives, new_symbol): Use
1577         outermost_context_p.
1578         * dbxread.c (process_one_symbol): Use outermost_context_p.
1579         * coffread.c (coff_symtab_read): Use outermost_context_p.
1580
1581 2018-07-16  Tom Tromey  <tom@tromey.com>
1582
1583         * dwarf2read.c (using_directives, read_func_scope)
1584         (read_lexical_block_scope): Update.
1585         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1586         * buildsym.h (local_using_directives, global_using_directives):
1587         Don't declare.
1588         (get_local_using_directives, set_local_using_directives)
1589         (get_global_using_directives): Declare.
1590         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1591         m_global_using_directives>: New members.
1592         (finish_block_internal, prepare_for_building)
1593         (reset_symtab_globals, end_symtab_get_static_block)
1594         (push_context): Update.
1595         (get_local_using_directives, set_local_using_directives)
1596         (get_global_using_directives): New functions.
1597         (buildsym_init): Update.
1598
1599 2018-07-16  Tom Tromey  <tom@tromey.com>
1600
1601         * xcoffread.c (xcoff_initial_scan): Don't call
1602         free_pending_blocks.
1603         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1604         * buildsym.h (class scoped_free_pendings): Add constructor.
1605         (free_pending_blocks): Don't declare.
1606         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1607         (free_pending_blocks): Now static.
1608
1609 2018-07-16  Tom Tromey  <tom@tromey.com>
1610
1611         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1612         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1613         member.
1614         (struct subfile_stack): Remove.
1615         (subfile_stack): Remove.
1616         (push_subfile, pop_subfile, buildsym_init): Update.
1617
1618 2018-07-16  Tom Tromey  <tom@tromey.com>
1619
1620         * buildsym.c (push_subfile): Use gdb_assert.
1621         (pop_subfile): Use gdb_assert.
1622
1623 2018-07-16  Tom Tromey  <tom@tromey.com>
1624
1625         * buildsym.h (merge_symbol_lists): Remove.
1626         * buildsym.c (merge_symbol_lists): Remove.
1627
1628 2018-07-16  Tom Tromey  <tom@tromey.com>
1629
1630         * stabsread.c (scan_file_globals): Update comment.
1631         * stabsread.h (scan_file_globals): Move from buildsym.h.
1632         * buildsym.h (scan_file_globals): Move to stabsread.h.
1633
1634 2018-07-16  Tom Tromey  <tom@tromey.com>
1635
1636         * xcoffread.c (xcoff_new_init): Update.
1637         * mipsread.c (mipscoff_new_init): Update.
1638         * mdebugread.c (mdebug_build_psymtabs): Update.
1639         * elfread.c (elf_new_init): Update.
1640         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1641         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1642         * buildsym.h (buildsym_new_init): Don't declare.
1643         * buildsym.c (buildsym_new_init): Remove.
1644
1645 2018-07-16  Tom Tromey  <tom@tromey.com>
1646
1647         * stabsread.h (within_function): Move from buildsym.h.
1648         * stabsread.c (start_stabs): Clear within_function.
1649         * coffread.c (coff_start_symtab): Clear within_function.
1650         * buildsym.h (within_function): Move to stabsread.h.
1651         * buildsym.c (prepare_for_building): Update.
1652
1653 2018-07-16  Tom Tromey  <tom@tromey.com>
1654
1655         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1656         * dwarf2read.c (dwarf2_start_symtab): Don't set
1657         processing_gcc_compilation.
1658         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1659
1660 2018-07-16  Tom Tromey  <tom@tromey.com>
1661
1662         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1663         (next_symbol_text_func): Move from buildsym.h.
1664         * stabsread.c (hashname): Move from buildsym.c.
1665         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1666         (next_symbol_text_func, hashname): Move to stabsread.h.
1667         * buildsym.c: Don't include bcache.h
1668         (hashname): Move to stasbread.c.
1669
1670 2018-07-16  Tom Tromey  <tom@tromey.com>
1671
1672         * buildsym.h (context_stack_size): Don't declare.
1673         * buildsym.c (context_stack_size): New global.
1674
1675 2018-07-16  Tom Tromey  <tom@tromey.com>
1676
1677         * dbxread.c (processing_acc_compilation): New global.
1678         * buildsym.h (processing_acc_compilation): Don't declare.
1679
1680 2018-07-16  Tom Tromey  <tom@tromey.com>
1681
1682         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1683         * dbxread.c (read_ofile_symtab): Update.
1684         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1685         * buildsym.h (last_source_start_addr): Remove.
1686         (set_last_source_start_addr, get_last_source_start_addr):
1687         Declare.
1688         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1689         parameter.
1690         (struct buildsym_compunit) <m_last_source_start_addr>: New
1691         member.
1692         (prepare_for_building): Remove start_addr parameter.
1693         (start_symtab, restart_symtab, end_symtab_get_static_block)
1694         (end_symtab_with_blockvector): Update.
1695         (set_last_source_start_addr, get_last_source_start_addr): New
1696         functions.
1697
1698 2018-07-16  Tom Tromey  <tom@tromey.com>
1699
1700         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1701         member.
1702         (have_line_numbers): Remove.
1703         (record_line, prepare_for_building, end_symtab_get_static_block)
1704         (augment_type_symtab): Update.
1705
1706 2018-07-16  Tom Tromey  <tom@tromey.com>
1707
1708         * buildsym.c (~buildsym_compunit): Free the macro table.
1709         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1710         methods.
1711         <m_pending_macros>: New member.
1712         (pending_macros): Remove.
1713         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1714         (reset_symtab_globals, end_symtab_get_static_block)
1715         (end_symtab_with_blockvector, augment_type_symtab)
1716         (buildsym_init): Update.
1717
1718 2018-07-16  Tom Tromey  <tom@tromey.com>
1719
1720         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1721         parameter.
1722         (buildsym_compunit::set_last_source_file): New method.
1723         <m_last_source_file>: New member.
1724         (prepare_for_building): Remove "name" parameter.
1725         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1726         (last_source_file): Remove.
1727         (set_last_source_file, get_last_source_file): Update.
1728
1729 2018-07-16  Tom Tromey  <tom@tromey.com>
1730
1731         * buildsym.c (prepare_for_building): Add assert.
1732
1733 2018-07-16  Tom Tromey  <tom@tromey.com>
1734
1735         * buildsym.c (~buildsym_compunit): Update.
1736         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1737         (start_subfile, patch_subfile_names)
1738         (end_symtab_with_blockvector): Update.
1739
1740 2018-07-16  Tom Tromey  <tom@tromey.com>
1741
1742         * buildsym.c (struct buildsym_compunit): Add constructor,
1743         destructor, initializers.
1744         (start_buildsym_compunit): Remove.
1745         (free_buildsym_compunit): Use "delete".
1746         (start_symtab, restart_symtab): Use "new".
1747
1748 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1749
1750         * symfile.c (set_objfile_default_section_offset): Remove struct
1751         keyword.
1752
1753 2018-07-14  Stafford Horne  <shorne@gmail.com>
1754
1755         * (Responsible Maintainers): Add myself as or1k maintainer.
1756
1757 2018-07-13  Tom Tromey  <tom@tromey.com>
1758
1759         * symfile.c (set_objfile_default_section_offset): Use extra braces
1760         around initializer.
1761
1762 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1763
1764         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1765         non-branching basr.
1766
1767 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1768
1769         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1770         unittests/cli-utils-selftests.c
1771         * unittests/cli-utils-selftests.c: New file.
1772
1773 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1774
1775         * NEWS: Mention new commands. Mention change to 'thread apply'.
1776
1777 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1778
1779         * thread.c (thr_try_catch_cmd): New function.
1780         (thread_apply_all_command): Handle qcs flags.
1781         (thread_apply_command): Handle qcs flags.
1782         (taas_command): New function.
1783         (tfaas_command): New function.
1784         (_initialize_thread): Update to setup the new commands 'taas
1785         and 'tfaas'. Change doc string for 'thread apply'.
1786
1787 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1788
1789         * stack.c: (trailing_outermost_frame): New function, mostly
1790         extracted from backtrace_command_1.
1791         (leading_innermost_frame): New function.
1792         (backtrace_command_1): Update to call trailing_outermost_frame.
1793         (frame_apply_command_count): New function.
1794         (frame_apply_level_command): New function.
1795         (frame_apply_all_command): New function.
1796         (frame_apply_command): New function.
1797         (faas_command): New function.
1798         (frame_cmd_list): New variable.
1799         (_initialize_stack): Update to setup the new commands 'frame apply'
1800         and 'faas'.
1801
1802 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1803
1804         * cli-utils.c (number_or_range_parser::get_number): Only handle
1805         numbers or convenience var as numbers.
1806         (parse_flags): New function.
1807         (parse_flags_qcs): New function.
1808         (number_or_range_parser::finished): Ensure parsing end is detected
1809         before end of string.
1810         * cli-utils.h (parse_flags): New function.
1811         (parse_flags_qcs): New function.
1812         (number_or_range_parser): Remove m_finished bool.
1813         (number_or_range_parser::skip_range): Set m_in_range to false.
1814
1815 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1816
1817         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1818         on Windows.
1819
1820 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1821             Jan Kratochvil  <jan.kratochvil@redhat.com>
1822             Paul Fertser  <fercerpav@gmail.com>
1823             Tsutomu Seki  <sekiriki@gmail.com>
1824             Pedro Alves  <palves@redhat.com>
1825
1826         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1827         'unittests/parse-connection-spec-selftests.c'.
1828         (COMMON_SFILES): Add 'common/netstuff.c'.
1829         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1830         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1831         * common/netstuff.c: New file.
1832         * common/netstuff.h: New file.
1833         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1834         (wait_for_connect): Update comment.  New parameter
1835         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1836         Use 'sock' directly instead of 'scb->fd'.
1837         (try_connect): New function, with code from 'net_open'.
1838         (net_open): Rewrite main loop to deal with multiple
1839         sockets/addresses.  Handle IPv6-style hostnames; implement
1840         support for IPv6 connections.
1841         * unittests/parse-connection-spec-selftests.c: New file.
1842
1843 2018-07-11  Pedro Alves  <palves@redhat.com>
1844
1845         PR gdb/23377
1846         * remote.c (remote_target::remote_detach_pid): Call
1847         set_current_process.
1848
1849 2018-07-11  Pedro Alves  <palves@redhat.com>
1850
1851         * h8300-tdep.c (h8300_gdbarch_init): Remove
1852         set_gdbarch_ecoff_reg_to_regnum calls.
1853
1854 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1855
1856         PR c++/23373
1857         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1858         offsets/sizes for static members of a class/struct.
1859
1860 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1861
1862         * target-descriptions.c (tdesc_register_bitsize): Rename.
1863         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1864         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1865         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1866
1867 2018-07-10  Tom Tromey  <tom@tromey.com>
1868
1869         * breakpoint.c (moribund_locations): Now static and a
1870         std::vector.
1871         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1872         (build_bpstat_chain, update_global_location_list)
1873         (breakpoint_retire_moribund): Update.
1874         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1875         VEC.
1876
1877 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1878
1879         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1880         (riscv_register_reggroup_p): Use new function, remove unneeded
1881         parenthesis.
1882         (riscv_push_dummy_call): Extend assert to compare against xlen or
1883         flen based on register type.
1884
1885 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1886
1887         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1888
1889 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1890
1891         * remote.c (show_hardware_watchpoint_limit): New function.
1892         (show_hardware_watchpoint_length_limit): New function.
1893         (show_hardware_breakpoint_limit): New function.
1894         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1895         where appropriate, update help text.
1896
1897 2018-07-09  Tom Tromey  <tom@tromey.com>
1898
1899         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1900         (CLIBS): Don't mention NAT_CLIBS.
1901
1902 2018-07-09  Tom Tromey  <tom@tromey.com>
1903
1904         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1905         (LIBGDB_OBS, clean mostlyclean): Update.
1906         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1907
1908 2018-07-09  Tom Tromey  <tom@tromey.com>
1909
1910         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1911         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1912         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1913
1914 2018-07-09  Tom Tromey  <tom@tromey.com>
1915
1916         * Makefile.in (ALLDEPFILES): Remove exec.c.
1917         (COMMON_OBS): Remove exec.o.
1918         (COMMON_SFILES): Add exec.c.
1919
1920 2018-07-09  Tom Tromey  <tom@tromey.com>
1921
1922         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1923
1924 2018-07-09  Tom Tromey  <tom@tromey.com>
1925
1926         * Makefile.in (clean mostlyclean): Remove stamp-version.
1927         (version.c): Depend on stamp-version.
1928         (stamp-version): New rule, from version.c rule.
1929
1930 2018-07-09  Tom Tromey  <tom@tromey.com>
1931
1932         * Makefile.in (init.c): Depend on stamp-init.
1933         (stamp-init): New rule, from init.c rule.
1934         (clean mostlyclean): Remove stamp-init.
1935
1936 2018-07-09  Tom Tromey  <tom@tromey.com>
1937
1938         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1939         SUBDIR_GCC_COMPILE_SRCS.
1940
1941 2018-07-09  Tom Tromey  <tom@tromey.com>
1942
1943         * Makefile.in (init.c): Remove some unused sed rules.
1944
1945 2018-07-09  Tom Tromey  <tom@tromey.com>
1946
1947         * Makefile.in (TSOBS): Remove.
1948         (INIT_FILES): Update.
1949         (LIBGDB_OBS): Update.
1950         (COMMON_SFILES): Add inflow.c.
1951         (SFILES): Remove inflow.c.
1952
1953 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1954
1955         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1956
1957 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1958
1959         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1960         get_saveloc_name, is_signal_frame_name, step_name,
1961         init_remote_name, create_addr_space_name,
1962         destroy_addr_space_name, search_unwind_table_name,
1963         find_dyn_list_name): Constify.
1964
1965 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1966
1967         * darwin-nat.c (darwin_pthread_kill): New function.
1968         (darwin_resume_thread): Use darwin_pthread_kill.
1969
1970 2018-07-05  Tom de Vries  <tdevries@suse.de>
1971
1972         * macroexp.c (macro_buffer) <operator=>: New member function.
1973
1974 2018-07-04  Tom Tromey  <tom@tromey.com>
1975
1976         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1977
1978 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1979
1980         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1981         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1982         * maint.c: Likewise.
1983         * top.c: Likewise.
1984
1985 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1986
1987         * NEWS: Create a new section for the next release branch.
1988         Rename the section of the current branch, now that it has
1989         been cut.
1990
1991 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1992
1993         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1994         * version.in: Bump version to 8.2.50.DATE-git.
1995
1996 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1997             Pedro Alves  <palves@redhat.com>
1998
1999         * linux-nat.c (linux_init_ptrace): Rename to ...
2000         (linux_init_ptrace_procfs): ... this.  Call
2001         linux_proc_init_warnings.
2002         (linux_nat_target::post_attach)
2003         (linux_nat_target::post_startup_inferior): Adjust.
2004         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2005         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2006
2007 2018-07-04  Tom de Vries  <tdevries@suse.de>
2008
2009         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2010         check ...
2011         (read_comp_unit_head): ... here.
2012
2013 2018-07-03  Tom Tromey  <tom@tromey.com>
2014
2015         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2016         (stop_tracing, tstatus_command)
2017         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2018         (print_one_static_tracepoint_marker): Update.
2019         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2020         std::vector.
2021         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2022         VEC.
2023         (all_tracepoints, static_tracepoints_here): Return std::vector.
2024
2025 2018-07-03  Tom Tromey  <tom@tromey.com>
2026
2027         * common/ptid.c (ptid_equal): Remove.
2028         * common/ptid.h (ptid_equal): Don't declare.
2029         * ada-tasks.c: Update.
2030         * breakpoint.c: Update.
2031         * common/agent.c: Update.
2032         * corelow.c: Update.
2033         * darwin-nat-info.c: Update.
2034         * darwin-nat.c: Update.
2035         * dcache.c: Update.
2036         * dtrace-probe.c: Update.
2037         * dummy-frame.c: Update.
2038         * fbsd-nat.c: Update.
2039         * frame.c: Update.
2040         * gdbthread.h: Update.
2041         * gnu-nat.c: Update.
2042         * go32-nat.c: Update.
2043         * inf-loop.c: Update.
2044         * inf-ptrace.c: Update.
2045         * infcall.c: Update.
2046         * infcmd.c: Update.
2047         * inflow.c: Update.
2048         * infrun.c: Update.
2049         * linux-fork.c: Update.
2050         * linux-nat.c: Update.
2051         * linux-thread-db.c: Update.
2052         * mi/mi-cmd-var.c: Update.
2053         * mi/mi-interp.c: Update.
2054         * mi/mi-main.c: Update.
2055         * nto-procfs.c: Update.
2056         * ppc-linux-tdep.c: Update.
2057         * procfs.c: Update.
2058         * python/py-inferior.c: Update.
2059         * python/py-record-btrace.c: Update.
2060         * python/py-record.c: Update.
2061         * ravenscar-thread.c: Update.
2062         * regcache.c: Update.
2063         * remote-sim.c: Update.
2064         * remote.c: Update.
2065         * sol-thread.c: Update.
2066         * solib.c: Update.
2067         * target.c: Update.
2068         * tui/tui-stack.c: Update.
2069         * varobj.c: Update.
2070         * windows-nat.c: Update.
2071         * windows-tdep.c: Update.
2072
2073 2018-07-03  Tom Tromey  <tom@tromey.com>
2074
2075         * common/ptid.c (ptid_match): Remove.
2076         * common/ptid.h (ptid_match): Don't declare.
2077         * fbsd-nat.c: Update.
2078         * infcmd.c: Update.
2079         * infrun.c: Update.
2080         * linux-nat.c: Update.
2081         * record-btrace.c: Update.
2082         * regcache.c: Update.
2083         * remote.c: Update.
2084
2085 2018-07-03  Tom Tromey  <tom@tromey.com>
2086
2087         * common/ptid.c (ptid_tid_p): Remove.
2088         * common/ptid.h (ptid_tid_p): Don't declare.
2089         * sol-thread.c: Update.
2090
2091 2018-07-03  Tom Tromey  <tom@tromey.com>
2092
2093         * common/ptid.c (ptid_lwp_p): Remove.
2094         * common/ptid.h (ptid_lwp_p): Don't declare.
2095         * fbsd-nat.c: Update.
2096         * linux-nat.c: Update.
2097         * nat/linux-procfs.c: Update.
2098         * nat/x86-linux-dregs.c: Update.
2099         * sol-thread.c: Update.
2100
2101 2018-07-03  Tom Tromey  <tom@tromey.com>
2102
2103         * common/ptid.c (ptid_is_pid): Remove.
2104         * common/ptid.h (ptid_is_pid): Don't declare.
2105         * infrun.c: Update.
2106         * linux-nat.c: Update.
2107         * mi/mi-interp.c: Update.
2108         * remote.c: Update.
2109         * thread.c: Update.
2110
2111 2018-07-03  Tom Tromey  <tom@tromey.com>
2112
2113         * common/ptid.c (ptid_get_tid): Remove.
2114         * common/ptid.h (ptid_get_tid): Don't declare.
2115         * ada-tasks.c: Update.
2116         * aix-thread.c: Update.
2117         * bsd-uthread.c: Update.
2118         * darwin-nat.c: Update.
2119         * fbsd-nat.c: Update.
2120         * i386-darwin-nat.c: Update.
2121         * infrun.c: Update.
2122         * linux-tdep.c: Update.
2123         * nto-procfs.c: Update.
2124         * ppc-ravenscar-thread.c: Update.
2125         * python/py-infthread.c: Update.
2126         * ravenscar-thread.c: Update.
2127         * sol-thread.c: Update.
2128         * sparc-ravenscar-thread.c: Update.
2129         * windows-nat.c: Update.
2130
2131 2018-07-03  Tom Tromey  <tom@tromey.com>
2132
2133         * common/ptid.c (ptid_get_lwp): Remove.
2134         * common/ptid.h (ptid_get_lwp): Don't declare.
2135         * aarch64-linux-nat.c: Update.
2136         * ada-tasks.c: Update.
2137         * aix-thread.c: Update.
2138         * amd64-linux-nat.c: Update.
2139         * arm-linux-nat.c: Update.
2140         * corelow.c: Update.
2141         * fbsd-nat.c: Update.
2142         * fbsd-tdep.c: Update.
2143         * gnu-nat.c: Update.
2144         * i386-cygwin-tdep.c: Update.
2145         * i386-gnu-nat.c: Update.
2146         * i386-linux-nat.c: Update.
2147         * ia64-linux-nat.c: Update.
2148         * inf-ptrace.c: Update.
2149         * infrun.c: Update.
2150         * linux-fork.c: Update.
2151         * linux-nat.c: Update.
2152         * linux-tdep.c: Update.
2153         * linux-thread-db.c: Update.
2154         * mips-linux-nat.c: Update.
2155         * nat/aarch64-linux-hw-point.c: Update.
2156         * nat/aarch64-linux.c: Update.
2157         * nat/linux-btrace.c: Update.
2158         * nat/linux-osdata.c: Update.
2159         * nat/linux-procfs.c: Update.
2160         * nat/x86-linux-dregs.c: Update.
2161         * obsd-nat.c: Update.
2162         * ppc-fbsd-nat.c: Update.
2163         * ppc-linux-nat.c: Update.
2164         * procfs.c: Update.
2165         * python/py-infthread.c: Update.
2166         * ravenscar-thread.c: Update.
2167         * remote.c: Update.
2168         * s390-linux-nat.c: Update.
2169         * sol-thread.c: Update.
2170         * sol2-tdep.c: Update.
2171         * spu-linux-nat.c: Update.
2172         * x86-linux-nat.c: Update.
2173         * xtensa-linux-nat.c: Update.
2174
2175 2018-07-03  Tom Tromey  <tom@tromey.com>
2176
2177         * common/ptid.c (ptid_get_pid): Remove.
2178         * common/ptid.h (ptid_get_pid): Don't declare.
2179         * aarch64-linux-nat.c: Update.
2180         * ada-lang.c: Update.
2181         * aix-thread.c: Update.
2182         * alpha-bsd-nat.c: Update.
2183         * amd64-fbsd-nat.c: Update.
2184         * amd64-linux-nat.c: Update.
2185         * arm-linux-nat.c: Update.
2186         * arm-nbsd-nat.c: Update.
2187         * auxv.c: Update.
2188         * break-catch-syscall.c: Update.
2189         * breakpoint.c: Update.
2190         * bsd-uthread.c: Update.
2191         * corelow.c: Update.
2192         * ctf.c: Update.
2193         * darwin-nat.c: Update.
2194         * fbsd-nat.c: Update.
2195         * fbsd-tdep.c: Update.
2196         * gcore.c: Update.
2197         * gnu-nat.c: Update.
2198         * hppa-nbsd-nat.c: Update.
2199         * hppa-obsd-nat.c: Update.
2200         * i386-fbsd-nat.c: Update.
2201         * ia64-linux-nat.c: Update.
2202         * inf-ptrace.c: Update.
2203         * infcmd.c: Update.
2204         * inferior.c: Update.
2205         * inferior.h: Update.
2206         * inflow.c: Update.
2207         * infrun.c: Update.
2208         * linux-fork.c: Update.
2209         * linux-nat.c: Update.
2210         * linux-tdep.c: Update.
2211         * linux-thread-db.c: Update.
2212         * m68k-bsd-nat.c: Update.
2213         * mi/mi-interp.c: Update.
2214         * mi/mi-main.c: Update.
2215         * mips-linux-nat.c: Update.
2216         * mips-nbsd-nat.c: Update.
2217         * mips64-obsd-nat.c: Update.
2218         * nat/aarch64-linux-hw-point.c: Update.
2219         * nat/aarch64-linux.c: Update.
2220         * nat/linux-btrace.c: Update.
2221         * nat/linux-osdata.c: Update.
2222         * nat/linux-procfs.c: Update.
2223         * nat/x86-linux-dregs.c: Update.
2224         * nto-procfs.c: Update.
2225         * obsd-nat.c: Update.
2226         * ppc-linux-nat.c: Update.
2227         * ppc-nbsd-nat.c: Update.
2228         * ppc-obsd-nat.c: Update.
2229         * proc-service.c: Update.
2230         * procfs.c: Update.
2231         * python/py-inferior.c: Update.
2232         * python/py-infthread.c: Update.
2233         * ravenscar-thread.c: Update.
2234         * record.c: Update.
2235         * remote-sim.c: Update.
2236         * remote.c: Update.
2237         * rs6000-nat.c: Update.
2238         * s390-linux-nat.c: Update.
2239         * sh-nbsd-nat.c: Update.
2240         * sol-thread.c: Update.
2241         * sparc-nat.c: Update.
2242         * sparc64-tdep.c: Update.
2243         * spu-linux-nat.c: Update.
2244         * spu-tdep.c: Update.
2245         * target-debug.h: Update.
2246         * target.c: Update.
2247         * thread.c: Update.
2248         * tid-parse.c: Update.
2249         * tracefile-tfile.c: Update.
2250         * vax-bsd-nat.c: Update.
2251         * windows-nat.c: Update.
2252         * x86-linux-nat.c: Update.
2253         * x86-nat.c: Update.
2254
2255 2018-07-03  Tom Tromey  <tom@tromey.com>
2256
2257         * common/ptid.c (pid_to_ptid): Remove.
2258         * common/ptid.h (pid_to_ptid): Don't declare.
2259         * aix-thread.c: Update.
2260         * arm-linux-nat.c: Update.
2261         * common/ptid.c: Update.
2262         * common/ptid.h: Update.
2263         * corelow.c: Update.
2264         * ctf.c: Update.
2265         * darwin-nat.c: Update.
2266         * fbsd-nat.c: Update.
2267         * fork-child.c: Update.
2268         * gnu-nat.c: Update.
2269         * go32-nat.c: Update.
2270         * inf-ptrace.c: Update.
2271         * infcmd.c: Update.
2272         * inferior.c: Update.
2273         * infrun.c: Update.
2274         * linux-fork.c: Update.
2275         * linux-nat.c: Update.
2276         * nat/aarch64-linux-hw-point.c: Update.
2277         * nat/fork-inferior.c: Update.
2278         * nat/x86-linux-dregs.c: Update.
2279         * nto-procfs.c: Update.
2280         * obsd-nat.c: Update.
2281         * procfs.c: Update.
2282         * progspace.c: Update.
2283         * remote.c: Update.
2284         * rs6000-nat.c: Update.
2285         * s390-linux-nat.c: Update.
2286         * sol-thread.c: Update.
2287         * spu-linux-nat.c: Update.
2288         * target.c: Update.
2289         * top.c: Update.
2290         * tracefile-tfile.c: Update.
2291         * windows-nat.c: Update.
2292
2293 2018-07-03  Tom Tromey  <tom@tromey.com>
2294
2295         * common/ptid.h (ptid_build): Don't declare.
2296         * common/ptid.c (ptid_build): Remove.
2297         * aix-thread.c: Update.
2298         * bsd-kvm.c: Update.
2299         * bsd-uthread.c: Update.
2300         * common/agent.c: Update.
2301         * common/ptid.c: Update.
2302         * common/ptid.h: Update.
2303         * corelow.c: Update.
2304         * darwin-nat.c: Update.
2305         * fbsd-nat.c: Update.
2306         * gnu-nat.c: Update.
2307         * linux-fork.c: Update.
2308         * linux-nat.c: Update.
2309         * linux-thread-db.c: Update.
2310         * nat/linux-osdata.c: Update.
2311         * nat/linux-procfs.c: Update.
2312         * nto-procfs.c: Update.
2313         * obsd-nat.c: Update.
2314         * proc-service.c: Update.
2315         * procfs.c: Update.
2316         * ravenscar-thread.c: Update.
2317         * remote-sim.c: Update.
2318         * remote.c: Update.
2319         * sol-thread.c: Update.
2320         * target.c: Update.
2321         * windows-nat.c: Update.
2322
2323 2018-07-03  Tom Tromey  <tom@tromey.com>
2324
2325         * infrun.c (follow_exec): Use exit_inferior_silent.
2326         * inferior.c (exit_inferior_num_silent): Remove.
2327         * inferior.h (exit_inferior_num_silent): Don't declare.
2328
2329 2018-07-03  Tom Tromey  <tom@tromey.com>
2330
2331         PR cli/23340:
2332         * darwin-nat.c (darwin_attach_pid): Reset inferior and
2333         inferior_ptid on error.
2334
2335 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
2336             Simon Marchi  <simon.marchi@polymtl.ca>
2337
2338         PR tdep/8282
2339         * disasm.h (gdb_disassembler): Add
2340         `m_disassembler_options_holder'. member
2341         * disasm.c (get_all_disassembler_options): New function.
2342         (gdb_disassembler::gdb_disassembler): Use it.
2343         (gdb_buffered_insn_length_init_dis): Likewise.
2344         (gdb_buffered_insn_length): Adjust accordingly.
2345         (set_disassembler_options): Handle options with arguments.
2346         (show_disassembler_options_sfunc): Likewise.  Add a leading new
2347         line if showing options with descriptions.
2348         (disassembler_options_completer): Adapt to using the
2349         `disasm_options_and_args_t' structure.
2350         * mips-tdep.c (mips_disassembler_options): New variable.
2351         (mips_disassembler_options_o32): Likewise.
2352         (mips_disassembler_options_n32): Likewise.
2353         (mips_disassembler_options_n64): Likewise.
2354         (gdb_print_insn_mips): Don't set `disassembler_options'.
2355         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2356         functions.
2357         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2358         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
2359         `gdbarch_disassembler_options_implicit' and
2360         `gdbarch_valid_disassembler_options'.
2361         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2362         `disasm_options_and_args_t' structure.
2363         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2364         method.
2365         (valid_disassembler_options): Switch from `disasm_options_t' to
2366         the `disasm_options_and_args_t' structure.
2367         * NEWS: Document `set disassembler-options' support for the MIPS
2368         target.
2369         * gdbarch.h: Regenerate.
2370         * gdbarch.c: Regenerate.
2371
2372 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2373
2374         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2375
2376 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
2377
2378         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2379         parameter in call to amd64_target_description.
2380         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2381         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2382         (amd64fbsd_init_abi): Likewise.
2383         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2384         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2385         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2386         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2387
2388 2018-06-29  Pedro Alves  <palves@redhat.com>
2389
2390         * gdb/amd64-tdep.h (amd64_create_target_description): Add
2391         "segments" parameter.
2392         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2393         (_initialize_amd64_tdep): Update call to
2394         amd64_create_target_description.
2395         (amd64_target_description): Add "segments" parameter.  Adjust
2396         the implementation to use it.
2397         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2398         call to amd64_create_target_description.
2399         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2400         * gdb/arch/amd64.h (amd64_create_target_description): Add
2401         "segments" register.
2402         * gdb/arch/amd64.c (amd64_create_target_description): Add
2403         "segments" parameter.  Call create_feature_i386_64bit_segments
2404         only if SEGMENTS is true.
2405         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2406         call to amd64_create_target_description.
2407
2408 2018-06-29  Pedro Alves  <palves@redhat.com>
2409
2410         * thread.c (thread_target_id_str): New, factored out from ...
2411         (print_thread_info_1): ... here.  Use it to compute the max
2412         "Target Id" column width.
2413
2414 2018-06-29  Pedro Alves  <palves@redhat.com>
2415
2416         * remote.c (remote_target::extra_thread_info): Delete
2417         'display_buf' and 'n' locals.  from the cache, regardless of
2418         packet mechanims is in use.  Use cache for qThreadExtra and qP
2419         methods too.
2420
2421 2018-06-29  Pedro Alves  <palves@redhat.com>
2422
2423         * blockframe.c (find_pc_sect_containing_function): New function.
2424         * breakpoint.c (print_breakpoint_location): Don't call
2425         find_pc_sect_function.
2426         * linespec.c (create_sals_line_offset): Record the location's
2427         symbol in the sal.
2428         * linespec.c (convert_address_location_to_sals): Fill in sal's
2429         symbol with find_pc_sect_containing_function.
2430         * symtab.c (find_function_start_sal): Rename to ...
2431         (find_function_start_sal_1): ... this.
2432         (find_function_start_sal): Reimplement as wrapper around
2433         find_function_start_sal_1, and use
2434         find_pc_sect_containing_function to fill in the sal's symbol.
2435         (find_function_start_sal(symbol*, bool)): Adjust.
2436         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2437         comments.
2438         (find_pc_sect_containing_function): Declare.
2439
2440 2018-06-29  Pedro Alves  <palves@redhat.com>
2441
2442         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2443         true if the the location has no symbol.
2444
2445 2018-06-28  Tom Tromey  <tom@tromey.com>
2446
2447         * NEWS: Mention --enable-codesign.
2448         * silent-rules.mk (ECHO_SIGN): New variable.
2449         * configure.ac: Add --enable-codesign.
2450         * configure: Rebuild.
2451         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2452         (gdb$(EXEEXT)): Optionally invoke codesign.
2453
2454 2018-06-28  Pedro Alves  <palves@redhat.com>
2455
2456         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2457         comments.
2458         (switch_to_thread_no_regs): Adjust comment.
2459         * infcmd.c (stop_pc): Delete.
2460         (post_create_inferior, info_program_command): Replace references
2461         to stop_pc with references to thread_info->suspend.stop_pc.
2462         * inferior.h (stop_pc): Delete declaration.
2463         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2464         (handle_inferior_event_1, handle_signal_stop)
2465         (process_event_stop_test, keep_going_stepped_thread)
2466         (handle_step_into_function, handle_step_into_function_backward)
2467         (print_stop_location): Replace references to stop_pc with
2468         references to thread_info->suspend.stop_pc.
2469         (struct infcall_suspend_state) <stop_pc>: Delete field.
2470         (save_infcall_suspend_state, restore_infcall_suspend_state):
2471         Remove references to inf_stat->stop_pc.
2472         * linux-fork.c (fork_load_infrun_state): Likewise.
2473         * record-btrace.c (record_btrace_set_replay): Likewise.
2474         * record-full.c (record_full_goto_entry): Likewise.
2475         * remote.c (print_one_stopped_thread): Likewise.
2476         * target.c (target_resume): Extend comment.
2477         * thread.c (set_executing_thread): New.
2478         (set_executing): Use it.
2479         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2480         Remove references to stop_pc.
2481
2482 2018-06-28  Pedro Alves  <palves@redhat.com>
2483
2484         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2485         Moving fetching stop_pc until after ecs->event_thread is refreshed.
2486
2487 2018-06-28  Tom Tromey  <tom@tromey.com>
2488
2489         * coffread.c (coff_symfile_finish): Update.
2490         * xcoffread.c (xcoff_symfile_finish): Update.
2491         * elfread.c (elf_symfile_finish): Update.
2492         * symfile.h (dwarf2_free_objfile): Don't declare.
2493         * dwarf2read.c (_initialize_dwarf2_read): Use
2494         register_objfile_data_with_cleanup.
2495         (dwarf2_free_objfile): Now static.  Change signature.
2496
2497 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2498
2499         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2500         option "-o" to add-symbol-file-load to add an offset to each
2501         section's load address.
2502         * symfile.c (set_objfile_default_section_offset): New function.
2503
2504 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2505
2506         * symfile.c (add_symbol_file_command): Make sure that sections
2507         with the same name are sorted in the same order.
2508
2509 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2510
2511         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2512         require the second argument.  If omitted, load sections at the
2513         addresses specified in the file.
2514
2515 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2516
2517         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2518         (_initialize_symfile): Add option "-o" to symbol-file to add an
2519         offset to each section of the symbol file.
2520
2521 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2522
2523         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2524
2525 2018-06-27  Tom Tromey  <tom@tromey.com>
2526
2527         * stack.c (_initialize_stack): Update "func" help text.
2528
2529 2018-06-27  Tom Tromey  <tom@tromey.com>
2530
2531         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2532         std::vector.
2533         (unwind_infopy_str, pyuw_create_unwind_info)
2534         (unwind_infopy_add_saved_register, pyuw_sniffer)
2535         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2536         Update.
2537         (struct saved_reg): Add constructor.
2538         <value>: Now a gdbpy_ref<>.
2539
2540 2018-06-27  Tom Tromey  <tom@tromey.com>
2541
2542         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2543
2544 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2545
2546         * gdb-gdb.py.in: Format using autopep8.
2547
2548 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2549
2550         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2551         (type_lookup_function): Recognize CORE_ADDR values.
2552
2553 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2554
2555         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2556         print tag_name.
2557
2558 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2559
2560         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2561         <__lt__>: Add.
2562
2563 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2564
2565         * gdb-gdb.py: Move to...
2566         * gdb-gdb.py.in: ... here.
2567         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2568         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2569         dependencies.
2570         (distclean): Remove gdb-gdb.py when cleaning.
2571         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2572         * configure: Re-generate.
2573
2574 2018-06-27  Pedro Alves  <palves@redhat.com>
2575
2576         * proc-service.c (get_ps_regcache): New.
2577         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2578         (ps_lsetfpregs): Use it.
2579
2580 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2581
2582         PR gdb/21695
2583         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2584         (dwarf_decode_lines_1): Adjust.
2585
2586 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2587
2588         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2589         override.
2590         <info_proc>: Likewise.
2591
2592 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2593
2594         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2595         to windows_fetch_one_register, and only handle the case of
2596         fetching one register.  Move the code that reloads the context
2597         and iterates over all registers if R is negative to...
2598         (windows_nat_target::fetch_registers): ... here.
2599         (do_windows_store_inferior_registers): Rename to
2600         windows_store_one_register, and only handle the case of storing
2601         one register.  Move the code that handles the case where r is
2602         negative to...
2603         (windows_nat_target::store_registers) ... here.
2604
2605 2018-06-26  Tom Tromey  <tom@tromey.com>
2606
2607         PR rust/22574:
2608         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2609         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2610         Update.
2611         (rust_internal_print_type): Add podata parameter.
2612         (rust_print_type): Update.
2613
2614 2018-06-26  Tom Tromey  <tom@tromey.com>
2615
2616         * typeprint.h (struct print_offset_data) <update, finish,
2617         maybe_print_hole>: New methods.
2618         <indentation>: New constant.
2619         * typeprint.c (print_offset_data::indentation): Define.
2620         (print_offset_data::maybe_print_hole, print_offset_data::update)
2621         (print_offset_data::finish): Move from c-typeprint.c and rename.
2622         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2623         (print_spaces_filtered_with_print_options): Update.
2624         (c_print_type_union_field_offset, maybe_print_hole)
2625         (c_print_type_struct_field_offset): Move to typeprint.c and
2626         rename.
2627         (c_type_print_base_struct_union): Update.
2628
2629 2018-06-25  Pedro Alves  <palves@redhat.com>
2630
2631         * gdbthread.h (thread_info_ref, delete_thread)
2632         (delete_thread_silent, first_thread_of_inferior)
2633         (any_thread_of_inferior, switch_to_thread)
2634         (enable_thread_stack_temporaries)
2635         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2636         (get_last_thread_stack_temporary)
2637         (value_in_thread_stack_temporaries, can_access_registers_thread):
2638         Spell out "struct thread_info" instead of just "thread_info".
2639         * inferior.h (notice_new_inferior): Likewise.
2640
2641 2018-06-25  Pedro Alves  <palves@redhat.com>
2642
2643         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2644         pass thread_info pointer to delete_thread.
2645         (windows_nat_target::detach): Pass inferior pointer to
2646         detach_inferior.
2647         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2648         delete_thread.
2649         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2650         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2651         and pass a thread_info pointer to delete_thread.
2652         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2653         pass thread_info pointer to delete_thread.
2654         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2655         delete_thread_silent call.
2656         * procfs.c (procfs_target::detach): Pass inferior pointer to
2657         detach_inferior.
2658         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2659         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2660         delete_thread_silent call.
2661         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2662         pass thread_info pointer to delete_thread.
2663         (windows_nat_target::detach): Pass inferior pointer to
2664         delete_inferior.
2665
2666 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2667
2668         * regcache.c (readable_regcache::read_part): Fix asserts.
2669         (reg_buffer::raw_collect_part): New function.
2670         (regcache::write_part): Fix asserts.
2671         (reg_buffer::raw_supply_part): New function.
2672         (regcache::transfer_regset_register): New helper function.
2673         (regcache::transfer_regset): Call new functions.
2674         (regcache_supply_regset): Use gdb_byte*.
2675         (regcache::supply_regset): Likewise.
2676         (regcache_collect_regset): Likewise.
2677         (regcache::collect_regset): Likewise.
2678         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2679         (reg_buffer::raw_supply_part): Likewise.
2680         (regcache::transfer_regset_register): Likewise.
2681         (regcache::transfer_regset): Use gdb_byte*.
2682
2683 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2684
2685         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2686
2687 2018-06-21  Pedro Alves  <palves@redhat.com>
2688
2689         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2690         instead of a ptid_t.  All callers adjusted.
2691         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2692         adjusted.
2693         (print_ada_task_info, display_current_task_id, task_command_1):
2694         Adjust.
2695         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2696         inferior_thread.
2697         (breakpoint_kind): Adjust.
2698         (remove_breakpoints_pid): Rename to ...
2699         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2700         pointer.  All callers adjusted.
2701         (bpstat_clear_actions): Use inferior_thread.
2702         (get_bpstat_thread): New.
2703         (bpstat_do_actions): Use it.
2704         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2705         to take a thread_info pointer.  All callers adjusted.
2706         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2707         (breakpoint_re_set_thread): Use inferior_thread.
2708         * breakpoint.h (struct inferior): Forward declare.
2709         (bpstat_stop_status): Update.
2710         (remove_breakpoints_pid): Delete.
2711         (remove_breakpoints_inf): New.
2712         * bsd-uthread.c (bsd_uthread_target::wait)
2713         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2714         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2715         (maint_btrace_packet_history_cmd)
2716         (maint_btrace_clear_packet_history_cmd): Adjust.
2717         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2718         inferior_thread.
2719         * cli/cli-interp.c: Include "inferior.h".
2720         * common/refcounted-object.h (struct
2721         refcounted_object_ref_policy): New.
2722         * compile/compile-object-load.c: Include gdbthread.h.
2723         (store_regs): Use inferior_thread.
2724         * corelow.c (core_target::close): Use current_inferior.
2725         (core_target_open): Adjust to use first_thread_of_inferior and use
2726         the current inferior.
2727         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2728         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2729         <thread>: ... this new field.  All references adjusted.
2730         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2731         Take a thread_info pointer instead of a ptid_t.
2732         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2733         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2734         thread_info pointer instead of a ptid_t.
2735         * elfread.c: Include "inferior.h".
2736         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2737         Use inferior_thread.
2738         * eval.c (evaluate_subexp): Likewise.
2739         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2740         inferior_thread.
2741         * gdb_proc_service.h (struct thread_info): Forward declare.
2742         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2743         <thread>: ... this new field.  All references adjusted.
2744         * gdbarch.h, gdbarch.c: Regenerate.
2745         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2746         'thread' parameter.  All implementations and callers adjusted.
2747         * gdbthread.h (thread_info) <set_running>: New method.
2748         (delete_thread, delete_thread_silent): Take a thread_info pointer
2749         instead of a ptid.
2750         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2751         (first_thread_of_process): Delete, replaced by ...
2752         (first_thread_of_inferior): ... this new function.  All callers
2753         adjusted.
2754         (any_live_thread_of_process): Delete, replaced by ...
2755         (any_live_thread_of_inferior): ... this new function.  All callers
2756         adjusted.
2757         (switch_to_thread, switch_to_no_thread): Declare.
2758         (is_executing): Delete.
2759         (enable_thread_stack_temporaries): Update comment.
2760         <enable_thread_stack_temporaries>: Take a thread_info pointer
2761         instead of a ptid_t.  Incref the thread.
2762         <~enable_thread_stack_temporaries>: Decref the thread.
2763         <m_ptid>: Delete
2764         <m_thr>: New.
2765         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2766         (get_last_thread_stack_temporary)
2767         (value_in_thread_stack_temporaries, can_access_registers_thread):
2768         Take a thread_info pointer instead of a ptid_t.  All callers
2769         adjusted.
2770         * infcall.c (get_call_return_value): Use inferior_thread.
2771         (run_inferior_call): Work with thread pointers instead of ptid_t.
2772         (call_function_by_hand_dummy): Work with thread pointers instead
2773         of ptid_t.  Use thread_info_ref.
2774         * infcmd.c (proceed_thread_callback): Access thread's state
2775         directly.
2776         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2777         access thread's state directly.
2778         (continue_command): Use inferior_thread.
2779         (info_program_command): Use find_thread_ptid and access thread
2780         state directly.
2781         (proceed_after_attach_callback): Use thread state directly.
2782         (notice_new_inferior): Take a thread_info pointer instead of a
2783         ptid_t.  All callers adjusted.
2784         (exit_inferior): Take an inferior pointer instead of a pid.  All
2785         callers adjusted.
2786         (exit_inferior_silent): New.
2787         (detach_inferior): Delete.
2788         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2789         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2790         (detach_inferior_command, kill_inferior_command): Use
2791         find_inferior_id instead of valid_gdb_inferior_id and
2792         gdb_inferior_id_to_pid.
2793         (inferior_command): Use inferior and thread pointers.
2794         * inferior.h (struct thread_info): Forward declare.
2795         (notice_new_inferior): Take a thread_info pointer instead of a
2796         ptid_t.  All callers adjusted.
2797         (detach_inferior): Delete declaration.
2798         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2799         instead of a pid.  All callers adjusted.
2800         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2801         (valid_gdb_inferior_id): Delete.
2802         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2803         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2804         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2805         ...
2806         <inf>: ... this new field.
2807         <step_ptid>: Delete, replaced by ...
2808         <step_thread>: ... this new field.
2809         (get_displaced_stepping_state): Take an inferior pointer instead
2810         of a pid.  All callers adjusted.
2811         (displaced_step_in_progress_any_inferior): Adjust.
2812         (displaced_step_in_progress_thread): Take a thread pointer instead
2813         of a ptid_t.  All callers adjusted.
2814         (displaced_step_in_progress, add_displaced_stepping_state): Take
2815         an inferior pointer instead of a pid.  All callers adjusted.
2816         (get_displaced_step_closure_by_addr): Adjust.
2817         (remove_displaced_stepping_state): Take an inferior pointer
2818         instead of a pid.  All callers adjusted.
2819         (displaced_step_prepare_throw, displaced_step_prepare)
2820         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2821         All callers adjusted.
2822         (start_step_over): Adjust.
2823         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2824         displaced step queue.
2825         (do_target_resume): Adjust.
2826         (fetch_inferior_event): Use inferior_thread.
2827         (context_switch, get_inferior_stop_soon): Take an
2828         execution_control_state pointer instead of a ptid_t.  All callers
2829         adjusted.
2830         (switch_to_thread_cleanup): Delete.
2831         (stop_all_threads): Use scoped_restore_current_thread.
2832         * inline-frame.c: Include "gdbthread.h".
2833         (inline_state) <inline_state>: Take a thread pointer instead of a
2834         ptid_t.  All callers adjusted.
2835         <ptid>: Delete, replaced by ...
2836         <thread>: ... this new field.
2837         (find_inline_frame_state): Take a thread pointer instead of a
2838         ptid_t.  All callers adjusted.
2839         (skip_inline_frames, step_into_inline_frame)
2840         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2841         pointer instead of a ptid_t.  All callers adjusted.
2842         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2843         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2844         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2845         pointers directly.
2846         * linux-nat.c (get_detach_signal): Likewise.
2847         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2848         (thread_db_notice_clone): Adjust.
2849         (thread_db_find_new_threads_silently)
2850         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2851         a thread pointer instead of a ptid_t.  All callers adjusted.
2852         * mi/mi-cmd-var.c: Include "inferior.h".
2853         (mi_cmd_var_update_iter): Update to use thread pointers.
2854         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2855         inferior directly.
2856         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2857         out to ...
2858         (mi_output_running): ... this new function.
2859         (mi_on_resume_1): Adjust to use it.
2860         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2861         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2862         directly.
2863         (interrupt_thread_callback): : Adjust to use thread and inferior
2864         pointers.
2865         * proc-service.c: Include "gdbthread.h".
2866         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2867         * progspace-and-thread.c: Include "inferior.h".
2868         * progspace.c: Include "inferior.h".
2869         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2870         hold a reference to an inferior_object.
2871         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2872         inferior_thread.
2873         * python/py-inferior.c (struct inferior_object): Give the type a
2874         tag name instead of a typedef.
2875         (python_on_normal_stop): No need to check if the current thread is
2876         listed.
2877         (inferior_to_inferior_object): Change return type to
2878         inferior_object.  All callers adjusted.
2879         (find_thread_object): Delete, bits factored out to ...
2880         (thread_to_thread_object): ... this new function.
2881         * python/py-infthread.c (create_thread_object): Use
2882         inferior_to_inferior_object.
2883         (thpy_is_stopped): Use thread pointer directly.
2884         (gdbpy_selected_thread): Use inferior_thread.
2885         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2886         field, replaced with ...
2887         <thread>: ... this new field.  All users adjusted.
2888         (btpy_insn_or_gap_new): Drop const.
2889         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2890         callers adjusted.
2891         * python/py-record.c: Include "gdbthread.h".
2892         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2893         a ptid_t.  All callers adjusted.
2894         (gdbpy_current_recording): Use inferior_thread.
2895         * python/py-record.h (recpy_record_object) <ptid>: Delete
2896         field, replaced with ...
2897         <thread>: ... this new field.  All users adjusted.
2898         (recpy_element_object) <ptid>: Delete
2899         field, replaced with ...
2900         <thread>: ... this new field.  All users adjusted.
2901         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2902         a ptid_t.  All callers adjusted.
2903         * python/py-threadevent.c: Include "gdbthread.h".
2904         (get_event_thread): Use thread_to_thread_object.
2905         * python/python-internal.h (struct inferior_object): Forward
2906         declare.
2907         (find_thread_object, find_inferior_object): Delete declarations.
2908         (thread_to_thread_object, inferior_to_inferior_object): New
2909         declarations.
2910         * record-btrace.c: Include "inferior.h".
2911         (require_btrace_thread): Use inferior_thread.
2912         (record_btrace_frame_sniffer)
2913         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2914         (get_thread_current_frame): Use scoped_restore_current_thread and
2915         switch_to_thread.
2916         (get_thread_current_frame): Use thread pointer directly.
2917         (record_btrace_replay_at_breakpoint): Use thread's inferior
2918         pointer directly.
2919         * record-full.c: Include "inferior.h".
2920         * regcache.c: Include "gdbthread.h".
2921         (get_thread_arch_regcache): Use the inferior's address space
2922         directly.
2923         (get_thread_regcache, registers_changed_thread): New.
2924         * regcache.h (get_thread_regcache(thread_info *thread)): New
2925         overload.
2926         (registers_changed_thread): New.
2927         (remote_target) <remote_detach_1>: Swap order of parameters.
2928         (remote_add_thread): <remote_add_thread>: Return the new thread.
2929         (get_remote_thread_info(ptid_t)): New overload.
2930         (remote_target::remote_notice_new_inferior): Use thread pointers
2931         directly.
2932         (remote_target::process_initial_stop_replies): Use
2933         thread_info::set_running.
2934         (remote_target::remote_detach_1, remote_target::detach)
2935         (extended_remote_target::detach): Adjust.
2936         * stack.c (frame_show_address): Use inferior_thread.
2937         * target-debug.h (target_debug_print_thread_info_pp): New.
2938         * target-delegates.c: Regenerate.
2939         * target.c (default_thread_address_space): Delete.
2940         (memory_xfer_partial_1): Use current_inferior.
2941         (target_detach): Use current_inferior.
2942         (target_thread_address_space): Delete.
2943         (generic_mourn_inferior): Use current_inferior.
2944         * target.h (struct target_ops) <thread_address_space>: Delete.
2945         (target_thread_address_space): Delete.
2946         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2947         pointers directly.
2948         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2949         thread pointer instead of a ptid_t.  Adjust all callers.
2950         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2951         (first_thread_of_process): Delete, replaced by ...
2952         (first_thread_of_inferior): ... this new function.  All callers
2953         adjusted.
2954         (any_thread_of_process): Rename to ...
2955         (any_thread_of_inferior): ... this, and take an inferior pointer.
2956         (any_live_thread_of_process): Rename to ...
2957         (any_live_thread_of_inferior): ... this, and take an inferior
2958         pointer.
2959         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2960         (value_in_thread_stack_temporaries)
2961         (get_last_thread_stack_temporary): Take a thread pointer instead
2962         of a ptid_t.  Adjust all callers.
2963         (thread_info::set_running): New.
2964         (validate_registers_access): Use inferior_thread.
2965         (can_access_registers_ptid): Rename to ...
2966         (can_access_registers_thread): ... this, and take a thread
2967         pointer.
2968         (print_thread_info_1): Adjust to compare thread pointers instead
2969         of ptids.
2970         (switch_to_no_thread, switch_to_thread): Make extern.
2971         (scoped_restore_current_thread::~scoped_restore_current_thread):
2972         Use m_thread pointer directly.
2973         (scoped_restore_current_thread::scoped_restore_current_thread):
2974         Use inferior_thread.
2975         (thread_command): Use thread pointer directly.
2976         (thread_num_make_value_helper): Use inferior_thread.
2977         * top.c (execute_command): Use inferior_thread.
2978         * tui/tui-interp.c: Include "inferior.h".
2979         * varobj.c (varobj_create): Use inferior_thread.
2980         (value_of_root_1): Use find_thread_global_id instead of
2981         global_thread_id_to_ptid.
2982
2983 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2984
2985         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2986         possible.
2987         (regcache::write_part): Likewise.
2988         (readable_regcache::cooked_read_part): Update comment.
2989         (readable_regcache::cooked_write_part): Likewise.
2990         * regcache.h: (readable_regcache::read_part): Likewise.
2991         (regcache::write_part): Likewise.
2992
2993 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2994             Dirk Schubert  <dirk.schubert@arm.com>
2995
2996         * aarch64-linux-nat.c (post_attach): New.
2997         (aarch64_linux_nat_target::post_attach): Override post_attach to
2998         record the number of hardware debug registers.
2999
3000 2018-06-20  Tom Tromey  <tom@tromey.com>
3001
3002         * python/py-param.c (add_setshow_generic): Make parameters const.
3003         (parmpy_init): Update.
3004
3005 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3006
3007         * regcache.h (regcache_cooked_read_ftype): Rename to...
3008         (register_read_ftype): ...this, change type to function_view.
3009         (class reg_buffer) <save>: Remove src parameter.
3010         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3011         parameter non-const in first overload.  Remove src parameter in
3012         second overload.
3013         * regcache.c (do_cooked_read): Remove.
3014         (readonly_detached_regcache::readonly_detached_regcache): Make
3015         parameter non-const, adjust call to other constructor.
3016         (reg_buffer::save): Remove src parameter.
3017         * frame.c (do_frame_register_read): Remove.
3018         (frame_save_as_regcache): Use lambda function.
3019         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3020         parameter to ppu2spu_data *.
3021         (ppu2spu_sniffer): Use lambda function.
3022
3023 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3024
3025         * record-full.c (record_full_target::insert_breakpoint): Remove
3026         "struct" keyword, add const.
3027
3028 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3029
3030         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3031         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3032         * configure.ac: Remove AC_PREREQ, add missing quoting.
3033         * gnulib/configure.ac: Modernize usage of
3034         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3035         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3036         (AUTOMAKE_VERSION): Bump to 1.15.1.
3037         * configure: Re-generate.
3038         * config.in: Re-generate.
3039         * aclocal.m4: Re-generate.
3040         * gnulib/aclocal.m4: Re-generate.
3041         * gnulib/config.in: Re-generate.
3042         * gnulib/configure: Re-generate.
3043         * gnulib/import/Makefile.in: Re-generate.
3044
3045 2018-06-19  Pedro Alves  <palves@redhat.com>
3046
3047         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3048         (lookup_minimal_symbol_by_pc_section): ... here with
3049         gdb_assert_not_reached added.
3050
3051 2018-06-19  Pedro Alves  <palves@redhat.com>
3052
3053         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3054         parameter with a block parameter.  Compare location's block symbol
3055         with the frame's block instead of addresses.
3056         (skip_inline_frames): Pass the current block instead of the
3057         frame's address.  Break out as soon as we determine the frame
3058         should not be skipped.
3059
3060 2018-06-18  Tom Tromey  <tom@tromey.com>
3061
3062         * solib-aix.c (solib_aix_get_section_offsets): Return
3063         unique_xmalloc_ptr.
3064         (solib_aix_solib_create_inferior_hook): Update.
3065
3066 2018-06-18  Tom Tromey  <tom@tromey.com>
3067
3068         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3069
3070 2018-06-18  Tom Tromey  <tom@tromey.com>
3071
3072         * solib-frv.c (frv_relocate_main_executable): Use
3073         unique_xmalloc_ptr.
3074         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3075         unique_xmalloc_ptr.
3076
3077 2018-06-18  Tom Tromey  <tom@tromey.com>
3078
3079         * objfiles.h (inhibit_section_map_updates): Update.
3080         (resume_section_map_updates, resume_section_map_updates_cleanup):
3081         Remove.
3082         * solib-svr4.c (svr4_handle_solib_event): Update.
3083         * objfiles.c (inhibit_section_map_updates): Return
3084         scoped_restore_tmpl<int>.
3085         (resume_section_map_updates, resume_section_map_updates_cleanup):
3086         Remove.
3087
3088 2018-06-18  Tom Tromey  <tom@tromey.com>
3089
3090         * valprint.h (read_string): Update.
3091         * valprint.c (read_string): Change type of "buffer".
3092         (val_print_string): Update.
3093         * python/py-value.c (valpy_string): Update.
3094         * language.h (struct language_defn) <la_get_string>: Change
3095         type of "buffer".
3096         (default_get_string, c_get_string): Update.
3097         * language.c (default_get_string): Change type of "buffer".
3098         * guile/scm-value.c (gdbscm_value_to_string): Update.
3099         * c-lang.c (c_get_string): Change type of "buffer".
3100
3101 2018-06-18  Tom Tromey  <tom@tromey.com>
3102
3103         * ser-mingw.c (struct pipe_state_destroyer): New.
3104         (pipe_state_up): New typedef.
3105         (cleanup_pipe_state): Remove.
3106         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3107
3108 2018-06-18  Tom Tromey  <tom@tromey.com>
3109
3110         * rust-lang.h (rust_yyerror): Don't declare.
3111         * rust-lang.c (rust_language_defn): Update.
3112         * rust-exp.y (yyerror): Now static.
3113         * parse.c (parse_exp_in_context_1): Update.
3114         * p-lang.h (p_yyerror): Don't declare.
3115         * p-lang.c (p_language_defn): Update.
3116         * p-exp.y (yyerror): Now static.
3117         * opencl-lang.c (opencl_language_defn): Update.
3118         * objc-lang.c (objc_language_defn): Update.
3119         * m2-lang.h (m2_yyerror): Don't declare.
3120         * m2-lang.c (m2_language_defn): Update.
3121         * m2-exp.y (yyerror): Now static.
3122         * language.h (struct language_defn) <la_error>: Remove.
3123         * language.c (unk_lang_error): Remove.
3124         (unknown_language_defn, auto_language_defn): Remove.
3125         * go-lang.h (go_yyerror): Don't declare.
3126         * go-lang.c (go_language_defn): Update.
3127         * go-exp.y (yyerror): Now static.
3128         * f-lang.h (f_yyerror): Don't declare.
3129         * f-lang.c (f_language_defn): Update.
3130         * f-exp.y (yyerror): Now static.
3131         * d-lang.h (d_yyerror): Don't declare.
3132         * d-lang.c (d_language_defn): Update.
3133         * d-exp.y (yyerror): Now static.
3134         * c-lang.h (c_yyerror): Don't declare.
3135         * c-lang.c (c_language_defn, cplus_language_defn)
3136         (asm_language_defn, minimal_language_defn): Update.
3137         * c-exp.y (yyerror): Now static.
3138         * ada-lang.h (ada_yyerror): Don't declare.
3139         * ada-lang.c (ada_language_defn): Update.
3140         * ada-exp.y (yyerror): Now static.
3141
3142 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3143
3144         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3145         (store_sveregs_to_thread): Likewise.
3146         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3147         (aarch64_linux_store_inferior_registers): Likewise.
3148         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3149         function.
3150         (aarch64_sve_regs_copy_to_regcache): Likewise.
3151         (aarch64_sve_regs_copy_from_regcache): Likewise.
3152         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3153         declaration.
3154         (aarch64_sve_regs_copy_to_regcache): Likewise.
3155         (aarch64_sve_regs_copy_from_regcache): Likewise.
3156         (sve_context): Structure from Linux headers.
3157         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3158         (SVE_SIG_ZREG_SIZE): Likewise.
3159         (SVE_SIG_PREG_SIZE): Likewise.
3160         (SVE_SIG_FFR_SIZE): Likewise.
3161         (SVE_SIG_REGS_OFFSET): Likewise.
3162         (SVE_SIG_ZREGS_OFFSET): Likewise.
3163         (SVE_SIG_ZREG_OFFSET): Likewise.
3164         (SVE_SIG_ZREGS_SIZE): Likewise.
3165         (SVE_SIG_PREGS_OFFSET): Likewise.
3166         (SVE_SIG_PREG_OFFSET): Likewise.
3167         (SVE_SIG_PREGS_SIZE): Likewise.
3168         (SVE_SIG_FFR_OFFSET): Likewise.
3169         (SVE_SIG_REGS_SIZE): Likewise.
3170         (SVE_SIG_CONTEXT_SIZE): Likewise.
3171         (SVE_PT_REGS_MASK): Likewise.
3172         (SVE_PT_REGS_FPSIMD): Likewise.
3173         (SVE_PT_REGS_SVE): Likewise.
3174         (SVE_PT_VL_INHERIT): Likewise.
3175         (SVE_PT_VL_ONEXEC): Likewise.
3176         (SVE_PT_REGS_OFFSET): Likewise.
3177         (SVE_PT_FPSIMD_OFFSET): Likewise.
3178         (SVE_PT_FPSIMD_SIZE): Likewise.
3179         (SVE_PT_SVE_ZREG_SIZE): Likewise.
3180         (SVE_PT_SVE_PREG_SIZE): Likewise.
3181         (SVE_PT_SVE_FFR_SIZE): Likewise.
3182         (SVE_PT_SVE_FPSR_SIZE): Likewise.
3183         (SVE_PT_SVE_FPCR_SIZE): Likewise.
3184         (__SVE_SIG_TO_PT): Likewise.
3185         (SVE_PT_SVE_OFFSET): Likewise.
3186         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3187         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3188         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3189         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3190         (SVE_PT_SVE_PREG_OFFSET): Likewise.
3191         (SVE_PT_SVE_PREGS_SIZE): Likewise.
3192         (SVE_PT_SVE_FFR_OFFSET): Likewise.
3193         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3194         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3195         (SVE_PT_SVE_SIZE): Likewise.
3196         (SVE_PT_SIZE): Likewise.
3197         (HAS_SVE_STATE): New define.
3198
3199 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3200
3201         * nat/aarch64-sve-linux-sigcontext.h: New file.
3202         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3203         new files.
3204         (SVE_VQ_MIN): Likewise.
3205         (SVE_VQ_MAX): Likewise.
3206         (SVE_VL_MIN): Likewise.
3207         (SVE_VL_MAX): Likewise.
3208         (SVE_NUM_ZREGS): Likewise.
3209         (SVE_NUM_PREGS): Likewise.
3210         (sve_vl_valid): Likewise.
3211         (struct user_sve_header): Likewise.
3212
3213 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
3214             Richard Bunt <Richard.Bunt@arm.com>
3215
3216         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3217         was requested by GDB.
3218
3219 2018-06-15  Tom de Vries  <tdevries@suse.de>
3220
3221         * MAINTAINERS (Write After Approval): Add Tom de Vries.
3222
3223 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
3224
3225         * gnulib/update-gnulib.sh: Print expected versions of
3226         autoconf/aclocal.
3227
3228 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
3229
3230         * arch-utils.c (default_type_align): Use type_length_units.
3231         * gdbtypes.c (type_align): Use type_length_units.
3232
3233 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3234
3235         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3236         of 'define' command.
3237
3238 2018-06-14  Tom de Vries  <tdevries@suse.de>
3239
3240         PR cli/22573
3241         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3242         get_no_prettyformat_print_options.
3243
3244 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3245
3246         * sparc-nat.h: Include target.h.
3247         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3248         <fetch_registers>: Remove this argument in function call.
3249         <store_registers>: Remove this argument in function call, remove
3250         extra semicolon.
3251         <low_forget_process>: Call sparc64_forget_process instead of
3252         sparc_forget_process.
3253
3254 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3255
3256         * procfs.c (_initialize_procfs): Use add_inf_child_target.
3257         (procfs_target::make_corefile_notes): Adjust to new
3258         target_read_alloc return type.
3259
3260 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3261             Stephen Roberts  <stephen.roberts@arm.com>
3262
3263         PR gdb/22882
3264         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3265         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3266         Move should_notify_stop local into more inner scope.
3267
3268 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3269             Stephen Roberts  <stephen.roberts@arm.com>
3270
3271         PR gdb/22882
3272         * infrun.c (resume_1): Add call to mark_async_event_handler.
3273
3274 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3275
3276         * infrun.c (do_target_wait): Change old version of $pc printed.
3277
3278 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
3279
3280         * dwarf2read.c (read_index_from_section): Rename to...
3281         (read_gdb_index_from_section): ... this, update all callers.
3282         (dwarf2_read_index): Rename to...
3283         (dwarf2_read_gdb_index): ... this, update all callers.
3284
3285 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
3286
3287         * gdb/hppa-linux-nat.c
3288         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3289         hppa_linux_nat_target::fetch_registers.
3290
3291 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3292
3293         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3294         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3295         (AARCH64_DWARF_SVE_FFR): Likewise.
3296         (AARCH64_DWARF_SVE_P0): Likewise.
3297         (AARCH64_DWARF_SVE_Z0): Likewise.
3298
3299 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3300
3301         * common/common-regcache.h (raw_compare): New function.
3302         * regcache.c (regcache::raw_compare): Likewise.
3303         * regcache.h (regcache::raw_compare): New declaration.
3304
3305 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3306
3307         * common/common-regcache.h (reg_buffer_common): New structure.
3308         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3309         (reg_buffer::raw_supply): Likewise.
3310         (reg_buffer::raw_supply_integer): Likewise.
3311         (reg_buffer::raw_supply_zeroed): Likewise.
3312         (reg_buffer::raw_collect): Likewise.
3313         (reg_buffer::raw_collect_integer): Likewise.
3314         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3315         (reg_buffer::raw_supply): Likewise.
3316         (reg_buffer::raw_supply_integer): Likewise.
3317         (reg_buffer::raw_supply_zeroed): Likewise.
3318         (reg_buffer::raw_collect): Likewise.
3319         (reg_buffer::raw_collect_integer): Likewise.
3320
3321 2018-06-10  Tom Tromey  <tom@tromey.com>
3322
3323         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
3324         (class remote_state) <stop_reply_queue>: Now std::vector.
3325         (remote_state::~remote_state)
3326         (remote_target::stop_reply_queue_length): Update.
3327         (struct queue_iter_param, remove_child_of_pending_fork)
3328         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3329         (check_pending_event_prevents_wildcard_vcont_callback)
3330         (remove_stop_reply_for_inferior)
3331         (remove_stop_reply_of_remote_state)
3332         (remote_notif_remove_once_on_match)
3333         (stop_reply_match_ptid_and_ws)
3334         (remote_kill_child_of_pending_fork): Remove.
3335         (remote_target::remove_new_fork_children)
3336         (remote_target::check_pending_events_prevent_wildcard_vcont)
3337         (remote_target::discard_pending_stop_replies)
3338         (remote_target::discard_pending_stop_replies_in_queue)
3339         (remote_target::remote_notif_remove_queued_reply)
3340         (remote_target::queued_stop_reply)
3341         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3342         (remote_target::wait, remote_target::kill_new_fork_children)
3343         (remote_target::async): Update.
3344
3345 2018-06-10  Tom Tromey  <tom@tromey.com>
3346
3347         * record-full.c (record_full_arch_list_cleanups): Remove.
3348         (record_full_message): Use try/catch.
3349         (record_full_wait_cleanups): Remove.
3350         (record_full_wait_1): Use try/catch.
3351         (record_full_restore): Likewise.
3352
3353 2018-06-10  Tom Tromey  <tom@tromey.com>
3354
3355         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
3356         declare VEC.  Add constructor.
3357         <in_target_beneath>: Now bool.
3358         (record_full_breakpoints): Now a std::vector, static.
3359         (record_full_sync_record_breakpoints)
3360         (record_full_init_record_breakpoints)
3361         (record_full_target::insert_breakpoint)
3362         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
3363
3364 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
3365
3366         * dwarf2read.c (process_cu_includes): Remove struct keyword.
3367         * serial.c (serial_interface_lookup): Remove struct keyword.
3368
3369 2018-06-10  Tom Tromey  <tom@tromey.com>
3370
3371         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3372         method.
3373         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3374         a method.
3375         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3376         method.
3377         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3378         "beneath" as a method.
3379         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3380         Use "beneath" as a method.
3381
3382 2018-06-10  Tom Tromey  <tom@tromey.com>
3383
3384         * tracefile.c (struct trace_file_writer_deleter): New.
3385         <operator()>: Rename from trace_file_writer_xfree.
3386         (trace_file_writer_up): New typedef.
3387         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3388
3389 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3390
3391         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3392         <m_registers, m_register_status>: Change type to
3393         std::unique_ptr.
3394         * regcache.c (reg_buffer::reg_buffer): Use new instead of
3395         XCNEWVEC.
3396
3397 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3398
3399         * common/common-regcache.h (enum register_status): Add
3400         underlying type "signed char".
3401         * regcache.h (reg_buffer) <m_register_status>: Change type to
3402         register_status *.
3403         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3404         register_status instead of signed char.
3405         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3406         (reg_buffer::get_register_status): Remove cast.
3407         (readable_regcache::raw_read): Remove cast.
3408         (readable_regcache::cooked_read): Remove cast.
3409
3410 2018-06-09  Tom Tromey  <tom@tromey.com>
3411
3412         * source.c (reverse_search_command, forward_search_command): Use
3413         scoped_fd.
3414
3415 2018-06-09  Tom Tromey  <tom@tromey.com>
3416
3417         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
3418         (serial_ops_list): Now static, std::vector.
3419         (serial_interface_lookup, serial_add_interface): Update.
3420
3421 2018-06-09  Tom Tromey  <tom@tromey.com>
3422
3423         * dwarf2read.c (process_cu_includes): Update.
3424         (process_full_comp_unit): Update.
3425         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3426         std::vector.
3427
3428 2018-06-08  Paul Koning  <paul_koning@dell.com>
3429
3430         PR gdb/23252
3431
3432         * python/python.c (do_start_initialization):
3433         Avoid call to internal Python API.
3434         (init__gdb_module): New function.
3435
3436 2018-06-08  Gary Benson <gbenson@redhat.com>
3437
3438         * linux-thread-db.c (valprint.h): New include.
3439         (struct check_thread_db_info): New structure.
3440         (check_thread_db_on_load, tdb_testinfo): New static globals.
3441         (check_thread_db, check_thread_db_callback): New functions.
3442         (try_thread_db_load_1): Run integrity checks if requested.
3443         (maintenance_check_libthread_db): New function.
3444         (_initialize_thread_db): Register "maint check libthread-db"
3445         and "maint set/show check-libthread-db".
3446         * NEWS: Mention the above new commands.
3447
3448 2018-06-08  Tom Tromey  <tom@tromey.com>
3449
3450         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3451         now a method.
3452
3453 2018-06-08  Tom Tromey  <tom@tromey.com>
3454
3455         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3456
3457 2018-06-08  Tom Tromey  <tom@tromey.com>
3458
3459         * common/btrace-common.h (struct btrace_data): Add constructor,
3460         destructor, move assignment operator.
3461         <empty, clear, fini>: New methods.
3462         <format>: Initialize.
3463         (btrace_data_init, btrace_data_fini, btrace_data_clear)
3464         (btrace_data_empty): Don't declare.
3465         * common/btrace-common.c (btrace_data_init): Remove.
3466         (btrace_data::fini): Rename from btrace_data_fini.
3467         (btrace_data::empty): Rename from btrace_data_empty.
3468         (btrace_data::clear): Rename from btrace_data_clear.  Return
3469         bool.
3470         * btrace.h (make_cleanup_btrace_data): Don't declare.
3471         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3472         (parse_xml_btrace): Update.
3473         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3474         (maint_btrace_clear_packet_history_cmd): Update.
3475
3476 2018-06-07  Pedro Alves  <palves@redhat.com>
3477
3478         * target.h (target_ops) <beneath>: Now a method.  All references
3479         updated.
3480         (class target_stack): New.
3481         * target.c (g_target_stack): New.
3482         (g_current_top_target): Delete.
3483         (current_top_target): Get the top target out of g_target_stack.
3484         (target_stack::push, target_stack::unpush): New.
3485         (push_target, unpush_target): Reimplement.
3486         (target_is_pushed): Reimplement in terms of g_target_stack.
3487         (target_ops::beneath, target_stack::find_beneath): New.
3488
3489 2018-06-07  Pedro Alves  <palves@redhat.com>
3490
3491         * target.h (find_target_beneath): Delete declaration.
3492         * target.c (find_target_beneath): Delete definition.
3493         * aix-thread.c: All callers of find_target_beneath adjusted to
3494         call target_ops::beneath instead.
3495         * bsd-uthread.c: Likewise.
3496         * linux-thread-db.c: Likewise.
3497         * ravenscar-thread.c: Likewise.
3498         * sol-thread.c: Likewise.
3499         * spu-multiarch.c: Likewise.
3500
3501 2018-06-07  Pedro Alves  <palves@redhat.com>
3502
3503         * target.h (target_ops) <beneath>: Now a method.  All references
3504         updated.
3505         (target_ops) <m_beneath>: New.
3506         * target.c (target_ops::beneath): New.
3507         * corelow.c: Adjust all references to target_ops::beneath.
3508         * linux-thread-db.c: Likewise.
3509         * make-target-delegates: Likewise.
3510         * record-btrace.c: Likewise.
3511         * record-full.c: Likewise.
3512         * remote.c: Likewise.
3513         * target.c: Likewise.
3514         * target-delegates.c: Regenerate.
3515
3516 2018-06-07  Pedro Alves  <palves@redhat.com>
3517
3518         * target.h (target_stack): Delete.
3519         (current_top_target): Declare function.
3520         * target.c (target_stack): Delete.
3521         (g_current_top_target): New.
3522         (current_top_target): New function.
3523         * auxv.c: Use current_top_target instead of target_stack
3524         throughout.
3525         * avr-tdep.c: Likewise.
3526         * breakpoint.c: Likewise.
3527         * corefile.c: Likewise.
3528         * elfread.c: Likewise.
3529         * eval.c: Likewise.
3530         * exceptions.c: Likewise.
3531         * frame.c: Likewise.
3532         * gdbarch-selftests.c: Likewise.
3533         * gnu-v3-abi.c: Likewise.
3534         * ia64-tdep.c: Likewise.
3535         * ia64-vms-tdep.c: Likewise.
3536         * infcall.c: Likewise.
3537         * infcmd.c: Likewise.
3538         * infrun.c: Likewise.
3539         * linespec.c: Likewise.
3540         * linux-tdep.c: Likewise.
3541         * minsyms.c: Likewise.
3542         * ppc-linux-nat.c: Likewise.
3543         * ppc-linux-tdep.c: Likewise.
3544         * procfs.c: Likewise.
3545         * regcache.c: Likewise.
3546         * remote.c: Likewise.
3547         * rs6000-tdep.c: Likewise.
3548         * s390-linux-nat.c: Likewise.
3549         * s390-tdep.c: Likewise.
3550         * solib-aix.c: Likewise.
3551         * solib-darwin.c: Likewise.
3552         * solib-dsbt.c: Likewise.
3553         * solib-spu.c: Likewise.
3554         * solib-svr4.c: Likewise.
3555         * solib-target.c: Likewise.
3556         * sparc-tdep.c: Likewise.
3557         * sparc64-tdep.c: Likewise.
3558         * spu-tdep.c: Likewise.
3559         * symfile.c: Likewise.
3560         * symtab.c: Likewise.
3561         * target-descriptions.c: Likewise.
3562         * target-memory.c: Likewise.
3563         * target.c: Likewise.
3564         * target.h: Likewise.
3565         * tracefile-tfile.c: Likewise.
3566         * tracepoint.c: Likewise.
3567         * valops.c: Likewise.
3568         * valprint.c: Likewise.
3569         * value.c: Likewise.
3570         * windows-tdep.c: Likewise.
3571         * mi/mi-main.c: Likewise.
3572
3573 2018-06-07  Tom Tromey  <tom@tromey.com>
3574
3575         * valprint.h (build_address_symbolic): Declare.
3576         * printcmd.c (print_address_symbolic): Update.
3577         (build_address_symbolic): Change "name" and "filename" to
3578         std::string.
3579         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3580         Update.
3581         * defs.h (build_address_symbolic): Remove declaration.
3582
3583 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3584
3585         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3586         (aarch64_vnv_type): Add function.
3587         (aarch64_pseudo_register_name): Add V regs for SVE.
3588         (aarch64_pseudo_register_type): Likewise.
3589         (aarch64_pseudo_register_reggroup_p): Likewise.
3590         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3591         (aarch64_pseudo_read_value): Add V regs for SVE.
3592         (aarch64_pseudo_write_2): Use V0 offset for SVE
3593         (aarch64_pseudo_write): Add V regs for SVE.
3594         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3595
3596 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3597
3598         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3599         (sve_vl_from_vq): Likewise.
3600
3601 2018-06-05  Tom Tromey  <tom@tromey.com>
3602
3603         * cli/cli-cmds.c (show_version): Update.
3604         * top.c (print_gdb_version): Add "interactive" parameter.
3605         Update.
3606         * main.c (captured_main_1): Update.
3607         * top.h (print_gdb_version): Add "interactive" parameter and a
3608         comment.
3609
3610 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3611
3612         * common/enum-flags.h: Add trailing semicolon to example in
3613         comment.
3614
3615 2018-06-05  Tom Tromey  <tom@tromey.com>
3616
3617         PR cli/12326:
3618         * NEWS: Add entry about pager.
3619         * utils.c (pagination_disabled_for_command): New global.
3620         (prompt_for_continue): Allow "c" response to prompt.
3621         (reinitialize_more_filter): Clear
3622         pagination_disabled_for_command.
3623         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3624
3625 2018-06-04  Tom Tromey  <tom@tromey.com>
3626
3627         * ada-lang.h (ada_lookup_symbol_list): Update.
3628         * ada-lang.c (resolve_subexp): Update.
3629         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3630         parameter.
3631         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3632         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3633         results parameter to std::vector.
3634         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3635         Update.
3636         * ada-exp.y (block_lookup): Update.
3637         (select_possible_type_sym): Change type of syms.  Remove nsyms
3638         parameter.
3639         (write_var_or_type, write_name_assoc): Update.
3640
3641 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3642
3643         * windows-nat.c (windows_nat_target::xfer_partial): Return
3644         TARGET_XFER_E_IO if we need to delegate to the target beneath
3645         but BENEATH is NULL.
3646
3647 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3648
3649         * Makefile.in (config.status): Add configure.nat as a
3650         dependency.
3651
3652 2018-06-04  Tom Tromey  <tom@tromey.com>
3653
3654         * cp-name-parser.y (cpname_state): Add method declarations.
3655         (HANDLE_QUAL): Update.
3656         (cpname_state::d_grab, cpname_state::fill_comp)
3657         (cpname_state::make_operator, cpname_state::make_dtor)
3658         (cpname_state::make_builtin_type, cpname_state::make_name)
3659         (cpname_state::d_qualify, cpname_state::d_int_type)
3660         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3661         (%union): Move earlier.
3662
3663 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3664
3665         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3666
3667 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3668
3669         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3670         (aarch64_pseudo_write_1): Likewise.
3671         (aarch64_pseudo_read_value): Use helper.
3672         (aarch64_pseudo_write): Likewise.
3673
3674 2018-06-04  Pedro Alves  <palves@redhat.com>
3675
3676         * darwin-nat.c (darwin_ops): Delete.
3677         (darwin_attach_pid): Use get_native_target.
3678
3679 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3680
3681         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3682         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3683
3684 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3685
3686         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3687         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3688         (aarch64_gdbarch_init): Check for SVE.
3689         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3690
3691 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3692
3693         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3694         * aarch64-tdep.h (aarch64_read_description): Likewise.
3695         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3696         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3697         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3698         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3699         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3700
3701 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3702
3703         * value.c (value_fetch_lazy_bitfield): New.
3704         (value_fetch_lazy_memory): New.
3705         (value_fetch_lazy_register): New.
3706         (value_fetch_lazy): Factor out to smaller functions.
3707
3708 2018-06-01  Tom Tromey  <tom@tromey.com>
3709
3710         * cp-name-parser.y (backslashable, represented): Now const.
3711
3712 2018-06-01  Tom Tromey  <tom@tromey.com>
3713
3714         * cp-name-parser.y: Include parser-defs.h.
3715         (parser_fprintf): Remove declaration.
3716
3717 2018-06-01  Tom Tromey  <tom@tromey.com>
3718
3719         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3720         %parse-param.
3721         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3722         (global_result): Remove globals.
3723         (struct cpname_state): New.
3724         (yyparse): Don't declare.
3725         (yylex, yyerror): Move declarations after %union.
3726         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3727         (make_name): Add state parameter.
3728         Update all callers.
3729         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3730         parameter.
3731         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3732         Update.
3733         (yylex): Add lvalp, state parameters.
3734         (yyerror): Add state parameter.
3735         (cp_demangled_name_to_comp): Update.
3736
3737 2018-06-01  Tom Tromey  <tom@tromey.com>
3738
3739         * cp-name-parser.y (parser_fprintf): Declare.
3740         (GDB_YY_REMAP_PREFIX): Define.
3741         Include yy-remap.h.  Don't redefine yy* identifiers.
3742
3743 2018-06-01  Tom Tromey  <tom@tromey.com>
3744
3745         * python/py-type.c (typy_legacy_template_argument): Update.
3746         * cp-support.h (cp_demangled_name_to_comp): Update.
3747         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3748         parameter to be a "std::string *".
3749         (main): Update.
3750
3751 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3752
3753         * ada-lex.l: Include "diagnostics.h" instead of
3754         "common/diagnostics.h".
3755         * unittests/environ-selftests.c: Likewise.
3756         * common/diagnostics.h: Moved to ../include.
3757
3758 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3759
3760         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3761         to language_mode_manual while calling breakpoint_re_set_one.
3762
3763 2018-06-01  Tom Tromey  <tom@tromey.com>
3764
3765         * valops.c (value_cast_structs, destructor_name_p): Update.
3766         * symtab.c (gdb_mangle_name): Update.
3767         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3768         Update.
3769         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3770         (pascal_object_print_value_fields, pascal_object_print_value):
3771         Update.
3772         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3773         * linespec.c (find_methods): Update.
3774         * gdbtypes.h (type_name_no_tag): Remove.
3775         (type_name_or_error): Rename from type_name_no_tag_or_error.
3776         * gdbtypes.c (type_name_no_tag): Remove.
3777         (type_name_or_error): Rename from type_name_no_tag_or_error.
3778         (lookup_struct_elt_type, check_typedef): Update.
3779         * expprint.c (print_subexp_standard): Update.
3780         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3781         * d-namespace.c (d_lookup_nested_symbol): Update.
3782         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3783         (cp_print_class_member): Update.
3784         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3785         * completer.c (add_struct_fields): Update.
3786         * c-typeprint.c (cp_type_print_derivation_info)
3787         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3788         Update.
3789         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3790         (ada_prefer_type, ada_is_exception_sym): Update.
3791
3792 2018-06-01  Tom Tromey  <tom@tromey.com>
3793
3794         * valops.c (enum_constant_from_type, value_namespace_elt)
3795         (value_maybe_namespace_elt): Update.
3796         * valarith.c (find_size_for_pointer_math): Update.
3797         * target-descriptions.c (make_gdb_type): Update.
3798         * symmisc.c (print_symbol): Update.
3799         * stabsread.c (define_symbol, read_type)
3800         (complain_about_struct_wipeout, add_undefined_type)
3801         (cleanup_undefined_types_1): Update.
3802         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3803         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3804         (rust_internal_print_type, rust_composite_type)
3805         (rust_evaluate_funcall, rust_evaluate_subexp)
3806         (rust_inclusive_range_type_p): Update.
3807         * python/py-type.c (typy_get_tag): Update.
3808         * p-typeprint.c (pascal_type_print_base): Update.
3809         * mdebugread.c (parse_symbol, parse_type): Update.
3810         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3811         Update.
3812         * guile/scm-type.c (gdbscm_type_tag): Update.
3813         * go-lang.c (sixg_string_p): Update.
3814         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3815         Update.
3816         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3817         (TYPE_TAG_NAME): Remove.
3818         * gdbtypes.c (type_name_no_tag): Simplify.
3819         (check_typedef, check_types_equal, recursive_dump_type)
3820         (copy_type_recursive, arch_composite_type): Update.
3821         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3822         in summary mode when needed.
3823         * eval.c (evaluate_funcall): Update.
3824         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3825         (process_structure_scope, read_enumeration_type)
3826         (read_namespace_type, read_module_type, determine_prefix): Update.
3827         * cp-support.c (inspect_type): Update.
3828         * coffread.c (process_coff_symbol, decode_base_type): Update.
3829         * c-varobj.c (c_is_path_expr_parent): Update.
3830         * c-typeprint.c (c_type_print_base_struct_union): Update.
3831         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3832         summary when using C language.
3833         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3834         (gen_maybe_namespace_elt): Update.
3835         * ada-lang.c (ada_type_name): Simplify.
3836         (empty_record, ada_template_to_fixed_record_type_1)
3837         (template_to_static_fixed_type)
3838         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3839
3840 2018-06-01  Tom Tromey  <tom@tromey.com>
3841
3842         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3843         c_print_type.
3844         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3845         (c_print_type): Update.
3846         (c_print_type): New overload.
3847         (c_type_print_varspec_prefix, c_type_print_args)
3848         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3849         (c_type_print_base_struct_union, c_type_print_base_1)
3850         (cp_type_print_method_args): Add "language" parameter.
3851         (c_type_print_base): Update.
3852         * c-lang.h (c_print_type): Add new overload.
3853
3854 2018-06-01  Tom Tromey  <tom@tromey.com>
3855
3856         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3857         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3858
3859 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3860
3861         * aarch64-tdep.c (aarch64_sve_register_names): New const
3862         var.
3863         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3864         (AARCH64_SVE_Z_REGS_NUM): New define.
3865         (AARCH64_SVE_P_REGS_NUM): Likewise.
3866         (AARCH64_SVE_NUM_REGS): Likewise.
3867
3868 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3869
3870         * nat/linux-ptrace.h [__alpha__]
3871         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3872         definitions.
3873
3874 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3875
3876         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3877         the endianness selected.
3878         * NEWS: Document `set endian auto' mode operation update.
3879
3880 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3881
3882         * Makefile.in: Add new header.
3883         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3884         (sve_vl_from_vg): Likewise.
3885         (sve_vq_from_vl): Likewise.
3886         (sve_vl_from_vq): Likewise.
3887         (sve_vq_from_vg): Likewise.
3888         (sve_vg_from_vq): Likewise.
3889         * configure.nat: Add new c file.
3890         * nat/aarch64-sve-linux-ptrace.c: New file.
3891         * nat/aarch64-sve-linux-ptrace.h: New file.
3892
3893 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3894
3895         * aarch64-linux-nat.c (aarch64_linux_read_description):
3896         Add parmeter zero.
3897         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3898         Likewise.
3899         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3900         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3901         (aarch64_gdbarch_init): Add parmeter zero.
3902         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3903         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3904         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3905         parmeter.
3906         * doc/gdb.texinfo: Describe SVE feature
3907         * features/aarch64-sve.c: New file.
3908
3909 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3910
3911         PR gdb/23210
3912         * gdbarch.sh (significant_addr_bit): Default to zero when
3913         not set by target architecture.
3914         * gdbarch.c: Re-generated.
3915         * utils.c (address_significant): Update.
3916
3917 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3918
3919         * stack.c (func_command): Remove trailing newline in call to error.
3920
3921 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3922
3923         * regcache.h (regcache_raw_collect): Remove, update callers to
3924         use regcache::raw_collect.
3925         * regcache.c (regcache_raw_collect): Remove.
3926
3927 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3928
3929         * regcache.h (regcache_raw_supply): Remove, update callers to
3930         use detached_regcache::raw_supply.
3931         * regcache.c (regcache_raw_supply): Remove.
3932
3933 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3934
3935         * regcache.h (regcache_cooked_write_part): Remove, update
3936         callers to use regcache::cooked_write_part.
3937         * regcache.c (regcache_cooked_write_part): Remove.
3938
3939 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3940
3941         * regcache.h (regcache_cooked_read_part): Remove, update callers
3942         to use readable_regcache::cooked_read_part.
3943         * regcache.c (regcache_cooked_read_part): Remove.
3944
3945 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3946
3947         * regcache.h (regcache_cooked_read_value): Remove, update
3948         callers to use readable_regcache::cooked_read_value.
3949         * regcache.c (regcache_cooked_read_value): Remove.
3950
3951 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3952
3953         * regcache.h (regcache_cooked_write): Remove, update callers to
3954         use regcache::cooked_write.
3955         * regcache.c (regcache_cooked_write): Remove.
3956
3957 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3958
3959         * regcache.h (regcache_invalidate): Remove, update callers to
3960         use detached_regcache::invalidate instead.
3961         * regcache.c (regcache_invalidate): Remove.
3962
3963 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3964
3965         * regcache.h (regcache_raw_write_part): Remove, update callers
3966         to use regcache::raw_write_part instead.
3967         * regcache.c (regcache_raw_write_part): Remove.
3968
3969 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3970
3971         * regcache.h (regcache_raw_read_part): Remove, update callers to
3972         use readable_regcache::raw_read_part instead.
3973         * regcache.c (regcache_raw_read_part): Remove.
3974
3975 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3976
3977         * regcache.h (regcache_cooked_read): Remove, update callers to
3978         use readable_regcache::cooked_read instead.
3979         * regcache.c (regcache_cooked_read): Remove.
3980
3981 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3982
3983         * regcache.h (regcache_raw_write): Remove, update callers to use
3984         regcache::raw_write instead.
3985         * regcache.c (regcache_raw_write): Remove.
3986
3987 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3988
3989         * regcache.h (regcache_raw_read): Remove, update callers to use
3990         readable_regcache::raw_read instead.
3991         * regcache.c (regcache_raw_read): Remove.
3992
3993 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3994
3995         * regcache.h (regcache_raw_update): Remove, update callers to
3996         use readable_regcache::raw_update instead.
3997         * regcache.c (regcache_raw_update): Remove.
3998
3999 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4000
4001         * regcache.h (regcache_register_status): Remove, update callers
4002         to use reg_buffer::get_register_status directly instead.
4003         * regcache.c (regcache_register_status): Remove.
4004
4005 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4006
4007         * regcache.h (regcache_get_ptid): Remove, update all callers to
4008         call regcache::ptid instead.
4009         * regcache.c (regcache_get_ptid): Remove.
4010
4011 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4012
4013         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4014
4015 2018-05-30  Pedro Alves  <palves@redhat.com>
4016
4017         * common/common-exceptions.h (exception_rethrow): Use
4018         ATTRIBUTE_NORETURN.
4019
4020 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4021
4022         * breakpoint.c (print_solib_event, check_status_catch_solib):
4023         Remove struct keyword in range-based for loops.
4024         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4025         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4026         Likewise.
4027         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4028         Likewise.
4029         * symfile.c (addr_info_make_relative): Likewise.
4030         * thread.c (value_in_thread_stack_temporaries): Likewise.
4031
4032 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4033
4034         PR gdb/16841
4035         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4036         aggregate type to get its real type before accessing it.
4037
4038 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4039
4040         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4041         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4042         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4043         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4044         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4045         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4046         * printcmd.c (info_address_command): Likewise.
4047
4048 2018-05-29  Tom Tromey  <tom@tromey.com>
4049
4050         * windows-nat.c (handle_exception): Update fall-through comment.
4051
4052 2018-05-29  Tom Tromey  <tom@tromey.com>
4053
4054         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4055         (struct program_space) <added_solibs>: Now a std::vector.
4056         * breakpoint.c (print_solib_event): Update.
4057         (check_status_catch_solib): Update.
4058         * progspace.c (clear_program_space_solib_cache): Update.
4059         * solib.c (update_solib_list): Update.
4060
4061 2018-05-29  Tom Tromey  <tom@tromey.com>
4062
4063         * python/py-type.c (typy_richcompare): Update.
4064         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4065         * gdbtypes.h (types_deeply_equal): Return bool.
4066         (types_equal): Likewise.
4067         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4068         declare VEC.
4069         (check_types_equal): Change worklist to std::vector.  Return
4070         bool.
4071         (struct type_equality_entry): Add constructor.
4072         (compare_maybe_null_strings): Return bool.
4073         (check_types_worklist): Return bool.  Change worklist to
4074         std::vector.
4075         (types_deeply_equal): Use std::vector.
4076         (types_equal): Return bool.
4077         (compare_maybe_null_strings): Simplify.
4078
4079 2018-05-29  Tom Tromey  <tom@tromey.com>
4080
4081         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4082
4083 2018-05-29  Tom Tromey  <tom@tromey.com>
4084
4085         * objc-lang.h: Don't include cp-support.h.
4086         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4087         declare VEC.
4088
4089 2018-05-27  Tom Tromey  <tom@tromey.com>
4090
4091         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4092
4093 2018-05-25  Tom Tromey  <tom@tromey.com>
4094
4095         * value.c (value::location): Initialize.
4096
4097 2018-05-25  Tom Tromey  <tom@tromey.com>
4098
4099         * dbxread.c (init_bincl_list): Remove.
4100         (bincl_list): Now a std::vector.
4101         (bincls_allocated, next_bincl): Remove.
4102         (free_bincl_list, do_free_bincl_list_cleanup)
4103         (make_cleanup_free_bincl_list): Remove.
4104         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4105         unique_xmalloc_ptr.
4106         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4107         (struct header_file_location): Add constructor.
4108         (add_bincl_to_list): Remove.
4109
4110 2018-05-25  Tom Tromey  <tom@tromey.com>
4111
4112         * tui/tui.c (tui_enable): Update.
4113         * mi/mi-interp.c (mi_interp::init): Update.
4114         * interps.h (class interp) <name>: New method.
4115         <m_name>: Rename from name.
4116         (~scoped_restore_interp): Update.
4117         * interps.c (interp::interp): Update.
4118         (interp_add, interp_set, interp_lookup_existing)
4119         (current_interp_named_p): Update.
4120
4121 2018-05-25  Tom Tromey  <tom@tromey.com>
4122
4123         * interps.c (interp_name): Remove.
4124         * mi/mi-interp.c (mi_interp::init): Update.
4125         * interps.h (interp_name): Remove.
4126         (~scoped_restore_interp): Update.
4127         * tui/tui.c (tui_enable): Update.
4128
4129 2018-05-25  Tom Tromey  <tom@tromey.com>
4130
4131         * utils.c (fputs_maybe_filtered): Update.
4132         * linespec.c (decode_line_full): Update.
4133         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4134         (mi_print_breakpoint_for_event, mi_solib_loaded)
4135         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4136         (mi_user_selected_context_changed): Update.
4137         * mi/mi-main.c (mi_execute_command): Update.
4138         * cli/cli-script.c (execute_control_command): Update.
4139         * python/python.c (execute_gdb_command): Update.
4140         * solib.c (info_sharedlibrary_command): Update.
4141         * interps.c (interp_ui_out): Remove.
4142         * interps.h (interp_ui_out): Remove.
4143
4144 2018-05-25  Tom Tromey  <tom@tromey.com>
4145
4146         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4147         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4148         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4149
4150 2018-05-25  Tom Tromey  <tom@tromey.com>
4151
4152         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4153         * interps.c (interp_exec): Use scoped_restore.
4154
4155 2018-05-25  Tom Tromey  <tom@tromey.com>
4156
4157         * remote.c (remote_target::remote_file_get): Use
4158         gdb::byte_vector.
4159         (remote_target::remote_file_put): Likewise.
4160
4161 2018-05-25  Tom Tromey  <tom@tromey.com>
4162
4163         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4164         a std::string.
4165         (get_pe_section_index, add_pe_exported_sym): Update.
4166         (read_pe_exported_syms): Use gdb::def_vector.
4167
4168 2018-05-25  Tom Tromey  <tom@tromey.com>
4169
4170         * frame.c (remove_prev_frame): Remove.
4171         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4172
4173 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
4174
4175         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4176         Remove prototypes.
4177         * mips-linux-nat.c (supply_fpregset): Always call
4178         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4179         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4180         `mips_fill_fpregset'.
4181         * mips-linux-tdep.c (mips_supply_fpregset)
4182         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4183         (mips_fill_fpregset_wrapper): Remove functions.
4184         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4185         (mips_linux_fpregset): Remove variable.
4186         (mips_linux_iterate_over_regset_sections): Use
4187         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4188         (mips_linux_o32_sigframe_init): Remove comment.
4189
4190 2018-05-25  Pedro Alves  <palves@redhat.com>
4191
4192         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4193         (struct readahead_cache, struct packet_reg, struct
4194         remote_arch_state, class remote_state): Move higher up in the
4195         file.
4196         (remote_target::m_remote_state): Now an object instead of a pointer.
4197         (remote_target::get_remote_state): Adjust.
4198
4199 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4200
4201         * stack.c (select_and_print_frame): Delete.
4202         (struct function_bounds): Move struct within function.
4203         (func_command): Most content moved into new function
4204         find_frame_for_function, use new function, print result, add
4205         function comment.
4206         (find_frame_for_function): New function, now returns a result.
4207
4208 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4209
4210         * stack.c (iterate_over_block_arg_vars): Fix comment.
4211         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4212
4213 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4214
4215         PR gdb/23203
4216         * frame.c
4217         (scoped_restore_selected_frame::scoped_restore_selected_frame):
4218         Define.
4219         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4220         Define.
4221         * frame.h (class scoped_restore_selected_frame): New class.
4222         * stack.c (print_frame_local_vars): Remove catching and rethrowing
4223         of any exception, use scoped_restore_selected_frame to restore the
4224         frame instead.
4225
4226 2018-05-24  Pedro Alves  <palves@redhat.com>
4227
4228         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4229         override.
4230
4231 2018-05-23  Tom Tromey  <tom@tromey.com>
4232
4233         * complaints.c (struct complaints): Remove.
4234         (symfile_complaint_book): Remove.
4235         (series): New global.
4236         (complaint_internal): Update.
4237         (clear_complaints): Update.
4238
4239 2018-05-23  Tom Tromey  <tom@tromey.com>
4240
4241         * complaints.c (counters): New global.
4242         (struct complain): Remove.
4243         (struct complaints) <root>: Remove.
4244         (complaint_sentinel): Remove.
4245         (symfile_complaint_book): Update.
4246         (find_complaint) Remove.
4247         (complaint_internal, clear_complaints): Update.
4248
4249 2018-05-23  Tom Tromey  <tom@tromey.com>
4250
4251         * complaints.c (struct complain) <file, line>: Remove.
4252         (find_complaint): Remove file, line parameters.
4253         (complaint_internal): Update.
4254
4255 2018-05-23  Tom Tromey  <tom@tromey.com>
4256
4257         * complaints.c (vcomplaint): Remove.
4258         (complaint_internal) Merge in contents of vcomplaint.
4259
4260 2018-05-23  Tom Tromey  <tom@tromey.com>
4261
4262         * complaints.c (struct complaints) <explanation>: Remove.
4263         (symfile_explanations): Remove.
4264         (symfile_complaint_book): Update.
4265         (vcomplaint): Update.
4266         (struct explanation): Remove.
4267
4268 2018-05-23  Tom Tromey  <tom@tromey.com>
4269
4270         * complaints.c (symfile_complaints): Remove.
4271         (complaint_internal): Remove "complaints" parameter.
4272         (clear_complaints, vcomplaint): Remove "c" parameter.
4273         (get_complaints): Remove.
4274         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4275         (dwarf2_debug_line_missing_file_complaint)
4276         (dwarf2_debug_line_missing_end_sequence_complaint)
4277         (dwarf2_complex_location_expr_complaint)
4278         (dwarf2_const_value_length_mismatch_complaint)
4279         (dwarf2_section_buffer_overflow_complaint)
4280         (dwarf2_macro_malformed_definition_complaint)
4281         (dwarf2_invalid_attrib_class_complaint)
4282         (create_addrmap_from_index, dw2_symtab_iter_next)
4283         (dw2_expand_marked_cus)
4284         (dw2_debug_names_iterator::find_vec_in_debug_names)
4285         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4286         (create_debug_type_hash_table, init_cutu_and_read_dies)
4287         (partial_die_parent_scope, add_partial_enumeration)
4288         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4289         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4290         (read_import_statement, read_file_scope, create_dwo_cu_reader)
4291         (create_cus_hash_table, create_dwp_hash_table)
4292         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4293         (dwarf2_rnglists_process, dwarf2_ranges_process)
4294         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4295         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4296         (handle_struct_member_die, process_structure_scope)
4297         (read_array_type, read_common_block, read_module_type)
4298         (read_tag_pointer_type, read_typedef, read_base_type)
4299         (read_subrange_type, load_partial_dies, partial_die_info::read)
4300         (partial_die_info::read, partial_die_info::read)
4301         (partial_die_info::read, read_checked_initial_length_and_offset)
4302         (dwarf2_string_attr, read_formatted_entries)
4303         (dwarf_decode_line_header)
4304         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4305         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4306         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4307         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4308         (get_signatured_type, get_DW_AT_signature_type)
4309         (decode_locdesc, file_file_name, consume_improper_spaces)
4310         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4311         (dwarf_decode_macro_bytes, dwarf_decode_macros)
4312         (dwarf2_symbol_mark_computed, set_die_type)
4313         (read_attribute_value): Update.
4314         * stap-probe.c (handle_stap_probe, get_stap_base_address):
4315         Update.
4316         * dbxread.c (unknown_symtype_complaint)
4317         (lbrac_mismatch_complaint, repeated_header_complaint)
4318         (set_namestring, function_outside_compilation_unit_complaint)
4319         (read_dbx_symtab, process_one_symbol): Update.
4320         * gdbtypes.c (stub_noname_complaint): Update.
4321         * windows-nat.c (handle_unload_dll): Update.
4322         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4323         (decode_base_type): Update.
4324         * xcoffread.c (bf_notfound_complaint, ef_complaint)
4325         (eb_complaint, record_include_begin, record_include_end)
4326         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4327         (process_xcoff_symbol, read_symbol)
4328         (function_outside_compilation_unit_complaint)
4329         (scan_xcoff_symtab): Update.
4330         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4331         * buildsym.c (finish_block_internal, make_blockvector)
4332         (end_symtab_get_static_block, augment_type_symtab): Update.
4333         * dtrace-probe.c (dtrace_process_dof)
4334         (dtrace_static_probe_ops::get_probes): Update.
4335         * complaints.h (struct complaint): Don't declare.
4336         (symfile_complaints): Remove.
4337         (complaint_internal): Remove "complaints" parameter.
4338         (complaint): Likewise.
4339         (clear_complaints): Likewise.
4340         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4341         (reread_symbols): Update.
4342         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4343         (dwarf2_frame_cache, decode_frame_entry): Update.
4344         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4345         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4346         (info_selectors_command): Update.
4347         * macrotab.c (macro_include, check_for_redefinition)
4348         (macro_undef): Update.
4349         * objfiles.c (filter_overlapping_sections): Update.
4350         * stabsread.c (invalid_cpp_abbrev_complaint)
4351         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4352         (define_symbol, error_type, read_type, rs6000_builtin_type)
4353         (stabs_method_name_from_physname, read_member_functions)
4354         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4355         (attach_fields_to_type, complain_about_struct_wipeout)
4356         (read_range_type, read_args, common_block_start)
4357         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4358         Update.
4359         * mdebugread.c (index_complaint, unknown_ext_complaint)
4360         (basic_type_complaint, bad_tag_guess_complaint)
4361         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4362         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4363         (parse_procedure, parse_lines)
4364         (function_outside_compilation_unit_complaint)
4365         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4366         (bad_tag_guess_complaint, reg_value_complaint): Update.
4367         * cp-support.c (demangled_name_complaint): Update.
4368         * macroscope.c (sal_macro_scope): Update.
4369         * dwarf-index-write.c (class debug_names): Update.
4370
4371 2018-05-23  Tom Tromey  <tom@tromey.com>
4372
4373         * complaints.c (clear_complaints): Remove "noisy" parameter.
4374         * complaints.h (clear_complaints): Update.
4375         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4376         (reread_symbols): Update.
4377
4378 2018-05-23  Tom Tromey  <tom@tromey.com>
4379
4380         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4381         SUBSEQUENT_MESSAGE.
4382         (vcomplaint, clear_complaints): Update.
4383         (symfile_explanations): Remove some messages.
4384
4385 2018-05-23  Tom Tromey  <tom@tromey.com>
4386
4387         * complaints.c (internal_complaint): Remove.
4388         * complaints.h (internal_complaint): Remove.
4389
4390 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4391
4392         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4393
4394 2018-05-22  Pedro Alves  <palves@redhat.com>
4395
4396         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4397         (remote_fileio_badfd, remote_fileio_return_errno)
4398         (remote_fileio_return_success, remote_fileio_func_open)
4399         (remote_fileio_func_open, remote_fileio_func_close)
4400         (remote_fileio_func_read, remote_fileio_func_write)
4401         (remote_fileio_func_lseek, remote_fileio_func_rename)
4402         (remote_fileio_func_unlink, remote_fileio_func_stat)
4403         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4404         (remote_fileio_func_isatty, remote_fileio_func_system): Add
4405         remote_target parameter.
4406         (remote_fio_func_map) <func>: Add remote_target parameter.
4407         (do_remote_fileio_request, remote_fileio_request):
4408         * remote-fileio.h (remote_fileio_request):
4409         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4410         remote_target parameter.
4411         (remote_notif_process, handle_notification): Adjust to pass down
4412         the remote.
4413         (remote_notif_state_allocate): Add remote_target parameter.  Save
4414         it.
4415         * remote-notif.h (struct remote_target): Forward declare.
4416         (struct notif_client) <parse, ack, can_get_pending_events>: Add
4417         remote_target parameter.
4418         (struct remote_notif_state) <remote>: New field.
4419         (remote_notif_ack, remote_notif_parse): Add remote_target
4420         parameter.
4421         (remote_notif_state_allocate, remote_notif_state_allocate): Add
4422         remote_target parameter.
4423         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4424         (threads_listing_context, rmt_thread_action, protocol_feature)
4425         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4426         (packet_result, struct threads_listing_context, remote_state):
4427         Move definitions and declarations higher up.
4428         (remote_target) <~remote_target>: Declare.
4429         (remote_download_command_source, remote_file_put, remote_file_get)
4430         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4431         (remote_hostio_pread_vFile, remote_hostio_send_command)
4432         (remote_hostio_set_filesystem, remote_hostio_open)
4433         (remote_hostio_close, remote_hostio_unlink, remote_state)
4434         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4435         (get_memory_write_packet_size, get_memory_read_packet_size)
4436         (append_pending_thread_resumptions, remote_detach_1)
4437         (append_resumption, remote_resume_with_vcont)
4438         (add_current_inferior_and_thread, wait_ns, wait_as)
4439         (process_stop_reply, remote_notice_new_inferior)
4440         (process_initial_stop_replies, remote_add_thread)
4441         (btrace_sync_conf, remote_btrace_maybe_reopen)
4442         (remove_new_fork_children, kill_new_fork_children)
4443         (discard_pending_stop_replies, stop_reply_queue_length)
4444         (check_pending_events_prevent_wildcard_vcont)
4445         (discard_pending_stop_replies_in_queue, stop_reply)
4446         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4447         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4448         (remote_interrupt_as, remote_interrupt_ns)
4449         (remote_get_noisy_reply, remote_query_attached)
4450         (remote_add_inferior, remote_current_thread, get_current_thread)
4451         (set_thread, set_general_thread, set_continue_thread)
4452         (set_general_process, write_ptid)
4453         (remote_unpack_thread_info_response, remote_get_threadinfo)
4454         (parse_threadlist_response, remote_get_threadlist)
4455         (remote_threadlist_iterator, remote_get_threads_with_ql)
4456         (remote_get_threads_with_qxfer)
4457         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4458         (get_offsets, remote_check_symbols, remote_supported_packet)
4459         (remote_query_supported, remote_packet_size)
4460         (remote_serial_quit_handler, remote_detach_pid)
4461         (remote_vcont_probe, remote_resume_with_hc)
4462         (send_interrupt_sequence, interrupt_query)
4463         (remote_notif_get_pending_events, fetch_register_using_p)
4464         (send_g_packet, process_g_packet, fetch_registers_using_g)
4465         (store_register_using_P, store_registers_using_G)
4466         (set_remote_traceframe, check_binary_download)
4467         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4468         (remote_xfer_live_readonly_partial, remote_read_bytes)
4469         (remote_send_printf, remote_flash_write, readchar)
4470         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4471         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4472         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4473         (extended_remote_disable_randomization, extended_remote_run)
4474         (send_environment_packet, extended_remote_environment_support)
4475         (extended_remote_set_inferior_cwd, remote_write_qxfer)
4476         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4477         (packet_command): Now methods of ...
4478         (remote_target): ... this class.
4479         (m_remote_state) <remote_target>: New field.
4480         (struct remote_state) <stop_reply_queue,
4481         remote_async_inferior_event_token, wait_forever_enabled_p>: New
4482         fields.
4483         (remote_state::remote_state): Allocate stop_reply_queue.
4484         (remote_state): Delete global.
4485         (get_remote_state_raw): Delete.
4486         (remote_target::get_remote_state): Allocate m_remote_state on
4487         demand.
4488         (get_current_remote_target): New.
4489         (remote_ops, extended_remote_ops): Delete.
4490         (wait_forever_enabled_p, remote_async_inferior_event_token):
4491         Delete, moved to struct remote_state.
4492         (remote_target::close): Delete self.  Destruction bits split to
4493         ...
4494         (remote_target::~remote_target): ... this.
4495         (show_memory_packet_size): Adjust to use
4496         get_current_remote_target.
4497         (struct protocol_feature) <func>: Add remote_target parameter.
4498         All callers adjusted.
4499         (curr_quit_handler_target): New.
4500         (remote_serial_quit_handler): Reimplement.
4501         (remote_target::open_1): Adjust to use get_current_remote_target.
4502         Heap-allocate remote_target/extended_remote_target instances.
4503         (vcont_builder::vcont_builder): Add remote_target parameter, and
4504         save it in m_remote.  All callers adjusted.
4505         (vcont_builder::m_remote): New field.
4506         (vcont_builder::restart, vcont_builder::flush)
4507         (vcont_builder::push_action): Use it.
4508         (remote_target::commit_resume): Use it.
4509         (struct queue_iter_param) <remote>: New field.
4510         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4511         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4512         (check_pending_event_prevents_wildcard_vcont_callback)
4513         (remote_target::check_pending_events_prevent_wildcard_vcont)
4514         (remote_target::discard_pending_stop_replies)
4515         (remote_target::discard_pending_stop_replies_in_queue)
4516         (remote_target::remote_notif_remove_queued_reply): Fill in
4517         'remote' field.
4518         (remote_notif_get_pending_events): New.
4519         (remote_target::readchar, remote_target::remote_serial_write):
4520         Save/restore curr_quit_handler_target.
4521         (putpkt): New.
4522         (kill_new_fork_children): Fill in 'remote' field.
4523         (packet_command): Use get_current_remote_target, defer to
4524         remote_target method of same name.
4525         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4526         parameter, and save it in m_remote.  All callers adjusted.
4527         (scoped_remote_fd::release): Use m_remote.
4528         (scoped_remote_fd::m_remote): New field.
4529         (remote_file_put, remote_file_get, remote_file_delete): Use
4530         get_current_remote_target, defer to remote_target method of same
4531         name.
4532         (remote_btrace_reset): Add remote_state paremeter.  Update all
4533         callers.
4534         (remote_async_inferior_event_handler). Pass down 'data'.
4535         (remote_new_objfile): Use get_current_remote_target.
4536         (remote_target::vcont_r_supported): New.
4537         (set_range_stepping): Use get_current_remote_target and
4538         remote_target::vcont_r_supported.
4539         (_initialize_remote): Don't allocate 'remote_state' and
4540         'stop_reply_queue' globals.
4541         * remote.h (struct remote_target): Forward declare.
4542         (getpkt, putpkt, remote_notif_get_pending_events): Add
4543         'remote_target' parameter.
4544
4545 2018-05-22  Pedro Alves  <palves@redhat.com>
4546
4547         * remote.c (vcont_builder): Now a class.  Make all data members
4548         private.
4549         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4550         Declare methods.
4551         (vcont_builder_restart): Rename to ...
4552         (vcont_builder::restart): ... this.
4553         (vcont_builder_flush): Rename to ...
4554         (vcont_builder::flush): ... this.
4555         (vcont_builder_push_action): Rename to ...
4556         (vcont_builder::push_action): ... this.
4557         (remote_target::commit_resume): Adjust.
4558
4559 2018-05-22  Pedro Alves  <palves@redhat.com>
4560
4561         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4562         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4563         (get_fixed_memory_packet_size): New.
4564         (get_memory_packet_size): Use it.
4565         (set_memory_packet_size): Don't override the config size with
4566         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4567         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4568         Don't refer to get_memory_packet_size if not connected to a remote
4569         target.  Show "(default)" if configured size is 0.
4570
4571 2018-05-22  Pedro Alves  <palves@redhat.com>
4572
4573         * remote.c (remote_target::mourn_inferior): Move
4574         discard_pending_stop_replies call here from ...
4575         (_initialize_remote): ... here.
4576
4577 2018-05-22  Pedro Alves  <palves@redhat.com>
4578
4579         * remote.c (compare_section_command): Remove set_general_process
4580         call.
4581
4582 2018-05-22  Pedro Alves  <palves@redhat.com>
4583
4584         * remote.c (struct packet_reg, struct remote_arch_state):
4585         Move higher up in the file.
4586         (remote_state) <m_arch_states>: Store remote_arch_state values
4587         instead of remote_arch_state pointers.
4588         (remote_state::get_remote_arch_state): Adjust.
4589
4590 2018-05-22  Pedro Alves  <palves@redhat.com>
4591
4592         * remote.c: Include <unordered_map>.
4593         (remote_state): Now a class.
4594         (remote_state) <get_remote_arch_state>: Declare method.
4595         <get_remote_arch_state>: New field.
4596         (remote_arch_state) <remote_arch_state>: Declare ctor.
4597         <regs>: Now a unique_ptr.
4598         (remote_gdbarch_data_handle): Delete.
4599         (get_remote_arch_state): Delete.
4600         (remote_state::get_remote_arch_state): New.
4601         (get_remote_state): Adjust to call remote_state's
4602         get_remote_arch_state method.
4603         (init_remote_state): Delete, bits factored out to ...
4604         (remote_arch_state::remote_arch_state): ... this new method.
4605         (get_remote_packet_size, get_memory_packet_size)
4606         (process_g_packet, remote_target::fetch_registers)
4607         (remote_target::prepare_to_store, store_registers_using_G)
4608         (remote_target::store_registers, remote_target::get_trace_status):
4609         Adjust to call remote_state's method.
4610         (_initialize_remote): Remove reference to
4611         remote_gdbarch_data_handle.
4612
4613 2018-05-22  Pedro Alves  <palves@redhat.com>
4614
4615         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4616         pread>: New method declarations.
4617         (remote_target::open_1): Adjust.
4618         (readahead_cache_invalidate): Rename to ...
4619         (readahead_cache::invalidate): ... this, and adjust to be a class
4620         method.
4621         (readahead_cache_invalidate_fd): Rename to ...
4622         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4623         class method.
4624         (remote_hostio_pwrite): Adjust.
4625         (remote_hostio_pread_from_cache): Rename to ...
4626         (readahead_cache::pread): ... this, and adjust to be a class
4627         method.
4628         (remote_hostio_close): Adjust.
4629
4630 2018-05-22  Pedro Alves  <palves@redhat.com>
4631
4632         * remote.c (remote_hostio_close_cleanup): Delete.
4633         (class scoped_remote_fd): New.
4634         (remote_file_put, remote_file_get): Use it.
4635
4636 2018-05-22  Pedro Alves  <palves@redhat.com>
4637
4638         (struct vCont_action_support): Use bool and initialize all fields.
4639         (struct readahead_cache): Initialize all fields.
4640         (remote_state): Use bool and initialize all fields.
4641         (remote_state::remote_state, remote_state::~remote_state): New.
4642         (new_remote_state): Delete.
4643         (_initialize_remote): Use new to allocate remote_state.
4644
4645 2018-05-22  Pedro Alves  <palves@redhat.com>
4646             張俊芝  <zjz@zjz.name>
4647
4648         PR gdb/22973
4649         * c-exp.y: Include "c-support.h".
4650         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4651         of tolower.  Use c_ident_is_alpha to scan names.
4652         * c-lang.c: Include "c-support.h".
4653         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4654         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4655         * c-support.h: New file, with bits factored out from ...
4656         * cp-name-parser.y: ... this file.
4657         Include "c-support.h".
4658         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4659         c-support.h and renamed.
4660         (symbol_end, yylex): Adjust.
4661
4662 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4663
4664         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4665         parameter type to CORE_ADDR.
4666         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4667         parameter type in declaration to CORE_ADDR.
4668         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4669         target_auxv_search to get AT_HWCAP and use the result to get the
4670         target description.
4671         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4672         to CORE_ADDR. Remove the cast of the return value to unsigned
4673         long. Fix error predicate of target_auxv_search.
4674         (ppc_linux_nat_target::read_description): Change the type of the
4675         hwcap variable to CORE_ADDR.
4676
4677 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4678
4679         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4680         if the size of fpscr is larger than 32 bits.
4681
4682 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4683
4684         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4685         (ppc32_linux_vsxregmap): New global.
4686         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4687         regcache_supply_regset, and regcache_collect_regset.
4688         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4689         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4690         (fetch_vsx_register, store_vsx_register): Remove.
4691         (fetch_vsx_registers): Add regno parameter. Get regset using
4692         ppc_linux_vsxregset. Use regset to supply registers.
4693         (store_vsx_registers): Add regno parameter. Get regset using
4694         ppc_linux_vsxregset. Use regset to collect registers.
4695         (fetch_register): Call fetch_vsx_registers instead of
4696         fetch_vsx_register.
4697         (store_register): Call store_vsx_registers instead of
4698         store_vsx_register.
4699         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4700         new regno parameter.
4701         (store_ppc_registers): Call store_vsx_registers with -1 for the
4702         new regno parameter.
4703         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4704         (ppc_collect_vsxregset): Remove.
4705
4706 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4707
4708         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4709         offset fields.
4710         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4711         for vector register offset fields.
4712         (ppc64_fbsd_reg_offsets): Likewise.
4713         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4714         to vector register offset fields.
4715         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4716         to vector register offset fields.
4717         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4718         vector register offset fields.
4719         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4720         initializers for vector register offset fields.
4721         (rs6000_aix64_reg_offsets): Likewise.
4722         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4723         (ppc_supply_vrregset): Remove.
4724         (ppc_collect_vrregset): Remove.
4725         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4726         (ppc_linux_vrregset) : New function.
4727         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4728         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4729         (ppc32_linux_vrregset): Remove.
4730         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4731         and use result instead of ppc32_linux_vrregset.
4732         (ppc32_linux_reg_offsets): Remove initializers for vector register
4733         offset fields.
4734         (ppc64_linux_reg_offsets): Likewise.
4735         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4736         * ppc-linux-nat.c: Include regset.h.
4737         (gdb_vrregset_t): Adjust comment to account for little-endian
4738         mode.
4739         (supply_vrregset, fill_vrregset): Remove.
4740         (fetch_altivec_register, store_altivec_register): Remove.
4741         (fetch_altivec_registers): Add regno parameter. Get regset using
4742         ppc_linux_vrregset. Use regset to supply registers.
4743         (store_altivec_registers): Add regno parameter. Get regset using
4744         ppc_linux_vrregset. Use regset to collect registers.
4745         (fetch_register): Call fetch_altivec_registers instead of
4746         fetch_altivec_register.
4747         (store_register): Call store_altivec_registers instead of
4748         store_altivec_register.
4749         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4750         the new regno parameter.
4751         (store_ppc_registers): Call store_altivec_registers with -1 for
4752         the new regno parameter.
4753
4754 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4755
4756         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4757         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4758         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4759         (gdb_vrregset_t): Change array type size to
4760         PPC_LINUX_SIZEOF_VRREGSET.
4761         (gdb_vsxregset_t): Change array type size to
4762         PPC_LINUX_SIZEOF_VSXREGSET.
4763         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4764         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4765         PPC_LINUX_SIZEOF_VSXREGSET.
4766
4767 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4768
4769         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4770         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4771         nat/ppc-linux.c.
4772         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4773         ppc_linux_target_wordsize with tid.
4774         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4775         wordsize with tid.
4776         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4777         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4778         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4779         tid parameter. Remove static specifier.
4780         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4781         (ppc_linux_target_wordsize): New declaration.
4782
4783 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4784
4785         * arch/ppc-linux-common.c: New file.
4786         * arch/ppc-linux-common.h: New file.
4787         * arch/ppc-linux-tdesc.h: New file.
4788         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4789         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4790         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4791         arch/ppc-linux-tdesc.h.
4792         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4793         arch/ppc-linux-tdesc.h.
4794         (ppc_linux_nat_target::read_description): Remove target
4795         description matching code. Fill a ppc_linux_features struct and
4796         call ppc_linux_match_description with it. Move comment about ISA
4797         2.05 to ppc-linux-common.c.
4798         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4799         arch/ppc-linux-tdesc.h.
4800         (ppc_linux_core_read_description): Remove target description
4801         matching code. Fill a ppc_linux_features struct and call
4802         ppc_linux_match_description with it.
4803         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4804         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4805         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4806         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4807         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4808         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4809         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4810         (tdesc_powerpc_e500l): Remove.
4811
4812 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4813
4814         * ada-lang.c (catch_assert_command): Pass empty string instead
4815         of NULL for excep_string argument.
4816
4817 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4818
4819         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4820         the width of the requested register exceeds the width of the
4821         `ptrace' data type.
4822
4823 2018-05-21  Tom Tromey  <tom@tromey.com>
4824
4825         * printcmd.c (output_command): Remove.
4826         (output_command_const): Rename to output_command.
4827         * valprint.h (output_command): Rename from output_command_const.
4828         * tracepoint.c (trace_dump_actions): Call output_command.
4829
4830 2018-05-21  Tom Tromey  <tom@tromey.com>
4831
4832         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4833         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4834         * ada-lang.h (create_ada_exception_catchpoint): Update.
4835         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4836         std::string.
4837         (create_excep_cond_exprs, ~ada_catchpoint)
4838         (should_stop_exception, print_one_exception)
4839         (print_mention_exception, print_recreate_exception): Update.
4840         (ada_get_next_arg): Remove.
4841         (catch_ada_exception_command_split): Use std::string.  Change type
4842         of "excep_string", "cond_string".
4843         (catch_ada_exception_command): Update.
4844         (create_ada_exception_catchpoint): Change type of excep_string.
4845         (ada_exception_sal): Remove excep_string parameter.
4846         (~ada_catchpoint): Remove.
4847
4848 2018-05-21  Tom Tromey  <tom@tromey.com>
4849
4850         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4851         cleanup.
4852
4853 2018-05-21  Tom Tromey  <tom@tromey.com>
4854
4855         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4856         Return unique_xmalloc_ptr.
4857         (print_it_exception): Update.
4858
4859 2018-05-21  Tom Tromey  <tom@tromey.com>
4860
4861         * tracepoint.c (trace_dump_actions): Use std::string.
4862
4863 2018-05-21  Tom Tromey  <tom@tromey.com>
4864
4865         * symfile.c (reread_symbols): Use std::string for original_name.
4866
4867 2018-05-21  Tom Tromey  <tom@tromey.com>
4868
4869         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4870         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4871         constructor.
4872
4873 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4874
4875         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4876         instance to...
4877         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4878         * objfiles.c (get_objfile_bfd_data): Allocate
4879         objfile_per_bfd_storage with obstack_new when allocating on
4880         obstack.
4881
4882 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4883
4884         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4885         OBSTACK_ZALLOC.
4886         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4887         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4888         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4889         (add_pending): Likewise.
4890         (parse_symbol): Likewise.
4891         (parse_partial_symbols): Likewise.
4892         (psymtab_to_symtab_1): Likewise.
4893         (new_psymtab): Likewise.
4894         (elfmdebug_build_psymtabs): Likewise.
4895         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4896         * objfiles.c (get_objfile_bfd_data): Likewise.
4897         (objfile_register_static_link): Likewise.
4898         * psymtab.c (allocate_psymtab): Likewise.
4899         * stabsread.c (read_member_functions): Likewise.
4900         * xcoffread.c (xcoff_end_psymtab): Likewise.
4901
4902 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4903
4904         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4905         compiler supports std::is_trivially_constructible.
4906         * common/poison.h: Include obstack.h.
4907         (IsMallocable): Define to is_trivially_constructible if the
4908         compiler supports it, define to true_type otherwise.
4909         (xobnew): New.
4910         (XOBNEW): Redefine.
4911         (xobnewvec): New.
4912         (XOBNEWVEC): Redefine.
4913         * gdb_obstack.h (obstack_zalloc): New.
4914         (OBSTACK_ZALLOC): Redefine.
4915         (obstack_calloc): New.
4916         (OBSTACK_CALLOC): Redefine.
4917         (obstack_new): New.
4918         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4919         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4920         gdbarch.c.
4921         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4922         obstack_calloc/obstack_zalloc.
4923         (gdbarch_obstack_zalloc): Remove.
4924         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4925
4926 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4927
4928         * stack.c (backtrace_command_1): Remove useless variable int i.
4929
4930 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4931
4932         * stack.c (print_frame_info): Fix comment.
4933
4934 2018-05-18  Tom Tromey  <tom@tromey.com>
4935
4936         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4937         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4938         (~dwarf2_per_objfile): Update
4939         (dwarf2_get_dwz_file): Use new.
4940         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4941         unique_ptr.
4942
4943 2018-05-18  Tom Tromey  <tom@tromey.com>
4944
4945         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4946         unique_ptr.
4947         * dwarf2read.c (struct dwp_file): Add constructor and
4948         initializers.
4949         (open_and_init_dwp_file): Return a unique_ptr.
4950         (dwarf2_per_objfile, create_dwp_hash_table)
4951         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4952         (lookup_dwo_unit_in_dwp): Update.
4953         (open_and_init_dwp_file, get_dwp_file): Update.
4954
4955 2018-05-18  Tom Tromey  <tom@tromey.com>
4956
4957         * dwarf2read.c (dwarf2_per_objfile): Update.
4958         (struct mapped_index): Add initializers.
4959         (dwarf2_read_index): Use new.
4960         (dw2_symtab_iter_init): Update.
4961         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4962         unique_ptr.
4963
4964 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4965
4966         * dwarf2read.c (mapped_index) <total_size>: Remove.
4967
4968 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4969
4970         * unittests/format_pieces-selftests.c (test_format_specifier):
4971         Add ARI comments.
4972
4973 2018-05-18  Tom Tromey  <tom@tromey.com>
4974
4975         * c-typeprint.c (maybe_print_hole): New function.
4976         (c_print_type_struct_field_offset): Update.
4977         (c_type_print_base_struct_union): Call maybe_print_hole.
4978
4979 2018-05-17  Keith Seitz  <keiths@redhat.com>
4980
4981         * breakpoint.c (build_bpstat_chain): New function, moved from
4982         bpstat_stop_status.
4983         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4984         If no stop chain is passed, call build_bpstat_chain to build it.
4985         * breakpoint.h (build_bpstat_chain): Declare.
4986         (bpstat_stop_status): Move documentation here from breakpoint.c.
4987         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4988         build the stop chain and pass it to skip_inline_frames.
4989         Pass this stop chain to bpstat_stop_status.
4990         * inline-frame.c: Include breakpoint.h.
4991         (stopped_by_user_bp_inline_frame): New function.
4992         (skip_inline_frames): Add parameter `stop_chain'.
4993         Move documention to inline-frame.h.
4994         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4995         whether the frame should be elided.
4996         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4997         Add moved documentation and update for new parameter.
4998
4999 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5000
5001         PR cli/14975
5002         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5003         unittests/format_pieces-selftests.c.
5004         * common/format.h (format_piece) <operator==>: New.
5005         (format_pieces) <operator[]>: Remove.
5006         * common/format.c (format_pieces::format_pieces): Handle \e.
5007         * unittests/format_pieces-selftests.c: New.
5008
5009 2018-05-17  Tom Tromey  <tom@tromey.com>
5010
5011         PR symtab/23010:
5012         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5013         (dw2_instantiate_symtab): Add skip_partial parameter.
5014         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5015         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5016         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5017         (dw2_expand_symtabs_matching_one)
5018         (dw2_find_pc_sect_compunit_symtab)
5019         (dw2_debug_names_lookup_symbol)
5020         (dw2_debug_names_expand_symtabs_for_function): Update.
5021         (init_cutu_and_read_dies): Add skip_partial parameter.
5022         (process_psymtab_comp_unit, build_type_psymtabs_1)
5023         (process_skeletonless_type_unit, load_partial_comp_unit)
5024         (psymtab_to_symtab_1): Update.
5025         (load_full_comp_unit): Add skip_partial parameter.
5026         (process_imported_unit_die, dwarf2_read_addr_index)
5027         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5028         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5029         (read_signatured_type): Update.
5030
5031 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5032
5033         * value.c (release_value): Remove unused variable.
5034         (record_latest_value): Likewise.
5035         (access_value_history): Likewise.
5036         (preserve_values): Likewise.
5037
5038 2018-05-17  Tom Tromey  <tom@tromey.com>
5039
5040         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5041         Initialize.
5042
5043 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5044
5045         PR gdb/22286
5046         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5047         Also handle registers whose width is not a multiple of
5048         PTRACE_TYPE_RET.
5049         (linux_nat_trad_target::store_register): Likewise.
5050
5051 2018-05-16  Tom Tromey  <tom@tromey.com>
5052
5053         * gdbcore.h (core_bfd): Redefine.
5054         * corelow.c (core_target::close): Update.
5055         (core_target_open): Update.
5056         * progspace.h (struct program_space) <cbfd>: Now a
5057         gdb_bfd_ref_ptr.
5058
5059 2018-05-16  Tom Tromey  <tom@tromey.com>
5060
5061         PR cli/19551:
5062         * symfile-add-flags.h (enum symfile_add_flags)
5063         <SYMFILE_NOT_FILENAME>: New constant.
5064         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5065         objfile name from BFD.
5066         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5067         * minidebug.c (find_separate_debug_file_in_section): Put
5068         ".gnu_debugdata" into BFD's file name.
5069
5070 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5071
5072         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5073         Remove.
5074
5075 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5076
5077         PR binutils/21446
5078         * aarch64-tdep.c (aarch64_analyze_prologue,
5079         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5080         Indicate not interested in errors.
5081
5082 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5083
5084         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5085         Supply the MIPS_ZERO_REGNUM register.
5086
5087 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5088
5089         * mips-tdep.c (mask_address_var): Make variable static.
5090
5091 2018-05-14  Tom Tromey  <tom@tromey.com>
5092
5093         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5094
5095 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5096
5097         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5098         FXSAVE_ADDR for the mxcsr register.
5099
5100 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5101
5102         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5103
5104 2018-05-11  Pedro Alves  <palves@redhat.com>
5105
5106         * corelow.c (core_target) <core_target>: No longer inline.
5107         Initialize m_core_gdbarch, m_core_vec and build the section table
5108         here.
5109         <~core_target>: New.
5110         <core_gdbarch, get_core_register_section>: New methods.
5111         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5112         factored out from ...
5113         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5114         (core_ops): Delete.
5115         (sniff_core_bfd): Add gdbarch parameter.
5116         (core_close): Delete, merged into ...
5117         (core_target::close): ... here.  Delete self.
5118         (core_close_cleanup): Delete.
5119         (core_target_open): Allocate a core_target on the heap.  Use a
5120         unique_ptr instead of a cleanup.  Bits moved into the core_target
5121         ctor.  Adjust to use core_target methods instead of globals.
5122         (get_core_register_section): Rename to ...
5123         (core_target::get_core_register_section): ... this and adjust.
5124         (struct get_core_registers_cb_data): New.
5125         (get_core_registers_cb): Use it.  Use bool.
5126         (core_target::fetch_registers, core_target::files_info)
5127         (core_target::xfer_partial, core_target::read_description)
5128         (core_target::pid_to, core_target::thread_name): Adjust to
5129         reference class fields instead of globals.
5130         * target.h (struct target_ops_deleter, target_ops_up): New.
5131
5132 2018-05-11  Pedro Alves  <palves@redhat.com>
5133
5134         * corefile.c (core_file_command): Move to corelow.c.
5135         * corelow.c (the_core_target): Delete.
5136         (core_file_command): Moved from corefile.c.  Check exec_bfd
5137         instead of the_core_target.  Use target_detach instead of calling
5138         into the_core_target directly.
5139         (maybe_say_no_core_file_now): New.
5140         (core_target::detach): Use it.
5141         (_initialize_corelow): Remove references to the_core_target.
5142         * gdbcore.h (the_core_target): Delete.
5143
5144 2018-05-11  Tom Tromey  <tromey@redhat.com>
5145             Pedro Alves  <palves@redhat.com>
5146
5147         * corefile.c (core_bfd): Remove.
5148         * gdbcore.h (core_bfd): Now a macro.
5149         * progspace.h (struct program_space) <cbfd>: New field.
5150
5151 2018-05-11  Tom Tromey  <tom@tromey.com>
5152
5153         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5154         gdb::def_vector.
5155
5156 2018-05-10  Tom Tromey  <tom@tromey.com>
5157
5158         * configure: Rebuild.
5159         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5160
5161 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5162
5163         PR server/23158:
5164         * regformats/regdat.sh: Adjust script, following the addition
5165         of the new expedite_regs parameter to init_target_desc.
5166
5167 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5168     
5169         PR gdb/23127
5170         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5171         set_gdbarch_significant_addr_bit.
5172         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5173         set_gdbarch_significant_addr_bit.
5174         * utils.c (address_significant): Update to sign extend addr.
5175
5176 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
5177
5178         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5179         (xtensa_linux_init_abi): Limit tdep->num_regs by
5180         tdep->num_nopriv_regs.
5181         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5182         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5183         not initialized.
5184
5185 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
5186
5187         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5188
5189 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5190
5191         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5192         (I387_MXCSR_INIT_VAL): New constant.
5193         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5194         buffer if it was supplied by the inferior.
5195         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5196         (i387_xsave_get_clear_bv): New function.
5197         (i387_supply_xsave): Only read x87 control registers from the
5198         xsave buffer if the feature is enabled, and the state will have
5199         been written, otherwise, provide a suitable default.
5200         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5201         including x87 control registers.  Update control registers if they
5202         have changed from the default value, and mark features as enabled
5203         as required.
5204         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5205
5206 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
5207
5208         * spu-tdep.c (info_spu_event_command): Fix output formatting.
5209
5210 2018-05-07  Tom Tromey  <tom@tromey.com>
5211
5212         * configure: Rebuild.
5213         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5214
5215 2018-05-07  Tom Tromey  <tom@tromey.com>
5216
5217         PR tdep/20362:
5218         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5219         bit.  Use correct value for VDIV.
5220
5221 2018-05-04  Tom Tromey  <tom@tromey.com>
5222
5223         * configure: Rebuild.
5224         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5225
5226 2018-05-04  Tom Tromey  <tom@tromey.com>
5227
5228         * linux-record.c (record_linux_system_call) <case
5229         RECORD_SYS_RECVFROM>: Add "break".
5230
5231 2018-05-04  Tom Tromey  <tom@tromey.com>
5232
5233         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5234         Add missing "break".
5235         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5236         Add missing "break".
5237
5238 2018-05-04  Tom Tromey  <tom@tromey.com>
5239
5240         * rs6000-tdep.c (ppc_process_record_op4)
5241         (ppc_process_record_op63): Add fall-through comment.
5242
5243 2018-05-04  Tom Tromey  <tom@tromey.com>
5244
5245         * i386-tdep.c (i386_process_record): Add fall-through comment.
5246
5247 2018-05-04  Tom Tromey  <tom@tromey.com>
5248
5249         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5250         comment.
5251
5252 2018-05-04  Tom Tromey  <tom@tromey.com>
5253
5254         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5255         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5256         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5257         comment.
5258         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5259         comment.
5260         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5261         comment.
5262
5263 2018-05-04  Tom Tromey  <tom@tromey.com>
5264
5265         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5266
5267 2018-05-04  Tom Tromey  <tom@tromey.com>
5268
5269         * s390-tdep.c (s390_process_record): Fix fall-through comments.
5270         * xcoffread.c (scan_xcoff_symtab): Move comment later.
5271         * symfile.c (section_is_mapped): Fix fall-through comment.
5272         * stabsread.c (define_symbol, read_member_functions): Fix
5273         fall-through comment.
5274         * s390-linux-tdep.c (s390_process_record): Fix fall-through
5275         comment.
5276         * remote.c (remote_wait_as): Fix fall-through comment.
5277         * p-exp.y (yylex): Fix fall-through comment.
5278         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5279         comment.
5280         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5281         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5282         * jv-exp.y (yylex): Fix fall-through comment.
5283         * go-exp.y (lex_one_token): Fix fall-through comment.
5284         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5285         fall-through comment.
5286         * f-exp.y (yylex): Fix fall-through comment.
5287         * dwarf2read.c (process_die): Fix fall-through comments.
5288         * dbxread.c (process_one_symbol): Fix fall-through comment.
5289         * d-exp.y (lex_one_token): Fix fall-through comment.
5290         * cp-name-parser.y (yylex): Fix fall-through comment.
5291         * coffread.c (coff_symtab_read): Fix fall-through comment.
5292         * c-exp.y (lex_one_token): Fix fall-through comment.
5293         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5294         comment.
5295         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5296         comment.
5297
5298 2018-05-04  Tom Tromey  <tom@tromey.com>
5299
5300         PR python/22730:
5301         * NEWS: Mention gdb.execute change.
5302         * gdbcmd.h (execute_control_command): Don't declare.
5303         * python/python.c (execute_gdb_command): Use read_command_lines_1,
5304         execute_control_commands, execute_control_commands_to_string.
5305         * cli/cli-script.h (execute_control_commands)
5306         (execute_control_commands_to_string): Declare.
5307         (execute_control_command): Add from_tty parameter.
5308         * cli/cli-script.c (execute_control_commands)
5309         (execute_control_commands_to_string): New functions.
5310         (execute_user_command): Use execute_control_commands.
5311         (execute_control_command_1): Add "from_tty" parameter.  Update.
5312         (execute_control_command): Likewise.
5313
5314 2018-05-04  Tom Tromey  <tom@tromey.com>
5315
5316         PR python/22731:
5317         * NEWS: Mention that breakpoint commands are writable.
5318         * python/py-breakpoint.c (bppy_set_commands): New function.
5319         (breakpoint_object_getset) <"commands">: Use it.
5320
5321 2018-05-04  Tom Tromey  <tom@tromey.com>
5322
5323         * tracepoint.c (actions_command): Update.
5324         * mi/mi-cmd-break.c (mi_command_line_array)
5325         (mi_command_line_array_cnt, mi_command_line_array_ptr)
5326         (mi_read_next_line): Remove.
5327         (mi_cmd_break_commands): Update.
5328         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5329         function_view.
5330         * cli/cli-script.c (get_command_line): Update.
5331         (process_next_line): Use function_view.  Constify.
5332         (recurse_read_control_structure, read_command_lines)
5333         (read_command_lines_1): Change argument types to function_view.
5334         (do_define_command, document_command): Update.
5335         * breakpoint.h (check_tracepoint_command): Don't declare.
5336         * breakpoint.c (check_tracepoint_command): Remove.
5337         (commands_command_1, create_tracepoint_from_upload): Update.
5338
5339 2018-05-04  Tom Tromey  <tom@tromey.com>
5340
5341         PR gdb/11750:
5342         * cli/cli-script.h (enum command_control_type) <define_control>:
5343         New constant.
5344         * cli/cli-script.c (multi_line_command_p): Handle define_control.
5345         (build_command_line, execute_control_command_1)
5346         (process_next_line): Likewise.
5347         (do_define_command): New function, extracted from define_command.
5348         (define_command): Use it.
5349
5350 2018-05-04  Tom Tromey  <tom@tromey.com>
5351
5352         * tracepoint.c (actions_command): Update.
5353         * cli/cli-script.h (read_command_lines): Update.
5354         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5355         (MAX_TMPBUF): Remove define.
5356         (define_command): Use string_printf.
5357         (document_command): Likewise.
5358         * breakpoint.c (commands_command_1): Update.
5359
5360 2018-05-04  Tom Tromey  <tom@tromey.com>
5361
5362         * top.c (execute_command): Update.
5363         * cli/cli-script.h (print_command_lines): Now varargs.
5364         * cli/cli-script.c (print_command_lines): Now varargs.
5365         (execute_control_command_1) <case while_control, case if_control>:
5366         Update.
5367
5368 2018-05-04  Tom Tromey  <tom@tromey.com>
5369
5370         * tracepoint.c (all_tracepoint_actions): Rename from
5371         all_tracepoint_actions_and_cleanup.  Change return type.
5372         (actions_command, encode_actions_1, encode_actions)
5373         (trace_dump_actions, tdump_command): Update.
5374         * remote.c (remote_download_command_source): Update.
5375         * python/python.c (gdbpy_eval_from_control_command)
5376         (python_command, python_interactive_command): Update.
5377         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5378         * guile/guile.c (guile_command)
5379         (gdbscm_eval_from_control_command, guile_command): Update.
5380         * compile/compile.c (compile_code_command)
5381         (compile_print_command, compile_to_object): Update.
5382         * cli/cli-script.h (struct command_lines_deleter): New.
5383         (counted_command_line): New typedef.
5384         (struct command_line): Add constructor, destructor.
5385         <body_list>: Remove.
5386         <body_list_0, body_list_1>: New members.
5387         (command_line_up): Remove typedef.
5388         (read_command_lines, read_command_lines_1, get_command_line):
5389         Update.
5390         (copy_command_lines): Don't declare.
5391         * cli/cli-script.c (build_command_line): Use "new".
5392         (get_command_line): Return counted_command_line.
5393         (print_command_lines, execute_user_command)
5394         (execute_control_command_1, while_command, if_command): Update.
5395         (realloc_body_list): Remove.
5396         (process_next_line, recurse_read_control_structure): Update.
5397         (read_command_lines, read_command_lines_1): Return counted_command_line.
5398         (free_command_lines): Use "delete".
5399         (copy_command_lines): Remove.
5400         (define_command, document_command, show_user_1): Update.
5401         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5402         a counted_command_line.
5403         * breakpoint.h (counted_command_line): Remove typedef.
5404         (breakpoint_set_commands): Update.
5405         * breakpoint.c (check_no_tracepoint_commands)
5406         (validate_commands_for_breakpoint): Update.
5407         (breakpoint_set_commands): Change commands to be a
5408         counted_command_line.
5409         (commands_command_1, update_dprintf_command_list)
5410         (create_tracepoint_from_upload): Update.
5411
5412 2018-05-04  Tom Tromey  <tom@tromey.com>
5413
5414         * cli/cli-decode.h (cmd_list_element): New constructor.
5415         (~cmd_list_element): New destructor.
5416         (struct cmd_list_element): Add initializers.
5417         * cli/cli-decode.c (do_add_cmd): Use "new".
5418         (delete_cmd): Use "delete".
5419
5420 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
5421             Pedro Alves <palves@redhat.com>
5422
5423         PR breakpoints/19806 and support for PR external/20207.
5424         * NEWS: Mention Aarch64 watchpoint improvements.
5425         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5426         watchpoints and PR external/20207 watchpoints.
5427         * nat/aarch64-linux-hw-point.c
5428         (kernel_supports_any_contiguous_range): New.
5429         (aarch64_watchpoint_offset): New.
5430         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5431         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5432         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5433         (aarch64_align_watchpoint): New parameters aligned_offset_p and
5434         next_addr_orig_p.  Support PR external/20207 watchpoints.
5435         (aarch64_downgrade_regs): New.
5436         (aarch64_dr_state_insert_one_point): New parameters offset and
5437         addr_orig.
5438         (aarch64_dr_state_remove_one_point): Likewise.
5439         (aarch64_handle_breakpoint): Update caller.
5440         (aarch64_handle_aligned_watchpoint): Likewise.
5441         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5442         aligned_offset.
5443         (aarch64_linux_set_debug_regs): Remove const from state.  Call
5444         aarch64_downgrade_regs.
5445         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5446         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5447         (DR_CONTROL_MASK): ... this.
5448         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5449         (unsigned int aarch64_watchpoint_offset): New prototype.
5450         (aarch64_linux_set_debug_regs): Remove const from state.
5451         * utils.c (align_up, align_down): Move to ...
5452         * common/common-utils.c (align_up, align_down): ... here.
5453         * utils.h (align_up, align_down): Move to ...
5454         * common/common-utils.h (align_up, align_down): ... here.
5455
5456 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
5457
5458         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5459         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5460         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5461         Re-implement to match the ABI as summarized in GCC's
5462         gcc/config/sparc/sparc.c.  All callers updated.
5463         (sparc32_store_arguments): Remove assertion.
5464
5465 2018-05-04  Tom Tromey  <tom@tromey.com>
5466
5467         * printcmd.c: Don't include tui.h.
5468         (decode_format): Use skip_spaces.
5469
5470 2018-05-04  Tom Tromey  <tom@tromey.com>
5471
5472         PR gdb/22619:
5473         * printcmd.c (last_count): New global.
5474         (x_command): Use saved count when repeating.
5475
5476 2018-05-04  Tom Tromey  <tom@tromey.com>
5477
5478         * nto-procfs.c (do_closedir_cleanup): Remove.
5479         (procfs_pidlist): Use gdb_dir_up.
5480         * procfs.c (do_closedir_cleanup): Remove.
5481         (proc_update_threads): Use gdb_dir_up.
5482         * common/filestuff.h (struct gdb_dir_deleter): New.
5483         (gdb_dir_up): New typedef.
5484
5485 2018-05-04  Tom Tromey  <tom@tromey.com>
5486
5487         * ada-lang.c (print_mention_exception): Use std::string.
5488
5489 2018-05-04  Tom Tromey  <tom@tromey.com>
5490
5491         * ada-lang.c (create_excep_cond_exprs): Update.
5492         (ada_exception_catchpoint_cond_string): Use std::string.
5493
5494 2018-05-04  Tom Tromey  <tom@tromey.com>
5495
5496         * ada-lang.c (xget_renaming_scope): Return std::string.
5497         (old_renaming_is_invisible): Update.
5498
5499 2018-05-04  Tom Tromey  <tom@tromey.com>
5500
5501         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5502         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5503
5504 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
5505
5506         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5507
5508 2018-05-04  Tom Tromey  <tom@tromey.com>
5509
5510         * remote.c (remote_query_supported_append): Change type.
5511         (remote_check_symbols): Update.
5512
5513 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
5514
5515         PR gdb/11420
5516         * configure.ac: Prepend libpython.
5517         * python/python-config.py: Likewise.
5518         * configure: Regenerate.
5519
5520 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5521
5522         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5523
5524 2018-05-03  Pedro Alves  <palves@redhat.com>
5525
5526         * s390-linux-nat.c
5527         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5528         override.  Write 'true' instead of '1'.
5529         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5530         declaration.
5531
5532 2018-05-02  Pedro Alves  <palves@redhat.com>
5533
5534         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5535         add_inf_child_target.
5536         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5537         add_inf_child_target.
5538         * aix-thread.c (aix_thread_target_info): New.
5539         (aix_thread_target) <shortname, longname, doc>: Delete.
5540         <info>: New.
5541         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5542         add_inf_child_target.
5543         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5544         add_inf_child_target.
5545         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5546         add_inf_child_target.
5547         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5548         add_inf_child_target.
5549         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5550         add_inf_child_target.
5551         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5552         add_inf_child_target.
5553         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5554         add_inf_child_target.
5555         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5556         add_inf_child_target.
5557         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5558         add_inf_child_target.
5559         * bfd-target.c (target_bfd_target_info): New.
5560         (target_bfd) <shortname, longname, doc>: Delete.
5561         <info>: New.
5562         * bsd-kvm.c (bsd_kvm_target_info): New.
5563         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5564         <info>: New.
5565         (bsd_kvm_target::open): Rename to ...
5566         (bsd_kvm_target_open): ... this.  Adjust.
5567         * bsd-uthread.c (bsd_uthread_target_info): New.
5568         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5569         <info>: New.
5570         * corefile.c (core_file_command): Adjust.
5571         * corelow.c (core_target_info): New.
5572         (core_target) <shortname, longname, doc>: Delete.
5573         <info>: New.
5574         (core_target::open): Rename to ...
5575         (core_target_open): ... this.  Adjust.
5576         * ctf.c (ctf_target_info): New.
5577         (ctf_target) <shortname, longname, doc>: Delete.
5578         <info>: New.
5579         (ctf_target::open): Rename to ...
5580         (ctf_target_open): ... this.
5581         (_initialize_ctf): Adjust.
5582         * exec.c (exec_target_info): New.
5583         (exec_target) <shortname, longname, doc>: Delete.
5584         <info>: New.
5585         (exec_target::open): Rename to ...
5586         (exec_target_open): ... this.
5587         * gdbcore.h (core_target_open): Declare.
5588         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5589         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5590         add_inf_child_target.
5591         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5592         add_inf_child_target.
5593         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5594         add_inf_child_target.
5595         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5596         add_inf_child_target.
5597         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5598         add_inf_child_target.
5599         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5600         add_inf_child_target.
5601         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5602         add_inf_child_target.
5603         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5604         add_inf_child_target.
5605         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5606         add_inf_child_target.
5607         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5608         add_inf_child_target.
5609         * inf-child.c (inf_child_target_info): New.
5610         (inf_child_target::info): New.
5611         (inf_child_open_target): Remove 'target' parameter.  Use
5612         get_native_target instead.
5613         (inf_child_target::open): Delete.
5614         (add_inf_child_target): New.
5615         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5616         Delete.
5617         <info>: New.
5618         (add_inf_child_target): Declare.
5619         (inf_child_open_target): Declare.
5620         * linux-thread-db.c (thread_db_target_info): New.
5621         (thread_db_target) <shortname, longname, doc>: Delete.
5622         <info>: New.
5623         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5624         add_inf_child_target.
5625         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5626         add_inf_child_target.
5627         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5628         add_inf_child_target.
5629         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5630         add_inf_child_target.
5631         * make-target-delegates (print_class): Adjust.
5632         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5633         add_inf_child_target.
5634         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5635         add_inf_child_target.
5636         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5637         add_inf_child_target.
5638         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5639         add_inf_child_target.
5640         * nto-procfs.c (nto_native_target_info): New.
5641         (nto_procfs_target_native) <shortname, longname, doc>:
5642         Delete.
5643         <info>: New.
5644         (nto_procfs_target_info): New.
5645         (nto_procfs_target_procfs) <shortname, longname, doc>:
5646         Delete.
5647         <info>: New.
5648         (init_procfs_targets): Adjust.
5649         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5650         add_inf_child_target.
5651         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5652         add_inf_child_target.
5653         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5654         add_inf_child_target.
5655         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5656         add_inf_child_target.
5657         * ravenscar-thread.c (ravenscar_target_info): New.
5658         (ravenscar_thread_target) <shortname, longname, doc>:
5659         Delete.
5660         <info>: New.
5661         * record-btrace.c (record_btrace_target_info):
5662         (record_btrace_target) <shortname, longname, doc>: Delete.
5663         <info>: New.
5664         (record_btrace_target::open): Rename to ...
5665         (record_btrace_target_open): ... this.  Adjust.
5666         * record-full.c (record_longname, record_doc): New.
5667         (record_full_base_target) <shortname, longname, doc>: Delete.
5668         <info>: New.
5669         (record_full_target_info): New.
5670         (record_full_target): <shortname>: Delete.
5671         <info>: New.
5672         (record_full_core_open_1, record_full_open_1): Update comments.
5673         (record_full_base_target::open): Rename to ...
5674         (record_full_open): ... this.
5675         (cmd_record_full_restore): Update.
5676         (_initialize_record_full): Update.
5677         * remote-sim.c (remote_sim_target_info): New.
5678         (gdbsim_target) <shortname, longname, doc>: Delete.
5679         <info>: New.
5680         (gdbsim_target::open): Rename to ...
5681         (gdbsim_target_open): ... this.
5682         (_initialize_remote_sim): Adjust.
5683         * remote.c (remote_doc): New.
5684         (remote_target_info): New.
5685         (remote_target) <shortname, longname, doc>: Delete.
5686         <info>: New.
5687         (extended_remote_target_info): New.
5688         (extended_remote_target) <shortname, longname, doc>: Delete.
5689         <info>: New.
5690         (remote_target::open_1): Make static.  Adjust.
5691         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5692         * s390-linux-nat.c (_initialize_s390_nat): Use
5693         add_inf_child_target.
5694         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5695         add_inf_child_target.
5696         * sol-thread.c (thread_db_target_info): New.
5697         (sol_thread_target) <shortname, longname, doc>: Delete.
5698         <info>: New.
5699         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5700         add_inf_child_target.
5701         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5702         add_inf_child_target.
5703         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5704         add_inf_child_target.
5705         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5706         add_inf_child_target.
5707         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5708         add_inf_child_target.
5709         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5710         add_inf_child_target.
5711         * spu-linux-nat.c (_initialize_spu_nat): Use
5712         add_inf_child_target.
5713         * spu-multiarch.c (spu_multiarch_target_info): New.
5714         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5715         <info>: New.
5716         * target-delegates.c: Regenerate.
5717         * target.c: Include <unordered_map>.
5718         (target_ops_p): Delete.
5719         (DEF_VEC_P(target_ops_p)): Delete.
5720         (target_factories): New.
5721         (test_target_info): New.
5722         (test_target_ops::info): New.
5723         (open_target): Adjust to use target_factories.
5724         (add_target_with_completer): Rename to ...
5725         (add_target): ... this.  Change prototype.  Register target_info
5726         and open callback in target_factories.  Register target_info in
5727         command context instead of target_ops.
5728         (add_target): Delete old implementation.
5729         (add_deprecated_target_alias): Change prototype.  Adjust.
5730         (the_native_target): New.
5731         (set_native_target, get_native_target): New.
5732         (find_default_run_target): Use the_native_target.
5733         (find_attach_target, find_run_target): Simplify.
5734         (target_ops::open): Delete.
5735         (dummy_target_info): New.
5736         (dummy_target::shortname, dummy_target::longname)
5737         (dummy_target::doc): Delete.
5738         (dummy_target::info): New.
5739         (debug_target::shortname, debug_target::longname)
5740         (debug_target::doc): Delete.
5741         (debug_target::info): New.
5742         * target.h (struct target_info): New.
5743         (target_ops::~target_ops): Add comment.
5744         (target_ops::info): New.
5745         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5746         longer virtual.  Implement in terms of target_info.
5747         (set_native_target, get_native_target): Declare.
5748         (target_open_ftype): New.
5749         (add_target, add_target_with_completer)
5750         (add_deprecated_target_alias): Change prototype.
5751         (test_target) <shortname, longname, doc>: Delete.
5752         <info>: New.
5753         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5754         add_inf_child_target.
5755         * tracefile-tfile.c (tfile_target_info): New.
5756         (tfile_target) <shortname, longname, doc>: Delete.
5757         <info>: New.
5758         (tfile_target::open): Rename to ...
5759         (tfile_target_open): ... this.
5760         (_initialize_tracefile_tfile): Adjust.
5761         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5762         add_inf_child_target.
5763         * windows-nat.c (_initialize_windows_nat): Use
5764         add_inf_child_target.
5765         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5766         add_inf_child_target.
5767
5768 2018-05-02  Pedro Alves  <palves@redhat.com>
5769
5770         * linux-nat.h (linux_nat_target) <low_new_thread,
5771         low_delete_thread, low_new_fork, low_forget_process,
5772         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5773         New virtual methods.
5774         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5775         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5776         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5777         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5778         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5779         Delete.
5780         * linux-fork.c (delete_fork): Adjust to call low method.
5781         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5782         (linux_nat_new_fork, linux_nat_forget_process_hook)
5783         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5784         (linux_nat_status_is_event):
5785         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5786         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5787         to call low method.
5788         (sigtrap_is_event): Rename to ...
5789         (linux_nat_target::low_status_is_event): ... this.
5790         (linux_nat_set_status_is_event): Delete.
5791         (save_stop_reason, linux_nat_wait_1)
5792         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5793         low methods.
5794         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5795         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5796         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5797         (linux_nat_set_prepare_to_resume): Delete.
5798         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5799         low virtual methods.
5800         * amd64-linux-nat.c: Likewise.
5801         * arm-linux-nat.c: Likewise.
5802         * i386-linux-nat.c: Likewise.
5803         * ia64-linux-nat.c: Likewise.
5804         * mips-linux-nat.c: Likewise.
5805         * ppc-linux-nat.c: Likewise.
5806         * s390-linux-nat.c: Likewise.
5807         * sparc64-linux-nat.c: Likewise.
5808         * x86-linux-nat.c: Likewise.
5809         * x86-linux-nat.h: Include "nat/x86-linux.h".
5810         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5811         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5812         Override methods.
5813
5814 2018-05-02  Pedro Alves  <palves@redhat.com>
5815
5816         * target.h (target_ops)
5817         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5818         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5819         stopped_by_watchpoint, have_continuable_watchpoint,
5820         stopped_data_address, watchpoint_addr_within_range,
5821         can_accel_watchpoint_condition, can_run, thread_alive,
5822         has_all_memory, has_memory, has_stack, has_registers,
5823         has_execution, can_async_p, is_async_p, supports_non_stop,
5824         always_non_stop_p, can_execute_reverse, supports_multi_process,
5825         supports_enable_disable_tracepoint,
5826         supports_disable_randomization, supports_string_tracing,
5827         supports_evaluation_of_breakpoint_conditions,
5828         can_run_breakpoint_commands, filesystem_is_local,
5829         can_download_tracepoint, get_trace_state_variable_value,
5830         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5831         record_is_replaying, record_will_replay,
5832         augmented_libraries_svr4_read>: Adjust to return bool.
5833         * aarch64-linux-nat.c: All implementations adjusted.
5834         * aix-thread.c: All implementations adjusted.
5835         * arm-linux-nat.c: All implementations adjusted.
5836         * breakpoint.c: All implementations adjusted.
5837         * bsd-kvm.c: All implementations adjusted.
5838         * bsd-uthread.c: All implementations adjusted.
5839         * corelow.c: All implementations adjusted.
5840         * ctf.c: All implementations adjusted.
5841         * darwin-nat.c: All implementations adjusted.
5842         * darwin-nat.h: All implementations adjusted.
5843         * exec.c: All implementations adjusted.
5844         * fbsd-nat.c: All implementations adjusted.
5845         * fbsd-nat.h: All implementations adjusted.
5846         * gnu-nat.c: All implementations adjusted.
5847         * gnu-nat.h: All implementations adjusted.
5848         * go32-nat.c: All implementations adjusted.
5849         * ia64-linux-nat.c: All implementations adjusted.
5850         * inf-child.c: All implementations adjusted.
5851         * inf-child.h: All implementations adjusted.
5852         * inf-ptrace.c: All implementations adjusted.
5853         * inf-ptrace.h: All implementations adjusted.
5854         * linux-nat.c: All implementations adjusted.
5855         * linux-nat.h: All implementations adjusted.
5856         * mips-linux-nat.c: All implementations adjusted.
5857         * nto-procfs.c: All implementations adjusted.
5858         * ppc-linux-nat.c: All implementations adjusted.
5859         * procfs.c: All implementations adjusted.
5860         * ravenscar-thread.c: All implementations adjusted.
5861         * record-btrace.c: All implementations adjusted.
5862         * record-full.c: All implementations adjusted.
5863         * remote-sim.c: All implementations adjusted.
5864         * remote.c: All implementations adjusted.
5865         * s390-linux-nat.c: All implementations adjusted.
5866         * sol-thread.c: All implementations adjusted.
5867         * spu-multiarch.c: All implementations adjusted.
5868         * target-delegates.c: All implementations adjusted.
5869         * target.c: All implementations adjusted.
5870         * target.h: All implementations adjusted.
5871         * tracefile-tfile.c: All implementations adjusted.
5872         * tracefile.c: All implementations adjusted.
5873         * tracefile.h: All implementations adjusted.
5874         * windows-nat.c: All implementations adjusted.
5875         * x86-linux-nat.h: All implementations adjusted.
5876         * x86-nat.h: All implementations adjusted.
5877
5878 2018-05-02  Pedro Alves  <palves@redhat.com>
5879
5880         * make-target-delegates (scan_target_h): Don't trim lines here.
5881         Replace sequences of tabs and/or whitespace with a single
5882         whitespace.
5883         (top level, parsing methods): Trim each line before processing it
5884         here.
5885
5886 2018-05-02  Pedro Alves  <palves@redhat.com>
5887             John Baldwin  <jhb@freebsd.org>
5888
5889         * target.h (enum strata) <debug_stratum>: New.
5890         (struct target_ops) <all delegation methods>: Replace by C++
5891         virtual methods, and drop "to_" prefix.  All references updated
5892         throughout.
5893         <to_shortname, to_longname, to_doc, to_data,
5894         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5895         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5896         virtual methods.  All references updated throughout.
5897         <can_attach, supports_terminal_ours, can_create_inferior,
5898         get_thread_control_capabilities, attach_no_wait>: New
5899         virtual methods.
5900         <insert_breakpoint, remove_breakpoint>: Now
5901         TARGET_DEFAULT_NORETURN methods.
5902         <info_proc>: Now returns bool.
5903         <to_magic>: Delete.
5904         (OPS_MAGIC): Delete.
5905         (current_target): Delete.  All references replaced by references
5906         to ...
5907         (target_stack): ... this.  New.
5908         (target_shortname, target_longname): Adjust.
5909         (target_can_run): Now a function declaration.
5910         (default_child_has_all_memory, default_child_has_memory)
5911         (default_child_has_stack, default_child_has_registers)
5912         (default_child_has_execution): Remove target_ops parameter.
5913         (complete_target_initialization): Delete.
5914         (memory_breakpoint_target): New template class.
5915         (test_target_ops): Refactor as a C++ class with virtual methods.
5916         * make-target-delegates (NAME_PART): Tighten.
5917         (POINTER_PART, CP_SYMBOL): New.
5918         (SIMPLE_RETURN_PART): Reimplement.
5919         (VEC_RETURN_PART): Expect less.
5920         (RETURN_PART, VIRTUAL_PART): New.
5921         (METHOD): Adjust to C++ virtual methods.
5922         (scan_target_h): Remove reference to C99.
5923         (dname): Output "target_ops::" prefix.
5924         (write_function_header): Adjust to output a C++ class method.
5925         (write_declaration): New.
5926         (write_delegator): Adjust to output a C++ class method.
5927         (tdname): Output "dummy_target::" prefix.
5928         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5929         method.
5930         (tdefault_names, debug_names): Delete.
5931         (return_types, tdefaults, styles, argtypes_array): New.
5932         (top level): All methods are delegators.
5933         (print_class): New.
5934         (top level): Print dummy_target and debug_target classes.
5935         * target-delegates.c: Regenerate.
5936         * target-debug.h (target_debug_print_enum_info_proc_what)
5937         (target_debug_print_thread_control_capabilities)
5938         (target_debug_print_thread_info_p): New.
5939         * target.c (dummy_target): Delete.
5940         (the_dummy_target, the_debug_target): New.
5941         (target_stack): Now extern.
5942         (set_targetdebug): Push/unpush debug target.
5943         (default_child_has_all_memory, default_child_has_memory)
5944         (default_child_has_stack, default_child_has_registers)
5945         (default_child_has_execution): Remove target_ops parameter.
5946         (complete_target_initialization): Delete.
5947         (add_target_with_completer): No longer call
5948         complete_target_initialization.
5949         (target_supports_terminal_ours): Use regular delegation.
5950         (update_current_target): Delete.
5951         (push_target): No longer check magic number.  Don't call
5952         update_current_target.
5953         (unpush_target): Don't call update_current_target.
5954         (target_is_pushed): No longer check magic number.
5955         (target_require_runnable): Skip for all stratums over
5956         process_stratum.
5957         (target_ops::info_proc): New.
5958         (target_info_proc): Use find_target_at and
5959         find_default_run_target.
5960         (target_supports_disable_randomization): Use regular delegation.
5961         (target_get_osdata): Use find_target_at.
5962         (target_ops::open, target_ops::close, target_ops::can_attach)
5963         (target_ops::attach, target_ops::can_create_inferior)
5964         (target_ops::create_inferior, target_ops::can_run)
5965         (target_can_run): New.
5966         (default_fileio_target): Use regular delegation.
5967         (target_ops::fileio_open, target_ops::fileio_pwrite)
5968         (target_ops::fileio_pread, target_ops::fileio_fstat)
5969         (target_ops::fileio_close, target_ops::fileio_unlink)
5970         (target_ops::fileio_readlink): New.
5971         (target_fileio_open_1, target_fileio_unlink)
5972         (target_fileio_readlink): Always call the target method.  Handle
5973         FILEIO_ENOSYS.
5974         (return_zero, return_zero_has_execution): Delete.
5975         (init_dummy_target): Delete.
5976         (dummy_target::dummy_target, dummy_target::shortname)
5977         (dummy_target::longname, dummy_target::doc)
5978         (debug_target::debug_target, debug_target::shortname)
5979         (debug_target::longname, debug_target::doc): New.
5980         (target_supports_delete_record): Use regular delegation.
5981         (setup_target_debug): Delete.
5982         (maintenance_print_target_stack): Skip debug_stratum.
5983         (initialize_targets): Instantiate the_dummy_target and
5984         the_debug_target.
5985         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5986         use target_stack.
5987         (target_auxv_search, fprint_target_auxv): Adjust.
5988         (info_auxv_command): Adjust to use target_stack.
5989         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5990         * exceptions.c (print_flush): Handle a NULL target_stack.
5991         * regcache.c (target_ops_no_register): Refactor as class with
5992         virtual methods.
5993
5994         * exec.c (exec_target): New class.
5995         (exec_ops): Now an exec_target.
5996         (exec_open, exec_close_1, exec_get_section_table)
5997         (exec_xfer_partial, exec_files_info, exec_has_memory)
5998         (exec_make_note_section): Refactor as exec_target methods.
5999         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6000         Delete.
6001         (exec_target::find_memory_regions): New.
6002         (_initialize_exec): Don't call init_exec_ops.
6003         * gdbcore.h (exec_file_clear): Delete.
6004
6005         * corefile.c (core_target): Delete.
6006         (core_file_command): Adjust.
6007         * corelow.c (core_target): New class.
6008         (the_core_target): New.
6009         (core_close): Remove target_ops parameter.
6010         (core_close_cleanup): Adjust.
6011         (core_target::close): New.
6012         (core_open, core_detach, get_core_registers, core_files_info)
6013         (core_xfer_partial, core_thread_alive, core_read_description)
6014         (core_pid_to_str, core_thread_name, core_has_memory)
6015         (core_has_stack, core_has_registers, core_info_proc): Rework as
6016         core_target methods.
6017         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6018         (_initialize_corelow): Initialize the_core_target.
6019         * gdbcore.h (core_target): Delete.
6020         (the_core_target): New.
6021
6022         * ctf.c: (ctf_target): New class.
6023         (ctf_ops): Now a ctf_target.
6024         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6025         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6026         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6027         methods.
6028         (init_ctf_ops): Delete.
6029         (_initialize_ctf): Don't call it.
6030         * tracefile-tfile.c (tfile_target): New class.
6031         (tfile_ops): Now a tfile_target.
6032         (tfile_open, tfile_close, tfile_files_info)
6033         (tfile_get_tracepoint_status, tfile_trace_find)
6034         (tfile_fetch_registers, tfile_xfer_partial)
6035         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6036         Refactor as tfile_target methods.
6037         (tfile_xfer_partial_features): Remove target_ops parameter.
6038         (init_tfile_ops): Delete.
6039         (_initialize_tracefile_tfile): Don't call it.
6040         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6041         (tracefile_has_stack, tracefile_has_registers)
6042         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6043         tracefile_target methods.
6044         (init_tracefile_ops): Delete.
6045         (tracefile_target::tracefile_target): New.
6046         * tracefile.h: Include "target.h".
6047         (tracefile_target): New class.
6048         (init_tracefile_ops): Delete.
6049
6050         * spu-multiarch.c (spu_multiarch_target): New class.
6051         (spu_ops): Now a spu_multiarch_target.
6052         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6053         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6054         (spu_search_memory, spu_mourn_inferior): Refactor as
6055         spu_multiarch_target methods.
6056         (init_spu_ops): Delete.
6057         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6058         complete_target_initialization.
6059
6060         * ravenscar-thread.c (ravenscar_thread_target): New class.
6061         (ravenscar_ops): Now a ravenscar_thread_target.
6062         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6063         (ravenscar_thread_alive, ravenscar_pid_to_str)
6064         (ravenscar_fetch_registers, ravenscar_store_registers)
6065         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6066         (ravenscar_stopped_by_hw_breakpoint)
6067         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6068         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6069         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6070         methods.
6071         (init_ravenscar_thread_ops): Delete.
6072         (_initialize_ravenscar): Remove references to
6073         init_ravenscar_thread_ops and complete_target_initialization.
6074
6075         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6076         (bsd_uthread_target): New class.
6077         (bsd_uthread_ops): Now a bsd_uthread_target.
6078         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6079         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6080         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6081         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6082         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6083         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6084         (bsd_uthread_target): Delete function.
6085         (_initialize_bsd_uthread): Remove reference to
6086         complete_target_initialization.
6087
6088         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6089         (target_bfd): ... this new class.
6090         (target_bfd_xfer_partial, target_bfd_get_section_table)
6091         (target_bfd_close): Refactor as target_bfd methods.
6092         (target_bfd::~target_bfd): New.
6093         (target_bfd_reopen): Adjust.
6094         (target_bfd::close): New.
6095
6096         * record-btrace.c (record_btrace_target): New class.
6097         (record_btrace_ops): Now a record_btrace_target.
6098         (record_btrace_open, record_btrace_stop_recording)
6099         (record_btrace_disconnect, record_btrace_close)
6100         (record_btrace_async, record_btrace_info)
6101         (record_btrace_insn_history, record_btrace_insn_history_range)
6102         (record_btrace_insn_history_from, record_btrace_call_history)
6103         (record_btrace_call_history_range)
6104         (record_btrace_call_history_from, record_btrace_record_method)
6105         (record_btrace_is_replaying, record_btrace_will_replay)
6106         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6107         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6108         (record_btrace_store_registers, record_btrace_prepare_to_store)
6109         (record_btrace_to_get_unwinder)
6110         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6111         (record_btrace_commit_resume, record_btrace_wait)
6112         (record_btrace_stop, record_btrace_can_execute_reverse)
6113         (record_btrace_stopped_by_sw_breakpoint)
6114         (record_btrace_supports_stopped_by_sw_breakpoint)
6115         (record_btrace_stopped_by_hw_breakpoint)
6116         (record_btrace_supports_stopped_by_hw_breakpoint)
6117         (record_btrace_update_thread_list, record_btrace_thread_alive)
6118         (record_btrace_goto_begin, record_btrace_goto_end)
6119         (record_btrace_goto, record_btrace_stop_replaying_all)
6120         (record_btrace_execution_direction)
6121         (record_btrace_prepare_to_generate_core)
6122         (record_btrace_done_generating_core): Refactor as
6123         record_btrace_target methods.
6124         (init_record_btrace_ops): Delete.
6125         (_initialize_record_btrace): Remove reference to
6126         init_record_btrace_ops.
6127         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6128         the execution_direction global.
6129         (record_full_base_target, record_full_target)
6130         (record_full_core_target): New classes.
6131         (record_full_ops): Now a record_full_target.
6132         (record_full_core_ops): Now a record_full_core_target.
6133         (record_full_target::detach, record_full_target::disconnect)
6134         (record_full_core_target::disconnect)
6135         (record_full_target::mourn_inferior, record_full_target::kill):
6136         New.
6137         (record_full_open, record_full_close, record_full_async): Refactor
6138         as methods of the record_full_base_target class.
6139         (record_full_resume, record_full_commit_resume): Refactor
6140         as methods of the record_full_target class.
6141         (record_full_wait, record_full_stopped_by_watchpoint)
6142         (record_full_stopped_data_address)
6143         (record_full_stopped_by_sw_breakpoint)
6144         (record_full_supports_stopped_by_sw_breakpoint)
6145         (record_full_stopped_by_hw_breakpoint)
6146         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6147         methods of the record_full_base_target class.
6148         (record_full_store_registers, record_full_xfer_partial)
6149         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6150         Refactor as methods of the record_full_target class.
6151         (record_full_can_execute_reverse, record_full_get_bookmark)
6152         (record_full_goto_bookmark, record_full_execution_direction)
6153         (record_full_record_method, record_full_info, record_full_delete)
6154         (record_full_is_replaying, record_full_will_replay)
6155         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6156         (record_full_stop_replaying): Refactor as methods of the
6157         record_full_base_target class.
6158         (record_full_core_resume, record_full_core_kill)
6159         (record_full_core_fetch_registers)
6160         (record_full_core_prepare_to_store)
6161         (record_full_core_store_registers, record_full_core_xfer_partial)
6162         (record_full_core_insert_breakpoint)
6163         (record_full_core_remove_breakpoint)
6164         (record_full_core_has_execution): Refactor
6165         as methods of the record_full_core_target class.
6166         (record_full_base_target::supports_delete_record): New.
6167         (init_record_full_ops): Delete.
6168         (init_record_full_core_ops): Delete.
6169         (record_full_save): Refactor as method of the
6170         record_full_base_target class.
6171         (_initialize_record_full): Remove references to
6172         init_record_full_ops and init_record_full_core_ops.
6173
6174         * remote.c (remote_target, extended_remote_target): New classes.
6175         (remote_ops): Now a remote_target.
6176         (extended_remote_ops): Now an extended_remote_target.
6177         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6178         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6179         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6180         (remote_pass_signals, remote_set_syscall_catchpoint)
6181         (remote_program_signals, )
6182         (remote_thread_always_alive): Remove target_ops parameter.
6183         (remote_thread_alive, remote_thread_name)
6184         (remote_update_thread_list, remote_threads_extra_info)
6185         (remote_static_tracepoint_marker_at)
6186         (remote_static_tracepoint_markers_by_strid)
6187         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6188         (remote_open): Refactor as methods of remote_target.
6189         (extended_remote_open, extended_remote_detach)
6190         (extended_remote_attach, extended_remote_post_attach):
6191         (extended_remote_supports_disable_randomization)
6192         (extended_remote_create_inferior): : Refactor as method of
6193         extended_remote_target.
6194         (remote_set_permissions, remote_open_1, remote_detach)
6195         (remote_follow_fork, remote_follow_exec, remote_disconnect)
6196         (remote_resume, remote_commit_resume, remote_stop)
6197         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6198         (remote_terminal_ours, remote_wait, remote_fetch_registers)
6199         (remote_prepare_to_store, remote_store_registers)
6200         (remote_flash_erase, remote_flash_done, remote_files_info)
6201         (remote_kill, remote_mourn, remote_insert_breakpoint)
6202         (remote_remove_breakpoint, remote_insert_watchpoint)
6203         (remote_watchpoint_addr_within_range)
6204         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6205         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6206         (remote_supports_stopped_by_sw_breakpoint)
6207         (remote_stopped_by_hw_breakpoint)
6208         (remote_supports_stopped_by_hw_breakpoint)
6209         (remote_stopped_by_watchpoint, remote_stopped_data_address)
6210         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6211         (remote_verify_memory): Refactor as methods of remote_target.
6212         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6213         parameter.
6214         (remote_xfer_partial, remote_get_memory_xfer_limit)
6215         (remote_search_memory, remote_rcmd, remote_memory_map)
6216         (remote_pid_to_str, remote_get_thread_local_address)
6217         (remote_get_tib_address, remote_read_description): Refactor as
6218         methods of remote_target.
6219         (remote_target::fileio_open, remote_target::fileio_pwrite)
6220         (remote_target::fileio_pread, remote_target::fileio_close): New.
6221         (remote_hostio_readlink, remote_hostio_fstat)
6222         (remote_filesystem_is_local, remote_can_execute_reverse)
6223         (remote_supports_non_stop, remote_supports_disable_randomization)
6224         (remote_supports_multi_process, remote_supports_cond_breakpoints)
6225         (remote_supports_enable_disable_tracepoint)
6226         (remote_supports_string_tracing)
6227         (remote_can_run_breakpoint_commands, remote_trace_init)
6228         (remote_download_tracepoint, remote_can_download_tracepoint)
6229         (remote_download_trace_state_variable, remote_enable_tracepoint)
6230         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6231         (remote_trace_start, remote_get_trace_status)
6232         (remote_get_tracepoint_status, remote_trace_stop)
6233         (remote_trace_find, remote_get_trace_state_variable_value)
6234         (remote_save_trace_data, remote_get_raw_trace_data)
6235         (remote_set_disconnected_tracing, remote_core_of_thread)
6236         (remote_set_circular_trace_buffer, remote_traceframe_info)
6237         (remote_get_min_fast_tracepoint_insn_len)
6238         (remote_set_trace_buffer_size, remote_set_trace_notes)
6239         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6240         (remote_disable_btrace, remote_teardown_btrace)
6241         (remote_read_btrace, remote_btrace_conf)
6242         (remote_augmented_libraries_svr4_read, remote_load)
6243         (remote_pid_to_exec_file, remote_can_do_single_step)
6244         (remote_execution_direction, remote_thread_handle_to_thread_info):
6245         Refactor as methods of remote_target.
6246         (init_remote_ops, init_extended_remote_ops): Delete.
6247         (remote_can_async_p, remote_is_async_p, remote_async)
6248         (remote_thread_events, remote_upload_tracepoints)
6249         (remote_upload_trace_state_variables): Refactor as methods of
6250         remote_target.
6251         (_initialize_remote): Remove references to init_remote_ops and
6252         init_extended_remote_ops.
6253
6254         * remote-sim.c (gdbsim_target): New class.
6255         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6256         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6257         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6258         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6259         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6260         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6261         Refactor as methods of gdbsim_target.
6262         (gdbsim_ops): Now a gdbsim_target.
6263         (init_gdbsim_ops): Delete.
6264         (gdbsim_cntrl_c): Adjust.
6265         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6266
6267         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6268         (the_amd64_linux_nat_target): New.
6269         (amd64_linux_fetch_inferior_registers)
6270         (amd64_linux_store_inferior_registers): Refactor as methods of
6271         amd64_linux_nat_target.
6272         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
6273         * i386-linux-nat.c: Don't include "linux-nat.h".
6274         (i386_linux_nat_target): New class.
6275         (the_i386_linux_nat_target): New.
6276         (i386_linux_fetch_inferior_registers)
6277         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6278         as methods of i386_linux_nat_target.
6279         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
6280         * inf-child.c (inf_child_ops): Delete.
6281         (inf_child_fetch_inferior_registers)
6282         (inf_child_store_inferior_registers): Delete.
6283         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6284         methods of inf_child_target.
6285         (inf_child_target::supports_terminal_ours)
6286         (inf_child_target::terminal_init)
6287         (inf_child_target::terminal_inferior)
6288         (inf_child_target::terminal_ours_for_output)
6289         (inf_child_target::terminal_ours, inf_child_target::interrupt)
6290         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6291         New.
6292         (inf_child_open, inf_child_disconnect, inf_child_close)
6293         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6294         (inf_child_post_startup_inferior, inf_child_can_run)
6295         (inf_child_pid_to_exec_file): Refactor as methods of
6296         inf_child_target.
6297         (inf_child_follow_fork): Delete.
6298         (inf_child_target::can_create_inferior)
6299         (inf_child_target::can_attach): New.
6300         (inf_child_target::has_all_memory, inf_child_target::has_memory)
6301         (inf_child_target::has_stack, inf_child_target::has_registers)
6302         (inf_child_target::has_execution): New.
6303         (inf_child_fileio_open, inf_child_fileio_pwrite)
6304         (inf_child_fileio_pread, inf_child_fileio_fstat)
6305         (inf_child_fileio_close, inf_child_fileio_unlink)
6306         (inf_child_fileio_readlink, inf_child_use_agent)
6307         (inf_child_can_use_agent): Refactor as methods of
6308         inf_child_target.
6309         (return_zero, inf_child_target): Delete.
6310         (inf_child_target::inf_child_target): New.
6311         * inf-child.h: Include "target.h".
6312         (inf_child_target): Delete function prototype.
6313         (inf_child_target): New class.
6314         (inf_child_open_target, inf_child_mourn_inferior)
6315         (inf_child_maybe_unpush_target): Delete.
6316         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6317         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6318         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6319         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6320         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6321         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6322         (inf_ptrace_wait, inf_ptrace_xfer_partial)
6323         (inf_ptrace_thread_alive, inf_ptrace_files_info)
6324         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6325         methods of inf_ptrace_target.
6326         (inf_ptrace_target): Delete function.
6327         * inf-ptrace.h: Include "inf-child.h".
6328         (inf_ptrace_target): Delete function declaration.
6329         (inf_ptrace_target): New class.
6330         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6331         * linux-nat.c (linux_target): New.
6332         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6333         (linux_nat_target::~linux_nat_target): New.
6334         (linux_child_post_attach, linux_child_post_startup_inferior)
6335         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6336         (linux_child_remove_fork_catchpoint)
6337         (linux_child_insert_vfork_catchpoint)
6338         (linux_child_remove_vfork_catchpoint)
6339         (linux_child_insert_exec_catchpoint)
6340         (linux_child_remove_exec_catchpoint)
6341         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6342         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6343         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6344         (linux_nat_stopped_data_address)
6345         (linux_nat_stopped_by_sw_breakpoint)
6346         (linux_nat_supports_stopped_by_sw_breakpoint)
6347         (linux_nat_stopped_by_hw_breakpoint)
6348         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6349         (linux_nat_kill, linux_nat_mourn_inferior)
6350         (linux_nat_xfer_partial, linux_nat_thread_alive)
6351         (linux_nat_update_thread_list, linux_nat_pid_to_str)
6352         (linux_nat_thread_name, linux_child_pid_to_exec_file)
6353         (linux_child_static_tracepoint_markers_by_strid)
6354         (linux_nat_is_async_p, linux_nat_can_async_p)
6355         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6356         (linux_nat_supports_multi_process)
6357         (linux_nat_supports_disable_randomization, linux_nat_async)
6358         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6359         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6360         (linux_nat_fileio_open, linux_nat_fileio_readlink)
6361         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6362         methods of linux_nat_target.
6363         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6364         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6365         parameter.
6366         (check_stopped_by_watchpoint): Adjust.
6367         (linux_xfer_partial): Delete.
6368         (linux_target_install_ops, linux_target, linux_nat_add_target):
6369         Delete.
6370         (linux_nat_target::linux_nat_target): New.
6371         * linux-nat.h: Include "inf-ptrace.h".
6372         (linux_nat_target): New.
6373         (linux_target, linux_target_install_ops, linux_nat_add_target):
6374         Delete function declarations.
6375         (linux_target): Declare global.
6376         * linux-thread-db.c (thread_db_target): New.
6377         (thread_db_target::thread_db_target): New.
6378         (thread_db_ops): Delete.
6379         (the_thread_db_target): New.
6380         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6381         (thread_db_update_thread_list, thread_db_pid_to_str)
6382         (thread_db_extra_thread_info)
6383         (thread_db_thread_handle_to_thread_info)
6384         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6385         (thread_db_resume): Refactor as methods of thread_db_target.
6386         (init_thread_db_ops): Delete.
6387         (_initialize_thread_db): Remove reference to init_thread_db_ops.
6388         * x86-linux-nat.c: Don't include "linux-nat.h".
6389         (super_post_startup_inferior): Delete.
6390         (x86_linux_nat_target::~x86_linux_nat_target): New.
6391         (x86_linux_child_post_startup_inferior)
6392         (x86_linux_read_description, x86_linux_enable_btrace)
6393         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6394         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6395         methods of x86_linux_nat_target.
6396         (x86_linux_create_target): Delete.  Bits folded ...
6397         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
6398         pointer.
6399         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6400         (x86_linux_nat_target): New class.
6401         (x86_linux_create_target): Delete.
6402         (x86_linux_add_target): Now takes a linux_nat_target pointer.
6403         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6404         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6405         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6406         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6407         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6408         make extern.
6409         (x86_use_watchpoints): Delete.
6410         * x86-nat.h: Include "breakpoint.h" and "target.h".
6411         (x86_use_watchpoints): Delete.
6412         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6413         (x86_stopped_by_watchpoint, x86_stopped_data_address)
6414         (x86_insert_watchpoint, x86_remove_watchpoint)
6415         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6416         (x86_stopped_by_hw_breakpoint): New declarations.
6417         (x86_nat_target): New template class.
6418
6419         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6420         (the_ppc_linux_nat_target): New.
6421         (ppc_linux_fetch_inferior_registers)
6422         (ppc_linux_can_use_hw_breakpoint)
6423         (ppc_linux_region_ok_for_hw_watchpoint)
6424         (ppc_linux_ranged_break_num_registers)
6425         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6426         (ppc_linux_insert_mask_watchpoint)
6427         (ppc_linux_remove_mask_watchpoint)
6428         (ppc_linux_can_accel_watchpoint_condition)
6429         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6430         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6431         (ppc_linux_watchpoint_addr_within_range)
6432         (ppc_linux_masked_watch_num_registers)
6433         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6434         (ppc_linux_read_description): Refactor as methods of
6435         ppc_linux_nat_target.
6436         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
6437
6438         * procfs.c (procfs_xfer_partial): Delete forward declaration.
6439         (procfs_target): New class.
6440         (the_procfs_target): New.
6441         (procfs_target): Delete function.
6442         (procfs_auxv_parse, procfs_attach, procfs_detach)
6443         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6444         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6445         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6446         (procfs_create_inferior, procfs_update_thread_list)
6447         (procfs_thread_alive, procfs_pid_to_str)
6448         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6449         (procfs_stopped_data_address, procfs_insert_watchpoint)
6450         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6451         (proc_find_memory_regions, procfs_info_proc)
6452         (procfs_make_note_section): Refactor as methods of procfs_target.
6453         (_initialize_procfs): Adjust.
6454         * sol-thread.c (sol_thread_target): New class.
6455         (sol_thread_ops): Now a sol_thread_target.
6456         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6457         (sol_thread_fetch_registers, sol_thread_store_registers)
6458         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6459         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6460         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6461         (init_sol_thread_ops): Delete.
6462         (_initialize_sol_thread): Adjust.  Remove references to
6463         init_sol_thread_ops and complete_target_initialization.
6464
6465         * windows-nat.c (windows_nat_target): New class.
6466         (windows_fetch_inferior_registers)
6467         (windows_store_inferior_registers, windows_resume, windows_wait)
6468         (windows_attach, windows_detach, windows_pid_to_exec_file)
6469         (windows_files_info, windows_create_inferior)
6470         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6471         (windows_close, windows_pid_to_str, windows_xfer_partial)
6472         (windows_get_tib_address, windows_get_ada_task_ptid)
6473         (windows_thread_name, windows_thread_alive): Refactor as
6474         windows_nat_target methods.
6475         (do_initial_windows_stuff): Adjust.
6476         (windows_target): Delete function.
6477         (_initialize_windows_nat): Adjust.
6478
6479         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6480         (darwin_mourn_inferior, darwin_kill_inferior)
6481         (darwin_create_inferior, darwin_attach, darwin_detach)
6482         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6483         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6484         (darwin_supports_multi_process): Refactor as darwin_nat_target
6485         methods.
6486         (darwin_resume_to, darwin_files_info): Delete.
6487         (_initialize_darwin_inferior): Rename to ...
6488         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
6489         * darwin-nat.h: Include "inf-child.h".
6490         (darwin_nat_target): New class.
6491         (darwin_complete_target): Delete.
6492         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6493         (darwin_target): New.
6494         (i386_darwin_fetch_inferior_registers)
6495         (i386_darwin_store_inferior_registers): Refactor as methods of
6496         darwin_nat_target.
6497         (darwin_complete_target): Delete, with ...
6498         (_initialize_i386_darwin_nat): ... bits factored out here.
6499
6500         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6501         (the_alpha_linux_nat_target): New.
6502         (alpha_linux_register_u_offset): Refactor as
6503         alpha_linux_nat_target method.
6504         (_initialize_alpha_linux_nat): Adjust.
6505         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6506         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6507         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6508         methods of linux_nat_trad_target.
6509         (linux_trad_target): Delete.
6510         * linux-nat-trad.h (linux_trad_target): Delete function.
6511         (linux_nat_trad_target): New class.
6512         * mips-linux-nat.c (mips_linux_nat_target): New class.
6513         (super_fetch_registers, super_store_registers, super_close):
6514         Delete.
6515         (the_mips_linux_nat_target): New.
6516         (mips64_linux_regsets_fetch_registers)
6517         (mips64_linux_regsets_store_registers)
6518         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6519         (mips_linux_register_u_offset, mips_linux_read_description)
6520         (mips_linux_can_use_hw_breakpoint)
6521         (mips_linux_stopped_by_watchpoint)
6522         (mips_linux_stopped_data_address)
6523         (mips_linux_region_ok_for_hw_watchpoint)
6524         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6525         (mips_linux_close): Refactor as methods of mips_linux_nat.
6526         (_initialize_mips_linux_nat): Adjust to C++ification.
6527
6528         * aix-thread.c (aix_thread_target): New class.
6529         (aix_thread_ops): Now an aix_thread_target.
6530         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6531         (aix_thread_fetch_registers, aix_thread_store_registers)
6532         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6533         (aix_thread_thread_alive, aix_thread_pid_to_str)
6534         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6535         Refactor as methods of aix_thread_target.
6536         (init_aix_thread_ops): Delete.
6537         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6538         and complete_target_initialization.
6539         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6540         (rs6000_nat_target): New class.
6541         (the_rs6000_nat_target): New.
6542         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6543         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6544         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6545         (super_create_inferior): Delete.
6546         (_initialize_rs6000_nat): Adjust to C++ification.
6547
6548         * arm-linux-nat.c (arm_linux_nat_target): New class.
6549         (the_arm_linux_nat_target): New.
6550         (arm_linux_fetch_inferior_registers)
6551         (arm_linux_store_inferior_registers, arm_linux_read_description)
6552         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6553         (arm_linux_remove_hw_breakpoint)
6554         (arm_linux_region_ok_for_hw_watchpoint)
6555         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6556         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6557         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6558         arm_linux_nat_target.
6559         (_initialize_arm_linux_nat): Adjust to C++ification.
6560
6561         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6562         (the_aarch64_linux_nat_target): New.
6563         (aarch64_linux_fetch_inferior_registers)
6564         (aarch64_linux_store_inferior_registers)
6565         (aarch64_linux_child_post_startup_inferior)
6566         (aarch64_linux_read_description)
6567         (aarch64_linux_can_use_hw_breakpoint)
6568         (aarch64_linux_insert_hw_breakpoint)
6569         (aarch64_linux_remove_hw_breakpoint)
6570         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6571         (aarch64_linux_region_ok_for_hw_watchpoint)
6572         (aarch64_linux_stopped_data_address)
6573         (aarch64_linux_stopped_by_watchpoint)
6574         (aarch64_linux_watchpoint_addr_within_range)
6575         (aarch64_linux_can_do_single_step): Refactor as methods of
6576         aarch64_linux_nat_target.
6577         (super_post_startup_inferior): Delete.
6578         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6579
6580         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6581         (the_hppa_linux_nat_target): New.
6582         (hppa_linux_fetch_inferior_registers)
6583         (hppa_linux_store_inferior_registers): Refactor as methods of
6584         hppa_linux_nat_target.
6585         (_initialize_hppa_linux_nat): Adjust to C++ification.
6586
6587         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6588         (the_ia64_linux_nat_target): New.
6589         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6590         (ia64_linux_stopped_data_address)
6591         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6592         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6593         ia64_linux_nat_target methods.
6594         (super_xfer_partial): Delete.
6595         (_initialize_ia64_linux_nat): Adjust to C++ification.
6596
6597         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6598         (the_m32r_linux_nat_target): New.
6599         (m32r_linux_fetch_inferior_registers)
6600         (m32r_linux_store_inferior_registers): Refactor as
6601         m32r_linux_nat_target methods.
6602         (_initialize_m32r_linux_nat): Adjust to C++ification.
6603
6604         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6605         (the_m68k_linux_nat_target): New.
6606         (m68k_linux_fetch_inferior_registers)
6607         (m68k_linux_store_inferior_registers): Refactor as
6608         m68k_linux_nat_target methods.
6609         (_initialize_m68k_linux_nat): Adjust to C++ification.
6610
6611         * s390-linux-nat.c (s390_linux_nat_target): New class.
6612         (the_s390_linux_nat_target): New.
6613         (s390_linux_fetch_inferior_registers)
6614         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6615         (s390_insert_watchpoint, s390_remove_watchpoint)
6616         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6617         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6618         (s390_auxv_parse, s390_read_description): Refactor as methods of
6619         s390_linux_nat_target.
6620         (_initialize_s390_nat): Adjust to C++ification.
6621
6622         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6623         (the_sparc_linux_nat_target): New.
6624         (_initialize_sparc_linux_nat): Adjust to C++ification.
6625         * sparc-nat.c (sparc_fetch_inferior_registers)
6626         (sparc_store_inferior_registers): Remove target_ops parameter.
6627         * sparc-nat.h (sparc_fetch_inferior_registers)
6628         (sparc_store_inferior_registers): Remove target_ops parameter.
6629         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6630         (the_sparc64_linux_nat_target): New.
6631         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6632
6633         * spu-linux-nat.c (spu_linux_nat_target): New class.
6634         (the_spu_linux_nat_target): New.
6635         (spu_child_post_startup_inferior, spu_child_post_attach)
6636         (spu_child_wait, spu_fetch_inferior_registers)
6637         (spu_store_inferior_registers, spu_xfer_partial)
6638         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6639         methods.
6640         (_initialize_spu_nat): Adjust to C++ification.
6641
6642         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6643         (the_tilegx_linux_nat_target): New.
6644         (fetch_inferior_registers, store_inferior_registers):
6645         Refactor as methods.
6646         (_initialize_tile_linux_nat): Adjust to C++ification.
6647
6648         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6649         (the_xtensa_linux_nat_target): New.
6650         (xtensa_linux_fetch_inferior_registers)
6651         (xtensa_linux_store_inferior_registers): Refactor as
6652         xtensa_linux_nat_target methods.
6653         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6654
6655         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6656         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6657         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6658         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6659         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6660         (fbsd_stopped_by_sw_breakpoint)
6661         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6662         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6663         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6664         (fbsd_post_startup_inferior, fbsd_post_attach)
6665         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6666         (fbsd_set_syscall_catchpoint)
6667         (super_xfer_partial, super_resume, super_wait)
6668         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6669         (fbsd_handle_debug_trap): Remove target_ops parameter.
6670         (fbsd_nat_add_target): Delete.
6671         * fbsd-nat.h: Include "inf-ptrace.h".
6672         (fbsd_nat_add_target): Delete.
6673         (USE_SIGTRAP_SIGINFO): Define.
6674         (fbsd_nat_target): New class.
6675
6676         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6677         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6678         (amd64bsd_target): Delete.
6679         * amd64-bsd-nat.h: New file.
6680         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6681         "x86-bsd-nat.h".
6682         (amd64_fbsd_nat_target): New class.
6683         (the_amd64_fbsd_nat_target): New.
6684         (amd64fbsd_read_description): Refactor as method of
6685         amd64_fbsd_nat_target.
6686         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6687         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6688         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6689         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6690         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6691         (i386bsd_target): Delete.
6692         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6693         (i386bsd_fetch_inferior_registers)
6694         (i386bsd_store_inferior_registers): Declare.
6695         (i386_bsd_nat_target): New class.
6696         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6697         (the_i386_fbsd_nat_target): New.
6698         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6699         i386_fbsd_nat_target methods.
6700         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6701         (_initialize_i386fbsd_nat): Adjust to C++ification.
6702         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6703         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6704         (_initialize_x86_bsd_nat): Adjust to C++ification.
6705         * x86-bsd-nat.h: Include "x86-nat.h".
6706         (x86bsd_target): Delete declaration.
6707         (x86bsd_nat_target): New class.
6708
6709         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6710         (the_aarch64_fbsd_nat_target): New.
6711         (aarch64_fbsd_fetch_inferior_registers)
6712         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6713         aarch64_fbsd_nat_target.
6714         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6715         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6716         (the_alpha_bsd_nat_target): New.
6717         (alphabsd_fetch_inferior_registers)
6718         (alphabsd_store_inferior_registers): Refactor as
6719         alpha_bsd_nat_target methods.
6720         (_initialize_alphabsd_nat): Refactor as methods of
6721         alpha_bsd_nat_target.
6722         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6723         (the_amd64_nbsd_nat_target): New.
6724         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6725         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6726         (the_amd64_obsd_nat_target): New.
6727         (_initialize_amd64obsd_nat): Adjust to C++ification.
6728         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6729         (the_arm_fbsd_nat_target): New.
6730         (arm_fbsd_fetch_inferior_registers)
6731         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6732         (_initialize_arm_fbsd_nat): Refactor as methods of
6733         arm_fbsd_nat_target.
6734         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6735         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6736         (the_arm_netbsd_nat_target): New.
6737         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6738         arm_netbsd_nat_target.
6739         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6740         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6741         (the_hppa_nbsd_nat_target): New.
6742         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6743         hppa_nbsd_nat_target methods.
6744         (_initialize_hppanbsd_nat): Adjust to C++ification.
6745         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6746         (the_hppa_obsd_nat_target): New.
6747         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6748         methods of hppa_obsd_nat_target.
6749         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6750         add_target.
6751         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6752         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6753         add_target.
6754         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6755         (_initialize_i386obsd_nat): Use add_target.
6756         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6757         (the_m68k_bsd_nat_target): New.
6758         (m68kbsd_fetch_inferior_registers)
6759         (m68kbsd_store_inferior_registers): Refactor as methods of
6760         m68k_bsd_nat_target.
6761         (_initialize_m68kbsd_nat): Adjust to C++ification.
6762         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6763         (the_mips_fbsd_nat_target): New.
6764         (mips_fbsd_fetch_inferior_registers)
6765         (mips_fbsd_store_inferior_registers): Refactor as methods of
6766         mips_fbsd_nat_target.
6767         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6768         add_target.
6769         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6770         (the_mips_nbsd_nat_target): New.
6771         (mipsnbsd_fetch_inferior_registers)
6772         (mipsnbsd_store_inferior_registers): Refactor as methods of
6773         mips_nbsd_nat_target.
6774         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6775         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6776         (the_mips64_obsd_nat_target): New.
6777         (mips64obsd_fetch_inferior_registers)
6778         (mips64obsd_store_inferior_registers): Refactor as methods of
6779         mips64_obsd_nat_target.
6780         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6781         add_target.
6782         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6783         nbsd_nat_target.
6784         * nbsd-nat.h: Include "inf-ptrace.h".
6785         (nbsd_nat_target): New class.
6786         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6787         (obsd_wait): Refactor as methods of obsd_nat_target.
6788         (obsd_add_target): Delete.
6789         * obsd-nat.h: Include "inf-ptrace.h".
6790         (obsd_nat_target): New class.
6791         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6792         (the_ppc_fbsd_nat_target): New.
6793         (ppcfbsd_fetch_inferior_registers)
6794         (ppcfbsd_store_inferior_registers): Refactor as methods of
6795         ppc_fbsd_nat_target.
6796         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6797         add_target.
6798         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6799         (the_ppc_nbsd_nat_target): New.
6800         (ppcnbsd_fetch_inferior_registers)
6801         (ppcnbsd_store_inferior_registers): Refactor as methods of
6802         ppc_nbsd_nat_target.
6803         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6804         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6805         (the_ppc_obsd_nat_target): New.
6806         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6807         methods of ppc_obsd_nat_target.
6808         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6809         add_target.
6810         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6811         (the_sh_nbsd_nat_target): New.
6812         (shnbsd_fetch_inferior_registers)
6813         (shnbsd_store_inferior_registers): Refactor as methods of
6814         sh_nbsd_nat_target.
6815         (_initialize_shnbsd_nat): Adjust to C++ification.
6816         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6817         (inf_ptrace_xfer_partial): Delete.
6818         (sparc_xfer_partial, sparc_target): Delete.
6819         * sparc-nat.h (sparc_fetch_inferior_registers)
6820         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6821         (sparc_target): Delete function declaration.
6822         (sparc_target): New template class.
6823         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6824         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6825         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6826         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6827         add_target.
6828         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6829         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6830         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6831         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6832         add_target.
6833         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6834         (the_vax_bsd_nat_target): New.
6835         (vaxbsd_fetch_inferior_registers)
6836         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6837         methods.
6838         (_initialize_vaxbsd_nat): Adjust to C++ification.
6839
6840         * bsd-kvm.c (bsd_kvm_target): New class.
6841         (bsd_kvm_ops): Now a bsd_kvm_target.
6842         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6843         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6844         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6845         bsd_kvm_target.
6846         (bsd_kvm_return_one): Delete.
6847         (bsd_kvm_add_target): Adjust to C++ification.
6848
6849         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6850         (nto_procfs_target_procfs): New classes.
6851         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6852         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6853         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6854         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6855         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6856         (procfs_remove_hw_breakpoint, procfs_resume)
6857         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6858         (procfs_kill_inferior, procfs_store_registers)
6859         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6860         as methods of nto_procfs_target.
6861         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6862         (nto_native_ops): Delete.
6863         (procfs_open, procfs_native_open): Delete.
6864         (nto_native_ops): Now an nto_procfs_target_native.
6865         (init_procfs_targets): Adjust to C++ification.
6866         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6867         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6868         Refactor as methods of nto_procfs_target.
6869
6870         * go32-nat.c (go32_nat_target): New class.
6871         (the_go32_nat_target): New.
6872         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6873         (go32_store_registers, go32_xfer_partial, go32_files_info)
6874         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6875         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6876         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6877         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6878         (go32_target): Delete.
6879         (_initialize_go32_nat): Adjust to C++ification.
6880
6881         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6882         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6883         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6884         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6885         gnu_nat_target.
6886         (gnu_target): Delete.
6887         * gnu-nat.h (gnu_target): Delete.
6888         (gnu_nat_target): New class.
6889         * i386-gnu-nat.c (gnu_base_target): New.
6890         (i386_gnu_nat_target): New class.
6891         (the_i386_gnu_nat_target): New.
6892         (_initialize_i386gnu_nat): Adjust to C++ification.
6893
6894 2018-05-02  Pedro Alves  <palves@redhat.com>
6895
6896         * bfd-target.c (target_bfd_xclose): Rename to ...
6897         (target_bfd_close): ... this.
6898         (target_bfd_reopen): Adjust.
6899         * target.c (target_close): Remove references to to_xclose.
6900         * target.h (target_ops::to_xclose): Delete.
6901         (target_ops::to_close): Update comments.
6902
6903 2018-05-02  Pedro Alves  <palves@redhat.com>
6904
6905         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6906         "linux-nat.h".
6907         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6908         * inf-ptrace.c (inf_ptrace_register_u_offset)
6909         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6910         (inf_ptrace_store_register, inf_ptrace_store_registers)
6911         (inf_ptrace_trad_target): Move to ...
6912         * linux-nat-trad.c: ... this new file.
6913         * linux-nat-trad.h: New file.
6914         * linux-nat.c (linux_target_install_ops): Make extern.
6915         (linux_trad_target): Delete.
6916         * linux-nat.h (linux_trad_target): Delete declaration.
6917         (linux_target_install_ops): Declare.
6918         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6919         "linux-nat.h".
6920
6921 2018-05-02  Pedro Alves  <palves@redhat.com>
6922
6923         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6924         procfs_target/add_target here.
6925         * procfs.c (procfs_target): Make static.
6926         (_initialize_procfs): Call add_target here.
6927         * procfs.h (struct target_ops): Remove forward declaration.
6928         (procfs_target): Remove declaration.
6929         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6930
6931 2018-05-02  Pedro Alves  <palves@redhat.com>
6932
6933         * procfs.c (procfs_stopped_by_watchpoint)
6934         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6935         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6936         Forward declare.
6937         (procfs_use_watchpoints): Delete, move contents...
6938         (procfs_target): ... here.
6939         * procfs.h (procfs_use_watchpoints): Delete declaration.
6940         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6941         procfs_use_watchpoints.
6942         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6943         procfs_use_watchpoints.
6944
6945 2018-05-02  Tom Tromey  <tom@tromey.com>
6946
6947         PR python/20084:
6948         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6949         and var_zuinteger_unlimited.
6950         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6951         and PARAM_ZUINTEGER_UNLIMITED.
6952         (set_parameter_value): Handle var_zuinteger and
6953         var_zuinteger_unlimited.
6954         (add_setshow_generic): Likewise.
6955         (parmpy_init): Likewise.
6956
6957 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6958
6959         PR rust/23124
6960         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6961         pointer is not null before dereferencing it.
6962
6963 2018-04-30  Tom Tromey  <tom@tromey.com>
6964
6965         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6966         is_mi_like_p.
6967
6968 2018-04-30  Tom Tromey  <tom@tromey.com>
6969
6970         * breakpoint.c (mention): Remove use of is_mi_like_p.
6971         (print_mention_ranged_breakpoint): Likewise.
6972         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6973         of is_mi_like_p.
6974
6975 2018-04-30  Tom Tromey  <tom@tromey.com>
6976
6977         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6978
6979 2018-04-30  Tom Tromey  <tom@tromey.com>
6980
6981         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6982         (info_spu_event_command): Remove some uses of is_mi_like_p.
6983
6984 2018-04-30  Tom Tromey  <tom@tromey.com>
6985
6986         * python/py-framefilter.c (py_print_single_arg)
6987         (enumerate_locals, py_print_args, py_print_frame): Remove some
6988         uses of is_mi_like_p.
6989
6990 2018-04-30  Tom Tromey  <tom@tromey.com>
6991
6992         * ui-out.c: Update.
6993         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6994         * ui-out.h (ui_out::is_mi_like_p): Now const.
6995         (ui_out::do_is_mi_like_p): Now const.
6996         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6997
6998 2018-04-30  Tom Tromey  <tom@tromey.com>
6999
7000         * varobj.c (varobj_set_visualizer): Use new_reference.
7001         * python/python.c (gdbpy_decode_line): Use new_reference.
7002         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7003         new_reference.
7004
7005 2018-04-30  Tom Tromey  <tom@tromey.com>
7006
7007         * varobj.c (install_new_value): Use new_reference.
7008         * value.h (value_incref): Return void.  Swap intro comment with
7009         value_decref.
7010         * value.c (set_value_parent): Use new_reference.
7011         (value_incref): Return void.  Update intro comment.
7012         (release_value): Use new_reference.
7013         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7014
7015 2018-04-30  Tom Tromey  <tom@tromey.com>
7016
7017         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7018         * gdb_bfd.h (new_bfd_ref): Remove.
7019         (gdb_bfd_open): Update comment.
7020         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7021         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7022         (gdb_bfd_fdopenr): Use new_reference.
7023         * exec.c (exec_file_attach): Use new_reference.
7024
7025 2018-04-30  Tom Tromey  <tom@tromey.com>
7026
7027         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7028         method.
7029
7030 2018-04-30  Tom Tromey  <tom@tromey.com>
7031
7032         * jit.c (jit_read_code_entry): Use type_align.
7033         * i386-tdep.c (i386_gdbarch_init): Don't call
7034         set_gdbarch_long_long_align_bit.
7035         * gdbarch.sh: Remove long_long_align_bit.
7036         * gdbarch.c, gdbarch.h: Rebuild.
7037         * arc-tdep.c (arc_type_align): New function.
7038         (arc_gdbarch_init): Use arc_type_align.  Don't call
7039         set_gdbarch_long_long_align_bit.
7040
7041 2018-04-30  Tom Tromey  <tom@tromey.com>
7042
7043         * rust-lang.c (rust_type_alignment): Remove.
7044         (rust_composite_type): Use type_align.
7045
7046 2018-04-30  Tom Tromey  <tom@tromey.com>
7047
7048         * NEWS: Mention Type.align.
7049         * python/py-type.c (typy_get_alignof): New function.
7050         (type_object_getset): Add "alignof".
7051
7052 2018-04-30  Tom Tromey  <tom@tromey.com>
7053
7054         PR exp/17095:
7055         * NEWS: Update.
7056         * std-operator.def (UNOP_ALIGNOF): New operator.
7057         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7058         New.
7059         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7060         * c-lang.c (c_op_print_tab): Add alignof.
7061         * c-exp.y (ALIGNOF): New token.
7062         (exp): Add "ALIGNOF" production.
7063         (ident_tokens): Add _Alignof and alignof.
7064
7065 2018-04-30  Tom Tromey  <tom@tromey.com>
7066
7067         * i386-tdep.c (i386_type_align): New function.
7068         (i386_gdbarch_init): Update.
7069         * gdbarch.sh (type_align): New method.
7070         * gdbarch.c, gdbarch.h: Rebuild.
7071         * arch-utils.h (default_type_align): Declare.
7072         * arch-utils.c (default_type_align): New function.
7073         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7074         (struct type) <align_log2>: New field.
7075         <instance_flags>: Now a bitfield.
7076         (TYPE_RAW_ALIGN): New macro.
7077         (type_align, type_raw_align, set_type_align): Declare.
7078         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7079         functions.
7080         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7081         (get_alignment, maybe_set_alignment): New functions.
7082         (read_structure_type, read_enumeration_type, read_array_type)
7083         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7084         (read_subrange_type, read_base_type): Set type alignment.
7085
7086 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7087
7088         * dwarf2read.c (read_index_from_section): Use bool.
7089
7090 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7091
7092         PR gdb/22950
7093         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7094         with #ifdef.
7095
7096 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7097
7098         PR build/22873
7099         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7100         last step, and do it atomically.
7101
7102 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7103
7104         * compile/compile-c-types.c (convert_int, convert_float):
7105         Update for C FE v1.
7106
7107 2018-04-27  Tom Tromey  <tom@tromey.com>
7108
7109         PR rust/22545:
7110         * rust-lang.c (rust_inclusive_range_type_p): New function.
7111         (rust_range): Handle inclusive ranges.
7112         (rust_compute_range): Likewise.
7113         * rust-exp.y (struct rust_op) <inclusive>: New field.
7114         (DOTDOTEQ): New constant.
7115         (range_expr): Add "..=" productions.
7116         (operator_tokens): Add "..=" token.
7117         (ast_range): Add "inclusive" parameter.
7118         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7119         ranges.
7120         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7121         bounds values.
7122         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7123         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7124         Update comments.
7125         * expprint.c (print_subexp_standard): Handle new bounds values.
7126         (dump_subexp_body_standard): Likewise.
7127
7128 2018-04-27  Tom Tromey  <tom@tromey.com>
7129
7130         * configure: Rebuild.
7131         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7132         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7133         "OVERRIDE".
7134         (class symbol_needs_eval_context): Likewise.
7135         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7136         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7137         "virtual".
7138         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7139         "override".
7140         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7141         * aarch64-tdep.c (instruction_reader::read): Use "override".
7142         (instruction_reader_test::read): Likewise.
7143         * arm-tdep.c (instruction_reader::read): Use "override".
7144         (instruction_reader_thumb::read): Likewise.
7145
7146 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7147
7148         PR remote/9665
7149         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7150         instead of remote_send.
7151         (remote_send): Remove.
7152
7153 2018-04-26  Pedro Alves  <palves@redhat.com>
7154
7155         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7156         find_function_start_sal instead of find_pc_line.
7157
7158 2018-04-26  Pedro Alves  <palves@redhat.com>
7159
7160         * breakpoint.c (set_breakpoint_location_function): Handle
7161         mst_data_gnu_ifunc.
7162         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7163         * elfread.c (elf_symtab_read): Give data symbols with
7164         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7165         (elf_rel_plt_read): Update comment.
7166         * linespec.c (convert_linespec_to_sals): Handle
7167         mst_data_gnu_ifunc.
7168         (minsym_found): Handle mst_data_gnu_ifunc.
7169         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7170         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7171         * parse.c (find_minsym_type_and_address): Handle
7172         mst_data_gnu_ifunc.
7173         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7174         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7175         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7176         comment.
7177         <mst_data_gnu_ifunc>: New enumerator.
7178
7179 2018-04-26  Pedro Alves  <palves@redhat.com>
7180
7181         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7182         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
7183         'want_trampoline' parameter by a lookup_msym_prefer parameter.
7184         Handle it.
7185         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7186         (lookup_minimal_symbol_by_pc): Adjust.
7187         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7188         (lookup_solib_trampoline_symbol_by_pc): Adjust.
7189         * minsyms.h (lookup_msym_prefer): New enum.
7190         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7191         parameter by a lookup_msym_prefer parameter.
7192
7193 2018-04-26  Pedro Alves  <palves@redhat.com>
7194
7195         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7196         ends in "@plt" instead of looking at the symbol's section.
7197
7198 2018-04-26  Pedro Alves  <palves@redhat.com>
7199
7200         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
7201         all references.
7202         (find_pc_partial_function_gnu_ifunc): Rename to ...
7203         (find_pc_partial_function): ... this, and remove references to
7204         'is_gnu_ifunc_p'.
7205         (find_pc_partial_function): Delete old implementation.
7206         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7207
7208 2018-04-26  Pedro Alves  <palves@redhat.com>
7209
7210         * linespec.c (struct bound_minimal_symbol_search_key): New.
7211         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
7212         skip first line if we found a GNU ifunc minimal symbol by name.
7213         (compare_msymbols): Change parameters to work with a destructured
7214         lhs minsym.
7215         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7216         functions.
7217
7218 2018-04-26  Pedro Alves  <palves@redhat.com>
7219
7220         * breakpoint.c (set_breakpoint_location_function): Don't resolve
7221         ifunc targets here.  Instead, if we have an ifunc minsym, use its
7222         address/name.
7223         (add_location_to_breakpoint): Store the minsym and the objfile in
7224         the breakpoint location.
7225         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7226         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7227         Record the minsym in the sal.
7228         * symtab.h (symtab_and_line) <msymbol>: New field.
7229
7230 2018-04-26  Pedro Alves  <palves@redhat.com>
7231
7232         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7233         unless we actually resolved the ifunc.
7234
7235 2018-04-26  Pedro Alves  <palves@redhat.com>
7236
7237         * c-exp.y (variable production): Prefer ifunc minsyms over
7238         regular function symbols.
7239         * symtab.c (find_gnu_ifunc): New function.
7240         * minsyms.h (lookup_msym_prefer): New enum.
7241         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7242         parameter by a lookup_msym_prefer parameter.
7243         * symtab.h (find_gnu_ifunc): New declaration.
7244
7245 2018-04-26  Pedro Alves  <palves@redhat.com>
7246
7247         * blockframe.c (find_gnu_ifunc_target_type): New function.
7248         (find_function_type): New.
7249         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7250         return a value with a memory address.
7251         (eval_call): For calls to GNU ifunc functions, try to find the
7252         type of the target function from the type that the resolver
7253         returns.
7254         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7255         symbols.
7256         * infcall.c (find_function_return_type): Delete.
7257         (find_function_addr): Add 'function_type' parameter.  For calls to
7258         GNU ifunc functions, try to find the type of the target function
7259         from the type that the resolver returns, and return it via
7260         FUNCTION_TYPE.
7261         (call_function_by_hand_dummy): Adjust to use the function type
7262         returned by find_function_addr.
7263         (find_function_addr): Add 'function_type' parameter and move
7264         description here.
7265         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7266         declarations.
7267
7268 2018-04-26  Pedro Alves  <palves@redhat.com>
7269
7270         * c-exp.y (variable production): Skip finding an alias for ifunc
7271         symbols.
7272
7273 2018-04-26  Pedro Alves  <palves@redhat.com>
7274
7275         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7276
7277 2018-04-25  Pedro Alves  <palves@redhat.com>
7278
7279         * infcmd.c (kill_command): Print the pid as string, not the whole
7280         thread's ptid.  Add comment.  s/has been killed/killed/ in output
7281         message.
7282         * remote.c (remote_detach_1): Print the pid as string, not the
7283         whole thread's ptid.
7284
7285 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7286             Sergio Durigan Junior  <sergiodj@redhat.com>
7287             Pedro Alves  <palves@redhat.com>
7288
7289         * infcmd.c (kill_command): Print message when inferior has
7290         been killed.
7291         * inferior.c (print_inferior_events): Remove 'static'.  Set as
7292         '1'.
7293         (add_inferior): Improve message printed when
7294         'print_inferior_events' is on.
7295         (exit_inferior): Remove message printed when
7296         'print_inferior_events' is on.
7297         (detach_inferior): Improve message printed when
7298         'print_inferior_events' is on.
7299         (initialize_inferiors): Use 'add_inferior_silent' to set
7300         'current_inferior_'.
7301         * inferior.h (print_inferior_events): Declare here as
7302         'extern'.
7303         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7304         '[Detaching...]' messages when 'print_inferior_events' is on.
7305         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
7306         as prefix/suffix for messages.  Remove periods.  Fix erroneous
7307         'Detaching after fork from child...', replace it by '... from
7308         parent...'.
7309         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7310         prefix/suffix when printing 'Detaching...' messages.  Print
7311         them when 'print_inferior_events' is on.
7312         * remote.c (remote_detach_1): Print message when detaching
7313         from inferior and '!is_fork_parent'.
7314
7315 2018-04-24  Tom Tromey  <tom@tromey.com>
7316
7317         * cli-out.h: Reindent.
7318
7319 2018-04-24  Tom Tromey  <tom@tromey.com>
7320
7321         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7322         (cli_ui_out::do_field_string): Use fputs_filtered.
7323         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7324
7325 2018-04-23  Tom Tromey  <tom@tromey.com>
7326
7327         * guile/scm-frame.c (gdbscm_frame_read_var): Use
7328         gdb::unique_xmalloc_ptr.
7329
7330 2018-04-23  Tom Tromey  <tom@tromey.com>
7331
7332         * configure: Rebuild.
7333
7334 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
7335
7336         PR gdb/23095
7337         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7338         prepare_for_testing.  Set normal_bp to r_debug_state if target
7339         is bsd.
7340
7341 2018-04-21  Pedro Alves  <palves@redhat.com>
7342             Rajendra SY  <rajendra.sy@gmail.com>
7343
7344         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7345         * remote.c (extended_remote_attach): In all-stop mode, mark the
7346         thread as executing.
7347
7348 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7349
7350         * thread.c (thread_apply_all_command): Fix comment.
7351         (thread_command): Fix comment.
7352
7353 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
7354
7355         * common/tdesc.h (tdesc_create_feature): Remove xml filename
7356         parameter.
7357         * features/aarch64-core.c (create_feature_aarch64_core):
7358         Regenerate.
7359         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7360         Likewise.
7361         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7362         Likewise.
7363         * features/i386/32bit-avx512.c
7364         (create_feature_i386_32bit_avx512): Likewise.
7365         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7366         Likewise.
7367         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7368         Likewise.
7369         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7370         Likewise.
7371         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7372         Likewise.
7373         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7374         Likewise.
7375         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7376         Likewise.
7377         * features/i386/64bit-avx512.c
7378         (create_feature_i386_64bit_avx512): Likewise.
7379         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7380         Likewise.
7381         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7382         Likewise.
7383         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7384         Likewise.
7385         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7386         Likewise.
7387         * features/i386/64bit-segments.c
7388         (create_feature_i386_64bit_segments): Likewise.
7389         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7390         Likewise.
7391         * features/i386/x32-core.c
7392         (create_feature_i386_x32_core): Likewise.
7393         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7394         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7395         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7396         * target-descriptions.c: In generated code, don't pass xml
7397         filename.
7398
7399 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7400
7401         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7402         (print_xml_feature::visit_post): Likewise.
7403         (print_xml_feature::visit): Likewise.
7404         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7405         (print_xml_feature): Add new class.
7406         * regformats/regdat.sh: Null xmltarget on feature targets.
7407         * target-descriptions.c (struct target_desc): Add xmltarget.
7408         (maintenance_check_tdesc_xml_convert): Add unittest function.
7409         (tdesc_get_features_xml): Add function to get xml.
7410         (maintenance_check_xml_descriptions): Test xml generation.
7411         * xml-tdesc.c (string_read_description_xml): Add function.
7412         * xml-tdesc.h (string_read_description_xml): Add declaration.
7413
7414 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7415
7416         * features/Makefile: Add feature marker to targets with new style
7417         target descriptions.
7418         * regformats/aarch64.dat: Regenerate.
7419         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7420         * regformats/i386/amd64-avx-linux.dat: Likewise.
7421         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7422         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7423         * regformats/i386/amd64-linux.dat: Likewise.
7424         * regformats/i386/amd64-mpx-linux.dat: Likewise.
7425         * regformats/i386/amd64.dat: Likewise.
7426         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7427         * regformats/i386/i386-avx-linux.dat: Likewise.
7428         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7429         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7430         * regformats/i386/i386-linux.dat: Likewise.
7431         * regformats/i386/i386-mmx-linux.dat: Likewise.
7432         * regformats/i386/i386-mpx-linux.dat: Likewise.
7433         * regformats/i386/i386.dat: Likewise.
7434         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7435         * regformats/i386/x32-avx-linux.dat: Likewise.
7436         * regformats/i386/x32-linux.dat: Likewise.
7437         * regformats/tic6x-c62x-linux.dat: Likewise.
7438         * regformats/tic6x-c64x-linux.dat: Likewise.
7439         * regformats/tic6x-c64xp-linux.dat: Likewise.
7440         * regformats/regdat.sh: Parse feature marker.
7441
7442 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7443
7444         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7445         (tdesc_osabi_name): Likewise.
7446         * target-descriptions.c (tdesc_architecture_name): Add new
7447         function.
7448         (tdesc_osabi_name): Likewise.
7449
7450 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7451
7452         * common/tdesc.c (tdesc_predefined_type): Move to here.
7453         (tdesc_named_type): Likewise.
7454         (tdesc_create_vector): Likewise.
7455         (tdesc_create_struct): Likewise.
7456         (tdesc_set_struct_size): Likewise.
7457         (tdesc_create_union): Likewise.
7458         (tdesc_create_flags): Likewise.
7459         (tdesc_create_enum): Likewise.
7460         (tdesc_add_field): Likewise.
7461         (tdesc_add_typed_bitfield): Likewise.
7462         (tdesc_add_bitfield): Likewise.
7463         (tdesc_add_flag): Likewise.
7464         (tdesc_add_enum_value): Likewise.
7465         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7466         (struct tdesc_type_vector): Likewise.
7467         (struct tdesc_type_field): Likewise.
7468         (struct tdesc_type_with_fields): Likewise.
7469         (tdesc_create_enum): Add declaration.
7470         (tdesc_add_typed_bitfield): Likewise.
7471         (tdesc_add_enum_value): Likewise.
7472         * target-descriptions.c (tdesc_type_field): Move from here.
7473         (tdesc_type_builtin): Likewise.
7474         (tdesc_type_vector): Likewise.
7475         (tdesc_type_with_fields): Likewise.
7476         (tdesc_predefined_types): Likewise.
7477         (tdesc_named_type): Likewise.
7478         (tdesc_create_vector): Likewise.
7479         (tdesc_create_struct): Likewise.
7480         (tdesc_set_struct_size): Likewise.
7481         (tdesc_create_union): Likewise.
7482         (tdesc_create_flags): Likewise.
7483         (tdesc_create_enum): Likewise.
7484         (tdesc_add_field): Likewise.
7485         (tdesc_add_typed_bitfield): Likewise.
7486         (tdesc_add_bitfield): Likewise.
7487         (tdesc_add_flag): Likewise.
7488         (tdesc_add_enum_value): Likewise.
7489         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7490         (tdesc_add_typed_bitfield): Likewise.
7491         (tdesc_add_enum_value): Likewise.
7492
7493 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7494
7495         * common/tdesc.c (tdesc_feature::accept): Move to here.
7496         (tdesc_feature::operator==): Likewise.
7497         (tdesc_create_reg): Likewise.
7498         * common/tdesc.h (tdesc_type_kind): Likewise.
7499         (struct tdesc_type): Likewise.
7500         (struct tdesc_feature): Likewise.
7501         * regformats/regdat.sh: Create a feature.
7502         * target-descriptions.c (tdesc_type_kind): Move from here.
7503         (tdesc_type): Likewise.
7504         (tdesc_type_up): Likewise.
7505         (tdesc_feature): Likewise.
7506         (tdesc_create_reg): Likewise.
7507
7508 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7509
7510         * Makefile.in: Add arch/tdesc.c
7511         * common/tdesc.c: New file.
7512         * common/tdesc.h (tdesc_element_visitor): Move to here.
7513         (tdesc_element): Likewise.
7514         (tdesc_reg): Likewise.
7515         (tdesc_reg_up): Likewise.
7516         * regformats/regdef.h (reg): Add offset to constructors.
7517         * target-descriptions.c (tdesc_element_visitor): Move from here.
7518         (tdesc_element): Likewise.
7519         (tdesc_reg): Likewise.
7520         (tdesc_reg_up): Likewise.
7521
7522 2018-04-17  Tom Tromey  <tom@tromey.com>
7523
7524         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7525         discriminant field.
7526
7527 2018-04-17  Tom Tromey  <tom@tromey.com>
7528
7529         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7530
7531 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7532
7533         * symtab.c (print_symbol_info): Skip printing filename and line
7534         number when `last' is NULL.
7535         (symtab_symbol_info): Use empty string instead of NULL for first
7536         invocation of print_symbol_info.
7537         (rbreak_command): Pass NULL to `last' parameter of
7538         print_symbol_info.
7539
7540 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
7541
7542         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7543         instead of nullptr.
7544
7545 2018-04-16  Pedro Alves  <palves@redhat.com>
7546
7547         * MAINTAINERS (sh): Remove.
7548         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7549         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7550         (ALLDEPFILES): Remove sh64-tdep.c.
7551         * NEWS: Mentions that support for SH-5/SH64 is removed.
7552         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7553         (sh*-*-openbsd*): Ditto.
7554         (sh64-*-elf*): Remove.
7555         (sh*): Remove.
7556         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7557         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7558         * sh-tdep.c: No longer include "sh64-tdep.h".
7559         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7560         * sh64-tdep.c, sh64-tdep.h: Remove files.
7561
7562 2018-04-16  Pedro Alves  <palves@redhat.com>
7563
7564         * MAINTAINERS: Remove m88k.
7565         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7566         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7567         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7568         * NEWS: Mention that support for m88k was removed.
7569         * configure.host (m88*-*-*): Remove support.
7570         * configure.nat (m88k-*-*): Remove support.
7571         * configure.tgt (m88*-*-openbsd*): Remove.
7572         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7573
7574 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
7575
7576         * configure.tgt (x86_tobjs): New variable.
7577         (amd64_tobjs, i386_tobjs): Use it.
7578
7579 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7580
7581         * symtab.c (print_symbol_info): Precede the symbol definition by
7582         the line number when available.
7583         * NEWS: Advertise this enhancement.
7584
7585 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7586
7587         * NEWS (New options): announce set/show record btrace cpu.
7588         * btrace.c: Include record-btrace.h.
7589         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7590         the vendor is unknown.
7591         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7592         Maybe overwrite the btrace configuration's cpu.
7593         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7594         (btrace_fetch): Add cpu parameter.  Update callers.
7595         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7596         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7597         errata workarounds if the vendor is unknown.
7598         * python/py-record-btrace.c: Include record-btrace.h.
7599         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7600         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7601         * record-btrace.c (record_btrace_cpu_state_kind): New.
7602         (record_btrace_cpu): New.
7603         (set_record_btrace_cpu_cmdlist): New.
7604         (record_btrace_get_cpu): New.
7605         (require_btrace_thread, record_btrace_info)
7606         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7607         (cmd_set_record_btrace_cpu_none): New.
7608         (cmd_set_record_btrace_cpu_auto): New.
7609         (cmd_set_record_btrace_cpu): New.
7610         (cmd_show_record_btrace_cpu): New.
7611         (_initialize_record_btrace): Initialize set/show record btrace cpu
7612         commands.
7613         * record-btrace.h (record_btrace_get_cpu): New.
7614
7615 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7616
7617         * record.c (set_record_command): Fix typo in message.
7618
7619 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7620
7621         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7622
7623 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7624
7625         * infrun.c (process_event_stop_test): Call
7626         gdbarch_in_indirect_branch_thunk.
7627         * gdbarch.sh (in_indirect_branch_thunk): New.
7628         * gdbarch.c: Regenerated.
7629         * gdbarch.h: Regenerated.
7630         * x86-tdep.h: New.
7631         * x86-tdep.c: New.
7632         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7633         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7634         (ALLDEPFILES): Add x86-tdep.c.
7635         * arch-utils.h (default_in_indirect_branch_thunk): New.
7636         * arch-utils.c (default_in_indirect_branch_thunk): New.
7637         * i386-tdep: Include x86-tdep.h.
7638         (i386_in_indirect_branch_thunk): New.
7639         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7640         function.
7641         * amd64-tdep: Include x86-tdep.h.
7642         (amd64_in_indirect_branch_thunk): New.
7643         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7644
7645 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7646
7647         PR gdb/23053
7648         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7649         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7650         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7651         regression.
7652
7653 2018-04-12  Tom Tromey  <tom@tromey.com>
7654
7655         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7656         (rust_evaluate_subexp): Likewise.
7657
7658 2018-04-12  Pedro Alves  <palves@redhat.com>
7659
7660         * procfs.c (procfs_detach): Make forward declaration's prototype
7661         match definition's protototype.
7662         (proc_get_LDT_entry): Remove stale do_cleanups call.
7663
7664 2018-04-12  Pedro Alves  <palves@redhat.com>
7665
7666         * target.h (target_ops::to_has_exited): Delete.
7667         (target_has_exited): Delete.
7668         * target-delegates.c: Regenerate.
7669
7670 2018-04-11  Pedro Alves  <palves@redhat.com>
7671
7672         * target.c (fileio_fh_t::t): Add comment.
7673         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7674         (target_fileio_close): Handle a NULL target.
7675         (invalidate_fileio_fh): New.
7676         (target_close): Call it.
7677         * remote.c (remote_hostio_send_command): No longer check whether
7678         remote_desc is open.
7679
7680 2018-04-11  Pedro Alves  <palves@redhat.com>
7681
7682         * target.c (fileio_fh_t): Make it a named struct instead of a
7683         typedef.
7684         (fileio_fh_t::is_closed): New method.
7685         (DEF_VEC_O (fileio_fh_t)): Remove.
7686         (fileio_fhandles): Now a std::vector.
7687         (is_closed_fileio_fh): Delete.
7688         (acquire_fileio_fd): Adjust.  Rename parameters.
7689         (release_fileio_fd): Adjust.
7690         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7691         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7692         (target_fileio_close): Adjust.
7693
7694 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7695
7696         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7697         index.
7698
7699 2018-04-10  Pedro Alves  <palves@redhat.com>
7700
7701         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7702         (scoped_finish_thread_state): New class.
7703         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7704         cleanup.
7705         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7706         (fetch_inferior_event, normal_stop): Likewise.
7707         * thread.c (finish_thread_state_cleanup): Delete.
7708
7709 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7710             Pedro Alves  <palves@redhat.com>
7711
7712         * value.c: Include "selftest.h" and "common/array-view.h".
7713         (struct range) <operator ==>: New.
7714         (test_ranges_contain): New.
7715         (check_ranges_vector): New.
7716         (test_insert_into_bit_range_vector): New.
7717         (_initialize_values): Register selftests.
7718         * common/array-view.h (operator==, operator!=): New.
7719
7720 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7721
7722         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7723         an iterator.
7724         * inline-frame.c: Include <algorithm>.
7725         (struct inline_state): Add constructor.
7726         (inline_state_s): Remove.
7727         (DEF_VEC_O(inline_state_s)): Remove.
7728         (inline_states): Change type to std::vector.
7729         (find_inline_frame_state): Adjust to std::vector.
7730         (allocate_inline_frame_state): Remove.
7731         (clear_inline_frame_state): Adjust to std::vector.
7732         (skip_inline_frames): Adjust to std::vector.
7733
7734 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7735
7736         * tracepoint.h (struct trace_state_variable): Add constructor.
7737         <name>: Change type to std::string.
7738         * tracepoint.c (tsv_s): Remove.
7739         (DEF_VEC_O(tsv_s)): Remove.
7740         (tvariables): Change to std::vector.
7741         (create_trace_state_variable): Adjust to std::vector.
7742         (find_trace_state_variable): Likewise.
7743         (find_trace_state_variable_by_number): Likewise.
7744         (delete_trace_state_variable): Likewise.
7745         (trace_variable_command): Adjust to std::string.
7746         (delete_trace_variable_command): Likewise.
7747         (tvariables_info_1): Adjust to std::vector.
7748         (save_trace_state_variables): Likewise.
7749         (start_tracing): Likewise.
7750         (merge_uploaded_trace_state_variables): Adjust to std::vector
7751         and std::string.
7752         * target.h (struct target_ops)
7753         <to_download_trace_state_variable>: Pass reference to
7754         trace_state_variable.
7755         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7756         * target-delegates.c: Re-generate.
7757         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7758         (mi_tsv_deleted): Likewise.
7759         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7760         * remote.c (remote_download_trace_state_variable): Change
7761         pointer to reference and adjust.
7762         * make-target-delegates (parse_argtypes): Handle references.
7763         (write_function_header): Likewise.
7764         (munge_type): Likewise.
7765
7766 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7767
7768         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7769         string_view-selftests.c.
7770         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7771         testsuite.
7772         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7773         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7774         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7775         * unittests/basic_string_view/element_access/char/1.cc:
7776         Likewise.
7777         * unittests/basic_string_view/element_access/char/empty.cc:
7778         Likewise.
7779         * unittests/basic_string_view/element_access/char/front_back.cc:
7780         Likewise.
7781         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7782         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7783         Likewise.
7784         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7785         Likewise.
7786         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7787         Likewise.
7788         * unittests/basic_string_view/operations/compare/char/1.cc:
7789         Likewise.
7790         * unittests/basic_string_view/operations/compare/char/13650.cc:
7791         Likewise.
7792         * unittests/basic_string_view/operations/copy/char/1.cc:
7793         Likewise.
7794         * unittests/basic_string_view/operations/data/char/1.cc:
7795         Likewise.
7796         * unittests/basic_string_view/operations/find/char/1.cc:
7797         Likewise.
7798         * unittests/basic_string_view/operations/find/char/2.cc:
7799         Likewise.
7800         * unittests/basic_string_view/operations/find/char/3.cc:
7801         Likewise.
7802         * unittests/basic_string_view/operations/find/char/4.cc:
7803         Likewise.
7804         * unittests/basic_string_view/operations/rfind/char/1.cc:
7805         Likewise.
7806         * unittests/basic_string_view/operations/rfind/char/2.cc:
7807         Likewise.
7808         * unittests/basic_string_view/operations/rfind/char/3.cc:
7809         Likewise.
7810         * unittests/basic_string_view/operations/substr/char/1.cc:
7811         Likewise.
7812         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7813         * unittests/string_view-selftests.c: New file.
7814
7815 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7816
7817         * unittests/basic_string_view/capacity/1.cc: New file.
7818         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7819         * unittests/basic_string_view/cons/char/1.cc: New file.
7820         * unittests/basic_string_view/cons/char/2.cc: New file.
7821         * unittests/basic_string_view/cons/char/3.cc: New file.
7822         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7823         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7824         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7825         * unittests/basic_string_view/element_access/char/1.cc: New file.
7826         * unittests/basic_string_view/element_access/char/2.cc: New file.
7827         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7828         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7829         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7830         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7831         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7832         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7833         * unittests/basic_string_view/include.cc: New file.
7834         * unittests/basic_string_view/inserters/char/1.cc: New file.
7835         * unittests/basic_string_view/inserters/char/2.cc: New file.
7836         * unittests/basic_string_view/inserters/char/3.cc: New file.
7837         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7838         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7839         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7840         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7841         * unittests/basic_string_view/literals/types.cc: New file.
7842         * unittests/basic_string_view/literals/values.cc: New file.
7843         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7844         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7845         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7846         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7847         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7848         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7849         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7850         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7851         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7852         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7853         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7854         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7855         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7856         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7857         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7858         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7859         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7860         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7861         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7862         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7863         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7864         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7865         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7866         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7867         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7868         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7869         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7870         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7871         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7872         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7873         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7874         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7875         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7876         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7877         * unittests/basic_string_view/operators/char/2.cc: New file.
7878         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7879         * unittests/basic_string_view/range_access/char/1.cc: New file.
7880         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7881         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7882         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7883         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7884         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7885         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7886         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7887         * unittests/basic_string_view/typedefs.cc: New file.
7888         * unittests/basic_string_view/types/1.cc: New file.
7889
7890 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7891
7892         * common/gdb_string_view.h: Remove libstdc++ implementation
7893         details, adjust to gdb reality.
7894         * common/gdb_string_view.tcc: Likewise.
7895         * cli/cli-script.c (struct string_view): Remove.
7896         (user_args) <m_args>: Change element type to gdb::string_view.
7897         (user_args::insert_args): Adjust.
7898
7899 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7900
7901         * common/gdb_string_view.h: New file.
7902         * common/gdb_string_view.tcc: New file.
7903
7904 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7905
7906         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7907         * configure: Re-generate.
7908
7909 2018-04-09  Pedro Alves  <palves@redhat.com>
7910
7911         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7912         (set_target_gdbarch): Call
7913         gdb::observers::architecture_changed.notify instead of
7914         observer_notify_architecture_changed.
7915
7916 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7917
7918         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7919         (do_restore_current_traceframe_cleanup): Remove.
7920         (restore_current_traceframe_cleanup_dtor): Remove.
7921         (make_cleanup_restore_current_traceframe): Remove.
7922         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7923         New.
7924         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7925         * infrun.c (fetch_inferior_event): Use
7926         scoped_restore_current_traceframe.
7927
7928 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7929
7930         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7931         Remove.
7932         <n_allocated_type_units>: Remove.
7933         <all_type_units>: Change to std::vector.
7934         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7935         to std::vector change.
7936         (dwarf2_per_objfile::get_cutu): Likewise.
7937         (dwarf2_per_objfile::get_tu): Likewise.
7938         (create_signatured_type_table_from_index): Likewise.
7939         (create_signatured_type_table_from_debug_names): Likewise.
7940         (dw2_symtab_iter_next): Likewise.
7941         (dw2_print_stats): Likewise.
7942         (dw2_expand_all_symtabs): Likewise.
7943         (dw2_expand_marked_cus): Likewise.
7944         (dw2_debug_names_iterator::next): Likewise.
7945         (dwarf2_initialize_objfile): Likewise.
7946         (add_signatured_type_cu_to_table): Likewise.
7947         (create_all_type_units): Likewise.
7948         (add_type_unit): Likewise.
7949         (struct tu_abbrev_offset): Add constructor.
7950         (build_type_psymtabs_1): Adjust to std::vector change.
7951         (print_tu_stats): Likewise.
7952         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7953         (write_debug_names): Likewise.
7954
7955 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7956
7957         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7958         Make an std::vector.
7959         <n_comp_units>: Remove.
7960         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7961         to std::vector change.
7962         (dwarf2_per_objfile::get_cutu): Likewise.
7963         (dwarf2_per_objfile::get_cu): Likewise.
7964         (create_cus_from_index): Likewise.
7965         (create_addrmap_from_index): Likewise.
7966         (create_addrmap_from_aranges): Likewise.
7967         (dwarf2_read_index): Likewise.
7968         (dw2_find_last_source_symtab): Likewise.
7969         (dw2_map_symtabs_matching_filename): Likewise.
7970         (dw2_symtab_iter_next): Likewise.
7971         (dw2_print_stats): Likewise.
7972         (dw2_expand_all_symtabs): Likewise.
7973         (dw2_expand_symtabs_with_fullname): Likewise.
7974         (dw2_expand_marked_cus): Likewise.
7975         (dw2_map_symbol_filenames): Likewise.
7976         (create_cus_from_debug_names): Likewise.
7977         (dwarf2_read_debug_names): Likewise.
7978         (dw2_debug_names_iterator::next): Likewise.
7979         (dwarf2_initialize_objfile): Likewise.
7980         (set_partial_user): Likewise.
7981         (dwarf2_build_psymtabs_hard): Likewise.
7982         (read_comp_units_from_section): Remove arguments, adjust to
7983         std::vector change.
7984         (create_all_comp_units): Adjust to std::vector and
7985         read_comp_units_from_section changes.
7986         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7987         change.
7988         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7989         (psyms_seen_size): Likewise.
7990         (write_gdbindex): Likewise.
7991         (write_debug_names): Likewise.
7992
7993 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7994
7995         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7996         with dwarf2_per_objfile.
7997         (create_cus_from_index): Likewise.
7998         (create_signatured_type_table_from_index): Likewise.
7999         (dwarf2_read_index): Likewise.
8000         (dwarf2_initialize_objfile): Likewise.
8001         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8002         per_cu rather than get_dwarf2_per_objfile.
8003
8004 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8005
8006         * dwarf2read.h (struct signatured_type): Forward declare.
8007         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8008         New methods.
8009         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8010         (dw2_get_cutu): ...this.
8011         (dwarf2_per_objfile::get_cu): Rename from...
8012         (dw2_get_cu): ...this.
8013         (dwarf2_per_objfile::get_tu): New.
8014         (create_addrmap_from_index): Adjust.
8015         (create_addrmap_from_aranges): Adjust.
8016         (dw2_find_last_source_symtab): Adjust.
8017         (dw2_map_symtabs_matching_filename): Adjust.
8018         (dw2_symtab_iter_next): Adjust.
8019         (dw2_print_stats): Adjust.
8020         (dw2_expand_all_symtabs): Adjust.
8021         (dw2_expand_symtabs_with_fullname): Adjust.
8022         (dw2_expand_marked_cus): Adjust.
8023         (dw_expand_symtabs_matching_file_matcher): Adjust.
8024         (dw2_map_symbol_filenames): Adjust.
8025         (dw2_debug_names_iterator::next): Adjust.
8026         (dwarf2_initialize_objfile): Adjust.
8027         (set_partial_user): Adjust.
8028         (dwarf2_build_psymtabs_hard): Adjust.
8029
8030 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8031
8032         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8033         Remove unused variables.
8034         (dw2_map_symtabs_matching_filename): Likewise.
8035         (dwarf2_record_block_ranges): Likewise.
8036         (dwarf2_read_addr_index): Likewise.
8037         (follow_die_offset): Likewise.
8038
8039 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8040
8041         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8042         to symbol_file_add_main.
8043
8044 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8045
8046         PR mi/22299
8047         * mi/mi-console.c (do_fputc_async_safe): New.
8048         (mi_console_file::write_async_safe): New.
8049         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8050         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8051         New.
8052         * ui-file.c (ui_file::putstrn): Adjust call to
8053         fputstrn_unfiltered.
8054         * utils.c (printchar): Replace do_fputs and do_fprintf
8055         parameters by do_fputc.
8056         (fputstr_filtered): Adjust call to printchar.
8057         (fputstr_unfiltered): Likewise.
8058         (fputstrn_filtered): Likewise.
8059         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8060         printchar.
8061         * utils.h (do_fputc_ftype): New typedef.
8062         (fputstrn_unfiltered): Add do_fputc parameter.
8063
8064 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8065
8066         * regformats/i386/i386-avx.dat: Remove.
8067
8068 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8069
8070         PR gdb/22979
8071         * amd64-tdep.c (amd64_none_init_abi): New function.
8072         (amd64_x32_none_init_abi): New function.
8073         (_initialize_amd64_tdep): Register handlers for x86-64 and
8074         x64_32 with GDB_OSABI_NONE.
8075         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8076         GDB_OSABI_NONE osabi.
8077
8078 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8079
8080         PR gdb/22980
8081         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8082         GDB_OSABI_NONE.
8083         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8084         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8085
8086 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8087
8088         * common/byte-vector.h (char_vector): New type.
8089         * target.h (target_read_alloc): Return
8090         gdb::optional<byte_vector>.
8091         (target_read_stralloc): Return gdb::optional<char_vector>.
8092         (target_get_osdata): Return gdb::optional<char_vector>.
8093         * target.c (target_read_alloc_1): Templatize.  Replacement
8094         manual memory management with vector.
8095         (target_read_alloc): Change return type, adjust.
8096         (target_read_stralloc): Change return type, adjust.
8097         (target_get_osdata): Change return type, adjust.
8098         * auxv.c (struct auxv_info) <length>: Remove.
8099         <data>: Change type to gdb::optional<byte_vector>.
8100         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8101         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8102         (target_auxv_search): Adjust.
8103         (fprint_target_auxv): Adjust.
8104         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8105         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8106         (linux_make_corefile_notes): Adjust.
8107         * osdata.c (get_osdata): Adjust.
8108         * remote.c (remote_get_threads_with_qxfer): Adjust.
8109         (remote_memory_map): Adjust.
8110         (remote_traceframe_info): Adjust.
8111         (btrace_read_config): Adjust.
8112         (remote_read_btrace): Adjust.
8113         (remote_pid_to_exec_file): Adjust.
8114         * solib-aix.c (solib_aix_get_library_list): Adjust.
8115         * solib-dsbt.c (decode_loadmap): Don't free buf.
8116         (dsbt_get_initial_loadmaps): Adjust.
8117         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8118         * solib-target.c (solib_target_current_sos): Adjust.
8119         * tracepoint.c (sdata_make_value): Adjust.
8120         * xml-support.c (xinclude_start_include): Adjust.
8121         (xml_fetch_content_from_file): Adjust.
8122         * xml-support.h (xml_fetch_another): Change return type.
8123         (xml_fetch_content_from_file): Change return type.
8124         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8125         * xml-tdesc.c (file_read_description_xml): Adjust.
8126         (fetch_available_features_from_target): Change return type.
8127         (target_fetch_description_xml): Adjust.
8128         (target_read_description_xml): Adjust.
8129
8130 2018-04-06  Tom Tromey  <tom@tromey.com>
8131
8132         * value.c (~value): Update.
8133         (struct value) <contents>: Now unique_xmalloc_ptr.
8134         (value_contents_bits_eq, allocate_value_contents)
8135         (value_contents_raw, value_contents_all_raw)
8136         (value_contents_for_printing, value_contents_for_printing_const)
8137         (set_value_enclosing_type): Update.
8138
8139 2018-04-06  Tom Tromey  <tom@tromey.com>
8140
8141         * value.c (range_s): Remove typedef, VEC.
8142         (struct range): Add operator<.
8143         (range_lessthan): Remove.
8144         (ranges_contain): Change type.
8145         (~value): Update.
8146         (struct value) <unavailable, optimized_out>: Now std::vector.
8147         (value_entirely_available)
8148         (value_entirely_covered_by_range_vector)
8149         (value_entirely_unavailable, value_entirely_optimized_out):
8150         Update.
8151         (insert_into_bit_range_vector): Change argument type.
8152         (find_first_range_overlap): Likewise.
8153         (struct ranges_and_idx, value_contents_bits_eq)
8154         (require_not_optimized_out, require_available): Update.
8155         (ranges_copy_adjusted): Change argument types.
8156         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8157
8158 2018-04-06  Tom Tromey  <tom@tromey.com>
8159
8160         * value.c (~value): Update.
8161         (struct value) <parent>: Now a value_ref_ptr.
8162         (value_parent, set_value_parent, value_address, value_copy):
8163         Update.
8164
8165 2018-04-06  Tom Tromey  <tom@tromey.com>
8166
8167         * value.c (struct value): Add constructor, destructor, and member
8168         initializers.
8169         (allocate_value_lazy, value_decref): Update.
8170
8171 2018-04-06  Tom Tromey  <tom@tromey.com>
8172
8173         * value.c (struct value) <released, next>: Remove.
8174         (all_values): Now a std::vector.
8175         (allocate_value_lazy): Update.
8176         (value_next): Remove.
8177         (value_mark, value_free_to_mark, release_value)
8178         (value_release_to_mark): Update.
8179
8180 2018-04-06  Tom Tromey  <tom@tromey.com>
8181
8182         * value.h (fetch_subexp_value, value_release_to_mark): Update.
8183         (free_value_chain): Remove.
8184         * value.c (free_value_chain): Remove.
8185         (value_release_to_mark): Return a std::vector.
8186         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8187         std::vector.
8188         (check_condition): Update.
8189         * eval.c (fetch_subexp_value): Change "val_chain" to a
8190         std::vector.
8191         * breakpoint.c (update_watchpoint): Update.
8192         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8193
8194 2018-04-06  Tom Tromey  <tom@tromey.com>
8195
8196         * value.h (free_all_values): Remove.
8197         * value.c (free_all_values): Remove.
8198
8199 2018-04-06  Tom Tromey  <tom@tromey.com>
8200
8201         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8202         (value_history_chain, value_history_count): Remove.
8203         (value_history): New global.
8204         (record_latest_value, access_value_history, show_values)
8205         (preserve_values): Update.
8206
8207 2018-04-06  Tom Tromey  <tom@tromey.com>
8208
8209         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8210         * varobj.c (varobj_set_display_format, varobj_set_value)
8211         (install_default_visualizer, construct_visualizer)
8212         (install_new_value, ~varobj, varobj_get_value_type)
8213         (my_value_of_variable, varobj_editable_p): Update.
8214         * c-varobj.c (c_describe_child, c_value_of_variable)
8215         (cplus_number_of_children, cplus_describe_child): Update.
8216         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8217         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8218         (ada_value_of_variable, ada_value_is_changeable_p): Update.
8219
8220 2018-04-06  Tom Tromey  <tom@tromey.com>
8221
8222         * printcmd.c (last_examine_address): Change type to
8223         value_ref_ptr.
8224         (do_examine, x_command): Update.
8225
8226 2018-04-06  Tom Tromey  <tom@tromey.com>
8227
8228         * value.c (release_value): Update.
8229         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8230         (struct bpstats) <val>: Now a value_ref_ptr.
8231         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8232         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8233         (~watchpoint, print_it_watchpoint, watch_command_1)
8234         (invalidate_bp_value_on_memory_change): Update.
8235
8236 2018-04-06  Tom Tromey  <tom@tromey.com>
8237
8238         * varobj.c (varobj_clear_saved_item)
8239         (update_dynamic_varobj_children, install_new_value, ~varobj):
8240         Update.
8241         * value.h (value_incref): Move declaration earlier.
8242         (value_decref): Rename from value_free.
8243         (struct value_ref_policy): New.
8244         (value_ref_ptr): New typedef.
8245         (struct value_deleter): Remove.
8246         (gdb_value_up): Remove typedef.
8247         (release_value): Change return type.
8248         (release_value_or_incref): Remove.
8249         * value.c (set_value_parent): Update.
8250         (value_incref): Change return type.
8251         (value_decref): Rename from value_free.
8252         (value_free_to_mark, free_all_values, free_value_chain): Update.
8253         (release_value): Return value_ref_ptr.
8254         (release_value_or_incref): Remove.
8255         (record_latest_value, set_internalvar, clear_internalvar):
8256         Update.
8257         * stack.c (info_frame_command): Don't call value_free.
8258         * python/py-value.c (valpy_dealloc, valpy_new)
8259         (value_to_value_object): Update.
8260         * printcmd.c (do_examine): Update.
8261         * opencl-lang.c (lval_func_free_closure): Update.
8262         * mi/mi-main.c (register_changed_p): Don't call value_free.
8263         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8264         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8265         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8266         value_free.
8267         * guile/scm-value.c (vlscm_free_value_smob)
8268         (vlscm_scm_from_value): Update.
8269         * frame.c (frame_register_unwind, frame_unwind_register_signed)
8270         (frame_unwind_register_unsigned, get_frame_register_bytes)
8271         (put_frame_register_bytes): Don't call value_free.
8272         * findvar.c (address_from_register): Don't call value_free.
8273         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8274         * dwarf2loc.c (entry_data_value_free_closure)
8275         (value_of_dwarf_reg_entry, free_pieced_value_closure)
8276         (dwarf2_evaluate_loc_desc_full): Update.
8277         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8278         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8279         (~watchpoint, watch_command_1)
8280         (invalidate_bp_value_on_memory_change): Update.
8281         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8282
8283 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
8284
8285         PR gdb/23022
8286         * warning.m4: Add -Wno-error=deprecated-register.
8287         * configure: Re-generate.
8288
8289 2018-04-05  Tom Tromey  <tom@tromey.com>
8290
8291         * linespec.h: Remove include of "vec.h".
8292
8293 2018-04-05  Tom Tromey  <tom@tromey.com>
8294
8295         * linespec.c (typep): Remove typedef.
8296         (find_methods, find_superclass_methods): Take a std::vector.
8297         (find_method): Use std::vector.
8298
8299 2018-04-05  Tom Tromey  <tom@tromey.com>
8300
8301         * utils.c (compare_strings): Remove.
8302         * utils.h (compare_strings): Remove.
8303         * objc-lang.h (find_imps): Update.
8304         * objc-lang.c (find_methods): Take a std::vector.
8305         (uniquify_strings, find_imps): Likewise.
8306         * linespec.c (find_methods): Take a std::vector.
8307         (decode_objc): Use std::vector.
8308         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8309         a std::vector.
8310         (find_method, find_function_symbols): Use std::vector.
8311
8312 2018-04-05  Tom Tromey  <tom@tromey.com>
8313
8314         * completer.c (completion_tracker::completion_tracker): Remove
8315         cast.
8316         (completion_tracker::discard_completions): Likewise.
8317         * breakpoint.c (ambiguous_names_p): Remove cast.
8318         * ada-lang.c (_initialize_ada_language): Remove cast.
8319         * utils.h (streq): Update.
8320         (streq_hash): Add new declaration.
8321         * utils.c (streq): Return bool.
8322         (streq_hash): New function.
8323
8324 2018-04-05  Tom Tromey  <tom@tromey.com>
8325
8326         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8327         Remove a string copy.
8328
8329 2018-04-05  Tom Tromey  <tom@tromey.com>
8330
8331         * linespec.c (filter_results): Use std::vector.
8332         (decode_line_2, decode_line_full): Update.
8333
8334 2018-04-05  Tom Tromey  <tom@tromey.com>
8335
8336         * linespec.c (canonical_to_fullform): Return std::string.
8337         (filter_results): Update.
8338         (struct decode_line_2_item): Add constructor.
8339         <fullform, displayform>: Now std::string.
8340         (decode_line_2_compare_items): Now a std::sort comparator.
8341         (decode_line_2): Update.
8342
8343 2018-04-05  Tom Tromey  <tom@tromey.com>
8344
8345         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8346         (unexpected_linespec_error): Update.
8347         (linespec_parse_basic, parse_linespec): Update.
8348
8349 2018-04-05  Tom Tromey  <tom@tromey.com>
8350
8351         * linespec.c (linespec_parse_basic): Reindent.
8352
8353 2018-04-05  Tom Tromey  <tom@tromey.com>
8354
8355         * minsyms.h (iterate_over_minimal_symbols): Update.
8356         * minsyms.c (iterate_over_minimal_symbols): Take a
8357         gdb::function_view.
8358         * linespec.c (struct collect_minsyms): Remove.
8359         (compare_msyms): Now a std::sort comparator.
8360         (add_minsym): Add parameters.
8361         (search_minsyms_for_name): Update.  Use std::vector.
8362
8363 2018-04-03  Tom Tromey  <tom@tromey.com>
8364
8365         * mipsread.c (read_alphacoff_dynamic_symtab): Use
8366         gdb::byte_vector.
8367
8368 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8369
8370         * MAINTAINERS (Write After Approval): Add Weimin Pan.
8371
8372 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8373
8374         PR gdb/16959
8375         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
8376         printing static type.
8377
8378 2018-04-01  Tom Tromey  <tom@tromey.com>
8379
8380         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8381         (rs6000_xfer_shared_libraries): Update.
8382
8383 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
8384
8385         * common/gdb_vecs.h (char_ptr): Remove.
8386         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8387
8388 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8389
8390         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8391         with std::vector.
8392         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8393
8394 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8395
8396         * tracepoint.h (struct uploaded_tp): Initialize fields.
8397         <actions, step_actions, cmd_strings>: Change type to
8398         std::vector<char *>.
8399         * tracepoint.c (get_uploaded_tp): Allocate with new.
8400         (free_uploaded_tps): Free with delete.
8401         (parse_tracepoint_definition): Adjust to std::vector change.
8402         * breakpoint.c (read_uploaded_action): Likewise.
8403         (create_tracepoint_from_upload): Likewise.
8404         * ctf.c (ctf_write_uploaded_tp): Likewise.
8405         (SET_ARRAY_FIELD): Likewise.
8406         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8407
8408 2018-03-30  Tom Tromey  <tom@tromey.com>
8409
8410         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
8411         std::unique_ptr.
8412         (svr4_keep_data_in_core): Update.
8413         (svr4_read_so_list): Update.
8414
8415 2018-03-30  Tom Tromey  <tom@tromey.com>
8416
8417         * windows-nat.c (handle_output_debug_string, handle_exception):
8418         Update.
8419         * target.h (target_read_string): Update.
8420         * target.c (target_read_string): Change "string" to
8421         unique_xmalloc_ptr.
8422         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8423         Update.
8424         * solib-frv.c (frv_current_sos): Update.
8425         * solib-dsbt.c (dsbt_current_sos): Update.
8426         * solib-darwin.c (darwin_current_sos): Update.
8427         * linux-thread-db.c (inferior_has_bug): Update.
8428         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8429         Update.  Remove alloca.
8430         * ada-lang.c (ada_main_name): Update.
8431
8432 2018-03-30  Tom Tromey  <tom@tromey.com>
8433
8434         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8435         (struct dwo_file_deleter): New.
8436         (dwo_file_up): New typedef.
8437         (open_and_init_dwo_file): Use dwo_file_up.
8438         (free_dwo_file_cleanup): Remove.
8439
8440 2018-03-30  Tom Tromey  <tom@tromey.com>
8441
8442         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8443         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8444
8445 2018-03-30  Tom Tromey  <tom@tromey.com>
8446
8447         * dwarf2read.c (class free_cached_comp_units): New class.
8448         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8449         (free_cached_comp_units): Remove function.
8450
8451 2018-03-30  Tom Tromey  <tom@tromey.com>
8452
8453         * utils.h (make_cleanup_unpush_target): Remove.
8454         * inf-ptrace.c (struct target_unpusher): New.
8455         (target_unpush_up) New typedef.
8456         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8457         target_unpush_up.
8458         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8459
8460 2018-03-27  Tom Tromey  <tom@tromey.com>
8461
8462         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8463
8464 2018-03-27  Pedro Alves  <palves@redhat.com>
8465             Tom Tromey  <tom@tromey.com>
8466
8467         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8468         destructor.  Now a class.
8469         (gdb_readline_wrapper_cleanup): Remove function.
8470         (gdb_readline_wrapper): Remove cleanups.
8471
8472 2018-03-27  Tom Tromey  <tom@tromey.com>
8473
8474         * typeprint.h (struct type_print_options) <local_typedefs,
8475         global_typedefs>: Remove "struct" keyword.
8476         (class typedef_hash_table): New class.
8477         (recursively_update_typedef_hash, add_template_parameters)
8478         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8479         (find_typedef_in_hash): Don't declare.
8480         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8481         (typedef_hash_table::recursively_update): Rename from
8482         recursively_update_typedef_hash.  Now a member.
8483         (typedef_hash_table::add_template_parameters): Rename from
8484         add_template_parameters.  Now a member.
8485         (typedef_hash_table::typedef_hash_table): Now a constructor;
8486         rename from create_typedef_hash.
8487         (typedef_hash_table::~typedef_hash_table): Now a destructor;
8488         rename from free_typedef_hash.
8489         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8490         (do_free_global_table): Remove.
8491         (typedef_hash_table::typedef_hash_table): New constructor; renamed
8492         from copy_type_recursive.
8493         (create_global_typedef_table): Remove.
8494         (typedef_hash_table::find_global_typedef): Now a member of
8495         typedef_hash_table.
8496         (typedef_hash_table::find_typedef): Rename from
8497         find_typedef_in_hash; now a member.
8498         (whatis_exp): Update.
8499         * extension.h (struct ext_lang_type_printers): Add constructor and
8500         destructor.
8501         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8502         declare.
8503         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8504         Now a constructor; rename from start_ext_lang_type_printers.
8505         (ext_lang_type_printers): Now a destructor; rename from
8506         free_ext_lang_type_printers.
8507         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8508         Update.
8509         (c_type_print_base_struct_union): Update.  Remove cleanups.
8510
8511 2018-03-27  Tom Tromey  <tom@tromey.com>
8512
8513         * dwarf-index-write.c: Include <cmath>.
8514
8515 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8516
8517         * NEWS: Add entry describing new "set|show varsize-limit" command.
8518         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8519         command.
8520         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8521         "set variable".
8522
8523 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
8524
8525         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8526         dwarf-index-write.c
8527         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8528         * dwarf-index-common.c: New file.
8529         * dwarf-index-common.h: New file.
8530         * dwarf-index-write.c: New file.
8531         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8532         (struct dwarf2_section_info): Move from here.
8533         (dwarf2_section_info_def): Likewise.
8534         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8535         (offset_type): Likewise.
8536         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8537         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8538         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8539         (byte_swap): Likewise.
8540         (MAYBE_SWAP): Likewise.
8541         (dwarf2_per_cu_ptr): Likewise.
8542         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8543         (struct tu_stats): Likewise.
8544         (struct dwarf2_per_objfile): Likewise.
8545         (struct dwarf2_per_cu_data): Likewise.
8546         (struct signatured_type): Likewise.
8547         (sig_type_ptr): Likewise.
8548         (DEF_VEC_P (sig_type_ptr)): Likewise.
8549         (INDEX4_SUFFIX): Likewise.
8550         (INDEX5_SUFFIX): Likewise.
8551         (DEBUG_STR_SUFFIX): Likewise.
8552         (dwarf2_read_section): Make non-static.
8553         (mapped_index_string_hash): Move from here.
8554         (dwarf5_djb_hash): Likewise.
8555         (file_write): Likewise.
8556         (class data_buf): Likewise.
8557         (struct symtab_index_entry): Likewise.
8558         (struct mapped_symtab): Likewise.
8559         (find_slot): Likewise.
8560         (hash_expand): Likewise.
8561         (add_index_entry): Likewise.
8562         (uniquify_cu_indices): Likewise.
8563         (class c_str_view): Likewise.
8564         (class c_str_view_hasher): Likewise.
8565         (class vector_hasher): Likewise.
8566         (write_hash_table): Likewise.
8567         (psym_index_map): Likewise.
8568         (struct addrmap_index_data): Likewise.
8569         (add_address_entry): Likewise.
8570         (add_address_entry_worker): Likewise.
8571         (write_address_map): Likewise.
8572         (symbol_kind): Likewise.
8573         (write_psymbols): Likewise.
8574         (struct signatured_type_index_data): Likewise.
8575         (write_one_signatured_type): Likewise.
8576         (recursively_count_psymbols): Likewise.
8577         (recursively_write_psymbols): Likewise.
8578         (class debug_names): Likewise.
8579         (check_dwarf64_offsets): Likewise.
8580         (psyms_seen_size): Likewise.
8581         (write_gdbindex): Likewise.
8582         (write_debug_names): Likewise.
8583         (assert_file_size): Likewise.
8584         (write_psymtabs_to_index): Likewise.
8585         (save_gdb_index_command): Likewise.
8586         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8587         command.
8588         * dwarf2read.h: New file.
8589
8590 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8591
8592         PR gdb/22670
8593         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8594         symbol name if the CU's language stores symbol names in linkage
8595         format.
8596         * language.h (struct language_defn)
8597         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8598         all instances of this struct.
8599
8600 2018-03-26  Tom Tromey  <tom@tromey.com>
8601
8602         * stack.c (backtrace_command_1): Remove verbose code.
8603
8604 2018-03-26  Tom Tromey  <tom@tromey.com>
8605
8606         * python/py-framefilter.c (py_print_type): Don't catch
8607         exceptions.  Return void.
8608         (py_print_value): Likewise.
8609         (py_print_single_arg): Likewise.
8610         (enumerate_args): Don't catch exceptions.
8611         (py_print_args): Likewise.
8612         (py_print_frame): Likewise.
8613         (gdbpy_apply_frame_filter): Catch exceptions here.
8614
8615 2018-03-26  Tom Tromey  <tom@tromey.com>
8616
8617         * stack.c (_initialize_stack): Remove trailing newlines from help
8618         text.  Add "Usage" line to "backtrace" help.
8619
8620 2018-03-26  Tom Tromey  <tom@tromey.com>
8621
8622         PR python/16486:
8623         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8624
8625 2018-03-26  Tom Tromey  <tom@tromey.com>
8626
8627         * python/py-framefilter.c (py_print_single_arg): Return
8628         EXT_LANG_BT_ERROR from catch.
8629
8630 2018-03-26  Tom Tromey  <tom@tromey.com>
8631
8632         PR backtrace/15584:
8633         * stack.c (backtrace_command_1): Move some code into no-filters
8634         "if".
8635
8636 2018-03-26  Tom Tromey  <tom@tromey.com>
8637
8638         * python/py-framefilter.c (throw_quit_or_print_exception): New
8639         function.
8640         (gdbpy_apply_frame_filter): Use it.
8641
8642 2018-03-26  Tom Tromey  <tom@tromey.com>
8643
8644         PR cli/17716:
8645         * python/py-framefilter.c (py_print_type, py_print_value)
8646         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8647         RETURN_MASK_ERROR.
8648
8649 2018-03-26  Tom Tromey  <tom@tromey.com>
8650
8651         * python/py-framefilter.c (enumerate_args): Use
8652         gdb::unique_xmalloc_ptr.
8653
8654 2018-03-26  Tom Tromey  <tom@tromey.com>
8655
8656         * python/py-framefilter.c (py_print_frame): Return
8657         EXT_LANG_BT_OK.
8658         (gdbpy_apply_frame_filter): Update comment.
8659         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8660         Remove.
8661         <EXT_LANG_BT_NO_FILTERS>: Change value.
8662
8663 2018-03-26  Tom Tromey  <tom@tromey.com>
8664
8665         PR backtrace/15582:
8666         * stack.c (backtrace_command): Parse "hide" argument.
8667         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8668         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8669         constant.
8670
8671 2018-03-26  Tom Tromey  <tom@tromey.com>
8672
8673         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8674         add "flags".
8675         (backtrace_command): Remove "fulltrace", add "flags".
8676
8677 2018-03-26  Tom Tromey  <tom@tromey.com>
8678
8679         * stack.c (backtrace_command): Rewrite command line parsing.
8680
8681 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8682
8683         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8684
8685 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8686
8687         * filename-seen-cache.h: Add include guard.
8688
8689 2018-03-26  Keith Seitz  <keiths@redhat.com>
8690
8691         * symfile.c (place_section): Remove "struct" from section_addr_info
8692         in comment.
8693         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8694         "struct" keyword from section_addr_info.
8695
8696 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8697
8698         * regformats/regdef.h (reg): Add constructors.
8699
8700 2018-03-25  Pedro Alves  <palves@redhat.com>
8701
8702         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8703         if then/else bodies in var_func_name extraction.
8704
8705 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8706
8707         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8708         lookup_minimal_symbol() to find symbol entry.
8709         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8710
8711 2018-03-23  Keith Seitz  <keiths@redhat.com>
8712
8713         PR c++/22968
8714         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8715         nested type definitions for C++, too.
8716
8717 2018-03-23  Tom Tromey  <tom@tromey.com>
8718
8719         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8720         a typedef.
8721         (macho_register_oso): Remove.
8722         (macho_symtab_read): Take a std::vector.
8723         (oso_el_compare_name): Now a std::sort comparator.
8724         (macho_symfile_read_all_oso): Take a std::vector.
8725         (macho_symfile_read): Use std::vector.  Remove cleanups.
8726
8727 2018-03-22  Tom Tromey  <tom@tromey.com>
8728
8729         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8730         (record_full_goto_bookmark): Use std::string.
8731
8732 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8733
8734         PR tdep/18295
8735         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8736         a single mask.
8737
8738 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8739
8740         * rs6000-tdep.c (store_insn_p): New function.
8741         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8742         and cr_reg to their unshifted values. Use store_insn_p to
8743         match LR saves using either R1 or fdata->alloca_reg. Use
8744         store_insn_p to match CR saves. Set alloca_reg_offset
8745         when alloca_reg and framep are set. Remove lr_reg shift
8746         when assigning to fdata->lr_register.
8747
8748 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8749
8750         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8751         command line args instead of emitting a warning.
8752
8753 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8754
8755         * tracepoint.h (struct static_tracepoint_marker): Initialize
8756         fields, define default constructor, move constructor and move
8757         assignment, disable the rest.
8758         <str_id, extra>: Make std::string.
8759         (release_static_tracepoint_marker): Remove.
8760         (free_current_marker): Remove.
8761         * tracepoint.c (free_current_marker): Remove.
8762         (parse_static_tracepoint_marker_definition): Adjust to
8763         std::string, use new hex2str overload.
8764         (release_static_tracepoint_marker): Remove.
8765         (print_one_static_tracepoint_marker): Get marker by reference
8766         and adjust to std::string.
8767         (info_static_tracepoint_markers_command): Adjust to std::vector
8768         changes
8769         * target.h (static_tracepoint_marker_p): Remove typedef.
8770         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8771         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8772         bool.
8773         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8774         * target-debug.h
8775         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8776         (target_debug_print_std_vector_static_tracepoint_marker): New.
8777         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8778         to...
8779         (target_debug_print_static_tracepoint_marker_p): ... this.
8780         * target-delegates.c: Re-generate.
8781         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8782         Make std::string.
8783         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8784         (decode_static_tracepoint_spec): Adjust to std::vector.
8785         (tracepoint_print_one_detail): Adjust to std::string.
8786         (strace_marker_decode_location): Adjust to std::string.
8787         (update_static_tracepoint): Adjust to std::string, remove call
8788         to release_static_tracepoint_marker.
8789         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8790         Adjust to std::vector.
8791         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8792         (remote_static_tracepoint_markers_by_strid): Adjust to
8793         std::vector.
8794         * common/rsp-low.h (hex2str): New overload with explicit count
8795         of bytes.
8796         * common/rsp-low.c (hex2str): New overload with explicit count
8797         of bytes.
8798         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8799         (_initialize_rsp_low_selftests): Add test_hex2str test.
8800         * unittests/tracepoint-selftests.c
8801         (test_parse_static_tracepoint_marker_definition): Adjust to
8802         std::string.
8803
8804 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8805
8806         * tracepoint.c (parse_static_tracepoint_marker_definition):
8807         Consider case where the definition is followed by more
8808         definitions.
8809         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8810         tracepoint-selftests.c.
8811         * unittests/tracepoint-selftests.c: New.
8812
8813 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8814
8815         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8816         Carvalho.
8817
8818 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8819
8820         * symtab.c (find_pc_sect_line): fixed indentation.
8821
8822 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8823
8824         * symtab.c (find_pc_sect_line): now uses binary search.
8825
8826 2018-03-19  Tom Tromey  <tom@tromey.com>
8827
8828         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8829         "IDENT" production.
8830
8831 2018-03-19  Pedro Alves  <palves@redhat.com>
8832             Tom Tromey  <tom@tromey.com>
8833
8834         * unittests/observable-selftests.c: New file.
8835         * common/observable.h: New file.
8836         * observable.h: New file.
8837         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8838         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8839         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8840         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8841         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8842         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8843         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8844         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8845         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8846         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8847         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8848         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8849         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8850         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8851         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8852         tui/tui-interp.c, valops.c: Update all users.
8853         * tui/tui-hooks.c (tui_bp_created_observer)
8854         (tui_bp_deleted_observer, tui_bp_modified_observer)
8855         (tui_inferior_exit_observer, tui_before_prompt_observer)
8856         (tui_normal_stop_observer, tui_register_changed_observer):
8857         Remove.
8858         (tui_observers_token): New global.
8859         (attach_or_detach, tui_attach_detach_observers): New functions.
8860         (tui_install_hooks, tui_remove_hooks): Use
8861         tui_attach_detach_observers.
8862         * record-btrace.c (record_btrace_thread_observer): Remove.
8863         (record_btrace_thread_observer_token): New global.
8864         * observer.sh: Remove.
8865         * observer.c: Rename to observable.c.
8866         * observable.c (namespace gdb_observers): Define new objects.
8867         (observer_debug): Move into gdb_observers namespace.
8868         (struct observer, struct observer_list, xalloc_observer_list_node)
8869         (xfree_observer_list_node, generic_observer_attach)
8870         (generic_observer_detach, generic_observer_notify): Remove.
8871         (_initialize_observer): Update.
8872         Don't include observer.inc.
8873         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8874         (clean mostlyclean): Likewise.
8875         (observer.h, observer.inc): Remove targets.
8876         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8877         (COMMON_SFILES): Use observable.c, not observer.c.
8878         * .gitignore: Remove observer.h.
8879
8880 2018-03-18  Tom Tromey  <tom@tromey.com>
8881
8882         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8883         gdb::def_vector.
8884         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8885
8886 2018-03-17  Tom Tromey  <tom@tromey.com>
8887
8888         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8889
8890 2018-03-17  Tom Tromey  <tom@tromey.com>
8891
8892         * target.c (class scoped_target_fd): New.
8893         (target_fileio_close_cleanup): Remove.
8894         (target_fileio_read_alloc_1): Use scoped_target_fd.
8895
8896 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8897
8898         * silent-rules.mk: New.
8899         * Makefile.in: Include silent-rules.mk
8900         (srcdir, VPATH, top_srcdir): Move up.
8901         (COMPILE): Add ECHO_CXX.
8902         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8903         (init.c): Add ECHO_INIT_C.
8904         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8905         (version.c): Add ECHO_GEN.
8906         (printcmd.o): Add ECHO_CXX.
8907         (target-float.o): Add ECHO_CXX.
8908         (ada-exp.o): Add ECHO_CXX.
8909         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8910         (insight$(EXEEXT)): Add ECHO_CXXLD.
8911         * gnulib/configure.ac: Add AM_SILENT_RULES.
8912         * gnulib/aclocal.m4: Re-generate.
8913         * gnulib/configure: Re-generate.
8914         * gnulib/import/Makefile.in: Re-generate.
8915
8916 2018-03-16  Tom Tromey  <tom@tromey.com>
8917
8918         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8919         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8920         * utils.c (do_free_section_addr_info)
8921         (make_cleanup_free_section_addr_info): Remove.
8922         * symfile.h (struct other_sections): Add constructor.
8923         (struct section_addr_info): Remove.
8924         (section_addr_info): New typedef.
8925         (struct sym_fns) <sym_offsets>: Change type of parameter.
8926         (build_section_addr_info_from_objfile)
8927         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8928         (default_symfile_offsets, symbol_file_add)
8929         (symbol_file_add_from_bfd)
8930         (build_section_addr_info_from_section_table): Update.
8931         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8932         * symfile.c (alloc_section_addr_info): Remove.
8933         (build_section_addr_info_from_section_table): Change return type.
8934         Update.
8935         (build_section_addr_info_from_bfd)
8936         (build_section_addr_info_from_objfile): Likewise.
8937         (free_section_addr_info): Remove.
8938         (relative_addr_info_to_section_offsets): Change type of "addrs".
8939         (addrs_section_compar): Now a std::sort comparator.
8940         (addrs_section_sort): Change return type.
8941         (addr_info_make_relative): Change type of "addrs".  Update.
8942         (default_symfile_offsets, syms_from_objfile_1)
8943         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8944         (symbol_file_add_separate): Update.
8945         (symbol_file_add): Change type of "addrs".  Update.
8946         (add_symbol_file_command): Update.  Remove cleanups.
8947         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8948         cleanups.
8949         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8950         * solib.c (solib_read_symbols): Update.
8951         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8952         * machoread.c (macho_symfile_offsets): Update.
8953         * jit.c (jit_bfd_try_read_symtab): Update.
8954
8955 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8956
8957         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8958         unittests/utils-selftests.c.
8959         * unittests/utils-selftests.c: New file.
8960
8961 2018-03-14  Tom Tromey  <tom@tromey.com>
8962
8963         PR cli/14977:
8964         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8965         for NULL.
8966
8967 2018-03-14  Tom Tromey  <tom@tromey.com>
8968
8969         PR cli/19918:
8970         * printcmd.c (printf_pointer): Allow "-" in format.
8971
8972 2018-03-14  Tom Tromey  <tom@tromey.com>
8973
8974         * printcmd.c (_initialize_printcmd): Add usage to printf.
8975
8976 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8977
8978         * MAINTAINERS: Update my email address.
8979
8980 2018-03-13  Tom Tromey  <tom@tromey.com>
8981
8982         * machoread.c (macho_check_dsym): Change filenamep to a
8983         std::string*.
8984         (macho_symfile_read): Update.
8985         * symfile.c (load_command): Use std::string.
8986
8987 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8988
8989         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8990         to error message string.
8991         (riscv_register_name): Use xsnprintf instead of sprintf.
8992         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8993         internal_error.
8994         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8995         error.
8996         (riscv_push_dummy_call): Likewise.
8997
8998 2018-03-12  Tom Tromey  <tom@tromey.com>
8999
9000         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9001         Use gdb::byte_vector.
9002         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9003
9004 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9005
9006         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9007         parameter type to readable_regcache.
9008         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9009         the declaration.
9010
9011 2018-03-11  Tom Tromey  <tom@tromey.com>
9012
9013         * dwarf2read.c (struct nextfield): Add initializers.
9014         (struct nextfnfield): Remove.
9015         (struct fnfieldlist): Add initializers.  Remove "length" and
9016         "head", use std::vector.
9017         (struct decl_field_list): Remove.
9018         (struct field_info): Add initializers.
9019         <fields, baseclasses>: Now std::vector.
9020         <nbaseclasses, nfnfields, typedef_field_list_count,
9021         nested_types_list_count>: Remove.
9022         (dwarf2_add_field, dwarf2_add_type_defn)
9023         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9024         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9025         (process_structure_scope): Update.
9026
9027 2018-03-11  Tom Tromey  <tom@tromey.com>
9028
9029         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9030         for use by std::sort.
9031         (build_type_psymtabs_1): Use std::vector.
9032
9033 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9034
9035         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9036         and LIBMPFR in the printed configuration.
9037
9038 2018-03-08  Tom Tromey  <tom@tromey.com>
9039
9040         * source.c (get_filename_and_charpos): Use scoped_fd.
9041         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9042         (procfs_pidlist): Likewise.
9043         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9044         (iterate_over_mappings): Likewise.
9045
9046 2018-03-08  Tom Tromey  <tom@tromey.com>
9047
9048         * infcall.c (struct call_return_meta_info)
9049         <stack_temporaries_enabled>: Remove.
9050         (get_call_return_value, call_function_by_hand_dummy): Update.
9051         * thread.c (disable_thread_stack_temporaries): Remove.
9052         (enable_thread_stack_temporaries): Remove.
9053         (thread_stack_temporaries_enabled_p): Return bool.
9054         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9055         (get_last_thread_stack_temporary): Update.
9056         * eval.c (evaluate_subexp): Update.
9057         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9058         class, not a function.
9059         (value_ptr, value_vec): Remove typedefs.
9060         (class thread_info) <stack_temporaries_enabled>: Now bool.
9061         <stack_temporaries>: Now a std::vector.
9062         (thread_stack_temporaries_enabled_p)
9063         (value_in_thread_stack_temporaries): Return bool.
9064
9065 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9066
9067         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9068         (getpkt_or_notif_sane_1): Likewise.
9069
9070 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9071
9072         * build-id.c (build_id_to_debug_bfd): Use std::string.
9073
9074 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9075
9076         * build-id.c (find_separate_debug_file_by_buildid): Return
9077         std::string.
9078         * build-id.h (find_separate_debug_file_by_buildid): Return
9079         std::string.
9080         * coffread.c (coff_symfile_read): Adjust to std::string.
9081         * elfread.c (elf_symfile_read): Adjust to std::string.
9082         * symfile.c (separate_debug_file_exists): Change parameter to
9083         std::string.
9084         (find_separate_debug_file): Return std::string.
9085         (find_separate_debug_file_by_debuglink): Return std::string.
9086         * symfile.h (find_separate_debug_file_by_debuglink): Return
9087         std::string.
9088
9089 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9090
9091         * common/xml-utils.c (xml_escape_text): Move code to...
9092         (xml_escape_text_append): ... this new function.
9093         * common/xml-utils.h (xml_escape_text_append): New declaration.
9094         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9095         New function.
9096         (_initialize_xml_utils): register test_xml_escape_text_append as
9097         a selftest.
9098
9099 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9100
9101         * defs.h: Remove MAX_REGISTER_SIZE.
9102         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9103         asserts.
9104         * python/py-unwind.c (pyuw_sniffer): Likewise.
9105
9106 2018-03-07  Tom Tromey  <tom@tromey.com>
9107
9108         * linux-tdep.c (linux_info_proc): Update.
9109         * target.h (struct target_ops) <to_fileio_readlink>: Return
9110         optional<string>.
9111         (target_fileio_readlink): Return optional<string>.
9112         * remote.c (remote_hostio_readlink): Return optional<string>.
9113         * inf-child.c (inf_child_fileio_readlink): Return
9114         optional<string>.
9115         * target.c (target_fileio_readlink): Return optional<string>.
9116
9117 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9118
9119         * regcache.c (cooked_read_test): Add riscv to the list of
9120         architectures that have a save_reggroup.
9121
9122 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9123
9124         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9125         value is not a dynamic class object.
9126
9127 2018-03-06  Tom Tromey  <tom@tromey.com>
9128
9129         * rust-exp.y: Formatting fixes.
9130
9131 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9132
9133         * riscv-tdep.c (riscv_register_name): Remove target description
9134         support.
9135         (riscv_gdbarch_init): Remove target description check.
9136
9137 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9138
9139         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9140         comment.
9141         * riscv-tdep.h: Likewise.
9142
9143 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9144
9145         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9146         (riscv_pseudo_register_write): Delete.
9147         (riscv_gdbarch_init): Remove all use of pseudo registers.
9148
9149 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9150
9151         * record-btrace.c (btrace_print_lines): Replace cleanup
9152         parameter with RAII equivalents.
9153         (btrace_insn_history): Replace cleanup with RAII equivalents.
9154         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9155         make_cleanup_ui_out_tuple_begin_end): Remove.
9156         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9157         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9158         make_cleanup_ui_out_list_begin_end): Remove.
9159
9160 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9161
9162         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9163         parameter types to std::vector.  Use bool.
9164         (record_btrace_wait): Replace VEC(tp_t) with
9165         std::vector<thread_info *>.
9166         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9167
9168 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9169
9170         * record-btrace.c (record_btrace_disable_callback): Remove.
9171         (struct scoped_btrace_disable): New.
9172         (record_btrace_open): Use scoped_btrace_disable.
9173
9174 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9175
9176         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9177         reading values from registers.
9178
9179 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9180
9181         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9182         where appropriate.
9183
9184 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9185
9186         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9187         change parameter type.  Use GDB's print functions, and use
9188         core_addr_to_string where appropriate.
9189         (riscv_push_dummy_call): Use core_addr_to_string where
9190         appropriate, update call to riscv_print_arg_location, and reindent
9191         a few lines.
9192         (riscv_return_value): Update call to riscv_print_arg_location.
9193
9194 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9195             Tim Newsome <tim@sifive.com>
9196             Albert Ou <a0u@eecs.berkeley.edu>
9197             Darius Rad <darius@bluespec.com>
9198
9199         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9200         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9201         (ALLDEPFILES): Add riscv-tdep.c
9202         * configure.tgt: Add riscv support.
9203         * riscv-tdep.c: New file.
9204         * riscv-tdep.h: New file.
9205         * NEWS: Mention new target.
9206         * MAINTAINERS: Add entry for riscv.
9207
9208 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9209
9210         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9211         fields within aggregates.
9212
9213 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
9214
9215         * record-btrace.c (btrace_print_lines): Change type of flags to
9216         gdb_disassembly_flags.
9217
9218 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9219
9220         * fbsd-nat.c: Include "inf-ptrace.h".
9221         (USE_SIGTRAP_SIGINFO): Conditionally define.
9222         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9223         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9224         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9225         function.
9226         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9227         Likewise.
9228         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9229         Likewise.
9230         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9231         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9232         "supports_stopped_by_hw_breakpoint" target methods.
9233
9234 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9235
9236         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9237         * fbsd-nat.c (debug_fbsd_nat): New variable.
9238         (show_fbsd_nat_debug): New function.
9239         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9240         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9241
9242 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9243
9244         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9245         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9246         prototype.
9247         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9248         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9249         method.
9250
9251 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9252
9253         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9254         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9255
9256 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9257
9258         * charset.c (struct charset_vector): New.
9259         (charsets): Change type to charset_vector.
9260         (find_charset_names): Adjust.
9261         (add_one): Adjust.
9262         (_initialize_charset): Adjust.
9263
9264 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9265
9266         * progspace.h (struct program_space) <deleted_solibs>: Change
9267         type to std::vector<std::string>.
9268         * progspace.c (clear_program_space_solib_cache): Adjust.
9269         * breakpoint.c (print_solib_event): Adjust.
9270         (check_status_catch_solib): Adjust.
9271         * solib.c (update_solib_list): Adjust.
9272         * ui-out.h (class ui_out) <field_string>: New overload.
9273         * ui-out.c (ui_out::field_string): New overload.
9274
9275 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9276
9277         * progspace.h (struct program_space): Add constructor and
9278         destructor, initialize fields.
9279         (add_program_space): Remove.
9280         * progspace.c (add_program_space): Rename to...
9281         (program_space::program_space): ... this.
9282         (release_program_space): Rename to...
9283         (program_space::~program_space): ... this.
9284         (delete_program_space): Use delete to delete program_space.
9285         (initialize_progspace): Use new to allocate program_space.
9286         * inferior.c (add_inferior_with_spaces): Likewise.
9287         (clone_inferior_command): Likewise.
9288         * infrun.c (follow_fork_inferior): Likewise.
9289         (handle_vfork_child_exec_or_exit): Likewise.
9290
9291 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9292
9293         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9294         (delim_string_to_char_ptr_vec): Return std::vector of
9295         gdb::unique_xmalloc_ptr.
9296         (dirnames_to_char_ptr_vec_append): Take std::vector of
9297         gdb::unique_xmalloc_ptr.
9298         (dirnames_to_char_ptr_vec): Return std::vector of
9299         gdb::unique_xmalloc_ptr.
9300         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9301         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9302         (delim_string_to_char_ptr_vec): Return an std::vector of
9303         gdb::unique_xmalloc_ptr, adjust the code.
9304         (dirnames_to_char_ptr_vec_append): Take an std::vector of
9305         gdb::unique_xmalloc_ptr, adjust the code.
9306         (dirnames_to_char_ptr_vec): Return an std::vector of
9307         gdb::unique_xmalloc_ptr, adjust the code.
9308         * auto-load.c (auto_load_safe_path_vec): Change type to
9309         std::vector of gdb::unique_xmalloc_ptr.
9310         (auto_load_expand_dir_vars): Return an std::vector of
9311         gdb::unique_xmalloc_ptr, adjust the code.
9312         (auto_load_safe_path_vec_update): Adjust.
9313         (filename_is_in_auto_load_safe_path_vec): Adjust.
9314         (auto_load_objfile_script_1): Adjust.
9315         * build-id.c (build_id_to_debug_bfd): Adjust.
9316         * linux-thread-db.c (thread_db_load_search): Adjust.
9317         * source.c (add_path): Adjust.
9318         (openp): Adjust.
9319         * symfile.c (find_separate_debug_file): Adjust.
9320         * utils.c (do_free_char_ptr_vec): Remove.
9321         (make_cleanup_free_char_ptr_vec): Remove.
9322
9323 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
9324
9325         PR gdb/22907
9326         * common/pathstuff.c: Conditionally include "<windows.h>".
9327
9328 2018-03-01  Georg Sauthoff  <mail@georg.so>
9329
9330         PR gdb/22888
9331         * gcore.in: Quote variables and switch interpreter to bash.
9332
9333 2018-03-01  Tom Tromey  <tom@tromey.com>
9334
9335         * dwarf2read.c (alloc_discriminant_info): Fix default_index
9336         assertion.  Add assertion for discriminant_index.
9337         (quirk_rust_enum): Use correct base type name in univariant case.
9338
9339 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
9340
9341         * record.c (get_call_history_modifiers): Return a
9342         record_print_flags.
9343         (cmd_record_call_history): Adjust.
9344         * record-btrace.c (record_btrace_call_history): Adjust.
9345         (record_btrace_call_history_range): Adjust.
9346         (record_btrace_call_history_from): Adjust.
9347         * target-debug.h (target_debug_print_record_print_flags): New.
9348         * target-delegates.c: Re-generate.
9349         * target.c (target_call_history): Change flags type.
9350         (target_call_history_from): Likewise.
9351         (target_call_history_range): Likewise.
9352         * target.h (struct target_ops) <target_call_history>: Likewise.
9353         (target_call_history_from): Likewise.
9354         (target_call_history_range): Likewise.
9355
9356 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9357             Simon Marchi  <simon.marchi@polymtl.ca>
9358
9359         * common/common-utils.c: Include "sys/stat.h".
9360         (is_regular_file): Move here from "source.c"; change return
9361         type to "bool".
9362         * common/common-utils.h (is_regular_file): New prototype.
9363         * common/pathstuff.c (contains_dir_separator): New function.
9364         * common/pathstuff.h (contains_dir_separator): New prototype.
9365         * source.c: Don't include "sys/stat.h".
9366         (is_regular_file): Move to "common/common-utils.c".
9367
9368 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9369
9370         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9371         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9372         * auto-load.c: Include "common/pathstuff.h".
9373         * common/common-def.h (current_directory): Move here.
9374         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9375         function.
9376         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9377         prototype.
9378         * common/pathstuff.c: New file.
9379         * common/pathstuff.h: New file.
9380         * compile/compile.c: Include "common/pathstuff.h".
9381         * defs.h (current_directory): Move to "common/common-defs.h".
9382         * dwarf2read.c: Include "common/pathstuff.h".
9383         * exec.c: Likewise.
9384         * guile/scm-safe-call.c: Likewise.
9385         * linux-thread-db.c: Likewise.
9386         * main.c: Likewise.
9387         * nto-tdep.c: Likewise.
9388         * objfiles.c: Likewise.
9389         * source.c: Likewise.
9390         * symtab.c: Likewise.
9391         * utils.c: Include "common/pathstuff.h".
9392         (gdb_realpath): Move to "common/pathstuff.c".
9393         (gdb_realpath_keepfile): Likewise.
9394         (gdb_abspath): Likewise.
9395         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9396         (gdb_realpath_keepfile): Likewise.
9397         (gdb_abspath): Likewise.
9398
9399 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
9400
9401         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9402         wildcard process pid for super_resume for kernels with a
9403         specific bug.
9404
9405 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
9406
9407         * compile/compile.c (get_args): Add additional comments
9408         explaining function.
9409
9410 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
9411             Tom Tromey  <tom@tromey.com>
9412
9413         * target.h (memory_write_request_s): Remove typedef.  Don't define
9414         VEC.
9415         (target_write_memory_blocks): Change argument to std::vector.
9416         (struct memory_write_request): Add constructor.
9417         * target-memory.c (compare_block_starting_address): Return bool.
9418         Change argument types.
9419         (claim_memory): Change arguments to use std::vector.
9420         (split_regular_and_flash_blocks, blocks_to_erase)
9421         (compute_garbled_blocks): Likewise.
9422         (cleanup_request_data, cleanup_write_requests_vector): Remove.
9423         (target_write_memory_blocks): Change argument to std::vector.
9424         * symfile.c (struct load_section_data): Add constructor and
9425         destructor.  Use std::vector for "requests".
9426         (struct load_progress_data): Add initializers.
9427         (load_section_callback): Update.  Use "new".
9428         (clear_memory_write_data): Remove.
9429         (generic_load): Update.
9430
9431 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
9432
9433         * arch/aarch64.h: Use common/tdesc.h.
9434
9435 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9436
9437         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9438         architecture with a 64-bit ABI.
9439
9440 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9441
9442         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9443         ahead of target description loading.
9444
9445 2018-02-26  Tom Tromey  <tom@tromey.com>
9446
9447         * stack.c (backtrace_command_1): Update.
9448         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9449         of "flags".
9450         * python/py-framefilter.c (py_print_frame)
9451         (gdbpy_apply_frame_filter): Change type of "flags".
9452         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9453         of "flags".
9454         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9455         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9456         * extension.h (enum frame_filter_flag): Rename from
9457         frame_filter_flags.
9458         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9459         (apply_ext_lang_frame_filter): Change type of "flags".
9460         * extension.c (apply_ext_lang_frame_filter): Change type of
9461         "flags".
9462         * extension-priv.h (struct extension_language_ops)
9463         <apply_frame_filter>: Change type of "flags".
9464
9465 2018-02-26  Tom Tromey  <tom@tromey.com>
9466
9467         PR python/16497:
9468         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
9469         off-by-one in py_end computation.
9470         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9471         PRINT_MORE_FRAMES.
9472         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9473         constant.
9474
9475 2018-02-26  Tom Tromey  <tom@tromey.com>
9476
9477         * dwarf2read.c (struct variant_field): New.
9478         (struct nextfield) <variant>: New field.
9479         (dwarf2_add_field): Handle DW_TAG_variant_part.
9480         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9481         discriminated union.
9482         (read_structure_type): Handle DW_TAG_variant_part.
9483         (handle_struct_member_die): New function, extracted from
9484         process_structure_scope.  Handle DW_TAG_variant.
9485         (process_structure_scope): Handle discriminated unions.  Call
9486         handle_struct_member_die.
9487
9488 2018-02-26  Tom Tromey  <tom@tromey.com>
9489
9490         * rust-lang.h (rust_last_path_segment): Declare.
9491         * rust-lang.c (rust_last_path_segment): Now public.  Change
9492         contract.
9493         (struct disr_info): Remove.
9494         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9495         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9496         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9497         (rust_enum_p, rust_enum_variant): New function.
9498         (rust_underscore_fields): Remove "offset" parameter.
9499         (rust_print_enum): New function.
9500         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9501         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9502         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9503         enums.
9504         (rust_internal_print_type): New function, from rust_print_type.
9505         Remove enum code.
9506         (rust_print_type): Call rust_internal_print_type.
9507         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9508         Update enum handling.
9509         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9510         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9511         (rust_union_quirks): New functions.
9512         (process_full_comp_unit, process_full_type_unit): Call
9513         rust_union_quirks.
9514         (process_structure_scope): Update rust_unions if necessary.
9515
9516 2018-02-26  Tom Tromey  <tom@tromey.com>
9517
9518         * value.h (value_union_variant): Declare.
9519         * valops.c (value_union_variant): New function.
9520         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9521         (struct discriminant_info): New.
9522         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9523         enumerator.
9524         (struct main_type) <flag_discriminated_union>: New field.
9525
9526 2018-02-26  Tom Tromey  <tom@tromey.com>
9527
9528         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9529         unittests/unpack-selftests.c.
9530         * unittests/unpack-selftests.c: New file.
9531         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9532
9533 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9534
9535         * dwarf2read.c (struct partial_die_info) <read>: New method.
9536         (read_partial_die): Remove the declaration.
9537         (load_partial_dies): Update.
9538         (partial_die_info::partial_die_info):
9539         (read_partial_die): Change it to partial_die_info::read.
9540
9541 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9542
9543         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9544         (fixup_partial_die): Remove declaration.
9545         (scan_partial_symbols): Update.
9546         (partial_die_parent_scope): Likewise.
9547         (partial_die_full_name): Likewise.
9548         (fixup_partial_die): Change it to partial_die_info::fixup.
9549
9550 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9551
9552         * dwarf2read.c (read_partial_die): Update the declaration.
9553         (load_partial_dies): Caller update.
9554         (read_partial_die): Remove one argument abbrev_len.
9555
9556 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9557
9558         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9559         assignment operator.
9560         (load_partial_dies): Use ctor and copy ctor.
9561         (read_partial_die): Update.
9562         (dwarf2_cu::find_partial_die): Use ctor.
9563
9564 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9565
9566         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9567         (find_partial_die_in_comp_unit): Change it to
9568         dwarf2_cu::find_partial_die.
9569         (find_partial_die): Update.
9570
9571 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9572
9573         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9574         is NULL.
9575
9576 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9577
9578         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9579
9580 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9581
9582         * arch/amd64.h: Use common/tdesc.h.
9583         * arch/i386.c: Likewise.
9584         * arch/i386.h: Likewise.
9585         * arch/tic6x.c: Likewise.
9586         * arch/tdesc.h: Move file from here...
9587         * common/tdesc.h: ...to here.
9588         * features/aarch64-core.c: Regenerate.
9589         * features/aarch64-fpu.c: Regenerate.
9590         * features/i386/32bit-avx.c: Regenerate.
9591         * features/i386/32bit-avx512.c: Regenerate.
9592         * features/i386/32bit-core.c: Regenerate.
9593         * features/i386/32bit-linux.c: Regenerate.
9594         * features/i386/32bit-mpx.c: Regenerate.
9595         * features/i386/32bit-pkeys.c: Regenerate.
9596         * features/i386/32bit-sse.c: Regenerate.
9597         * features/i386/64bit-avx.c: Regenerate.
9598         * features/i386/64bit-avx512.c: Regenerate.
9599         * features/i386/64bit-core.c: Regenerate.
9600         * features/i386/64bit-linux.c: Regenerate.
9601         * features/i386/64bit-mpx.c: Regenerate.
9602         * features/i386/64bit-pkeys.c: Regenerate.
9603         * features/i386/64bit-segments.c: Regenerate.
9604         * features/i386/64bit-sse.c: Regenerate.
9605         * features/i386/x32-core.c: Regenerate.
9606         * features/tic6x-c6xp.c: Regenerate.
9607         * features/tic6x-core.c: Regenerate.
9608         * features/tic6x-gp.c: Regenerate.
9609         * target-descriptions.c: Use common/tdesc.h.
9610         * target-descriptions.h: Likewise.
9611
9612 2018-02-24  Tom Tromey  <tom@tromey.com>
9613
9614         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9615         (try_thread_db_load_from_dir, thread_db_load_search): Use
9616         std::string.
9617         (info_auto_load_libthread_db_compare): Return bool.  Change
9618         argument types.
9619         (info_auto_load_libthread_db): Use std::vector, std::string.
9620         Remove cleanups.
9621
9622 2018-02-24  Tom Tromey  <tom@tromey.com>
9623
9624         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9625         std::string.
9626         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9627         std::string*.
9628         * gdbarch.c: Rebuild.
9629         * gdbarch.h: Rebuild.
9630         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9631         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9632         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9633         std::string*.
9634
9635 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9636
9637         * gdbtypes.h (sect_offset): Change type to uint64_t.
9638         (sect_offset_str): New function.
9639         * dwarf2read.c (create_addrmap_from_aranges): Use
9640         sect_offset_str.
9641         (error_check_comp_unit_head): Likewise.
9642         (create_debug_type_hash_table): Likewise.
9643         (read_cutu_die_from_dwo): Likewise.
9644         (init_cutu_and_read_dies): Likewise.
9645         (init_cutu_and_read_dies_no_follow): Likewise.
9646         (process_psymtab_comp_unit_reader): Likewise.
9647         (partial_die_parent_scope): Likewise.
9648         (peek_die_abbrev): Likewise.
9649         (process_queue): Likewise.
9650         (dwarf2_physname): Likewise.
9651         (read_namespace_alias): Likewise.
9652         (read_import_statement): Likewise.
9653         (create_dwo_cu_reader): Likewise.
9654         (create_cus_hash_table): Likewise.
9655         (lookup_dwo_cutu): Likewise.
9656         (inherit_abstract_dies): Likewise.
9657         (read_func_scope): Likewise.
9658         (read_call_site_scope): Likewise.
9659         (dwarf2_add_member_fn): Likewise.
9660         (read_common_block): Likewise.
9661         (read_module_type): Likewise.
9662         (read_typedef): Likewise.
9663         (read_subrange_type): Likewise.
9664         (load_partial_dies): Likewise.
9665         (read_partial_die): Likewise.
9666         (find_partial_die): Likewise.
9667         (read_str_index): Likewise.
9668         (dwarf2_string_attr): Likewise.
9669         (build_error_marker_type): Likewise.
9670         (lookup_die_type): Likewise.
9671         (dump_die_shallow): Likewise.
9672         (follow_die_ref): Likewise.
9673         (dwarf2_fetch_die_loc_sect_off): Likewise.
9674         (dwarf2_fetch_constant_bytes): Likewise.
9675         (follow_die_sig): Likewise.
9676         (get_signatured_type): Likewise.
9677         (get_DW_AT_signature_type): Likewise.
9678         (dwarf2_find_containing_comp_unit): Likewise.
9679         (set_die_type): Likewise.
9680
9681 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9682
9683         * arch/aarch64.c: Include "common-defs.h".
9684         * arch/amd64.c: Likewise.
9685         * arch/i386.c: Likewise.
9686
9687 2018-02-21  Tom Tromey  <tom@tromey.com>
9688
9689         * value.h: (extract_field_op): Update.
9690         * eval.c (extract_field_op): Return a const char *.
9691         * expression.h (parse_expression_for_completion): Update.
9692         * completer.c (complete_expression): Update.
9693         (add_struct_fields): Make fieldname const.
9694         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9695         (mark_completion_tag, parse_exp_in_context_1): Update.
9696         (parse_expression_for_completion): Change "name" to
9697         unique_xmalloc_ptr*.
9698
9699 2018-02-21  Tom Tromey  <tom@tromey.com>
9700
9701         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9702
9703 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9704
9705         * avr-tdep.c (avr_read_pc): Change parameter type to
9706         readable_regcache.
9707         * gdbarch.sh (read_pc): Likewise.
9708         * gdbarch.c: Re-generated.
9709         * gdbarch.h: Re-generated.
9710         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9711         readable_regcache.
9712         * ia64-tdep.c (ia64_read_pc): Likewise.
9713         * mips-tdep.c (mips_read_pc): Likewise.
9714         * spu-tdep.c (spu_read_pc): Likewise.
9715
9716 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9717
9718         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9719         * regcache-dump.c: New file.
9720         * regcache.c: Move register_dump to regcache-dump.c.
9721         (maintenance_print_registers): Likewise.
9722         (maintenance_print_raw_registers): Likewise.
9723         (maintenance_print_cooked_registers): Likewise.
9724         (maintenance_print_register_groups): Likewise.
9725         (maintenance_print_remote_registers): Likewise.
9726         (_initialize_regcache): Likewise.
9727         * regcache.h (register_dump): Moved from regcache.c.
9728
9729 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9730
9731         * regcache.c (regcache::regcache): Update.
9732         (regcache::invalidate): Move it to detached_regcache::invalidate.
9733         (get_thread_arch_aspace_regcache): Update.
9734         (regcache::raw_update): Update.
9735         (regcache::cooked_read): Remove some code.
9736         (regcache::cooked_read_value): Likewise.
9737         (regcache::raw_write): Remove assert on m_readonly_p.
9738         (regcache::raw_supply_integer): Move it to
9739         detached_regcache::raw_supply_integer.
9740         (regcache::raw_supply_zeroed): Likewise.
9741         * regcache.h (detached_regcache) <raw_supply_integer>: New
9742         declaration.
9743         <raw_supply_zeroed, invalidate>: Likewise.
9744         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9745         <invalidate>: Likewise.
9746         <m_readonly_p>: Removed.
9747
9748 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9749
9750         * infcmd.c (get_return_value): Let stop_regs point to
9751         get_current_regcache.
9752         * regcache.c (regcache::regcache): Remove.
9753         (register_dump_reg_buffer): New class.
9754         (regcache_print): Adjust.
9755         * regcache.h (regcache): Remove constructors.
9756
9757 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9758
9759         * regcache.c (class register_dump): New class.
9760         (register_dump_regcache, register_dump_none): New class.
9761         (register_dump_remote, register_dump_groups): New class.
9762         (regcache_print): Update.
9763         * regcache.h (regcache_dump_what): Move it to regcache.c.
9764         (regcache) <dump>: Remove.
9765
9766 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9767
9768         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9769          reg_buffer_rw *.
9770         (jit_unwind_reg_set_impl): Call raw_supply.
9771         (jit_frame_sniffer): Use reg_buffer_rw.
9772         * record-full.c (record_full_core_regbuf): Change its type.
9773         (record_full_core_open_1): Use reg_buffer_rw.
9774         (record_full_close): Likewise.
9775         (record_full_core_fetch_registers): Use regcache->raw_supply.
9776         (record_full_core_store_registers): Likewise.
9777         * regcache.c (regcache::get_register_status): Move it to
9778         reg_buffer.
9779         (regcache_raw_set_cached_value): Remove.
9780         (regcache::raw_set_cached_value): Remove.
9781         (regcache::raw_write): Call raw_supply.
9782         (regcache::raw_supply): Move it to reg_buffer_rw.
9783         * regcache.h (regcache_raw_set_cached_value): Remove.
9784         (reg_buffer_rw): New class.
9785
9786 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9787
9788         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9789         readonly_detached_regcache.
9790         (dummy_frame_prev_register): Use regcache->cooked_read.
9791         * frame.c (frame_save_as_regcache): Change return type.
9792         (frame_pop): Update.
9793         * frame.h (frame_save_as_regcache): Update declaration.
9794         * inferior.h (get_infcall_suspend_state_regcache): Update
9795         declaration.
9796         * infrun.c (infcall_suspend_state) <registers>: use
9797         readonly_detached_regcache.
9798         (save_infcall_suspend_state): Don't use regcache_dup.
9799         (get_infcall_suspend_state_regcache): Change return type.
9800         * linux-fork.c (struct fork_info) <savedregs>: Change to
9801         readonly_detached_regcache.
9802         <pc>: New field.
9803         (fork_save_infrun_state): Don't use regcache_dup.
9804         (info_checkpoints_command): Adjust.
9805         * mi/mi-main.c (register_changed_p): Update declaration.
9806         (mi_cmd_data_list_changed_registers): Use
9807         readonly_detached_regcache.
9808         (register_changed_p): Change parameter type to
9809         readonly_detached_regcache.
9810         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9811         readonly_detached_regcache.
9812         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9813         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9814         New.
9815         (regcache::save): Move it to reg_buffer.
9816         (regcache::restore): Change parameter type.
9817         (regcache_dup): Remove.
9818         * regcache.h (reg_buffer) <save>: New method.
9819         (readonly_detached_regcache): New class.
9820         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9821         readonly_detached_regcache.
9822         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9823
9824 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9825
9826         * frame.c (frame_save_as_regcache): Use regcache method save.
9827         (frame_pop): Use regcache method restore.
9828         * infrun.c (restore_infcall_suspend_state): Likewise.
9829         * linux-fork.c (fork_load_infrun_state): Likewise.
9830         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9831         save.
9832         * regcache.c (regcache_save): Remove.
9833         (regcache::restore): More asserts.
9834         (regcache_cpy): Remove.
9835         * regcache.h (regcache_save): Remove the declaration.
9836         (regcache::restore): Move from private to public.
9837         Remove the friend declaration of regcache_cpy.
9838         (regcache_cpy): Remove declaration.
9839
9840 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9841
9842         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9843         parameter type to 'readable_regcache *'.
9844         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9845         * arm-tdep.c (arm_neon_quad_read): Likewise.
9846         (arm_pseudo_read): Likewise.
9847         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9848         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9849         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9850         * gdbarch.c: Re-generated.
9851         * gdbarch.h: Re-generated.
9852         * gdbarch.sh (pseudo_register_read): Change parameter type to
9853         'readable_regcache *'.
9854         (pseudo_register_read_value): Likewise.
9855         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9856         (h8300_pseudo_register_read): Likewise.
9857         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9858         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9859         (i386_pseudo_register_read_into_value): Likewise.
9860         (i386_pseudo_register_read_value): Likewise.
9861         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9862         declaration.
9863         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9864         * m32c-tdep.c (m32c_raw_read): Likewise.
9865         (m32c_read_flg): Likewise.
9866         (m32c_banked_register): Likewise.
9867         (m32c_banked_read): Likewise.
9868         (m32c_sb_read): Likewise.
9869         (m32c_part_read): Likewise.
9870         (m32c_cat_read): Likewise.
9871         (m32c_r3r2r1r0_read): Likewise.
9872         (m32c_pseudo_register_read): Likewise.
9873         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9874         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9875         (mep_pseudo_cr64_read): Likewise.
9876         (mep_pseudo_register_read): Likewise.
9877         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9878         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9879         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9880         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9881         (regcache::cooked_read): Likewise.
9882         (regcache::cooked_read_value): Likewise.
9883         (regcache_cooked_read_signed):
9884         (regcache::cooked_read): Likewise.
9885         * regcache.h (readable_regcache): New class.
9886         (regcache): Inherit readable_regcache.  Move some methods to
9887         readable_regcache.
9888         * rl78-tdep.c (rl78_pseudo_register_read): Change
9889         parameter type to 'readable_regcache *'.
9890         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9891         (e500_pseudo_register_read): Change parameter type to
9892         'readable_regcache *'.
9893         (dfp_pseudo_register_read): Likewise.
9894         (vsx_pseudo_register_read): Likewise.
9895         (efpr_pseudo_register_read): Likewise.
9896         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9897         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9898         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9899         (sh64_pseudo_register_read): Likewise.
9900         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9901         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9902         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9903         (spu_pseudo_register_read): Likewise.
9904         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9905         (xtensa_pseudo_register_read): Likewise.
9906
9907 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9908
9909         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9910         (regcache::arch): Move it to reg_buffer::arch.
9911         (regcache::register_buffer): Likewise.
9912         (regcache::assert_regnum): Likewise.
9913         (regcache::num_raw_registers): Likewise.
9914         * regcache.h (reg_buffer): New class.
9915         (regcache): Inherit reg_buffer.
9916
9917 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9918
9919         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9920         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9921
9922 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9923
9924         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9925
9926 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9927
9928         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9929         (SFILES): Remove common/*.c files.
9930         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9931         * common/common.host: Add common reference.
9932         * configure.ac: Likewise.
9933         * configure: Regenerate.
9934
9935 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9936
9937         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9938         (block_initialize_namespace): Use new.
9939         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9940         (dwarf2_free_objfile): Use delete.
9941         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9942         (copy_type_recursive): Use new.
9943         * gdb_obstack.h (allocate_on_obstack): New.
9944
9945 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9946
9947         PR gdb/22849
9948         * inferior.c (exit_inferior_1): Reset inf->control.
9949
9950 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9951
9952         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9953         declaration.
9954
9955 2018-02-14  Pedro Alves  <palves@redhat.com>
9956
9957         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9958         frame_cleanup_after_sniffer on exception.
9959
9960 2018-02-14  Tom Tromey  <tom@tromey.com>
9961
9962         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9963         const.
9964         (solib_bfd_open): Make pathname const.
9965         * solib.c (solib_bfd_open): Make pathname const.
9966         * solib-spu.c (spu_bfd_fopen): Make name const.
9967         (spu_bfd_open): Make pathname const.
9968         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9969         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9970
9971 2018-02-14  Tom Tromey  <tom@tromey.com>
9972
9973         * symfile.c (symfile_bfd_open): Update.
9974         * source.h (openp, source_full_path_of, find_and_open_source):
9975         Change argument type to unique_xmalloc_ptr.
9976         * source.c (openp): Take a unique_xmalloc_ptr.
9977         (source_full_path_of, find_and_open_source): Likewise.
9978         (open_source_file, symtab_to_fullname): Update.
9979         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9980         unique_xmalloc_ptr.
9981         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9982         (exec_file_find): Update.
9983         * psymtab.c (psymtab_to_fullname): Update.
9984         * nto-tdep.h (nto_find_and_open_solib): Update.
9985         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9986         unique_xmalloc_ptr.
9987         * exec.c (exec_file_attach): Update.
9988         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9989         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9990
9991 2018-02-14  Tom Tromey  <tom@tromey.com>
9992
9993         * solib.c: Include source.h.
9994         * nto-tdep.c: Include source.h.
9995         * mi/mi-cmd-env.c: Include source.h.
9996         * infcmd.c: Include source.h.
9997         * exec.c: Include source.h.
9998         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9999         (add_path, directory_switch, source_path, init_source_path): Move
10000         declarations...
10001         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10002         (add_path, directory_switch, source_path, init_source_path):
10003         ...here.
10004
10005 2018-02-14  Tom Tromey  <tom@tromey.com>
10006
10007         * solist.h (exec_file_find, solib_find): Return
10008         unique_xmalloc_ptr.
10009         (solib_bfd_fopen): Take a const char *.
10010         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10011         (exec_file_find, solib_find): Likewise.
10012         (solib_bfd_fopen): Do not take ownership of "pathname".
10013         (solib_bfd_open): Use unique_xmalloc_ptr.
10014         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10015         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10016         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10017         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10018
10019 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10020
10021         * ada-lang.c (name_match_type_from_name): Remove reference to
10022         ada_name_for_lookup in function's documentation.
10023         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10024
10025 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10026
10027         * defs.h (enum openp_flags): New enum.
10028         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10029         Move to enum openp_flags.
10030         (openp_flags): New enum flags.
10031         (openp): Change parameter type to openp_flags.
10032         * source.c (openp): Change parameter type to openp_flags.
10033         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10034         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10035
10036 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10037
10038         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10039         per-command.
10040
10041 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10042
10043         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10044         into...
10045         (class dwarf2_queue_guard): ...the destructor of this new class.
10046         (dw2_do_instantiate_symtab): Create instance of the new class
10047         dwarf2_queue_guard, remove cleanup.
10048
10049 2018-02-09  Tom Tromey  <tom@tromey.com>
10050
10051         * source.c (find_source_lines): Don't reference past the end of
10052         the vector.
10053
10054 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10055
10056         * remote.c (remote_btrace_maybe_reopen): Change error message.
10057         * btrace.c (btrace_enable): Likewise.
10058         (parse_xml_btrace): Likewise.
10059         (parse_xml_btrace_conf): Likewise.
10060
10061 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10062
10063         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10064         (linux_enable_pt, linux_enable_bts): Call
10065         diagnose_perf_event_open_fail.
10066
10067 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10068
10069         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10070         Remove parameter and change return type.  Update callers.  Move it.
10071         (linux_enable_bts, linux_enable_pt): Improve error message.
10072         (linux_enable_pt): Remove zero buffer size check.
10073         (linux_enable_btrace): Improve error messages.  Remove NULL return
10074         check.
10075
10076 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10077
10078         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10079         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10080         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10081         (linux_supports_pt, linux_supports_btrace): Remove.
10082         (linux_enable_bts): Call cpu_supports_bts.
10083         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10084         * remote.c (remote_supports_btrace): Remove.
10085         (init_remote_ops): Remove remote_supports_btrace.
10086         * target-delegates.c: Regenerated.
10087         * target.c (target_supports_btrace): Remove.
10088         * target.h (target_ops) <to_supports_btrace>: Remove
10089         (target_supports_btrace): Remove.
10090         * x86-linux-nat.c (x86_linux_create_target): Remove
10091         linux_supports_btrace.
10092
10093 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10094
10095         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10096         btrace failed.
10097         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10098         exception and use message in own exception.
10099
10100 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10101
10102         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10103         (perf_event_pt_event_type): Use gdb_file_up.
10104         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10105         scoped_fd, and scoped_mmap.
10106
10107 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10108
10109         * common/scoped_mmap.h: New.
10110         * unittests/scoped_mmap-selftest.c: New.
10111         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10112         unittests/scoped_mmap-selftest.c.
10113
10114 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10115
10116         * common/scoped_fd.h: New.
10117         * unittests/scoped_fd-selftest.c: New.
10118         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10119         unittests/scoped_fd-selftest.c.
10120
10121 2018-02-09  Tom Tromey  <tom@tromey.com>
10122
10123         * auto-load.c (auto_load_section_scripts): Use
10124         gdb::unique_xmalloc_ptr.
10125
10126 2018-02-09  Tom Tromey  <tom@tromey.com>
10127
10128         * auto-load.c (execute_script_contents): Use std::string.
10129
10130 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10131
10132         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10133         Python function, rather than a new command.
10134
10135 2018-02-08  Tom Tromey  <tom@tromey.com>
10136
10137         * solib.c (solib_find_1): Use std::string.
10138         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10139
10140 2018-02-08  Tom Tromey  <tom@tromey.com>
10141
10142         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10143
10144 2018-02-08  Tom Tromey  <tom@tromey.com>
10145
10146         * source.c (find_source_lines): Use gdb::def_vector.
10147
10148 2018-02-08  Tom Tromey  <tom@tromey.com>
10149
10150         * macrocmd.c (struct temporary_macro_definition): New.
10151         (macro_define_command): Use temporary_macro_definition.  Remove
10152         cleanups.
10153         (free_macro_definition_ptr): Remove.
10154
10155 2018-02-08  Tom Tromey  <tom@tromey.com>
10156
10157         * macroexp.c (maybe_expand): Use std::string.
10158
10159 2018-02-08  Tom Tromey  <tom@tromey.com>
10160
10161         * macroexp.c (struct macro_buffer): Add initializers for some
10162         members.
10163         (init_buffer, init_shared_buffer, free_buffer)
10164         (free_buffer_return_text): Remove.
10165         (macro_buffer): New constructors.
10166         (~macro_buffer): New destructor.
10167         (macro_buffer::set_shared): New method.
10168         (macro_buffer::resize_buffer, macro_buffer::appendc)
10169         (macro_buffer::appendmem): Now methods, not free functions.
10170         (set_token, append_tokens_without_splicing, stringify)
10171         (macro_stringify): Update.
10172         (gather_arguments): Change return type.  Remove argc_p argument,
10173         add args_ptr argument.  Use std::vector.
10174         (substitute_args): Remove argc argument.  Accept std::vector.
10175         (expand): Update.  Use std::vector.
10176         (scan, macro_expand, macro_expand_next): Update.
10177
10178 2018-02-08  Tom Tromey  <tom@tromey.com>
10179
10180         * symtab.c (default_collect_symbol_completion_matches_break_on):
10181         Use unique_xmalloc_ptr.
10182         * macroscope.h: (sal_macro_scope, user_macro_scope)
10183         (default_macro_scope): Return unique_xmalloc_ptr.
10184         * macroscope.c (sal_macro_scope, user_macro_scope)
10185         (default_macro_scope): Return unique_xmalloc_ptr.
10186         * macroexp.h (macro_expand, macro_expand_once): Return
10187         unique_xmalloc_ptr.
10188         * macroexp.c (macro_expand, macro_expand_once): Return
10189         unique_xmalloc_ptr.
10190         * macrocmd.c (macro_expand_command, macro_expand_once_command)
10191         (info_macro_command, info_macros_command): Use
10192         unique_xmalloc_ptr.
10193         * compile/compile-c-support.c (write_macro_definitions): Use
10194         unique_xmalloc_ptr.
10195         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10196
10197 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
10198
10199         * value.c (value_static_field): Assign field type instead of
10200         containing type when returning an optimized out value.
10201
10202 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10203
10204         * ft32-tdep.c (ft32_read_pc): Remove.
10205         (ft32_write_pc): Remove.
10206         (ft32_gdbarch_init): Update.
10207         * m32r-tdep.c (m32r_read_pc): Remove.
10208         (m32r_gdbarch_init): Update.
10209         * mep-tdep.c (mep_read_pc): Remove.
10210         (mep_gdbarch_init): Update.
10211         * microblaze-tdep.c (microblaze_write_pc): Remove.
10212         (microblaze_gdbarch_init): Update.
10213         * mn10300-tdep.c (mn10300_read_pc): Remove.
10214         (mn10300_write_pc): Remove.
10215         (mn10300_gdbarch_init): Update.
10216         * moxie-tdep.c (moxie_read_pc): Remove.
10217         (moxie_write_pc): Remove.
10218         (moxie_gdbarch_init): Update.
10219
10220 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10221
10222         * expprint.c (print_subexp_standard): Handle
10223         OP_F77_UNDETERMINED_ARGLIST.
10224         (dump_subexp_body_standard): Likewise.
10225
10226 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
10227
10228         * target-descriptions.c (tdesc_element_visitor) Add empty
10229         implementations.
10230         (tdesc_type): Move make_gdb_type from here.
10231         (tdesc_type_builtin): Likewise.
10232         (tdesc_type_vector): Likewise.
10233         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10234         (make_gdb_type_struct): Move from tdesc_type_with_fields.
10235         (make_gdb_type_union): Likewise.
10236         (make_gdb_type_flags): Likewise.
10237         (make_gdb_type_enum): Likewise.
10238         (make_gdb_type): New function.
10239         (tdesc_register_type): Use static make_gdb_type.
10240
10241 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
10242
10243         * infcmd.c (default_print_one_register_info): Align natural-format
10244         column values consistently one under another.
10245         (pad_to_column): New function.
10246
10247 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
10248
10249         * dwarf2read.c (dwarf2_physname): Move commment.
10250
10251 2018-02-01  Leszek Swirski  <leszeks@google.com>
10252
10253         * varobj.c (varobj_formatted_print_options): Allow recursive
10254         pretty printing if pretty printing is enabled.
10255
10256 2018-02-01  Leszek Swirski  <leszeks@google.com>
10257
10258         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10259         names after a structop as a filename.
10260
10261 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10262
10263         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10264         (arm_record_coproc_data_proc): Likewise.
10265
10266 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10267
10268         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10269
10270 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
10271
10272         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10273         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10274
10275 2018-01-31  Pedro Alves  <palves@redhat.com>
10276
10277         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10278         * inflow.c (child_terminal_save_inferior): Wrap reference to
10279         tcgetpgrp in HAVE_TERMIOS_H.
10280         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10281         _WIN32.
10282         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10283         always iterate over all inferiors.
10284         (gdbsim_cntrl_c): Adjust.
10285         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10286
10287 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10288
10289         * gdbtypes.c (lookup_array_range_type): Make sure the array's
10290         index type is objfile-owned if the element type is as well.
10291
10292 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10293
10294         GDB 8.1 released.
10295
10296 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10297
10298         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10299         "features/s390x-linux64.c".
10300         (_initialize_s390_linux_tdep): Remove initialization of tdescs
10301         s390_linux32 and s390x_linux64.
10302         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10303         default tdesc.
10304         * s390-tdep.c: Include "features/s390-linux32.c" and
10305         "features/s390x-linux64.c".
10306         (s390_tdesc_valid): Add check for tdesc_has_registers.
10307         (s390_gdbarch_init): Make sure there is always a valid tdesc.
10308         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10309         tdesc_s390x_linux64.
10310         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10311         tdesc_s390x_linux64 to...
10312         * s390-tdep.h: ...here.
10313
10314 2018-01-30  Pedro Alves  <palves@redhat.com>
10315
10316         PR gdb/13211
10317         * config.in, configure: Regenerate.
10318         * configure.ac: Check for getpgid.
10319         * go32-nat.c (go32_pass_ctrlc): New.
10320         (go32_target): Install it.
10321         * inf-child.c (inf_child_target): Install
10322         child_terminal_save_inferior, child_pass_ctrlc and
10323         child_interrupt.
10324         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10325         (inf_ptrace_target): No longer install it.
10326         * infcmd.c (interrupt_target_1): Adjust.
10327         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10328         (child_interrupt): Declare.
10329         (inferior::terminal_state): New.
10330         * inflow.c (struct terminal_info): Update comments.
10331         (inferior_process_group): Delete.
10332         (terminal_is_ours): Delete.
10333         (gdb_tty_state): New.
10334         (child_terminal_init): Adjust.
10335         (is_gdb_terminal, sharing_input_terminal_1)
10336         (sharing_input_terminal): New functions.
10337         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
10338         Set the process's actual process group in the foreground if
10339         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
10340         mark terminal as the inferior's if not sharing GDB's terminal.
10341         Don't check attach_flag.
10342         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10343         pass down a target_terminal_state.
10344         (child_terminal_save_inferior): New, factored out from ...
10345         (child_terminal_ours_1): ... this.  Handle
10346         target_terminal_state::is_ours_for_output.
10347         (child_interrupt, child_pass_ctrlc): New.
10348         (inflow_inferior_exit): Clear the inferior's terminal_state.
10349         (copy_terminal_info): Copy the inferior's terminal state.
10350         (_initialize_inflow): Remove reference to terminal_is_ours.
10351         * inflow.h (inferior_process_group): Delete.
10352         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10353         * procfs.c (procfs_target): Don't install procfs_interrupt.
10354         (procfs_interrupt): Delete.
10355         * remote.c (remote_serial_quit_handler): Adjust.
10356         (remote_interrupt): Remove ptid parameter.  Adjust.
10357         * target-delegates.c: Regenerate.
10358         * target.c: Include "terminal.h".
10359         (target_terminal::terminal_state): Rename to ...
10360         (target_terminal::m_terminal_state): ... this.
10361         (target_terminal::init): Adjust.
10362         (target_terminal::inferior): Adjust to per-inferior
10363         terminal_state.
10364         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10365         (target_terminal::ours, target_terminal::ours_for_output): Use
10366         target_terminal_is_ours_kind.
10367         (target_interrupt): Remove ptid parameter.  Adjust.
10368         (default_target_pass_ctrlc): Adjust.
10369         * target.h (target_ops::to_terminal_save_inferior): New field.
10370         (target_ops::to_interrupt): Remove ptid_t parameter.
10371         (target_interrupt): Remove ptid_t parameter.  Update comment.
10372         (target_pass_ctrlc): Update comment.
10373         * target/target.h (target_terminal_state): New scoped enum,
10374         factored out of ...
10375         (target_terminal::terminal_state): ... here.
10376         (target_terminal::inferior): Update comments.
10377         (target_terminal::restore_inferior): New.
10378         (target_terminal::is_inferior, target_terminal::is_ours)
10379         (target_terminal::is_ours_for_output): Adjust.
10380         (target_terminal::scoped_restore_terminal_state): Adjust to
10381         rename, and call restore_inferior() instead of inferior().
10382         (target_terminal::scoped_restore_terminal_state::m_state): Change
10383         type.
10384         (target_terminal::terminal_state): Rename to ...
10385         (target_terminal::m_terminal_state): ... this and change type.
10386
10387 2018-01-30  Pedro Alves  <palves@redhat.com>
10388
10389         * linux-nat.c (wait_for_signal): New function.
10390         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10391         directly.
10392         (async_terminal_is_ours)
10393         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10394         (linux_nat_add_target): Don't override
10395         to_terminal_inferior/to_terminal_ours.
10396
10397 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
10398
10399         * remote.c (remote_follow_fork): Don't call "detach_inferior".
10400
10401 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
10402
10403         * dwarf2read.c (free_dwo_files): Add forward-declaration.
10404         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10405         dwarf2_per_objfile_free here.
10406         (dwarf2_per_objfile_free): Remove.
10407         (_initialize_dwarf2_read): Don't register
10408         dwarf2_per_objfile_free as a registry cleanup.
10409
10410 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
10411
10412         Avoid compilation errors in MinGW native builds
10413
10414         The error is triggered by including python-internal.h, and the
10415         error message is:
10416
10417              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10418                       from build-gnulib/import/math.h:27,
10419                       from d:/usr/Python26/include/pyport.h:235,
10420                       from d:/usr/Python26/include/Python.h:58,
10421                       from python/python-internal.h:94,
10422                       from python/py-arch.c:24:
10423              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10424         using ::hypot;
10425                 ^~~~~
10426
10427         This happens because Python headers define 'hypot' to expand t
10428         '_hypot' in the Windows builds.
10429         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10430         'hypoth'.  This avoids a compilation error.
10431
10432 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10433
10434         * MAINTAINERS (Write After Approval): Fix ordering.
10435
10436 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10437
10438         * MAINTAINERS (Write After Approval): Add Alan Hayward.
10439
10440 2018-01-26  Alan Modra  <amodra@gmail.com>
10441
10442         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10443         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10444         Remove nop.  Make const.  Comment.
10445         (powerpc32_plt_stub_so_2): New.
10446         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10447         Correct count.  Update uses.
10448         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10449         Move common code reading PLT entry word.  Correct
10450         powerpc32_plt_stub PLT address calculation.
10451         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10452         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10453         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10454         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10455         (ppc64_standard_linkage8): Likewise.
10456         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10457         Correct insns description.
10458         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10459
10460 2018-01-24  Pedro Alves  <palves@redhat.com>
10461
10462         GCC PR libstdc++/83906
10463         * gdbtypes.c (operator==(const dynamic_prop &,
10464         const dynamic_prop &)): New.
10465         (operator==(const range_bounds &, const range_bounds &)): New.
10466         (check_types_equal): Use them instead of memcmp.
10467         * gdbtypes.h (operator==(const dynamic_prop &,
10468         const dynamic_prop &)): Declare.
10469         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10470         (operator==(const range_bounds &, const range_bounds &)): Declare.
10471         (operator!=(const range_bounds &, const range_bounds &)): Declare.
10472
10473 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10474
10475         * s390-linux-tdep.c (s390_record_address_mask)
10476         (s390_record_calc_disp_common, s390_record_calc_disp)
10477         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10478         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10479         (s390_process_record): Move to s390-tdep.c.
10480         (s390_linux_init_abi_any): Adjust.
10481         * s390-tdep.c (s390_record_address_mask)
10482         (s390_record_calc_disp_common, s390_record_calc_disp)
10483         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10484         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10485         (s390_process_record): Moved from s390-linux-tdep.c
10486         (s390_gdbarch_init): Adjust.
10487
10488 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10489
10490         * s390-linux-nat.c (s390-tdep.h): New include.
10491         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10492         (HFILES_NO_SRCDIR): Add s390-tdep.h.
10493         (ALLDEPFILES): Add s390-tdep.c.
10494         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10495         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10496         * s390-tdep.h: ...this.  New file.
10497         * s390-linux-tdep.c (s390-tdep.h): New include.
10498         (_initialize_s390_tdep): Rename to...
10499         (_initialize_s390_linux_tdep): ...this and adjust.
10500         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10501         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10502         s390-tdep.h.
10503         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10504         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10505         (s390_is_partial_instruction, s390_software_single_step)
10506         (is_non_branch_ril, s390_displaced_step_copy_insn)
10507         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10508         (s390_prologue_data, s390_addr, s390_store, s390_load)
10509         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10510         (s390_register_call_saved, s390_guess_tracepoint_registers)
10511         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10512         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10513         (s390_pseudo_register_name, s390_pseudo_register_type)
10514         (s390_pseudo_register_read, s390_pseudo_register_write)
10515         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10516         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10517         (s390_addr_bits_remove, s390_address_class_type_flags)
10518         (s390_address_class_type_flags_to_name)
10519         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10520         (s390_function_arg_float, s390_function_arg_vector)
10521         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10522         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10523         (s390_frame_align, s390_register_return_value, s390_return_value)
10524         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10525         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10526         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10527         (s390_trad_frame_prev_register, s390_unwind_cache)
10528         (s390_prologue_frame_unwind_cache)
10529         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10530         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10531         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10532         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10533         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10534         (s390_frame_base_address, s390_local_base_address)
10535         (s390_frame_base, s390_gcc_target_options)
10536         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10537         (s390_validate_reg_range, s390_tdesc_valid)
10538         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10539         * s390-tdep.c: ...this.  New file.
10540
10541 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10542
10543         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10544         (s390_process_record, s390_gdbarch_tdep_alloc)
10545         (s390_linux_init_abi_any): Use/set new hook.
10546
10547 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10548
10549         * s390-linux-tdep.c (osabi.h): New include.
10550         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10551         (s390_linux_init_abi_any): New functions.
10552         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10553
10554 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10555
10556         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10557         tdesc_has_registers check
10558
10559 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10560
10561         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10562         (s390_validate_reg_range): New macro.
10563         (s390_gdbarch_init): Adjust.
10564
10565 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10566
10567         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10568         (s390_gdbarch_tdep_alloc): Adjust.
10569         (s390_gdbarch_init): Adjust.
10570
10571 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10572
10573         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10574         <have_tdb>: Change type to bool.
10575         (s390_gdbarch_tdep_alloc): Adjust.
10576         (s390_gdbarch_init): Adjust.
10577
10578 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10579
10580         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10581         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10582         (s390_gdbarch_tdep_alloc): New function.
10583         (s390_gdbarch_init): Allocate tdep at start and use its fields
10584         instead of separate variables.
10585
10586 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10587
10588         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10589         when looking for cached gdbarch and add comment for remaining.
10590
10591 2018-01-22  Pedro Alves  <palves@redhat.com>
10592             Sergio Durigan Junior  <sergiodj@redhat.com>
10593
10594         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10595         case.
10596
10597 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10598
10599         * MAINTAINERS: Update my company e-mail address.
10600
10601 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10602
10603         * regcache.c (cooked_write_test): New function.
10604         (_initialize_regcache): Register the test.
10605
10606 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10607
10608         * ia64-tdep.c (ia64_pseudo_register_read): Call
10609         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10610         * m32c-tdep.c (m32c_cat_read): Likewise.
10611         (m32c_r3r2r1r0_read): Likewise.
10612         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10613         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10614
10615 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10616
10617         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10618         method raw_read instead of regcache_raw_read.
10619         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10620         * arm-tdep.c (arm_neon_quad_read): Likewise.
10621         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10622         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10623         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10624         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10625         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10626         (i386_pseudo_register_read_into_value): Likewise.
10627         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10628         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10629         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10630         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10631         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10632         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10633         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10634         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10635         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10636
10637 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10638
10639         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10640         * configure.tgt: Remove target mt.
10641         * mt-tdep.c: Remove.
10642         * regcache.c (cooked_read_test): Remove the check for mt.
10643
10644 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10645
10646         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10647         instead of gdbarch_pseudo_register_read_value.
10648
10649 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10650
10651         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10652         language is Ada.
10653
10654 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10655
10656         * linespec.c (create_sals_line_offset): Remove code that preserved
10657         the symtab_and_line's line number.
10658
10659 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10660
10661         * varobj.c (varobj_create): Don't set valid_block when creating a
10662         floating varobj.
10663
10664 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10665
10666         * varobj.c (varobj_create): Remove out of date comment.
10667
10668 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10669
10670         PR mi/20395
10671         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10672         updating innermost block.
10673         * parse.c (innermost_block_tracker::update): Take extra type
10674         parameter, and check types match before updating innermost block.
10675         (write_dollar_variable): Update innermost block for registers.
10676         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10677         (innermost_block_tracker::innermost_block_tracker): Initialise
10678         m_types member.
10679         (innermost_block_tracker::reset): Take type parameter.
10680         (innermost_block_tracker::update): Take type parameter, and pass
10681         type through as needed.
10682         (innermost_block_tracker::m_types): New member.
10683         * varobj.c (varobj_create): Pass type when reseting innermost
10684         block.
10685
10686 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10687
10688         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10689         * ada-lang.c (resolve_subexp): Likewise.
10690         * breakpoint.c (set_breakpoint_condition) Likewise.
10691         (watch_command_1) Likewise.
10692         * c-exp.y (variable): Likewise.
10693         * d-exp.y (PrimaryExpression): Likewise.
10694         * f-exp.y (variable): Likewise.
10695         * go-exp.y (variable): Likewise.
10696         * m2-exp.y (variable): Likewise.
10697         * objfiles.c (objfile::~objfile): Likewise.
10698         * p-exp.y (variable): Likewise.
10699         * parse.c (innermost_block): Change type.
10700         * parser-defs.h (class innermost_block_tracker): New.
10701         (innermost_block): Change to innermost_block_tracker.
10702         * printcmd.c (display_command): Switch to innermost_block API.
10703         (do_one_display): Likewise.
10704         * rust-exp.y (do_one_display): Likewise.
10705         * symfile.c (clear_symtab_users): Likewise.
10706         * varobj.c (varobj_create): Switch to innermost_block API, replace
10707         use of innermost_block with block stored on varobj object.
10708
10709 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10710
10711         * expression.h (innermost_block): Remove declaration.
10712         * varobj.c: Add 'parser-defs.h' include.
10713
10714 2018-01-19  Tom Tromey  <tom@tromey.com>
10715
10716         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10717         symbols in the static and global blocks.
10718
10719 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10720
10721         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10722         gdb_ptrace.h, and move including gdb_wait.h ...
10723         * nat/linux-ptrace.h: ... to here.
10724
10725 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10726
10727         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10728         inf_ptrace_detach_success.
10729         (inf_ptrace_detach_success): Add inferior parameter, use it
10730         instead of inferior_ptid, pass it to detach_inferior.
10731         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10732         parameter.
10733         * inferior.c (detach_inferior): Add overload that takes an
10734         inferior object.
10735         * inferior.h (detach_inferior): Likewise.
10736         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10737         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10738         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10739
10740 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10741
10742         * target.h (struct target_ops) <to_detach>: Add inferior
10743         parameter.
10744         (target_detach): Likewise.
10745         * target.c (dispose_inferior): Pass inferior down.
10746         (target_detach): Pass inferior down.  Assert that it is equal to
10747         the current inferior.
10748         * aix-thread.c (aix_thread_detach): Pass inferior down.
10749         * corefile.c (core_file_command): Pass current_inferior() down.
10750         * corelow.c (core_detach): Add inferior parameter.
10751         * darwin-nat.c (darwin_detach): Likewise.
10752         * gnu-nat.c (gnu_detach): Likewise.
10753         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10754         * infcmd.c (detach_command): Pass current_inferior() down to
10755         target_detach.
10756         * infrun.c (follow_fork_inferior): Pass parent_inf to
10757         target_detach.
10758         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10759         target_detach.
10760         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10761         * linux-thread-db.c (thread_db_detach): Likewise.
10762         * nto-procfs.c (procfs_detach): Likewise.
10763         * procfs.c (procfs_detach): Likewise.
10764         * record.c (record_detach): Likewise.
10765         * record.h (struct inferior): Forward-declare.
10766         (record_detach): Add inferior parameter.
10767         * remote-sim.c (gdbsim_detach): Likewise.
10768         * remote.c (remote_detach_1): Likewise.
10769         (remote_detach): Likewise.
10770         (extended_remote_detach): Likewise.
10771         * sol-thread.c (sol_thread_detach): Likewise.
10772         * target-debug.h (target_debug_print_inferior_p): New macro.
10773         * target-delegates.c: Re-generate.
10774         * top.c (kill_or_detach): Pass inferior down to target_detach.
10775         * windows-nat.c (windows_detach): Add inferior parameter.
10776
10777 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10778
10779         * target.h (struct target_ops) <to_detach>: Remove args
10780         parameter.
10781         (target_detach): Likewise.
10782         * target.c (dispose_inferior): Adjust.
10783         (target_detach): Remove args parameter, adjust.
10784         * aix-thread.c (aix_thread_detach): Adjust.
10785         * corefile.c (core_file_command): Adjust.
10786         * corelow.c (core_detach): Adjust.
10787         * darwin-nat.c (darwin_detach): Adjust.
10788         * gnu-nat.c (gnu_detach): Adjust.
10789         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10790         * infcmd.c (detach_command): Adjust
10791         * infrun.c (follow_fork_inferior): Adjust.
10792         (handle_vfork_child_exec_or_exit): Adjust.
10793         * linux-fork.c (linux_fork_detach): Remove args parameter.
10794         * linux-fork.h (linux_fork_detach): Likewise.
10795         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10796         * linux-thread-db.c (thread_db_detach): Likewise.
10797         * nto-procfs.c (procfs_detach): Likewise.
10798         * procfs.c (procfs_detach): Likewise.
10799         (do_detach): Remove signo parameter.
10800         * record.c (record_detach): Remove args parameter.
10801         * record.h (record_detach): Likewise.
10802         * remote-sim.c (gdbsim_detach): Likewise.
10803         * remote.c (remote_detach_1): Likewise.
10804         (remote_detach): Likewise.
10805         (extended_remote_detach): Likewise.
10806         * sol-thread.c (sol_thread_detach): Likewise.
10807         * target-delegates.c: Re-generate.
10808         * top.c (struct qt_args) <args>: Remove field.
10809         (kill_or_detach): Don't pass args.
10810         (quit_force): Don't set args.
10811         * windows-nat.c (windows_detach): Remove args parameter.
10812
10813 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10814
10815         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10816         (arm_linux_init_abi): Install it.
10817
10818 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10819
10820         * osabi.c (gdb_osabi_names): Extend the regexp for
10821         arm-linux-gnueabihf.
10822
10823 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10824
10825         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10826         m_abbrevs.
10827         (abbrev_table::add_abbrev): Update.
10828         (abbrev_table::lookup_abbrev): Update.
10829
10830 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10831
10832         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10833
10834 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10835
10836         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10837         to "std::string".
10838
10839 2018-01-17  Tom Tromey  <tom@tromey.com>
10840
10841         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10842
10843 2018-01-17  Tom Tromey  <tom@tromey.com>
10844
10845         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10846         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10847         (create_array_type_with_stride): Update.
10848         * dwarf2read.c (set_die_type): Update.
10849
10850 2018-01-17  Tom Tromey  <tom@tromey.com>
10851
10852         * dwarf2read.c (delayed_method_info): Remove typedef.
10853         (dwarf2_cu::method_info): Now a std::vector.
10854         (add_to_method_list): Update.
10855         (free_delayed_list): Remove.
10856         (compute_delayed_physnames): Update.
10857         (process_full_comp_unit, process_full_type_unit): Clear the method
10858         list.  Remove cleanups.
10859         (psymtab_include_file_name): Add name_holder parameter.  Use
10860         unique_xmalloc_ptr.
10861         (dwarf_decode_lines): Update.
10862
10863 2018-01-17  Tom Tromey  <tom@tromey.com>
10864             Simon Marchi  <simon.marchi@ericsson.com>
10865
10866         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10867         (dwarf2_per_objfile::free_cached_comp_units)
10868         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10869         (init_cutu_and_read_dies_no_follow): Update.
10870         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10871         (dwarf2_cu::~dwarf2_cu): New.
10872         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10873         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10874
10875 2018-01-17  Tom Tromey  <tom@tromey.com>
10876             Simon Marchi  <simon.marchi@ericsson.com>
10877
10878         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10879         (struct die_reader_specs) <abbrev_table>: New member.
10880         (struct abbrev_table): Add constructor.
10881         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10882         <abbrev_obstack>: Now an auto_obstack.
10883         (abbrev_table_up): New typedef.
10884         (init_cu_die_reader): Add abbrev_table parameter.
10885         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10886         Add result_dwo_abbrev_table.
10887         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10888         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10889         Update.
10890         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10891         parameter.
10892         (skip_children): Update.
10893         (abbrev_table::alloc_abbrev): Rename from
10894         abbrev_table_alloc_abbrev.
10895         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10896         (abbrev_table::lookup_abbrev): Rename from
10897         abbrev_table_lookup_abbrev.
10898         (abbrev_table_read_table): Return abbrev_table_up.
10899         (abbrev_table_free, abbrev_table_free_cleanup)
10900         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10901         (load_partial_dies): Update.
10902
10903 2018-01-17  Tom Tromey  <tom@tromey.com>
10904
10905         * dwarf2read.c (dwarf2_compute_name): Update comment.
10906         (read_func_scope, read_variable): Update.
10907         (new_symbol): Remove.
10908         (new_symbol_full): Rename to new_symbol.
10909
10910 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10911
10912         PR gdb/16577
10913         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10914         a warning instead of throwing an error, set section size to 0 and return
10915         NULL.
10916         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10917
10918 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10919
10920         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10921         std::string.
10922         (linux_ptrace_attach_fail_reason_string): Likewise.
10923         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10924         Likewise.
10925         (linux_ptrace_attach_fail_reason_string): Likewise.
10926         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10927
10928 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10929
10930         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10931
10932 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10933
10934         PR gdb/21559
10935         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10936         checking for fs_base/gs_base fields in struct user_regs_struct.
10937         * configure: Regenerate.
10938
10939 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10940
10941         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10942         function.
10943         (aarch64_linux_init_abi): Install it to gdbarch hook
10944         gcc_target_options.
10945
10946 2018-01-15  Pedro Alves  <palves@redhat.com>
10947
10948         * common/signals-state-save-restore.c
10949         (save_original_signals_state): Fix typos.
10950
10951 2017-01-12  Tom Tromey  <tom@tromey.com>
10952             Sergio Durigan Junior  <sergiodj@redhat.com>
10953
10954         * Makefile.in (install-only): Install gdb-add-index.
10955
10956 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10957
10958         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10959
10960 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10961
10962         * infrun.c (keep_going_pass_signal): Clear step-over info when
10963         insert_breakpoints fails.
10964
10965 2018-01-11  Pedro Alves  <palves@redhat.com>
10966
10967         PR gdb/22583
10968         * infrun.c (resume): Rename to ...
10969         (resume_1): ... this.
10970         (resume): Reimplement as wrapper around resume_1.
10971
10972 2018-01-11  Pedro Alves  <palves@redhat.com>
10973
10974         PR remote/22597
10975         * remote.c (remote_parse_stop_reply): Default to the last-set
10976         general thread instead of to 'magic_null_ptid'.
10977
10978 2018-01-10  Pedro Alves  <palves@redhat.com>
10979
10980         * language.h (language_get_symbol_name_matcher): Rename ...
10981         (get_symbol_name_matcher): ... this.
10982         * language.c (language_get_symbol_name_matcher): Ditto.
10983         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10984         callers adjusted.
10985
10986 2018-01-10  Pedro Alves  <palves@redhat.com>
10987
10988         PR gdb/22670
10989         * dwarf2read.c
10990         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10991         Adjust to use language_get_symbol_name_matcher instead of
10992         language_defn::la_get_symbol_name_matcher.
10993         * language.c (language_get_symbol_name_matcher): If in Ada mode
10994         and the lookup name is a verbatim match, return Ada's matcher.
10995         * language.h (language_get_symbol_name_matcher): Adjust comment.
10996         (ada_lookup_name_info::verbatim_p):: New method.
10997
10998 2018-01-10  Pedro Alves  <palves@redhat.com>
10999
11000         PR gdb/22670
11001         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11002         minsym's language is language_auto or language_cplus, pass down
11003         language_ada instead.
11004         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11005
11006 2018-01-10  Pedro Alves  <palves@redhat.com>
11007
11008         PR gdb/22670
11009         * minsyms.c (linkage_name_str): New function.
11010         (iterate_over_minimal_symbols): Use it.
11011
11012 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11013
11014         * NEWS: Document that 'info proc' now works on FreeBSD.
11015
11016 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11017
11018         * configure.ac: Check for kinfo_getfile in libutil.
11019         * configure: Regenerate.
11020         * config.in: Regenerate.
11021         * fbsd-nat.c: Include "fbsd-tdep.h".
11022         (fbsd_fetch_cmdline): New.
11023         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11024         rather than calling error.
11025         (fbsd_info_proc): New.
11026         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11027         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11028         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11029
11030 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11031
11032         * fbsd-nat.c (struct free_deleter): Remove.
11033         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11034
11035 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11036
11037         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11038         NULL for an empty pathname.
11039
11040 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11041
11042         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11043         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11044         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11045         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11046         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11047         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11048         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11049         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11050         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11051         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11052         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11053         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11054         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11055         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11056         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11057
11058 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11059
11060         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11061         (gnu_xfer_auxv): New function.
11062         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11063         TARGET_OBJECT_AUXV.
11064
11065 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11066             Simon Marchi  <simon.marchi@ericsson.com>
11067
11068         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11069         common/selftest.c.
11070         (COMMON_OBS): Remove selftest.o.
11071         * configure.ac: Append selftest-arch.c and common/selftest.c to
11072         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11073         * configure: Re-generated.
11074         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11075         GDB_SELF_TEST.
11076         (maintenance_info_selftests): Likewise.
11077
11078 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11079
11080         * ada-valprint.c (val_print_packed_array_elements): Use
11081         proper number of elements when printing an array indexed
11082         by an enumeration type.
11083
11084 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11085
11086         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11087         (dw2_get_file_names_reader): Adjust.
11088         (lookup_dwo_signatured_type): Adjust.
11089         (lookup_dwp_signatured_type): Adjust.
11090         (lookup_signatured_type): Adjust.
11091         (create_type_unit_group): Adjust.
11092         (get_type_unit_group): Adjust.
11093         (process_psymtab_comp_unit_reader): Adjust.
11094         (build_type_psymtabs_reader): Adjust.
11095         (scan_partial_symbols): Adjust.
11096         (add_partial_symbol): Adjust.
11097         (add_partial_subprogram): Adjust.
11098         (peek_die_abbrev): Adjust.
11099         (fixup_go_packaging): Adjust.
11100         (process_imported_unit_die): Adjust.
11101         (dwarf2_compute_name): Adjust.
11102         (dwarf2_physname): Adjust.
11103         (read_import_statement): Adjust.
11104         (handle_DW_AT_stmt_list): Adjust.
11105         (read_file_scope): Adjust.
11106         (read_func_scope): Adjust.
11107         (read_lexical_block_scope): Adjust.
11108         (read_call_site_scope): Adjust.
11109         (read_variable): Adjust.
11110         (dwarf2_rnglists_process): Adjust.
11111         (dwarf2_ranges_process): Adjust.
11112         (dwarf2_ranges_read): Adjust.
11113         (dwarf2_get_pc_bounds): Adjust.
11114         (dwarf2_record_block_ranges): Adjust.
11115         (dwarf2_add_field): Adjust.
11116         (dwarf2_add_member_fn): Adjust.
11117         (read_structure_type): Adjust.
11118         (process_structure_scope): Adjust.
11119         (read_enumeration_type): Adjust.
11120         (read_array_type): Adjust.
11121         (mark_common_block_symbol_computed): Adjust.
11122         (read_common_block): Adjust.
11123         (read_namespace_type): Adjust.
11124         (read_namespace): Adjust.
11125         (read_module_type): Adjust.
11126         (read_tag_pointer_type): Adjust.
11127         (read_tag_ptr_to_member_type): Adjust.
11128         (read_tag_string_type): Adjust.
11129         (read_subroutine_type): Adjust.
11130         (read_typedef): Adjust.
11131         (read_base_type): Adjust.
11132         (attr_to_dynamic_prop): Adjust.
11133         (read_subrange_type): Adjust.
11134         (read_unspecified_type): Adjust.
11135         (dwarf2_read_abbrevs): Adjust.
11136         (load_partial_dies): Adjust.
11137         (read_partial_die): Adjust.
11138         (find_partial_die): Adjust.
11139         (guess_partial_die_structure_name): Adjust.
11140         (fixup_partial_die): Adjust.
11141         (read_attribute_value): Adjust.
11142         (read_addr_index): Adjust.
11143         (read_addr_index_from_leb128): Adjust.
11144         (read_str_index): Adjust.
11145         (dwarf2_string_attr): Adjust.
11146         (get_debug_line_section): Adjust.
11147         (dwarf_decode_line_header): Adjust.
11148         (lnp_state_machine::check_line_address): Adjust.
11149         (dwarf_decode_lines_1): Adjust.
11150         (dwarf_decode_lines): Adjust.
11151         (dwarf2_start_symtab): Adjust.
11152         (var_decode_location): Adjust.
11153         (new_symbol_full): Adjust.
11154         (dwarf2_const_value_data): Adjust.
11155         (dwarf2_const_value_attr): Adjust.
11156         (dwarf2_const_value): Adjust.
11157         (die_type): Adjust.
11158         (die_containing_type): Adjust.
11159         (build_error_marker_type): Adjust.
11160         (lookup_die_type): Adjust.
11161         (guess_full_die_structure_name): Adjust.
11162         (anonymous_struct_prefix): Adjust.
11163         (determine_prefix): Adjust.
11164         (dwarf2_name): Adjust.
11165         (follow_die_ref_or_sig): Adjust.
11166         (follow_die_offset): Adjust.
11167         (follow_die_ref): Adjust.
11168         (follow_die_sig_1): Adjust.
11169         (follow_die_sig): Adjust.
11170         (get_signatured_type): Adjust.
11171         (get_DW_AT_signature_type): Adjust.
11172         (decode_locdesc): Adjust.
11173         (dwarf_decode_macros): Adjust.
11174         (cu_debug_loc_section): Adjust.
11175         (fill_in_loclist_baton): Adjust.
11176         (dwarf2_symbol_mark_computed): Adjust.
11177         (init_one_comp_unit): Don't assign
11178         dwarf2_cu::dwarf2_per_objfile.
11179         (set_die_type): Adjust.
11180
11181 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11182
11183         * dwarf2read.c (struct mapped_debug_names): Add constructor.
11184         <dwarf2_per_objfile>: New field.
11185         (dwarf2_per_objfile): Remove global.
11186         (get_dwarf2_per_objfile): New function.
11187         (set_dwarf2_per_objfile): New function.
11188         (dwarf2_build_psymtabs_hard): Change objfile parameter to
11189         dwarf2_per_objfile.
11190         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11191         (read_abbrev_offset): Likewise.
11192         (read_indirect_string): Likewise.
11193         (read_indirect_line_string): Likewise.
11194         (read_indirect_string_at_offset): Likewise.
11195         (read_indirect_string_from_dwz): Likewise.
11196         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11197         dwarf2_per_objfile.
11198         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11199         (create_all_comp_units): Change objfile parameter to
11200         dwarf2_per_objfile.
11201         (create_all_type_units): Likewise.
11202         (process_queue): Add dwarf2_per_objfile parameter.
11203         (read_and_check_comp_unit_head): Likewise.
11204         (lookup_dwo_unit_in_dwp): Likewise.
11205         (get_dwp_file): Likewise.
11206         (process_cu_includes): Likewise.
11207         (struct free_dwo_file_cleanup_data): New struct.
11208         (dwarf2_has_info): Use get_dwarf2_per_objfile and
11209         set_dwarf2_per_objfile.
11210         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11211         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11212         context, adjust calls.
11213         (dw2_instantiate_symtab): Likewise.
11214         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11215         (dw2_get_cu): Likewise.
11216         (create_cu_from_index_list): Change objfile parameter to
11217         dwarf2_per_objfile.
11218         (create_cus_from_index_list): Get dwarf2_per_objfile from
11219         context, adjust calls.
11220         (create_cus_from_index): Likewise.
11221         (create_signatured_type_table_from_index): Change objfile
11222         parameter to dwarf2_per_objfile.
11223         (create_signatured_type_table_from_debug_names): Change objfile
11224         parameter to dwarf2_per_objfile.
11225         (create_addrmap_from_index): Likewise.
11226         (create_addrmap_from_aranges): Likewise.
11227         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11228         (dw2_setup): Remove.
11229         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11230         context.
11231         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11232         get_dwarf2_per_objfile.
11233         (dw2_forget_cached_source_info): Likewise.
11234         (dw2_map_symtabs_matching_filename): Likewise.
11235         (struct dw2_symtab_iterator) <index>: Remove.
11236         <dwarf2_per_objfile>: New field.
11237         (dw2_symtab_iter_init): Replace index parameter with
11238         dwarf2_per_objfile.
11239         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11240         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11241         (dw2_print_stats): Likewise.
11242         (dw2_dump): Likewise.
11243         (dw2_expand_symtabs_for_function): Likewise.
11244         (dw2_expand_all_symtabs): Likewise.
11245         (dw2_expand_symtabs_with_fullname): Likewise.
11246         (dw2_expand_marked_cus): Replace index and objfile parameters
11247         with dwarf2_per_objfile.
11248         (dw_expand_symtabs_matching_file_matcher): Add
11249         dwarf2_per_objfile parameter and adjust calls.
11250         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11251         adjust calls.
11252         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11253         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11254         adjust calls.
11255         (create_cus_from_debug_names_list): Replace objfile parameter
11256         with dwarf2_per_objfile and adjust calls.
11257         (create_cus_from_debug_names): Likewise.
11258         (dwarf2_read_debug_names): Likewise.
11259         (mapped_debug_names::namei_to_name): Adjust call.
11260         (dw2_debug_names_iterator::next): Likewise.
11261         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11262         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11263         (dw2_debug_names_dump): Likewise.
11264         (dw2_debug_names_expand_symtabs_for_function): Likewise.
11265         (dw2_debug_names_expand_symtabs_matching): Likewise.
11266         (dwarf2_initialize_objfile): Likewise.
11267         (dwarf2_build_psymtabs): Likewise.
11268         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11269         this_cu.
11270         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11271         (read_and_check_comp_unit_head): Likewise.
11272         (read_abbrev_offset): Likewise.
11273         (create_debug_type_hash_table): Likewise.
11274         (create_debug_types_hash_table): Likewise.
11275         (create_all_type_units): Replace objfile parameter with
11276         dwarf2_per_objfile.
11277         (add_type_unit): Add dwarf2_per_objfile parameter.
11278         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11279         with dwarf2_per_objfile.
11280         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11281         (lookup_dwp_signatured_type): Likewise.
11282         (lookup_signatured_type): Likewise.
11283         (read_cutu_die_from_dwo): Likewise.
11284         (init_tu_and_read_dwo_dies): Likewise.
11285         (init_cutu_and_read_dies): Likewise.
11286         (init_cutu_and_read_dies_no_follow): Likewise.
11287         (allocate_type_unit_groups_table): Add objfile parameter.
11288         (create_type_unit_group): Use dwarf2_per_objfile from cu.
11289         (get_type_unit_group): Likewise.
11290         (process_psymtab_comp_unit): Update call.
11291         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11292         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11293         (print_tu_stats): Likewise.
11294         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11295         in void* parameter.
11296         (build_type_psymtabs): Change objfile parameter to
11297         dwarf2_per_objfile.
11298         (process_skeletonless_type_unit): Use dwarf2_per_objfile
11299         passed in void* parameter.
11300         (process_skeletonless_type_units): Change objfile parameter to
11301         dwarf2_per_objfile.
11302         (set_partial_user): Likewise.
11303         (dwarf2_build_psymtabs_hard): Likewise.
11304         (read_comp_units_from_section): Likewise.
11305         (create_all_comp_units): Likewise.
11306         (scan_partial_symbols): Update calls.
11307         (add_partial_symbol): Likewise.
11308         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11309         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11310         (process_queue): Add dwarf2_per_objfile parameter.
11311         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11312         (compute_compunit_symtab_includes): Likewise.
11313         (process_cu_includes): Add dwarf2_per_objfile parameter.
11314         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11315         (process_full_type_unit): Likewise.
11316         (process_imported_unit_die): Update call.
11317         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11318         (read_file_scope): Likewise.
11319         (allocate_dwo_file_hash_table): Add objfile parameter.
11320         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11321         (create_cus_hash_table): Likewise.
11322         (create_dwp_hash_table): Likewise.
11323         (create_dwo_unit_in_dwp_v1): Likewise.
11324         (create_dwp_v2_section): Likewise.
11325         (create_dwo_unit_in_dwp_v2): Likewise.
11326         (lookup_dwo_unit_in_dwp): Likewise.
11327         (try_open_dwop_file): Likewise.
11328         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11329         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11330         cleanup to include a reference to dwarf2_per_objfile.
11331         (open_dwp_file): Add dwarf2_per_objfile parameter.
11332         (open_and_init_dwp_file): Likewise.
11333         (get_dwp_file): Likewise.
11334         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11335         (queue_and_load_all_dwo_tus): Update call.
11336         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11337         data.
11338         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11339         (dwarf2_ranges_process): Likewise.
11340         (dwarf2_get_pc_bounds): Likewise.
11341         (mark_common_block_symbol_computed): Likewise.
11342         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11343         (dwarf2_read_abbrevs): Update call.
11344         (read_partial_die): Use dwarf2_per_objfile from cu.
11345         (find_partial_die): Likewise.
11346         (fixup_partial_die): Likewise.
11347         (read_attribute_value): Likewise.
11348         (read_indirect_string_at_offset_from): Add objfile parameter.
11349         (read_indirect_string_at_offset): Add dwarf2_per_objfile
11350         parameter.
11351         (read_indirect_string_from_dwz): Add objfile parameter.
11352         (read_indirect_string): Add objfile parameter.
11353         (read_addr_index_1): Add dwarf2_per_objfile parameter.
11354         (read_addr_index): Use dwarf2_per_objfile from cu.
11355         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11356         call dw2_setup.
11357         (read_str_index): Use dwarf2_per_objfile from cu.
11358         (get_debug_line_section): Likewise.
11359         (read_formatted_entries): Add dwarf2_per_objfile parameter.
11360         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11361         (new_symbol_full): Use dwarf2_per_objfile from cu.
11362         (build_error_marker_type): Likewise.
11363         (lookup_die_type): Likewise.
11364         (determine_prefix): Likewise.
11365         (follow_die_offset): Likewise.
11366         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11367         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11368         (dwarf2_fetch_die_type_sect_off): Likewise.
11369         (dwarf2_get_die_type): Likewise.
11370         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11371         (get_signatured_type): Likewise.
11372         (get_DW_AT_signature_type): Likewise.
11373         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11374         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11375         (cu_debug_loc_section): Likewise.
11376         (fill_in_loclist_baton): Likewise.
11377         (dwarf2_symbol_mark_computed): Likewise.
11378         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11379         dwarf2_per_objfile.
11380         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11381         parameter.
11382         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11383         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11384         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11385         (set_die_type): Use dwarf2_free_objfile from cu.
11386         (get_die_type_at_offset): Likewise.
11387         (dwarf2_per_objfile_free): Don't assign global variable.
11388         (debug_names) <constructor>: Add dwarf2_per_objfile
11389         parameter, update m_debugstrlookup construction.
11390         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11391         parameter.
11392         <m_dwarf2_per_objfile>: New field.
11393         <lookup>: Use m_dwarf2_per_objfile.
11394         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11395         (psyms_seen_size): Likewise.
11396         (write_gdbindex): Replace objfile parameter with
11397         dwarf2_per_objfile.
11398         (write_debug_names): Likewise.
11399         (write_psymtabs_to_index): Likewise.
11400         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11401         calls.
11402
11403 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11404
11405         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11406         <dwarf2_per_objfile>: New field.
11407         (struct dwarf2_per_cu_data) <objfile>: Remove.
11408         <dwarf2_per_objfile>: New field.
11409         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11410         of objfile.
11411         (create_signatured_type_table_from_index): Likewise.
11412         (create_debug_type_hash_table): Likewise.
11413         (fill_in_sig_entry_from_dwo_entry): Likewise.
11414         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11415         (create_type_unit_group): Assign dwarf2_per_objfile instead of
11416         objfile.
11417         (create_partial_symtab): Access objfile through
11418         dwarf2_per_objfile.
11419         (process_psymtab_comp_unit_reader): Likewise.
11420         (read_comp_units_from_section): Likewise.
11421         (scan_partial_symbols): Likewise.
11422         (add_partial_symbol): Likewise.
11423         (add_partial_subprogram): Likewise.
11424         (peek_die_abbrev): Likewise.
11425         (fixup_go_packaging): Likewise.
11426         (process_full_comp_unit): Likewise.
11427         (process_full_type_unit): Likewise.
11428         (process_imported_unit_die): Likewise.
11429         (dwarf2_compute_name): Likewise.
11430         (dwarf2_physname): Likewise.
11431         (read_import_statement): Likewise.
11432         (create_cus_hash_table): Assign dwarf2_physname instead of
11433         objfile.
11434         (read_func_scope): Access objfile through dwarf2_per_objfile.
11435         (read_lexical_block_scope): Likewise.
11436         (read_call_site_scope): Likewise.
11437         (read_variable): Likewise.
11438         (dwarf2_rnglists_process): Likewise.
11439         (dwarf2_ranges_process): Likewise.
11440         (dwarf2_ranges_read): Likewise.
11441         (dwarf2_record_block_ranges): Likewise.
11442         (dwarf2_add_field): Likewise.
11443         (dwarf2_add_member_fn): Likewise.
11444         (read_structure_type): Likewise.
11445         (process_structure_scope): Likewise.
11446         (read_enumeration_type): Likewise.
11447         (read_array_type): Likewise.
11448         (read_common_block): Likewise.
11449         (read_namespace_type): Likewise.
11450         (read_namespace): Likewise.
11451         (read_module_type): Likewise.
11452         (read_tag_pointer_type): Likewise.
11453         (read_tag_ptr_to_member_type): Likewise.
11454         (read_tag_string_type): Likewise.
11455         (read_subroutine_type): Likewise.
11456         (read_typedef): Likewise.
11457         (read_base_type): Likewise.
11458         (attr_to_dynamic_prop): Likewise.
11459         (read_subrange_type): Likewise.
11460         (read_unspecified_type): Likewise.
11461         (load_partial_dies): Likewise.
11462         (read_partial_die): Likewise.
11463         (find_partial_die): Likewise.
11464         (guess_partial_die_structure_name): Likewise.
11465         (fixup_partial_die): Likewise.
11466         (read_attribute_value): Likewise.
11467         (read_addr_index_from_leb128): Likewise.
11468         (dwarf2_read_addr_index): Likewise.
11469         (dwarf2_string_attr): Likewise.
11470         (lnp_state_machine::check_line_address): Likewise.
11471         (dwarf_decode_lines_1): Likewise.
11472         (dwarf_decode_lines): Likewise.
11473         (dwarf2_start_symtab): Likewise.
11474         (var_decode_location): Likewise.
11475         (new_symbol_full): Likewise.
11476         (dwarf2_const_value_data): Likewise.
11477         (dwarf2_const_value_attr): Likewise.
11478         (dwarf2_const_value): Likewise.
11479         (die_type): Likewise.
11480         (die_containing_type): Likewise.
11481         (lookup_die_type): Likewise.
11482         (guess_full_die_structure_name): Likewise.
11483         (anonymous_struct_prefix): Likewise.
11484         (dwarf2_name): Likewise.
11485         (follow_die_ref_or_sig): Likewise.
11486         (follow_die_offset): Likewise.
11487         (follow_die_ref): Likewise.
11488         (dwarf2_fetch_die_loc_sect_off): Likewise.
11489         (dwarf2_fetch_constant_bytes): Likewise.
11490         (dwarf2_fetch_die_type_sect_off): Likewise.
11491         (dwarf2_get_die_type): Likewise.
11492         (follow_die_sig): Likewise.
11493         (decode_locdesc): Likewise.
11494         (dwarf2_per_cu_objfile): Likewise.
11495         (dwarf2_per_cu_text_offset): Likewise.
11496         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11497         objfile.
11498         (set_die_type): Access objfile through
11499         dwarf2_per_objfile.
11500
11501 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11502
11503         * valprint.c (converted_character_d): Remove typedef.
11504         (DEF_VEC_O (converted_character_d)): Remove.
11505         (count_next_character): Use std::vector.
11506         (print_converted_chars_to_obstack): Likewise.
11507         (generic_printstr): Likewise.
11508
11509 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11510
11511         * xml-support.h (struct gdb_xml_value): Add constructor.
11512         <value>: Change type to unique_xmalloc_ptr.
11513         (gdb_xml_value_s): Remove typedef.
11514         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11515         (gdb_xml_element_start_handler): Change parameter type to
11516         std::vector.
11517         (xml_find_attribute): Likewise.
11518         * xml-support.c (xml_find_attribute): Change parameter type to
11519         std::vector and adjust.
11520         (gdb_xml_values_cleanup): Remove.
11521         (gdb_xml_parser::start_element): Adjust to std::vector.
11522         (xinclude_start_include): Change paraeter type to std::vector
11523         and adjust.
11524         * btrace.c (check_xml_btrace_version): Likewise.
11525         (parse_xml_btrace_block): Likewise.
11526         (parse_xml_btrace_pt_config_cpu): Likewise.
11527         (parse_xml_btrace_pt): Likewise.
11528         (parse_xml_btrace_conf_bts): Likewise.
11529         (parse_xml_btrace_conf_pt): Likewise.
11530         * memory-map.c (memory_map_start_memory): Likewise.
11531         (memory_map_start_property): Likewise.
11532         * osdata.c (osdata_start_osdata): Likewise.
11533         (osdata_start_item): Likewise.
11534         (osdata_start_column): Likewise.
11535         * remote.c (start_thread): Likewise.
11536         * solib-aix.c (library_list_start_library): Likewise.
11537         (library_list_start_list): Likewise.
11538         * solib-svr4.c (library_list_start_library): Likewise.
11539         (svr4_library_list_start_list): Likewise.
11540         * solib-target.c (library_list_start_segment): Likewise.
11541         (library_list_start_section): Likewise.
11542         (library_list_start_library): Likewise.
11543         (library_list_start_list): Likewise.
11544         * tracepoint.c (traceframe_info_start_memory): Likewise.
11545         (traceframe_info_start_tvar): Likewise.
11546         * xml-syscall.c (syscall_start_syscall): Likewise.
11547         * xml-tdesc.c (tdesc_start_target): Likewise.
11548         (tdesc_start_feature): Likewise.
11549         (tdesc_start_reg): Likewise.
11550         (tdesc_start_union): Likewise.
11551         (tdesc_start_struct): Likewise.
11552         (tdesc_start_flags): Likewise.
11553         (tdesc_start_enum): Likewise.
11554         (tdesc_start_field): Likewise.
11555         (tdesc_start_enum_value): Likewise.
11556         (tdesc_start_vector): Likewise.
11557
11558 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11559
11560         * extension.h (struct xmethod_worker) <clone>: Remove.
11561         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11562         Remove.
11563         (python_xmethod_worker::clone): Remove.
11564         * valops.c (find_overload_match): Use std::move instead of
11565         clone.
11566
11567 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11568
11569         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11570         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11571         <free_xmethod_worker_data>: Remove.
11572         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11573         <get_xmethod_arg_types>: Remove.
11574         <get_xmethod_result_type>: Remove.
11575         <invoke_xmethod>: Remove.
11576         * extension.c (new_xmethod_worker): Remove.
11577         (clone_xmethod_worker): Remove.
11578         (get_matching_xmethod_workers): Return void, pass std::vector by
11579         pointer.
11580         (get_xmethod_arg_types): Rename to...
11581         (xmethod_worker::get_arg_types): ... this, and adjust.
11582         (get_xmethod_result_type): Rename to...
11583         (xmethod_worker::get_result_type): ... this, and adjust.
11584         (invoke_xmethod): Remove.
11585         (free_xmethod_worker): Remove.
11586         (free_xmethod_worker_vec): Remove.
11587         * extension.h (enum ext_lang_rc): Move here from
11588         extension-priv.h.
11589         (struct xmethod_worker): Add constructor and destructor.
11590         <data>: Remove.
11591         <value>: Remove.
11592         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11593         virtual pure methods.
11594         <get_arg_types, get_result_type>: New methods.
11595         (xmethod_worker_ptr): Remove typedef.
11596         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11597         (xmethod_worker_vec): Remove typedef.
11598         (xmethod_worker_up): New typedef.
11599         (invoke_xmethod): Remove.
11600         (clone_xmethod_worker): Remove.
11601         (free_xmethod_worker): Remove.
11602         (free_xmethod_worker_vec): Remove.
11603         (get_xmethod_arg_types): Remove.
11604         (get_xmethod_result_type): Remove.
11605         * valops.c (find_method_list): Use std::vector, don't use
11606         intermediate vector.
11607         (value_find_oload_method_list): Use std::vector.
11608         (find_overload_match): Use std::vector.
11609         (find_oload_champ): Use std::vector.
11610         * value.c (value_free): Use operator delete.
11611         (value_of_xmethod): Rename to...
11612         (value_from_xmethod): ... this.  Don't assign
11613         xmethod_worker::value, take rvalue-reference.
11614         (result_type_of_xmethod): Adjust.
11615         (call_xmethod): Adjust.
11616         * value.h: Include extension.h.
11617         (struct xmethod_worker): Don't forward-declare.
11618         (value_of_xmethod): Rename to...
11619         (value_from_xmethod): ... this, take rvalue-reference.
11620         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11621         (struct python_xmethod_worker): ... this, add constructor and
11622         destructor.
11623         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11624         (gdbpy_free_xmethod_worker_data): Rename to...
11625         (python_xmethod_worker::~python_xmethod_worker): ... this and
11626         adjust.
11627         (gdbpy_clone_xmethod_worker_data): Rename to...
11628         (python_xmethod_worker::clone): ... this and adjust.
11629         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11630         temporary vector.
11631         (gdbpy_get_xmethod_arg_types): Rename to...
11632         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11633         (gdbpy_get_xmethod_result_type): Rename to...
11634         (python_xmethod_worker::do_get_result_type): ... this and
11635         adjust.
11636         (gdbpy_invoke_xmethod): Rename to...
11637         (python_xmethod_worker::invoke): ... this and adjust.
11638         (new_python_xmethod_worker): Rename to...
11639         (python_xmethod_worker::python_xmethod_worker): ... this and
11640         adjust.
11641         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11642         Remove.
11643         (gdbpy_free_xmethod_worker_data): Remove.
11644         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11645         (gdbpy_get_xmethod_arg_types): Remove.
11646         (gdbpy_get_xmethod_result_type): Remove.
11647         (gdbpy_invoke_xmethod): Remove.
11648         * python/python.c (python_extension_ops): Remove obsolete
11649         callbacks.
11650
11651 2018-01-05  Pedro Alves  <palves@redhat.com>
11652
11653         PR gdb/18653
11654         * common/signals-state-save-restore.c
11655         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11656         find a custom handler preinstalled, instead of internal erroring.
11657         But only warn if !quiet.
11658         * common/signals-state-save-restore.h
11659         (save_original_signals_state): New parameter 'quiet'.
11660         * main.c (captured_main_1): Move save_original_signals_state call
11661         after option handling, and pass QUIET.
11662
11663 2018-01-05  Pedro Alves  <palves@redhat.com>
11664
11665         * spu-tdep.c (spu_catch_start): Pass
11666         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11667
11668 2018-01-05  Pedro Alves  <palves@redhat.com>
11669
11670         PR gdb/22670
11671         * ada-lang.c (literal_symbol_name_matcher): New function.
11672         (ada_get_symbol_name_matcher): Use it for
11673         symbol_name_match_type::SEARCH_NAME.
11674         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11675         it down instead of assuming symbol_name_match_type::FULL.
11676         * block.h (block_lookup_symbol): New parameter 'match_type'.
11677         * c-valprint.c (print_unpacked_pointer): Use
11678         lookup_symbol_search_name instead of lookup_symbol.
11679         * compile/compile-object-load.c (get_out_value_type): Pass down
11680         symbol_name_match_type::SEARCH_NAME.
11681         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11682         symbol_name_match_type::FULL.
11683         * cp-support.c (cp_get_symbol_name_matcher): Handle
11684         symbol_name_match_type::SEARCH_NAME.
11685         * infrun.c (insert_exception_resume_breakpoint): Use
11686         lookup_symbol_search_name.
11687         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11688         * psymtab.c (maintenance_check_psymtabs): Use
11689         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11690         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11691         SYMBOL_SEARCH_NAME.
11692         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11693         if symbol_name_match_type::SEARCH_NAME.
11694         (lookup_symbol_in_language): Pass down
11695         symbol_name_match_type::FULL.
11696         (lookup_symbol_search_name): New.
11697         (lookup_language_this): Pass down
11698         symbol_name_match_type::SEARCH_NAME.
11699         (lookup_symbol_aux, lookup_local_symbol): New parameter
11700         'match_type'.  Pass it down.
11701         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11702         (lookup_symbol_search_name): New declaration.
11703         (lookup_symbol_in_block): New 'match_type' parameter.
11704
11705 2018-01-05  Pedro Alves  <palves@redhat.com>
11706
11707         PR gdb/22670
11708         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11709         ada_lookup_symbol.
11710         (ada_lookup_symbol): Reimplement in terms of
11711         ada_lookup_symbol_list, bits factored out from
11712         ada_lookup_encoded_symbol.
11713
11714 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11715
11716         * ada-exp.y (write_object_renaming): When subscripting an array
11717         using a symbol as the index, pass the block in call to
11718         ada_lookup_encoded_symbol when looking that symbol up.
11719
11720 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11721
11722         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11723         TYPE_INDEX_TYPE.
11724
11725 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11726
11727         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11728         the case where VALUE_LVAL (val0) is not lval_memory.
11729
11730 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11731
11732         * ada-valprint.c (print_optional_low_bound): Handle
11733         character-indexed array printing like boolean-indexed array
11734         printing.
11735
11736 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11737
11738         * NEWS: Create a new section for the next release branch.
11739         Rename the section of the current branch, now that it has
11740         been cut.
11741
11742 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11743
11744         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11745         * version.in: Bump version to 8.1.50.DATE-git.
11746
11747 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11748
11749         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11750         Add field.
11751         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11752         Add field.
11753         (default_exception_support_info) <catch_handlers_sym>: Add field.
11754         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11755         (ada_exception_name_addr_1): Add "catch handlers" handling.
11756         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11757         Update all callers.
11758         (create_excep_cond_exprs) <ex>: Add parameter.
11759         (re_set_exception): Update create_excep_cond_exprs call.
11760         (print_it_exception, print_one_exception, print_mention_exception)
11761         (print_recreate_exception): Add "catch handler" handling.
11762         (allocate_location_catch_handlers, re_set_catch_handlers)
11763         (check_status_catch_handlers, print_it_catch_handlers)
11764         (print_one_catch_handlers, print_mention_catch_handlers)
11765         (print_recreate_catch_handlers): New function.
11766         (catch_handlers_breakpoint_ops): New variable.
11767         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11768         Add parameter.  Add "catch handler" handling.
11769         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11770         Add "catch handler" handling.
11771         (ada_exception_catchpoint_cond_string): Add "catch handler"
11772         handling.
11773         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11774         call.
11775         (catch_ada_handlers_command): New function.
11776         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11777         operations structure.
11778         (_initialize_ada_language): Add "catch handlers" command entry.
11779         * NEWS: Document "catch handlers" feature.
11780
11781 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11782
11783         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11784         account when creating the array type of the slice.
11785         (ada_value_slice): Likewise.
11786
11787 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11788
11789         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11790         New enum value.
11791         (create_array_type_with_stride): Add byte_stride_prop parameter.
11792         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11793         New parameter.  Update all callers in this file.
11794         (array_type_has_dynamic_stride): New function.
11795         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11796         of arrays with dynamic byte strides.
11797         * dwarf2read.c (read_array_type): Add support for dynamic
11798         DW_AT_byte_stride attributes.
11799
11800 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11801
11802         * dwarf2read.c (read_unspecified_type): Treat
11803         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11804
11805 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11806
11807         Update copyright year range in all GDB files.
11808
11809 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11810
11811         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11812         and gdb/testsuite/gdb.base/step-line.c.
11813
11814 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11815
11816         * copyright.py (main): Dump the contents of
11817         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11818         even if BY_HAND is empty.
11819
11820 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11821
11822         * top.c (print_gdb_version): Update Copyright year in version
11823         message.
11824
11825 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11826
11827         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11828
11829 For older changes see ChangeLog-2017.
11830 \f
11831 Local Variables:
11832 mode: change-log
11833 left-margin: 8
11834 fill-column: 74
11835 version-control: never
11836 coding: utf-8
11837 End: